import{c as pe,N as gn,_ as mt,O as en,a as xe,r as ft,o as tn,b as nn,d as re,e as z,k as O,g as B,j as V,t as J,u as F,A as ce,f as j,h as G,q,P as hn,l as we,F as Fe,i as wn,I as gt,s as ht,x as wt,Q as pn,K as mn,w as bn,v as vn,S as yn,T as kn,B as It}from"./index-oAtpp-VZ.js";import{_ as rn}from"./DialogComp-CyRyORDj.js";import{A as En}from"./AccordionComp-D0eDAM6d.js";/** * @license @tabler/icons-vue v3.31.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. */var Cn=pe("outline","device-desktop","IconDeviceDesktop",[["path",{d:"M3 5a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1v-10z",key:"svg-0"}],["path",{d:"M7 20h10",key:"svg-1"}],["path",{d:"M9 16v4",key:"svg-2"}],["path",{d:"M15 16v4",key:"svg-3"}]]);/** * @license @tabler/icons-vue v3.31.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. */var In=pe("outline","device-mobile","IconDeviceMobile",[["path",{d:"M6 5a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2v-14z",key:"svg-0"}],["path",{d:"M11 4h2",key:"svg-1"}],["path",{d:"M12 17v.01",key:"svg-2"}]]);/** * @license @tabler/icons-vue v3.31.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. */var Sn=pe("outline","device-tablet","IconDeviceTablet",[["path",{d:"M5 4a1 1 0 0 1 1 -1h12a1 1 0 0 1 1 1v16a1 1 0 0 1 -1 1h-12a1 1 0 0 1 -1 -1v-16z",key:"svg-0"}],["path",{d:"M11 17a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}]]);/** * @license @tabler/icons-vue v3.31.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. */var An=pe("outline","device-unknown","IconDeviceUnknown",[["path",{d:"M5 5a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M12 16v.01",key:"svg-1"}],["path",{d:"M12 13a2 2 0 0 0 .914 -3.782a1.98 1.98 0 0 0 -2.414 .483",key:"svg-2"}]]);/** * @license @tabler/icons-vue v3.31.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. */var Mn=pe("outline","link-off","IconLinkOff",[["path",{d:"M9 15l3 -3m2 -2l1 -1",key:"svg-0"}],["path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}],["path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463",key:"svg-3"}]]);/** * @license @tabler/icons-vue v3.31.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. */var Bn=pe("outline","plug-connected-x","IconPlugConnectedX",[["path",{d:"M20 16l-4 4",key:"svg-0"}],["path",{d:"M7 12l5 5l-1.5 1.5a3.536 3.536 0 1 1 -5 -5l1.5 -1.5z",key:"svg-1"}],["path",{d:"M17 12l-5 -5l1.5 -1.5a3.536 3.536 0 1 1 5 5l-1.5 1.5z",key:"svg-2"}],["path",{d:"M3 21l2.5 -2.5",key:"svg-3"}],["path",{d:"M18.5 5.5l2.5 -2.5",key:"svg-4"}],["path",{d:"M10 11l-2 2",key:"svg-5"}],["path",{d:"M13 14l-2 2",key:"svg-6"}],["path",{d:"M16 16l4 4",key:"svg-7"}]]);/** * @license @tabler/icons-vue v3.31.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. */var Re=pe("outline","reload","IconReload",[["path",{d:"M19.933 13.041a8 8 0 1 1 -9.925 -8.788c3.899 -1 7.935 1.007 9.425 4.747",key:"svg-0"}],["path",{d:"M20 4v5h-5",key:"svg-1"}]]),Ie={},Ve,St;function _n(){return St||(St=1,Ve=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Ve}var je={},le={},At;function me(){if(At)return le;At=1;let o;const r=[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];return le.getSymbolSize=function(n){if(!n)throw new Error('"version" cannot be null or undefined');if(n<1||n>40)throw new Error('"version" should be in range from 1 to 40');return n*4+17},le.getSymbolTotalCodewords=function(n){return r[n]},le.getBCHDigit=function(s){let n=0;for(;s!==0;)n++,s>>>=1;return n},le.setToSJISFunction=function(n){if(typeof n!="function")throw new Error('"toSJISFunc" is not a valid function.');o=n},le.isKanjiModeEnabled=function(){return typeof o<"u"},le.toSJIS=function(n){return o(n)},le}var He={},Mt;function bt(){return Mt||(Mt=1,function(o){o.L={bit:1},o.M={bit:0},o.Q={bit:3},o.H={bit:2};function r(s){if(typeof s!="string")throw new Error("Param is not a string");switch(s.toLowerCase()){case"l":case"low":return o.L;case"m":case"medium":return o.M;case"q":case"quartile":return o.Q;case"h":case"high":return o.H;default:throw new Error("Unknown EC Level: "+s)}}o.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},o.from=function(n,e){if(o.isValid(n))return n;try{return r(n)}catch{return e}}}(He)),He}var Ke,Bt;function Rn(){if(Bt)return Ke;Bt=1;function o(){this.buffer=[],this.length=0}return o.prototype={get:function(r){const s=Math.floor(r/8);return(this.buffer[s]>>>7-r%8&1)===1},put:function(r,s){for(let n=0;n>>s-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(r){const s=Math.floor(this.length/8);this.buffer.length<=s&&this.buffer.push(0),r&&(this.buffer[s]|=128>>>this.length%8),this.length++}},Ke=o,Ke}var $e,_t;function Tn(){if(_t)return $e;_t=1;function o(r){if(!r||r<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=r,this.data=new Uint8Array(r*r),this.reservedBit=new Uint8Array(r*r)}return o.prototype.set=function(r,s,n,e){const t=r*this.size+s;this.data[t]=n,e&&(this.reservedBit[t]=!0)},o.prototype.get=function(r,s){return this.data[r*this.size+s]},o.prototype.xor=function(r,s,n){this.data[r*this.size+s]^=n},o.prototype.isReserved=function(r,s){return this.reservedBit[r*this.size+s]},$e=o,$e}var Ge={},Rt;function Nn(){return Rt||(Rt=1,function(o){const r=me().getSymbolSize;o.getRowColCoords=function(n){if(n===1)return[];const e=Math.floor(n/7)+2,t=r(n),l=t===145?26:Math.ceil((t-13)/(2*e-2))*2,f=[t-7];for(let d=1;d=0&&e<=7},o.from=function(e){return o.isValid(e)?parseInt(e,10):void 0},o.getPenaltyN1=function(e){const t=e.size;let l=0,f=0,d=0,b=null,m=null;for(let g=0;g=5&&(l+=r.N1+(f-5)),b=u,f=1),u=e.get(i,g),u===m?d++:(d>=5&&(l+=r.N1+(d-5)),m=u,d=1)}f>=5&&(l+=r.N1+(f-5)),d>=5&&(l+=r.N1+(d-5))}return l},o.getPenaltyN2=function(e){const t=e.size;let l=0;for(let f=0;f=10&&(f===1488||f===93)&&l++,d=d<<1&2047|e.get(m,b),m>=10&&(d===1488||d===93)&&l++}return l*r.N3},o.getPenaltyN4=function(e){let t=0;const l=e.data.length;for(let d=0;d=0;){const l=t[0];for(let d=0;d0){const f=new Uint8Array(this.degree);return f.set(t,l),f}return t},Qe=r,Qe}var Xe={},Ze={},et={},Ut;function sn(){return Ut||(Ut=1,et.isValid=function(r){return!isNaN(r)&&r>=1&&r<=40}),et}var te={},qt;function an(){if(qt)return te;qt=1;const o="[0-9]+",r="[A-Z $%*+\\-./:]+";let s="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";s=s.replace(/u/g,"\\u");const n="(?:(?![A-Z0-9 $%*+\\-./:]|"+s+`)(?:.|[\r ]))+`;te.KANJI=new RegExp(s,"g"),te.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),te.BYTE=new RegExp(n,"g"),te.NUMERIC=new RegExp(o,"g"),te.ALPHANUMERIC=new RegExp(r,"g");const e=new RegExp("^"+s+"$"),t=new RegExp("^"+o+"$"),l=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return te.testKanji=function(d){return e.test(d)},te.testNumeric=function(d){return t.test(d)},te.testAlphanumeric=function(d){return l.test(d)},te}var Ot;function be(){return Ot||(Ot=1,function(o){const r=sn(),s=an();o.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},o.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},o.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},o.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},o.MIXED={bit:-1},o.getCharCountIndicator=function(t,l){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!r.isValid(l))throw new Error("Invalid version: "+l);return l>=1&&l<10?t.ccBits[0]:l<27?t.ccBits[1]:t.ccBits[2]},o.getBestModeForData=function(t){return s.testNumeric(t)?o.NUMERIC:s.testAlphanumeric(t)?o.ALPHANUMERIC:s.testKanji(t)?o.KANJI:o.BYTE},o.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},o.isValid=function(t){return t&&t.bit&&t.ccBits};function n(e){if(typeof e!="string")throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return o.NUMERIC;case"alphanumeric":return o.ALPHANUMERIC;case"kanji":return o.KANJI;case"byte":return o.BYTE;default:throw new Error("Unknown mode: "+e)}}o.from=function(t,l){if(o.isValid(t))return t;try{return n(t)}catch{return l}}}(Ze)),Ze}var zt;function qn(){return zt||(zt=1,function(o){const r=me(),s=on(),n=bt(),e=be(),t=sn(),l=7973,f=r.getBCHDigit(l);function d(i,u,a){for(let c=1;c<=40;c++)if(u<=o.getCapacity(c,a,i))return c}function b(i,u){return e.getCharCountIndicator(i,u)+4}function m(i,u){let a=0;return i.forEach(function(c){const h=b(c.mode,u);a+=h+c.getBitsLength()}),a}function g(i,u){for(let a=1;a<=40;a++)if(m(i,a)<=o.getCapacity(a,u,e.MIXED))return a}o.from=function(u,a){return t.isValid(u)?parseInt(u,10):a},o.getCapacity=function(u,a,c){if(!t.isValid(u))throw new Error("Invalid QR Code version");typeof c>"u"&&(c=e.BYTE);const h=r.getSymbolTotalCodewords(u),E=s.getTotalCodewordsCount(u,a),N=(h-E)*8;if(c===e.MIXED)return N;const p=N-b(c,u);switch(c){case e.NUMERIC:return Math.floor(p/10*3);case e.ALPHANUMERIC:return Math.floor(p/11*2);case e.KANJI:return Math.floor(p/13);case e.BYTE:default:return Math.floor(p/8)}},o.getBestVersionForData=function(u,a){let c;const h=n.from(a,n.M);if(Array.isArray(u)){if(u.length>1)return g(u,h);if(u.length===0)return 1;c=u[0]}else c=u;return d(c.mode,c.getLength(),h)},o.getEncodedBits=function(u){if(!t.isValid(u)||u<7)throw new Error("Invalid QR Code version");let a=u<<12;for(;r.getBCHDigit(a)-f>=0;)a^=l<=0;)d^=r<0&&(t=this.data.substr(e),l=parseInt(t,10),n.put(l,f*3+1))},it=r,it}var rt,jt;function Fn(){if(jt)return rt;jt=1;const o=be(),r=["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 s(n){this.mode=o.ALPHANUMERIC,this.data=n}return s.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)},s.prototype.getLength=function(){return this.data.length},s.prototype.getBitsLength=function(){return s.getBitsLength(this.data.length)},s.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let l=r.indexOf(this.data[t])*45;l+=r.indexOf(this.data[t+1]),e.put(l,11)}this.data.length%2&&e.put(r.indexOf(this.data[t]),6)},rt=s,rt}var ot,Ht;function Vn(){if(Ht)return ot;Ht=1;const o=be();function r(s){this.mode=o.BYTE,typeof s=="string"?this.data=new TextEncoder().encode(s):this.data=new Uint8Array(s)}return r.getBitsLength=function(n){return n*8},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(s){for(let n=0,e=this.data.length;n=33088&&t<=40956)t-=33088;else if(t>=57408&&t<=60351)t-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+` Make sure your charset is UTF-8`);t=(t>>>8&255)*192+(t&255),n.put(t,13)}},st=s,st}var at={exports:{}},$t;function Hn(){return $t||($t=1,function(o){var r={single_source_shortest_paths:function(s,n,e){var t={},l={};l[n]=0;var f=r.PriorityQueue.make();f.push(n,0);for(var d,b,m,g,i,u,a,c,h;!f.empty();){d=f.pop(),b=d.value,g=d.cost,i=s[b]||{};for(m in i)i.hasOwnProperty(m)&&(u=i[m],a=g+u,c=l[m],h=typeof l[m]>"u",(h||c>a)&&(l[m]=a,f.push(m,a),t[m]=b))}if(typeof e<"u"&&typeof l[e]>"u"){var E=["Could not find a path from ",n," to ",e,"."].join("");throw new Error(E)}return t},extract_shortest_path_from_predecessor_list:function(s,n){for(var e=[],t=n;t;)e.push(t),s[t],t=s[t];return e.reverse(),e},find_path:function(s,n,e){var t=r.single_source_shortest_paths(s,n,e);return r.extract_shortest_path_from_predecessor_list(t,e)},PriorityQueue:{make:function(s){var n=r.PriorityQueue,e={},t;s=s||{};for(t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);return e.queue=[],e.sorter=s.sorter||n.default_sorter,e},default_sorter:function(s,n){return s.cost-n.cost},push:function(s,n){var e={value:s,cost:n};this.queue.push(e),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};o.exports=r}(at)),at.exports}var Gt;function Kn(){return Gt||(Gt=1,function(o){const r=be(),s=zn(),n=Fn(),e=Vn(),t=jn(),l=an(),f=me(),d=Hn();function b(E){return unescape(encodeURIComponent(E)).length}function m(E,N,p){const w=[];let D;for(;(D=E.exec(p))!==null;)w.push({data:D[0],index:D.index,mode:N,length:D[0].length});return w}function g(E){const N=m(l.NUMERIC,r.NUMERIC,E),p=m(l.ALPHANUMERIC,r.ALPHANUMERIC,E);let w,D;return f.isKanjiModeEnabled()?(w=m(l.BYTE,r.BYTE,E),D=m(l.KANJI,r.KANJI,E)):(w=m(l.BYTE_KANJI,r.BYTE,E),D=[]),N.concat(p,w,D).sort(function(S,C){return S.index-C.index}).map(function(S){return{data:S.data,mode:S.mode,length:S.length}})}function i(E,N){switch(N){case r.NUMERIC:return s.getBitsLength(E);case r.ALPHANUMERIC:return n.getBitsLength(E);case r.KANJI:return t.getBitsLength(E);case r.BYTE:return e.getBitsLength(E)}}function u(E){return E.reduce(function(N,p){const w=N.length-1>=0?N[N.length-1]:null;return w&&w.mode===p.mode?(N[N.length-1].data+=p.data,N):(N.push(p),N)},[])}function a(E){const N=[];for(let p=0;p=0&&k<=6&&(_===0||_===6)||_>=0&&_<=6&&(k===0||k===6)||k>=2&&k<=4&&_>=2&&_<=4?v.set(I+k,M+_,!0,!0):v.set(I+k,M+_,!1,!0))}}function a(v){const S=v.size;for(let C=8;C>k&1)===1,v.set(A,I,M,!0),v.set(I,A,M,!0)}function E(v,S,C){const y=v.size,A=m.getEncodedBits(S,C);let I,M;for(I=0;I<15;I++)M=(A>>I&1)===1,I<6?v.set(I,8,M,!0):I<8?v.set(I+1,8,M,!0):v.set(y-15+I,8,M,!0),I<8?v.set(8,y-I-1,M,!0):I<9?v.set(8,15-I-1+1,M,!0):v.set(8,15-I-1,M,!0);v.set(y-8,8,1,!0)}function N(v,S){const C=v.size;let y=-1,A=C-1,I=7,M=0;for(let k=C-1;k>0;k-=2)for(k===6&&k--;;){for(let _=0;_<2;_++)if(!v.isReserved(A,k-_)){let X=!1;M>>I&1)===1),v.set(A,k-_,X),I--,I===-1&&(M++,I=7)}if(A+=y,A<0||C<=A){A-=y,y=-y;break}}}function p(v,S,C){const y=new s;C.forEach(function(_){y.put(_.mode.bit,4),y.put(_.getLength(),g.getCharCountIndicator(_.mode,v)),_.write(y)});const A=o.getSymbolTotalCodewords(v),I=f.getTotalCodewordsCount(v,S),M=(A-I)*8;for(y.getLengthInBits()+4<=M&&y.put(0,4);y.getLengthInBits()%8!==0;)y.putBit(0);const k=(M-y.getLengthInBits())/8;for(let _=0;_=7&&h(_,S),N(_,M),isNaN(y)&&(y=l.getBestMask(_,E.bind(null,_,C))),l.applyMask(y,_),E(_,C,y),{modules:_,version:S,errorCorrectionLevel:C,maskPattern:y,segments:A}}return je.create=function(S,C){if(typeof S>"u"||S==="")throw new Error("No input text");let y=r.M,A,I;return typeof C<"u"&&(y=r.from(C.errorCorrectionLevel,r.M),A=b.from(C.version),I=l.from(C.maskPattern),C.toSJISFunc&&o.setToSJISFunction(C.toSJISFunc)),D(S,A,y,I)},je}var ut={},lt={},Jt;function un(){return Jt||(Jt=1,function(o){function r(s){if(typeof s=="number"&&(s=s.toString()),typeof s!="string")throw new Error("Color should be defined as hex string");let n=s.slice().replace("#","").split("");if(n.length<3||n.length===5||n.length>8)throw new Error("Invalid hex color: "+s);(n.length===3||n.length===4)&&(n=Array.prototype.concat.apply([],n.map(function(t){return[t,t]}))),n.length===6&&n.push("F","F");const e=parseInt(n.join(""),16);return{r:e>>24&255,g:e>>16&255,b:e>>8&255,a:e&255,hex:"#"+n.slice(0,6).join("")}}o.getOptions=function(n){n||(n={}),n.color||(n.color={});const e=typeof n.margin>"u"||n.margin===null||n.margin<0?4:n.margin,t=n.width&&n.width>=21?n.width:void 0,l=n.scale||4;return{width:t,scale:t?4:l,margin:e,color:{dark:r(n.color.dark||"#000000ff"),light:r(n.color.light||"#ffffffff")},type:n.type,rendererOpts:n.rendererOpts||{}}},o.getScale=function(n,e){return e.width&&e.width>=n+e.margin*2?e.width/(n+e.margin*2):e.scale},o.getImageWidth=function(n,e){const t=o.getScale(n,e);return Math.floor((n+e.margin*2)*t)},o.qrToImageData=function(n,e,t){const l=e.modules.size,f=e.modules.data,d=o.getScale(l,t),b=Math.floor((l+t.margin*2)*d),m=t.margin*d,g=[t.color.light,t.color.dark];for(let i=0;i=m&&u>=m&&i"u"&&(!l||!l.getContext)&&(d=l,l=void 0),l||(b=n()),d=r.getOptions(d);const m=r.getImageWidth(t.modules.size,d),g=b.getContext("2d"),i=g.createImageData(m,m);return r.qrToImageData(i.data,t,d),s(g,b,m),g.putImageData(i,0,0),b},o.renderToDataURL=function(t,l,f){let d=f;typeof d>"u"&&(!l||!l.getContext)&&(d=l,l=void 0),d||(d={});const b=o.render(t,l,d),m=d.type||"image/png",g=d.rendererOpts||{};return b.toDataURL(m,g.quality)}}(ut)),ut}var ct={},Qt;function Yn(){if(Qt)return ct;Qt=1;const o=un();function r(e,t){const l=e.a/255,f=t+'="'+e.hex+'"';return l<1?f+" "+t+'-opacity="'+l.toFixed(2).slice(1)+'"':f}function s(e,t,l){let f=e+t;return typeof l<"u"&&(f+=" "+l),f}function n(e,t,l){let f="",d=0,b=!1,m=0;for(let g=0;g0&&i>0&&e[g-1]||(f+=b?s("M",i+l,.5+u+l):s("m",d,0),d=0,b=!1),i+1':"",u="',a='viewBox="0 0 '+g+" "+g+'"',h=''+i+u+` `;return typeof f=="function"&&f(null,h),h},ct}var Xt;function Jn(){if(Xt)return Ie;Xt=1;const o=_n(),r=$n(),s=Gn(),n=Yn();function e(t,l,f,d,b){const m=[].slice.call(arguments,1),g=m.length,i=typeof m[g-1]=="function";if(!i&&!o())throw new Error("Callback required as last argument");if(i){if(g<2)throw new Error("Too few arguments provided");g===2?(b=f,f=l,l=d=void 0):g===3&&(l.getContext&&typeof b>"u"?(b=d,d=void 0):(b=d,d=f,f=l,l=void 0))}else{if(g<1)throw new Error("Too few arguments provided");return g===1?(f=l,l=d=void 0):g===2&&!l.getContext&&(d=f,f=l,l=void 0),new Promise(function(u,a){try{const c=r.create(f,d);u(t(c,l,d))}catch(c){a(c)}})}try{const u=r.create(f,d);b(null,t(u,l,d))}catch(u){b(u)}}return Ie.create=r.create,Ie.toCanvas=e.bind(null,s.render),Ie.toDataURL=e.bind(null,s.renderToDataURL),Ie.toString=e.bind(null,function(t,l,f){return n.render(t,f)}),Ie}var Wn=Jn();const Qn=gn(Wn),Xn={class:"device-overview"},Zn={class:"flex flex-wrap items-start gap-4 mcrm-block block__light"},ei={class:"flex items-center justify-between w-full gap-4 mb-4"},ti={class:"flex gap-4"},ni={class:"grid gap-2"},ii={class:"grid grid-cols-[auto_1fr] gap-2"},ri={class:"w-full truncate"},oi={class:"grid py-4"},si={class:"space-y-2"},ai={class:"grid gap-4 py-4 pl-6"},ui={key:0},li={class:"inline-flex items-center gap-2"},ci={class:"p-1 border rounded-sm"},di={class:"inline-flex flex-wrap items-center gap-2 w-fit"},fi={class:"flex items-center gap-1 p-1 text-sm border rounded-sm"},gi={class:"grid gap-4"},hi={class:"font-mono text-4xl tracking-wide"},wi={__name:"ServerView",setup(o){const r=en(),s=xe(),n=xe(),e=ft({ip:""}),t=ft({devices:[],pinlink:!1,poll:!1});tn(async()=>{r.serverGetRemotes(),r.$subscribe((g,i)=>{i.remote!==t.devices&&(t.devices=r.remote)}),l()}),nn(()=>{l(),Object.keys(t.devices).length==0&&!t.poll&&(t.poll=setInterval(()=>{r.serverGetRemotes()},1e3)),Object.keys(t.devices).length>0&&t.poll&&(clearInterval(t.poll),t.poll=!1)});async function l(){const g=await r.serverGetIP();e.ip=g,Qn.toCanvas(n.value,`${e.ip}/devices`,i=>{i&&console.log("QRCode error: ",i)})}async function f(g){const i=await r.serverStartLink(g);t.pinlink={uuid:g,pin:i},s.value.toggleDialog(!0),d(),setTimeout(()=>{b()},6e4)}function d(){const g=setInterval(()=>{ht.post(wt()+"/device/link/poll",{uuid:t.pinlink.uuid}).then(i=>{i.data||(clearInterval(g),b(),r.serverGetRemotes())})},1e3)}function b(){t.pinlink=!1,s.value&&s.value.toggleDialog(!1)}function m(g){ht.post(wt()+"/device/link/remove",{uuid:g}).then(i=>{i.data&&r.serverGetRemotes()})}return(g,i)=>(z(),re("div",Xn,[O(ce,{variant:"info"},{default:V(()=>[i[1]||(i[1]=B("strong",null,"This is a server!",-1)),B("em",null,"UUID: "+J(F(r).uuid()),1)]),_:1}),B("div",Zn,[B("h4",ei,[B("span",ti,[O(F(hn)),q(J(Object.keys(t.devices).length)+" "+J(Object.keys(t.devices).length==1?"Device":"Devices"),1)]),t.poll?j("",!0):(z(),G(we,{key:0,variant:"primary",onClick:i[0]||(i[0]=u=>F(r).serverGetRemotes())},{default:V(()=>[O(F(Re))]),_:1}))]),Object.keys(t.devices).length>0?(z(!0),re(Fe,{key:0},wn(t.devices,(u,a)=>(z(),re("div",{key:a,class:"mcrm-block block__dark block-size__sm w-64 grid !gap-4 content-start"},[B("div",ni,[B("h5",ii,[u.settings.type=="unknown"?(z(),G(F(An),{key:0})):j("",!0),u.settings.type=="mobile"?(z(),G(F(In),{key:1})):j("",!0),u.settings.type=="tablet"?(z(),G(F(Sn),{key:2})):j("",!0),u.settings.type=="desktop"?(z(),G(F(Cn),{key:3})):j("",!0),B("span",ri,J(u.settings.name),1)]),B("em",null,J(a),1)]),u.key?(z(),re(Fe,{key:0},[O(ce,{variant:"success"},{default:V(()=>i[2]||(i[2]=[q("Authorized")])),_:1}),O(we,{variant:"danger",onClick:c=>m(a)},{default:V(()=>[O(F(Mn)),i[3]||(i[3]=q("Unlink device "))]),_:2},1032,["onClick"])],64)):(z(),re(Fe,{key:1},[O(ce,{variant:"warning"},{default:V(()=>i[4]||(i[4]=[q("Unauthorized")])),_:1}),O(we,{variant:"primary",onClick:c=>f(a)},{default:V(()=>[O(F(gt)),i[5]||(i[5]=q("Link device "))]),_:2},1032,["onClick"])],64)),t.pinlink.uuid==a?(z(),G(ce,{key:2,variant:"info"},{default:V(()=>[q("One time pin: "+J(t.pinlink.pin),1)]),_:1})):j("",!0)]))),128)):j("",!0),O(En,{class:"w-full mt-8 border-t border-t-white/50",title:"How to connect a device?",open:Object.keys(t.devices).length==0},{default:V(()=>[B("div",oi,[B("ul",si,[B("li",null,[i[8]||(i[8]=q(" Scan the QR code with the remote device. ")),B("div",ai,[B("canvas",{ref_key:"serverQr",ref:n},null,512),B("p",null,[i[6]||(i[6]=q(" Or manually type the IP address: ")),i[7]||(i[7]=B("br",null,null,-1)),B("strong",null,J(e.ip)+"/devices",1)])])]),i[14]||(i[14]=B("li",null,' The device will automatically request access, if you see "Access requested" on the device. ',-1)),t.poll?j("",!0):(z(),re("li",ui,[B("div",li,[i[9]||(i[9]=q(" Click the ")),B("span",ci,[O(F(Re),{class:"size-4"})]),i[10]||(i[10]=q(" to reload the devices. "))])])),B("li",null,[B("div",di,[i[12]||(i[12]=q(" Click on ")),B("span",fi,[O(F(gt),{class:"size-4"}),i[11]||(i[11]=q(" Link device "))]),i[13]||(i[13]=q(" A one-time-pin will be shown in a dialog. "))])]),i[15]||(i[15]=B("li",null,"Enter the pin on the remote device.",-1)),i[16]||(i[16]=B("li",null," Congratulations! You have linked a device! You can now start using panels on that device. ",-1))])])]),_:1},8,["open"]),O(rn,{ref_key:"pinDialog",ref:s},{content:V(()=>[B("div",gi,[i[17]||(i[17]=B("h3",null,"Pin code",-1)),B("span",hi,J(t.pinlink.pin),1)])]),_:1},512)])]))}},pi=mt(wi,[["__scopeId","data-v-0a3f2b41"]]);var mi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function bi(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var pt={exports:{}};(function(o,r){(function(s,n){var e="1.0.37",t="",l="?",f="function",d="undefined",b="object",m="string",g="major",i="model",u="name",a="type",c="vendor",h="version",E="architecture",N="console",p="mobile",w="tablet",D="smarttv",v="wearable",S="embedded",C=500,y="Amazon",A="Apple",I="ASUS",M="BlackBerry",k="Browser",_="Chrome",X="Edge",Z="Firefox",ye="Google",Se="Huawei",Ae="LG",fe="Microsoft",ge="Motorola",he="Opera",se="Samsung",Ne="Sharp",ae="Sony",ke="Xiaomi",$="Zebra",Y="Facebook",ne="Chromium OS",Ee="Mac OS",cn=function(P,x){var T={};for(var U in P)x[U]&&x[U].length%2===0?T[U]=x[U].concat(P[U]):T[U]=P[U];return T},Pe=function(P){for(var x={},T=0;T0?L.length===2?typeof L[1]==f?this[L[0]]=L[1].call(this,ie):this[L[0]]=L[1]:L.length===3?typeof L[1]===f&&!(L[1].exec&&L[1].test)?this[L[0]]=ie?L[1].call(this,ie,L[2]):n:this[L[0]]=ie?ie.replace(L[1],L[2]):n:L.length===4&&(this[L[0]]=ie?L[3].call(this,ie.replace(L[1],L[2])):n):this[L]=ie||n;T+=2}},Oe=function(P,x){for(var T in x)if(typeof x[T]===b&&x[T].length>0){for(var U=0;U2&&(R[i]="iPad",R[a]=w),R},this.getEngine=function(){var R={};return R[u]=n,R[h]=n,Be.call(R,U,ee.engine),R},this.getOS=function(){var R={};return R[u]=n,R[h]=n,Be.call(R,U,ee.os),L&&!R[u]&&ue&&ue.platform!="Unknown"&&(R[u]=ue.platform.replace(/chrome os/i,ne).replace(/macos/i,Ee)),R},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return U},this.setUA=function(R){return U=typeof R===m&&R.length>C?qe(R,C):R,this},this.setUA(U),this};Q.VERSION=e,Q.BROWSER=Pe([u,h,g]),Q.CPU=Pe([E]),Q.DEVICE=Pe([i,c,a,N,p,D,w,v,S]),Q.ENGINE=Q.OS=Pe([u,h]),o.exports&&(r=o.exports=Q),r.UAParser=Q;var Ce=typeof s!==d&&(s.jQuery||s.Zepto);if(Ce&&!Ce.ua){var De=new Q;Ce.ua=De.getResult(),Ce.ua.get=function(){return De.getUA()},Ce.ua.set=function(P){De.setUA(P);var x=De.getResult();for(var T in x)Ce.ua[T]=x[T]}}})(typeof window=="object"?window:mi)})(pt,pt.exports);var vi=pt.exports;const yi=bi(vi),oe={CONSOLE:"console",DESKTOP:void 0,EMBEDDED:"embedded",MOBILE:"mobile",SMART_TV:"smarttv",TABLET:"tablet",WEARABLE:"wearable"},ve={ANDROID:"Android",IOS:"iOS",LINUX:"Linux",MAC_OS:"Mac OS",WINDOWS_PHONE:"Windows Phone",WINDOWS:"Windows"},H={CHROME:"Chrome",CHROMIUM:"Chromium",EDGE:"Edge",FIREFOX:"Firefox",IE:"IE",INTERNET_EXPLORER:"Internet Explorer",MIUI:"MIUI Browser",MOBILE_SAFARI:"Mobile Safari",OPERA:"Opera",SAFARI:"Safari",SAMSUNG_BROWSER:"Samsung Browser",YANDEX:"Yandex"},Te=new yi,W=Te.getDevice(),de=Te.getOS(),K=Te.getBrowser();Te.getEngine();const vt=Te.getUA(),Ue=()=>/iPad/.test(vt),ln=()=>de.name===ve.WINDOWS&&de.version==="10"&&vt.indexOf("Edg/")!==-1;de.name,ve.ANDROID;K.name,H.CHROME;K.name,H.CHROMIUM;W.type,oe.CONSOLE;W.type,oe.DESKTOP;K.name===H.EDGE||ln();ln();K.name,H.EDGE;/electron/.test(vt.toLowerCase());W.type,oe.EMBEDDED;K.name,H.FIREFOX;K.name===H.INTERNET_EXPLORER||(K.name,H.IE);de.name===ve.IOS||Ue();de.name,ve.LINUX;de.name,ve.MAC_OS;K.name,H.MIUI;W.type===oe.MOBILE||W.type===oe.TABLET||Ue();W.type,oe.MOBILE;K.name===H.MOBILE_SAFARI||Ue();K.name,H.OPERA;K.name===H.SAFARI||(K.name,H.MOBILE_SAFARI);K.name,H.SAMSUNG_BROWSER;W.type,oe.SMART_TV;W.type===oe.TABLET||Ue();W.type,oe.WEARABLE;de.name,ve.WINDOWS;de.name,ve.WINDOWS_PHONE;K.name,H.YANDEX;const ki=()=>W.model,Zt=()=>W.type||"desktop",dt=()=>W.vendor,Ei={class:"server-overview"},Ci={class:"grid gap-4 mcrm-block block__light"},Ii={class:"flex items-center justify-between gap-4 text-lg"},Si={class:"flex gap-4"},Ai={class:"grid gap-2"},Mi={class:"mb-4"},Bi={class:"font-semibold"},_i={class:"inline-flex flex-wrap items-center gap-2 w-fit"},Ri={class:"flex items-center gap-1 p-1 text-sm border rounded-sm"},Ti={key:0,class:"grid grid-cols-[2rem_1fr] gap-2"},Ni={class:"grid w-64 gap-4"},Pi={__name:"RemoteView",setup(o){const r=en(),s=xe(),n=xe(),e=ft({host:"",port:window.__CONFIG__.MCRM__PORT,status:!1,link:!1,inputPin:"",encryptedKey:"",key:""});tn(async()=>{e.host=window.location.host}),nn(()=>{e.status||t(),e.status==="authorized"&&e.inputPin&&(e.inputPin="")});async function t(m=!0){const g=await r.remoteCheckServerAccess();return e.status=g,g==="unlinked"||g==="unauthorized"?(m&&l(),!0):r.key()?(await r.remoteHandshake(r.key())?e.key=r.key():(r.removeDeviceKey(),e.status="unlinked",m&&l()),!0):(e.status="unauthorized",!0)}function l(){let m=`${dt()?dt():"Unknown"} ${dt()?ki():Zt()}`;r.remoteRequestServerAccess(m,Zt()).then(g=>{g.data&&(e.status=g.data,f())})}function f(){e.link="checking",r.remotePingLink(m=>{e.link=!0,e.encryptedKey=m,s.value.toggleDialog(!0),n.value.focus()})}async function d(){const m=kn(e.inputPin,e.encryptedKey);await r.remoteHandshake(m)&&(r.setDeviceKey(m),e.key=m,s.value.toggleDialog(!1),e.status="authorized")}function b(){ht.post(wt()+"/device/link/remove",yn({uuid:r.uuid()})).then(m=>{m.data&&t(!1)})}return(m,g)=>(z(),re("div",Ei,[O(ce,{variant:"info"},{default:V(()=>[g[5]||(g[5]=B("strong",null,"This is a remote device.",-1)),B("em",null,"UUID: "+J(F(r).uuid()),1)]),_:1}),B("div",Ci,[B("h4",Ii,[B("span",Si,[O(F(pn)),g[6]||(g[6]=q("Server"))]),O(we,{variant:"primary",onClick:g[0]||(g[0]=i=>t())},{default:V(()=>[O(F(Re))]),_:1})]),B("p",null,[g[7]||(g[7]=q(" Connected to: ")),B("strong",null,J(e.host),1)]),e.status==="authorized"?(z(),G(ce,{key:0,variant:"success"},{default:V(()=>g[8]||(g[8]=[q("Authorized")])),_:1})):j("",!0),e.status==="unlinked"?(z(),G(ce,{key:1,variant:"warning"},{default:V(()=>g[9]||(g[9]=[q("Not linked")])),_:1})):j("",!0),e.status==="unauthorized"?(z(),G(ce,{key:2,variant:"info"},{default:V(()=>[B("div",Ai,[g[17]||(g[17]=B("strong",null,"Access requested",-1)),B("ul",Mi,[B("li",null,[g[10]||(g[10]=q(" Navigate to ")),B("em",Bi,"http://localhost:"+J(e.port)+"/devices",1),g[11]||(g[11]=q(". "))]),B("li",null,[B("div",_i,[g[13]||(g[13]=q(" Click on ")),B("span",Ri,[O(F(gt),{class:"size-4"}),g[12]||(g[12]=q(" Link device "))])])]),g[14]||(g[14]=B("li",null,"Enter the the pin shown on the desktop in the dialog that will appear.",-1))]),e.link=="checking"?(z(),re("div",Ti,[O(F(Re),{class:"animate-spin"}),g[15]||(g[15]=q(" Checking server for link... "))])):j("",!0),e.link===!1?(z(),G(we,{key:1,variant:"subtle",onClick:g[1]||(g[1]=i=>f()),class:"w-fit"},{default:V(()=>[O(F(Re)),g[16]||(g[16]=q("Check for server link "))]),_:1})):j("",!0)])]),_:1})):j("",!0),e.status==="authorized"?(z(),G(we,{key:3,variant:"danger",onClick:g[2]||(g[2]=i=>b())},{default:V(()=>[O(F(Bn)),g[18]||(g[18]=q(" Disconnect "))]),_:1})):j("",!0)]),O(rn,{ref_key:"linkPinDialog",ref:s},{content:V(()=>[B("div",Ni,[g[20]||(g[20]=B("h3",null,"Server link pin:",-1)),B("form",{class:"grid gap-4",onSubmit:g[4]||(g[4]=mn(i=>d(),["prevent"]))},[bn(B("input",{ref_key:"linkPinInput",ref:n,class:"input",id:"input-pin",type:"text",pattern:"[0-9]{4}","onUpdate:modelValue":g[3]||(g[3]=i=>e.inputPin=i),autocomplete:"off"},null,512),[[vn,e.inputPin]]),O(we,{variant:"primary"},{default:V(()=>g[19]||(g[19]=[q("Enter")])),_:1})],32)])]),_:1},512)]))}},Di=mt(Pi,[["__scopeId","data-v-6973a9f0"]]),Li={id:"devices-view",class:"panel"},xi={class:"panel__title"},Ui={class:"grid gap-8 pr-2 panel__content"},qi={__name:"DevicesView",setup(o){return(r,s)=>(z(),re("div",Li,[B("h1",xi,J(F(It)()?"Remote devices":"Server"),1),B("div",Ui,[F(It)()?(z(),G(pi,{key:0})):(z(),G(Di,{key:1}))])]))}},Vi=mt(qi,[["__scopeId","data-v-860af40f"]]);export{Vi as default}; //# sourceMappingURL=DevicesView-C9HVDkwf.js.map