@gkd-kit/inspect 0.0.1724845634815 → 0.0.1724939132543

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/assets/{ActionCard.vue_vue_type_script_setup_true_lang-BbGMHnD9.js → ActionCard.vue_vue_type_script_setup_true_lang-Df2iJOjy.js} +3 -3
  2. package/dist/assets/{ActionCard.vue_vue_type_script_setup_true_lang-BbGMHnD9.js.map → ActionCard.vue_vue_type_script_setup_true_lang-Df2iJOjy.js.map} +1 -1
  3. package/dist/assets/{DevicePage-DWVnDXb3.js → DevicePage-DLHOFccW.js} +3 -3
  4. package/dist/assets/{DevicePage-DWVnDXb3.js.map → DevicePage-DLHOFccW.js.map} +1 -1
  5. package/dist/assets/{HomePage-DZKgaZTl.js → HomePage-BeCxcFEe.js} +25 -25
  6. package/dist/assets/HomePage-BeCxcFEe.js.map +1 -0
  7. package/dist/assets/{ImportPage-DBrKtDF5.js → ImportPage-gMpnvfZI.js} +2 -2
  8. package/dist/assets/{ImportPage-DBrKtDF5.js.map → ImportPage-gMpnvfZI.js.map} +1 -1
  9. package/dist/assets/{PreviewSharePage-D6oHndWU.js → PreviewSharePage-Deko6lrO.js} +2 -2
  10. package/dist/assets/{PreviewSharePage-D6oHndWU.js.map → PreviewSharePage-Deko6lrO.js.map} +1 -1
  11. package/dist/assets/{SelectorPage-DK-cX4tL.js → SelectorPage-C7ee-UE1.js} +2 -2
  12. package/dist/assets/SelectorPage-C7ee-UE1.js.map +1 -0
  13. package/dist/assets/{SnapshotPage-BtoKmreE.js → SnapshotPage-CNdcl2gK.js} +11 -11
  14. package/dist/assets/SnapshotPage-CNdcl2gK.js.map +1 -0
  15. package/dist/assets/{TrackGraph-Mr8YgZkT.js → TrackGraph-CHeOoYTg.js} +2 -2
  16. package/dist/assets/{TrackGraph-Mr8YgZkT.js.map → TrackGraph-CHeOoYTg.js.map} +1 -1
  17. package/dist/assets/{_404Page-BOCYvpci.js → _404Page-DukTdgke.js} +2 -2
  18. package/dist/assets/{_404Page-BOCYvpci.js.map → _404Page-DukTdgke.js.map} +1 -1
  19. package/dist/assets/{dayjs.min-C6WHLj8F.js → dayjs.min-LhczAOpU.js} +3 -3
  20. package/dist/assets/{dayjs.min-C6WHLj8F.js.map → dayjs.min-LhczAOpU.js.map} +1 -1
  21. package/dist/assets/{error-CT3VwMVA.js → error-BYB57NEs.js} +2 -2
  22. package/dist/assets/{error-CT3VwMVA.js.map → error-BYB57NEs.js.map} +1 -1
  23. package/dist/assets/{export-DOXRnbdk.js → export-CIlUfZHW.js} +3 -3
  24. package/dist/assets/export-CIlUfZHW.js.map +1 -0
  25. package/dist/assets/{fetch-BConzvJz.js → fetch-C2zNU7qy.js} +9 -9
  26. package/dist/assets/{fetch-BConzvJz.js.map → fetch-C2zNU7qy.js.map} +1 -1
  27. package/dist/assets/{import-cAeWUQpR.js → import-DfEWUxfp.js} +2 -2
  28. package/dist/assets/{import-cAeWUQpR.js.map → import-DfEWUxfp.js.map} +1 -1
  29. package/dist/assets/index-BV9z1P1k.js +2 -0
  30. package/dist/assets/index-BV9z1P1k.js.map +1 -0
  31. package/dist/assets/index-BiTh0rHq.js +561 -0
  32. package/dist/assets/index-BiTh0rHq.js.map +1 -0
  33. package/dist/assets/{index-LsqPCfwK.css → index-DlhjoJf3.css} +1 -1
  34. package/dist/assets/{index-BxtwZRnf.js → index-Xe8rbuNP.js} +3 -3
  35. package/dist/assets/index-Xe8rbuNP.js.map +1 -0
  36. package/dist/assets/polyfills-DUcgW2kq.js +1 -0
  37. package/dist/assets/{table-BXnFF0RB.js → table-bzmBkVJL.js} +2 -2
  38. package/dist/assets/{table-BXnFF0RB.js.map → table-bzmBkVJL.js.map} +1 -1
  39. package/dist/index.html +3 -3
  40. package/package.json +20 -20
  41. package/dist/assets/HomePage-DZKgaZTl.js.map +0 -1
  42. package/dist/assets/SelectorPage-DK-cX4tL.js.map +0 -1
  43. package/dist/assets/SnapshotPage-BtoKmreE.js.map +0 -1
  44. package/dist/assets/export-DOXRnbdk.js.map +0 -1
  45. package/dist/assets/index-B4qBe5EY.js +0 -2
  46. package/dist/assets/index-B4qBe5EY.js.map +0 -1
  47. package/dist/assets/index-BxtwZRnf.js.map +0 -1
  48. package/dist/assets/index-C_l9cDju.js +0 -565
  49. package/dist/assets/index-C_l9cDju.js.map +0 -1
  50. package/dist/assets/polyfills-C_lm3y55.js +0 -1
