Files
tvbox_collect/ediart/buye/vod/player/assets/settings-CSDjStrb.js
T
2026-06-29 03:41:14 +00:00

2 lines
29 KiB
JavaScript

function t(){this.buffer=[],this.length=0}function e(t){if(!t||1>t)throw 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)}function n(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}function r(t){this.mode=Zt.NUMERIC,this.data=""+t}function o(t){this.mode=Xt.ALPHANUMERIC,this.data=t}function a(t){this.mode=ne.BYTE,this.data="string"==typeof t?(new TextEncoder).encode(t):new Uint8Array(t)}function i(t){this.mode=oe.KANJI,this.data=t}function s(t,e,n){const r=t.size,o=we.getEncodedBits(e,n);let a,i;for(a=0;15>a;a++)i=1==(o>>a&1),t.set(6>a?a:8>a?a+1:r-15+a,8,i,!0),t.set(8,8>a?r-a-1:9>a?15-a-1+1:15-a-1,i,!0);t.set(r-8,8,1,!0)}function l(t,e){const n=t.a/255,r=e+'="'+t.hex+'"';return 1>n?r+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function u(t,e,n){let r=t+e;return void 0!==n&&(r+=" "+n),r}function c(t,e,n,r,o){const a=[].slice.call(arguments,1),i=a.length,s="function"==typeof a[i-1];if(!s&&!Te())throw Error("Callback required as last argument");if(!s){if(1>i)throw Error("Too few arguments provided");return 1===i?(n=e,e=r=void 0):2!==i||e.getContext||(r=n,n=e,e=void 0),new Promise(function(o,a){try{const a=Me.create(n,r);o(t(a,e,r))}catch(i){a(i)}})}if(2>i)throw Error("Too few arguments provided");2===i?(o=n,n=e,e=r=void 0):3===i&&(e.getContext&&void 0===o?(o=r,r=void 0):(o=r,r=n,n=e,e=void 0));try{const a=Me.create(n,r);o(null,t(a,e,r))}catch(l){o(l)}}import{p as d,v as f,j as h,ah as g,z as p,l as m,aI as v,a0 as y,a8 as w,aJ as E,q as C,a6 as b,a5 as A,d as B,aK as I,M as T,C as M,D as N,m as x,a2 as P,aL as S,G as R,H as L,I as k,aM as U,ae as _,a3 as z,L as V,a4 as F,u as D,_ as J,k as j,o as H,$ as K,f as Y,b as O,w as q,c as $,e as Q,h as G,O as Z,g as W,af as X}from"./index-C3ajj0iU.js";import{c as tt}from"./VAvatar-CsOZoIOv.js";import{u as et,m as nt,V as rt}from"./loader-_1sodkhb.js";import{a as ot,m as at}from"./elevation-C2i0gTrO.js";import{V as it}from"./VIcon-DO7afe9J.js";import{V as st,a as lt}from"./VBtn-JKfmtoJ-.js";import{b as ut,V as ct,a as dt}from"./VCard-DTBu3HW2.js";import{V as ft}from"./VTextarea-1w5hTKuV.js";import{V as ht}from"./VSpacer-DSkmVMFK.js";import"./autofocus-CGxummZr.js";import"./index-D7kFa585.js";/* empty css */var gt={},pt={},mt={};let vt;const yt=[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];mt.getSymbolSize=function(t){if(!t)throw Error('"version" cannot be null or undefined');if(1>t||t>40)throw Error('"version" should be in range from 1 to 40');return 4*t+17},mt.getSymbolTotalCodewords=function(t){return yt[t]},mt.getBCHDigit=function(t){let e=0;for(;0!==t;)e++,t>>>=1;return e},mt.setToSJISFunction=function(t){if("function"!=typeof t)throw Error('"toSJISFunc" is not a valid function.');vt=t},mt.isKanjiModeEnabled=function(){return void 0!==vt},mt.toSJIS=function(t){return vt(t)};var wt,Et={};(wt=Et).L={bit:1},wt.M={bit:0},wt.Q={bit:3},wt.H={bit:2},wt.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&4>t.bit},wt.from=function(t,e){if(wt.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return wt.L;case"m":case"medium":return wt.M;case"q":case"quartile":return wt.Q;case"h":case"high":return wt.H;default:throw Error("Unknown EC Level: "+t)}}(t)}catch(n){return e}},t.prototype={get:function(t){return 1==(this.buffer[Math.floor(t/8)]>>>7-t%8&1)},put:function(t,e){for(let n=0;e>n;n++)this.putBit(1==(t>>>e-n-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 Ct=t;e.prototype.set=function(t,e,n,r){const o=t*this.size+e;this.data[o]=n,r&&(this.reservedBit[o]=!0)},e.prototype.get=function(t,e){return this.data[t*this.size+e]},e.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n},e.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var bt=e,At={};!function(t){const e=mt.getSymbolSize;t.getRowColCoords=function(t){if(1===t)return[];const n=Math.floor(t/7)+2,r=e(t),o=145===r?26:2*Math.ceil((r-13)/(2*n-2)),a=[r-7];for(let e=1;n-1>e;e++)a[e]=a[e-1]-o;return a.push(6),a.reverse()},t.getPositions=function(e){const n=[],r=t.getRowColCoords(e),o=r.length;for(let t=0;o>t;t++)for(let e=0;o>e;e++)0===t&&0===e||0===t&&e===o-1||t===o-1&&0===e||n.push([r[t],r[e]]);return n}}(At);var Bt={};const It=mt.getSymbolSize;Bt.getPositions=function(t){const e=It(t);return[[0,0],[e-7,0],[0,e-7]]};var Tt={};!function(t){function e(e,n,r){switch(e){case t.Patterns.PATTERN000:return(n+r)%2==0;case t.Patterns.PATTERN001:return n%2==0;case t.Patterns.PATTERN010:return r%3==0;case t.Patterns.PATTERN011:return(n+r)%3==0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case t.Patterns.PATTERN101:return n*r%2+n*r%3==0;case t.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case t.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw Error("bad maskPattern:"+e)}}t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},t.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&7>=t},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(t){const e=t.size;let n=0,r=0,o=0,a=null,i=null;for(let s=0;e>s;s++){r=o=0,a=i=null;for(let l=0;e>l;l++){let e=t.get(s,l);e===a?r++:(5>r||(n+=r-5+3),a=e,r=1),e=t.get(l,s),e===i?o++:(5>o||(n+=o-5+3),i=e,o=1)}5>r||(n+=r-5+3),5>o||(n+=o-5+3)}return n},t.getPenaltyN2=function(t){const e=t.size;let n=0;for(let r=0;e-1>r;r++)for(let o=0;e-1>o;o++){const e=t.get(r,o)+t.get(r,o+1)+t.get(r+1,o)+t.get(r+1,o+1);4!==e&&0!==e||n++}return 3*n},t.getPenaltyN3=function(t){const e=t.size;let n=0,r=0,o=0;for(let a=0;e>a;a++){r=o=0;for(let i=0;e>i;i++)r=r<<1&2047|t.get(a,i),10>i||1488!==r&&93!==r||n++,o=o<<1&2047|t.get(i,a),10>i||1488!==o&&93!==o||n++}return 40*n},t.getPenaltyN4=function(t){let e=0;const n=t.data.length;for(let r=0;n>r;r++)e+=t.data[r];return 10*Math.abs(Math.ceil(100*e/n/5)-10)},t.applyMask=function(t,n){const r=n.size;for(let o=0;r>o;o++)for(let a=0;r>a;a++)n.isReserved(a,o)||n.xor(a,o,e(t,a,o))},t.getBestMask=function(e,n){const r=Object.keys(t.Patterns).length;let o=0,a=1/0;for(let i=0;r>i;i++){n(i),t.applyMask(i,e);const r=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(i,e),a>r&&(a=r,o=i)}return o}}(Tt);var Mt={};const Nt=Et,xt=[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],Pt=[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];Mt.getBlocksCount=function(t,e){switch(e){case Nt.L:return xt[4*(t-1)+0];case Nt.M:return xt[4*(t-1)+1];case Nt.Q:return xt[4*(t-1)+2];case Nt.H:return xt[4*(t-1)+3];default:return}},Mt.getTotalCodewordsCount=function(t,e){switch(e){case Nt.L:return Pt[4*(t-1)+0];case Nt.M:return Pt[4*(t-1)+1];case Nt.Q:return Pt[4*(t-1)+2];case Nt.H:return Pt[4*(t-1)+3];default:return}};var St={},Rt={};const Lt=new Uint8Array(512),kt=new Uint8Array(256);!function(){let t=1;for(let e=0;255>e;e++)Lt[e]=t,kt[t]=e,t<<=1,256&t&&(t^=285);for(let e=255;512>e;e++)Lt[e]=Lt[e-255]}(),Rt.log=function(t){if(1>t)throw Error("log("+t+")");return kt[t]},Rt.exp=function(t){return Lt[t]},Rt.mul=function(t,e){return 0===t||0===e?0:Lt[kt[t]+kt[e]]},function(t){const e=Rt;t.mul=function(t,n){const r=new Uint8Array(t.length+n.length-1);for(let o=0;t.length>o;o++)for(let a=0;n.length>a;a++)r[o+a]^=e.mul(t[o],n[a]);return r},t.mod=function(t,n){let r=new Uint8Array(t);for(;r.length-n.length>=0;){const t=r[0];for(let a=0;n.length>a;a++)r[a]^=e.mul(n[a],t);let o=0;for(;r.length>o&&0===r[o];)o++;r=r.slice(o)}return r},t.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let o=0;n>o;o++)r=t.mul(r,new Uint8Array([1,e.exp(o)]));return r}}(St);const Ut=St;n.prototype.initialize=function(t){this.degree=t,this.genPoly=Ut.generateECPolynomial(this.degree)},n.prototype.encode=function(t){if(!this.genPoly)throw Error("Encoder not initialized");const e=new Uint8Array(t.length+this.degree);e.set(t);const n=Ut.mod(e,this.genPoly),r=this.degree-n.length;if(r>0){const t=new Uint8Array(this.degree);return t.set(n,r),t}return n};var _t=n,zt={},Vt={},Ft={isValid:function(t){return!isNaN(t)&&t>=1&&40>=t}},Dt={};const Jt="[0-9]+";let jt="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";jt=jt.replace(/u/g,"\\u");const Ht="(?:(?![A-Z0-9 $%*+\\-./:]|"+jt+")(?:.|[\r\n]))+";Dt.KANJI=RegExp(jt,"g"),Dt.BYTE_KANJI=RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Dt.BYTE=RegExp(Ht,"g"),Dt.NUMERIC=RegExp(Jt,"g"),Dt.ALPHANUMERIC=RegExp("[A-Z $%*+\\-./:]+","g");const Kt=RegExp("^"+jt+"$"),Yt=RegExp("^"+Jt+"$"),Ot=RegExp("^[A-Z0-9 $%*+\\-./:]+$");Dt.testKanji=function(t){return Kt.test(t)},Dt.testNumeric=function(t){return Yt.test(t)},Dt.testAlphanumeric=function(t){return Ot.test(t)},function(t){const e=Ft,n=Dt;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(t,n){if(!t.ccBits)throw Error("Invalid mode: "+t);if(!e.isValid(n))throw Error("Invalid version: "+n);return n>=1&&10>n?t.ccBits[0]:27>n?t.ccBits[1]:t.ccBits[2]},t.getBestModeForData=function(e){return n.testNumeric(e)?t.NUMERIC:n.testAlphanumeric(e)?t.ALPHANUMERIC:n.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(t){if(t&&t.id)return t.id;throw Error("Invalid mode")},t.isValid=function(t){return t&&t.bit&&t.ccBits},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw Error("Unknown mode: "+e)}}(e)}catch(r){return n}}}(Vt),function(t){function e(t,e){return i.getCharCountIndicator(t,e)+4}function n(t,n){let r=0;return t.forEach(function(t){const o=e(t.mode,n);r+=o+t.getBitsLength()}),r}const r=mt,o=Mt,a=Et,i=Vt,s=Ft,l=r.getBCHDigit(7973);t.from=function(t,e){return s.isValid(t)?parseInt(t,10):e},t.getCapacity=function(t,n,a){if(!s.isValid(t))throw Error("Invalid QR Code version");void 0===a&&(a=i.BYTE);const l=8*(r.getSymbolTotalCodewords(t)-o.getTotalCodewordsCount(t,n));if(a===i.MIXED)return l;const u=l-e(a,t);switch(a){case i.NUMERIC:return Math.floor(u/10*3);case i.ALPHANUMERIC:return Math.floor(u/11*2);case i.KANJI:return Math.floor(u/13);default:return Math.floor(u/8)}},t.getBestVersionForData=function(e,r){let o;const s=a.from(r,a.M);if(Array.isArray(e)){if(e.length>1)return function(e,r){for(let o=1;40>=o;o++)if(n(e,o)<=t.getCapacity(o,r,i.MIXED))return o}(e,s);if(0===e.length)return 1;o=e[0]}else o=e;return function(e,n,r){for(let o=1;40>=o;o++)if(n<=t.getCapacity(o,r,e))return o}(o.mode,o.getLength(),s)},t.getEncodedBits=function(t){if(!s.isValid(t)||7>t)throw Error("Invalid QR Code version");let e=t<<12;for(;r.getBCHDigit(e)-l>=0;)e^=7973<<r.getBCHDigit(e)-l;return t<<12|e}}(zt);var qt={};const $t=mt,Qt=$t.getBCHDigit(1335);qt.getEncodedBits=function(t,e){const n=t.bit<<3|e;let r=n<<10;for(;$t.getBCHDigit(r)-Qt>=0;)r^=1335<<$t.getBCHDigit(r)-Qt;return 21522^(n<<10|r)};var Gt={};const Zt=Vt;r.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(t){let e,n,r;for(e=0;this.data.length>=e+3;e+=3)n=this.data.substr(e,3),r=parseInt(n,10),t.put(r,10);const o=this.data.length-e;o>0&&(n=this.data.substr(e),r=parseInt(n,10),t.put(r,3*o+1))};var Wt=r;const Xt=Vt,te=["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"," ","$","%","*","+","-",".","/",":"];o.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){let e;for(e=0;this.data.length>=e+2;e+=2){let n=45*te.indexOf(this.data[e]);n+=te.indexOf(this.data[e+1]),t.put(n,11)}this.data.length%2&&t.put(te.indexOf(this.data[e]),6)};var ee=o;const ne=Vt;a.getBitsLength=function(t){return 8*t},a.prototype.getLength=function(){return this.data.length},a.prototype.getBitsLength=function(){return a.getBitsLength(this.data.length)},a.prototype.write=function(t){for(let e=0,n=this.data.length;n>e;e++)t.put(this.data[e],8)};var re=a;const oe=Vt,ae=mt;i.getBitsLength=function(t){return 13*t},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){let e;for(e=0;this.data.length>e;e++){let n=ae.toSJIS(this.data[e]);if(33088>n||n>40956){if(57408>n||n>60351)throw Error("Invalid SJIS character: "+this.data[e]+"\nMake sure your charset is UTF-8");n-=49472}else n-=33088;n=192*(n>>>8&255)+(255&n),t.put(n,13)}};var ie,se=i,le={exports:{}}.exports=ie={single_source_shortest_paths:function(t,e,n){var r={},o={};o[e]=0;var a,i,s,l,u,c,d=ie.PriorityQueue.make();for(d.push(e,0);!d.empty();)for(s in l=(a=d.pop()).cost,u=t[i=a.value]||{})u.hasOwnProperty(s)&&(c=l+u[s],(void 0===o[s]||o[s]>c)&&(o[s]=c,d.push(s,c),r[s]=i));if(void 0!==n&&void 0===o[n])throw Error("Could not find a path from "+e+" to "+n+".");return r},extract_shortest_path_from_predecessor_list:function(t,e){for(var n=[],r=e;r;)n.push(r),r=t[r];return n.reverse(),n},find_path:function(t,e,n){var r=ie.single_source_shortest_paths(t,e,n);return ie.extract_shortest_path_from_predecessor_list(r,n)},PriorityQueue:{make:function(t){var e,n=ie.PriorityQueue,r={};for(e in t=t||{},n)n.hasOwnProperty(e)&&(r[e]=n[e]);return r.queue=[],r.sorter=t.sorter||n.default_sorter,r},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){this.queue.push({value:t,cost:e}),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};!function(t){function e(t){return unescape(encodeURIComponent(t)).length}function n(t,e,n){const r=[];let o;for(;null!==(o=t.exec(n));)r.push({data:o[0],index:o.index,mode:e,length:o[0].length});return r}function r(t){const e=n(d.NUMERIC,i.NUMERIC,t),r=n(d.ALPHANUMERIC,i.ALPHANUMERIC,t);let o,a;return f.isKanjiModeEnabled()?(o=n(d.BYTE,i.BYTE,t),a=n(d.KANJI,i.KANJI,t)):(o=n(d.BYTE_KANJI,i.BYTE,t),a=[]),e.concat(r,o,a).sort(function(t,e){return t.index-e.index}).map(function(t){return{data:t.data,mode:t.mode,length:t.length}})}function o(t,e){switch(e){case i.NUMERIC:return s.getBitsLength(t);case i.ALPHANUMERIC:return l.getBitsLength(t);case i.KANJI:return c.getBitsLength(t);case i.BYTE:return u.getBitsLength(t)}}function a(t,e){let n;const r=i.getBestModeForData(t);if(n=i.from(e,r),n!==i.BYTE&&r.bit>n.bit)throw Error('"'+t+'" cannot be encoded with mode '+i.toString(n)+".\n Suggested mode is: "+i.toString(r));switch(n!==i.KANJI||f.isKanjiModeEnabled()||(n=i.BYTE),n){case i.NUMERIC:return new s(t);case i.ALPHANUMERIC:return new l(t);case i.KANJI:return new c(t);case i.BYTE:return new u(t)}}const i=Vt,s=Wt,l=ee,u=re,c=se,d=Dt,f=mt,h=le;t.fromArray=function(t){return t.reduce(function(t,e){return"string"==typeof e?t.push(a(e,null)):e.data&&t.push(a(e.data,e.mode)),t},[])},t.fromString=function(n,a){const s=function(t,e){const n={},r={start:{}};let a=["start"];for(let s=0;t.length>s;s++){const l=t[s],u=[];for(let t=0;l.length>t;t++){const c=l[t],d=""+s+t;u.push(d),n[d]={node:c,lastCount:0},r[d]={};for(let t=0;a.length>t;t++){const s=a[t];n[s]&&n[s].node.mode===c.mode?(r[s][d]=o(n[s].lastCount+c.length,c.mode)-o(n[s].lastCount,c.mode),n[s].lastCount+=c.length):(n[s]&&(n[s].lastCount=c.length),r[s][d]=o(c.length,c.mode)+4+i.getCharCountIndicator(c.mode,e))}}a=u}for(let o=0;a.length>o;o++)r[a[o]].end=0;return{map:r,table:n}}(function(t){const n=[];for(let r=0;t.length>r;r++){const o=t[r];switch(o.mode){case i.NUMERIC:n.push([o,{data:o.data,mode:i.ALPHANUMERIC,length:o.length},{data:o.data,mode:i.BYTE,length:o.length}]);break;case i.ALPHANUMERIC:n.push([o,{data:o.data,mode:i.BYTE,length:o.length}]);break;case i.KANJI:n.push([o,{data:o.data,mode:i.BYTE,length:e(o.data)}]);break;case i.BYTE:n.push([{data:o.data,mode:i.BYTE,length:e(o.data)}])}}return n}(r(n,f.isKanjiModeEnabled())),a),l=h.find_path(s.map,"start","end"),u=[];for(let t=1;l.length-1>t;t++)u.push(s.table[l[t]].node);return t.fromArray(u.reduce(function(t,e){const n=0>t.length-1?null:t[t.length-1];return n&&n.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)},[]))},t.rawSplit=function(e){return t.fromArray(r(e,f.isKanjiModeEnabled()))}}(Gt);const ue=mt,ce=Et,de=Ct,fe=bt,he=At,ge=Bt,pe=Tt,me=Mt,ve=_t,ye=zt,we=qt,Ee=Vt,Ce=Gt;pt.create=function(t,e){if(void 0===t||""===t)throw Error("No input text");let n,r,o=ce.M;return void 0!==e&&(o=ce.from(e.errorCorrectionLevel,ce.M),n=ye.from(e.version),r=pe.from(e.maskPattern),e.toSJISFunc&&ue.setToSJISFunction(e.toSJISFunc)),function(t,e,n,r){let o;if(Array.isArray(t))o=Ce.fromArray(t);else{if("string"!=typeof t)throw Error("Invalid data");{let r=e;if(!r){const e=Ce.rawSplit(t);r=ye.getBestVersionForData(e,n)}o=Ce.fromString(t,r||40)}}const a=ye.getBestVersionForData(o,n);if(!a)throw Error("The amount of data is too big to be stored in a QR Code");if(e){if(a>e)throw Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+a+".\n")}else e=a;const i=function(t,e,n){const r=new de;n.forEach(function(e){r.put(e.mode.bit,4),r.put(e.getLength(),Ee.getCharCountIndicator(e.mode,t)),e.write(r)});const o=8*(ue.getSymbolTotalCodewords(t)-me.getTotalCodewordsCount(t,e));for(r.getLengthInBits()+4>o||r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(0);const a=(o-r.getLengthInBits())/8;for(let i=0;a>i;i++)r.put(i%2?17:236,8);return function(t,e,n){const r=ue.getSymbolTotalCodewords(e),o=r-me.getTotalCodewordsCount(e,n),a=me.getBlocksCount(e,n),i=a-r%a,s=Math.floor(r/a),l=Math.floor(o/a),u=l+1,c=s-l,d=new ve(c);let f=0;const h=Array(a),g=Array(a);let p=0;const m=new Uint8Array(t.buffer);for(let C=0;a>C;C++){const t=i>C?l:u;h[C]=m.slice(f,f+t),g[C]=d.encode(h[C]),f+=t,p=Math.max(p,t)}const v=new Uint8Array(r);let y,w,E=0;for(y=0;p>y;y++)for(w=0;a>w;w++)h[w].length>y&&(v[E++]=h[w][y]);for(y=0;c>y;y++)for(w=0;a>w;w++)v[E++]=g[w][y];return v}(r,t,e)}(e,n,o),l=ue.getSymbolSize(e),u=new fe(l);return function(t,e){const n=t.size,r=ge.getPositions(e);for(let o=0;r.length>o;o++){const e=r[o][0],a=r[o][1];for(let r=-1;7>=r;r++)if(e+r>-1&&n>e+r)for(let o=-1;7>=o;o++)a+o>-1&&n>a+o&&t.set(e+r,a+o,!((0>r||r>6||0!==o&&6!==o)&&(0>o||o>6||0!==r&&6!==r)&&(2>r||r>4||2>o||o>4)),!0)}}(u,e),function(t){const e=t.size;for(let n=8;e-8>n;n++){const e=n%2==0;t.set(n,6,e,!0),t.set(6,n,e,!0)}}(u),function(t,e){const n=he.getPositions(e);for(let r=0;n.length>r;r++){const e=n[r][0],o=n[r][1];for(let n=-2;2>=n;n++)for(let r=-2;2>=r;r++)t.set(e+n,o+r,-2===n||2===n||-2===r||2===r||0===n&&0===r,!0)}}(u,e),s(u,n,0),7>e||function(t,e){const n=t.size,r=ye.getEncodedBits(e);let o,a,i;for(let s=0;18>s;s++)o=Math.floor(s/3),a=s%3+n-8-3,i=1==(r>>s&1),t.set(o,a,i,!0),t.set(a,o,i,!0)}(u,e),function(t,e){const n=t.size;let r=-1,o=n-1,a=7,i=0;for(let s=n-1;s>0;s-=2)for(6===s&&s--;;){for(let n=0;2>n;n++)if(!t.isReserved(o,s-n)){let r=!1;e.length>i&&(r=1==(e[i]>>>a&1)),t.set(o,s-n,r),a--,-1===a&&(i++,a=7)}if(o+=r,0>o||o>=n){o-=r,r=-r;break}}}(u,i),isNaN(r)&&(r=pe.getBestMask(u,s.bind(null,u,n))),pe.applyMask(r,u),s(u,n,r),{modules:u,version:e,errorCorrectionLevel:n,maskPattern:r,segments:o}}(t,n,o,r)};var be={},Ae={};!function(t){function e(t){if("number"==typeof t&&(t=""+t),"string"!=typeof t)throw Error("Color should be defined as hex string");let e=t.slice().replace("#","").split("");if(3>e.length||5===e.length||e.length>8)throw Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=[].concat.apply([],e.map(function(t){return[t,t]}))),6===e.length&&e.push("F","F");const n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+e.slice(0,6).join("")}}t.getOptions=function(t){t||(t={}),t.color||(t.color={});const n=t.width&&t.width>=21?t.width:void 0;return{width:n,scale:n?4:t.scale||4,margin:null==t.margin||0>t.margin?4:t.margin,color:{dark:e(t.color.dark||"#000000ff"),light:e(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},t.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},t.getImageWidth=function(e,n){const r=t.getScale(e,n);return Math.floor((e+2*n.margin)*r)},t.qrToImageData=function(e,n,r){const o=n.modules.size,a=n.modules.data,i=t.getScale(o,r),s=Math.floor((o+2*r.margin)*i),l=r.margin*i,u=[r.color.light,r.color.dark];for(let t=0;s>t;t++)for(let n=0;s>n;n++){let c=4*(t*s+n),d=r.color.light;t>=l&&n>=l&&s-l>t&&s-l>n&&(d=u[a[Math.floor((t-l)/i)*o+Math.floor((n-l)/i)]?1:0]),e[c++]=d.r,e[c++]=d.g,e[c++]=d.b,e[c]=d.a}}}(Ae),function(t){const e=Ae;t.render=function(t,n,r){let o=r,a=n;void 0!==o||n&&n.getContext||(o=n,n=void 0),n||(a=function(){try{return document.createElement("canvas")}catch(t){throw Error("You need to specify a canvas element")}}()),o=e.getOptions(o);const i=e.getImageWidth(t.modules.size,o),s=a.getContext("2d"),l=s.createImageData(i,i);return e.qrToImageData(l.data,t,o),function(t,e,n){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=n,e.width=n,e.style.height=n+"px",e.style.width=n+"px"}(s,a,i),s.putImageData(l,0,0),a},t.renderToDataURL=function(e,n,r){let o=r;return void 0!==o||n&&n.getContext||(o=n,n=void 0),o||(o={}),t.render(e,n,o).toDataURL(o.type||"image/png",(o.rendererOpts||{}).quality)}}(be);var Be={};const Ie=Ae;Be.render=function(t,e,n){const r=Ie.getOptions(e),o=t.modules.size,a=t.modules.data,i=o+2*r.margin,s=r.color.light.a?"<path "+l(r.color.light,"fill")+' d="M0 0h'+i+"v"+i+'H0z"/>':"",c="<path "+l(r.color.dark,"stroke")+' d="'+function(t,e,n){let r="",o=0,a=!1,i=0;for(let s=0;t.length>s;s++){const l=Math.floor(s%e);l||a||(a=!0),t[s]?(i++,s>0&&l>0&&t[s-1]||(r+=a?u("M",l+n,.5+Math.floor(s/e)+n):u("m",o,0),o=0,a=!1),e>l+1&&t[s+1]||(r+=u("h",i),i=0)):o++}return r}(a,o,r.margin)+'"/>',d='<svg xmlns="http://www.w3.org/2000/svg" '+(r.width?'width="'+r.width+'" height="'+r.width+'" ':"")+'viewBox="0 0 '+i+" "+i+'" shape-rendering="crispEdges">'+s+c+"</svg>\n";return"function"==typeof n&&n(null,d),d};const Te=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then},Me=pt,Ne=be,xe=Be;gt.create=Me.create,gt.toCanvas=c.bind(null,Ne.render),gt.toDataURL=c.bind(null,Ne.renderToDataURL),gt.toString=c.bind(null,function(t,e,n){return xe.render(t,n)});const Pe=tt("v-alert-title"),Se=d({iconSize:[Number,String],iconSizes:{type:Array,default:()=>[["x-small",10],["small",16],["default",24],["large",28],["x-large",32]]}},"iconSize"),Re=["success","info","warning","error"],Le=d({border:{type:[Boolean,String],validator:t=>"boolean"==typeof t||["top","end","bottom","start"].includes(t)},borderColor:String,closable:Boolean,closeIcon:{type:F,default:"$close"},closeLabel:{type:String,default:"$vuetify.close"},icon:{type:[Boolean,String,Function,Object],default:null},modelValue:{type:Boolean,default:!0},prominent:Boolean,title:String,text:String,type:{type:String,validator:t=>Re.includes(t)},...V(),...nt(),...z(),...at(),...Se(),..._(),...U(),...k(),...L(),...R(),...S({variant:"flat"})},"VAlert"),ke=h()({name:"VAlert",props:Le(),emits:{"click:close":t=>!0,"update:modelValue":t=>!0},setup(t,e){let{emit:n,slots:r}=e;const o=g(t,"modelValue"),a=p(()=>{if(!1!==t.icon)return t.type?t.icon??"$"+t.type:t.icon}),{iconSize:i}=function(t,e){return{iconSize:f(()=>{const n=new Map(t.iconSizes),r=t.iconSize??e()??"default";return n.has(r)?n.get(r):r})}}(t,()=>t.prominent?44:void 0),{themeClasses:s}=m(t),{colorClasses:l,colorStyles:u,variantClasses:c}=v(()=>({color:t.color??t.type,variant:t.variant})),{densityClasses:d}=et(t),{dimensionStyles:h}=y(t),{elevationClasses:S}=ot(t),{locationStyles:R}=w(t),{positionClasses:L}=E(t),{roundedClasses:k}=C(t),{textColorClasses:U,textColorStyles:_}=b(()=>t.borderColor),{t:z}=A(),V=p(()=>({"aria-label":z(t.closeLabel),onClick(t){o.value=!1,n("click:close",t)}}));return()=>{const e=!(!r.prepend&&!a.value),n=!(!r.title&&!t.title),f=!(!r.close&&!t.closable),g={density:t.density,icon:a.value,size:t.iconSize||t.prominent?i.value:void 0};return o.value&&B(t.tag,{class:N(["v-alert",t.border&&{"v-alert--border":!!t.border,["v-alert--border-"+(!0===t.border?"start":t.border)]:!0},{"v-alert--prominent":t.prominent},s.value,l.value,d.value,S.value,L.value,k.value,c.value,t.class]),style:M([u.value,h.value,R.value,t.style]),role:"alert"},{default:()=>{var o,i;return[I(!1,"v-alert"),t.border&&T("div",{key:"border",class:N(["v-alert__border",U.value]),style:M(_.value)},null),e&&T("div",{key:"prepend",class:"v-alert__prepend"},[r.prepend?B(P,{key:"prepend-defaults",disabled:!a.value,defaults:{VIcon:{...g}}},r.prepend):B(it,x({key:"prepend-icon"},g),null)]),T("div",{class:"v-alert__content"},[n&&B(Pe,{key:"title"},{default:()=>{var e;return[(null==(e=r.title)?void 0:e.call(r))??t.title]}}),(null==(o=r.text)?void 0:o.call(r))??t.text,null==(i=r.default)?void 0:i.call(r)]),r.append&&T("div",{key:"append",class:"v-alert__append"},[r.append()]),f&&T("div",{key:"close",class:"v-alert__close"},[r.close?B(P,{key:"close-defaults",defaults:{VBtn:{icon:t.closeIcon,size:"x-small",variant:"text"}}},{default:()=>{var t;return[null==(t=r.close)?void 0:t.call(r,{props:V.value})]}}):B(st,x({key:"close-btn",icon:t.closeIcon,size:"x-small",variant:"text"},V.value),null)])]}})}}}),Ue={class:"py-4"},_e={class:"text-center"},ze={key:0,class:"bg-indigo-lighten-4 ma-5 pa-4"},Ve={__name:"SettingTG",setup(t){const e=D(),n=J("axios"),r=j(!1),o=j();let a;const i=j(""),s=j("");let l,u;const c=async()=>{const t=await n.get("/telegram/check"),r=new URL(location.origin);r.pathname="/telegram/check",r.searchParams.append("token",t),a=new WebSocket(""+r),a.onopen=()=>{},a.onmessage=async t=>{const n=JSON.parse(t.data);if(n.message)return e.error(n.message);switch(n.cmd){case 0:{let t=n.ex;l=setTimeout(()=>i.value=void 0,1e3*t),u=setInterval(()=>{if(1>t)return clearInterval(u),void(s.value="二维码已失效");s.value=`二维码有效期剩余:${t}秒`,t--},1e3);try{i.value=await gt.toDataURL(n.qrCode)}catch(r){return void(s.value="创建二维码失败!")}}break;case 1:s.value="已经扫码,登录确认中...",a.send(JSON.stringify({cmd:3})),u&&clearInterval(u),l&&clearTimeout(l);break;default:o.value=n}},a.onerror=t=>{},a.onclose=t=>{}};return H(async()=>{try{r.value=!0,o.value=await n.get("/telegram/me",{showErr:!1})}catch{}finally{r.value=!1}}),K(()=>{a&&a.close(),l&&clearTimeout(l),u&&clearInterval(u)}),(t,e)=>(O(),Y("div",Ue,[e[1]||(e[1]=T("h1",{class:"text-h6 font-weight-bold text-center"},"TG账号",-1)),B(ct,{class:"mx-auto py-4",width:"100%",loading:G(r)},{default:q(()=>[G(o)?(O(),$(ke,{key:0,title:"当前登录账号",text:`${G(o).firstName}${G(o).phone}】`},null,8,["text"])):(O(),$(rt,{key:1,class:"mx-auto"},{default:q(()=>[T("div",_e,[B(lt,{"aspect-ratio":1,class:"bg-white mx-auto",src:G(i),width:"300",cover:""},null,8,["src"]),G(s)?(O(),Y("div",ze,Z(G(s)),1)):Q("",!0)])]),_:1})),G(o)?Q("",!0):(O(),$(ut,{key:2},{default:q(()=>[B(st,{onClick:c},{default:q(()=>[...e[0]||(e[0]=[W("登录TG账号",-1)])]),_:1})]),_:1}))]),_:1},8,["loading"])]))}},Fe={class:"py-4"},De={__name:"Redirect",setup(t){const e=D(),n=J("axios"),r=j(!1),o=j({}),a=f({get:()=>JSON.stringify(o.value??{},null,2),set(t){o.value=JSON.parse(t)}}),i=async t=>{r.value=!0;try{await n.post("/redirect/",o.value),e.success("更新成功!")}finally{r.value=!1}};return H(async()=>{r.value=!0;try{o.value=await n.get("/redirect/")}catch{}finally{r.value=!1}}),(t,e)=>(O(),Y("div",Fe,[e[1]||(e[1]=T("h1",{class:"text-h6 font-weight-bold text-center"},"重定向地址",-1)),B(ct,{class:"mx-auto py-4",width:"100%",disabled:G(r),loading:G(r)},{default:q(()=>[B(dt,null,{default:q(()=>[B(ft,{modelValue:G(a),"onUpdate:modelValue":e[0]||(e[0]=t=>X(a)?a.value=t:null),"hide-details":""},null,8,["modelValue"])]),_:1}),B(ut,null,{default:q(()=>[B(ht),B(st,{type:"submit",color:"primary",text:"更新",variant:"tonal",onClick:i}),B(ht)]),_:1})]),_:1},8,["disabled","loading"])]))}},Je={__name:"settings",setup:t=>(t,e)=>{const n=De,r=Ve;return O(),$(rt,null,{default:q(()=>[B(n),B(r)]),_:1})}};export{Je as default};