@chainingintention/pi-web-cn 2.202610.2 → 2.202610.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/client/assets/CommandPicker-gK2biReF.js +70 -0
  2. package/dist/client/assets/PiWebApp-Do_8tp5d.js +3761 -0
  3. package/dist/client/assets/SettingsDialog-vGDo1-BJ.js +1015 -0
  4. package/dist/client/assets/index-Ura0RJyr.js +2 -0
  5. package/dist/client/assets/managementEmbed-Bx8Mwzdw.js +2 -0
  6. package/dist/client/assets/preload-helper-XpATwJ5c.js +1 -0
  7. package/dist/client/index.html +3 -2
  8. package/dist/pi-web-plugins/custom-ui-codex/LICENSE-icons +35 -0
  9. package/dist/pi-web-plugins/custom-ui-codex/README.md +25 -0
  10. package/dist/pi-web-plugins/custom-ui-codex/chat-settings.css +251 -0
  11. package/dist/pi-web-plugins/custom-ui-codex/codex.css +77 -0
  12. package/dist/{client/assets/graphite-DquaqFXU.css → pi-web-plugins/custom-ui-codex/graphite.css} +4 -2
  13. package/dist/pi-web-plugins/custom-ui-codex/package.json +10 -0
  14. package/dist/{client/assets/paper-CB1oLuRr.css → pi-web-plugins/custom-ui-codex/paper.css} +7 -5
  15. package/dist/pi-web-plugins/custom-ui-codex/pi-web-plugin.js +56 -0
  16. package/dist/pi-web-plugins/files/browser/pi-web-plugin.js +29 -29
  17. package/dist/pi-web-plugins/workspace-tasks/tasksPanelElement.js +3 -3
  18. package/dist/pi-web-plugins/zh-cn/components.json +6 -1
  19. package/dist/plugin-api.d.ts +48 -0
  20. package/dist/server/terminals/requiredTerminalService.js +2 -53
  21. package/dist/server/terminals/requiredTerminalService.js.map +1 -1
  22. package/dist/shared/terminalCommandRun.js +56 -0
  23. package/dist/shared/terminalCommandRun.js.map +1 -0
  24. package/docs/config.md +6 -2
  25. package/docs/plugins.md +22 -1
  26. package/package.json +2 -2
  27. package/dist/client/assets/PiWebApp-BVnLs9Kj.js +0 -4938
  28. package/dist/client/assets/external-B9K8duyP.js +0 -2
  29. package/dist/client/assets/index-pOnX1cs_.js +0 -2
