@av-pi-studio/web-client 0.0.108 → 0.0.109
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.
- package/dist/web/assets/{BinaryFallbackViewer-CETZBSFn.js → BinaryFallbackViewer-D3SiymLg.js} +1 -1
- package/dist/web/assets/ChatPanel-CBL-3Y4a.js +8 -0
- package/dist/web/assets/ChatPanel-DOXUilBm.css +1 -0
- package/dist/web/assets/{CodeView-Ll6fG3qP.js → CodeView-_q2A5_u4.js} +1 -1
- package/dist/web/assets/{FilePanel-DEo396Lk.js → FilePanel-CtTMIGGN.js} +1 -1
- package/dist/web/assets/{HtmlViewer-CJ9W44fj.js → HtmlViewer-C375X5VB.js} +1 -1
- package/dist/web/assets/{ImageViewer-aE8UjQHQ.js → ImageViewer-DEd1JdfT.js} +1 -1
- package/dist/web/assets/{MarkdownFileViewer-CQ0UwCPR.js → MarkdownFileViewer-DUmXZ9I3.js} +1 -1
- package/dist/web/assets/{ModelProvidersPanel-BKWs9cUE.js → ModelProvidersPanel-EvzaltXg.js} +1 -1
- package/dist/web/assets/{MoleculeViewerPanel-BDi_0OgB.js → MoleculeViewerPanel-B9ru3Tfz.js} +1 -1
- package/dist/web/assets/{SettingsDialog-CR8pWXdE.js → SettingsDialog-Dzrj8U14.js} +5 -5
- package/dist/web/assets/{TerminalPanel-BT5ai_QP.js → TerminalPanel-B4aQ2vFZ.js} +1 -1
- package/dist/web/assets/{TextViewer-BEtDY7QZ.js → TextViewer-DPjR2BtN.js} +1 -1
- package/dist/web/assets/{VideoViewer-DsNLEt3Q.js → VideoViewer-FVciwP8b.js} +1 -1
- package/dist/web/assets/{ViewersPanel-BQDubxVN.js → ViewersPanel-C0NvKhk9.js} +1 -1
- package/dist/web/assets/{href-resolution-mWbiAWb5.js → href-resolution-BRKhhrZR.js} +1 -1
- package/dist/web/assets/index-Dsmi2Bzk.js +19 -0
- package/dist/web/assets/{index-C_17Gn7C.css → index-pQTEQ2P2.css} +1 -1
- package/dist/web/assets/{markdown-D1SSpG2J.js → markdown-Cg0b167h.js} +1 -1
- package/dist/web/assets/{use-file-download-hogFXJ1-.js → use-file-download-Dg_DH4LU.js} +1 -1
- package/dist/web/assets/{use-file-watch-RCm9-VVB.js → use-file-watch-C7pdkH79.js} +1 -1
- package/dist/web/assets/{use-provider-auth-list-Dlczxxvd.js → use-provider-auth-list-CbjpDpe7.js} +1 -1
- package/dist/web/assets/vendor-overlays-3MkedLFU.js +1 -0
- package/dist/web/index.html +3 -3
- package/package.json +3 -3
- package/dist/web/assets/ChatPanel-B8AiSd3V.css +0 -1
- package/dist/web/assets/ChatPanel-CirFvAuS.js +0 -8
- package/dist/web/assets/index-T-iCQirw.js +0 -19
- package/dist/web/assets/vendor-overlays-ar75LZPp.js +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{b as pe,r as v,j as l}from"./vendor-react-DQUAl2K8.js";import{af as me,N as we}from"./vendor-DaF96HbP.js";import{u as re,r as ye,N as oe,B as G,S as It,K as Ce,O as Ee,a0 as Ne,a1 as Be,a2 as Se,I as Ie,E as _t}from"./index-T-iCQirw.js";import{a as Re}from"./vendor-query-i7fr__Xm.js";import{u as O}from"./provider-auth-store-9hsJ07X1.js";import{o as ie,b as be,p as Ae}from"./vendor-icons-K8oF_80Q.js";import"./vendor-overlays-ar75LZPp.js";import"./vendor-dnd-CayJj8TC.js";function _e(t,n){return{provider:t,authType:n,phase:"starting",statusLines:[]}}function Le(t,n,i){return{...t,phase:t.phase==="starting"?"waiting":t.phase,statusLines:[...t.statusLines,{kind:"info",message:n,links:i}]}}function Te(t,n){const i=t.statusLines.filter(r=>r.kind!=="progress");return{...t,phase:t.phase==="starting"?"waiting":t.phase,statusLines:[...i,{kind:"progress",message:n}]}}function Me(t,n,i){return{...t,authUrl:{url:n,instructions:i}}}function Pe(t,n,i,r,e){return{...t,deviceCode:{userCode:n,verificationUri:i,intervalSeconds:r,expiresInSeconds:e}}}function ve(t,n){return{...t,phase:"prompt",prompt:n}}function je(t,n){var i;return((i=t.prompt)==null?void 0:i.promptId)!==n?t:{...t,phase:"waiting",prompt:void 0}}function De(t,n,i){return{...t,phase:"done",result:{ok:n,error:i}}}function xe(t,n){if(t.phase==="done")return t;switch(n.kind){case"info":return Le(t,n.message,n.links);case"progress":return Te(t,n.message);case"auth_url":return Me(t,n.url,n.instructions);case"device_code":return Pe(t,n.userCode,n.verificationUri,n.intervalSeconds,n.expiresInSeconds);case"prompt":return ve(t,n);case"prompt_cancelled":return je(t,n.promptId);case"done":return De(t,n.ok,n.error)}}var V={},nt,Lt;function ke(){return Lt||(Lt=1,nt=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),nt}var rt={},U={},Tt;function F(){if(Tt)return U;Tt=1;let t;const n=[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 U.getSymbolSize=function(r){if(!r)throw new Error('"version" cannot be null or undefined');if(r<1||r>40)throw new Error('"version" should be in range from 1 to 40');return r*4+17},U.getSymbolTotalCodewords=function(r){return n[r]},U.getBCHDigit=function(i){let r=0;for(;i!==0;)r++,i>>>=1;return r},U.setToSJISFunction=function(r){if(typeof r!="function")throw new Error('"toSJISFunc" is not a valid function.');t=r},U.isKanjiModeEnabled=function(){return typeof t<"u"},U.toSJIS=function(r){return t(r)},U}var ot={},Mt;function Rt(){return Mt||(Mt=1,(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function n(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.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: "+i)}}t.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},t.from=function(r,e){if(t.isValid(r))return r;try{return n(r)}catch{return e}}})(ot)),ot}var it,Pt;function Ue(){if(Pt)return it;Pt=1;function t(){this.buffer=[],this.length=0}return t.prototype={get:function(n){const i=Math.floor(n/8);return(this.buffer[i]>>>7-n%8&1)===1},put:function(n,i){for(let r=0;r<i;r++)this.putBit((n>>>i-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(n){const i=Math.floor(this.length/8);this.buffer.length<=i&&this.buffer.push(0),n&&(this.buffer[i]|=128>>>this.length%8),this.length++}},it=t,it}var st,vt;function qe(){if(vt)return st;vt=1;function t(n){if(!n||n<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=n,this.data=new Uint8Array(n*n),this.reservedBit=new Uint8Array(n*n)}return t.prototype.set=function(n,i,r,e){const o=n*this.size+i;this.data[o]=r,e&&(this.reservedBit[o]=!0)},t.prototype.get=function(n,i){return this.data[n*this.size+i]},t.prototype.xor=function(n,i,r){this.data[n*this.size+i]^=r},t.prototype.isReserved=function(n,i){return this.reservedBit[n*this.size+i]},st=t,st}var at={},jt;function Fe(){return jt||(jt=1,(function(t){const n=F().getSymbolSize;t.getRowColCoords=function(r){if(r===1)return[];const e=Math.floor(r/7)+2,o=n(r),s=o===145?26:Math.ceil((o-13)/(2*e-2))*2,a=[o-7];for(let u=1;u<e-1;u++)a[u]=a[u-1]-s;return a.push(6),a.reverse()},t.getPositions=function(r){const e=[],o=t.getRowColCoords(r),s=o.length;for(let a=0;a<s;a++)for(let u=0;u<s;u++)a===0&&u===0||a===0&&u===s-1||a===s-1&&u===0||e.push([o[a],o[u]]);return e}})(at)),at}var ut={},Dt;function ze(){if(Dt)return ut;Dt=1;const t=F().getSymbolSize,n=7;return ut.getPositions=function(r){const e=t(r);return[[0,0],[e-n,0],[0,e-n]]},ut}var ct={},xt;function Ke(){return xt||(xt=1,(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const n={N1:3,N2:3,N3:40,N4:10};t.isValid=function(e){return e!=null&&e!==""&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){const o=e.size;let s=0,a=0,u=0,c=null,m=null;for(let E=0;E<o;E++){a=u=0,c=m=null;for(let S=0;S<o;S++){let h=e.get(E,S);h===c?a++:(a>=5&&(s+=n.N1+(a-5)),c=h,a=1),h=e.get(S,E),h===m?u++:(u>=5&&(s+=n.N1+(u-5)),m=h,u=1)}a>=5&&(s+=n.N1+(a-5)),u>=5&&(s+=n.N1+(u-5))}return s},t.getPenaltyN2=function(e){const o=e.size;let s=0;for(let a=0;a<o-1;a++)for(let u=0;u<o-1;u++){const c=e.get(a,u)+e.get(a,u+1)+e.get(a+1,u)+e.get(a+1,u+1);(c===4||c===0)&&s++}return s*n.N2},t.getPenaltyN3=function(e){const o=e.size;let s=0,a=0,u=0;for(let c=0;c<o;c++){a=u=0;for(let m=0;m<o;m++)a=a<<1&2047|e.get(c,m),m>=10&&(a===1488||a===93)&&s++,u=u<<1&2047|e.get(m,c),m>=10&&(u===1488||u===93)&&s++}return s*n.N3},t.getPenaltyN4=function(e){let o=0;const s=e.data.length;for(let u=0;u<s;u++)o+=e.data[u];return Math.abs(Math.ceil(o*100/s/5)-10)*n.N4};function i(r,e,o){switch(r){case t.Patterns.PATTERN000:return(e+o)%2===0;case t.Patterns.PATTERN001:return e%2===0;case t.Patterns.PATTERN010:return o%3===0;case t.Patterns.PATTERN011:return(e+o)%3===0;case t.Patterns.PATTERN100:return(Math.floor(e/2)+Math.floor(o/3))%2===0;case t.Patterns.PATTERN101:return e*o%2+e*o%3===0;case t.Patterns.PATTERN110:return(e*o%2+e*o%3)%2===0;case t.Patterns.PATTERN111:return(e*o%3+(e+o)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}t.applyMask=function(e,o){const s=o.size;for(let a=0;a<s;a++)for(let u=0;u<s;u++)o.isReserved(u,a)||o.xor(u,a,i(e,u,a))},t.getBestMask=function(e,o){const s=Object.keys(t.Patterns).length;let a=0,u=1/0;for(let c=0;c<s;c++){o(c),t.applyMask(c,e);const m=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(c,e),m<u&&(u=m,a=c)}return a}})(ct)),ct}var W={},kt;function se(){if(kt)return W;kt=1;const t=Rt(),n=[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],i=[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];return W.getBlocksCount=function(e,o){switch(o){case t.L:return n[(e-1)*4+0];case t.M:return n[(e-1)*4+1];case t.Q:return n[(e-1)*4+2];case t.H:return n[(e-1)*4+3];default:return}},W.getTotalCodewordsCount=function(e,o){switch(o){case t.L:return i[(e-1)*4+0];case t.M:return i[(e-1)*4+1];case t.Q:return i[(e-1)*4+2];case t.H:return i[(e-1)*4+3];default:return}},W}var lt={},Q={},Ut;function Ve(){if(Ut)return Q;Ut=1;const t=new Uint8Array(512),n=new Uint8Array(256);return(function(){let r=1;for(let e=0;e<255;e++)t[e]=r,n[r]=e,r<<=1,r&256&&(r^=285);for(let e=255;e<512;e++)t[e]=t[e-255]})(),Q.log=function(r){if(r<1)throw new Error("log("+r+")");return n[r]},Q.exp=function(r){return t[r]},Q.mul=function(r,e){return r===0||e===0?0:t[n[r]+n[e]]},Q}var qt;function Oe(){return qt||(qt=1,(function(t){const n=Ve();t.mul=function(r,e){const o=new Uint8Array(r.length+e.length-1);for(let s=0;s<r.length;s++)for(let a=0;a<e.length;a++)o[s+a]^=n.mul(r[s],e[a]);return o},t.mod=function(r,e){let o=new Uint8Array(r);for(;o.length-e.length>=0;){const s=o[0];for(let u=0;u<e.length;u++)o[u]^=n.mul(e[u],s);let a=0;for(;a<o.length&&o[a]===0;)a++;o=o.slice(a)}return o},t.generateECPolynomial=function(r){let e=new Uint8Array([1]);for(let o=0;o<r;o++)e=t.mul(e,new Uint8Array([1,n.exp(o)]));return e}})(lt)),lt}var dt,Ft;function He(){if(Ft)return dt;Ft=1;const t=Oe();function n(i){this.genPoly=void 0,this.degree=i,this.degree&&this.initialize(this.degree)}return n.prototype.initialize=function(r){this.degree=r,this.genPoly=t.generateECPolynomial(this.degree)},n.prototype.encode=function(r){if(!this.genPoly)throw new Error("Encoder not initialized");const e=new Uint8Array(r.length+this.degree);e.set(r);const o=t.mod(e,this.genPoly),s=this.degree-o.length;if(s>0){const a=new Uint8Array(this.degree);return a.set(o,s),a}return o},dt=n,dt}var ft={},ht={},gt={},zt;function ae(){return zt||(zt=1,gt.isValid=function(n){return!isNaN(n)&&n>=1&&n<=40}),gt}var D={},Kt;function ue(){if(Kt)return D;Kt=1;const t="[0-9]+",n="[A-Z $%*+\\-./:]+";let i="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";i=i.replace(/u/g,"\\u");const r="(?:(?![A-Z0-9 $%*+\\-./:]|"+i+`)(?:.|[\r
|
|
1
|
+
import{b as pe,r as v,j as l}from"./vendor-react-DQUAl2K8.js";import{af as me,N as we}from"./vendor-DaF96HbP.js";import{u as re,r as ye,O as oe,B as G,S as It,M as Ce,Q as Ee,a4 as Be,a5 as Ne,a6 as Se,I as Ie,E as _t}from"./index-Dsmi2Bzk.js";import{a as Re}from"./vendor-query-i7fr__Xm.js";import{u as O}from"./provider-auth-store-9hsJ07X1.js";import{o as ie,b as be,p as Ae}from"./vendor-icons-K8oF_80Q.js";import"./vendor-overlays-3MkedLFU.js";import"./vendor-dnd-CayJj8TC.js";function _e(t,n){return{provider:t,authType:n,phase:"starting",statusLines:[]}}function Le(t,n,i){return{...t,phase:t.phase==="starting"?"waiting":t.phase,statusLines:[...t.statusLines,{kind:"info",message:n,links:i}]}}function Te(t,n){const i=t.statusLines.filter(r=>r.kind!=="progress");return{...t,phase:t.phase==="starting"?"waiting":t.phase,statusLines:[...i,{kind:"progress",message:n}]}}function Me(t,n,i){return{...t,authUrl:{url:n,instructions:i}}}function Pe(t,n,i,r,e){return{...t,deviceCode:{userCode:n,verificationUri:i,intervalSeconds:r,expiresInSeconds:e}}}function ve(t,n){return{...t,phase:"prompt",prompt:n}}function je(t,n){var i;return((i=t.prompt)==null?void 0:i.promptId)!==n?t:{...t,phase:"waiting",prompt:void 0}}function De(t,n,i){return{...t,phase:"done",result:{ok:n,error:i}}}function xe(t,n){if(t.phase==="done")return t;switch(n.kind){case"info":return Le(t,n.message,n.links);case"progress":return Te(t,n.message);case"auth_url":return Me(t,n.url,n.instructions);case"device_code":return Pe(t,n.userCode,n.verificationUri,n.intervalSeconds,n.expiresInSeconds);case"prompt":return ve(t,n);case"prompt_cancelled":return je(t,n.promptId);case"done":return De(t,n.ok,n.error)}}var V={},nt,Lt;function ke(){return Lt||(Lt=1,nt=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),nt}var rt={},U={},Tt;function F(){if(Tt)return U;Tt=1;let t;const n=[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 U.getSymbolSize=function(r){if(!r)throw new Error('"version" cannot be null or undefined');if(r<1||r>40)throw new Error('"version" should be in range from 1 to 40');return r*4+17},U.getSymbolTotalCodewords=function(r){return n[r]},U.getBCHDigit=function(i){let r=0;for(;i!==0;)r++,i>>>=1;return r},U.setToSJISFunction=function(r){if(typeof r!="function")throw new Error('"toSJISFunc" is not a valid function.');t=r},U.isKanjiModeEnabled=function(){return typeof t<"u"},U.toSJIS=function(r){return t(r)},U}var ot={},Mt;function Rt(){return Mt||(Mt=1,(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function n(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.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: "+i)}}t.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},t.from=function(r,e){if(t.isValid(r))return r;try{return n(r)}catch{return e}}})(ot)),ot}var it,Pt;function Ue(){if(Pt)return it;Pt=1;function t(){this.buffer=[],this.length=0}return t.prototype={get:function(n){const i=Math.floor(n/8);return(this.buffer[i]>>>7-n%8&1)===1},put:function(n,i){for(let r=0;r<i;r++)this.putBit((n>>>i-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(n){const i=Math.floor(this.length/8);this.buffer.length<=i&&this.buffer.push(0),n&&(this.buffer[i]|=128>>>this.length%8),this.length++}},it=t,it}var st,vt;function qe(){if(vt)return st;vt=1;function t(n){if(!n||n<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=n,this.data=new Uint8Array(n*n),this.reservedBit=new Uint8Array(n*n)}return t.prototype.set=function(n,i,r,e){const o=n*this.size+i;this.data[o]=r,e&&(this.reservedBit[o]=!0)},t.prototype.get=function(n,i){return this.data[n*this.size+i]},t.prototype.xor=function(n,i,r){this.data[n*this.size+i]^=r},t.prototype.isReserved=function(n,i){return this.reservedBit[n*this.size+i]},st=t,st}var at={},jt;function Fe(){return jt||(jt=1,(function(t){const n=F().getSymbolSize;t.getRowColCoords=function(r){if(r===1)return[];const e=Math.floor(r/7)+2,o=n(r),s=o===145?26:Math.ceil((o-13)/(2*e-2))*2,a=[o-7];for(let u=1;u<e-1;u++)a[u]=a[u-1]-s;return a.push(6),a.reverse()},t.getPositions=function(r){const e=[],o=t.getRowColCoords(r),s=o.length;for(let a=0;a<s;a++)for(let u=0;u<s;u++)a===0&&u===0||a===0&&u===s-1||a===s-1&&u===0||e.push([o[a],o[u]]);return e}})(at)),at}var ut={},Dt;function ze(){if(Dt)return ut;Dt=1;const t=F().getSymbolSize,n=7;return ut.getPositions=function(r){const e=t(r);return[[0,0],[e-n,0],[0,e-n]]},ut}var ct={},xt;function Ke(){return xt||(xt=1,(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const n={N1:3,N2:3,N3:40,N4:10};t.isValid=function(e){return e!=null&&e!==""&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){const o=e.size;let s=0,a=0,u=0,c=null,m=null;for(let E=0;E<o;E++){a=u=0,c=m=null;for(let S=0;S<o;S++){let h=e.get(E,S);h===c?a++:(a>=5&&(s+=n.N1+(a-5)),c=h,a=1),h=e.get(S,E),h===m?u++:(u>=5&&(s+=n.N1+(u-5)),m=h,u=1)}a>=5&&(s+=n.N1+(a-5)),u>=5&&(s+=n.N1+(u-5))}return s},t.getPenaltyN2=function(e){const o=e.size;let s=0;for(let a=0;a<o-1;a++)for(let u=0;u<o-1;u++){const c=e.get(a,u)+e.get(a,u+1)+e.get(a+1,u)+e.get(a+1,u+1);(c===4||c===0)&&s++}return s*n.N2},t.getPenaltyN3=function(e){const o=e.size;let s=0,a=0,u=0;for(let c=0;c<o;c++){a=u=0;for(let m=0;m<o;m++)a=a<<1&2047|e.get(c,m),m>=10&&(a===1488||a===93)&&s++,u=u<<1&2047|e.get(m,c),m>=10&&(u===1488||u===93)&&s++}return s*n.N3},t.getPenaltyN4=function(e){let o=0;const s=e.data.length;for(let u=0;u<s;u++)o+=e.data[u];return Math.abs(Math.ceil(o*100/s/5)-10)*n.N4};function i(r,e,o){switch(r){case t.Patterns.PATTERN000:return(e+o)%2===0;case t.Patterns.PATTERN001:return e%2===0;case t.Patterns.PATTERN010:return o%3===0;case t.Patterns.PATTERN011:return(e+o)%3===0;case t.Patterns.PATTERN100:return(Math.floor(e/2)+Math.floor(o/3))%2===0;case t.Patterns.PATTERN101:return e*o%2+e*o%3===0;case t.Patterns.PATTERN110:return(e*o%2+e*o%3)%2===0;case t.Patterns.PATTERN111:return(e*o%3+(e+o)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}t.applyMask=function(e,o){const s=o.size;for(let a=0;a<s;a++)for(let u=0;u<s;u++)o.isReserved(u,a)||o.xor(u,a,i(e,u,a))},t.getBestMask=function(e,o){const s=Object.keys(t.Patterns).length;let a=0,u=1/0;for(let c=0;c<s;c++){o(c),t.applyMask(c,e);const m=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(c,e),m<u&&(u=m,a=c)}return a}})(ct)),ct}var W={},kt;function se(){if(kt)return W;kt=1;const t=Rt(),n=[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],i=[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];return W.getBlocksCount=function(e,o){switch(o){case t.L:return n[(e-1)*4+0];case t.M:return n[(e-1)*4+1];case t.Q:return n[(e-1)*4+2];case t.H:return n[(e-1)*4+3];default:return}},W.getTotalCodewordsCount=function(e,o){switch(o){case t.L:return i[(e-1)*4+0];case t.M:return i[(e-1)*4+1];case t.Q:return i[(e-1)*4+2];case t.H:return i[(e-1)*4+3];default:return}},W}var lt={},Q={},Ut;function Ve(){if(Ut)return Q;Ut=1;const t=new Uint8Array(512),n=new Uint8Array(256);return(function(){let r=1;for(let e=0;e<255;e++)t[e]=r,n[r]=e,r<<=1,r&256&&(r^=285);for(let e=255;e<512;e++)t[e]=t[e-255]})(),Q.log=function(r){if(r<1)throw new Error("log("+r+")");return n[r]},Q.exp=function(r){return t[r]},Q.mul=function(r,e){return r===0||e===0?0:t[n[r]+n[e]]},Q}var qt;function Oe(){return qt||(qt=1,(function(t){const n=Ve();t.mul=function(r,e){const o=new Uint8Array(r.length+e.length-1);for(let s=0;s<r.length;s++)for(let a=0;a<e.length;a++)o[s+a]^=n.mul(r[s],e[a]);return o},t.mod=function(r,e){let o=new Uint8Array(r);for(;o.length-e.length>=0;){const s=o[0];for(let u=0;u<e.length;u++)o[u]^=n.mul(e[u],s);let a=0;for(;a<o.length&&o[a]===0;)a++;o=o.slice(a)}return o},t.generateECPolynomial=function(r){let e=new Uint8Array([1]);for(let o=0;o<r;o++)e=t.mul(e,new Uint8Array([1,n.exp(o)]));return e}})(lt)),lt}var dt,Ft;function He(){if(Ft)return dt;Ft=1;const t=Oe();function n(i){this.genPoly=void 0,this.degree=i,this.degree&&this.initialize(this.degree)}return n.prototype.initialize=function(r){this.degree=r,this.genPoly=t.generateECPolynomial(this.degree)},n.prototype.encode=function(r){if(!this.genPoly)throw new Error("Encoder not initialized");const e=new Uint8Array(r.length+this.degree);e.set(r);const o=t.mod(e,this.genPoly),s=this.degree-o.length;if(s>0){const a=new Uint8Array(this.degree);return a.set(o,s),a}return o},dt=n,dt}var ft={},ht={},gt={},zt;function ae(){return zt||(zt=1,gt.isValid=function(n){return!isNaN(n)&&n>=1&&n<=40}),gt}var D={},Kt;function ue(){if(Kt)return D;Kt=1;const t="[0-9]+",n="[A-Z $%*+\\-./:]+";let i="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";i=i.replace(/u/g,"\\u");const r="(?:(?![A-Z0-9 $%*+\\-./:]|"+i+`)(?:.|[\r
|
|
2
2
|
]))+`;D.KANJI=new RegExp(i,"g"),D.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),D.BYTE=new RegExp(r,"g"),D.NUMERIC=new RegExp(t,"g"),D.ALPHANUMERIC=new RegExp(n,"g");const e=new RegExp("^"+i+"$"),o=new RegExp("^"+t+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return D.testKanji=function(u){return e.test(u)},D.testNumeric=function(u){return o.test(u)},D.testAlphanumeric=function(u){return s.test(u)},D}var Vt;function z(){return Vt||(Vt=1,(function(t){const n=ae(),i=ue();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,s){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!n.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?o.ccBits[0]:s<27?o.ccBits[1]:o.ccBits[2]},t.getBestModeForData=function(o){return i.testNumeric(o)?t.NUMERIC:i.testAlphanumeric(o)?t.ALPHANUMERIC:i.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 r(e){if(typeof e!="string")throw new 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 new Error("Unknown mode: "+e)}}t.from=function(o,s){if(t.isValid(o))return o;try{return r(o)}catch{return s}}})(ht)),ht}var Ot;function Qe(){return Ot||(Ot=1,(function(t){const n=F(),i=se(),r=Rt(),e=z(),o=ae(),s=7973,a=n.getBCHDigit(s);function u(S,h,_){for(let d=1;d<=40;d++)if(h<=t.getCapacity(d,_,S))return d}function c(S,h){return e.getCharCountIndicator(S,h)+4}function m(S,h){let _=0;return S.forEach(function(d){const P=c(d.mode,h);_+=P+d.getBitsLength()}),_}function E(S,h){for(let _=1;_<=40;_++)if(m(S,_)<=t.getCapacity(_,h,e.MIXED))return _}t.from=function(h,_){return o.isValid(h)?parseInt(h,10):_},t.getCapacity=function(h,_,d){if(!o.isValid(h))throw new Error("Invalid QR Code version");typeof d>"u"&&(d=e.BYTE);const P=n.getSymbolTotalCodewords(h),A=i.getTotalCodewordsCount(h,_),L=(P-A)*8;if(d===e.MIXED)return L;const b=L-c(d,h);switch(d){case e.NUMERIC:return Math.floor(b/10*3);case e.ALPHANUMERIC:return Math.floor(b/11*2);case e.KANJI:return Math.floor(b/13);case e.BYTE:default:return Math.floor(b/8)}},t.getBestVersionForData=function(h,_){let d;const P=r.from(_,r.M);if(Array.isArray(h)){if(h.length>1)return E(h,P);if(h.length===0)return 1;d=h[0]}else d=h;return u(d.mode,d.getLength(),P)},t.getEncodedBits=function(h){if(!o.isValid(h)||h<7)throw new Error("Invalid QR Code version");let _=h<<12;for(;n.getBCHDigit(_)-a>=0;)_^=s<<n.getBCHDigit(_)-a;return h<<12|_}})(ft)),ft}var pt={},Ht;function Je(){if(Ht)return pt;Ht=1;const t=F(),n=1335,i=21522,r=t.getBCHDigit(n);return pt.getEncodedBits=function(o,s){const a=o.bit<<3|s;let u=a<<10;for(;t.getBCHDigit(u)-r>=0;)u^=n<<t.getBCHDigit(u)-r;return(a<<10|u)^i},pt}var mt={},wt,Qt;function Ye(){if(Qt)return wt;Qt=1;const t=z();function n(i){this.mode=t.NUMERIC,this.data=i.toString()}return n.getBitsLength=function(r){return 10*Math.floor(r/3)+(r%3?r%3*3+1:0)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(r){let e,o,s;for(e=0;e+3<=this.data.length;e+=3)o=this.data.substr(e,3),s=parseInt(o,10),r.put(s,10);const a=this.data.length-e;a>0&&(o=this.data.substr(e),s=parseInt(o,10),r.put(s,a*3+1))},wt=n,wt}var yt,Jt;function $e(){if(Jt)return yt;Jt=1;const t=z(),n=["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 i(r){this.mode=t.ALPHANUMERIC,this.data=r}return i.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let o;for(o=0;o+2<=this.data.length;o+=2){let s=n.indexOf(this.data[o])*45;s+=n.indexOf(this.data[o+1]),e.put(s,11)}this.data.length%2&&e.put(n.indexOf(this.data[o]),6)},yt=i,yt}var Ct,Yt;function Ge(){if(Yt)return Ct;Yt=1;const t=z();function n(i){this.mode=t.BYTE,typeof i=="string"?this.data=new TextEncoder().encode(i):this.data=new Uint8Array(i)}return n.getBitsLength=function(r){return r*8},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(i){for(let r=0,e=this.data.length;r<e;r++)i.put(this.data[r],8)},Ct=n,Ct}var Et,$t;function We(){if($t)return Et;$t=1;const t=z(),n=F();function i(r){this.mode=t.KANJI,this.data=r}return i.getBitsLength=function(e){return e*13},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(r){let e;for(e=0;e<this.data.length;e++){let o=n.toSJIS(this.data[e]);if(o>=33088&&o<=40956)o-=33088;else if(o>=57408&&o<=60351)o-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+`
|
|
3
|
-
Make sure your charset is UTF-8`);o=(o>>>8&255)*192+(o&255),r.put(o,13)}},Et=i,Et}var Gt;function Xe(){return Gt||(Gt=1,(function(t){const n=z(),i=Ye(),r=$e(),e=Ge(),o=We(),s=ue(),a=F(),u=me();function c(A){return unescape(encodeURIComponent(A)).length}function m(A,L,b){const R=[];let M;for(;(M=A.exec(b))!==null;)R.push({data:M[0],index:M.index,mode:L,length:M[0].length});return R}function E(A){const L=m(s.NUMERIC,n.NUMERIC,A),b=m(s.ALPHANUMERIC,n.ALPHANUMERIC,A);let R,M;return a.isKanjiModeEnabled()?(R=m(s.BYTE,n.BYTE,A),M=m(s.KANJI,n.KANJI,A)):(R=m(s.BYTE_KANJI,n.BYTE,A),M=[]),L.concat(b,R,M).sort(function(
|
|
4
|
-
Suggested mode is: `+n.toString(R));switch(b===n.KANJI&&!a.isKanjiModeEnabled()&&(b=n.BYTE),b){case n.NUMERIC:return new i(A);case n.ALPHANUMERIC:return new r(A);case n.KANJI:return new o(A);case n.BYTE:return new e(A)}}t.fromArray=function(L){return L.reduce(function(b,R){return typeof R=="string"?b.push(P(R,null)):R.data&&b.push(P(R.data,R.mode)),b},[])},t.fromString=function(L,b){const R=E(L,a.isKanjiModeEnabled()),M=_(R),p=d(M,b),
|
|
3
|
+
Make sure your charset is UTF-8`);o=(o>>>8&255)*192+(o&255),r.put(o,13)}},Et=i,Et}var Gt;function Xe(){return Gt||(Gt=1,(function(t){const n=z(),i=Ye(),r=$e(),e=Ge(),o=We(),s=ue(),a=F(),u=me();function c(A){return unescape(encodeURIComponent(A)).length}function m(A,L,b){const R=[];let M;for(;(M=A.exec(b))!==null;)R.push({data:M[0],index:M.index,mode:L,length:M[0].length});return R}function E(A){const L=m(s.NUMERIC,n.NUMERIC,A),b=m(s.ALPHANUMERIC,n.ALPHANUMERIC,A);let R,M;return a.isKanjiModeEnabled()?(R=m(s.BYTE,n.BYTE,A),M=m(s.KANJI,n.KANJI,A)):(R=m(s.BYTE_KANJI,n.BYTE,A),M=[]),L.concat(b,R,M).sort(function(B,w){return B.index-w.index}).map(function(B){return{data:B.data,mode:B.mode,length:B.length}})}function S(A,L){switch(L){case n.NUMERIC:return i.getBitsLength(A);case n.ALPHANUMERIC:return r.getBitsLength(A);case n.KANJI:return o.getBitsLength(A);case n.BYTE:return e.getBitsLength(A)}}function h(A){return A.reduce(function(L,b){const R=L.length-1>=0?L[L.length-1]:null;return R&&R.mode===b.mode?(L[L.length-1].data+=b.data,L):(L.push(b),L)},[])}function _(A){const L=[];for(let b=0;b<A.length;b++){const R=A[b];switch(R.mode){case n.NUMERIC:L.push([R,{data:R.data,mode:n.ALPHANUMERIC,length:R.length},{data:R.data,mode:n.BYTE,length:R.length}]);break;case n.ALPHANUMERIC:L.push([R,{data:R.data,mode:n.BYTE,length:R.length}]);break;case n.KANJI:L.push([R,{data:R.data,mode:n.BYTE,length:c(R.data)}]);break;case n.BYTE:L.push([{data:R.data,mode:n.BYTE,length:c(R.data)}])}}return L}function d(A,L){const b={},R={start:{}};let M=["start"];for(let p=0;p<A.length;p++){const B=A[p],w=[];for(let g=0;g<B.length;g++){const I=B[g],y=""+p+g;w.push(y),b[y]={node:I,lastCount:0},R[y]={};for(let N=0;N<M.length;N++){const C=M[N];b[C]&&b[C].node.mode===I.mode?(R[C][y]=S(b[C].lastCount+I.length,I.mode)-S(b[C].lastCount,I.mode),b[C].lastCount+=I.length):(b[C]&&(b[C].lastCount=I.length),R[C][y]=S(I.length,I.mode)+4+n.getCharCountIndicator(I.mode,L))}}M=w}for(let p=0;p<M.length;p++)R[M[p]].end=0;return{map:R,table:b}}function P(A,L){let b;const R=n.getBestModeForData(A);if(b=n.from(L,R),b!==n.BYTE&&b.bit<R.bit)throw new Error('"'+A+'" cannot be encoded with mode '+n.toString(b)+`.
|
|
4
|
+
Suggested mode is: `+n.toString(R));switch(b===n.KANJI&&!a.isKanjiModeEnabled()&&(b=n.BYTE),b){case n.NUMERIC:return new i(A);case n.ALPHANUMERIC:return new r(A);case n.KANJI:return new o(A);case n.BYTE:return new e(A)}}t.fromArray=function(L){return L.reduce(function(b,R){return typeof R=="string"?b.push(P(R,null)):R.data&&b.push(P(R.data,R.mode)),b},[])},t.fromString=function(L,b){const R=E(L,a.isKanjiModeEnabled()),M=_(R),p=d(M,b),B=u.find_path(p.map,"start","end"),w=[];for(let g=1;g<B.length-1;g++)w.push(p.table[B[g]].node);return t.fromArray(h(w))},t.rawSplit=function(L){return t.fromArray(E(L,a.isKanjiModeEnabled()))}})(mt)),mt}var Wt;function Ze(){if(Wt)return rt;Wt=1;const t=F(),n=Rt(),i=Ue(),r=qe(),e=Fe(),o=ze(),s=Ke(),a=se(),u=He(),c=Qe(),m=Je(),E=z(),S=Xe();function h(p,B){const w=p.size,g=o.getPositions(B);for(let I=0;I<g.length;I++){const y=g[I][0],N=g[I][1];for(let C=-1;C<=7;C++)if(!(y+C<=-1||w<=y+C))for(let f=-1;f<=7;f++)N+f<=-1||w<=N+f||(C>=0&&C<=6&&(f===0||f===6)||f>=0&&f<=6&&(C===0||C===6)||C>=2&&C<=4&&f>=2&&f<=4?p.set(y+C,N+f,!0,!0):p.set(y+C,N+f,!1,!0))}}function _(p){const B=p.size;for(let w=8;w<B-8;w++){const g=w%2===0;p.set(w,6,g,!0),p.set(6,w,g,!0)}}function d(p,B){const w=e.getPositions(B);for(let g=0;g<w.length;g++){const I=w[g][0],y=w[g][1];for(let N=-2;N<=2;N++)for(let C=-2;C<=2;C++)N===-2||N===2||C===-2||C===2||N===0&&C===0?p.set(I+N,y+C,!0,!0):p.set(I+N,y+C,!1,!0)}}function P(p,B){const w=p.size,g=c.getEncodedBits(B);let I,y,N;for(let C=0;C<18;C++)I=Math.floor(C/3),y=C%3+w-8-3,N=(g>>C&1)===1,p.set(I,y,N,!0),p.set(y,I,N,!0)}function A(p,B,w){const g=p.size,I=m.getEncodedBits(B,w);let y,N;for(y=0;y<15;y++)N=(I>>y&1)===1,y<6?p.set(y,8,N,!0):y<8?p.set(y+1,8,N,!0):p.set(g-15+y,8,N,!0),y<8?p.set(8,g-y-1,N,!0):y<9?p.set(8,15-y-1+1,N,!0):p.set(8,15-y-1,N,!0);p.set(g-8,8,1,!0)}function L(p,B){const w=p.size;let g=-1,I=w-1,y=7,N=0;for(let C=w-1;C>0;C-=2)for(C===6&&C--;;){for(let f=0;f<2;f++)if(!p.isReserved(I,C-f)){let j=!1;N<B.length&&(j=(B[N]>>>y&1)===1),p.set(I,C-f,j),y--,y===-1&&(N++,y=7)}if(I+=g,I<0||w<=I){I-=g,g=-g;break}}}function b(p,B,w){const g=new i;w.forEach(function(f){g.put(f.mode.bit,4),g.put(f.getLength(),E.getCharCountIndicator(f.mode,p)),f.write(g)});const I=t.getSymbolTotalCodewords(p),y=a.getTotalCodewordsCount(p,B),N=(I-y)*8;for(g.getLengthInBits()+4<=N&&g.put(0,4);g.getLengthInBits()%8!==0;)g.putBit(0);const C=(N-g.getLengthInBits())/8;for(let f=0;f<C;f++)g.put(f%2?17:236,8);return R(g,p,B)}function R(p,B,w){const g=t.getSymbolTotalCodewords(B),I=a.getTotalCodewordsCount(B,w),y=g-I,N=a.getBlocksCount(B,w),C=g%N,f=N-C,j=Math.floor(g/N),q=Math.floor(y/N),Y=q+1,H=j-q,he=new u(H);let X=0;const $=new Array(N),bt=new Array(N);let Z=0;const ge=new Uint8Array(p.buffer);for(let K=0;K<N;K++){const et=K<f?q:Y;$[K]=ge.slice(X,X+et),bt[K]=he.encode($[K]),X+=et,Z=Math.max(Z,et)}const tt=new Uint8Array(g);let At=0,x,k;for(x=0;x<Z;x++)for(k=0;k<N;k++)x<$[k].length&&(tt[At++]=$[k][x]);for(x=0;x<H;x++)for(k=0;k<N;k++)tt[At++]=bt[k][x];return tt}function M(p,B,w,g){let I;if(Array.isArray(p))I=S.fromArray(p);else if(typeof p=="string"){let j=B;if(!j){const q=S.rawSplit(p);j=c.getBestVersionForData(q,w)}I=S.fromString(p,j||40)}else throw new Error("Invalid data");const y=c.getBestVersionForData(I,w);if(!y)throw new Error("The amount of data is too big to be stored in a QR Code");if(!B)B=y;else if(B<y)throw new Error(`
|
|
5
5
|
The chosen QR Code version cannot contain this amount of data.
|
|
6
6
|
Minimum version required to store current data is: `+y+`.
|
|
7
|
-
`);const
|
|
8
|
-
`;return typeof a=="function"&&a(null,P),P},St}var ee;function nn(){if(ee)return V;ee=1;const t=ke(),n=Ze(),i=tn(),r=en();function e(o,s,a,u,c){const m=[].slice.call(arguments,1),E=m.length,S=typeof m[E-1]=="function";if(!S&&!t())throw new Error("Callback required as last argument");if(S){if(E<2)throw new Error("Too few arguments provided");E===2?(c=a,a=s,s=u=void 0):E===3&&(s.getContext&&typeof c>"u"?(c=u,u=void 0):(c=u,u=a,a=s,s=void 0))}else{if(E<1)throw new Error("Too few arguments provided");return E===1?(a=s,s=u=void 0):E===2&&!s.getContext&&(u=a,a=s,s=void 0),new Promise(function(h,_){try{const d=n.create(a,u);h(o(d,s,u))}catch(d){_(d)}})}try{const h=n.create(a,u);c(null,o(h,s,u))}catch(h){c(h)}}return V.create=n.create,V.toCanvas=e.bind(null,i.render),V.toDataURL=e.bind(null,i.renderToDataURL),V.toString=e.bind(null,function(o,s,a){return r.render(o,a)}),V}var rn=nn();const on=pe(rn),sn="_qr_lnaw6_1",an="_placeholder_lnaw6_2",ne={qr:sn,placeholder:an},un=320;function le({value:t,label:n}){const[i,r]=v.useState(null),[e,o]=v.useState(!1);return v.useEffect(()=>{let s=!0;return r(null),o(!1),on.toDataURL(t,{width:un,margin:1,errorCorrectionLevel:"M"}).then(a=>{s&&r(a)}).catch(()=>{s&&o(!0)}),()=>{s=!1}},[t]),e?null:i?l.jsx("img",{className:ne.qr,src:i,alt:n}):l.jsx("div",{className:ne.placeholder,"aria-hidden":"true"})}const cn="_body_1yyw5_1",ln="_status_1yyw5_11",dn="_statusLine_1yyw5_17",fn="_statusLineProgress_1yyw5_18",hn="_statusText_1yyw5_28",gn="_prompt_1yyw5_40",pn="_promptMessage_1yyw5_46",mn="_options_1yyw5_51",wn="_option_1yyw5_51",yn="_optionLabel_1yyw5_76",Cn="_optionDescription_1yyw5_81",En="_success_1yyw5_86",Nn="_error_1yyw5_91",Bn="_oauth_1yyw5_98",Sn="_oauthInstructions_1yyw5_107",In="_oauthMain_1yyw5_115",Rn="_oauthActions_1yyw5_123",bn="_openButton_1yyw5_135",An="_urlRow_1yyw5_156",_n="_oauthUrl_1yyw5_164",Ln="_oauthQr_1yyw5_175",Tn="_oauthQrCaption_1yyw5_184",Mn="_deviceCode_1yyw5_191",Pn="_countdown_1yyw5_198",T={body:cn,status:ln,statusLine:dn,statusLineProgress:fn,statusText:hn,prompt:gn,promptMessage:pn,options:mn,option:wn,optionLabel:yn,optionDescription:Cn,success:En,error:Nn,oauth:Bn,oauthInstructions:Sn,oauthMain:In,oauthActions:Rn,openButton:bn,urlRow:An,oauthUrl:_n,oauthQr:Ln,oauthQrCaption:Tn,deviceCode:Mn,countdown:Pn},vn=1200,de="provider-auth-prompt-form";function jn(){const t=O(a=>a.pendingLogin),n=O(a=>a.cancelLogin),i=O(a=>a.clearLogin),r=O(a=>a.retryLogin),e=re(a=>a.client),o=Re(),s=v.useCallback(()=>{o.invalidateQueries({queryKey:ye.providerAuthList()})},[o]);return!t||!e?null:l.jsx(Dn,{provider:t.provider,providerName:t.providerName,authType:t.authType,controller:t.controller,client:e,onCancel:n,onClear:i,onRetry:r,onSuccess:s},`${t.provider}:${t.authType}:${t.attempt}`)}function Dn({provider:t,providerName:n,authType:i,controller:r,client:e,onCancel:o,onClear:s,onRetry:a,onSuccess:u}){var I,y,B,C;const[c,m]=v.useReducer(xe,_e(t,i)),E=v.useRef(null),S=v.useRef(!1),h=v.useRef(!1),[_,d]=v.useState(""),[P,A]=v.useState(null);v.useEffect(()=>(h.current=!0,S.current||(S.current=!0,e.loginProvider(t,i,{prompt:f=>new Promise((j,q)=>{var Y;E.current={promptId:f.promptId,resolve:j,reject:q},m({kind:"prompt",...f}),(Y=f.signal)==null||Y.addEventListener("abort",()=>{var H;((H=E.current)==null?void 0:H.promptId)===f.promptId&&(E.current=null),d(""),m({kind:"prompt_cancelled",promptId:f.promptId})},{once:!0})}),onEvent:f=>m(f)},{signal:r.signal}).then(f=>{h.current&&m({kind:"done",ok:f.ok,error:f.error})}).catch(f=>{h.current&&m({kind:"done",ok:!1,error:f instanceof Error?f.message:String(f)})})),()=>{var f;h.current=!1,(f=E.current)==null||f.reject(new Error("login dialog closed")),E.current=null}),[]),v.useEffect(()=>{var j;if(c.phase!=="done"||!((j=c.result)!=null&&j.ok))return;u();const f=setTimeout(s,vn);return()=>clearTimeout(f)},[c.phase,(I=c.result)==null?void 0:I.ok,u,s]);function L(f){const j=E.current;j&&(E.current=null,A(j.promptId),d(""),j.resolve(f))}function b(f){f.preventDefault(),L(_)}function R(f){f||(c.phase==="done"?s():o())}const M=c.phase==="done",p=M&&((y=c.result)==null?void 0:y.ok)===!0,N=M&&((B=c.result)==null?void 0:B.ok)===!1,w=c.phase==="prompt"&&c.prompt&&c.prompt.promptId!==P?c.prompt:void 0,g=w&&w.promptKind!=="select"?w:void 0;return l.jsx(oe,{open:!0,onOpenChange:R,title:`Log in to ${n}`,width:480,footer:M?l.jsxs(l.Fragment,{children:[l.jsx(G,{variant:"ghost",onClick:s,children:"Close"}),N&&l.jsx(G,{onClick:a,children:"Try again"})]}):l.jsxs(l.Fragment,{children:[l.jsx(G,{variant:"ghost",onClick:o,children:"Cancel"}),g&&l.jsx(G,{type:"submit",form:de,children:"Submit"})]}),children:l.jsxs("div",{className:T.body,children:[l.jsx(xn,{state:c}),!M&&c.authUrl&&l.jsx(qn,{authUrl:c.authUrl,showInstructions:!g}),!M&&c.deviceCode&&l.jsx(zn,{deviceCode:c.deviceCode,stopped:M}),w&&l.jsx(kn,{prompt:w,inputValue:_,onInputChange:d,onTextSubmit:b,onSelect:L}),p&&l.jsx("p",{className:T.success,children:"Signed in. Closing…"}),N&&l.jsx("p",{className:T.error,children:((C=c.result)==null?void 0:C.error)??"Login failed."})]})})}function xn({state:t}){return t.statusLines.length===0&&t.phase!=="starting"?null:l.jsxs("div",{className:T.status,children:[t.phase==="starting"&&l.jsxs("div",{className:T.statusLine,children:[l.jsx(It,{size:"sm"})," Starting…"]}),t.statusLines.map((n,i)=>{var r;return l.jsxs("div",{className:n.kind==="progress"?T.statusLineProgress:T.statusLine,children:[n.kind==="progress"&&l.jsx(It,{size:"sm"}),l.jsxs("span",{className:T.statusText,children:[l.jsx("span",{children:n.message}),(r=n.links)==null?void 0:r.map(e=>l.jsx("a",{href:e.url,target:"_blank",rel:"noreferrer",children:e.label??e.url},e.url))]})]},i)})]})}function kn({prompt:t,inputValue:n,onInputChange:i,onTextSubmit:r,onSelect:e}){var o;return t.promptKind==="select"?l.jsxs("div",{className:T.prompt,children:[l.jsx("p",{className:T.promptMessage,children:t.message}),l.jsx("div",{className:T.options,children:(o=t.options)==null?void 0:o.map(s=>l.jsxs("button",{type:"button",className:T.option,onClick:()=>e(s.id),children:[l.jsx("span",{className:T.optionLabel,children:s.label}),s.description&&l.jsx("span",{className:T.optionDescription,children:s.description})]},s.id))})]}):l.jsxs("form",{id:de,className:T.prompt,onSubmit:r,children:[l.jsx("label",{className:T.promptMessage,htmlFor:"login-prompt-input",children:t.message}),l.jsx(Ce,{id:"login-prompt-input",autoFocus:!0,type:t.promptKind==="secret"?"password":"text",autoComplete:t.promptKind==="secret"?"off":void 0,"data-1p-ignore":t.promptKind==="secret"?"true":void 0,"data-lpignore":t.promptKind==="secret"?"true":void 0,"data-bwignore":t.promptKind==="secret"?"true":void 0,placeholder:t.placeholder,value:n,onChange:s=>i(s.target.value)})]})}const Un=1800;function fe({value:t,label:n}){const[i,r]=v.useState(!1);return v.useEffect(()=>{if(!i)return;const e=setTimeout(()=>r(!1),Un);return()=>clearTimeout(e)},[i]),l.jsx(Ee,{size:"sm","aria-label":i?"Copied":n,title:i?"Copied":n,onClick:()=>{Ne(t).then(()=>r(!0),()=>r(!1))},children:i?l.jsx(be,{size:14}):l.jsx(Ae,{size:14})})}function qn({authUrl:t,showInstructions:n}){return l.jsxs("div",{className:T.oauth,children:[n&&t.instructions&&l.jsx("p",{className:T.oauthInstructions,children:t.instructions}),l.jsxs("div",{className:T.oauthMain,children:[l.jsxs("div",{className:T.oauthActions,children:[l.jsxs("a",{className:T.openButton,href:t.url,target:"_blank",rel:"noreferrer",children:[l.jsx(ie,{size:14}),"Open login page"]}),l.jsxs("div",{className:T.urlRow,children:[l.jsx("span",{className:T.oauthUrl,children:t.url}),l.jsx(fe,{value:t.url,label:"Copy link"})]})]}),l.jsxs("div",{className:T.oauthQr,children:[l.jsx(le,{value:t.url,label:"QR code for the provider's login page"}),l.jsx("span",{className:T.oauthQrCaption,children:"Scan on another device"})]})]})]})}function Fn(t){const n=Math.max(0,t),i=Math.floor(n/60),r=n%60;return`${i}:${String(r).padStart(2,"0")}`}function zn({deviceCode:t,stopped:n}){const[i,r]=v.useState(t.expiresInSeconds);return v.useEffect(()=>{if(n||t.expiresInSeconds===void 0)return;r(t.expiresInSeconds);const e=setInterval(()=>{r(o=>o===void 0?void 0:Math.max(0,o-1))},1e3);return()=>clearInterval(e)},[t.expiresInSeconds,n]),l.jsx("div",{className:T.oauth,children:l.jsxs("div",{className:T.oauthMain,children:[l.jsxs("div",{className:T.oauthActions,children:[l.jsx("span",{className:T.oauthInstructions,children:"Enter this code at the verification page"}),l.jsxs("div",{className:T.urlRow,children:[l.jsx("span",{className:T.deviceCode,children:t.userCode}),l.jsx(fe,{value:t.userCode,label:"Copy code"})]}),l.jsxs("a",{className:T.openButton,href:t.verificationUri,target:"_blank",rel:"noreferrer",children:[l.jsx(ie,{size:14}),"Open verification page"]}),i!==void 0&&l.jsx("span",{className:T.countdown,children:i>0?`Expires in ${Fn(i)}`:"Code expired"})]}),l.jsxs("div",{className:T.oauthQr,children:[l.jsx(le,{value:t.verificationUri,label:"QR code for the verification page"}),l.jsx("span",{className:T.oauthQrCaption,children:"Scan on another device"})]})]})})}const Kn="_shell_13hat_7",Vn="_sidebar_13hat_14",On="_category_13hat_24",Hn="_categoryActive_13hat_44",Qn="_content_13hat_2",J={shell:Kn,sidebar:Vn,category:On,categoryActive:Hn,content:Qn};function er({open:t,onOpenChange:n}){var _;const i=re(d=>d.serverInfo),r=O(d=>d.pendingLogin),e=O(d=>d.cancelLogin),o=Be(i==null?void 0:i.features),s=Se.filter(d=>d.available(o)),[a,u]=v.useState((_=s[0])==null?void 0:_.id);v.useEffect(()=>{var d;s.some(P=>P.id===a)||u((d=s[0])==null?void 0:d.id)},[s.map(d=>d.id).join(",")]);const c=s.find(d=>d.id===a)??s[0],m=c==null?void 0:c.component;function E(d){!d&&r&&e(),n(d)}function S(d){if(r){d.preventDefault();return}const P=d.detail.originalEvent.target;P instanceof Node&&!P.isConnected&&d.preventDefault()}function h(d){r&&d.preventDefault()}return l.jsxs(l.Fragment,{children:[l.jsx(oe,{open:t,onOpenChange:E,title:"Settings",width:900,onInteractOutside:S,onEscapeKeyDown:h,children:l.jsxs("div",{className:J.shell,children:[l.jsx("nav",{className:J.sidebar,children:s.map(d=>l.jsxs("button",{type:"button",className:we(J.category,d.id===(c==null?void 0:c.id)&&J.categoryActive),onClick:()=>u(d.id),children:[l.jsx(Ie,{icon:d.icon,size:"sm"}),d.label]},d.id))}),l.jsx("div",{className:J.content,children:m?l.jsx(v.Suspense,{fallback:l.jsxs(_t,{children:[l.jsx(It,{size:"sm"})," Loading…"]}),children:l.jsx(m,{})}):l.jsx(_t,{children:"No settings categories available."})})]})}),l.jsx(jn,{})]})}export{er as SettingsDialog};
|
|
7
|
+
`);const N=b(B,w,I),C=t.getSymbolSize(B),f=new r(C);return h(f,B),_(f),d(f,B),A(f,w,0),B>=7&&P(f,B),L(f,N),isNaN(g)&&(g=s.getBestMask(f,A.bind(null,f,w))),s.applyMask(g,f),A(f,w,g),{modules:f,version:B,errorCorrectionLevel:w,maskPattern:g,segments:I}}return rt.create=function(B,w){if(typeof B>"u"||B==="")throw new Error("No input text");let g=n.M,I,y;return typeof w<"u"&&(g=n.from(w.errorCorrectionLevel,n.M),I=c.from(w.version),y=s.from(w.maskPattern),w.toSJISFunc&&t.setToSJISFunction(w.toSJISFunc)),M(B,I,g,y)},rt}var Bt={},Nt={},Xt;function ce(){return Xt||(Xt=1,(function(t){function n(i){if(typeof i=="number"&&(i=i.toString()),typeof i!="string")throw new Error("Color should be defined as hex string");let r=i.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+i);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(o){return[o,o]}))),r.length===6&&r.push("F","F");const e=parseInt(r.join(""),16);return{r:e>>24&255,g:e>>16&255,b:e>>8&255,a:e&255,hex:"#"+r.slice(0,6).join("")}}t.getOptions=function(r){r||(r={}),r.color||(r.color={});const e=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,o=r.width&&r.width>=21?r.width:void 0,s=r.scale||4;return{width:o,scale:o?4:s,margin:e,color:{dark:n(r.color.dark||"#000000ff"),light:n(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},t.getScale=function(r,e){return e.width&&e.width>=r+e.margin*2?e.width/(r+e.margin*2):e.scale},t.getImageWidth=function(r,e){const o=t.getScale(r,e);return Math.floor((r+e.margin*2)*o)},t.qrToImageData=function(r,e,o){const s=e.modules.size,a=e.modules.data,u=t.getScale(s,o),c=Math.floor((s+o.margin*2)*u),m=o.margin*u,E=[o.color.light,o.color.dark];for(let S=0;S<c;S++)for(let h=0;h<c;h++){let _=(S*c+h)*4,d=o.color.light;if(S>=m&&h>=m&&S<c-m&&h<c-m){const P=Math.floor((S-m)/u),A=Math.floor((h-m)/u);d=E[a[P*s+A]?1:0]}r[_++]=d.r,r[_++]=d.g,r[_++]=d.b,r[_]=d.a}}})(Nt)),Nt}var Zt;function tn(){return Zt||(Zt=1,(function(t){const n=ce();function i(e,o,s){e.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=s,o.width=s,o.style.height=s+"px",o.style.width=s+"px"}function r(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}t.render=function(o,s,a){let u=a,c=s;typeof u>"u"&&(!s||!s.getContext)&&(u=s,s=void 0),s||(c=r()),u=n.getOptions(u);const m=n.getImageWidth(o.modules.size,u),E=c.getContext("2d"),S=E.createImageData(m,m);return n.qrToImageData(S.data,o,u),i(E,c,m),E.putImageData(S,0,0),c},t.renderToDataURL=function(o,s,a){let u=a;typeof u>"u"&&(!s||!s.getContext)&&(u=s,s=void 0),u||(u={});const c=t.render(o,s,u),m=u.type||"image/png",E=u.rendererOpts||{};return c.toDataURL(m,E.quality)}})(Bt)),Bt}var St={},te;function en(){if(te)return St;te=1;const t=ce();function n(e,o){const s=e.a/255,a=o+'="'+e.hex+'"';return s<1?a+" "+o+'-opacity="'+s.toFixed(2).slice(1)+'"':a}function i(e,o,s){let a=e+o;return typeof s<"u"&&(a+=" "+s),a}function r(e,o,s){let a="",u=0,c=!1,m=0;for(let E=0;E<e.length;E++){const S=Math.floor(E%o),h=Math.floor(E/o);!S&&!c&&(c=!0),e[E]?(m++,E>0&&S>0&&e[E-1]||(a+=c?i("M",S+s,.5+h+s):i("m",u,0),u=0,c=!1),S+1<o&&e[E+1]||(a+=i("h",m),m=0)):u++}return a}return St.render=function(o,s,a){const u=t.getOptions(s),c=o.modules.size,m=o.modules.data,E=c+u.margin*2,S=u.color.light.a?"<path "+n(u.color.light,"fill")+' d="M0 0h'+E+"v"+E+'H0z"/>':"",h="<path "+n(u.color.dark,"stroke")+' d="'+r(m,c,u.margin)+'"/>',_='viewBox="0 0 '+E+" "+E+'"',P='<svg xmlns="http://www.w3.org/2000/svg" '+(u.width?'width="'+u.width+'" height="'+u.width+'" ':"")+_+' shape-rendering="crispEdges">'+S+h+`</svg>
|
|
8
|
+
`;return typeof a=="function"&&a(null,P),P},St}var ee;function nn(){if(ee)return V;ee=1;const t=ke(),n=Ze(),i=tn(),r=en();function e(o,s,a,u,c){const m=[].slice.call(arguments,1),E=m.length,S=typeof m[E-1]=="function";if(!S&&!t())throw new Error("Callback required as last argument");if(S){if(E<2)throw new Error("Too few arguments provided");E===2?(c=a,a=s,s=u=void 0):E===3&&(s.getContext&&typeof c>"u"?(c=u,u=void 0):(c=u,u=a,a=s,s=void 0))}else{if(E<1)throw new Error("Too few arguments provided");return E===1?(a=s,s=u=void 0):E===2&&!s.getContext&&(u=a,a=s,s=void 0),new Promise(function(h,_){try{const d=n.create(a,u);h(o(d,s,u))}catch(d){_(d)}})}try{const h=n.create(a,u);c(null,o(h,s,u))}catch(h){c(h)}}return V.create=n.create,V.toCanvas=e.bind(null,i.render),V.toDataURL=e.bind(null,i.renderToDataURL),V.toString=e.bind(null,function(o,s,a){return r.render(o,a)}),V}var rn=nn();const on=pe(rn),sn="_qr_lnaw6_1",an="_placeholder_lnaw6_2",ne={qr:sn,placeholder:an},un=320;function le({value:t,label:n}){const[i,r]=v.useState(null),[e,o]=v.useState(!1);return v.useEffect(()=>{let s=!0;return r(null),o(!1),on.toDataURL(t,{width:un,margin:1,errorCorrectionLevel:"M"}).then(a=>{s&&r(a)}).catch(()=>{s&&o(!0)}),()=>{s=!1}},[t]),e?null:i?l.jsx("img",{className:ne.qr,src:i,alt:n}):l.jsx("div",{className:ne.placeholder,"aria-hidden":"true"})}const cn="_body_1yyw5_1",ln="_status_1yyw5_11",dn="_statusLine_1yyw5_17",fn="_statusLineProgress_1yyw5_18",hn="_statusText_1yyw5_28",gn="_prompt_1yyw5_40",pn="_promptMessage_1yyw5_46",mn="_options_1yyw5_51",wn="_option_1yyw5_51",yn="_optionLabel_1yyw5_76",Cn="_optionDescription_1yyw5_81",En="_success_1yyw5_86",Bn="_error_1yyw5_91",Nn="_oauth_1yyw5_98",Sn="_oauthInstructions_1yyw5_107",In="_oauthMain_1yyw5_115",Rn="_oauthActions_1yyw5_123",bn="_openButton_1yyw5_135",An="_urlRow_1yyw5_156",_n="_oauthUrl_1yyw5_164",Ln="_oauthQr_1yyw5_175",Tn="_oauthQrCaption_1yyw5_184",Mn="_deviceCode_1yyw5_191",Pn="_countdown_1yyw5_198",T={body:cn,status:ln,statusLine:dn,statusLineProgress:fn,statusText:hn,prompt:gn,promptMessage:pn,options:mn,option:wn,optionLabel:yn,optionDescription:Cn,success:En,error:Bn,oauth:Nn,oauthInstructions:Sn,oauthMain:In,oauthActions:Rn,openButton:bn,urlRow:An,oauthUrl:_n,oauthQr:Ln,oauthQrCaption:Tn,deviceCode:Mn,countdown:Pn},vn=1200,de="provider-auth-prompt-form";function jn(){const t=O(a=>a.pendingLogin),n=O(a=>a.cancelLogin),i=O(a=>a.clearLogin),r=O(a=>a.retryLogin),e=re(a=>a.client),o=Re(),s=v.useCallback(()=>{o.invalidateQueries({queryKey:ye.providerAuthList()})},[o]);return!t||!e?null:l.jsx(Dn,{provider:t.provider,providerName:t.providerName,authType:t.authType,controller:t.controller,client:e,onCancel:n,onClear:i,onRetry:r,onSuccess:s},`${t.provider}:${t.authType}:${t.attempt}`)}function Dn({provider:t,providerName:n,authType:i,controller:r,client:e,onCancel:o,onClear:s,onRetry:a,onSuccess:u}){var I,y,N,C;const[c,m]=v.useReducer(xe,_e(t,i)),E=v.useRef(null),S=v.useRef(!1),h=v.useRef(!1),[_,d]=v.useState(""),[P,A]=v.useState(null);v.useEffect(()=>(h.current=!0,S.current||(S.current=!0,e.loginProvider(t,i,{prompt:f=>new Promise((j,q)=>{var Y;E.current={promptId:f.promptId,resolve:j,reject:q},m({kind:"prompt",...f}),(Y=f.signal)==null||Y.addEventListener("abort",()=>{var H;((H=E.current)==null?void 0:H.promptId)===f.promptId&&(E.current=null),d(""),m({kind:"prompt_cancelled",promptId:f.promptId})},{once:!0})}),onEvent:f=>m(f)},{signal:r.signal}).then(f=>{h.current&&m({kind:"done",ok:f.ok,error:f.error})}).catch(f=>{h.current&&m({kind:"done",ok:!1,error:f instanceof Error?f.message:String(f)})})),()=>{var f;h.current=!1,(f=E.current)==null||f.reject(new Error("login dialog closed")),E.current=null}),[]),v.useEffect(()=>{var j;if(c.phase!=="done"||!((j=c.result)!=null&&j.ok))return;u();const f=setTimeout(s,vn);return()=>clearTimeout(f)},[c.phase,(I=c.result)==null?void 0:I.ok,u,s]);function L(f){const j=E.current;j&&(E.current=null,A(j.promptId),d(""),j.resolve(f))}function b(f){f.preventDefault(),L(_)}function R(f){f||(c.phase==="done"?s():o())}const M=c.phase==="done",p=M&&((y=c.result)==null?void 0:y.ok)===!0,B=M&&((N=c.result)==null?void 0:N.ok)===!1,w=c.phase==="prompt"&&c.prompt&&c.prompt.promptId!==P?c.prompt:void 0,g=w&&w.promptKind!=="select"?w:void 0;return l.jsx(oe,{open:!0,onOpenChange:R,title:`Log in to ${n}`,width:480,footer:M?l.jsxs(l.Fragment,{children:[l.jsx(G,{variant:"ghost",onClick:s,children:"Close"}),B&&l.jsx(G,{onClick:a,children:"Try again"})]}):l.jsxs(l.Fragment,{children:[l.jsx(G,{variant:"ghost",onClick:o,children:"Cancel"}),g&&l.jsx(G,{type:"submit",form:de,children:"Submit"})]}),children:l.jsxs("div",{className:T.body,children:[l.jsx(xn,{state:c}),!M&&c.authUrl&&l.jsx(qn,{authUrl:c.authUrl,showInstructions:!g}),!M&&c.deviceCode&&l.jsx(zn,{deviceCode:c.deviceCode,stopped:M}),w&&l.jsx(kn,{prompt:w,inputValue:_,onInputChange:d,onTextSubmit:b,onSelect:L}),p&&l.jsx("p",{className:T.success,children:"Signed in. Closing…"}),B&&l.jsx("p",{className:T.error,children:((C=c.result)==null?void 0:C.error)??"Login failed."})]})})}function xn({state:t}){return t.statusLines.length===0&&t.phase!=="starting"?null:l.jsxs("div",{className:T.status,children:[t.phase==="starting"&&l.jsxs("div",{className:T.statusLine,children:[l.jsx(It,{size:"sm"})," Starting…"]}),t.statusLines.map((n,i)=>{var r;return l.jsxs("div",{className:n.kind==="progress"?T.statusLineProgress:T.statusLine,children:[n.kind==="progress"&&l.jsx(It,{size:"sm"}),l.jsxs("span",{className:T.statusText,children:[l.jsx("span",{children:n.message}),(r=n.links)==null?void 0:r.map(e=>l.jsx("a",{href:e.url,target:"_blank",rel:"noreferrer",children:e.label??e.url},e.url))]})]},i)})]})}function kn({prompt:t,inputValue:n,onInputChange:i,onTextSubmit:r,onSelect:e}){var o;return t.promptKind==="select"?l.jsxs("div",{className:T.prompt,children:[l.jsx("p",{className:T.promptMessage,children:t.message}),l.jsx("div",{className:T.options,children:(o=t.options)==null?void 0:o.map(s=>l.jsxs("button",{type:"button",className:T.option,onClick:()=>e(s.id),children:[l.jsx("span",{className:T.optionLabel,children:s.label}),s.description&&l.jsx("span",{className:T.optionDescription,children:s.description})]},s.id))})]}):l.jsxs("form",{id:de,className:T.prompt,onSubmit:r,children:[l.jsx("label",{className:T.promptMessage,htmlFor:"login-prompt-input",children:t.message}),l.jsx(Ce,{id:"login-prompt-input",autoFocus:!0,type:t.promptKind==="secret"?"password":"text",autoComplete:t.promptKind==="secret"?"off":void 0,"data-1p-ignore":t.promptKind==="secret"?"true":void 0,"data-lpignore":t.promptKind==="secret"?"true":void 0,"data-bwignore":t.promptKind==="secret"?"true":void 0,placeholder:t.placeholder,value:n,onChange:s=>i(s.target.value)})]})}const Un=1800;function fe({value:t,label:n}){const[i,r]=v.useState(!1);return v.useEffect(()=>{if(!i)return;const e=setTimeout(()=>r(!1),Un);return()=>clearTimeout(e)},[i]),l.jsx(Ee,{size:"sm","aria-label":i?"Copied":n,title:i?"Copied":n,onClick:()=>{Be(t).then(()=>r(!0),()=>r(!1))},children:i?l.jsx(be,{size:14}):l.jsx(Ae,{size:14})})}function qn({authUrl:t,showInstructions:n}){return l.jsxs("div",{className:T.oauth,children:[n&&t.instructions&&l.jsx("p",{className:T.oauthInstructions,children:t.instructions}),l.jsxs("div",{className:T.oauthMain,children:[l.jsxs("div",{className:T.oauthActions,children:[l.jsxs("a",{className:T.openButton,href:t.url,target:"_blank",rel:"noreferrer",children:[l.jsx(ie,{size:14}),"Open login page"]}),l.jsxs("div",{className:T.urlRow,children:[l.jsx("span",{className:T.oauthUrl,children:t.url}),l.jsx(fe,{value:t.url,label:"Copy link"})]})]}),l.jsxs("div",{className:T.oauthQr,children:[l.jsx(le,{value:t.url,label:"QR code for the provider's login page"}),l.jsx("span",{className:T.oauthQrCaption,children:"Scan on another device"})]})]})]})}function Fn(t){const n=Math.max(0,t),i=Math.floor(n/60),r=n%60;return`${i}:${String(r).padStart(2,"0")}`}function zn({deviceCode:t,stopped:n}){const[i,r]=v.useState(t.expiresInSeconds);return v.useEffect(()=>{if(n||t.expiresInSeconds===void 0)return;r(t.expiresInSeconds);const e=setInterval(()=>{r(o=>o===void 0?void 0:Math.max(0,o-1))},1e3);return()=>clearInterval(e)},[t.expiresInSeconds,n]),l.jsx("div",{className:T.oauth,children:l.jsxs("div",{className:T.oauthMain,children:[l.jsxs("div",{className:T.oauthActions,children:[l.jsx("span",{className:T.oauthInstructions,children:"Enter this code at the verification page"}),l.jsxs("div",{className:T.urlRow,children:[l.jsx("span",{className:T.deviceCode,children:t.userCode}),l.jsx(fe,{value:t.userCode,label:"Copy code"})]}),l.jsxs("a",{className:T.openButton,href:t.verificationUri,target:"_blank",rel:"noreferrer",children:[l.jsx(ie,{size:14}),"Open verification page"]}),i!==void 0&&l.jsx("span",{className:T.countdown,children:i>0?`Expires in ${Fn(i)}`:"Code expired"})]}),l.jsxs("div",{className:T.oauthQr,children:[l.jsx(le,{value:t.verificationUri,label:"QR code for the verification page"}),l.jsx("span",{className:T.oauthQrCaption,children:"Scan on another device"})]})]})})}const Kn="_shell_13hat_7",Vn="_sidebar_13hat_14",On="_category_13hat_24",Hn="_categoryActive_13hat_44",Qn="_content_13hat_2",J={shell:Kn,sidebar:Vn,category:On,categoryActive:Hn,content:Qn};function er({open:t,onOpenChange:n}){var _;const i=re(d=>d.serverInfo),r=O(d=>d.pendingLogin),e=O(d=>d.cancelLogin),o=Ne(i==null?void 0:i.features),s=Se.filter(d=>d.available(o)),[a,u]=v.useState((_=s[0])==null?void 0:_.id);v.useEffect(()=>{var d;s.some(P=>P.id===a)||u((d=s[0])==null?void 0:d.id)},[s.map(d=>d.id).join(",")]);const c=s.find(d=>d.id===a)??s[0],m=c==null?void 0:c.component;function E(d){!d&&r&&e(),n(d)}function S(d){if(r){d.preventDefault();return}const P=d.detail.originalEvent.target;P instanceof Node&&!P.isConnected&&d.preventDefault()}function h(d){r&&d.preventDefault()}return l.jsxs(l.Fragment,{children:[l.jsx(oe,{open:t,onOpenChange:E,title:"Settings",width:900,onInteractOutside:S,onEscapeKeyDown:h,children:l.jsxs("div",{className:J.shell,children:[l.jsx("nav",{className:J.sidebar,children:s.map(d=>l.jsxs("button",{type:"button",className:we(J.category,d.id===(c==null?void 0:c.id)&&J.categoryActive),onClick:()=>u(d.id),children:[l.jsx(Ie,{icon:d.icon,size:"sm"}),d.label]},d.id))}),l.jsx("div",{className:J.content,children:m?l.jsx(v.Suspense,{fallback:l.jsxs(_t,{children:[l.jsx(It,{size:"sm"})," Loading…"]}),children:l.jsx(m,{})}):l.jsx(_t,{children:"No settings categories available."})})]})}),l.jsx(jn,{})]})}export{er as SettingsDialog};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var ce=Object.defineProperty;var ie=(n,e,t)=>e in n?ce(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var U=(n,e,t)=>ie(n,typeof e!="symbol"?e+"":e,t);import{r as s,j as b}from"./vendor-react-DQUAl2K8.js";import{x as ue,a as le}from"./vendor-terminal-BhzX2_ts.js";import{f as X,g as ae,T as J,u as fe,h as de,i as me,j as pe,k as Q,S as he,l as Re,m as we}from"./index-
|
|
1
|
+
var ce=Object.defineProperty;var ie=(n,e,t)=>e in n?ce(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var U=(n,e,t)=>ie(n,typeof e!="symbol"?e+"":e,t);import{r as s,j as b}from"./vendor-react-DQUAl2K8.js";import{x as ue,a as le}from"./vendor-terminal-BhzX2_ts.js";import{f as X,g as ae,T as J,u as fe,h as de,i as me,j as pe,k as Q,S as he,l as Re,m as we}from"./index-Dsmi2Bzk.js";import"./vendor-DaF96HbP.js";import"./vendor-query-i7fr__Xm.js";import"./vendor-icons-K8oF_80Q.js";import"./vendor-overlays-3MkedLFU.js";import"./vendor-dnd-CayJj8TC.js";class Se{constructor(e){U(this,"subscribers",new Map);U(this,"detach",null);this.daemon=e}start(){this.detach||(this.detach=this.daemon.onTerminalFrame(e=>this.dispatch(e)))}stop(){var e;(e=this.detach)==null||e.call(this),this.detach=null}subscribeSlot(e,t){return this.subscribers.set(e,t),()=>{this.subscribers.get(e)===t&&this.subscribers.delete(e)}}hasSlot(e){return this.subscribers.has(e)}sendInput(e,t){this.daemon.sendBinary(X({opcode:"Input",slot:e,data:t}))}sendResize(e,t,d){this.daemon.sendBinary(X({opcode:"Resize",slot:e,rows:t,cols:d}))}dispatch(e){var d,R,p;const t=this.subscribers.get(e.slot);if(t)switch(e.opcode){case"Output":(d=t.onOutput)==null||d.call(t,e.data);return;case"Snapshot":(R=t.onSnapshot)==null||R.call(t,e.data);return;case"Restore":(p=t.onRestore)==null||p.call(t,e.data);return;default:return}}}const ye=3e3,Z=`${ae.sm}px ${J}`,ee="M";function te(){if(typeof document>"u"||!document.fonts)return!0;try{return document.fonts.check(Z,ee)}catch{return!0}}const Te=(async()=>{if(typeof document>"u"||!document.fonts||te())return;let n;try{await Promise.race([document.fonts.load(Z,ee),new Promise(e=>{n=window.setTimeout(e,ye)})])}catch{}finally{window.clearTimeout(n)}})(),_e=2,ve=1;function y(n){if(n==null)return!1;const{cols:e,rows:t}=n;return typeof e=="number"&&Number.isInteger(e)&&e>=_e&&typeof t=="number"&&Number.isInteger(t)&&t>=ve}function ge(n,e){return n===null||e===null?n===e:n.cols===e.cols&&n.rows===e.rows}function xe(n,e){return y(n)?!ge(n,e):!1}function be(n,e){if(e===null)return;const t=n.find(R=>R.slot===e);if(!t)return;const d={cols:t.cols,rows:t.rows};return y(d)?d:void 0}const Fe="_wrap_1fx2h_1",Ee="_terminal_1fx2h_12",Ae="_statusOverlay_1fx2h_19",ze="_exitedBanner_1fx2h_30",z={wrap:Fe,terminal:Ee,statusOverlay:Ae,exitedBanner:ze},Oe=64*1024,$=new TextEncoder,K=new WeakMap;function Ne(n){let e=K.get(n);return e||(e=new Se(n),e.start(),K.set(n,e)),e}function Y(n){const e=Q.getState(),t=e.tabs.find(d=>d.id===n);return!t||t.workspaceCwd!==e.activeWorkspaceCwd?!1:Re(we.getState().layouts[t.workspaceCwd],n)}function Le({tab:n}){const e=n.data,t=fe(r=>r.client),d=de(n.id),{settings:R,resolvedTheme:p}=me(),B=R.monoFont&&R.monoFont.trim()!==""?p.fontFamily.mono:J,W=s.useRef(null),w=s.useRef(null),T=s.useRef(null),_=s.useRef(e.slot),O=s.useRef(null),N=s.useRef([]),I=s.useRef(0),F=s.useRef(null),ne=s.useRef(null),E=s.useRef(null),v=s.useRef(null),A=s.useRef(null),k=s.useRef(!1),H=s.useRef(null),V=s.useRef(t);V.current=t;const D=s.useRef(e.exited??!1);D.current=e.exited??!1;const[g,re]=s.useState(e.slot),[j,M]=s.useState({isAttaching:!0,error:null}),[q,se]=s.useState(te);s.useEffect(()=>{if(q)return;let r=!1;return Te.then(()=>{r||se(!0)}),()=>{r=!0}},[q]);const C=()=>{var o,c;const r=(o=T.current)==null?void 0:o.proposeDimensions();(c=E.current)==null||c.call(E,y(r)?r:null)},oe=()=>{var r;A.current=null,k.current=!0,(r=T.current)==null||r.fit(),C(),requestAnimationFrame(()=>{k.current=!1})},P=()=>{v.current!==null&&window.clearTimeout(v.current),v.current=window.setTimeout(()=>{v.current=null,A.current===null&&(A.current=requestAnimationFrame(oe))},60)};s.useEffect(()=>{const r=W.current;if(!r||!q)return;const o=new ue.Terminal({cursorBlink:!0,fontFamily:B,fontSize:p.fontSize.code,scrollback:5e3,theme:p.colors.terminal,allowProposedApi:!0}),c=new le.FitAddon;o.loadAddon(c),o.open(r);const f=u=>{if(!Y(n.id))return;const l=_.current,S=O.current;l===null||!S||xe(u,F.current)&&(F.current=u,S.sendResize(l,u.rows,u.cols))},a=o.onData(u=>{if(D.current)return;const l=_.current,S=O.current;if(l===null||!S){const G=$.encode(u);I.current+G.length<=Oe&&(N.current.push(G),I.current+=G.length);return}S.sendInput(l,$.encode(u))}),m=o.onResize(({cols:u,rows:l})=>{f({cols:u,rows:l})}),h=()=>{c.fit(),C()};r.addEventListener("focusin",h),c.fit(),w.current=o,T.current=c,E.current=f;const i=new ResizeObserver(u=>{if(k.current)return;const l=u[0];l&&(l.contentRect.width===0||l.contentRect.height===0)||P()});return i.observe(r),()=>{i.disconnect(),v.current!==null&&window.clearTimeout(v.current),A.current!==null&&cancelAnimationFrame(A.current),r.removeEventListener("focusin",h),a.dispose(),m.dispose(),o.dispose(),w.current=null,T.current=null,E.current=null}},[q]),s.useEffect(()=>{const r=w.current;if(!r)return;r.options.theme=p.colors.terminal;const o=p.fontSize.code,c=B,f=H.current,a=f!==null&&(f.size!==o||f.family!==c);r.options.fontSize=o,r.options.fontFamily=c,H.current={size:o,family:c},a&&P()},[p,B]),s.useEffect(()=>{if(!e.exited)return;const r=w.current;r&&(r.options.cursorBlink=!1,r.blur())},[e.exited]),s.useEffect(()=>{if(t)return t.connection.onSessionMessage(r=>{const o=r;if(!pe(o))return;const c=be(o.terminals,_.current);c!==void 0&&(F.current=c)})},[t]);const x=s.useRef(!1),L=s.useRef(!1);return s.useEffect(()=>{var f;if(x.current=!0,!t||_.current!==null||L.current)return()=>{x.current=!1};L.current=!0;const r=e.cwd||"~",o=(f=T.current)==null?void 0:f.proposeDimensions(),c=y(o)?o:null;return t.connection.request("create_terminal_request",{workspaceId:"",cwd:r,...c?{cols:c.cols,rows:c.rows}:{}}).then(a=>{const m=a.terminal.slot;if(!x.current){t.connection.request("kill_terminal_request",{slot:m}).catch(()=>{});return}_.current=m,re(m),Q.getState().updateData(n.id,{slot:m});const h={cols:a.terminal.cols,rows:a.terminal.rows};F.current=y(h)?h:null}).catch(a=>{x.current&&M({isAttaching:!1,error:a instanceof Error?a.message:String(a)})}).finally(()=>{L.current=!1}),()=>{x.current=!1}},[t,n.id]),s.useEffect(()=>()=>{const r=_.current;r!==null&&setTimeout(()=>{var o;x.current||D.current||(o=V.current)==null||o.connection.request("kill_terminal_request",{slot:r}).catch(()=>{})},0)},[]),s.useEffect(()=>{var h;if(!t||g===null)return;M({isAttaching:!0,error:null});const r=Ne(t.connection);O.current=r;const o=i=>{var u,l;(u=w.current)==null||u.reset(),(l=w.current)==null||l.write(i)},c=r.subscribeSlot(g,{onOutput:i=>{var u;return(u=w.current)==null?void 0:u.write(i)},onSnapshot:o,onRestore:o});let f=!1;const a=(h=T.current)==null?void 0:h.proposeDimensions(),m=y(a)&&Y(n.id)?a:null;return t.connection.request("subscribe_terminal_request",{slot:g,restoreMode:"reflowable",...m?{cols:m.cols,rows:m.rows}:{}}).then(i=>{if(f)return;M({isAttaching:!1,error:null}),ne.current=(i==null?void 0:i.restoreMode)??"basic";const u=N.current;N.current=[],I.current=0;for(const S of u)r.sendInput(g,S);const l={cols:i==null?void 0:i.cols,rows:i==null?void 0:i.rows};F.current=y(l)?l:m,C()}).catch(i=>{f||(N.current=[],I.current=0,M({isAttaching:!1,error:i instanceof Error?i.message:String(i)}))}),()=>{f=!0,c(),O.current=null,t.connection.request("unsubscribe_terminal_request",{slot:g}).catch(()=>{})}},[t,g]),s.useEffect(()=>{d&&P()},[d]),b.jsxs("div",{className:z.wrap,children:[b.jsx("div",{ref:W,className:z.terminal}),j.error?b.jsxs("div",{className:z.statusOverlay,children:["Terminal error: ",j.error]}):j.isAttaching?b.jsxs("div",{className:z.statusOverlay,children:[b.jsx(he,{size:"sm"})," Starting terminal…"]}):null,e.exited?b.jsx("div",{className:z.exitedBanner,children:"Terminal exited"}):null]})}export{Le as TerminalPanel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./vendor-react-DQUAl2K8.js";import{E as r,S as t,B as a,P as c}from"./index-
|
|
1
|
+
import{j as e}from"./vendor-react-DQUAl2K8.js";import{E as r,S as t,B as a,P as c}from"./index-Dsmi2Bzk.js";import{u as m,C as d}from"./CodeView-_q2A5_u4.js";import"./vendor-query-i7fr__Xm.js";import"./vendor-DaF96HbP.js";import"./vendor-icons-K8oF_80Q.js";import"./vendor-overlays-3MkedLFU.js";import"./vendor-dnd-CayJj8TC.js";import"./use-file-download-Dg_DH4LU.js";const x="_note_1g5yz_1",j="_body_1g5yz_9",g="_tooLarge_1g5yz_13",i={note:x,body:j,tooLarge:g};function n(o){return`${(o/(1024*1024)).toFixed(1)} MB`}function b({path:o}){const s=m(o);switch(s.kind){case"loading":return e.jsxs(r,{children:[e.jsx(t,{size:"sm"})," Loading..."]});case"inline":return e.jsx(d,{path:o,content:s.content});case"streaming":return e.jsxs(r,{children:[e.jsx(t,{size:"sm"})," Streaming ",n(s.size)," file..."]});case"stream-error":return e.jsxs(r,{children:["Error: ",s.message]});case"streamed":return e.jsxs(c,{children:[e.jsxs("div",{className:i.note,children:[n(s.size)," file streamed"]}),e.jsx("div",{className:i.body,children:e.jsx(d,{path:o,content:s.content})})]});case"too-large":{const l=o.split("/").pop()||o;return e.jsx(r,{children:e.jsxs("div",{className:i.tooLarge,children:[e.jsxs("div",{children:[n(s.size)," — too large to display (display ceiling is"," ",n(s.maxDisplayBytes),")."]}),s.downloading?e.jsx(t,{size:"sm"}):s.downloadUrl?e.jsx("a",{href:s.downloadUrl,download:s.downloadName||l,children:e.jsx(a,{size:"sm",children:"Save file"})}):e.jsx(a,{size:"sm",onClick:()=>s.requestDownload(),children:"Download"})]})})}case"error":return e.jsxs(r,{children:["Error: ",s.message]})}}export{b as TextViewer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as o}from"./vendor-react-DQUAl2K8.js";import{E as e,S as t}from"./index-
|
|
1
|
+
import{j as o}from"./vendor-react-DQUAl2K8.js";import{E as e,S as t}from"./index-Dsmi2Bzk.js";import{u as n}from"./use-file-download-Dg_DH4LU.js";import"./vendor-query-i7fr__Xm.js";import"./vendor-DaF96HbP.js";import"./vendor-icons-K8oF_80Q.js";import"./vendor-overlays-3MkedLFU.js";import"./vendor-dnd-CayJj8TC.js";const a="_wrap_gy3e6_1",d="_video_gy3e6_10",s={wrap:a,video:d};function v({path:i,workspaceCwd:m}){const r=n(i);return r.isLoading?o.jsxs(e,{children:[o.jsx(t,{size:"sm"})," Loading video..."]}):r.isError?o.jsxs(e,{children:["Error: ",r.error instanceof Error?r.error.message:"unknown error"]}):r.data?o.jsx("div",{className:s.wrap,children:o.jsx("video",{className:s.video,src:r.data.objectUrl,controls:!0})}):null}export{v as VideoViewer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./vendor-react-DQUAl2K8.js";import{S as a}from"./Switch-1I6AMAC7.js";import{b as n}from"./index-
|
|
1
|
+
import{j as s}from"./vendor-react-DQUAl2K8.js";import{S as a}from"./Switch-1I6AMAC7.js";import{b as n}from"./index-Dsmi2Bzk.js";import"./vendor-DaF96HbP.js";import"./vendor-query-i7fr__Xm.js";import"./vendor-icons-K8oF_80Q.js";import"./vendor-overlays-3MkedLFU.js";import"./vendor-dnd-CayJj8TC.js";const c="_list_x2x5z_1",l="_row_x2x5z_7",m="_rowMain_x2x5z_17",d="_name_x2x5z_24",x="_description_x2x5z_29",p="_note_x2x5z_34",i={list:c,row:l,rowMain:m,name:d,description:x,note:p};function z(){const o=n(e=>e.capable),r=n(e=>e.isViewerEnabled("molviewer")),t=n(e=>e.setEnabled);return s.jsxs("div",{className:i.list,children:[s.jsxs("div",{className:i.row,children:[s.jsxs("div",{className:i.rowMain,children:[s.jsx("span",{className:i.name,children:"Molecule Viewer"}),s.jsx("span",{className:i.description,children:"Open molecular structure files (.cif, .pdb, .xyz, and similar) in the 3D viewer instead of as plain text."})]}),s.jsx(a,{checked:r,disabled:!o,onCheckedChange:e=>void t("molviewer",e),"aria-label":"Molecule Viewer"})]}),!o&&s.jsx("p",{className:i.note,children:"Requires a newer daemon."})]})}export{z as ViewersPanel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as l,a as o,c as i}from"./index-
|
|
1
|
+
import{n as l,a as o,c as i}from"./index-Dsmi2Bzk.js";const u=/^([a-zA-Z][a-zA-Z0-9+.-]*):/;function d(n){try{return decodeURIComponent(n)}catch{return n}}function p(n,a,r){const s=n.trim();if(!s)return null;const e=s.split(/[?#]/,1)[0];if(!e||u.exec(e))return null;let t;if(e.startsWith("/")?t=e:e==="~"||e.startsWith("~/")?t=r?l(e,r):null:t=o(e,a??""),!t)return null;const c=i(t);return d(c)}export{u as S,d as p,p as r};
|