@@ -1,4 +1,4 @@
1
- import{d as Me,c as Re,a as Xt,b as I,i as te,e as It,f as j,g as ee,h as Yt,u as Pe,j as ue,k as Le,r as Mt,t as Ue,l as ze,m as ct,n as tt,p as Rt,o as q,q as De,s as Pt,v as D,w as et,N as Fe,x as Ve,y as Lt,z as $e,A as K,B as dt,C as bt,D as Ct,E as b,F as E,G as v,H as ut,I as Ht,J as He,_ as de,K as M,L as H,M as fe,O as he,P as ge,Q as Ke,R as ne,S as Oe,T as Je,U as We,V as Ye,W as oe,X as je,Y as qe,Z as nt,$ as Qe}from"./index-C_l9cDju.js";import{_ as Ge,w as ie,s as re}from"./ActionCard.vue_vue_type_script_setup_true_lang-BbGMHnD9.js";import{c as Ze,d as Xe}from"./fetch-BConzvJz.js";import{u as tn,b as en,a as nn,c as on,d as rn}from"./export-DOXRnbdk.js";import{i as an,a as sn}from"./import-cAeWUQpR.js";import{u as Q,g as ae,_ as ln,a as cn,b as un}from"./dayjs.min-C6WHLj8F.js";import{u as dn,_ as fn,r as hn}from"./table-BXnFF0RB.js";import{u as gn,l as Ut,_ as pe,N as pn}from"./index-BxtwZRnf.js";import"./index-CE_5kTG8.js";const wn={buttonHeightSmall:"14px",buttonHeightMedium:"18px",buttonHeightLarge:"22px",buttonWidthSmall:"14px",buttonWidthMedium:"18px",buttonWidthLarge:"22px",buttonWidthPressedSmall:"20px",buttonWidthPressedMedium:"24px",buttonWidthPressedLarge:"28px",railHeightSmall:"18px",railHeightMedium:"22px",railHeightLarge:"26px",railWidthSmall:"32px",railWidthMedium:"40px",railWidthLarge:"48px"};function mn(t){const{primaryColor:e,opacityDisabled:r,borderRadius:i,textColor3:n}=t;return Object.assign(Object.assign({},wn),{iconColor:n,textColor:"white",loadingColor:e,opacityDisabled:r,railColor:"rgba(0, 0, 0, .14)",railColorActive:e,buttonBoxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",buttonColor:"#FFF",railBorderRadiusSmall:i,railBorderRadiusMedium:i,railBorderRadiusLarge:i,buttonBorderRadiusSmall:i,buttonBorderRadiusMedium:i,buttonBorderRadiusLarge:i,boxShadowFocus:`0 0 0 2px ${Re(e,{alpha:.2})}`})}const vn={name:"Switch",common:Me,self:mn},yn=Xt("switch",`
1
+ import{d as Re,c as Pe,a as Xt,b as A,i as te,e as At,f as j,g as ee,h as Yt,u as xe,j as ue,k as Le,r as Rt,t as ze,l as Ue,m as ct,n as tt,p as Pt,o as q,q as De,s as xt,v as D,w as et,N as Fe,x as Ve,y as Lt,z as $e,A as K,B as dt,C as bt,D as Ct,E as b,F as E,G as v,H as ut,I as Ht,J as He,_ as de,K as R,L as H,M as fe,O as he,P as ge,Q as Ke,R as ne,S as Oe,T as Je,U as We,V as Ye,W as nt,X as je,Y as oe,Z as qe,$ as Qe}from"./index-BiTh0rHq.js";import{_ as Ge,w as ie,s as re}from"./ActionCard.vue_vue_type_script_setup_true_lang-Df2iJOjy.js";import{c as Ze,d as Xe}from"./fetch-C2zNU7qy.js";import{u as tn,b as en,a as nn,c as on,d as rn}from"./export-CIlUfZHW.js";import{i as an,a as sn}from"./import-DfEWUxfp.js";import{u as Q,g as ae,_ as ln,a as cn,b as un}from"./dayjs.min-LhczAOpU.js";import{u as dn,_ as fn,r as hn}from"./table-bzmBkVJL.js";import{u as gn,l as zt,_ as pe,N as pn}from"./index-Xe8rbuNP.js";import"./index-CE_5kTG8.js";const wn={buttonHeightSmall:"14px",buttonHeightMedium:"18px",buttonHeightLarge:"22px",buttonWidthSmall:"14px",buttonWidthMedium:"18px",buttonWidthLarge:"22px",buttonWidthPressedSmall:"20px",buttonWidthPressedMedium:"24px",buttonWidthPressedLarge:"28px",railHeightSmall:"18px",railHeightMedium:"22px",railHeightLarge:"26px",railWidthSmall:"32px",railWidthMedium:"40px",railWidthLarge:"48px"};function mn(t){const{primaryColor:e,opacityDisabled:r,borderRadius:o,textColor3:n}=t;return Object.assign(Object.assign({},wn),{iconColor:n,textColor:"white",loadingColor:e,opacityDisabled:r,railColor:"rgba(0, 0, 0, .14)",railColorActive:e,buttonBoxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",buttonColor:"#FFF",railBorderRadiusSmall:o,railBorderRadiusMedium:o,railBorderRadiusLarge:o,buttonBorderRadiusSmall:o,buttonBorderRadiusMedium:o,buttonBorderRadiusLarge:o,boxShadowFocus:`0 0 0 2px ${Pe(e,{alpha:.2})}`})}const vn={name:"Switch",common:Re,self:mn},yn=Xt("switch",`
2
2
  height: var(--n-height);
3
3
  min-width: var(--n-width);
4
4
  vertical-align: middle;
@@ -8,17 +8,17 @@ import{d as Me,c as Re,a as Xt,b as I,i as te,e as It,f as j,g as ee,h as Yt,u a
8
8
  outline: none;
9
9
  justify-content: center;
10
10
  align-items: center;
11
- `,[I("children-placeholder",`
11
+ `,[A("children-placeholder",`
12
12
  height: var(--n-rail-height);
13
13
  display: flex;
14
14
  flex-direction: column;
15
15
  overflow: hidden;
16
16
  pointer-events: none;
17
17
  visibility: hidden;
18
- `),I("rail-placeholder",`
18
+ `),A("rail-placeholder",`
19
19
  display: flex;
20
20
  flex-wrap: none;
21
- `),I("button-placeholder",`
21
+ `),A("button-placeholder",`
22
22
  width: calc(1.75 * var(--n-rail-height));
23
23
  height: var(--n-rail-height);
24
24
  `),Xt("base-loading",`
@@ -29,7 +29,7 @@ import{d as Me,c as Re,a as Xt,b as I,i as te,e as It,f as j,g as ee,h as Yt,u a
29
29
  font-size: calc(var(--n-button-width) - 4px);
30
30
  color: var(--n-loading-color);
31
31
  transition: color .3s var(--n-bezier);
32
- `,[te({left:"50%",top:"50%",originalTransform:"translateX(-50%) translateY(-50%)"})]),I("checked, unchecked",`
32
+ `,[te({left:"50%",top:"50%",originalTransform:"translateX(-50%) translateY(-50%)"})]),A("checked, unchecked",`
33
33
  transition: color .3s var(--n-bezier);
34
34
  color: var(--n-text-color);
35
35
  box-sizing: border-box;
@@ -40,16 +40,16 @@ import{d as Me,c as Re,a as Xt,b as I,i as te,e as It,f as j,g as ee,h as Yt,u a
40
40
  display: flex;
41
41
  align-items: center;
42
42
  line-height: 1;
43
- `),I("checked",`
43
+ `),A("checked",`
44
44
  right: 0;
45
45
  padding-right: calc(1.25 * var(--n-rail-height) - var(--n-offset));
46
- `),I("unchecked",`
46
+ `),A("unchecked",`
47
47
  left: 0;
48
48
  justify-content: flex-end;
49
49
  padding-left: calc(1.25 * var(--n-rail-height) - var(--n-offset));
50
- `),It("&:focus",[I("rail",`
50
+ `),At("&:focus",[A("rail",`
51
51
  box-shadow: var(--n-box-shadow-focus);
52
- `)]),j("round",[I("rail","border-radius: calc(var(--n-rail-height) / 2);",[I("button","border-radius: calc(var(--n-button-height) / 2);")])]),ee("disabled",[ee("icon",[j("rubber-band",[j("pressed",[I("rail",[I("button","max-width: var(--n-button-width-pressed);")])]),I("rail",[It("&:active",[I("button","max-width: var(--n-button-width-pressed);")])]),j("active",[j("pressed",[I("rail",[I("button","left: calc(100% - var(--n-offset) - var(--n-button-width-pressed));")])]),I("rail",[It("&:active",[I("button","left: calc(100% - var(--n-offset) - var(--n-button-width-pressed));")])])])])])]),j("active",[I("rail",[I("button","left: calc(100% - var(--n-button-width) - var(--n-offset))")])]),I("rail",`
52
+ `)]),j("round",[A("rail","border-radius: calc(var(--n-rail-height) / 2);",[A("button","border-radius: calc(var(--n-button-height) / 2);")])]),ee("disabled",[ee("icon",[j("rubber-band",[j("pressed",[A("rail",[A("button","max-width: var(--n-button-width-pressed);")])]),A("rail",[At("&:active",[A("button","max-width: var(--n-button-width-pressed);")])]),j("active",[j("pressed",[A("rail",[A("button","left: calc(100% - var(--n-offset) - var(--n-button-width-pressed));")])]),A("rail",[At("&:active",[A("button","left: calc(100% - var(--n-offset) - var(--n-button-width-pressed));")])])])])])]),j("active",[A("rail",[A("button","left: calc(100% - var(--n-button-width) - var(--n-offset))")])]),A("rail",`
53
53
  overflow: hidden;
54
54
  height: var(--n-rail-height);
55
55
  min-width: var(--n-rail-width);
@@ -61,7 +61,7 @@ import{d as Me,c as Re,a as Xt,b as I,i as te,e as It,f as j,g as ee,h as Yt,u a
61
61
  background .3s var(--n-bezier),
62
62
  box-shadow .3s var(--n-bezier);
63
63
  background-color: var(--n-rail-color);
64
- `,[I("button-icon",`
64
+ `,[A("button-icon",`
65
65
  color: var(--n-icon-color);
66
66
  transition: color .3s var(--n-bezier);
67
67
  font-size: calc(var(--n-button-height) - 4px);
@@ -74,7 +74,7 @@ import{d as Me,c as Re,a as Xt,b as I,i as te,e as It,f as j,g as ee,h as Yt,u a
74
74
  justify-content: center;
75
75
  align-items: center;
76
76
  line-height: 1;
77
- `,[te()]),I("button",`
77
+ `,[te()]),A("button",`
78
78
  align-items: center;
79
79
  top: var(--n-offset);
80
80
  left: var(--n-offset);
@@ -94,26 +94,26 @@ import{d as Me,c as Re,a as Xt,b as I,i as te,e as It,f as j,g as ee,h as Yt,u a
94
94
  opacity .3s var(--n-bezier),
95
95
  max-width .3s var(--n-bezier),
96
96
  box-shadow .3s var(--n-bezier);
97
- `)]),j("active",[I("rail","background-color: var(--n-rail-color-active);")]),j("loading",[I("rail",`
97
+ `)]),j("active",[A("rail","background-color: var(--n-rail-color-active);")]),j("loading",[A("rail",`
98
98
  cursor: wait;
99
- `)]),j("disabled",[I("rail",`
99
+ `)]),j("disabled",[A("rail",`
100
100
  cursor: not-allowed;
101
101
  opacity: .5;
102
- `)])]),bn=Object.assign(Object.assign({},ue.props),{size:{type:String,default:"medium"},value:{type:[String,Number,Boolean],default:void 0},loading:Boolean,defaultValue:{type:[String,Number,Boolean],default:!1},disabled:{type:Boolean,default:void 0},round:{type:Boolean,default:!0},"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],checkedValue:{type:[String,Number,Boolean],default:!0},uncheckedValue:{type:[String,Number,Boolean],default:!1},railStyle:Function,rubberBand:{type:Boolean,default:!0},onChange:[Function,Array]});let lt;const Cn=Yt({name:"Switch",props:bn,setup(t){lt===void 0&&(typeof CSS<"u"?typeof CSS.supports<"u"?lt=CSS.supports("width","max(1px)"):lt=!1:lt=!0);const{mergedClsPrefixRef:e,inlineThemeDisabled:r}=Pe(t),i=ue("Switch","-switch",yn,vn,t,e),n=Le(t),{mergedSizeRef:o,mergedDisabledRef:a}=n,s=Mt(t.defaultValue),l=Ue(t,"value"),u=ze(l,s),d=ct(()=>u.value===t.checkedValue),C=Mt(!1),c=Mt(!1),h=ct(()=>{const{railStyle:B}=t;if(B)return B({focused:c.value,checked:d.value})});function p(B){const{"onUpdate:value":L,onChange:R,onUpdateValue:F}=t,{nTriggerFormInput:O,nTriggerFormChange:P}=n;L&&Lt(L,B),F&&Lt(F,B),R&&Lt(R,B),s.value=B,O(),P()}function y(){const{nTriggerFormFocus:B}=n;B()}function N(){const{nTriggerFormBlur:B}=n;B()}function m(){t.loading||a.value||(u.value!==t.checkedValue?p(t.checkedValue):p(t.uncheckedValue))}function _(){c.value=!0,y()}function w(){c.value=!1,N(),C.value=!1}function g(B){t.loading||a.value||B.key===" "&&(u.value!==t.checkedValue?p(t.checkedValue):p(t.uncheckedValue),C.value=!1)}function T(B){t.loading||a.value||B.key===" "&&(B.preventDefault(),C.value=!0)}const S=ct(()=>{const{value:B}=o,{self:{opacityDisabled:L,railColor:R,railColorActive:F,buttonBoxShadow:O,buttonColor:P,boxShadowFocus:X,loadingColor:k,textColor:f,iconColor:J,[tt("buttonHeight",B)]:z,[tt("buttonWidth",B)]:U,[tt("buttonWidthPressed",B)]:Nt,[tt("railHeight",B)]:V,[tt("railWidth",B)]:Y,[tt("railBorderRadius",B)]:xt,[tt("buttonBorderRadius",B)]:wt},common:{cubicBezierEaseInOut:mt}}=i.value;let st,A,At;return lt?(st=`calc((${V} - ${z}) / 2)`,A=`max(${V}, ${z})`,At=`max(${Y}, calc(${Y} + ${z} - ${V}))`):(st=Rt((q(V)-q(z))/2),A=Rt(Math.max(q(V),q(z))),At=q(V)>q(z)?Y:Rt(q(Y)+q(z)-q(V))),{"--n-bezier":mt,"--n-button-border-radius":wt,"--n-button-box-shadow":O,"--n-button-color":P,"--n-button-width":U,"--n-button-width-pressed":Nt,"--n-button-height":z,"--n-height":A,"--n-offset":st,"--n-opacity-disabled":L,"--n-rail-border-radius":xt,"--n-rail-color":R,"--n-rail-color-active":F,"--n-rail-height":V,"--n-rail-width":Y,"--n-width":At,"--n-box-shadow-focus":X,"--n-loading-color":k,"--n-text-color":f,"--n-icon-color":J}}),x=r?De("switch",ct(()=>o.value[0]),S,t):void 0;return{handleClick:m,handleBlur:w,handleFocus:_,handleKeyup:g,handleKeydown:T,mergedRailStyle:h,pressed:C,mergedClsPrefix:e,mergedValue:u,checked:d,mergedDisabled:a,cssVars:r?void 0:S,themeClass:x==null?void 0:x.themeClass,onRender:x==null?void 0:x.onRender}},render(){const{mergedClsPrefix:t,mergedDisabled:e,checked:r,mergedRailStyle:i,onRender:n,$slots:o}=this;n==null||n();const{checked:a,unchecked:s,icon:l,"checked-icon":u,"unchecked-icon":d}=o,C=!(Pt(l)&&Pt(u)&&Pt(d));return D("div",{role:"switch","aria-checked":r,class:[`${t}-switch`,this.themeClass,C&&`${t}-switch--icon`,r&&`${t}-switch--active`,e&&`${t}-switch--disabled`,this.round&&`${t}-switch--round`,this.loading&&`${t}-switch--loading`,this.pressed&&`${t}-switch--pressed`,this.rubberBand&&`${t}-switch--rubber-band`],tabindex:this.mergedDisabled?void 0:0,style:this.cssVars,onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},D("div",{class:`${t}-switch__rail`,"aria-hidden":"true",style:i},et(a,c=>et(s,h=>c||h?D("div",{"aria-hidden":!0,class:`${t}-switch__children-placeholder`},D("div",{class:`${t}-switch__rail-placeholder`},D("div",{class:`${t}-switch__button-placeholder`}),c),D("div",{class:`${t}-switch__rail-placeholder`},D("div",{class:`${t}-switch__button-placeholder`}),h)):null)),D("div",{class:`${t}-switch__button`},et(l,c=>et(u,h=>et(d,p=>D(Fe,null,{default:()=>this.loading?D(Ve,{key:"loading",clsPrefix:t,strokeWidth:20}):this.checked&&(h||c)?D("div",{class:`${t}-switch__button-icon`,key:h?"checked-icon":"icon"},h||c):!this.checked&&(p||c)?D("div",{class:`${t}-switch__button-icon`,key:p?"unchecked-icon":"icon"},p||c):null})))),et(a,c=>c&&D("div",{key:"checked",class:`${t}-switch__checked`},c)),et(s,c=>c&&D("div",{key:"unchecked",class:`${t}-switch__unchecked`},c)))))}});var gt={},_n=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},we={},$={};let jt;const Bn=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];$.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};$.getSymbolTotalCodewords=function(e){return Bn[e]};$.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e};$.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');jt=e};$.isKanjiModeEnabled=function(){return typeof jt<"u"};$.toSJIS=function(e){return jt(e)};var kt={};(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+r)}}t.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},t.from=function(i,n){if(t.isValid(i))return i;try{return e(i)}catch{return n}}})(kt);function me(){this.buffer=[],this.length=0}me.prototype={get:function(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let r=0;r<e;r++)this.putBit((t>>>e-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var kn=me;function pt(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}pt.prototype.set=function(t,e,r,i){const n=t*this.size+e;this.data[n]=r,i&&(this.reservedBit[n]=!0)};pt.prototype.get=function(t,e){return this.data[t*this.size+e]};pt.prototype.xor=function(t,e,r){this.data[t*this.size+e]^=r};pt.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var En=pt,ve={};(function(t){const e=$.getSymbolSize;t.getRowColCoords=function(i){if(i===1)return[];const n=Math.floor(i/7)+2,o=e(i),a=o===145?26:Math.ceil((o-13)/(2*n-2))*2,s=[o-7];for(let l=1;l<n-1;l++)s[l]=s[l-1]-a;return s.push(6),s.reverse()},t.getPositions=function(i){const n=[],o=t.getRowColCoords(i),a=o.length;for(let s=0;s<a;s++)for(let l=0;l<a;l++)s===0&&l===0||s===0&&l===a-1||s===a-1&&l===0||n.push([o[s],o[l]]);return n}})(ve);var ye={};const Sn=$.getSymbolSize,se=7;ye.getPositions=function(e){const r=Sn(e);return[[0,0],[r-se,0],[0,r-se]]};var be={};(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};t.isValid=function(n){return n!=null&&n!==""&&!isNaN(n)&&n>=0&&n<=7},t.from=function(n){return t.isValid(n)?parseInt(n,10):void 0},t.getPenaltyN1=function(n){const o=n.size;let a=0,s=0,l=0,u=null,d=null;for(let C=0;C<o;C++){s=l=0,u=d=null;for(let c=0;c<o;c++){let h=n.get(C,c);h===u?s++:(s>=5&&(a+=e.N1+(s-5)),u=h,s=1),h=n.get(c,C),h===d?l++:(l>=5&&(a+=e.N1+(l-5)),d=h,l=1)}s>=5&&(a+=e.N1+(s-5)),l>=5&&(a+=e.N1+(l-5))}return a},t.getPenaltyN2=function(n){const o=n.size;let a=0;for(let s=0;s<o-1;s++)for(let l=0;l<o-1;l++){const u=n.get(s,l)+n.get(s,l+1)+n.get(s+1,l)+n.get(s+1,l+1);(u===4||u===0)&&a++}return a*e.N2},t.getPenaltyN3=function(n){const o=n.size;let a=0,s=0,l=0;for(let u=0;u<o;u++){s=l=0;for(let d=0;d<o;d++)s=s<<1&2047|n.get(u,d),d>=10&&(s===1488||s===93)&&a++,l=l<<1&2047|n.get(d,u),d>=10&&(l===1488||l===93)&&a++}return a*e.N3},t.getPenaltyN4=function(n){let o=0;const a=n.data.length;for(let l=0;l<a;l++)o+=n.data[l];return Math.abs(Math.ceil(o*100/a/5)-10)*e.N4};function r(i,n,o){switch(i){case t.Patterns.PATTERN000:return(n+o)%2===0;case t.Patterns.PATTERN001:return n%2===0;case t.Patterns.PATTERN010:return o%3===0;case t.Patterns.PATTERN011:return(n+o)%3===0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(o/3))%2===0;case t.Patterns.PATTERN101:return n*o%2+n*o%3===0;case t.Patterns.PATTERN110:return(n*o%2+n*o%3)%2===0;case t.Patterns.PATTERN111:return(n*o%3+(n+o)%2)%2===0;default:throw new Error("bad maskPattern:"+i)}}t.applyMask=function(n,o){const a=o.size;for(let s=0;s<a;s++)for(let l=0;l<a;l++)o.isReserved(l,s)||o.xor(l,s,r(n,l,s))},t.getBestMask=function(n,o){const a=Object.keys(t.Patterns).length;let s=0,l=1/0;for(let u=0;u<a;u++){o(u),t.applyMask(u,n);const d=t.getPenaltyN1(n)+t.getPenaltyN2(n)+t.getPenaltyN3(n)+t.getPenaltyN4(n);t.applyMask(u,n),d<l&&(l=d,s=u)}return s}})(be);var Et={};const G=kt,vt=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],yt=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];Et.getBlocksCount=function(e,r){switch(r){case G.L:return vt[(e-1)*4+0];case G.M:return vt[(e-1)*4+1];case G.Q:return vt[(e-1)*4+2];case G.H:return vt[(e-1)*4+3];default:return}};Et.getTotalCodewordsCount=function(e,r){switch(r){case G.L:return yt[(e-1)*4+0];case G.M:return yt[(e-1)*4+1];case G.Q:return yt[(e-1)*4+2];case G.H:return yt[(e-1)*4+3];default:return}};var Ce={},St={};const ft=new Uint8Array(512),_t=new Uint8Array(256);(function(){let e=1;for(let r=0;r<255;r++)ft[r]=e,_t[e]=r,e<<=1,e&256&&(e^=285);for(let r=255;r<512;r++)ft[r]=ft[r-255]})();St.log=function(e){if(e<1)throw new Error("log("+e+")");return _t[e]};St.exp=function(e){return ft[e]};St.mul=function(e,r){return e===0||r===0?0:ft[_t[e]+_t[r]]};(function(t){const e=St;t.mul=function(i,n){const o=new Uint8Array(i.length+n.length-1);for(let a=0;a<i.length;a++)for(let s=0;s<n.length;s++)o[a+s]^=e.mul(i[a],n[s]);return o},t.mod=function(i,n){let o=new Uint8Array(i);for(;o.length-n.length>=0;){const a=o[0];for(let l=0;l<n.length;l++)o[l]^=e.mul(n[l],a);let s=0;for(;s<o.length&&o[s]===0;)s++;o=o.slice(s)}return o},t.generateECPolynomial=function(i){let n=new Uint8Array([1]);for(let o=0;o<i;o++)n=t.mul(n,new Uint8Array([1,e.exp(o)]));return n}})(Ce);const _e=Ce;function qt(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}qt.prototype.initialize=function(e){this.degree=e,this.genPoly=_e.generateECPolynomial(this.degree)};qt.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const r=new Uint8Array(e.length+this.degree);r.set(e);const i=_e.mod(r,this.genPoly),n=this.degree-i.length;if(n>0){const o=new Uint8Array(this.degree);return o.set(i,n),o}return i};var Tn=qt,Be={},Z={},Qt={};Qt.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var W={};const ke="[0-9]+",Nn="[A-Z $%*+\\-./:]+";let ht="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";ht=ht.replace(/u/g,"\\u");const xn="(?:(?![A-Z0-9 $%*+\\-./:]|"+ht+`)(?:.|[\r
103
- ]))+`;W.KANJI=new RegExp(ht,"g");W.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");W.BYTE=new RegExp(xn,"g");W.NUMERIC=new RegExp(ke,"g");W.ALPHANUMERIC=new RegExp(Nn,"g");const An=new RegExp("^"+ht+"$"),In=new RegExp("^"+ke+"$"),Mn=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");W.testKanji=function(e){return An.test(e)};W.testNumeric=function(e){return In.test(e)};W.testAlphanumeric=function(e){return Mn.test(e)};(function(t){const e=Qt,r=W;t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(o,a){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!e.isValid(a))throw new Error("Invalid version: "+a);return a>=1&&a<10?o.ccBits[0]:a<27?o.ccBits[1]:o.ccBits[2]},t.getBestModeForData=function(o){return r.testNumeric(o)?t.NUMERIC:r.testAlphanumeric(o)?t.ALPHANUMERIC:r.testKanji(o)?t.KANJI:t.BYTE},t.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},t.isValid=function(o){return o&&o.bit&&o.ccBits};function i(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+n)}}t.from=function(o,a){if(t.isValid(o))return o;try{return i(o)}catch{return a}}})(Z);(function(t){const e=$,r=Et,i=kt,n=Z,o=Qt,a=7973,s=e.getBCHDigit(a);function l(c,h,p){for(let y=1;y<=40;y++)if(h<=t.getCapacity(y,p,c))return y}function u(c,h){return n.getCharCountIndicator(c,h)+4}function d(c,h){let p=0;return c.forEach(function(y){const N=u(y.mode,h);p+=N+y.getBitsLength()}),p}function C(c,h){for(let p=1;p<=40;p++)if(d(c,p)<=t.getCapacity(p,h,n.MIXED))return p}t.from=function(h,p){return o.isValid(h)?parseInt(h,10):p},t.getCapacity=function(h,p,y){if(!o.isValid(h))throw new Error("Invalid QR Code version");typeof y>"u"&&(y=n.BYTE);const N=e.getSymbolTotalCodewords(h),m=r.getTotalCodewordsCount(h,p),_=(N-m)*8;if(y===n.MIXED)return _;const w=_-u(y,h);switch(y){case n.NUMERIC:return Math.floor(w/10*3);case n.ALPHANUMERIC:return Math.floor(w/11*2);case n.KANJI:return Math.floor(w/13);case n.BYTE:default:return Math.floor(w/8)}},t.getBestVersionForData=function(h,p){let y;const N=i.from(p,i.M);if(Array.isArray(h)){if(h.length>1)return C(h,N);if(h.length===0)return 1;y=h[0]}else y=h;return l(y.mode,y.getLength(),N)},t.getEncodedBits=function(h){if(!o.isValid(h)||h<7)throw new Error("Invalid QR Code version");let p=h<<12;for(;e.getBCHDigit(p)-s>=0;)p^=a<<e.getBCHDigit(p)-s;return h<<12|p}})(Be);var Ee={};const Kt=$,Se=1335,Rn=21522,le=Kt.getBCHDigit(Se);Ee.getEncodedBits=function(e,r){const i=e.bit<<3|r;let n=i<<10;for(;Kt.getBCHDigit(n)-le>=0;)n^=Se<<Kt.getBCHDigit(n)-le;return(i<<10|n)^Rn};var Te={};const Pn=Z;function ot(t){this.mode=Pn.NUMERIC,this.data=t.toString()}ot.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)};ot.prototype.getLength=function(){return this.data.length};ot.prototype.getBitsLength=function(){return ot.getBitsLength(this.data.length)};ot.prototype.write=function(e){let r,i,n;for(r=0;r+3<=this.data.length;r+=3)i=this.data.substr(r,3),n=parseInt(i,10),e.put(n,10);const o=this.data.length-r;o>0&&(i=this.data.substr(r),n=parseInt(i,10),e.put(n,o*3+1))};var Ln=ot;const Un=Z,zt=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function it(t){this.mode=Un.ALPHANUMERIC,this.data=t}it.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};it.prototype.getLength=function(){return this.data.length};it.prototype.getBitsLength=function(){return it.getBitsLength(this.data.length)};it.prototype.write=function(e){let r;for(r=0;r+2<=this.data.length;r+=2){let i=zt.indexOf(this.data[r])*45;i+=zt.indexOf(this.data[r+1]),e.put(i,11)}this.data.length%2&&e.put(zt.indexOf(this.data[r]),6)};var zn=it,Dn=function(e){for(var r=[],i=e.length,n=0;n<i;n++){var o=e.charCodeAt(n);if(o>=55296&&o<=56319&&i>n+1){var a=e.charCodeAt(n+1);a>=56320&&a<=57343&&(o=(o-55296)*1024+a-56320+65536,n+=1)}if(o<128){r.push(o);continue}if(o<2048){r.push(o>>6|192),r.push(o&63|128);continue}if(o<55296||o>=57344&&o<65536){r.push(o>>12|224),r.push(o>>6&63|128),r.push(o&63|128);continue}if(o>=65536&&o<=1114111){r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(o&63|128);continue}r.push(239,191,189)}return new Uint8Array(r).buffer};const Fn=Dn,Vn=Z;function rt(t){this.mode=Vn.BYTE,typeof t=="string"&&(t=Fn(t)),this.data=new Uint8Array(t)}rt.getBitsLength=function(e){return e*8};rt.prototype.getLength=function(){return this.data.length};rt.prototype.getBitsLength=function(){return rt.getBitsLength(this.data.length)};rt.prototype.write=function(t){for(let e=0,r=this.data.length;e<r;e++)t.put(this.data[e],8)};var $n=rt;const Hn=Z,Kn=$;function at(t){this.mode=Hn.KANJI,this.data=t}at.getBitsLength=function(e){return e*13};at.prototype.getLength=function(){return this.data.length};at.prototype.getBitsLength=function(){return at.getBitsLength(this.data.length)};at.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let r=Kn.toSJIS(this.data[e]);if(r>=33088&&r<=40956)r-=33088;else if(r>=57408&&r<=60351)r-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+`
104
- Make sure your charset is UTF-8`);r=(r>>>8&255)*192+(r&255),t.put(r,13)}};var On=at,Ne={exports:{}};(function(t){var e={single_source_shortest_paths:function(r,i,n){var o={},a={};a[i]=0;var s=e.PriorityQueue.make();s.push(i,0);for(var l,u,d,C,c,h,p,y,N;!s.empty();){l=s.pop(),u=l.value,C=l.cost,c=r[u]||{};for(d in c)c.hasOwnProperty(d)&&(h=c[d],p=C+h,y=a[d],N=typeof a[d]>"u",(N||y>p)&&(a[d]=p,s.push(d,p),o[d]=u))}if(typeof n<"u"&&typeof a[n]>"u"){var m=["Could not find a path from ",i," to ",n,"."].join("");throw new Error(m)}return o},extract_shortest_path_from_predecessor_list:function(r,i){for(var n=[],o=i;o;)n.push(o),r[o],o=r[o];return n.reverse(),n},find_path:function(r,i,n){var o=e.single_source_shortest_paths(r,i,n);return e.extract_shortest_path_from_predecessor_list(o,n)},PriorityQueue:{make:function(r){var i=e.PriorityQueue,n={},o;r=r||{};for(o in i)i.hasOwnProperty(o)&&(n[o]=i[o]);return n.queue=[],n.sorter=r.sorter||i.default_sorter,n},default_sorter:function(r,i){return r.cost-i.cost},push:function(r,i){var n={value:r,cost:i};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t.exports=e})(Ne);var Jn=Ne.exports;(function(t){const e=Z,r=Ln,i=zn,n=$n,o=On,a=W,s=$,l=Jn;function u(m){return unescape(encodeURIComponent(m)).length}function d(m,_,w){const g=[];let T;for(;(T=m.exec(w))!==null;)g.push({data:T[0],index:T.index,mode:_,length:T[0].length});return g}function C(m){const _=d(a.NUMERIC,e.NUMERIC,m),w=d(a.ALPHANUMERIC,e.ALPHANUMERIC,m);let g,T;return s.isKanjiModeEnabled()?(g=d(a.BYTE,e.BYTE,m),T=d(a.KANJI,e.KANJI,m)):(g=d(a.BYTE_KANJI,e.BYTE,m),T=[]),_.concat(w,g,T).sort(function(x,B){return x.index-B.index}).map(function(x){return{data:x.data,mode:x.mode,length:x.length}})}function c(m,_){switch(_){case e.NUMERIC:return r.getBitsLength(m);case e.ALPHANUMERIC:return i.getBitsLength(m);case e.KANJI:return o.getBitsLength(m);case e.BYTE:return n.getBitsLength(m)}}function h(m){return m.reduce(function(_,w){const g=_.length-1>=0?_[_.length-1]:null;return g&&g.mode===w.mode?(_[_.length-1].data+=w.data,_):(_.push(w),_)},[])}function p(m){const _=[];for(let w=0;w<m.length;w++){const g=m[w];switch(g.mode){case e.NUMERIC:_.push([g,{data:g.data,mode:e.ALPHANUMERIC,length:g.length},{data:g.data,mode:e.BYTE,length:g.length}]);break;case e.ALPHANUMERIC:_.push([g,{data:g.data,mode:e.BYTE,length:g.length}]);break;case e.KANJI:_.push([g,{data:g.data,mode:e.BYTE,length:u(g.data)}]);break;case e.BYTE:_.push([{data:g.data,mode:e.BYTE,length:u(g.data)}])}}return _}function y(m,_){const w={},g={start:{}};let T=["start"];for(let S=0;S<m.length;S++){const x=m[S],B=[];for(let L=0;L<x.length;L++){const R=x[L],F=""+S+L;B.push(F),w[F]={node:R,lastCount:0},g[F]={};for(let O=0;O<T.length;O++){const P=T[O];w[P]&&w[P].node.mode===R.mode?(g[P][F]=c(w[P].lastCount+R.length,R.mode)-c(w[P].lastCount,R.mode),w[P].lastCount+=R.length):(w[P]&&(w[P].lastCount=R.length),g[P][F]=c(R.length,R.mode)+4+e.getCharCountIndicator(R.mode,_))}}T=B}for(let S=0;S<T.length;S++)g[T[S]].end=0;return{map:g,table:w}}function N(m,_){let w;const g=e.getBestModeForData(m);if(w=e.from(_,g),w!==e.BYTE&&w.bit<g.bit)throw new Error('"'+m+'" cannot be encoded with mode '+e.toString(w)+`.
105
- Suggested mode is: `+e.toString(g));switch(w===e.KANJI&&!s.isKanjiModeEnabled()&&(w=e.BYTE),w){case e.NUMERIC:return new r(m);case e.ALPHANUMERIC:return new i(m);case e.KANJI:return new o(m);case e.BYTE:return new n(m)}}t.fromArray=function(_){return _.reduce(function(w,g){return typeof g=="string"?w.push(N(g,null)):g.data&&w.push(N(g.data,g.mode)),w},[])},t.fromString=function(_,w){const g=C(_,s.isKanjiModeEnabled()),T=p(g),S=y(T,w),x=l.find_path(S.map,"start","end"),B=[];for(let L=1;L<x.length-1;L++)B.push(S.table[x[L]].node);return t.fromArray(h(B))},t.rawSplit=function(_){return t.fromArray(C(_,s.isKanjiModeEnabled()))}})(Te);const Tt=$,Dt=kt,Wn=kn,Yn=En,jn=ve,qn=ye,Ot=be,Jt=Et,Qn=Tn,Bt=Be,Gn=Ee,Zn=Z,Ft=Te;function Xn(t,e){const r=t.size,i=qn.getPositions(e);for(let n=0;n<i.length;n++){const o=i[n][0],a=i[n][1];for(let s=-1;s<=7;s++)if(!(o+s<=-1||r<=o+s))for(let l=-1;l<=7;l++)a+l<=-1||r<=a+l||(s>=0&&s<=6&&(l===0||l===6)||l>=0&&l<=6&&(s===0||s===6)||s>=2&&s<=4&&l>=2&&l<=4?t.set(o+s,a+l,!0,!0):t.set(o+s,a+l,!1,!0))}}function to(t){const e=t.size;for(let r=8;r<e-8;r++){const i=r%2===0;t.set(r,6,i,!0),t.set(6,r,i,!0)}}function eo(t,e){const r=jn.getPositions(e);for(let i=0;i<r.length;i++){const n=r[i][0],o=r[i][1];for(let a=-2;a<=2;a++)for(let s=-2;s<=2;s++)a===-2||a===2||s===-2||s===2||a===0&&s===0?t.set(n+a,o+s,!0,!0):t.set(n+a,o+s,!1,!0)}}function no(t,e){const r=t.size,i=Bt.getEncodedBits(e);let n,o,a;for(let s=0;s<18;s++)n=Math.floor(s/3),o=s%3+r-8-3,a=(i>>s&1)===1,t.set(n,o,a,!0),t.set(o,n,a,!0)}function Vt(t,e,r){const i=t.size,n=Gn.getEncodedBits(e,r);let o,a;for(o=0;o<15;o++)a=(n>>o&1)===1,o<6?t.set(o,8,a,!0):o<8?t.set(o+1,8,a,!0):t.set(i-15+o,8,a,!0),o<8?t.set(8,i-o-1,a,!0):o<9?t.set(8,15-o-1+1,a,!0):t.set(8,15-o-1,a,!0);t.set(i-8,8,1,!0)}function oo(t,e){const r=t.size;let i=-1,n=r-1,o=7,a=0;for(let s=r-1;s>0;s-=2)for(s===6&&s--;;){for(let l=0;l<2;l++)if(!t.isReserved(n,s-l)){let u=!1;a<e.length&&(u=(e[a]>>>o&1)===1),t.set(n,s-l,u),o--,o===-1&&(a++,o=7)}if(n+=i,n<0||r<=n){n-=i,i=-i;break}}}function io(t,e,r){const i=new Wn;r.forEach(function(l){i.put(l.mode.bit,4),i.put(l.getLength(),Zn.getCharCountIndicator(l.mode,t)),l.write(i)});const n=Tt.getSymbolTotalCodewords(t),o=Jt.getTotalCodewordsCount(t,e),a=(n-o)*8;for(i.getLengthInBits()+4<=a&&i.put(0,4);i.getLengthInBits()%8!==0;)i.putBit(0);const s=(a-i.getLengthInBits())/8;for(let l=0;l<s;l++)i.put(l%2?17:236,8);return ro(i,t,e)}function ro(t,e,r){const i=Tt.getSymbolTotalCodewords(e),n=Jt.getTotalCodewordsCount(e,r),o=i-n,a=Jt.getBlocksCount(e,r),s=i%a,l=a-s,u=Math.floor(i/a),d=Math.floor(o/a),C=d+1,c=u-d,h=new Qn(c);let p=0;const y=new Array(a),N=new Array(a);let m=0;const _=new Uint8Array(t.buffer);for(let x=0;x<a;x++){const B=x<l?d:C;y[x]=_.slice(p,p+B),N[x]=h.encode(y[x]),p+=B,m=Math.max(m,B)}const w=new Uint8Array(i);let g=0,T,S;for(T=0;T<m;T++)for(S=0;S<a;S++)T<y[S].length&&(w[g++]=y[S][T]);for(T=0;T<c;T++)for(S=0;S<a;S++)w[g++]=N[S][T];return w}function ao(t,e,r,i){let n;if(Array.isArray(t))n=Ft.fromArray(t);else if(typeof t=="string"){let u=e;if(!u){const d=Ft.rawSplit(t);u=Bt.getBestVersionForData(d,r)}n=Ft.fromString(t,u||40)}else throw new Error("Invalid data");const o=Bt.getBestVersionForData(n,r);if(!o)throw new Error("The amount of data is too big to be stored in a QR Code");if(!e)e=o;else if(e<o)throw new Error(`
102
+ `)])]),bn=Object.assign(Object.assign({},ue.props),{size:{type:String,default:"medium"},value:{type:[String,Number,Boolean],default:void 0},loading:Boolean,defaultValue:{type:[String,Number,Boolean],default:!1},disabled:{type:Boolean,default:void 0},round:{type:Boolean,default:!0},"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],checkedValue:{type:[String,Number,Boolean],default:!0},uncheckedValue:{type:[String,Number,Boolean],default:!1},railStyle:Function,rubberBand:{type:Boolean,default:!0},onChange:[Function,Array]});let lt;const Cn=Yt({name:"Switch",props:bn,setup(t){lt===void 0&&(typeof CSS<"u"?typeof CSS.supports<"u"?lt=CSS.supports("width","max(1px)"):lt=!1:lt=!0);const{mergedClsPrefixRef:e,inlineThemeDisabled:r}=xe(t),o=ue("Switch","-switch",yn,vn,t,e),n=Le(t),{mergedSizeRef:i,mergedDisabledRef:a}=n,s=Rt(t.defaultValue),l=ze(t,"value"),u=Ue(l,s),d=ct(()=>u.value===t.checkedValue),C=Rt(!1),c=Rt(!1),h=ct(()=>{const{railStyle:B}=t;if(B)return B({focused:c.value,checked:d.value})});function p(B){const{"onUpdate:value":L,onChange:P,onUpdateValue:F}=t,{nTriggerFormInput:O,nTriggerFormChange:x}=n;L&&Lt(L,B),F&&Lt(F,B),P&&Lt(P,B),s.value=B,O(),x()}function y(){const{nTriggerFormFocus:B}=n;B()}function N(){const{nTriggerFormBlur:B}=n;B()}function m(){t.loading||a.value||(u.value!==t.checkedValue?p(t.checkedValue):p(t.uncheckedValue))}function _(){c.value=!0,y()}function w(){c.value=!1,N(),C.value=!1}function g(B){t.loading||a.value||B.key===" "&&(u.value!==t.checkedValue?p(t.checkedValue):p(t.uncheckedValue),C.value=!1)}function T(B){t.loading||a.value||B.key===" "&&(B.preventDefault(),C.value=!0)}const S=ct(()=>{const{value:B}=i,{self:{opacityDisabled:L,railColor:P,railColorActive:F,buttonBoxShadow:O,buttonColor:x,boxShadowFocus:X,loadingColor:k,textColor:f,iconColor:J,[tt("buttonHeight",B)]:U,[tt("buttonWidth",B)]:z,[tt("buttonWidthPressed",B)]:Nt,[tt("railHeight",B)]:V,[tt("railWidth",B)]:Y,[tt("railBorderRadius",B)]:It,[tt("buttonBorderRadius",B)]:wt},common:{cubicBezierEaseInOut:mt}}=o.value;let st,M,Mt;return lt?(st=`calc((${V} - ${U}) / 2)`,M=`max(${V}, ${U})`,Mt=`max(${Y}, calc(${Y} + ${U} - ${V}))`):(st=Pt((q(V)-q(U))/2),M=Pt(Math.max(q(V),q(U))),Mt=q(V)>q(U)?Y:Pt(q(Y)+q(U)-q(V))),{"--n-bezier":mt,"--n-button-border-radius":wt,"--n-button-box-shadow":O,"--n-button-color":x,"--n-button-width":z,"--n-button-width-pressed":Nt,"--n-button-height":U,"--n-height":M,"--n-offset":st,"--n-opacity-disabled":L,"--n-rail-border-radius":It,"--n-rail-color":P,"--n-rail-color-active":F,"--n-rail-height":V,"--n-rail-width":Y,"--n-width":Mt,"--n-box-shadow-focus":X,"--n-loading-color":k,"--n-text-color":f,"--n-icon-color":J}}),I=r?De("switch",ct(()=>i.value[0]),S,t):void 0;return{handleClick:m,handleBlur:w,handleFocus:_,handleKeyup:g,handleKeydown:T,mergedRailStyle:h,pressed:C,mergedClsPrefix:e,mergedValue:u,checked:d,mergedDisabled:a,cssVars:r?void 0:S,themeClass:I==null?void 0:I.themeClass,onRender:I==null?void 0:I.onRender}},render(){const{mergedClsPrefix:t,mergedDisabled:e,checked:r,mergedRailStyle:o,onRender:n,$slots:i}=this;n==null||n();const{checked:a,unchecked:s,icon:l,"checked-icon":u,"unchecked-icon":d}=i,C=!(xt(l)&&xt(u)&&xt(d));return D("div",{role:"switch","aria-checked":r,class:[`${t}-switch`,this.themeClass,C&&`${t}-switch--icon`,r&&`${t}-switch--active`,e&&`${t}-switch--disabled`,this.round&&`${t}-switch--round`,this.loading&&`${t}-switch--loading`,this.pressed&&`${t}-switch--pressed`,this.rubberBand&&`${t}-switch--rubber-band`],tabindex:this.mergedDisabled?void 0:0,style:this.cssVars,onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},D("div",{class:`${t}-switch__rail`,"aria-hidden":"true",style:o},et(a,c=>et(s,h=>c||h?D("div",{"aria-hidden":!0,class:`${t}-switch__children-placeholder`},D("div",{class:`${t}-switch__rail-placeholder`},D("div",{class:`${t}-switch__button-placeholder`}),c),D("div",{class:`${t}-switch__rail-placeholder`},D("div",{class:`${t}-switch__button-placeholder`}),h)):null)),D("div",{class:`${t}-switch__button`},et(l,c=>et(u,h=>et(d,p=>D(Fe,null,{default:()=>this.loading?D(Ve,{key:"loading",clsPrefix:t,strokeWidth:20}):this.checked&&(h||c)?D("div",{class:`${t}-switch__button-icon`,key:h?"checked-icon":"icon"},h||c):!this.checked&&(p||c)?D("div",{class:`${t}-switch__button-icon`,key:p?"unchecked-icon":"icon"},p||c):null})))),et(a,c=>c&&D("div",{key:"checked",class:`${t}-switch__checked`},c)),et(s,c=>c&&D("div",{key:"unchecked",class:`${t}-switch__unchecked`},c)))))}});var gt={},_n=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},we={},$={};let jt;const Bn=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];$.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};$.getSymbolTotalCodewords=function(e){return Bn[e]};$.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e};$.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');jt=e};$.isKanjiModeEnabled=function(){return typeof jt<"u"};$.toSJIS=function(e){return jt(e)};var kt={};(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+r)}}t.isValid=function(o){return o&&typeof o.bit<"u"&&o.bit>=0&&o.bit<4},t.from=function(o,n){if(t.isValid(o))return o;try{return e(o)}catch{return n}}})(kt);function me(){this.buffer=[],this.length=0}me.prototype={get:function(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let r=0;r<e;r++)this.putBit((t>>>e-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var kn=me;function pt(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}pt.prototype.set=function(t,e,r,o){const n=t*this.size+e;this.data[n]=r,o&&(this.reservedBit[n]=!0)};pt.prototype.get=function(t,e){return this.data[t*this.size+e]};pt.prototype.xor=function(t,e,r){this.data[t*this.size+e]^=r};pt.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var En=pt,ve={};(function(t){const e=$.getSymbolSize;t.getRowColCoords=function(o){if(o===1)return[];const n=Math.floor(o/7)+2,i=e(o),a=i===145?26:Math.ceil((i-13)/(2*n-2))*2,s=[i-7];for(let l=1;l<n-1;l++)s[l]=s[l-1]-a;return s.push(6),s.reverse()},t.getPositions=function(o){const n=[],i=t.getRowColCoords(o),a=i.length;for(let s=0;s<a;s++)for(let l=0;l<a;l++)s===0&&l===0||s===0&&l===a-1||s===a-1&&l===0||n.push([i[s],i[l]]);return n}})(ve);var ye={};const Sn=$.getSymbolSize,se=7;ye.getPositions=function(e){const r=Sn(e);return[[0,0],[r-se,0],[0,r-se]]};var be={};(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};t.isValid=function(n){return n!=null&&n!==""&&!isNaN(n)&&n>=0&&n<=7},t.from=function(n){return t.isValid(n)?parseInt(n,10):void 0},t.getPenaltyN1=function(n){const i=n.size;let a=0,s=0,l=0,u=null,d=null;for(let C=0;C<i;C++){s=l=0,u=d=null;for(let c=0;c<i;c++){let h=n.get(C,c);h===u?s++:(s>=5&&(a+=e.N1+(s-5)),u=h,s=1),h=n.get(c,C),h===d?l++:(l>=5&&(a+=e.N1+(l-5)),d=h,l=1)}s>=5&&(a+=e.N1+(s-5)),l>=5&&(a+=e.N1+(l-5))}return a},t.getPenaltyN2=function(n){const i=n.size;let a=0;for(let s=0;s<i-1;s++)for(let l=0;l<i-1;l++){const u=n.get(s,l)+n.get(s,l+1)+n.get(s+1,l)+n.get(s+1,l+1);(u===4||u===0)&&a++}return a*e.N2},t.getPenaltyN3=function(n){const i=n.size;let a=0,s=0,l=0;for(let u=0;u<i;u++){s=l=0;for(let d=0;d<i;d++)s=s<<1&2047|n.get(u,d),d>=10&&(s===1488||s===93)&&a++,l=l<<1&2047|n.get(d,u),d>=10&&(l===1488||l===93)&&a++}return a*e.N3},t.getPenaltyN4=function(n){let i=0;const a=n.data.length;for(let l=0;l<a;l++)i+=n.data[l];return Math.abs(Math.ceil(i*100/a/5)-10)*e.N4};function r(o,n,i){switch(o){case t.Patterns.PATTERN000:return(n+i)%2===0;case t.Patterns.PATTERN001:return n%2===0;case t.Patterns.PATTERN010:return i%3===0;case t.Patterns.PATTERN011:return(n+i)%3===0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(i/3))%2===0;case t.Patterns.PATTERN101:return n*i%2+n*i%3===0;case t.Patterns.PATTERN110:return(n*i%2+n*i%3)%2===0;case t.Patterns.PATTERN111:return(n*i%3+(n+i)%2)%2===0;default:throw new Error("bad maskPattern:"+o)}}t.applyMask=function(n,i){const a=i.size;for(let s=0;s<a;s++)for(let l=0;l<a;l++)i.isReserved(l,s)||i.xor(l,s,r(n,l,s))},t.getBestMask=function(n,i){const a=Object.keys(t.Patterns).length;let s=0,l=1/0;for(let u=0;u<a;u++){i(u),t.applyMask(u,n);const d=t.getPenaltyN1(n)+t.getPenaltyN2(n)+t.getPenaltyN3(n)+t.getPenaltyN4(n);t.applyMask(u,n),d<l&&(l=d,s=u)}return s}})(be);var Et={};const G=kt,vt=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],yt=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];Et.getBlocksCount=function(e,r){switch(r){case G.L:return vt[(e-1)*4+0];case G.M:return vt[(e-1)*4+1];case G.Q:return vt[(e-1)*4+2];case G.H:return vt[(e-1)*4+3];default:return}};Et.getTotalCodewordsCount=function(e,r){switch(r){case G.L:return yt[(e-1)*4+0];case G.M:return yt[(e-1)*4+1];case G.Q:return yt[(e-1)*4+2];case G.H:return yt[(e-1)*4+3];default:return}};var Ce={},St={};const ft=new Uint8Array(512),_t=new Uint8Array(256);(function(){let e=1;for(let r=0;r<255;r++)ft[r]=e,_t[e]=r,e<<=1,e&256&&(e^=285);for(let r=255;r<512;r++)ft[r]=ft[r-255]})();St.log=function(e){if(e<1)throw new Error("log("+e+")");return _t[e]};St.exp=function(e){return ft[e]};St.mul=function(e,r){return e===0||r===0?0:ft[_t[e]+_t[r]]};(function(t){const e=St;t.mul=function(o,n){const i=new Uint8Array(o.length+n.length-1);for(let a=0;a<o.length;a++)for(let s=0;s<n.length;s++)i[a+s]^=e.mul(o[a],n[s]);return i},t.mod=function(o,n){let i=new Uint8Array(o);for(;i.length-n.length>=0;){const a=i[0];for(let l=0;l<n.length;l++)i[l]^=e.mul(n[l],a);let s=0;for(;s<i.length&&i[s]===0;)s++;i=i.slice(s)}return i},t.generateECPolynomial=function(o){let n=new Uint8Array([1]);for(let i=0;i<o;i++)n=t.mul(n,new Uint8Array([1,e.exp(i)]));return n}})(Ce);const _e=Ce;function qt(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}qt.prototype.initialize=function(e){this.degree=e,this.genPoly=_e.generateECPolynomial(this.degree)};qt.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const r=new Uint8Array(e.length+this.degree);r.set(e);const o=_e.mod(r,this.genPoly),n=this.degree-o.length;if(n>0){const i=new Uint8Array(this.degree);return i.set(o,n),i}return o};var Tn=qt,Be={},Z={},Qt={};Qt.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var W={};const ke="[0-9]+",Nn="[A-Z $%*+\\-./:]+";let ht="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";ht=ht.replace(/u/g,"\\u");const In="(?:(?![A-Z0-9 $%*+\\-./:]|"+ht+`)(?:.|[\r
103
+ ]))+`;W.KANJI=new RegExp(ht,"g");W.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");W.BYTE=new RegExp(In,"g");W.NUMERIC=new RegExp(ke,"g");W.ALPHANUMERIC=new RegExp(Nn,"g");const Mn=new RegExp("^"+ht+"$"),An=new RegExp("^"+ke+"$"),Rn=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");W.testKanji=function(e){return Mn.test(e)};W.testNumeric=function(e){return An.test(e)};W.testAlphanumeric=function(e){return Rn.test(e)};(function(t){const e=Qt,r=W;t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(i,a){if(!i.ccBits)throw new Error("Invalid mode: "+i);if(!e.isValid(a))throw new Error("Invalid version: "+a);return a>=1&&a<10?i.ccBits[0]:a<27?i.ccBits[1]:i.ccBits[2]},t.getBestModeForData=function(i){return r.testNumeric(i)?t.NUMERIC:r.testAlphanumeric(i)?t.ALPHANUMERIC:r.testKanji(i)?t.KANJI:t.BYTE},t.toString=function(i){if(i&&i.id)return i.id;throw new Error("Invalid mode")},t.isValid=function(i){return i&&i.bit&&i.ccBits};function o(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+n)}}t.from=function(i,a){if(t.isValid(i))return i;try{return o(i)}catch{return a}}})(Z);(function(t){const e=$,r=Et,o=kt,n=Z,i=Qt,a=7973,s=e.getBCHDigit(a);function l(c,h,p){for(let y=1;y<=40;y++)if(h<=t.getCapacity(y,p,c))return y}function u(c,h){return n.getCharCountIndicator(c,h)+4}function d(c,h){let p=0;return c.forEach(function(y){const N=u(y.mode,h);p+=N+y.getBitsLength()}),p}function C(c,h){for(let p=1;p<=40;p++)if(d(c,p)<=t.getCapacity(p,h,n.MIXED))return p}t.from=function(h,p){return i.isValid(h)?parseInt(h,10):p},t.getCapacity=function(h,p,y){if(!i.isValid(h))throw new Error("Invalid QR Code version");typeof y>"u"&&(y=n.BYTE);const N=e.getSymbolTotalCodewords(h),m=r.getTotalCodewordsCount(h,p),_=(N-m)*8;if(y===n.MIXED)return _;const w=_-u(y,h);switch(y){case n.NUMERIC:return Math.floor(w/10*3);case n.ALPHANUMERIC:return Math.floor(w/11*2);case n.KANJI:return Math.floor(w/13);case n.BYTE:default:return Math.floor(w/8)}},t.getBestVersionForData=function(h,p){let y;const N=o.from(p,o.M);if(Array.isArray(h)){if(h.length>1)return C(h,N);if(h.length===0)return 1;y=h[0]}else y=h;return l(y.mode,y.getLength(),N)},t.getEncodedBits=function(h){if(!i.isValid(h)||h<7)throw new Error("Invalid QR Code version");let p=h<<12;for(;e.getBCHDigit(p)-s>=0;)p^=a<<e.getBCHDigit(p)-s;return h<<12|p}})(Be);var Ee={};const Kt=$,Se=1335,Pn=21522,le=Kt.getBCHDigit(Se);Ee.getEncodedBits=function(e,r){const o=e.bit<<3|r;let n=o<<10;for(;Kt.getBCHDigit(n)-le>=0;)n^=Se<<Kt.getBCHDigit(n)-le;return(o<<10|n)^Pn};var Te={};const xn=Z;function ot(t){this.mode=xn.NUMERIC,this.data=t.toString()}ot.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)};ot.prototype.getLength=function(){return this.data.length};ot.prototype.getBitsLength=function(){return ot.getBitsLength(this.data.length)};ot.prototype.write=function(e){let r,o,n;for(r=0;r+3<=this.data.length;r+=3)o=this.data.substr(r,3),n=parseInt(o,10),e.put(n,10);const i=this.data.length-r;i>0&&(o=this.data.substr(r),n=parseInt(o,10),e.put(n,i*3+1))};var Ln=ot;const zn=Z,Ut=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function it(t){this.mode=zn.ALPHANUMERIC,this.data=t}it.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};it.prototype.getLength=function(){return this.data.length};it.prototype.getBitsLength=function(){return it.getBitsLength(this.data.length)};it.prototype.write=function(e){let r;for(r=0;r+2<=this.data.length;r+=2){let o=Ut.indexOf(this.data[r])*45;o+=Ut.indexOf(this.data[r+1]),e.put(o,11)}this.data.length%2&&e.put(Ut.indexOf(this.data[r]),6)};var Un=it;const Dn=Z;function rt(t){this.mode=Dn.BYTE,typeof t=="string"?this.data=new TextEncoder().encode(t):this.data=new Uint8Array(t)}rt.getBitsLength=function(e){return e*8};rt.prototype.getLength=function(){return this.data.length};rt.prototype.getBitsLength=function(){return rt.getBitsLength(this.data.length)};rt.prototype.write=function(t){for(let e=0,r=this.data.length;e<r;e++)t.put(this.data[e],8)};var Fn=rt;const Vn=Z,$n=$;function at(t){this.mode=Vn.KANJI,this.data=t}at.getBitsLength=function(e){return e*13};at.prototype.getLength=function(){return this.data.length};at.prototype.getBitsLength=function(){return at.getBitsLength(this.data.length)};at.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let r=$n.toSJIS(this.data[e]);if(r>=33088&&r<=40956)r-=33088;else if(r>=57408&&r<=60351)r-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+`
104
+ Make sure your charset is UTF-8`);r=(r>>>8&255)*192+(r&255),t.put(r,13)}};var Hn=at,Ne={exports:{}};(function(t){var e={single_source_shortest_paths:function(r,o,n){var i={},a={};a[o]=0;var s=e.PriorityQueue.make();s.push(o,0);for(var l,u,d,C,c,h,p,y,N;!s.empty();){l=s.pop(),u=l.value,C=l.cost,c=r[u]||{};for(d in c)c.hasOwnProperty(d)&&(h=c[d],p=C+h,y=a[d],N=typeof a[d]>"u",(N||y>p)&&(a[d]=p,s.push(d,p),i[d]=u))}if(typeof n<"u"&&typeof a[n]>"u"){var m=["Could not find a path from ",o," to ",n,"."].join("");throw new Error(m)}return i},extract_shortest_path_from_predecessor_list:function(r,o){for(var n=[],i=o;i;)n.push(i),r[i],i=r[i];return n.reverse(),n},find_path:function(r,o,n){var i=e.single_source_shortest_paths(r,o,n);return e.extract_shortest_path_from_predecessor_list(i,n)},PriorityQueue:{make:function(r){var o=e.PriorityQueue,n={},i;r=r||{};for(i in o)o.hasOwnProperty(i)&&(n[i]=o[i]);return n.queue=[],n.sorter=r.sorter||o.default_sorter,n},default_sorter:function(r,o){return r.cost-o.cost},push:function(r,o){var n={value:r,cost:o};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t.exports=e})(Ne);var Kn=Ne.exports;(function(t){const e=Z,r=Ln,o=Un,n=Fn,i=Hn,a=W,s=$,l=Kn;function u(m){return unescape(encodeURIComponent(m)).length}function d(m,_,w){const g=[];let T;for(;(T=m.exec(w))!==null;)g.push({data:T[0],index:T.index,mode:_,length:T[0].length});return g}function C(m){const _=d(a.NUMERIC,e.NUMERIC,m),w=d(a.ALPHANUMERIC,e.ALPHANUMERIC,m);let g,T;return s.isKanjiModeEnabled()?(g=d(a.BYTE,e.BYTE,m),T=d(a.KANJI,e.KANJI,m)):(g=d(a.BYTE_KANJI,e.BYTE,m),T=[]),_.concat(w,g,T).sort(function(I,B){return I.index-B.index}).map(function(I){return{data:I.data,mode:I.mode,length:I.length}})}function c(m,_){switch(_){case e.NUMERIC:return r.getBitsLength(m);case e.ALPHANUMERIC:return o.getBitsLength(m);case e.KANJI:return i.getBitsLength(m);case e.BYTE:return n.getBitsLength(m)}}function h(m){return m.reduce(function(_,w){const g=_.length-1>=0?_[_.length-1]:null;return g&&g.mode===w.mode?(_[_.length-1].data+=w.data,_):(_.push(w),_)},[])}function p(m){const _=[];for(let w=0;w<m.length;w++){const g=m[w];switch(g.mode){case e.NUMERIC:_.push([g,{data:g.data,mode:e.ALPHANUMERIC,length:g.length},{data:g.data,mode:e.BYTE,length:g.length}]);break;case e.ALPHANUMERIC:_.push([g,{data:g.data,mode:e.BYTE,length:g.length}]);break;case e.KANJI:_.push([g,{data:g.data,mode:e.BYTE,length:u(g.data)}]);break;case e.BYTE:_.push([{data:g.data,mode:e.BYTE,length:u(g.data)}])}}return _}function y(m,_){const w={},g={start:{}};let T=["start"];for(let S=0;S<m.length;S++){const I=m[S],B=[];for(let L=0;L<I.length;L++){const P=I[L],F=""+S+L;B.push(F),w[F]={node:P,lastCount:0},g[F]={};for(let O=0;O<T.length;O++){const x=T[O];w[x]&&w[x].node.mode===P.mode?(g[x][F]=c(w[x].lastCount+P.length,P.mode)-c(w[x].lastCount,P.mode),w[x].lastCount+=P.length):(w[x]&&(w[x].lastCount=P.length),g[x][F]=c(P.length,P.mode)+4+e.getCharCountIndicator(P.mode,_))}}T=B}for(let S=0;S<T.length;S++)g[T[S]].end=0;return{map:g,table:w}}function N(m,_){let w;const g=e.getBestModeForData(m);if(w=e.from(_,g),w!==e.BYTE&&w.bit<g.bit)throw new Error('"'+m+'" cannot be encoded with mode '+e.toString(w)+`.
105
+ Suggested mode is: `+e.toString(g));switch(w===e.KANJI&&!s.isKanjiModeEnabled()&&(w=e.BYTE),w){case e.NUMERIC:return new r(m);case e.ALPHANUMERIC:return new o(m);case e.KANJI:return new i(m);case e.BYTE:return new n(m)}}t.fromArray=function(_){return _.reduce(function(w,g){return typeof g=="string"?w.push(N(g,null)):g.data&&w.push(N(g.data,g.mode)),w},[])},t.fromString=function(_,w){const g=C(_,s.isKanjiModeEnabled()),T=p(g),S=y(T,w),I=l.find_path(S.map,"start","end"),B=[];for(let L=1;L<I.length-1;L++)B.push(S.table[I[L]].node);return t.fromArray(h(B))},t.rawSplit=function(_){return t.fromArray(C(_,s.isKanjiModeEnabled()))}})(Te);const Tt=$,Dt=kt,On=kn,Jn=En,Wn=ve,Yn=ye,Ot=be,Jt=Et,jn=Tn,Bt=Be,qn=Ee,Qn=Z,Ft=Te;function Gn(t,e){const r=t.size,o=Yn.getPositions(e);for(let n=0;n<o.length;n++){const i=o[n][0],a=o[n][1];for(let s=-1;s<=7;s++)if(!(i+s<=-1||r<=i+s))for(let l=-1;l<=7;l++)a+l<=-1||r<=a+l||(s>=0&&s<=6&&(l===0||l===6)||l>=0&&l<=6&&(s===0||s===6)||s>=2&&s<=4&&l>=2&&l<=4?t.set(i+s,a+l,!0,!0):t.set(i+s,a+l,!1,!0))}}function Zn(t){const e=t.size;for(let r=8;r<e-8;r++){const o=r%2===0;t.set(r,6,o,!0),t.set(6,r,o,!0)}}function Xn(t,e){const r=Wn.getPositions(e);for(let o=0;o<r.length;o++){const n=r[o][0],i=r[o][1];for(let a=-2;a<=2;a++)for(let s=-2;s<=2;s++)a===-2||a===2||s===-2||s===2||a===0&&s===0?t.set(n+a,i+s,!0,!0):t.set(n+a,i+s,!1,!0)}}function to(t,e){const r=t.size,o=Bt.getEncodedBits(e);let n,i,a;for(let s=0;s<18;s++)n=Math.floor(s/3),i=s%3+r-8-3,a=(o>>s&1)===1,t.set(n,i,a,!0),t.set(i,n,a,!0)}function Vt(t,e,r){const o=t.size,n=qn.getEncodedBits(e,r);let i,a;for(i=0;i<15;i++)a=(n>>i&1)===1,i<6?t.set(i,8,a,!0):i<8?t.set(i+1,8,a,!0):t.set(o-15+i,8,a,!0),i<8?t.set(8,o-i-1,a,!0):i<9?t.set(8,15-i-1+1,a,!0):t.set(8,15-i-1,a,!0);t.set(o-8,8,1,!0)}function eo(t,e){const r=t.size;let o=-1,n=r-1,i=7,a=0;for(let s=r-1;s>0;s-=2)for(s===6&&s--;;){for(let l=0;l<2;l++)if(!t.isReserved(n,s-l)){let u=!1;a<e.length&&(u=(e[a]>>>i&1)===1),t.set(n,s-l,u),i--,i===-1&&(a++,i=7)}if(n+=o,n<0||r<=n){n-=o,o=-o;break}}}function no(t,e,r){const o=new On;r.forEach(function(l){o.put(l.mode.bit,4),o.put(l.getLength(),Qn.getCharCountIndicator(l.mode,t)),l.write(o)});const n=Tt.getSymbolTotalCodewords(t),i=Jt.getTotalCodewordsCount(t,e),a=(n-i)*8;for(o.getLengthInBits()+4<=a&&o.put(0,4);o.getLengthInBits()%8!==0;)o.putBit(0);const s=(a-o.getLengthInBits())/8;for(let l=0;l<s;l++)o.put(l%2?17:236,8);return oo(o,t,e)}function oo(t,e,r){const o=Tt.getSymbolTotalCodewords(e),n=Jt.getTotalCodewordsCount(e,r),i=o-n,a=Jt.getBlocksCount(e,r),s=o%a,l=a-s,u=Math.floor(o/a),d=Math.floor(i/a),C=d+1,c=u-d,h=new jn(c);let p=0;const y=new Array(a),N=new Array(a);let m=0;const _=new Uint8Array(t.buffer);for(let I=0;I<a;I++){const B=I<l?d:C;y[I]=_.slice(p,p+B),N[I]=h.encode(y[I]),p+=B,m=Math.max(m,B)}const w=new Uint8Array(o);let g=0,T,S;for(T=0;T<m;T++)for(S=0;S<a;S++)T<y[S].length&&(w[g++]=y[S][T]);for(T=0;T<c;T++)for(S=0;S<a;S++)w[g++]=N[S][T];return w}function io(t,e,r,o){let n;if(Array.isArray(t))n=Ft.fromArray(t);else if(typeof t=="string"){let u=e;if(!u){const d=Ft.rawSplit(t);u=Bt.getBestVersionForData(d,r)}n=Ft.fromString(t,u||40)}else throw new Error("Invalid data");const i=Bt.getBestVersionForData(n,r);if(!i)throw new Error("The amount of data is too big to be stored in a QR Code");if(!e)e=i;else if(e<i)throw new Error(`
106
106
  The chosen QR Code version cannot contain this amount of data.
107
- Minimum version required to store current data is: `+o+`.
108
- `);const a=io(e,r,n),s=Tt.getSymbolSize(e),l=new Yn(s);return Xn(l,e),to(l),eo(l,e),Vt(l,r,0),e>=7&&no(l,e),oo(l,a),isNaN(i)&&(i=Ot.getBestMask(l,Vt.bind(null,l,r))),Ot.applyMask(i,l),Vt(l,r,i),{modules:l,version:e,errorCorrectionLevel:r,maskPattern:i,segments:n}}we.create=function(e,r){if(typeof e>"u"||e==="")throw new Error("No input text");let i=Dt.M,n,o;return typeof r<"u"&&(i=Dt.from(r.errorCorrectionLevel,Dt.M),n=Bt.from(r.version),o=Ot.from(r.maskPattern),r.toSJISFunc&&Tt.setToSJISFunction(r.toSJISFunc)),ao(e,n,i,o)};var xe={},Gt={};(function(t){function e(r){if(typeof r=="number"&&(r=r.toString()),typeof r!="string")throw new Error("Color should be defined as hex string");let i=r.slice().replace("#","").split("");if(i.length<3||i.length===5||i.length>8)throw new Error("Invalid hex color: "+r);(i.length===3||i.length===4)&&(i=Array.prototype.concat.apply([],i.map(function(o){return[o,o]}))),i.length===6&&i.push("F","F");const n=parseInt(i.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+i.slice(0,6).join("")}}t.getOptions=function(i){i||(i={}),i.color||(i.color={});const n=typeof i.margin>"u"||i.margin===null||i.margin<0?4:i.margin,o=i.width&&i.width>=21?i.width:void 0,a=i.scale||4;return{width:o,scale:o?4:a,margin:n,color:{dark:e(i.color.dark||"#000000ff"),light:e(i.color.light||"#ffffffff")},type:i.type,rendererOpts:i.rendererOpts||{}}},t.getScale=function(i,n){return n.width&&n.width>=i+n.margin*2?n.width/(i+n.margin*2):n.scale},t.getImageWidth=function(i,n){const o=t.getScale(i,n);return Math.floor((i+n.margin*2)*o)},t.qrToImageData=function(i,n,o){const a=n.modules.size,s=n.modules.data,l=t.getScale(a,o),u=Math.floor((a+o.margin*2)*l),d=o.margin*l,C=[o.color.light,o.color.dark];for(let c=0;c<u;c++)for(let h=0;h<u;h++){let p=(c*u+h)*4,y=o.color.light;if(c>=d&&h>=d&&c<u-d&&h<u-d){const N=Math.floor((c-d)/l),m=Math.floor((h-d)/l);y=C[s[N*a+m]?1:0]}i[p++]=y.r,i[p++]=y.g,i[p++]=y.b,i[p]=y.a}}})(Gt);(function(t){const e=Gt;function r(n,o,a){n.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=a,o.width=a,o.style.height=a+"px",o.style.width=a+"px"}function i(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}t.render=function(o,a,s){let l=s,u=a;typeof l>"u"&&(!a||!a.getContext)&&(l=a,a=void 0),a||(u=i()),l=e.getOptions(l);const d=e.getImageWidth(o.modules.size,l),C=u.getContext("2d"),c=C.createImageData(d,d);return e.qrToImageData(c.data,o,l),r(C,u,d),C.putImageData(c,0,0),u},t.renderToDataURL=function(o,a,s){let l=s;typeof l>"u"&&(!a||!a.getContext)&&(l=a,a=void 0),l||(l={});const u=t.render(o,a,l),d=l.type||"image/png",C=l.rendererOpts||{};return u.toDataURL(d,C.quality)}})(xe);var Ae={};const so=Gt;function ce(t,e){const r=t.a/255,i=e+'="'+t.hex+'"';return r<1?i+" "+e+'-opacity="'+r.toFixed(2).slice(1)+'"':i}function $t(t,e,r){let i=t+e;return typeof r<"u"&&(i+=" "+r),i}function lo(t,e,r){let i="",n=0,o=!1,a=0;for(let s=0;s<t.length;s++){const l=Math.floor(s%e),u=Math.floor(s/e);!l&&!o&&(o=!0),t[s]?(a++,s>0&&l>0&&t[s-1]||(i+=o?$t("M",l+r,.5+u+r):$t("m",n,0),n=0,o=!1),l+1<e&&t[s+1]||(i+=$t("h",a),a=0)):n++}return i}Ae.render=function(e,r,i){const n=so.getOptions(r),o=e.modules.size,a=e.modules.data,s=o+n.margin*2,l=n.color.light.a?"<path "+ce(n.color.light,"fill")+' d="M0 0h'+s+"v"+s+'H0z"/>':"",u="<path "+ce(n.color.dark,"stroke")+' d="'+lo(a,o,n.margin)+'"/>',d='viewBox="0 0 '+s+" "+s+'"',c='<svg xmlns="http://www.w3.org/2000/svg" '+(n.width?'width="'+n.width+'" height="'+n.width+'" ':"")+d+' shape-rendering="crispEdges">'+l+u+`</svg>
109
- `;return typeof i=="function"&&i(null,c),c};const co=_n,Wt=we,Ie=xe,uo=Ae;function Zt(t,e,r,i,n){const o=[].slice.call(arguments,1),a=o.length,s=typeof o[a-1]=="function";if(!s&&!co())throw new Error("Callback required as last argument");if(s){if(a<2)throw new Error("Too few arguments provided");a===2?(n=r,r=e,e=i=void 0):a===3&&(e.getContext&&typeof n>"u"?(n=i,i=void 0):(n=i,i=r,r=e,e=void 0))}else{if(a<1)throw new Error("Too few arguments provided");return a===1?(r=e,e=i=void 0):a===2&&!e.getContext&&(i=r,r=e,e=void 0),new Promise(function(l,u){try{const d=Wt.create(r,i);l(t(d,e,i))}catch(d){u(d)}})}try{const l=Wt.create(r,i);n(null,t(l,e,i))}catch(l){n(l)}}gt.create=Wt.create;gt.toCanvas=Zt.bind(null,Ie.render);gt.toDataURL=Zt.bind(null,Ie.renderToDataURL);gt.toString=Zt.bind(null,function(t,e,r){return uo.render(t,r)});const fo=["src"],ho=Yt({__name:"BuildShareDlg",props:{show:{default:!1},showModifiers:{}},emits:["update:show"],setup(t){const e=He(),r=$e(t,"show"),i=K(""),n=K(!1),o=gn(()=>{try{Ut.parse(i.value),n.value=!1}catch{n.value=!0}},500);dt(()=>{i.value.trim()?o():n.value=!0});const a=K(!1),s=K(""),l=K("");dt(()=>{s.value?gt.toDataURL(s.value,{width:256,margin:2}).then(C=>{l.value=C}):l.value=""});const u=()=>{Ze(s.value),a.value=!1},d=Q(async()=>{const C=Ut.parse(i.value),c=await tn(new TextEncoder().encode(Ut.stringify({data:C,ctime:Date.now(),type:"share"})),"file.txt"),h=location.origin+e.resolve(`/s/${c.id}`).href;s.value=h,a.value=!0});return(C,c)=>{const h=pe,p=de,y=ge;return bt(),Ct(Ht,null,[b(p,{show:r.value,"onUpdate:show":c[1]||(c[1]=N=>r.value=N),preset:"dialog",title:"分享规则",positiveText:v(d).loading?"分享中...":"分享",onPositiveClick:v(d).invoke,loading:v(d).loading,positiveButtonProps:{disabled:v(n)},style:{width:"800px"},onAfterLeave:c[2]||(c[2]=N=>i.value="")},{default:E(()=>[b(h,{class:"gkd_code h-[calc(var(--gkd-height)*0.6)]",type:"textarea","show-count":"",value:v(i),"onUpdate:value":c[0]||(c[0]=N=>{v(d).loading||(i.value=N)}),placeholder:"请输入需要分享的规则"},null,8,["value"])]),_:1},8,["show","positiveText","onPositiveClick","loading","positiveButtonProps"]),b(p,{show:v(a),"onUpdate:show":c[3]||(c[3]=N=>ut(a)?a.value=N:null),preset:"dialog",title:"分享成功",positiveText:"复制并关闭",negativeText:"重新分享",onPositiveClick:u,onNegativeClick:c[4]||(c[4]=N=>{a.value=!1,i.value="",r.value=!0}),onAfterLeave:c[5]||(c[5]=N=>s.value=""),maskClosable:!1},{default:E(()=>[M("div",null,[b(y,{text:"",tag:"a",href:v(s),target:"_blank",type:"primary"},{default:E(()=>[H(fe(v(s)),1)]),_:1},8,["href"]),v(l)?(bt(),Ct("img",{key:0,src:v(l),"size-200px":"",block:""},null,8,fo)):he("",!0)])]),_:1},8,["show"])],64)}}}),go={flex:"","flex-col":"","p-10px":"","gap-10px":"","h-full":""},po={flex:""},wo=M("svg",{viewBox:"0 0 32 32"},[M("path",{d:"M29 27.586l-7.552-7.552a11.018 11.018 0 1 0-1.414 1.414L27.586 29zM4 13a9 9 0 1 1 9 9a9.01 9.01 0 0 1-9-9z",fill:"currentColor"})],-1),mo={"h-full":"",flex:"","flex-items-center":""},vo=M("div",{"flex-1":""},null,-1),yo={flex:"","gap-24px":"","items-center":"","pr-8px":""},bo=M("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},[M("path",{d:"M19.43 12.98c.04-.32.07-.64.07-.98c0-.34-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46a.5.5 0 0 0-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65A.488.488 0 0 0 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1a.566.566 0 0 0-.18-.03c-.17 0-.34.09-.43.25l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98c0 .33.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46a.5.5 0 0 0 .61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.06.02.12.03.18.03c.17 0 .34-.09.43-.25l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zm-1.98-1.71c.04.31.05.52.05.73c0 .21-.02.43-.05.73l-.14 1.13l.89.7l1.08.84l-.7 1.21l-1.27-.51l-1.04-.42l-.9.68c-.43.32-.84.56-1.25.73l-1.06.43l-.16 1.13l-.2 1.35h-1.4l-.19-1.35l-.16-1.13l-1.06-.43c-.43-.18-.83-.41-1.23-.71l-.91-.7l-1.06.43l-1.27.51l-.7-1.21l1.08-.84l.89-.7l-.14-1.13c-.03-.31-.05-.54-.05-.74s.02-.43.05-.73l.14-1.13l-.89-.7l-1.08-.84l.7-1.21l1.27.51l1.04.42l.9-.68c.43-.32.84-.56 1.25-.73l1.06-.43l.16-1.13l.2-1.35h1.39l.19 1.35l.16 1.13l1.06.43c.43.18.83.41 1.23.71l.91.7l1.06-.43l1.27-.51l.7 1.21l-1.07.85l-.89.7l.14 1.13zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4s4-1.79 4-4s-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2s2 .9 2 2s-.9 2-2 2z",fill:"currentColor"})],-1),Co=M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[M("path",{fill:"currentColor",d:"M28 19H14.83l2.58-2.59L16 15l-5 5l5 5l1.41-1.41L14.83 21H28z"}),M("path",{fill:"currentColor",d:"M24 14v-4a1 1 0 0 0-.29-.71l-7-7A1 1 0 0 0 16 2H6a2 2 0 0 0-2 2v24a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2h-2v2H6V4h8v6a2 2 0 0 0 2 2h6v2Zm-8-4V4.41L21.59 10Z"})],-1),_o={flex:"",href:"/device",title:"连接设备"},Bo=M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[M("path",{fill:"currentColor",d:"M18.35 14.85L16.9 13.4q.3-.275.463-.637t.162-.763t-.162-.763t-.463-.637l1.45-1.45q.575.575.875 1.313t.3 1.537t-.3 1.538t-.875 1.312m2.45 2.45l-1.4-1.4q.775-.775 1.2-1.775T21.025 12T20.6 9.875T19.4 8.1l1.4-1.4q1.075 1.05 1.65 2.425T23.025 12t-.575 2.875T20.8 17.3M7 23q-.825 0-1.412-.587T5 21V3q0-.825.588-1.412T7 1h10q.825 0 1.413.588T19 3v4h-2V6H7v12h10v-1h2v4q0 .825-.587 1.413T17 23zm0-3v1h10v-1zM7 4h10V3H7zm0 0V3zm0 16v1z"})],-1),ko={flex:"",href:"https://github.com/gkd-kit/inspect",target:"_blank",rel:"noopener noreferrer"},Eo=M("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 496 512"},[M("path",{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6c-3.3.3-5.6-1.3-5.6-3.6c0-2 2.3-3.6 5.2-3.6c3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9c2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9c.3 2 2.9 3.3 5.9 2.6c2.9-.7 4.9-2.6 4.6-4.6c-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2c12.8 2.3 17.3-5.6 17.3-12.1c0-6.2-.3-40.4-.3-61.4c0 0-70 15-84.7-29.8c0 0-11.4-29.1-27.8-36.6c0 0-22.9-15.7 1.6-15.4c0 0 24.9 2 38.6 25.8c21.9 38.6 58.6 27.5 72.9 20.9c2.3-16 8.8-27.1 16-33.7c-55.9-6.2-112.3-14.3-112.3-110.5c0-27.5 7.6-41.3 23.6-58.9c-2.6-6.5-11.1-33.3 2.6-67.9c20.9-6.5 69 27 69 27c20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27c13.7 34.7 5.2 61.4 2.6 67.9c16 17.7 25.8 31.5 25.8 58.9c0 96.5-58.9 104.2-114.8 110.5c9.2 7.9 17 22.9 17 46.4c0 33.7-.3 75.4-.3 83.6c0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252C496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2c1.6 1.6 3.9 2.3 5.2 1c1.3-1 1-3.3-.7-5.2c-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9c1.6 1 3.6.7 4.3-.7c.7-1.3-.3-2.9-2.3-3.9c-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2c2.3 2.3 5.2 2.6 6.5 1c1.3-1.3.7-4.3-1.3-6.2c-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9c1.6 2.3 4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2c-1.4-2.3-4-3.3-5.6-2z",fill:"currentColor"})],-1),So=M("div",{"h-1px":"","my-10px":"",bg:"#eee"},null,-1),To=M("div",{"h-1px":"","my-10px":"",bg:"#eee"},null,-1),No={flex:"","gap-10px":""},xo=M("div",null,"打开快照页面自动生成分享链接(请确保不含隐私)",-1),Fo=Yt({__name:"HomePage",setup(t){const e=K([]),r=K(!0),i=async()=>{r.value=!0,e.value=(await We.getAllItems()).reverse(),S.value=[],r.value=!1};Ke(i);const n=ne({query:"",actualQuery:"",updateQuery:()=>{n.actualQuery=n.query.trim(),S.value=[]}}),o=ct(()=>{const k=n.actualQuery;return k?e.value.filter(f=>(ae(f).name||"").includes(k)||(f.appId||"").includes(k)||(f.activityId||"").includes(k)):e.value}),a=Q(async()=>{await an(),await i()}),{activityIdCol:s,appIdCol:l,appNameCol:u,ctimeCol:d,mtimeCol:C,deviceCol:c,appVersionCodeCol:h,appVersionNameCol:p,resetColWidth:y}=dn();dt(()=>{const k=o.value.reduce((f,J)=>(f.add(hn(J)),f),new Set);if(k.size<=1){c.filterOptions=void 0;return}c.filterOptions=[...k.values()].map(f=>({value:f,label:f}))}),dt(()=>{const k=o.value.reduce((f,J)=>(f.add(ae(J).name),f),new Set);if(k.size<=1){u.filterOptions=void 0;return}u.filterOptions=[...k.values()].map(f=>({value:f,label:f}))}),dt(()=>{const k=o.value.reduce((f,J)=>(f.add(J.activityId),f),new Set);if(k.size<=1){s.filterOptions=void 0;return}s.filterOptions=[...k.values()].map(f=>({value:f,label:f}))});const N=Oe([{type:"selection"},d,C,c,u,l,h,p,s,{key:"actions",title:"操作",fixed:"right",width:"160px",render(k){return b(Ge,{snapshot:k,onDelete:i},null)}}]),m=ne({page:1,pageSize:50,showSizePicker:!0,pageSizes:[50,100],onChange:k=>{m.page=k},onUpdatePageSize:k=>{m.pageSize=k,m.page=1}});Je(m,y);const _=k=>{[d,C].forEach(f=>{k.columnKey!=f.key?f.sortOrder=void 0:f.sortOrder=k.order})};C.sortOrder="descend";const w=K(!1),g=K(""),T=Q(async()=>{const k=g.value.trim().split(`
110
- `).map(f=>f.trim()).filter(f=>Ye(f));k.length!=0&&(await sn(k),await i(),g.value="")}),S=K([]),x=()=>Promise.all(S.value.map(k=>oe.getItem(k))),B=Q(async()=>{await new Promise((k,f)=>{Xe.warning({title:"删除",content:`是否批量删除 ${S.value.length} 个快照`,negativeText:"取消",positiveText:"确认",onClose:f,onEsc:f,onMaskClick:f,onNegativeClick:f,onPositiveClick:k})}),await Promise.all(S.value.map(k=>oe.removeItem(k))),await i()}),L=Q(async()=>{await en(await x())}),R=Q(async()=>{await nn(await x())}),F=Q(async()=>{await ie();const k=await on(await x());re({content:k.map(f=>je(f)).join(`
107
+ Minimum version required to store current data is: `+i+`.
108
+ `);const a=no(e,r,n),s=Tt.getSymbolSize(e),l=new Jn(s);return Gn(l,e),Zn(l),Xn(l,e),Vt(l,r,0),e>=7&&to(l,e),eo(l,a),isNaN(o)&&(o=Ot.getBestMask(l,Vt.bind(null,l,r))),Ot.applyMask(o,l),Vt(l,r,o),{modules:l,version:e,errorCorrectionLevel:r,maskPattern:o,segments:n}}we.create=function(e,r){if(typeof e>"u"||e==="")throw new Error("No input text");let o=Dt.M,n,i;return typeof r<"u"&&(o=Dt.from(r.errorCorrectionLevel,Dt.M),n=Bt.from(r.version),i=Ot.from(r.maskPattern),r.toSJISFunc&&Tt.setToSJISFunction(r.toSJISFunc)),io(e,n,o,i)};var Ie={},Gt={};(function(t){function e(r){if(typeof r=="number"&&(r=r.toString()),typeof r!="string")throw new Error("Color should be defined as hex string");let o=r.slice().replace("#","").split("");if(o.length<3||o.length===5||o.length>8)throw new Error("Invalid hex color: "+r);(o.length===3||o.length===4)&&(o=Array.prototype.concat.apply([],o.map(function(i){return[i,i]}))),o.length===6&&o.push("F","F");const n=parseInt(o.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+o.slice(0,6).join("")}}t.getOptions=function(o){o||(o={}),o.color||(o.color={});const n=typeof o.margin>"u"||o.margin===null||o.margin<0?4:o.margin,i=o.width&&o.width>=21?o.width:void 0,a=o.scale||4;return{width:i,scale:i?4:a,margin:n,color:{dark:e(o.color.dark||"#000000ff"),light:e(o.color.light||"#ffffffff")},type:o.type,rendererOpts:o.rendererOpts||{}}},t.getScale=function(o,n){return n.width&&n.width>=o+n.margin*2?n.width/(o+n.margin*2):n.scale},t.getImageWidth=function(o,n){const i=t.getScale(o,n);return Math.floor((o+n.margin*2)*i)},t.qrToImageData=function(o,n,i){const a=n.modules.size,s=n.modules.data,l=t.getScale(a,i),u=Math.floor((a+i.margin*2)*l),d=i.margin*l,C=[i.color.light,i.color.dark];for(let c=0;c<u;c++)for(let h=0;h<u;h++){let p=(c*u+h)*4,y=i.color.light;if(c>=d&&h>=d&&c<u-d&&h<u-d){const N=Math.floor((c-d)/l),m=Math.floor((h-d)/l);y=C[s[N*a+m]?1:0]}o[p++]=y.r,o[p++]=y.g,o[p++]=y.b,o[p]=y.a}}})(Gt);(function(t){const e=Gt;function r(n,i,a){n.clearRect(0,0,i.width,i.height),i.style||(i.style={}),i.height=a,i.width=a,i.style.height=a+"px",i.style.width=a+"px"}function o(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}t.render=function(i,a,s){let l=s,u=a;typeof l>"u"&&(!a||!a.getContext)&&(l=a,a=void 0),a||(u=o()),l=e.getOptions(l);const d=e.getImageWidth(i.modules.size,l),C=u.getContext("2d"),c=C.createImageData(d,d);return e.qrToImageData(c.data,i,l),r(C,u,d),C.putImageData(c,0,0),u},t.renderToDataURL=function(i,a,s){let l=s;typeof l>"u"&&(!a||!a.getContext)&&(l=a,a=void 0),l||(l={});const u=t.render(i,a,l),d=l.type||"image/png",C=l.rendererOpts||{};return u.toDataURL(d,C.quality)}})(Ie);var Me={};const ro=Gt;function ce(t,e){const r=t.a/255,o=e+'="'+t.hex+'"';return r<1?o+" "+e+'-opacity="'+r.toFixed(2).slice(1)+'"':o}function $t(t,e,r){let o=t+e;return typeof r<"u"&&(o+=" "+r),o}function ao(t,e,r){let o="",n=0,i=!1,a=0;for(let s=0;s<t.length;s++){const l=Math.floor(s%e),u=Math.floor(s/e);!l&&!i&&(i=!0),t[s]?(a++,s>0&&l>0&&t[s-1]||(o+=i?$t("M",l+r,.5+u+r):$t("m",n,0),n=0,i=!1),l+1<e&&t[s+1]||(o+=$t("h",a),a=0)):n++}return o}Me.render=function(e,r,o){const n=ro.getOptions(r),i=e.modules.size,a=e.modules.data,s=i+n.margin*2,l=n.color.light.a?"<path "+ce(n.color.light,"fill")+' d="M0 0h'+s+"v"+s+'H0z"/>':"",u="<path "+ce(n.color.dark,"stroke")+' d="'+ao(a,i,n.margin)+'"/>',d='viewBox="0 0 '+s+" "+s+'"',c='<svg xmlns="http://www.w3.org/2000/svg" '+(n.width?'width="'+n.width+'" height="'+n.width+'" ':"")+d+' shape-rendering="crispEdges">'+l+u+`</svg>
109
+ `;return typeof o=="function"&&o(null,c),c};const so=_n,Wt=we,Ae=Ie,lo=Me;function Zt(t,e,r,o,n){const i=[].slice.call(arguments,1),a=i.length,s=typeof i[a-1]=="function";if(!s&&!so())throw new Error("Callback required as last argument");if(s){if(a<2)throw new Error("Too few arguments provided");a===2?(n=r,r=e,e=o=void 0):a===3&&(e.getContext&&typeof n>"u"?(n=o,o=void 0):(n=o,o=r,r=e,e=void 0))}else{if(a<1)throw new Error("Too few arguments provided");return a===1?(r=e,e=o=void 0):a===2&&!e.getContext&&(o=r,r=e,e=void 0),new Promise(function(l,u){try{const d=Wt.create(r,o);l(t(d,e,o))}catch(d){u(d)}})}try{const l=Wt.create(r,o);n(null,t(l,e,o))}catch(l){n(l)}}gt.create=Wt.create;gt.toCanvas=Zt.bind(null,Ae.render);gt.toDataURL=Zt.bind(null,Ae.renderToDataURL);gt.toString=Zt.bind(null,function(t,e,r){return lo.render(t,r)});const co=["src"],uo=Yt({__name:"BuildShareDlg",props:{show:{default:!1},showModifiers:{}},emits:["update:show"],setup(t){const e=He(),r=$e(t,"show"),o=K(""),n=K(!1),i=gn(()=>{try{zt.parse(o.value),n.value=!1}catch{n.value=!0}},500);dt(()=>{o.value.trim()?i():n.value=!0});const a=K(!1),s=K(""),l=K("");dt(()=>{s.value?gt.toDataURL(s.value,{width:256,margin:2}).then(C=>{l.value=C}):l.value=""});const u=()=>{Ze(s.value),a.value=!1},d=Q(async()=>{const C=zt.parse(o.value),c=await tn(new TextEncoder().encode(zt.stringify({data:C,ctime:Date.now(),type:"share"})),"file.txt"),h=location.origin+e.resolve(`/s/${c.id}`).href;s.value=h,a.value=!0});return(C,c)=>{const h=pe,p=de,y=ge;return bt(),Ct(Ht,null,[b(p,{show:r.value,"onUpdate:show":c[1]||(c[1]=N=>r.value=N),preset:"dialog",title:"分享规则",positiveText:v(d).loading?"分享中...":"分享",onPositiveClick:v(d).invoke,loading:v(d).loading,positiveButtonProps:{disabled:v(n)},style:{width:"800px"},onAfterLeave:c[2]||(c[2]=N=>o.value="")},{default:E(()=>[b(h,{class:"gkd_code h-[calc(var(--gkd-height)*0.6)]",type:"textarea","show-count":"",value:v(o),"onUpdate:value":c[0]||(c[0]=N=>{v(d).loading||(o.value=N)}),placeholder:"请输入需要分享的规则"},null,8,["value"])]),_:1},8,["show","positiveText","onPositiveClick","loading","positiveButtonProps"]),b(p,{show:v(a),"onUpdate:show":c[3]||(c[3]=N=>ut(a)?a.value=N:null),preset:"dialog",title:"分享成功",positiveText:"复制并关闭",negativeText:"重新分享",onPositiveClick:u,onNegativeClick:c[4]||(c[4]=N=>{a.value=!1,o.value="",r.value=!0}),onAfterLeave:c[5]||(c[5]=N=>s.value=""),maskClosable:!1},{default:E(()=>[R("div",null,[b(y,{text:"",tag:"a",href:v(s),target:"_blank",type:"primary"},{default:E(()=>[H(fe(v(s)),1)]),_:1},8,["href"]),v(l)?(bt(),Ct("img",{key:0,src:v(l),"size-200px":"",block:""},null,8,co)):he("",!0)])]),_:1},8,["show"])],64)}}}),fo={flex:"","flex-col":"","p-10px":"","gap-10px":"","h-full":""},ho={flex:""},go=R("svg",{viewBox:"0 0 32 32"},[R("path",{d:"M29 27.586l-7.552-7.552a11.018 11.018 0 1 0-1.414 1.414L27.586 29zM4 13a9 9 0 1 1 9 9a9.01 9.01 0 0 1-9-9z",fill:"currentColor"})],-1),po={"h-full":"",flex:"","flex-items-center":""},wo=R("div",{"flex-1":""},null,-1),mo={flex:"","gap-24px":"","items-center":"","pr-8px":""},vo=R("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},[R("path",{d:"M19.43 12.98c.04-.32.07-.64.07-.98c0-.34-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46a.5.5 0 0 0-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65A.488.488 0 0 0 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1a.566.566 0 0 0-.18-.03c-.17 0-.34.09-.43.25l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98c0 .33.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46a.5.5 0 0 0 .61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.06.02.12.03.18.03c.17 0 .34-.09.43-.25l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zm-1.98-1.71c.04.31.05.52.05.73c0 .21-.02.43-.05.73l-.14 1.13l.89.7l1.08.84l-.7 1.21l-1.27-.51l-1.04-.42l-.9.68c-.43.32-.84.56-1.25.73l-1.06.43l-.16 1.13l-.2 1.35h-1.4l-.19-1.35l-.16-1.13l-1.06-.43c-.43-.18-.83-.41-1.23-.71l-.91-.7l-1.06.43l-1.27.51l-.7-1.21l1.08-.84l.89-.7l-.14-1.13c-.03-.31-.05-.54-.05-.74s.02-.43.05-.73l.14-1.13l-.89-.7l-1.08-.84l.7-1.21l1.27.51l1.04.42l.9-.68c.43-.32.84-.56 1.25-.73l1.06-.43l.16-1.13l.2-1.35h1.39l.19 1.35l.16 1.13l1.06.43c.43.18.83.41 1.23.71l.91.7l1.06-.43l1.27-.51l.7 1.21l-1.07.85l-.89.7l.14 1.13zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4s4-1.79 4-4s-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2s2 .9 2 2s-.9 2-2 2z",fill:"currentColor"})],-1),yo=R("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[R("path",{fill:"currentColor",d:"M28 19H14.83l2.58-2.59L16 15l-5 5l5 5l1.41-1.41L14.83 21H28z"}),R("path",{fill:"currentColor",d:"M24 14v-4a1 1 0 0 0-.29-.71l-7-7A1 1 0 0 0 16 2H6a2 2 0 0 0-2 2v24a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2h-2v2H6V4h8v6a2 2 0 0 0 2 2h6v2Zm-8-4V4.41L21.59 10Z"})],-1),bo={flex:"",href:"/device",title:"连接设备"},Co=R("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[R("path",{fill:"currentColor",d:"M18.35 14.85L16.9 13.4q.3-.275.463-.637t.162-.763t-.162-.763t-.463-.637l1.45-1.45q.575.575.875 1.313t.3 1.537t-.3 1.538t-.875 1.312m2.45 2.45l-1.4-1.4q.775-.775 1.2-1.775T21.025 12T20.6 9.875T19.4 8.1l1.4-1.4q1.075 1.05 1.65 2.425T23.025 12t-.575 2.875T20.8 17.3M7 23q-.825 0-1.412-.587T5 21V3q0-.825.588-1.412T7 1h10q.825 0 1.413.588T19 3v4h-2V6H7v12h10v-1h2v4q0 .825-.587 1.413T17 23zm0-3v1h10v-1zM7 4h10V3H7zm0 0V3zm0 16v1z"})],-1),_o={flex:"",href:"https://github.com/gkd-kit/inspect",target:"_blank",rel:"noopener noreferrer"},Bo=R("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 496 512"},[R("path",{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6c-3.3.3-5.6-1.3-5.6-3.6c0-2 2.3-3.6 5.2-3.6c3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9c2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9c.3 2 2.9 3.3 5.9 2.6c2.9-.7 4.9-2.6 4.6-4.6c-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2c12.8 2.3 17.3-5.6 17.3-12.1c0-6.2-.3-40.4-.3-61.4c0 0-70 15-84.7-29.8c0 0-11.4-29.1-27.8-36.6c0 0-22.9-15.7 1.6-15.4c0 0 24.9 2 38.6 25.8c21.9 38.6 58.6 27.5 72.9 20.9c2.3-16 8.8-27.1 16-33.7c-55.9-6.2-112.3-14.3-112.3-110.5c0-27.5 7.6-41.3 23.6-58.9c-2.6-6.5-11.1-33.3 2.6-67.9c20.9-6.5 69 27 69 27c20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27c13.7 34.7 5.2 61.4 2.6 67.9c16 17.7 25.8 31.5 25.8 58.9c0 96.5-58.9 104.2-114.8 110.5c9.2 7.9 17 22.9 17 46.4c0 33.7-.3 75.4-.3 83.6c0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252C496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2c1.6 1.6 3.9 2.3 5.2 1c1.3-1 1-3.3-.7-5.2c-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9c1.6 1 3.6.7 4.3-.7c.7-1.3-.3-2.9-2.3-3.9c-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2c2.3 2.3 5.2 2.6 6.5 1c1.3-1.3.7-4.3-1.3-6.2c-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9c1.6 2.3 4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2c-1.4-2.3-4-3.3-5.6-2z",fill:"currentColor"})],-1),ko=R("div",{"h-1px":"","my-10px":"",bg:"#eee"},null,-1),Eo=R("div",{"h-1px":"","my-10px":"",bg:"#eee"},null,-1),So={flex:"","gap-10px":""},To=R("div",null,"打开快照页面自动生成分享链接(请确保不含隐私)",-1),Uo=Yt({__name:"HomePage",setup(t){const e=K([]),r=K(!0),o=async()=>{r.value=!0,e.value=(await We.getAllItems()).reverse(),S.value=[],r.value=!1};Ke(o);const n=ne({query:"",actualQuery:"",updateQuery:()=>{n.actualQuery=n.query.trim(),S.value=[]}}),i=ct(()=>{const k=n.actualQuery;return k?e.value.filter(f=>(ae(f).name||"").includes(k)||(f.appId||"").includes(k)||(f.activityId||"").includes(k)):e.value}),a=Q(async()=>{await an(),await o()}),{activityIdCol:s,appIdCol:l,appNameCol:u,ctimeCol:d,mtimeCol:C,deviceCol:c,appVersionCodeCol:h,appVersionNameCol:p,resetColWidth:y}=dn();dt(()=>{const k=i.value.reduce((f,J)=>(f.add(hn(J)),f),new Set);if(k.size<=1){c.filterOptions=void 0;return}c.filterOptions=[...k.values()].map(f=>({value:f,label:f}))}),dt(()=>{const k=i.value.reduce((f,J)=>(f.add(ae(J).name),f),new Set);if(k.size<=1){u.filterOptions=void 0;return}u.filterOptions=[...k.values()].map(f=>({value:f,label:f}))}),dt(()=>{const k=i.value.reduce((f,J)=>(f.add(J.activityId),f),new Set);if(k.size<=1){s.filterOptions=void 0;return}s.filterOptions=[...k.values()].map(f=>({value:f,label:f}))});const N=Oe([{type:"selection"},d,C,c,u,l,h,p,s,{key:"actions",title:"操作",fixed:"right",width:"160px",render(k){return b(Ge,{snapshot:k,onDelete:o},null)}}]),m=ne({page:1,pageSize:50,showSizePicker:!0,pageSizes:[50,100],onChange:k=>{m.page=k},onUpdatePageSize:k=>{m.pageSize=k,m.page=1}});Je(m,y);const _=k=>{[d,C].forEach(f=>{k.columnKey!=f.key?f.sortOrder=void 0:f.sortOrder=k.order})};C.sortOrder="descend";const w=K(!1),g=K(""),T=Q(async()=>{const k=g.value.trim().split(`
110
+ `).map(f=>f.trim()).filter(f=>je(f));k.length!=0&&(await sn(k),await o(),g.value="")}),S=K([]),I=()=>Promise.all(S.value.map(k=>oe.getItem(k))),B=Q(async()=>{await new Promise((k,f)=>{Xe.warning({title:"删除",content:`是否批量删除 ${S.value.length} 个快照`,negativeText:"取消",positiveText:"确认",onClose:f,onEsc:f,onMaskClick:f,onNegativeClick:f,onPositiveClick:k})}),await Promise.all(S.value.map(k=>oe.removeItem(k))),await o()}),L=Q(async()=>{await en(await I())}),P=Q(async()=>{await nn(await I())}),F=Q(async()=>{await ie();const k=await on(await I());re({content:k.map(f=>qe(f)).join(`
111
111
  `)+`
112
- `})}),O=Q(async()=>{await ie();const k=await rn(await x());re({content:k.map(f=>location.origin+"/i/"+f).join(`
112
+ `})}),O=Q(async()=>{await ie();const k=await rn(await I());re({content:k.map(f=>location.origin+"/i/"+f).join(`
113
113
  `)+`
114
- `})}),P=K(!1),X=K(!1);return(k,f)=>{const J=pe,z=pn,U=ge,Nt=un,V=ln,Y=cn,xt=fn,wt=de,mt=Qe,st=Cn;return bt(),Ct(Ht,null,[M("div",go,[M("div",po,[b(V,null,{default:E(()=>[b(Nt,null,{default:E(()=>[b(J,{placeholder:"请输入应用名称/应用ID/界面ID",clearable:"",class:"min-w-320px",value:v(n).query,"onUpdate:value":f[0]||(f[0]=A=>v(n).query=A),onKeyup:qe(v(n).updateQuery,["enter"]),onChange:v(n).updateQuery},null,8,["value","onKeyup","onChange"]),b(U,{onClick:v(n).updateQuery},{icon:E(()=>[b(z,null,{default:E(()=>[wo]),_:1})]),_:1},8,["onClick"])]),_:1}),v(S).length?(bt(),Ct(Ht,{key:0},[b(Y,null,{trigger:E(()=>[b(U,null,{default:E(()=>[H(" 批量下载 ")]),_:1})]),default:E(()=>[b(V,{vertical:""},{default:E(()=>[b(U,{onClick:v(R).invoke,loading:v(R).loading},{default:E(()=>[H(" 批量下载-快照 ")]),_:1},8,["onClick","loading"]),b(U,{onClick:v(L).invoke,loading:v(L).loading},{default:E(()=>[H(" 批量下载-图片 ")]),_:1},8,["onClick","loading"])]),_:1})]),_:1}),b(Y,null,{trigger:E(()=>[b(U,null,{default:E(()=>[H(" 批量分享 ")]),_:1})]),default:E(()=>[b(V,{vertical:""},{default:E(()=>[b(U,{onClick:v(O).invoke,loading:v(O).loading},{default:E(()=>[H(" 批量生成链接-快照 ")]),_:1},8,["onClick","loading"]),b(U,{onClick:v(F).invoke,loading:v(F).loading},{default:E(()=>[H(" 批量生成链接-图片 ")]),_:1},8,["onClick","loading"])]),_:1})]),_:1}),b(U,{onClick:v(B).invoke},{default:E(()=>[H(" 批量删除 ")]),_:1},8,["onClick"]),M("div",mo,fe(`已选中 ${v(S).length} 个快照`),1)],64)):he("",!0)]),_:1}),vo,M("div",yo,[b(U,{text:"",title:"设置",onClick:f[1]||(f[1]=A=>X.value=!0)},{icon:E(()=>[b(z,{size:24},{default:E(()=>[bo]),_:1})]),_:1}),b(Y,null,{trigger:E(()=>[b(U,{text:""},{icon:E(()=>[b(z,{size:24},{default:E(()=>[Co]),_:1})]),_:1})]),default:E(()=>[b(V,{vertical:""},{default:E(()=>[b(U,{onClick:v(a).invoke,loading:v(a).loading},{default:E(()=>[H(" 导入本地文件 ")]),_:1},8,["onClick","loading"]),b(U,{onClick:f[2]||(f[2]=A=>w.value=!0),loading:v(T).loading},{default:E(()=>[H(" 导入网络文件 ")]),_:1},8,["loading"])]),_:1})]),_:1}),M("a",_o,[b(U,{text:""},{icon:E(()=>[b(z,{size:24},{default:E(()=>[Bo]),_:1})]),_:1})]),M("a",ko,[b(U,{text:""},{icon:E(()=>[b(z,{size:24},{default:E(()=>[Eo]),_:1})]),_:1})])])]),b(xt,{striped:"",data:v(o),columns:v(N),scrollX:1800,pagination:v(m),checkedRowKeys:v(S),"onUpdate:checkedRowKeys":f[3]||(f[3]=A=>ut(S)?S.value=A:null),rowKey:A=>A.id,"onUpdate:sorter":_,size:"small",class:"flex-1",flexHeight:"",loading:v(r)},null,8,["data","columns","pagination","checkedRowKeys","rowKey","loading"])]),b(wt,{show:v(w),"onUpdate:show":f[5]||(f[5]=A=>ut(w)?w.value=A:null),preset:"dialog",title:"导入网络文件",showIcon:!1,positiveText:"确认",negativeText:"取消",style:{width:"800px"},onPositiveClick:v(T).invoke,loading:v(T).loading,onAfterLeave:f[6]||(f[6]=A=>g.value="")},{default:E(()=>[b(J,{value:v(g),"onUpdate:value":f[4]||(f[4]=A=>{v(T).loading||(g.value=A)}),type:"textarea",placeholder:`1.支持ZIP文件链接
114
+ `})}),x=K(!1),X=K(!1);return(k,f)=>{const J=pe,U=pn,z=ge,Nt=un,V=ln,Y=cn,It=fn,wt=de,mt=Qe,st=Cn;return bt(),Ct(Ht,null,[R("div",fo,[R("div",ho,[b(V,null,{default:E(()=>[b(Nt,null,{default:E(()=>[b(J,{placeholder:"请输入应用名称/应用ID/界面ID",clearable:"",class:"min-w-320px",value:v(n).query,"onUpdate:value":f[0]||(f[0]=M=>v(n).query=M),onKeyup:Ye(v(n).updateQuery,["enter"]),onChange:v(n).updateQuery},null,8,["value","onKeyup","onChange"]),b(z,{onClick:v(n).updateQuery},{icon:E(()=>[b(U,null,{default:E(()=>[go]),_:1})]),_:1},8,["onClick"])]),_:1}),v(S).length?(bt(),Ct(Ht,{key:0},[b(Y,null,{trigger:E(()=>[b(z,null,{default:E(()=>[H(" 批量下载 ")]),_:1})]),default:E(()=>[b(V,{vertical:""},{default:E(()=>[b(z,{onClick:v(P).invoke,loading:v(P).loading},{default:E(()=>[H(" 批量下载-快照 ")]),_:1},8,["onClick","loading"]),b(z,{onClick:v(L).invoke,loading:v(L).loading},{default:E(()=>[H(" 批量下载-图片 ")]),_:1},8,["onClick","loading"])]),_:1})]),_:1}),b(Y,null,{trigger:E(()=>[b(z,null,{default:E(()=>[H(" 批量分享 ")]),_:1})]),default:E(()=>[b(V,{vertical:""},{default:E(()=>[b(z,{onClick:v(O).invoke,loading:v(O).loading},{default:E(()=>[H(" 批量生成链接-快照 ")]),_:1},8,["onClick","loading"]),b(z,{onClick:v(F).invoke,loading:v(F).loading},{default:E(()=>[H(" 批量生成链接-图片 ")]),_:1},8,["onClick","loading"])]),_:1})]),_:1}),b(z,{onClick:v(B).invoke},{default:E(()=>[H(" 批量删除 ")]),_:1},8,["onClick"]),R("div",po,fe(`已选中 ${v(S).length} 个快照`),1)],64)):he("",!0)]),_:1}),wo,R("div",mo,[b(z,{text:"",title:"设置",onClick:f[1]||(f[1]=M=>X.value=!0)},{icon:E(()=>[b(U,{size:24},{default:E(()=>[vo]),_:1})]),_:1}),b(Y,null,{trigger:E(()=>[b(z,{text:""},{icon:E(()=>[b(U,{size:24},{default:E(()=>[yo]),_:1})]),_:1})]),default:E(()=>[b(V,{vertical:""},{default:E(()=>[b(z,{onClick:v(a).invoke,loading:v(a).loading},{default:E(()=>[H(" 导入本地文件 ")]),_:1},8,["onClick","loading"]),b(z,{onClick:f[2]||(f[2]=M=>w.value=!0),loading:v(T).loading},{default:E(()=>[H(" 导入网络文件 ")]),_:1},8,["loading"])]),_:1})]),_:1}),R("a",bo,[b(z,{text:""},{icon:E(()=>[b(U,{size:24},{default:E(()=>[Co]),_:1})]),_:1})]),R("a",_o,[b(z,{text:""},{icon:E(()=>[b(U,{size:24},{default:E(()=>[Bo]),_:1})]),_:1})])])]),b(It,{striped:"",data:v(i),columns:v(N),scrollX:1800,pagination:v(m),checkedRowKeys:v(S),"onUpdate:checkedRowKeys":f[3]||(f[3]=M=>ut(S)?S.value=M:null),rowKey:M=>M.id,"onUpdate:sorter":_,size:"small",class:"flex-1",flexHeight:"",loading:v(r)},null,8,["data","columns","pagination","checkedRowKeys","rowKey","loading"])]),b(wt,{show:v(w),"onUpdate:show":f[5]||(f[5]=M=>ut(w)?w.value=M:null),preset:"dialog",title:"导入网络文件",showIcon:!1,positiveText:"确认",negativeText:"取消",style:{width:"800px"},onPositiveClick:v(T).invoke,loading:v(T).loading,onAfterLeave:f[6]||(f[6]=M=>g.value="")},{default:E(()=>[b(J,{value:v(g),"onUpdate:value":f[4]||(f[4]=M=>{v(T).loading||(g.value=M)}),type:"textarea",placeholder:`1.支持ZIP文件链接
115
115
  2.支持快照链接
116
116
  每行一个
117
117
  空白行自动忽略
118
- 非法链接行自动忽略`,autosize:{minRows:8,maxRows:16},inputProps:{style:"white-space: nowrap;"}},null,8,["value"])]),_:1},8,["show","onPositiveClick","loading"]),b(ho,{show:v(P),"onUpdate:show":f[7]||(f[7]=A=>ut(P)?P.value=A:null)},null,8,["show"]),b(wt,{show:v(X),"onUpdate:show":f[11]||(f[11]=A=>ut(X)?X.value=A:null),preset:"dialog",title:"设置",showIcon:!1,positiveText:"关闭",style:{width:"600px"},onPositiveClick:f[12]||(f[12]=A=>X.value=!1)},{default:E(()=>[b(mt,{checked:v(nt).ignoreUploadWarn,"onUpdate:checked":f[8]||(f[8]=A=>v(nt).ignoreUploadWarn=A)},{default:E(()=>[H(" 关闭生成分享链接弹窗提醒 ")]),_:1},8,["checked"]),So,b(mt,{checked:v(nt).ignoreWasmWarn,"onUpdate:checked":f[9]||(f[9]=A=>v(nt).ignoreWasmWarn=A)},{default:E(()=>[H(" 关闭浏览器版本正则表达式 WASM(GC) 提醒 ")]),_:1},8,["checked"]),To,M("div",No,[b(st,{value:v(nt).autoUploadImport,"onUpdate:value":f[10]||(f[10]=A=>v(nt).autoUploadImport=A)},null,8,["value"]),xo])]),_:1},8,["show"])],64)}}});export{Fo as default};
119
- //# sourceMappingURL=HomePage-DZKgaZTl.js.map
118
+ 非法链接行自动忽略`,autosize:{minRows:8,maxRows:16},inputProps:{style:"white-space: nowrap;"}},null,8,["value"])]),_:1},8,["show","onPositiveClick","loading"]),b(uo,{show:v(x),"onUpdate:show":f[7]||(f[7]=M=>ut(x)?x.value=M:null)},null,8,["show"]),b(wt,{show:v(X),"onUpdate:show":f[11]||(f[11]=M=>ut(X)?X.value=M:null),preset:"dialog",title:"设置",showIcon:!1,positiveText:"关闭",style:{width:"600px"},onPositiveClick:f[12]||(f[12]=M=>X.value=!1)},{default:E(()=>[b(mt,{checked:v(nt).ignoreUploadWarn,"onUpdate:checked":f[8]||(f[8]=M=>v(nt).ignoreUploadWarn=M)},{default:E(()=>[H(" 关闭生成分享链接弹窗提醒 ")]),_:1},8,["checked"]),ko,b(mt,{checked:v(nt).ignoreWasmWarn,"onUpdate:checked":f[9]||(f[9]=M=>v(nt).ignoreWasmWarn=M)},{default:E(()=>[H(" 关闭浏览器版本正则表达式 WASM(GC) 提醒 ")]),_:1},8,["checked"]),Eo,R("div",So,[b(st,{value:v(nt).autoUploadImport,"onUpdate:value":f[10]||(f[10]=M=>v(nt).autoUploadImport=M)},null,8,["value"]),To])]),_:1},8,["show"])],64)}}});export{Uo as default};
119
+ //# sourceMappingURL=HomePage-BeCxcFEe.js.map