@@ -1,2 +0,0 @@
1
- var e=globalThis,t=e.ShadowRoot&&(e.ShadyCSS===void 0||e.ShadyCSS.nativeShadow)&&`adoptedStyleSheets`in Document.prototype&&`replace`in CSSStyleSheet.prototype,n=Symbol(),r=new WeakMap,i=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==n)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,n=this.t;if(t&&e===void 0){let t=n!==void 0&&n.length===1;t&&(e=r.get(n)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),t&&r.set(n,e))}return e}toString(){return this.cssText}},a=e=>new i(typeof e==`string`?e:e+``,void 0,n),o=(e,...t)=>new i(e.length===1?e[0]:t.reduce((t,n,r)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if(typeof e==`number`)return e;throw Error(`Value passed to 'css' function must be a 'css' function result: `+e+`. Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.`)})(n)+e[r+1],e[0]),e,n),s=(n,r)=>{if(t)n.adoptedStyleSheets=r.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let t of r){let r=document.createElement(`style`),i=e.litNonce;i!==void 0&&r.setAttribute(`nonce`,i),r.textContent=t.cssText,n.appendChild(r)}},c=t?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t=``;for(let n of e.cssRules)t+=n.cssText;return a(t)})(e):e,{is:l,defineProperty:u,getOwnPropertyDescriptor:d,getOwnPropertyNames:ee,getOwnPropertySymbols:te,getPrototypeOf:ne}=Object,f=globalThis,re=f.trustedTypes,ie=re?re.emptyScript:``,ae=f.reactiveElementPolyfillSupport,p=(e,t)=>e,m={toAttribute(e,t){switch(t){case Boolean:e=e?ie:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},h=(e,t)=>!l(e,t),oe={attribute:!0,type:String,converter:m,reflect:!1,useDefault:!1,hasChanged:h};Symbol.metadata??=Symbol(`metadata`),f.litPropertyMetadata??=new WeakMap;var g=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=oe){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let n=Symbol(),r=this.getPropertyDescriptor(e,n,t);r!==void 0&&u(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){let{get:r,set:i}=d(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:r,set(t){let a=r?.call(this);i?.call(this,t),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??oe}static _$Ei(){if(this.hasOwnProperty(p(`elementProperties`)))return;let e=ne(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(p(`finalized`)))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(p(`properties`))){let e=this.properties,t=[...ee(e),...te(e)];for(let n of t)this.createProperty(n,e[n])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=new Map;for(let[e,t]of this.elementProperties){let n=this._$Eu(e,t);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let e of n)t.unshift(c(e))}else e!==void 0&&t.push(c(e));return t}static _$Eu(e,t){let n=t.attribute;return!1===n?void 0:typeof n==`string`?n:typeof e==`string`?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){let n=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,n);if(r!==void 0&&!0===n.reflect){let i=(n.converter?.toAttribute===void 0?m:n.converter).toAttribute(t,n.type);this._$Em=e,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(e,t){let n=this.constructor,r=n._$Eh.get(e);if(r!==void 0&&this._$Em!==r){let e=n.getPropertyOptions(r),i=typeof e.converter==`function`?{fromAttribute:e.converter}:e.converter?.fromAttribute===void 0?m:e.converter;this._$Em=r;let a=i.fromAttribute(t,e.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(e,t,n,r=!1,i){if(e!==void 0){let a=this.constructor;if(!1===r&&(i=this[e]),n??=a.getPropertyOptions(e),!((n.hasChanged??h)(i,t)||n.useDefault&&n.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:r,wrapped:i},a){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??t??this[e]),!0!==i||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),!0===r&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}let e=this.constructor.elementProperties;if(e.size>0)for(let[t,n]of e){let{wrapped:e}=n,r=this[t];!0!==e||this._$AL.has(t)||r===void 0||this.C(t,void 0,n,r)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}};g.elementStyles=[],g.shadowRootOptions={mode:`open`},g[p(`elementProperties`)]=new Map,g[p(`finalized`)]=new Map,ae?.({ReactiveElement:g}),(f.reactiveElementVersions??=[]).push(`2.1.2`);var se=globalThis,ce=e=>e,_=se.trustedTypes,le=_?_.createPolicy(`lit-html`,{createHTML:e=>e}):void 0,ue=`$lit$`,v=`lit$${Math.random().toFixed(9).slice(2)}$`,y=`?`+v,de=`<${y}>`,b=document,x=()=>b.createComment(``),S=e=>e===null||typeof e!=`object`&&typeof e!=`function`,C=Array.isArray,fe=e=>C(e)||typeof e?.[Symbol.iterator]==`function`,w=`[
2
- \f\r]`,T=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,pe=/-->/g,me=/>/g,E=RegExp(`>|${w}(?:([^\\s"'>=/]+)(${w}*=${w}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,`g`),he=/'/g,ge=/"/g,_e=/^(?:script|style|textarea|title)$/i,D=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),ve=D(1),ye=D(2),be=D(3),O=Symbol.for(`lit-noChange`),k=Symbol.for(`lit-nothing`),xe=new WeakMap,A=b.createTreeWalker(b,129);function Se(e,t){if(!C(e)||!e.hasOwnProperty(`raw`))throw Error(`invalid template strings array`);return le===void 0?t:le.createHTML(t)}var Ce=(e,t)=>{let n=e.length-1,r=[],i,a=t===2?`<svg>`:t===3?`<math>`:``,o=T;for(let t=0;t<n;t++){let n=e[t],s,c,l=-1,u=0;for(;u<n.length&&(o.lastIndex=u,c=o.exec(n),c!==null);)u=o.lastIndex,o===T?c[1]===`!--`?o=pe:c[1]===void 0?c[2]===void 0?c[3]!==void 0&&(o=E):(_e.test(c[2])&&(i=RegExp(`</`+c[2],`g`)),o=E):o=me:o===E?c[0]===`>`?(o=i??T,l=-1):c[1]===void 0?l=-2:(l=o.lastIndex-c[2].length,s=c[1],o=c[3]===void 0?E:c[3]===`"`?ge:he):o===ge||o===he?o=E:o===pe||o===me?o=T:(o=E,i=void 0);let d=o===E&&e[t+1].startsWith(`/>`)?` `:``;a+=o===T?n+de:l>=0?(r.push(s),n.slice(0,l)+ue+n.slice(l)+v+d):n+v+(l===-2?t:d)}return[Se(e,a+(e[n]||`<?>`)+(t===2?`</svg>`:t===3?`</math>`:``)),r]},j=class e{constructor({strings:t,_$litType$:n},r){let i;this.parts=[];let a=0,o=0,s=t.length-1,c=this.parts,[l,u]=Ce(t,n);if(this.el=e.createElement(l,r),A.currentNode=this.el.content,n===2||n===3){let e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;(i=A.nextNode())!==null&&c.length<s;){if(i.nodeType===1){if(i.hasAttributes())for(let e of i.getAttributeNames())if(e.endsWith(ue)){let t=u[o++],n=i.getAttribute(e).split(v),r=/([.?@])?(.*)/.exec(t);c.push({type:1,index:a,name:r[2],strings:n,ctor:r[1]===`.`?Te:r[1]===`?`?Ee:r[1]===`@`?De:P}),i.removeAttribute(e)}else e.startsWith(v)&&(c.push({type:6,index:a}),i.removeAttribute(e));if(_e.test(i.tagName)){let e=i.textContent.split(v),t=e.length-1;if(t>0){i.textContent=_?_.emptyScript:``;for(let n=0;n<t;n++)i.append(e[n],x()),A.nextNode(),c.push({type:2,index:++a});i.append(e[t],x())}}}else if(i.nodeType===8){if(i.data===y)c.push({type:2,index:a});else{let e=-1;for(;(e=i.data.indexOf(v,e+1))!==-1;)c.push({type:7,index:a}),e+=v.length-1}}a++}}static createElement(e,t){let n=b.createElement(`template`);return n.innerHTML=e,n}};function M(e,t,n=e,r){if(t===O)return t;let i=r===void 0?n._$Cl:n._$Co?.[r],a=S(t)?void 0:t._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),a===void 0?i=void 0:(i=new a(e),i._$AT(e,n,r)),r===void 0?n._$Cl=i:(n._$Co??=[])[r]=i),i!==void 0&&(t=M(e,i._$AS(e,t.values),i,r)),t}var we=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:n}=this._$AD,r=(e?.creationScope??b).importNode(t,!0);A.currentNode=r;let i=A.nextNode(),a=0,o=0,s=n[0];for(;s!==void 0;){if(a===s.index){let t;s.type===2?t=new N(i,i.nextSibling,this,e):s.type===1?t=new s.ctor(i,s.name,s.strings,this,e):s.type===6&&(t=new Oe(i,this,e)),this._$AV.push(t),s=n[++o]}a!==s?.index&&(i=A.nextNode(),a++)}return A.currentNode=b,r}p(e){let t=0;for(let n of this._$AV)n!==void 0&&(n.strings===void 0?n._$AI(e[t]):(n._$AI(e,n,t),t+=n.strings.length-2)),t++}},N=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,r){this.type=2,this._$AH=k,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=M(this,e,t),S(e)?e===k||e==null||e===``?(this._$AH!==k&&this._$AR(),this._$AH=k):e!==this._$AH&&e!==O&&this._(e):e._$litType$===void 0?e.nodeType===void 0?fe(e)?this.k(e):this._(e):this.T(e):this.$(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==k&&S(this._$AH)?this._$AA.nextSibling.data=e:this.T(b.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:n}=e,r=typeof n==`number`?this._$AC(e):(n.el===void 0&&(n.el=j.createElement(Se(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(t);else{let e=new we(r,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=xe.get(e.strings);return t===void 0&&xe.set(e.strings,t=new j(e)),t}k(t){C(this._$AH)||(this._$AH=[],this._$AR());let n=this._$AH,r,i=0;for(let a of t)i===n.length?n.push(r=new e(this.O(x()),this.O(x()),this,this.options)):r=n[i],r._$AI(a),i++;i<n.length&&(this._$AR(r&&r._$AB.nextSibling,i),n.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let t=ce(e).nextSibling;ce(e).remove(),e=t}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},P=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,r,i){this.type=1,this._$AH=k,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=i,n.length>2||n[0]!==``||n[1]!==``?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=k}_$AI(e,t=this,n,r){let i=this.strings,a=!1;if(i===void 0)e=M(this,e,t,0),a=!S(e)||e!==this._$AH&&e!==O,a&&(this._$AH=e);else{let r=e,o,s;for(e=i[0],o=0;o<i.length-1;o++)s=M(this,r[n+o],t,o),s===O&&(s=this._$AH[o]),a||=!S(s)||s!==this._$AH[o],s===k?e=k:e!==k&&(e+=(s??``)+i[o+1]),this._$AH[o]=s}a&&!r&&this.j(e)}j(e){e===k?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??``)}},Te=class extends P{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===k?void 0:e}},Ee=class extends P{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==k)}},De=class extends P{constructor(e,t,n,r,i){super(e,t,n,r,i),this.type=5}_$AI(e,t=this){if((e=M(this,e,t,0)??k)===O)return;let n=this._$AH,r=e===k&&n!==k||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,i=e!==k&&(n===k||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH==`function`?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Oe=class{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){M(this,e)}},ke={M:ue,P:v,A:y,C:1,L:Ce,R:we,D:fe,V:M,I:N,H:P,N:Ee,U:De,B:Te,F:Oe},Ae=se.litHtmlPolyfillSupport;Ae?.(j,N),(se.litHtmlVersions??=[]).push(`3.3.3`);var je=(e,t,n)=>{let r=n?.renderBefore??t,i=r._$litPart$;if(i===void 0){let e=n?.renderBefore??null;r._$litPart$=i=new N(t.insertBefore(x(),e),e,void 0,n??{})}return i._$AI(e),i},F=globalThis,I=class extends g{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=je(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return O}};I._$litElement$=!0,I.finalized=!0,F.litElementHydrateSupport?.({LitElement:I});var Me=F.litElementPolyfillSupport;Me?.({LitElement:I}),(F.litElementVersions??=[]).push(`4.2.2`);function L(e,t=Pe()){let n=new URL(t.viteBaseUrl,t.documentBaseUrl);return new URL(Fe(e),n).toString()}function Ne(e,t=Pe()){let n=new URL(L(e,t));if(n.protocol===`http:`)n.protocol=`ws:`;else if(n.protocol===`https:`)n.protocol=`wss:`;else throw Error(`Cannot create a WebSocket URL from ${n.protocol}`);return n.toString()}function Pe(){return{viteBaseUrl:`./`,documentBaseUrl:typeof document>`u`?`http://localhost/`:document.baseURI}}function Fe(e){return e.startsWith(`/`)?`.${e}`:e}var Ie=class extends Error{constructor(e,t,n){super(R(`en`,{})(e,t,n)),this.messageKey=e,this.fallback=t,this.parameters=n,this.name=`UserFacingError`}},Le=/\{([a-zA-Z][a-zA-Z0-9_]*)\}/gu;function Re(e){return[...new Set([...e.matchAll(Le)].map(e=>e[1]??``))].sort()}function R(e,t){return(n,r,i={})=>{let a=e===`en`||!Object.hasOwn(t,n)?void 0:t[n];return(a!==void 0&&Re(a).join(`,`)===Re(r).join(`,`)?a:r).replace(Le,(e,t)=>Object.hasOwn(i,t)?String(i[t]):e)}}function ze(e){if(typeof e!=`object`||!e||Array.isArray(e))throw Error(`Invalid translation catalog`);let t=[];for(let[n,r]of Object.entries(e)){if(n===``||typeof r!=`string`)throw Error(`Invalid translation catalog`);t.push([n,r])}return Object.fromEntries(t)}var Be=R(`en`,{}),Ve=`en`,He=(e,t,n)=>Be(e,t,n);function Ue(e,t){Be=R(e,ze(t)),Ve=e}function We(){return Ve}var Ge={sessionsDeleteArchived:`sessions.deleteArchived`,sessionsBulkMutations:`sessions.bulkMutations`,sessionsCleanup:`sessions.cleanup`,sessionsReload:`sessions.reload`,sessionsClearQueue:`sessions.clearQueue`,sessionsQueueMessageActions:`sessions.queueMessageActions`,sessionsPersistedState:`sessions.persistedState`,sessionsNotifications:`sessions.notifications`,sessionsUnread:`sessions.unread`,sessionsAskUser:`sessions.askUser`,promptAttachments:`prompt.attachments`,workspaceFileSuggestions:`workspace.fileSuggestions`,piPackagesManage:`piPackages.manage`,selectedMachineSettings:`settings.selectedMachine`,agentProfileConfig:`settings.agentProfile`,pluginLifecycle:`plugins.lifecycle`},Ke=1e3,qe=32768,Je=8192,Ye=`pi-web.ask.answers`,Xe=1e3,Ze=4e3,Qe=1e3,$e=4e3,et=1e4,tt=/^[a-z][a-z0-9.-]*$/u,nt=new Set([`core`,`themes`]),rt=`machine.`,it=`pi-web`,at=`${it}.`;function ot(e){return tt.test(e)}function z(e){return e===it||e.startsWith(at)}function st(e){return nt.has(e)||e.startsWith(rt)||z(e)}var ct=`machine.`;function lt(e,t){if(ft(e,t),st(t))throw Error(`Reserved PI WEB plugin id: ${t}`);return pt(e,t)}function ut(e,t){if(ft(e,t),!z(t))throw Error(`PI WEB bundled plugin id is required: ${t}`);return pt(e,t)}function dt(e,t){return z(t)?ut(e,t):lt(e,t)}function ft(e,t){if(e===``)throw Error(`Machine id is required`);if(!ot(t))throw Error(`Invalid PI WEB plugin id: ${t}`)}function pt(e,t){return`${ct}${mt(e)}.${t}`}function mt(e){return[...new TextEncoder().encode(e)].map(e=>e.toString(16).padStart(2,`0`)).join(``)}var B=262144,ht=8388608,gt=266240,_t=8392704,vt=266240,yt=65536,V=69632,bt=1048576,xt=1e4,St=2048;Object.freeze([`/paired-plugin-backends/:pluginId/:operation`,`/paired-plugin-backends/:pluginId/projects/:projectId/:operation`,`/paired-plugin-backends/:pluginId/projects/:projectId/workspaces/:workspaceId/:operation`]),Object.freeze([`/paired-plugin-backends/:pluginId/channels/:operation`,`/paired-plugin-backends/:pluginId/projects/:projectId/channels/:operation`,`/paired-plugin-backends/:pluginId/projects/:projectId/workspaces/:workspaceId/channels/:operation`]);function Ct(e){let t=e.scope,n=e.projectId,r=e.workspaceId;if(t===void 0&&n===void 0&&r===void 0)return{};if(t!==`machine`&&t!==`project`&&t!==`workspace`)throw Error(`Plugin backend scope must be machine, project, or workspace`);for(let e of[n,r])if(e!==void 0&&(typeof e!=`string`||e===``||e.length>512))throw Error(`Plugin backend scope ids must be non-empty strings of at most 512 characters`);if(t===`machine`&&(n!==void 0||r!==void 0))throw Error(`Machine scope cannot contain project or workspace ids`);if(t===`project`&&r!==void 0)throw Error(`Project scope cannot contain a workspace id`);return{scope:t,...typeof n==`string`?{projectId:n}:{},...typeof r==`string`?{workspaceId:r}:{}}}function wt(e,t){let n=e.workspaceId===void 0?e.projectId===void 0?`machine`:`project`:`workspace`;if(t===void 0)return n;if(n!==`workspace`&&t.scope===void 0)throw Error(`Scoped plugin backend calls require an explicit scope`);if(t.scope!==void 0&&t.scope!==n||t.projectId!==void 0&&t.projectId!==e.projectId||t.workspaceId!==void 0&&t.workspaceId!==e.workspaceId)throw Error(`Plugin backend wire scope does not match route authority`);return n}function Tt(e,t=!1){let n=[``,`paired-plugin-backends`,encodeURIComponent(e.pluginId)];return e.projectId!==void 0&&n.push(`projects`,encodeURIComponent(e.projectId)),e.workspaceId!==void 0&&n.push(`workspaces`,encodeURIComponent(e.workspaceId)),t&&n.push(`channels`),n.push(encodeURIComponent(e.operation)),n.join(`/`)}var Et=/^[a-z][a-z0-9.-]*$/u,Dt=/^[a-z][a-z0-9.-]*$/u,Ot=64;function kt(e){return e.length<=128&&Et.test(e)}function At(e){if(!kt(e))throw Error(`Plugin backend operation must match ${String(Et)} and be at most 128 characters`);return e}function H(e){if(typeof e!=`string`||e===``||e.length>512)throw Error(`Plugin backend revision must be a non-empty string of at most 512 characters`);return e}function U(e,t,n=B){let r=K(e,new Set,t,0);if(W(JSON.stringify(r))>n)throw Error(`${t} exceeds the ${String(n)} byte limit`);return r}function jt(e,t,n=B){if(W(e)>n)throw Error(`${t} exceeds the ${String(n)} byte limit`);let r;try{r=JSON.parse(e)}catch(e){throw Error(`${t} must be valid JSON`,{cause:e})}return U(r,t,n)}function Mt(e,t,n={}){return It({version:1,kind:`open`,...Ct({...n}),revision:H(e),input:U(t,`Plugin backend channel open input`,B)},`Plugin backend channel open envelope`,vt)}function Nt(e){return It({version:1,kind:`data`,data:U(e,`Plugin backend channel data`,yt)},`Plugin backend channel data envelope`,V)}function Pt(e){let t=Lt(e,`Plugin backend channel server frame`);if(zt(t),t.kind===`ready`)return G(e,V,`Plugin backend channel ready frame`),Object.freeze({version:1,kind:`ready`});if(t.kind===`data`)return Rt(t,e);if(t.kind===`error`)return G(e,V,`Plugin backend channel error frame`),Object.freeze({version:1,kind:`error`,code:Bt(t.code),message:Vt(t.message)});throw Error(`Plugin backend channel server frame kind is invalid`)}function Ft(e){if(typeof e!=`string`)throw Error(`Plugin backend channel close reason must be a string`);if(W(e)>120)throw Error(`Plugin backend channel close reason exceeds the 120 byte limit`);return e}function W(e){return new TextEncoder().encode(e).byteLength}function It(e,t,n){let r=JSON.stringify(e);return G(r,n,t),r}function Lt(e,t){G(e,vt,t);let n;try{n=JSON.parse(e)}catch(e){throw Error(`${t} must be valid JSON`,{cause:e})}if(!Ut(n))throw Error(`${t} must be an object`);return n}function Rt(e,t){return G(t,V,`Plugin backend channel data frame`),Object.freeze({version:1,kind:`data`,data:U(e.data,`Plugin backend channel data`,yt)})}function zt(e){if(e.version!==1)throw Error(`Plugin backend channel frame version is unsupported`)}function Bt(e){if(typeof e!=`string`||e.length>64||!Dt.test(e))throw Error(`Plugin backend channel error code is invalid`);return e}function Vt(e){if(typeof e!=`string`||e===``)throw Error(`Plugin backend channel error message must be a non-empty string`);if(W(e)>2048)throw Error(`Plugin backend channel error message exceeds the ${String(St)} byte limit`);return e}function G(e,t,n){if(W(e)>t)throw Error(`${n} exceeds the ${String(t)} byte limit`)}function K(e,t,n,r){if(r>Ot)throw Error(`${n} exceeds the maximum JSON depth of ${String(Ot)}`);if(e===null||typeof e==`string`||typeof e==`boolean`)return e;if(typeof e==`number`){if(!Number.isFinite(e))throw Error(`${n} must contain only finite JSON numbers`);return e}if(Array.isArray(e)){if(t.has(e))throw Error(`${n} must not contain cycles`);t.add(e);let i=e.map(e=>K(e,t,n,r+1));return t.delete(e),Object.freeze(i),i}if(!Ut(e))throw Error(`${n} must contain only JSON values`);if(t.has(e))throw Error(`${n} must not contain cycles`);t.add(e);let i={};for(let[a,o]of Object.entries(e))Ht(i,a,K(o,t,n,r+1));return t.delete(e),Object.freeze(i)}function Ht(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0})}function Ut(e){if(typeof e!=`object`||!e||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}var Wt=`pi-web.terminal`,q=`management`;function J(e=Qt()){return X(e)===q||e===Qt()&&Y()!==void 0&&X(Y()?.search)===q}function Gt(e=Z()){return J(e?.search)?`management`:`normal`}function Kt(e,t=Z(),n=`management`){return Yt(e,t,n,!0)}function qt(e,t=Z(),n=`management`){return Yt(e,t,n,!1)}function Jt(e){if(e!==`management`||globalThis.history===void 0)return;let t=Z();t!==void 0&&Xt(t)?.token!==void 0&&(t.searchParams.delete(`token`),globalThis.history.replaceState(globalThis.history.state,``,`${t.pathname}${t.search}${t.hash}`))}function Yt(e,t,n,r){if(n===`normal`||t===void 0)return e;let i=Xt(t);if(i===void 0)return e;let a=new URL(e,t.origin);return a.searchParams.set(`embed`,i.embed),i.token!==void 0&&a.searchParams.set(`token`,i.token),`${a.pathname}${a.search}${r?a.hash:``}`}function Xt(e){let t=Zt(e);return t===void 0?Zt(Y()):t}function Zt(e){if(e===void 0)return;let t=X(e.search),n=e.searchParams.get(`token`)?.trim();if(t===q)return{embed:t,...n===void 0||n===``?{}:{token:n}}}function Y(){if(typeof window<`u`&&window.parent!==window)try{return new URL(window.parent.location.href)}catch{return}}function X(e){if(e===void 0||e===``)return;let t=new URLSearchParams(e).get(`embed`)?.trim();return t===``?void 0:t}function Qt(){return typeof window>`u`?void 0:window.location.search}function Z(){if(globalThis.location===void 0)return;let e=globalThis.location;if(typeof e.href==`string`&&e.href!==``)return new URL(e.href);let t=typeof e.protocol==`string`&&e.protocol!==``?e.protocol:`http:`,n=typeof e.host==`string`&&e.host!==``?e.host:`localhost`,r=typeof e.search==`string`?e.search:``;return new URL(`${t}//${n}/${r}`)}function $t(e){return{id:e.id,cwd:e.cwd,...e.name===void 0?{}:{name:e.name},...e.metadata===void 0?{}:{metadata:structuredClone(e.metadata)},archived:e.archived===!0,pending:`clientPendingStart`in e&&e.clientPendingStart===!0}}function en(e){let t=e.selectedSession,n=e.selectedMachine,r=e.selectedProject,i=e.selectedWorkspace;return{...n===void 0?{}:{selectedMachine:{id:n.id,name:n.name,kind:n.kind}},...r===void 0?{}:{selectedProject:{id:r.id,name:r.name,path:r.path}},...i===void 0?{}:{selectedWorkspace:{id:i.id,projectId:i.projectId,path:i.path,label:i.label,isMain:i.isMain,...i.branch===void 0?{}:{branch:i.branch},...i.isGitRepo===void 0?{}:{isGitRepo:i.isGitRepo},...i.isGitWorktree===void 0?{}:{isGitWorktree:i.isGitWorktree},...i.provider===void 0?{}:{provider:structuredClone(i.provider)},...i.removal===void 0?{}:{removal:{actionLabel:i.removal.actionLabel,confirmation:i.removal.confirmation}}}},...t===void 0?{}:{selectedSession:$t(t)}}}function tn(e){return{...en(e),...e.workspaceTool===void 0?{}:{workspaceTool:e.workspaceTool},mainView:e.mainView===`navigation`||e.mainView===`chat`?e.mainView:`workspace`,...e.piWebStatus===void 0?{}:{piWebStatus:e.piWebStatus}}}function Q(e){return{...e,state:tn(e.state)}}function nn(e){return{...e,async activate(t){let n=await e.activate(t),{actions:r,applicationPanels:i,workspacePanels:a,workspaceLabels:o,sessionLabels:s}=n.contributions;return{...n,...n.start===void 0?{}:{start:n.start.bind(n)},...n.dispose===void 0?{}:{dispose:n.dispose.bind(n)},contributions:{...n.contributions,...r===void 0?{}:{actions:r.map(({enabled:e,disabledReason:t,run:n,...r})=>({...r,...e===void 0?{}:{enabled:t=>e(Q(t))},...t===void 0?{}:{disabledReason:e=>t(Q(e))},run:e=>n(Q(e))}))},...i===void 0?{}:{applicationPanels:i.map(({visible:e,badge:t,render:n,...r})=>({...r,...e===void 0?{}:{visible:t=>e(Q(t))},...t===void 0?{}:{badge:e=>t(Q(e))},render:e=>n(Q(e))}))},...a===void 0?{}:{workspacePanels:a.map(({visible:e,fileOpenQuery:t,badge:n,onInvalidate:r,render:i,...a})=>({...a,...e===void 0?{}:{visible:t=>e(Q(t))},...t===void 0?{}:{fileOpenQuery:(e,n)=>t(Q(e),n)},...n===void 0?{}:{badge:e=>n(Q(e))},...r===void 0?{}:{onInvalidate:(e,t)=>r(Q(e),t)},render:e=>i(Q(e))}))},...o===void 0?{}:{workspaceLabels:o.map(({visible:e,items:t,...n})=>({...n,...e===void 0?{}:{visible:t=>e(Q(t))},items:e=>t(Q(e))}))},...s===void 0?{}:{sessionLabels:s.map(({visible:e,items:t,...n})=>({...n,...e===void 0?{}:{visible:t=>e(Q(t))},items:e=>t(Q(e))}))}}}}}}async function rn(e=`pi-web-plugins/manifest.json`,t={}){let n=L(Kt(e)),r=await cn(n,t.manifest),i=[],a=[],o=[],s=r.plugins.filter(e=>t.shouldLoadPlugin?.(e)!==!1).sort((e,t)=>Number(t.scope===`bundled`)-Number(e.scope===`bundled`)),c=t.moduleLoader??on,l=new Map,u=e=>{let t=l.get(e);if(t!==void 0)return t;let r=(async()=>{let t=an(e.module,n);return _n(await sn(t,c),t)})();return r.catch(()=>void 0),l.set(e,r),r},d=r.terminalMode===`required`&&s[0]?.id===`pi-web.terminal`;d||s.forEach(e=>{u(e)});for(let[e,n]of s.entries()){let c=gn(n,t.machineId);i.push(c);try{let t=await u(n);d&&e===0&&s.slice(1).forEach(e=>{u(e)}),a.push({...c,plugin:t,...n.backendRevision===void 0?{}:{backendRevision:n.backendRevision},...n.pairedRequestVersion===void 0?{}:{pairedRequestVersion:n.pairedRequestVersion},...n.pairedChannelVersion===void 0?{}:{pairedChannelVersion:n.pairedChannelVersion}})}catch(e){if(o.push({entry:n,error:e}),r.terminalMode===`required`&&n.id===`pi-web.terminal`)return{terminalMode:r.terminalMode,declarations:i,registrations:[],failures:o}}}return{terminalMode:r.terminalMode,declarations:i,registrations:a,failures:o}}function an(e,t,n){return e.startsWith(`/`)?n===void 0?L(e):L(e,n):new URL(e,t).toString()}async function on(e){return import(e)}async function sn(e,t){let n,r=new Promise((t,r)=>{n=setTimeout(()=>{r(Error(`Browser plugin import timed out after 10000ms: ${e}`))},1e4)});try{return await Promise.race([Promise.resolve().then(()=>t(e)),r])}finally{clearTimeout(n)}}async function cn(e,t){if(t!==void 0)return ln(t);let n=await fetch(e,{cache:`no-store`});if(!n.ok)throw Error(await fn(n));return ln(await n.json())}function ln(e){if(!$(e)||!Array.isArray(e.plugins))throw Error(`Invalid plugin manifest`);if(e.lifecycleVersion!==2)throw Error(`Unsupported plugin manifest lifecycle version`);let t=dn(e.terminalMode),n=e.plugins.map(e=>{if(!$(e)||typeof e.id!=`string`||typeof e.module!=`string`||e.module===``)throw Error(`Invalid plugin manifest entry`);let t=e.id;if(!ot(t))throw Error(`Invalid plugin manifest id: ${t}`);let n=un(e.source),r=un(e.scope);if(st(t)&&!(z(t)&&n===`bundled`&&r===`bundled`))throw Error(`Reserved plugin manifest id: ${t}`);let i=pn(e.backendRevision),a=mn(e.pairedRequestVersion),o=mn(e.pairedChannelVersion);if((a!==void 0||o!==void 0)&&i===void 0)throw Error(`Invalid plugin manifest entry`);return{id:t,module:e.module,...i===void 0?{}:{backendRevision:i},...a===void 0?{}:{pairedRequestVersion:a},...o===void 0?{}:{pairedChannelVersion:o},...n===void 0?{}:{source:n},...r===void 0?{}:{scope:r},machineSpecific:hn(e.machineSpecific)}}),r=new Set;for(let e of n){if(r.has(e.id))throw Error(`Duplicate plugin manifest id: ${e.id}`);r.add(e.id)}let i=n.find(({id:e})=>e===Wt);if(t===`required`&&!J()){if(i===void 0||n[0]!==i||!i.machineSpecific)throw Error(`Required Terminal plugin manifest entry is unavailable or out of order`);if(i.backendRevision===void 0||i.pairedRequestVersion!==1||i.pairedChannelVersion!==1)throw Error(`Required Terminal plugin manifest entry is incompatible`)}else if(t===`recovery-disabled`&&i!==void 0)throw Error(`Recovery-disabled plugin manifest must not publish Terminal`);return{terminalMode:t,plugins:n}}function un(e){return typeof e==`string`?e:void 0}function dn(e){if(e===`required`||e===`recovery-disabled`)return e;throw Error(`Invalid plugin manifest Terminal mode`)}async function fn(e){let t;try{let n=await e.json();if($(n)){let e=n.error,r=n.detail,i=n.message;t=typeof r==`string`?`${typeof e==`string`?`${e}: `:``}${r}`:typeof i==`string`?i:typeof e==`string`?e:void 0}}catch{}return`Failed to load plugin manifest (${`${String(e.status)}${e.statusText===``?``:` ${e.statusText}`}`})${t===void 0?``:`: ${t}`}`}function pn(e){if(e!==void 0)try{return H(e)}catch{throw Error(`Invalid plugin manifest entry`)}}function mn(e){if(e!==void 0){if(e!==1)throw Error(`Invalid plugin manifest entry`);return e}}function hn(e){if(e===void 0)return!1;if(typeof e!=`boolean`)throw Error(`Invalid plugin manifest entry`);return e}function gn(e,t){return Object.freeze({id:t===void 0?e.id:dt(t,e.id),machineSpecific:e.machineSpecific,...e.source===void 0?{}:{manifestSource:e.source},...e.scope===void 0?{}:{manifestScope:e.scope},...t===void 0?{}:{machineId:t,sourcePluginId:e.id}})}function _n(e,t){if(!$(e))throw Error(`Plugin module ${t} did not export an object`);let n=e.default;if($(n)&&n.apiVersion!==4&&n.apiVersion!==5)throw Error(`Unsupported browser plugin API version for ${t}: ${String(n.apiVersion)} (expected 4 or 5)`);if(!vn(n))throw Error(`Plugin module ${t} default export is not a PiWebPlugin`);return nn(n)}function vn(e){return $(e)&&(e.apiVersion===4||e.apiVersion===5)&&typeof e.name==`string`&&typeof e.activate==`function`}function $(e){return typeof e==`object`&&!!e}export{h as $,Xe as A,He as B,Nt as C,ot as D,ut as E,et as F,I as G,R as H,qe as I,O as J,k as K,Ke as L,Qe as M,Ge as N,Ye as O,Je as P,ye as Q,We as R,H as S,W as T,L as U,Ie as V,Ne as W,ve as X,be as Y,ke as Z,jt as _,J as a,Ft as b,qt as c,bt as d,m as et,gt as f,Tt as g,U as h,Gt as i,$e as j,Ze as k,Wt as l,ht as m,en as n,a as nt,Jt as o,_t as p,je as q,$t as r,Kt as s,rn as t,o as tt,xt as u,Pt as v,Mt as w,At as x,wt as y,Ue as z};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./PiWebApp-BVnLs9Kj.js","./external-B9K8duyP.js","./vendor-editor-core-BfnHL1Dg.js","./vendor-editor-languages-bNquDJP0.js"])))=>i.map(i=>d[i]);
2
- import{B as e,Q as t,R as n,U as r,X as i,t as a,z as o}from"./external-B9K8duyP.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();async function s(n=async()=>(await a(`pi-web-plugins/localization.json`,{shouldLoadPlugin:e=>e.id===`zh-cn`})).registrations){o(`en`,{});try{let r=(await n()).find(e=>e.id===`zh-cn`&&e.machineId===void 0);if(r!==void 0){let n=new AbortController,a=(await r.plugin.activate({apiVersion:4,pluginId:r.id,runtimePluginId:r.id,html:i,svg:t,translate:e,signal:n.signal,lifetimeSignal:n.signal})).contributions.localizations?.find(e=>e.locale===`zh-CN`);a!==void 0&&o(a.locale,a.messages)}}catch(e){console.warn(`Could not initialize UI localization; using English`,e)}}function c(t){t.documentElement.lang=n();let i=t.querySelector(`meta[name="description"]`);i!==null&&(i.content=e(`app.description`,`Remote web UI and browser control plane for persistent Pi Coding Agent sessions.`));let a=t.querySelector(`link[rel="manifest"]`);a!==null&&(a.href=r(n()===`zh-CN`?`pi-web-plugins/zh-cn/manifest.webmanifest`:`manifest.webmanifest`))}var l=`modulepreload`,u=function(e,t){return new URL(e,t).href},d={},f=function(e){return e.pathname.endsWith(`.css`)},p=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i};await s(),c(document),await function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=u(t,n);let r=s(t),i=f(r);return p(d,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:l,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})}(()=>import(`./PiWebApp-BVnLs9Kj.js`),__vite__mapDeps([0,1,2,3]),import.meta.url);