efficient-shell 16.5.0 → 16.6.0
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/{Browser-OCUD3UXN.js → Browser-UHT6QSUN.js} +14 -14
- package/dist/{Files-RC4ASEJ3.js → Files-4HJWEYDE.js} +51 -51
- package/dist/{Notepad-BN22VIPZ.js → Notepad-GXKGVTNG.js} +8 -8
- package/dist/{Preview-KQNGAVBU.js → Preview-EN4YCUH5.js} +9 -9
- package/dist/apps/index.js +1 -1
- package/dist/bin/browser-check.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/{chunk-R2QC77NA.js → chunk-DX24Q5OR.js} +2 -2
- package/dist/{chunk-C4AQXXL3.js → chunk-MS6IZF6E.js} +1 -1
- package/dist/chunk-OHC6Q4QD.js +1 -0
- package/dist/chunk-YVXF7L66.js +1 -0
- package/dist/engine-4U3WOFMO.js +1 -0
- package/dist/index.js +1 -1
- package/dist/model-stage/index.d.ts +69 -5
- package/dist/model-stage/index.js +3 -3
- package/dist/routine-index.json +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/value-index.json +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-KT57MRN4.js +0 -1
- package/dist/chunk-ZHBKWBIJ.js +0 -1
- package/dist/engine-T4D3AZOO.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{useWindowMenuItem as e,Modal as t}from"./chunk-EJTAPBGB.js";import{navIcons as r}from"./chunk-VIPNHDD3.js";import{VERSION as n}from"./chunk-
|
|
1
|
+
import{useWindowMenuItem as e,Modal as t}from"./chunk-EJTAPBGB.js";import{navIcons as r}from"./chunk-VIPNHDD3.js";import{VERSION as n}from"./chunk-YVXF7L66.js";import{Icon as s}from"./chunk-ISVODSRP.js";import{DEFAULT_SHELL_STRINGS as i,useShellStrings as o,splitAround as a}from"./chunk-NRHG4R2Q.js";import{useState as l,useCallback as m,isValidElement as c,cloneElement as p}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";var h=i.aboutApp,x={notepad:{name:"Notepad",version:"1.1.0",route:"/notepad",description:h.notepad},preview:{name:"Preview",version:"1.5.1",route:"/preview",description:h.preview},files:{name:"Files",version:"2.0.1",route:"/files",description:h.files},browser:{name:"Browser",version:"1.0.3",route:"/browser",description:h.browser}},u=/* @__PURE__ */d(s,{name:"info",className:"h-4 w-4",strokeWidth:1.5}),w=/* @__PURE__ */d(s,{name:"window",className:"h-9 w-9",strokeWidth:1.5});function N({app:s}){const i=x[s],[h,N]=l(!1),v=m(()=>N(!0),[]),b=o().aboutApp,k=b.title(i.name);if(e(k,v,u),!h)return null;const g=r[i.route],y=c(g)?p(g,{className:"h-9 w-9"}):w,[j,P]=a(b.partOf);/* @__PURE__ */
|
|
2
2
|
return d(t,{open:!0,onClose:()=>N(!1),title:k,size:"sm",compact:!0,bodyScroll:!1,autoHeight:!0,dimensions:[320,320],children:/* @__PURE__ */f("div",{className:"flex flex-col items-center text-center px-5 pt-5 pb-4",children:[
|
|
3
3
|
/* @__PURE__ */d("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl bg-gray-100 text-gray-600 shrink-0",children:y}),
|
|
4
4
|
/* @__PURE__ */d("h2",{className:"mt-3 text-lg font-bold text-gray-900",children:i.name}),
|
|
@@ -6,4 +6,4 @@ return d(t,{open:!0,onClose:()=>N(!1),title:k,size:"sm",compact:!0,bodyScroll:!1
|
|
|
6
6
|
/* @__PURE__ */d("p",{className:"mt-2 text-xs text-gray-500 leading-relaxed",children:b[s]}),
|
|
7
7
|
/* @__PURE__ */f("div",{className:"mt-4 pt-3 border-t border-gray-200 w-full",children:[
|
|
8
8
|
/* @__PURE__ */f("p",{className:"text-2xs text-ink-faint",children:[j,
|
|
9
|
-
/* @__PURE__ */d("span",{className:"font-medium text-gray-700",children:"efficient-shell"}),
|
|
9
|
+
/* @__PURE__ */d("span",{className:"font-medium text-gray-700",children:"efficient-shell"}),P]}),n&&/* @__PURE__ */d("p",{className:"mt-0.5 text-2xs font-mono text-ink-faintest",children:b.shellVersion(n)})]})]})})}export{N as AboutApp,x as BUILTIN_APP_INFO};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-ZHBKWBIJ.js";var n=-1,i=()=>n,a=e=>{addEventListener("pageshow",t=>{t.persisted&&(n=t.timeStamp,e(t))},!0)},r=(e,t,n,i)=>{let a,r;return o=>{var s,c;t.value>=0&&(o||i)&&(r=t.value-(a??0),(r||void 0===a)&&(a=t.value,t.delta=r,t.rating=(s=t.value)>(c=n)[1]?"poor":s>c[0]?"needs-improvement":"good",e(t)))}},o=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},c=()=>s()?.activationStart??0,d=-1,l=/* @__PURE__ */new Set,u=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,f=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of l)e();isFinite(d)||(d="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",f,!0))}},h=(e=!1)=>{if(e&&(d=1/0),d<0){const e=c(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;d=t??u(),addEventListener("visibilitychange",f,!0),addEventListener("prerenderingchange",f,!0),a(()=>{setTimeout(()=>{d=u()})})}return{get firstHiddenTime(){return d},onHidden(e){l.add(e)}}},g=(e,t=-1,n,a=0,r,o,d)=>{const l=s(),u=l?.navigationId||0;let f="navigate";return n?f=n:i()>=0?f="back-forward-cache":l&&(document.prerendering||c()>0?f="prerender":document.wasDiscarded?f="restore":l.type&&(f=l.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:f,navigationId:a||u,navigationInteractionId:r,navigationURL:o||l?.name,navigationStartTime:d||0}},v=/* @__PURE__ */new WeakMap;function p(e,t){let n=v.get(t);return n||(n=/* @__PURE__ */new WeakMap,v.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var m,y=class{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}},T=(e,t,n={})=>{try{const i=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(i.length>0){const e=new PerformanceObserver(e=>{queueMicrotask(()=>{const n=e.getEntries();i.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(const t of i)e.observe({type:t,buffered:!0,...n});return e}}catch{}},w=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&e&&e.reportSoftNavs,I=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const t=e.keys().next().value;void 0!==t&&e.delete(t)}},b=e=>{let t=!1;return()=>{t||(e(),t=!0)}},C=class{l},E=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],P=(e,t={})=>{const n=w(t);E(()=>{const s=p(t,C),d=h();let l,u=g("FCP");const f=T(["paint"],e=>{for(const t of e)"first-contentful-paint"===t.name&&(f.disconnect(),t.startTime<d.firstHiddenTime&&(u.value=Math.max(t.startTime-c(),0),u.entries.push(t),u.navigationId=t.navigationId||u.navigationId,l(!0)))});f&&(l=r(e,u,L,t.reportAllChanges),a(n=>{u=g("FCP",-1,"back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),l=r(e,u,L,t.reportAllChanges),o(()=>{u.value=performance.now()-n.timeStamp,l(!0)})})),n&&T(["soft-navigation"],n=>{n.forEach(n=>{s.l&&n.navigationId&&I(s.l,n);const i=Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0);u=g("FCP",i,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),l=r(e,u,L,t.reportAllChanges),l(!0)})},t)})},A=[.1,.25],k=0,S=1/0,z=0,M=e=>{for(const t of e)t.interactionId&&(S=Math.min(S,t.interactionId),z=Math.max(z,t.interactionId),k=z?(z-S)/7+1:0)},$=()=>m?k:performance.interactionCount??0,Z=class{u=0;v=[];m=/* @__PURE__ */new Map;p;T;_(){return $()-this.u}M(){this.u=$(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==n||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[n]:{P:8,id:-1,entries:[]}}h(e){if(this.p?.(e),!e.interactionId)return;const t=this.v.at(-1);let n=this.m.get(e.interactionId);if(n||this.v.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.m.set(n.id,n),this.v.push(n)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){const e=this.v.splice(10);for(const t of e)this.m.delete(t.id)}this.T?.(n)}}},_=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const a=b(e);let r=-1;const o=()=>{i(r),a()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),r=n(()=>{removeEventListener("visibilitychange",o,{capture:!0}),a()},{timeout:t})}},F=[200,500],R=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=h();E(()=>{"interactionCount"in performance||m||(m=T(["event"],M,{durationThreshold:0}));let o,s=g("INP");const c=p(t,Z),d=(n,i,a,d,l)=>{c.M(),s=g("INP",-1,n,i,a,d,l),o=r(e,s,F,t.reportAllChanges)},l=()=>{const e=c.L(s.navigationType);e&&e.P!==s.value&&(s.value=e.P,s.entries=e.entries,o())},u=e=>{l(),o(!0),d("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},f=(e,t=!1)=>{_(()=>{for(const t of e)"soft-navigation"!==t.entryType?c.h(t):u(t);l(),t&&o(!0)})},h=["event","first-input"];w(t)&&h.push("soft-navigation");const v=T(h,f,{...t,durationThreshold:t.durationThreshold??40});o=r(e,s,F,t.reportAllChanges),v&&(n.onHidden(()=>{f(v.takeRecords(),!0)}),a(()=>{d("back-forward-cache",s.navigationId,s.navigationInteractionId,s.navigationURL,i())}))})},B=class{p;l;h(e){this.p?.(e)}},j=[2500,4e3],x=[800,1800],N=e=>{document.prerendering?E(()=>N(e)):"complete"!==document.readyState?addEventListener("load",()=>N(e),!0):setTimeout(e)};var U=/^[A-Za-z0-9/_:.\-[\]{}*@~]+$/,H=/^[A-Za-z_$][A-Za-z0-9_$.]*$/,O=/^[A-Za-z0-9][A-Za-z0-9.+_-]*$/;var q=class{constructor(e){this.head=e}head;events=[];waiting=/* @__PURE__ */new Map;seen=/* @__PURE__ */new Set;get size(){return this.events.length}addVital(e){this.events.push(e)}addError(e){const t=function(e){return e.frames.length?`${e.name}|${e.frames.join("|")}`:`${e.name}|${e.message.replace(/\d/g,"0")}`}(e),n=this.waiting.get(t);return n?(n.count=Math.min(1e3,n.count+e.count),!0):!(this.seen.has(t)||this.seen.size>=20)&&(this.seen.add(t),this.waiting.set(t,e),this.events.push(e),!0)}drain(){const e=this.events;this.events=[],this.waiting.clear();const t=[],n=JSON.stringify({...this.head,events:[]}).length;let i=[],a=n;for(const r of e){const e=JSON.stringify(r).length+1;n+e>30720||((50===i.length||a+e>30720)&&(t.push({...this.head,events:i}),i=[],a=n),i.push(r),a+=e)}return i.length&&t.push({...this.head,events:i}),t}},J=/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,K=/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?:\.[A-Za-z0-9_-]*)?|\b[Bb]earer\s+[A-Za-z0-9._~+/=-]{8,}/g,W=/\b[a-z][a-z0-9+.-]*:\/\/\S+/gi,V=/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,D=/\d{4,}/g,G=/(^|[/:])(?:\d+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{16,})(?=$|[/:])/gi,Q=/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,X=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function Y(e,t,n){const i=e.replace(Q,"").split(/[?#]/,1)[0];return i?`${i}:${t}:${n}`.slice(0,256):null}function ee(e){if("string"!=typeof e)return[];const t=[];for(const n of e.split("\n")){const e=X.exec(n.trim()),i=e&&Y(e[1],e[2],e[3]);if(i&&t.push(i),5===t.length)break}return t}function te(e){const t=e instanceof Error?e.name:void 0;return"string"==typeof t&&t.length<=64&&H.test(t)?t:"Error"}function ne(e){if("string"!=typeof e)return"unknown";const t=e.trim().replace(Q,"").split(/[?#]/,1)[0].replace(G,(e,t)=>":"===t?":id":`${t}:id`);return t&&t.length<=128&&!t.includes("//")&&U.test(t)?t:"unknown"}var ie={flush(){},reportError(){},stop(){}},ae=null,re=/* @__PURE__ */new Set(["LCP","FCP","TTFB"]);function oe(e,t,n){const i=function(e){if(e.anonymous)return{credentials:"omit",headers:{"Content-Type":"application/json"}};const t=e.getAccessToken();return t?{credentials:"same-origin",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}}:null}(t);if(!i)return;const a=t.anonymous?"/api/storefront-analytics/web-vitals/":"/api/client-telemetry/web-batches/";n(t.endpoint??a,{...i,method:"POST",keepalive:!0,body:JSON.stringify(e)}).catch(e=>{console.debug("[efficient-shell] client telemetry batch dropped:",e)})}function se(e){((e,t={})=>{let n=!1;const s=w(t);E(()=>{let d,l=h(),u=g("LCP");const f=p(t,B),v=(i,a,o,s,c)=>{u=g("LCP",-1,i,a,o,s,c),d=r(e,u,j,t.reportAllChanges),n=!1,"soft-navigation"===i&&(l=h(!0))},m=e=>{f.l&&e.navigationId&&I(f.l,e),n||d(!0),v("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);const t=e.getLargestInteractionContentfulPaint?.();t&&y([t])},y=e=>{t.reportAllChanges||s||(e=e.slice(-1));for(const t of e){if(!t)continue;if("soft-navigation"===t.entryType){m(t);continue}let e=0,n=[],i=t.startTime;if("largest-contentful-paint"===t.entryType)e=Math.max(t.startTime-c(),0),f.h(t),n=[t];else if("interaction-contentful-paint"===t.entryType){const a=t;if(!u.navigationId)continue;if("interactionId"in a&&a.interactionId!=u.navigationInteractionId)continue;i=a.largestContentfulPaint?.renderTime||0,e=Math.max(i-t.startTime,0),a.largestContentfulPaint&&(f.h(a.largestContentfulPaint),n=[a.largestContentfulPaint])}i<l.firstHiddenTime&&(u.value=e,u.entries=n,d())}},w=["largest-contentful-paint"];s&&w.push("interaction-contentful-paint","soft-navigation");const b=T(w,y);if(b){d=r(e,u,j,t.reportAllChanges);const c=["keydown","click","visibilitychange"],l=e=>{if(e.isTrusted&&!n){const e=u.id;_(()=>{if(!n){if(!s){b.disconnect();for(const e of c)removeEventListener(e,l,{capture:!0})}e===u.id&&(n=!0,d(!0))}})}};for(const e of c)addEventListener(e,l,{capture:!0});a(a=>{v("back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),d=r(e,u,j,t.reportAllChanges),o(()=>{u.value=performance.now()-a.timeStamp,n=!0,d(!0)})})}})})(e),R(e),((e,t={})=>{const n=h();P(b(()=>{let s,c=g("CLS",0);const d=p(t,y),l=(n,i,a,o,l)=>{c=g("CLS",0,n,i,a,o,l),d.i=0,s=r(e,c,A,t.reportAllChanges)},u=(e=!1)=>{d.i>c.value&&(c.value=d.i,c.entries=d.o),s(e)},f=e=>{u(!0),l("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},h=e=>{for(const t of e)"soft-navigation"!==t.entryType?d.h(t):f(t);u()},v=["layout-shift"];w(t)&&v.push("soft-navigation");const m=T(v,h);m&&(s=r(e,c,A,t.reportAllChanges),n.onHidden(()=>{h(m.takeRecords()),s(!0)}),a(()=>{l("back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,i()),o(s)}),setTimeout(s))}))})(e),P(e),((e,t={})=>{const n=w(t);let o=g("TTFB"),d=r(e,o,x,t.reportAllChanges);N(()=>{const l=s();if(l){const s=l.responseStart;o.value=Math.max(s-c(),0),o.entries=[l],d(!0),a(()=>{o=g("TTFB",0,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,i()),d=r(e,o,x,t.reportAllChanges),d(!0)}),n&&T(["soft-navigation"],n=>{n.forEach(n=>{n.navigationId&&(o=g("TTFB",0,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),o.entries=[n],d=r(e,o,x,t.reportAllChanges),d(!0))})},t)}})})(e)}function ce(n){if(ae?.stop(),ae=null,!1===n.enabled||"undefined"==typeof window||"undefined"==typeof document)return ie;if(!function(e){const t="string"==typeof e.app&&O.test(e.app),n="string"==typeof e.release&&O.test(e.release);return t&&n||console.warn("[efficient-shell] client telemetry not started: `app` and `release` must be version-like strings."),t&&n}(n))return ie;const i=function(e){const t=e.vitalsSampleRate??1;return t>0&&(t>=1||(e.random??Math.random)()<t)}(n);if(n.anonymous&&!i)return ie;const a=n.fetch??window.fetch.bind(window),r=new q({app:n.app,release:n.release,shell_version:O.test(t)?t:""}),o=ne(n.routeKey()),s=function(e=("undefined"==typeof window?void 0:window)){if(!e)return"desktop";const t="function"==typeof e.matchMedia&&e.matchMedia("(pointer: coarse)").matches,n=e.innerWidth;return n<600?"mobile":t&&n<1280?"tablet":"desktop"}(window);let c=!1;const d=()=>{for(const e of r.drain())oe(e,n,a)},l=e=>{c||n.anonymous||(r.addError(e),r.size>=50&&d())},u=(e,t)=>{return{type:"error",source:t,name:te(e),message:(a=e,i=a instanceof Error?a.message:"string"==typeof a?a:a&&"object"==typeof a&&"string"==typeof a.message?a.message:"",i.slice(0,640).replace(J,"[redacted]").replace(K,"[redacted]").replace(W,"[url]").replace(V,"[id]").replace(D,"[n]").replace(/\s+/g," ").trim().slice(0,160)),frames:ee(e instanceof Error?e.stack:void 0),route:ne(n.routeKey()),count:1};var i,a};i&&(n.observeVitals??se)(e=>{c||(r.addVital(function(e,t,n,i){return{type:"vital",name:e.name,value:e.value,route:re.has(e.name)?t:n(),navigation:e.navigationType??"navigate",device:i}}(e,o,()=>ne(n.routeKey()),s)),r.size>=50&&d())});const f=n.anonymous?()=>{}:function(t,n){const i=e=>{const{error:i,message:a,filename:r,lineno:o,colno:s}=e;if(null!=i)return void t(n(i,"onerror"));const c=r?ee(`at ${r}:${o??0}:${s??0}`):[];t({...n(a??"","onerror"),frames:c})},a=e=>t(n(e.reason,"unhandledrejection"));window.addEventListener("error",i),window.addEventListener("unhandledrejection",a);const r=e(e=>t(n(e,"boundary")));return()=>{window.removeEventListener("error",i),window.removeEventListener("unhandledrejection",a),r()}}(l,u),h=()=>{"hidden"===document.visibilityState&&d()};document.addEventListener("visibilitychange",h),window.addEventListener("pagehide",d);const g=window.setInterval(d,n.flushIntervalMs??6e4),v={flush:d,reportError:e=>l(u(e,"boundary")),stop(){c||(d(),c=!0,f(),document.removeEventListener("visibilitychange",h),window.removeEventListener("pagehide",d),window.clearInterval(g),ae===v&&(ae=null))}};return ae=v,v}export{ce as startClientTelemetry};
|
|
1
|
+
import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-YVXF7L66.js";var n=-1,i=()=>n,a=e=>{addEventListener("pageshow",t=>{t.persisted&&(n=t.timeStamp,e(t))},!0)},r=(e,t,n,i)=>{let a,r;return o=>{var s,c;t.value>=0&&(o||i)&&(r=t.value-(a??0),(r||void 0===a)&&(a=t.value,t.delta=r,t.rating=(s=t.value)>(c=n)[1]?"poor":s>c[0]?"needs-improvement":"good",e(t)))}},o=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},c=()=>s()?.activationStart??0,d=-1,l=/* @__PURE__ */new Set,u=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,f=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of l)e();isFinite(d)||(d="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",f,!0))}},h=(e=!1)=>{if(e&&(d=1/0),d<0){const e=c(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;d=t??u(),addEventListener("visibilitychange",f,!0),addEventListener("prerenderingchange",f,!0),a(()=>{setTimeout(()=>{d=u()})})}return{get firstHiddenTime(){return d},onHidden(e){l.add(e)}}},g=(e,t=-1,n,a=0,r,o,d)=>{const l=s(),u=l?.navigationId||0;let f="navigate";return n?f=n:i()>=0?f="back-forward-cache":l&&(document.prerendering||c()>0?f="prerender":document.wasDiscarded?f="restore":l.type&&(f=l.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:f,navigationId:a||u,navigationInteractionId:r,navigationURL:o||l?.name,navigationStartTime:d||0}},v=/* @__PURE__ */new WeakMap;function p(e,t){let n=v.get(t);return n||(n=/* @__PURE__ */new WeakMap,v.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var m,y=class{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}},T=(e,t,n={})=>{try{const i=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(i.length>0){const e=new PerformanceObserver(e=>{queueMicrotask(()=>{const n=e.getEntries();i.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(const t of i)e.observe({type:t,buffered:!0,...n});return e}}catch{}},w=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&e&&e.reportSoftNavs,I=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const t=e.keys().next().value;void 0!==t&&e.delete(t)}},b=e=>{let t=!1;return()=>{t||(e(),t=!0)}},C=class{l},E=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],P=(e,t={})=>{const n=w(t);E(()=>{const s=p(t,C),d=h();let l,u=g("FCP");const f=T(["paint"],e=>{for(const t of e)"first-contentful-paint"===t.name&&(f.disconnect(),t.startTime<d.firstHiddenTime&&(u.value=Math.max(t.startTime-c(),0),u.entries.push(t),u.navigationId=t.navigationId||u.navigationId,l(!0)))});f&&(l=r(e,u,L,t.reportAllChanges),a(n=>{u=g("FCP",-1,"back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),l=r(e,u,L,t.reportAllChanges),o(()=>{u.value=performance.now()-n.timeStamp,l(!0)})})),n&&T(["soft-navigation"],n=>{n.forEach(n=>{s.l&&n.navigationId&&I(s.l,n);const i=Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0);u=g("FCP",i,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),l=r(e,u,L,t.reportAllChanges),l(!0)})},t)})},A=[.1,.25],k=0,S=1/0,z=0,M=e=>{for(const t of e)t.interactionId&&(S=Math.min(S,t.interactionId),z=Math.max(z,t.interactionId),k=z?(z-S)/7+1:0)},$=()=>m?k:performance.interactionCount??0,_=class{u=0;v=[];m=/* @__PURE__ */new Map;p;T;_(){return $()-this.u}M(){this.u=$(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==n||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[n]:{P:8,id:-1,entries:[]}}h(e){if(this.p?.(e),!e.interactionId)return;const t=this.v.at(-1);let n=this.m.get(e.interactionId);if(n||this.v.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.m.set(n.id,n),this.v.push(n)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){const e=this.v.splice(10);for(const t of e)this.m.delete(t.id)}this.T?.(n)}}},F=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const a=b(e);let r=-1;const o=()=>{i(r),a()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),r=n(()=>{removeEventListener("visibilitychange",o,{capture:!0}),a()},{timeout:t})}},Z=[200,500],R=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=h();E(()=>{"interactionCount"in performance||m||(m=T(["event"],M,{durationThreshold:0}));let o,s=g("INP");const c=p(t,_),d=(n,i,a,d,l)=>{c.M(),s=g("INP",-1,n,i,a,d,l),o=r(e,s,Z,t.reportAllChanges)},l=()=>{const e=c.L(s.navigationType);e&&e.P!==s.value&&(s.value=e.P,s.entries=e.entries,o())},u=e=>{l(),o(!0),d("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},f=(e,t=!1)=>{F(()=>{for(const t of e)"soft-navigation"!==t.entryType?c.h(t):u(t);l(),t&&o(!0)})},h=["event","first-input"];w(t)&&h.push("soft-navigation");const v=T(h,f,{...t,durationThreshold:t.durationThreshold??40});o=r(e,s,Z,t.reportAllChanges),v&&(n.onHidden(()=>{f(v.takeRecords(),!0)}),a(()=>{d("back-forward-cache",s.navigationId,s.navigationInteractionId,s.navigationURL,i())}))})},j=class{p;l;h(e){this.p?.(e)}},x=[2500,4e3],B=[800,1800],N=e=>{document.prerendering?E(()=>N(e)):"complete"!==document.readyState?addEventListener("load",()=>N(e),!0):setTimeout(e)};var U=/^[A-Za-z0-9/_:.\-[\]{}*@~]+$/,O=/^[A-Za-z_$][A-Za-z0-9_$.]*$/,H=/^[A-Za-z0-9][A-Za-z0-9.+_-]*$/;var q=class{constructor(e){this.head=e}head;events=[];waiting=/* @__PURE__ */new Map;seen=/* @__PURE__ */new Set;get size(){return this.events.length}addVital(e){this.events.push(e)}addError(e){const t=function(e){return e.frames.length?`${e.name}|${e.frames.join("|")}`:`${e.name}|${e.message.replace(/\d/g,"0")}`}(e),n=this.waiting.get(t);return n?(n.count=Math.min(1e3,n.count+e.count),!0):!(this.seen.has(t)||this.seen.size>=20)&&(this.seen.add(t),this.waiting.set(t,e),this.events.push(e),!0)}drain(){const e=this.events;this.events=[],this.waiting.clear();const t=[],n=JSON.stringify({...this.head,events:[]}).length;let i=[],a=n;for(const r of e){const e=JSON.stringify(r).length+1;n+e>30720||((50===i.length||a+e>30720)&&(t.push({...this.head,events:i}),i=[],a=n),i.push(r),a+=e)}return i.length&&t.push({...this.head,events:i}),t}},J=/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,K=/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?:\.[A-Za-z0-9_-]*)?|\b[Bb]earer\s+[A-Za-z0-9._~+/=-]{8,}/g,V=/\b[a-z][a-z0-9+.-]*:\/\/\S+/gi,W=/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,D=/\d{4,}/g,G=/(^|[/:])(?:\d+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{16,})(?=$|[/:])/gi,X=/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,Y=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function Q(e,t,n){const i=e.replace(X,"").split(/[?#]/,1)[0];return i?`${i}:${t}:${n}`.slice(0,256):null}function ee(e){if("string"!=typeof e)return[];const t=[];for(const n of e.split("\n")){const e=Y.exec(n.trim()),i=e&&Q(e[1],e[2],e[3]);if(i&&t.push(i),5===t.length)break}return t}function te(e){const t=e instanceof Error?e.name:void 0;return"string"==typeof t&&t.length<=64&&O.test(t)?t:"Error"}function ne(e){if("string"!=typeof e)return"unknown";const t=e.trim().replace(X,"").split(/[?#]/,1)[0].replace(G,(e,t)=>":"===t?":id":`${t}:id`);return t&&t.length<=128&&!t.includes("//")&&U.test(t)?t:"unknown"}var ie={flush(){},reportError(){},stop(){}},ae=null,re=/* @__PURE__ */new Set(["LCP","FCP","TTFB"]);function oe(e,t,n){const i=function(e){if(e.anonymous)return{credentials:"omit",headers:{"Content-Type":"application/json"}};const t=e.getAccessToken();return t?{credentials:"same-origin",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}}:null}(t);if(!i)return;const a=t.anonymous?"/api/storefront-analytics/web-vitals/":"/api/client-telemetry/web-batches/";n(t.endpoint??a,{...i,method:"POST",keepalive:!0,body:JSON.stringify(e)}).catch(e=>{console.debug("[efficient-shell] client telemetry batch dropped:",e)})}function se(e){((e,t={})=>{let n=!1;const s=w(t);E(()=>{let d,l=h(),u=g("LCP");const f=p(t,j),v=(i,a,o,s,c)=>{u=g("LCP",-1,i,a,o,s,c),d=r(e,u,x,t.reportAllChanges),n=!1,"soft-navigation"===i&&(l=h(!0))},m=e=>{f.l&&e.navigationId&&I(f.l,e),n||d(!0),v("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);const t=e.getLargestInteractionContentfulPaint?.();t&&y([t])},y=e=>{t.reportAllChanges||s||(e=e.slice(-1));for(const t of e){if(!t)continue;if("soft-navigation"===t.entryType){m(t);continue}let e=0,n=[],i=t.startTime;if("largest-contentful-paint"===t.entryType)e=Math.max(t.startTime-c(),0),f.h(t),n=[t];else if("interaction-contentful-paint"===t.entryType){const a=t;if(!u.navigationId)continue;if("interactionId"in a&&a.interactionId!=u.navigationInteractionId)continue;i=a.largestContentfulPaint?.renderTime||0,e=Math.max(i-t.startTime,0),a.largestContentfulPaint&&(f.h(a.largestContentfulPaint),n=[a.largestContentfulPaint])}i<l.firstHiddenTime&&(u.value=e,u.entries=n,d())}},w=["largest-contentful-paint"];s&&w.push("interaction-contentful-paint","soft-navigation");const b=T(w,y);if(b){d=r(e,u,x,t.reportAllChanges);const c=["keydown","click","visibilitychange"],l=e=>{if(e.isTrusted&&!n){const e=u.id;F(()=>{if(!n){if(!s){b.disconnect();for(const e of c)removeEventListener(e,l,{capture:!0})}e===u.id&&(n=!0,d(!0))}})}};for(const e of c)addEventListener(e,l,{capture:!0});a(a=>{v("back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),d=r(e,u,x,t.reportAllChanges),o(()=>{u.value=performance.now()-a.timeStamp,n=!0,d(!0)})})}})})(e),R(e),((e,t={})=>{const n=h();P(b(()=>{let s,c=g("CLS",0);const d=p(t,y),l=(n,i,a,o,l)=>{c=g("CLS",0,n,i,a,o,l),d.i=0,s=r(e,c,A,t.reportAllChanges)},u=(e=!1)=>{d.i>c.value&&(c.value=d.i,c.entries=d.o),s(e)},f=e=>{u(!0),l("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},h=e=>{for(const t of e)"soft-navigation"!==t.entryType?d.h(t):f(t);u()},v=["layout-shift"];w(t)&&v.push("soft-navigation");const m=T(v,h);m&&(s=r(e,c,A,t.reportAllChanges),n.onHidden(()=>{h(m.takeRecords()),s(!0)}),a(()=>{l("back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,i()),o(s)}),setTimeout(s))}))})(e),P(e),((e,t={})=>{const n=w(t);let o=g("TTFB"),d=r(e,o,B,t.reportAllChanges);N(()=>{const l=s();if(l){const s=l.responseStart;o.value=Math.max(s-c(),0),o.entries=[l],d(!0),a(()=>{o=g("TTFB",0,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,i()),d=r(e,o,B,t.reportAllChanges),d(!0)}),n&&T(["soft-navigation"],n=>{n.forEach(n=>{n.navigationId&&(o=g("TTFB",0,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),o.entries=[n],d=r(e,o,B,t.reportAllChanges),d(!0))})},t)}})})(e)}function ce(n){if(ae?.stop(),ae=null,!1===n.enabled||"undefined"==typeof window||"undefined"==typeof document)return ie;if(!function(e){const t="string"==typeof e.app&&H.test(e.app),n="string"==typeof e.release&&H.test(e.release);return t&&n||console.warn("[efficient-shell] client telemetry not started: `app` and `release` must be version-like strings."),t&&n}(n))return ie;const i=function(e){const t=e.vitalsSampleRate??1;return t>0&&(t>=1||(e.random??Math.random)()<t)}(n);if(n.anonymous&&!i)return ie;const a=n.fetch??window.fetch.bind(window),r=new q({app:n.app,release:n.release,shell_version:H.test(t)?t:""}),o=ne(n.routeKey()),s=function(e=("undefined"==typeof window?void 0:window)){if(!e)return"desktop";const t="function"==typeof e.matchMedia&&e.matchMedia("(pointer: coarse)").matches,n=e.innerWidth;return n<600?"mobile":t&&n<1280?"tablet":"desktop"}(window);let c=!1;const d=()=>{for(const e of r.drain())oe(e,n,a)},l=e=>{c||n.anonymous||(r.addError(e),r.size>=50&&d())},u=(e,t)=>{return{type:"error",source:t,name:te(e),message:(a=e,i=a instanceof Error?a.message:"string"==typeof a?a:a&&"object"==typeof a&&"string"==typeof a.message?a.message:"",i.slice(0,640).replace(J,"[redacted]").replace(K,"[redacted]").replace(V,"[url]").replace(W,"[id]").replace(D,"[n]").replace(/\s+/g," ").trim().slice(0,160)),frames:ee(e instanceof Error?e.stack:void 0),route:ne(n.routeKey()),count:1};var i,a};i&&(n.observeVitals??se)(e=>{c||(r.addVital(function(e,t,n,i){return{type:"vital",name:e.name,value:e.value,route:re.has(e.name)?t:n(),navigation:e.navigationType??"navigate",device:i}}(e,o,()=>ne(n.routeKey()),s)),r.size>=50&&d())});const f=n.anonymous?()=>{}:function(t,n){const i=e=>{const{error:i,message:a,filename:r,lineno:o,colno:s}=e;if(null!=i)return void t(n(i,"onerror"));const c=r?ee(`at ${r}:${o??0}:${s??0}`):[];t({...n(a??"","onerror"),frames:c})},a=e=>t(n(e.reason,"unhandledrejection"));window.addEventListener("error",i),window.addEventListener("unhandledrejection",a);const r=e(e=>t(n(e,"boundary")));return()=>{window.removeEventListener("error",i),window.removeEventListener("unhandledrejection",a),r()}}(l,u),h=()=>{"hidden"===document.visibilityState&&d()};document.addEventListener("visibilitychange",h),window.addEventListener("pagehide",d);const g=window.setInterval(d,n.flushIntervalMs??6e4),v={flush:d,reportError:e=>l(u(e,"boundary")),stop(){c||(d(),c=!0,f(),document.removeEventListener("visibilitychange",h),window.removeEventListener("pagehide",d),window.clearInterval(g),ae===v&&(ae=null))}};return ae=v,v}export{ce as startClientTelemetry};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(t,e,n){const o=new Int32Array(n);for(let r=0;r<n;r+=1){const n=e?e[3*r]:3*r;o[r]=Math.round(t[n])}return o}function e(t,e,n){const o=new Int32Array(t).fill(-1);e.forEach((e,n)=>{for(const r of e)r>=0&&r<t&&-1===o[r]&&(o[r]=n)});for(let e=0;e<t;e+=1)-1===o[e]&&(o[e]=n);return o}function n(t,e,n,o,r,a=/* @__PURE__ */new Set){const l=2*r,i=new Uint32Array(l),c=new Int32Array(e.length);for(let t=0;t<e.length;t+=1){const l=e[t];if(a.has(l)){c[t]=-1;continue}const f=2*(l>=0&&l<n.length?n[l]:r-1)+(o.has(l)?1:0);c[t]=f,i[f]+=1}const f=new Uint32Array(l);for(let t=1;t<l;t+=1)f[t]=f[t-1]+i[t-1];let h=0;for(let t=0;t<l;t+=1)h+=i[t];const s=new Uint32Array(3*h),u=f.slice();for(let n=0;n<e.length;n+=1){if(c[n]<0)continue;const e=3*u[c[n]];u[c[n]]+=1;for(let o=0;o<3;o+=1)s[e+o]=t?t[3*n+o]:3*n+o}const d=[];for(let t=0;t<l;t+=1)i[t]&&d.push({start:3*f[t],count:3*i[t],materialIndex:t});return{index:s,groups:d}}var o=512;function r(t){let e=t>>>0;return()=>{e=e+1831565813>>>0;let t=e;return t=Math.imul(t^t>>>15,1|t),t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296}}function a(t=512){const e=document.createElement("canvas");e.width=e.height=t;const n=e.getContext("2d");if(!n)throw new Error("This browser cannot draw a texture.");return[e,n]}function l(t,e,n,o=512){const r=Array.from({length:e*e},()=>n()),a=(t,n)=>r[(n+e)%e*e+(t+e)%e],l=t.createImageData(o,o);for(let t=0;t<o;t+=1)for(let n=0;n<o;n+=1){const r=n/o*e,i=t/o*e,c=Math.floor(r),f=Math.floor(i),h=r-c,s=i-f,u=h*h*(3-2*h),d=s*s*(3-2*s),M=a(c,f)*(1-u)+a(c+1,f)*u,g=a(c,f+1)*(1-u)+a(c+1,f+1)*u,w=Math.round(255*(M*(1-d)+g*d)),m=4*(t*o+n);l.data[m]=l.data[m+1]=l.data[m+2]=w,l.data[m+3]=255}t.putImageData(l,0,0)}function i(t){const[e,n]=a(),i=r(7919*t.length);if(n.fillStyle="#808080",n.fillRect(0,0,o,o),"sandblast"===t)l(n,256,i);else if("grain"===t)l(n,24,i);else if("brushed"===t||"radial"===t)for(let t=0;t<o;t+=1){const e=Math.round(90+80*i());n.fillStyle=`rgb(${e},${e},${e})`,n.fillRect(0,t,o,1)}else if("knurl"===t){const t=32;n.fillStyle="#202020",n.fillRect(0,0,o,o);for(let e=0;e<o;e+=t)for(let r=0;r<o;r+=t){const o=n.createLinearGradient(r,e,r+t,e+t);o.addColorStop(0,"#202020"),o.addColorStop(.5,"#f0f0f0"),o.addColorStop(1,"#202020"),n.fillStyle=o,n.beginPath(),n.moveTo(r+t/2,e),n.lineTo(r+t,e+t/2),n.lineTo(r+t/2,e+t),n.lineTo(r,e+t/2),n.closePath(),n.fill()}}else if("hammered"===t){n.fillStyle="#c0c0c0",n.fillRect(0,0,o,o);for(let t=0;t<260;t+=1){const t=i()*o,e=i()*o,r=14+26*i();for(const[a,l]of[[0,0],[o,0],[-512,0],[0,o],[0,-512]]){const o=n.createRadialGradient(t+a,e+l,0,t+a,e+l,r);o.addColorStop(0,"rgba(40,40,40,0.55)"),o.addColorStop(1,"rgba(40,40,40,0)"),n.fillStyle=o,n.fillRect(t+a-r,e+l-r,2*r,2*r)}}}else{const t=32;for(let e=0;e<o;e+=t)for(let r=0;r<o;r+=t){const o=(r/t+e/t>>1)%2==0?n.createLinearGradient(r,e,r,e+t):n.createLinearGradient(r,e,r+t,e);o.addColorStop(0,"#404040"),o.addColorStop(.5,"#e0e0e0"),o.addColorStop(1,"#404040"),n.fillStyle=o,n.fillRect(r,e,t,t)}}return e}function c(t){const[e,n]=a(256),o=r("fine"===t?101:202),l="fine"===t?2:5;for(let t=0;t<256;t+=l)for(let e=0;e<256;e+=l){const r=Math.round(128+200*(o()-.5)),a=Math.round(128+200*(o()-.5));n.fillStyle=`rgb(${r},${a},255)`,n.fillRect(e,t,l,l)}return e}function f(t,e,n,o,r){const a="fill"===r?Math.max(n/t,o/e):Math.min(n/t,o/e),l=t*a,i=e*a;return{x:(n-l)/2,y:(o-i)/2,w:l,h:i}}function h(t,e,n,o){const r=1024,a=Math.max(1,Math.round(r*e)),l=document.createElement("canvas");l.width=a,l.height=r;const i=l.getContext("2d");if(!i)throw new Error("This browser cannot draw the backplate.");i.fillStyle=o,i.fillRect(0,0,a,r);const c=f(t.width,t.height,a,r,n);return i.drawImage(t,c.x,c.y,c.w,c.h),l}function s(t){return((t+180)%360+360)%360-180}function u({theta:t,phi:e},n){const o=t*Math.PI/180,r=e*Math.PI/180;return[n*Math.sin(r)*Math.sin(o),n*Math.cos(r),n*Math.sin(r)*Math.cos(o)]}function d([t,e,n]){const o=Math.hypot(t,e,n)||1;return{theta:180*Math.atan2(t,n)/Math.PI,phi:180*Math.acos(Math.max(-1,Math.min(1,e/o)))/Math.PI}}function M(t,e,n=1.08){const o=e*Math.PI/180/2;return t*n/Math.sin(o)}function g(t,e){return{theta:t.theta+s(e.theta-t.theta),phi:e.phi}}export{h as backplateCanvas,n as buildDrawGroups,i as bumpCanvas,c as flakeCanvas,M as framingDistance,e as layerOfSurfaces,d as orbitOf,u as orbitOffset,f as placeImage,g as shortestOrbit,t as triangleSurfaces,s as wrapTurn};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r="16.6.0",a=r;export{a as APP_VERSION,r as VERSION};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{triangleSurfaces as e,layerOfSurfaces as t,buildDrawGroups as s,bumpCanvas as i,flakeCanvas as r,framingDistance as n,backplateCanvas as o,orbitOf as a,shortestOrbit as h,orbitOffset as c}from"./chunk-OHC6Q4QD.js";import{fieldOfViewFor as l}from"./chunk-4N24K3UX.js";import{Color as d,Scene as m,PerspectiveCamera as p,Group as u,WebGLRenderer as g,SRGBColorSpace as f,PCFSoftShadowMap as w,PMREMGenerator as b,DirectionalLight as x,Mesh as k,PlaneGeometry as v,ShadowMaterial as y,Box3 as M,Vector3 as P,CanvasTexture as S,RepeatWrapping as C,BufferAttribute as I,MeshPhysicalMaterial as j,EquirectangularReflectionMapping as E,AgXToneMapping as A,ACESFilmicToneMapping as R,NeutralToneMapping as z,Vector2 as T,Raycaster as B,SphereGeometry as U,MeshBasicMaterial as D,BackSide as L,BoxGeometry as O}from"three";import{GLTFLoader as F}from"three/examples/jsm/loaders/GLTFLoader.js";import{RGBELoader as G}from"three/examples/jsm/loaders/RGBELoader.js";import{EffectComposer as H}from"three/examples/jsm/postprocessing/EffectComposer.js";import{RenderPass as W}from"three/examples/jsm/postprocessing/RenderPass.js";import{GTAOPass as Y}from"three/examples/jsm/postprocessing/GTAOPass.js";import{OutputPass as $}from"three/examples/jsm/postprocessing/OutputPass.js";import{MeshoptDecoder as X}from"three/examples/jsm/libs/meshopt_decoder.module.js";import{OrbitControls as _}from"three/examples/jsm/controls/OrbitControls.js";import{Reflector as q}from"three/examples/jsm/objects/Reflector.js";import{RoomEnvironment as N}from"three/examples/jsm/environments/RoomEnvironment.js";var Q={white:16777215,light:15066595,mid:12434874,dark:3815992,black:1052688},Z={sandblast:2,grain:1,brushed:1,radial:1,knurl:3,hammered:1,carbon:2},K=new d(3640029),J=e=>Math.min(1,Math.max(0,e));var V={studio:z,daylight:A,showroom:R,garage:A};var ee=class{renderer;scene=new m;camera=new p(6.9,1,.01,100);controls;pmrem;envCache=/* @__PURE__ */new Map;envWanted="";textureCache=/* @__PURE__ */new Map;backplateImage=null;backplateUrl="";backplateTexture=null;hidden=/* @__PURE__ */new Set;composer=null;gtao=null;size=[1,1];wheel=new u;mesh=null;triSurface=null;sourceIndex=null;surfaceCount=0;radius=.3;groundY=-.3;shadowPlane;reflector=null;key;layers=[];materials=[];selected=/* @__PURE__ */new Set;sceneSettings=null;tween=null;frame=0;userDragging=!1;disposed=!1;onCameraChange=null;constructor(e){this.renderer=new g({canvas:e,antialias:!0,alpha:!0}),this.renderer.outputColorSpace=f,this.renderer.shadowMap.enabled=!0,this.renderer.shadowMap.type=w,this.renderer.setPixelRatio(Math.min(2,window.devicePixelRatio||1)),this.pmrem=new b(this.renderer),this.controls=new _(this.camera,e),this.controls.enablePan=!1,this.controls.enableDamping=!0,this.controls.minPolarAngle=0,this.controls.maxPolarAngle=Math.PI,this.controls.addEventListener("start",()=>{this.userDragging=!0,this.tween=null}),this.controls.addEventListener("end",()=>{this.userDragging=!1}),this.controls.addEventListener("change",()=>this.reportCamera(this.userDragging)),this.key=new x(16777215,.6),this.key.castShadow=!0,this.key.shadow.mapSize.set(2048,2048),this.scene.add(this.key,this.key.target,this.wheel),this.shadowPlane=new k(new v(1,1),new y({opacity:.35})),this.shadowPlane.rotation.x=-Math.PI/2,this.shadowPlane.receiveShadow=!0,this.scene.add(this.shadowPlane),this.loop()}async load(t,s){const i=(new F).setMeshoptDecoder(X),r=await i.loadAsync(t);if(this.disposed)return;let n=null;if(r.scene.traverse(e=>{!n&&e.isMesh&&(n=e)}),!n)throw new Error("The model holds no mesh.");const o=n;o.updateWorldMatrix(!0,!1);const a=o.geometry.clone().applyMatrix4(o.matrixWorld),h=a.getAttribute("_surface");if(!h)throw new Error("The model carries no surface ids.");const c=(new M).setFromBufferAttribute(a.getAttribute("position")),l=c.getCenter(new P);a.translate(-l.x,-l.y,-l.z),this.radius=c.getSize(new P).length()/2,this.groundY=-(c.max.y-c.min.y)/2,function(e){const t=e.getAttribute("position"),s=e.getAttribute("normal"),i=t.count,r=new Float32Array(2*i),n=new Float32Array(2*i);for(let e=0;e<i;e+=1){const i=t.getX(e),o=t.getY(e),a=t.getZ(e),h=s?Math.abs(s.getX(e)):0,c=s?Math.abs(s.getY(e)):0,l=s?Math.abs(s.getZ(e)):1,[d,m]=l>=h&&l>=c?[i,o]:h>=c?[o,a]:[i,a];r[2*e]=d/.05,r[2*e+1]=m/.05,n[2*e]=Math.atan2(o,i)/(2*Math.PI)*8,n[2*e+1]=Math.hypot(i,o)/.1}e.setAttribute("uv",new I(r,2)),e.setAttribute("uv1",new I(n,2))}(a);const d=a.getIndex();this.sourceIndex=d?Array.from(d.array):null;const m=d?d.count/3:a.getAttribute("position").count/3;this.triSurface=e(h.array,this.sourceIndex,m);let p=-1;for(const e of this.triSurface)e>p&&(p=e);this.surfaceCount=Math.max(s,p+1),this.mesh&&(this.wheel.remove(this.mesh),this.mesh.geometry.dispose()),this.mesh=new k(a,[]),this.mesh.castShadow=!0,this.wheel.add(this.mesh),this.placeGround(),this.rebuild()}setLayers(e,t,s){const i=e!==this.layers||s!==this.selected||t.length!==this.materials.length;this.layers=e,this.materials=t,this.selected=s,i?this.rebuild():this.paint()}setHidden(e){e!==this.hidden&&(this.hidden=e,this.rebuild())}texture(e,t,s,i=!1){let r=this.textureCache.get(e);return r||(r=new S(t()),r.wrapS=r.wrapT=C,r.repeat.set(s,s),r.anisotropy=this.renderer.capabilities.getMaxAnisotropy(),i&&(r.colorSpace=f),this.textureCache.set(e,r)),r}rebuild(){if(!this.mesh||!this.triSurface)return;const e=Math.max(1,this.materials.length),i=t(this.surfaceCount,this.layers.slice(0,e-1),e-1),{index:r,groups:n}=s(this.sourceIndex,this.triSurface,i,this.selected,e,this.hidden),o=this.mesh.geometry;o.setIndex(new I(r,1)),o.clearGroups();for(const e of n)o.addGroup(e.start,e.count,e.materialIndex);const a=this.mesh.material;for(;a.length<2*e;)a.push(new j);for(;a.length>2*e;)a.pop()?.dispose();this.paint()}paint(){if(!this.mesh)return;const e=this.mesh.material;this.materials.forEach((t,s)=>{for(const n of[0,1]){const o=e[2*s+n];if(!o)continue;/^#[0-9a-f]{6}$/i.test(t.color)&&o.color.set(t.color),o.metalness=J(t.metallic),o.roughness=J(t.roughness),o.clearcoat=J(t.clearcoat??0),o.clearcoatRoughness=J(t.clearcoatRoughness??0),o.side=2,o.emissive.copy(n?K:new d(0)),o.emissiveIntensity=n?.45:0,o.visible=!1!==t.visible;const a=t.bump&&"none"!==t.bump?t.bump:null;o.bumpMap=a?this.texture(`bump:${a}`,()=>i(a),Z[a]):null,o.bumpMap&&(o.bumpMap.channel="radial"===a?1:0),o.bumpScale=.5+4*J(t.bumpDepth??.3);const h=t.flakes&&"none"!==t.flakes?t.flakes:null;o.normalMap=h?this.texture(`flakes:${h}`,()=>r(h),"fine"===h?24:10):null,o.normalScale.set("coarse"===h?.6:.35,"coarse"===h?.6:.35),o.needsUpdate=!0}})}setScene(e){const t=this.sceneSettings;this.sceneSettings=e;const s=e.environmentUrl||`procedural:${e.environment}`;s!==this.envWanted&&(this.envWanted=s,this.applyEnvironment(this.proceduralEnvironment(e.environment),e.environment),e.environmentUrl&&this.loadEnvironment(e.environmentUrl,e.environment)),this.scene.environmentRotation.set(0,e.environmentRotation*Math.PI/180,0),this.scene.backgroundRotation.set(0,e.environmentRotation*Math.PI/180,0),this.renderer.toneMappingExposure=e.brightness/100;const i=(e.contrast??100)/100;this.key.intensity=.6*i*i,this.scene.environmentIntensity=1.2-.2*i,this.applyBackground(),this.shadowPlane.visible=e.groundShadow;const r=e.shadowSoftness/100;this.shadowPlane.material.opacity=J((e.shadowDarkness??35)/100*(1.4-.6*r)),this.key.shadow.radius=1+14*r,this.key.shadow.blurSamples=16,this.setReflection(e.groundReflection),this.setAmbientOcclusion(Boolean(e.ambientOcclusion)),t?.focalLength!==e.focalLength&&(this.camera.fov=l(e.focalLength),this.camera.updateProjectionMatrix(),this.controls.minDistance=n(this.radius,this.camera.fov)/4,this.controls.maxDistance=2.5*n(this.radius,this.camera.fov))}proceduralEnvironment(e){const t=`procedural:${e}`;let s=this.envCache.get(t);return s||(s=this.pmrem.fromScene(function(e){if("studio"===e)return new N;const t=new m,s=new k(new U(20,32,16),new D({side:L})),i=(e,s,i,r,n)=>{const o=new k(new O(e,s,.1),new D({color:new d(i).multiplyScalar(r)}));o.position.set(...n),o.lookAt(0,0,0),t.add(o)};if("daylight"===e)s.material.color.setHex(12571882),i(30,30,16774368,6,[0,18,4]),i(40,6,10135194,1,[0,-12,0]);else if("showroom"===e)s.material.color.setHex(4210752),i(16,2,16777215,12,[0,14,0]),i(3,10,16777215,6,[12,4,6]),i(3,10,16777215,6,[-12,4,6]);else{s.material.color.setHex(1842204);for(let e=-2;e<=2;e+=1)i(1,12,16777215,8,[4*e,14,0]);i(10,4,16769720,2,[0,2,14])}return t.add(s),t}(e),.04).texture,this.envCache.set(t,s)),s}async loadEnvironment(e,t){let s=this.envCache.get(e);if(!s)try{const t=await(new G).loadAsync(e);if(t.mapping=E,this.disposed)return void t.dispose();s=this.pmrem.fromEquirectangular(t).texture,t.dispose(),this.envCache.set(e,s)}catch{return}this.envWanted!==e||this.disposed||this.applyEnvironment(s,t)}applyEnvironment(e,t){this.scene.environment=e,this.renderer.toneMapping=V[t],this.applyBackground()}applyBackground(){const e=this.sceneSettings;if(!e)return;const t=e.backgroundMode??"colour",s="transparent"===e.background?null:new d(Q[e.background]);if(this.scene.backgroundBlurriness=0,"environment"===t&&this.scene.environment)return this.scene.background=this.scene.environment,void(this.scene.backgroundBlurriness=.02+(e.backgroundBlur??30)/100*.6);if("backplate"===t&&e.backplateUrl){if(e.backplateUrl!==this.backplateUrl){const t=e.backplateUrl;this.backplateUrl=t,this.backplateImage=null;const s=new Image;s.crossOrigin="anonymous",s.onload=()=>{this.disposed||this.backplateUrl!==t||(this.backplateImage=s,this.applyBackground())},s.src=e.backplateUrl}if(this.backplateImage){const[t,i]=this.size;return this.backplateTexture?.dispose(),this.backplateTexture=new S(o(this.backplateImage,t/Math.max(1,i),e.backplateFit??"fill",`#${(s??new d(12434874)).getHexString()}`)),this.backplateTexture.colorSpace=f,void(this.scene.background=this.backplateTexture)}}this.scene.background=s}setAmbientOcclusion(e){if(e&&!this.composer){const[e,t]=this.size;this.composer=new H(this.renderer),this.composer.addPass(new W(this.scene,this.camera)),this.gtao=new Y(this.scene,this.camera,e,t),this.gtao.updateGtaoMaterial({radius:.12*this.radius,distanceFallOff:1,thickness:1}),this.gtao.blendIntensity=.8,this.composer.addPass(this.gtao),this.composer.addPass(new $),this.composer.setPixelRatio(this.renderer.getPixelRatio()),this.composer.setSize(e,t)}else!e&&this.composer&&(this.gtao?.dispose(),this.composer.dispose(),this.composer=null,this.gtao=null)}setReflection(e){if(e&&!this.reflector){const e=12*this.radius;this.reflector=new q(new v(e,e),{textureWidth:1024,textureHeight:1024,color:new d(5592405)}),this.reflector.rotation.x=-Math.PI/2,this.reflector.position.y=this.groundY-5e-4,this.scene.add(this.reflector)}else!e&&this.reflector&&(this.scene.remove(this.reflector),this.reflector.dispose(),this.reflector=null)}placeGround(){const e=12*this.radius;this.shadowPlane.scale.set(e,e,1),this.shadowPlane.position.y=this.groundY,this.reflector&&(this.reflector.position.y=this.groundY-5e-4),this.key.position.set(.6*this.radius,6*this.radius,1.2*this.radius);const t=this.key.shadow.camera;t.left=t.bottom=2*-this.radius,t.right=t.top=2*this.radius,t.far=12*this.radius,t.updateProjectionMatrix(),this.gtao?.updateGtaoMaterial({radius:.12*this.radius})}goTo(e,t=!0){const s=n(this.radius,this.camera.fov);this.controls.target.set(0,0,0);const i=this.camera.position.clone().sub(this.controls.target),r=a([i.x,i.y,i.z]),o=h(r,e);if(!t)return this.camera.position.set(...c(o,s)),this.camera.lookAt(0,0,0),this.controls.update(),void this.reportCamera(!1);this.tween={from:r,to:o,distance:[i.length()||s,s],t:0}}setInteractive(e){this.controls.enabled=e}setPan(e){this.controls.enablePan=e,this.controls.screenSpacePanning=!0}setTurntable(e){this.controls.autoRotate=e,this.controls.autoRotateSpeed=1.2}pick(e,t){if(!this.mesh||!this.triSurface)return null;const s=this.renderer.domElement.getBoundingClientRect(),i=new T((e-s.left)/s.width*2-1,-(t-s.top)/s.height*2+1),r=new B;r.setFromCamera(i,this.camera);const n=r.intersectObject(this.mesh,!1).find(e=>e.face&&!1!==this.mesh?.material[e.face.materialIndex]?.visible);if(!n?.face)return null;const o=this.mesh.geometry.getAttribute("_surface");return Math.round(o.getX(n.face.a))}async renderImage(e,t){const[s,i]=this.size,r=this.scene.background;this.resize(e,e,1),t&&(this.scene.background=null);this.composer&&!t?this.composer?.render():this.renderer.render(this.scene,this.camera);const n=document.createElement("canvas");n.width=n.height=e;const o=n.getContext("2d");if(o&&o.drawImage(this.renderer.domElement,0,0,e,e),this.scene.background=r,this.resize(s,i),!o)throw new Error("This browser cannot draw the image.");return new Promise((e,t)=>n.toBlob(s=>s?e(s):t(new Error("No image.")),"image/png"))}resize(e,t,s){this.size=[e,t];const i=s??Math.min(2,window.devicePixelRatio||1);this.renderer.setPixelRatio(i),this.renderer.setSize(e,t,!1),this.composer?.setPixelRatio(i),this.composer?.setSize(e,t),this.camera.aspect=e/Math.max(1,t),this.camera.updateProjectionMatrix(),this.backplateImage&&this.applyBackground()}reportCamera(e){const t=this.camera.position.clone().sub(this.controls.target);this.onCameraChange?.({...a([t.x,t.y,t.z]),userInteraction:e})}loop=()=>{if(!this.disposed){if(this.frame=requestAnimationFrame(this.loop),this.tween){const e=this.tween;e.t=Math.min(1,e.t+1/24);const t=1-(1-e.t)**3,s={theta:e.from.theta+(e.to.theta-e.from.theta)*t,phi:e.from.phi+(e.to.phi-e.from.phi)*t},i=e.distance[0]+(e.distance[1]-e.distance[0])*t;this.camera.position.set(...c(s,i)),this.camera.lookAt(0,0,0),e.t>=1&&(this.tween=null),this.reportCamera(!1)}this.controls.update(),this.composer?this.composer.render():this.renderer.render(this.scene,this.camera)}};dispose(){this.disposed=!0,cancelAnimationFrame(this.frame),this.controls.dispose(),this.mesh?.geometry.dispose(),this.mesh?.material.forEach(e=>e.dispose()),this.reflector?.dispose(),this.envCache.forEach(e=>e.dispose()),this.textureCache.forEach(e=>e.dispose()),this.backplateTexture?.dispose(),this.gtao?.dispose(),this.composer?.dispose(),this.pmrem.dispose(),this.renderer.dispose()}};export{ee as StageEngine};
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{subscribePomo as e,getPomoSnapshot as t}from"./chunk-DYJQIZX2.js";export{setShellTodoProvider}from"./chunk-DYJQIZX2.js";import{wallpaperSrc as r,WALLPAPER_PREF_TOKEN as n,uploadWallpaper as o,wallpaperUploadError as a,deleteWallpaper as s,getWallpaper as i}from"./chunk-H6JJAVYL.js";import{PREVIEW_OPENED_EVENT as l,openPreviewFile as c}from"./chunk-WD3S3ATX.js";import{playNotification as d,playStartup as u,soundsEnabled as m,getSoundConfig as h,SOUND_GRID_SHOWN as p,SOUND_PACK_KEYS as f,soundPackName as g,SOUND_TYPES as b,soundTypeName as x,setSoundForType as y,previewSound as w,setAllSounds as k,playLogout as v}from"./chunk-CPWXLXQ7.js";import{useAuth as N,readStored as C,initialRailCollapsed as S,RAIL_COLLAPSED_KEY as _,writeStored as E,RAIL_WIDTH_KEY as T}from"./chunk-AQH6MAYK.js";export{setShellAuthBridge}from"./chunk-AQH6MAYK.js";import"./chunk-SSAYFELC.js";export{ErrorBoundary}from"./chunk-P7X4PWJJ.js";export{ErrorPage}from"./chunk-6NXPOZ6X.js";export{FormLayoutPage}from"./chunk-GNB6KUCT.js";export{GalleryTemplate}from"./chunk-JKO4JZPO.js";export{ACCENT_ROLES,COLOUR_ROLES,FLAT_STATUS_ROLES,IDENTITY_ROLES,NEUTRAL_ROLES,SCRIM_ROLES,STATUS_GROUPS,STATUS_ROLES}from"./chunk-VVJIKS47.js";export{ELEVATION_LEVELS,RADIUS_ROLES}from"./chunk-4MVRSCQE.js";export{startClientTelemetry}from"./chunk-C4AQXXL3.js";export{AuthScreen}from"./chunk-THVE54FN.js";export{ChatTemplate}from"./chunk-MGGZINTI.js";export{CheckoutTemplate}from"./chunk-7AF5JGRM.js";export{DashboardTemplate}from"./chunk-NO5BMPT5.js";export{DataTablePage}from"./chunk-JUGRSO5J.js";export{EmailTemplate}from"./chunk-H2S75BKK.js";export{useTransferProgress}from"./chunk-QHOEMRR7.js";export{Stepper}from"./chunk-KTO427N3.js";export{Tabs,tabButtonId,tabPanelId}from"./chunk-EJMCK7E3.js";export{Paragraph,Text,Title}from"./chunk-366URRSE.js";import{TimeAgo as j}from"./chunk-DV6TUXCZ.js";export{TimeAgo}from"./chunk-DV6TUXCZ.js";export{TopNav}from"./chunk-FHTL7ZZR.js";export{SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,SidebarSection}from"./chunk-4BB5DHFX.js";export{Skeleton}from"./chunk-4Z62SEA5.js";export{ListRow,SortableList}from"./chunk-5LG6TOV6.js";export{Grid,Inline,Stack}from"./chunk-3RPER7VH.js";export{Statistic}from"./chunk-R3BSWWGB.js";export{SettingReset}from"./chunk-INQQUAIO.js";export{SettingRow}from"./chunk-LRMDLZMM.js";export{MetricBar}from"./chunk-PLESHI3E.js";export{isSeverityTone,severityOf}from"./chunk-TZFNWAED.js";export{MetricBarLegend}from"./chunk-VTCMO3K7.js";import"./chunk-URBCGEXG.js";export{MilestoneTimeline}from"./chunk-E57C7NBA.js";export{PageHeader}from"./chunk-3EYJ4G7L.js";export{POST_PRODUCTION_STATUSES,ProductionTimeline,STAGES,calcOverall,calcReportOverall,useProductionTimeline}from"./chunk-KE7P74XM.js";import"./chunk-S4Z657L6.js";export{TimelineTrack}from"./chunk-Q7FPGOUY.js";export{fmtSliderDate,toDayMs}from"./chunk-5CFERCYW.js";import{GlobalSearch as M,openGlobalSearch as I}from"./chunk-HU5FTTW2.js";export{GlobalSearch,openGlobalSearch}from"./chunk-HU5FTTW2.js";import{navPagesProvider as L,partitionNav as P,sanitizeRecent as R,favoritesToResults as A,pushRecent as D,PAGE_RESULT_ENTITY as O,parsePageResultTarget as F}from"./chunk-HGOWQO63.js";export{pushRecent as pushRecentSearch,sanitizeRecent as sanitizeRecentSearches}from"./chunk-HGOWQO63.js";export{HelpCenter}from"./chunk-2NHYLLHO.js";export{SidebarActionButton}from"./chunk-KMTCYDJH.js";import{SidebarLayout as W}from"./chunk-XN72RFDV.js";export{SidebarLayout,useWindowControlsInset}from"./chunk-XN72RFDV.js";import"./chunk-QWK6DRSN.js";export{IconRail,IconRailButton}from"./chunk-SJUEGYT2.js";import"./chunk-FQEALPZJ.js";import{CMD_K as $,CMD_DOT as B,SHIFT as H,MOD as U,ENTER as Y,CMD_Z as G,CMD_SHIFT_Z as z,CMD_A as K,ALT_SHIFT_N as V,ALT_SHIFT_E as X,CMD_ENTER as J,CMD_S as Q,ALT_SHIFT_D as Z,isMac as q}from"./chunk-TTD2M6RF.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,MOD,SHIFT,isMac}from"./chunk-TTD2M6RF.js";export{LanguagePanel,LanguageSelect,languageSelectWidth}from"./chunk-CHWZGSYG.js";import{withSpareRow as ee,EditableGrid as te}from"./chunk-YGNJIOOH.js";export{EditableGrid}from"./chunk-YGNJIOOH.js";export{EmptyValue}from"./chunk-HNQPF5QZ.js";export{FloatingBar}from"./chunk-WSQ73CRR.js";export{Card,StatCard}from"./chunk-RKSCB5BJ.js";export{ContainerFillChart}from"./chunk-BL347U3N.js";export{CountBadge}from"./chunk-PFOTEDSQ.js";import{TabStrip as re}from"./chunk-5LB7LCEG.js";export{ENGLISH,SHELL_LANGUAGE_STORAGE_KEY,ShellLanguageProvider,matchShellLanguage,readSavedShellLanguage,resolveShellLanguage,saveShellLanguage,useShellLanguage}from"./chunk-GKYGPCGL.js";export{Accordion,AccordionBody,AccordionHeading}from"./chunk-3BQMICGG.js";export{APP_UPDATE_POLL_MS,AppUpdateBanner,useAppUpdate}from"./chunk-BGLUOC7W.js";export{BudgetBar,budgetState}from"./chunk-7B6JPNOD.js";export{ICON_NAMES,isIconName}from"./chunk-3C7JKJGL.js";export{BRAND_ICON_NAMES,isBrandIconName}from"./chunk-RQGLDRRF.js";export{BRAND_MAX_HEIGHT,BRAND_MIN_HEIGHT_PX,brandBox}from"./chunk-64ACCUNN.js";export{WidthsBar}from"./chunk-OX7Q5PPR.js";export{COLUMN_COUNT_MAX,COLUMN_COUNT_WIDTHS,COLUMN_SHARES_EQUAL,COLUMN_SHARE_MIN,columnSharesWidths,resolveColumnShares,resolveColumnWidths}from"./chunk-PLGJOHEG.js";export{SplitButton_default as SplitButton}from"./chunk-GURLMAZM.js";export{Switch_default as Switch}from"./chunk-M3R4C3A6.js";export{TagInput}from"./chunk-B36ZROD7.js";export{TextToolbar,textToolbarRows,textToolbarWindowColumns}from"./chunk-IDH323EU.js";export{TEXT_ALIGNS,TEXT_ALIGN_FIT,TEXT_ALIGN_ICONS,textAlignFit,textAlignOptions,textAlignWords}from"./chunk-72UHB4JU.js";export{Textarea_default as Textarea}from"./chunk-PB7G6CJ7.js";export{TileButton_default as TileButton}from"./chunk-H2R4SNNO.js";export{TimePicker_default as TimePicker}from"./chunk-ZRWZHWKI.js";export{SearchInput_default as SearchInput}from"./chunk-YQKNRT7L.js";import{ShowWhen as ne}from"./chunk-YEM4KYCW.js";export{ShowWhen}from"./chunk-YEM4KYCW.js";export{SidesEachToggle,SidesInput,sidesStartEach}from"./chunk-MDXZ7YAC.js";export{Slider,SliderGroup}from"./chunk-7EPCBDS5.js";export{Snippet}from"./chunk-QY2DGLCJ.js";export{NumericKeypad}from"./chunk-54WCVNJJ.js";export{MAX_FRACTION_DIGITS,appendKey,backspace}from"./chunk-VEPVOHCV.js";export{PICTURE_TILES_COLUMNS_VAR,PictureTiles}from"./chunk-OHWP24DL.js";export{PositionInput}from"./chunk-JU6VBLTU.js";export{RadioGroup}from"./chunk-32VV2J22.js";export{Radio_default as Radio}from"./chunk-NI5FXWK5.js";export{LinkPicker,TextLinkField}from"./chunk-ATTQTQJI.js";export{SearchableSelect}from"./chunk-DFI5EHSV.js";export{Label,labelClasses}from"./chunk-EQKUFYX6.js";export{MEDIA_FILES_DRAG_TYPE,MEDIA_FILE_DRAG_TYPE,MEDIA_FOLDER_DRAG_TYPE,MediaLibrary,readMediaFileDrag}from"./chunk-N7EZ2BFE.js";export{Tree,TreeEmptySlot,TreeGroup,TreeGroupLabel,TreeRow,TreeSeam}from"./chunk-BTMZ5MUY.js";import"./chunk-5B7CLXHC.js";import{MarqueeBox as oe}from"./chunk-IC72MGON.js";export{MarqueeBox}from"./chunk-IC72MGON.js";import{readStoredWidth as ae}from"./chunk-2KD6R2XF.js";export{ResizeHandle}from"./chunk-2KD6R2XF.js";export{ImageLightbox,lightboxKind}from"./chunk-ONUNFTZD.js";export{LIGHTBOX_PICTURE_FIT,ZoomableImage}from"./chunk-CGUMJZUB.js";export{Drawer}from"./chunk-AYTGYEOI.js";export{EmptyState}from"./chunk-W3454ZES.js";export{DescriptionList}from"./chunk-SACUSHVN.js";export{Breadcrumbs}from"./chunk-WREUA43Q.js";export{mediaLibraryMenu}from"./chunk-UFJR63AO.js";export{mediaMoveItems,mediaMoveSubmenu,useMediaMoveItems}from"./chunk-GRAFJD3L.js";export{RenameField}from"./chunk-F4KB3K3I.js";export{FULL_BADGE_TILE_PX,MediaUploadGrid}from"./chunk-B4Y5NGHR.js";export{MediaUsedInList}from"./chunk-XOEYCDWT.js";export{NativeSelect,Select_default as Select}from"./chunk-W7HTHKN2.js";import{firstEnabledIndex as se,lastEnabledIndex as ie,nextEnabledIndex as le,matchTypeahead as ce}from"./chunk-EO5RLFRX.js";import"./chunk-GML6FVPA.js";export{CornersInput}from"./chunk-GZ57F6PN.js";export{DatePicker_default as DatePicker}from"./chunk-GGNQEZ2D.js";export{DateRangePicker,toISODate}from"./chunk-AZANUXJT.js";export{DateTimePicker_default as DateTimePicker}from"./chunk-ROYHU3E5.js";export{DisplayChips}from"./chunk-52RSW6TO.js";export{FilePicker_default as FilePicker}from"./chunk-QE2F4YQQ.js";export{FormErrorSummary}from"./chunk-UDJPSHVI.js";export{BorderInput,borderSides,borderStartEach}from"./chunk-7KUHILEA.js";export{IconPicker}from"./chunk-ZKWAWQ74.js";export{BrandAssetEditor}from"./chunk-3OK5VZOU.js";export{MediaUploadField}from"./chunk-KJ4CHRRC.js";export{ImageFocusPoint}from"./chunk-CUJ537IY.js";import{FormField as de}from"./chunk-6KBDNYRW.js";export{FormField}from"./chunk-6KBDNYRW.js";import{BrandMark as ue}from"./chunk-MI67DI3H.js";export{BrandMark,resolveBrandMarkTreatment}from"./chunk-MI67DI3H.js";import{Calendar as me}from"./chunk-PPHGBEJA.js";export{Calendar}from"./chunk-PPHGBEJA.js";export{ColorPicker,ColorPickerPanel,ColorSwatch,HexInput,colorFill,colorSwatchClasses}from"./chunk-LH7ZKPHJ.js";export{Popover}from"./chunk-LRASKGEZ.js";export{InputNumber_default as InputNumber}from"./chunk-TM5NQTFA.js";export{UnitMenu}from"./chunk-4MDSZSLC.js";export{WidestLabel}from"./chunk-X3LMTOMA.js";export{useSettingAuto,useSettingRowName}from"./chunk-2NMW66P5.js";export{useDebouncedValue}from"./chunk-SLGT5WPJ.js";export{useGridSelection}from"./chunk-VLKDWKVR.js";export{MARQUEE_IGNORE,marqueeHits,rectsIntersect,useMarquee}from"./chunk-OLFYNMTD.js";export{edgeScrollDelta,getScrollParent,scrollBoundsOf}from"./chunk-LACL4MAR.js";export{useRootIsDark}from"./chunk-UPXDDO3U.js";import{useTheme as he,resolveTheme as pe,CORNERS_FOR_THEME as fe,resolveCorners as ge,applyThemePrefs as be}from"./chunk-4K32E3AO.js";export{CORNERS,CORNERS_FOR_THEME,applyCorners,applyIconSet,applyThemePrefs,cornersFor,resolveCorners,resolveTheme,useTheme}from"./chunk-4K32E3AO.js";import{THEME_ICON_SETS as xe,loadIconSet as ye,ICON_SET_FOR_THEME as we}from"./chunk-VQCKMT5F.js";export{ICON_SET_FOR_THEME,THEME_ICON_SETS,iconSetFor,loadIconSet}from"./chunk-VQCKMT5F.js";export{AlignmentGrid}from"./chunk-VB4ZPIZF.js";export{statusColumn}from"./chunk-QLK2NCXK.js";export{BORDER_WIDTHS,FONT_WEIGHTS,MOTION_DURATIONS,TYPE_SCALE}from"./chunk-LH7IKIGE.js";import"./chunk-UVCMV2TL.js";export{useSort}from"./chunk-22SVN2ZM.js";export{slugify}from"./chunk-24AL3CDS.js";export{ENTRANCE_ATTR,ENTRANCE_FROM,ENTRANCE_FROM_ATTR,ENTRANCE_FROM_DEFAULT,ENTRANCE_KINDS,ENTRANCE_KINDS_WITH_FROM,ENTRANCE_STATE_ATTR,armEntrance,entranceAttrs,playEntrance,readEntrance}from"./chunk-YYGA4Y6E.js";export{HOVER_MOTION,MOTION_EASING,MOTION_GROUPS,MOTION_TIMING,motionSeconds,rotateDegrees}from"./chunk-AIJ3G6BD.js";export{hexWithAlpha,mixHex,rgbToHex}from"./chunk-CJSZW3OS.js";export{addShowWhenFacts,isShown,lazyShowWhenContext,showWhenFactReaders,showWhenFactsContext,showWhenOf,shownForOption,truthy,withRowRules,withRowsShownWhen,withShowWhen,withShowWhenFacts}from"./chunk-HCP7WOAL.js";export{gridColumnCount}from"./chunk-VNNVG4NR.js";export{BORDER_LINE_STYLES}from"./chunk-NOMWJTN2.js";export{FOCAL_DEFAULT,FOCAL_NUDGE_COARSE,FOCAL_NUDGE_STEP,focalFromRect,formatFocal,nudgeFocal,parseFocal}from"./chunk-25RR3GQW.js";export{contrastRatio,hexToHsv,hexToRgb,hsvToHex,parseHexColor,readableInk,relativeLuminance}from"./chunk-S6OB6HJB.js";export{DataTable}from"./chunk-5Y2JZL3I.js";export{EntityList}from"./chunk-QO2CN2ND.js";import{selectionAt as ke,copyToClipboard as ve}from"./chunk-452LT77I.js";export{copyToClipboard}from"./chunk-452LT77I.js";export{ResizableTable}from"./chunk-TXGVSWH6.js";import{useClickOutside as Ne}from"./chunk-SI26KESU.js";export{useClickOutside}from"./chunk-SI26KESU.js";export{useColumnConfig}from"./chunk-XGEN76DG.js";import"./chunk-ULJQYXHB.js";export{useTableNav}from"./chunk-ATMJ5ZPK.js";export{escapeHtml}from"./chunk-G6DKCCWH.js";export{Checkbox_default as Checkbox}from"./chunk-CGZBDI6C.js";export{Gantt}from"./chunk-JGN27L4Q.js";import{Segmented as Ce}from"./chunk-TALQMTCE.js";export{Segmented}from"./chunk-TALQMTCE.js";import"./chunk-EFKJLUYP.js";export{Kanban}from"./chunk-MXRF5YVN.js";export{ListFooter}from"./chunk-U73K3ICC.js";export{ListLoadError}from"./chunk-SYASK4QG.js";export{ListToolbar}from"./chunk-C75ICYHF.js";export{Pagination}from"./chunk-Q2RNFBYS.js";export{PortalBrandingProvider,resolvePortalBrandAsset,usePortalBranding}from"./chunk-ACYYVK6G.js";export{TreemapChart}from"./chunk-PRN2QDX6.js";export{squarify}from"./chunk-46BYGPGD.js";export{WaterfallChart}from"./chunk-WCAABJEV.js";export{RangeChart}from"./chunk-Q7CM4UDG.js";export{RankedBars}from"./chunk-53HHYEN4.js";export{SankeyChart}from"./chunk-R72SBGYR.js";export{SCATTER_SERIES_CAP,ScatterChart}from"./chunk-PPI4WJ3V.js";export{StatTile}from"./chunk-XX34ZFYB.js";export{Sparkline}from"./chunk-CKCDGSTC.js";export{SunburstChart}from"./chunk-3H476JWK.js";export{FunnelChart}from"./chunk-QZ2XRFDP.js";export{HeatmapChart}from"./chunk-FBI3XJWH.js";export{HistogramChart}from"./chunk-N64YAF5N.js";export{Meter}from"./chunk-MMA3WTF2.js";export{PieChart}from"./chunk-6EGZ4PV4.js";export{RADAR_SERIES_CAP,RadarChart}from"./chunk-FGP2IOFN.js";export{RadialBarChart}from"./chunk-OOND66P2.js";export{ChordChart}from"./chunk-35Q7ZMQD.js";import"./chunk-RTZFWH5U.js";export{StepChain,StepChainItem}from"./chunk-Z2Z653OO.js";import{Markdown as Se}from"./chunk-NPBRNEMR.js";export{Markdown,Markdown as MarkdownLite,plainCell,tableToCsv}from"./chunk-NPBRNEMR.js";export{Divider}from"./chunk-DFOFEBYX.js";export{Avatar,AvatarGroup}from"./chunk-SCNQK5NF.js";import"./chunk-UJUTS6LJ.js";export{isSafeLinkHref}from"./chunk-Z5TE3MEG.js";import{ContextMenu as _e}from"./chunk-MF7OELXP.js";export{ContextMenu,useContextMenu}from"./chunk-MF7OELXP.js";export{Banner}from"./chunk-OSMRYND3.js";import{END_ACTIONS_PAD as Ee,Input_default as Te,InputEndActionSlot as je,InputEndActionButton as Me}from"./chunk-BYTQRQ5P.js";export{Input_default as Input}from"./chunk-BYTQRQ5P.js";import{PLACEHOLDER_INK as Ie,FILTER_ON as Le,FILTER_ON_INK as Pe,FILTER_OFF as Re}from"./chunk-AYZY3YNC.js";export{INPUT_BASE,INPUT_SIZES,PLACEHOLDER_INK,inputClasses}from"./chunk-AYZY3YNC.js";export{AttachButton,AttachmentDropZone,AttachmentList,ComposerAttachments,PaperclipGlyph}from"./chunk-43YU7YWL.js";export{mediaFileName}from"./chunk-TAIH2VIW.js";import{TransferProgress as Ae}from"./chunk-TAB3K2WF.js";export{TransferProgress}from"./chunk-TAB3K2WF.js";import{useFileIntake as De,FileIntakeAlert as Oe}from"./chunk-TNGIXSTM.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"./chunk-TNGIXSTM.js";export{CHART_SPEC_LIMITS,parseChartSpec}from"./chunk-CR7T435F.js";export{SpecChart}from"./chunk-CMEPDSYB.js";import{timeAgo as Fe}from"./chunk-OJI4ROSD.js";export{currencyDecimals,currencySymbol,formatBytes,formatMoney,setCurrencyFormats,timeAgo}from"./chunk-OJI4ROSD.js";import{formatDate as We,formatTime as $e,formatDateTime as Be,userToday as He}from"./chunk-NHKT5IH6.js";export{DATE_FORMAT_OPTIONS,TZ_AUTO,dayKeyInZone,firstDayOfWeek,formatDate,formatDateTime,formatTime,getUserDateFormat,getUserTimezone,instantOnDayKey,knownZone,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile,userToday,userZone}from"./chunk-NHKT5IH6.js";export{EMPTY_VALUE}from"./chunk-36BRD5J3.js";export{DAY_MS,fromDateKey,toDateKey}from"./chunk-JRQMX4PK.js";import{pad2 as Ue}from"./chunk-LF27WIN2.js";export{TimeSeriesChart}from"./chunk-P5TSGXL4.js";export{DEFAULT_FLOW_CHART_LABELS,FlowChart}from"./chunk-2EBHJGMM.js";export{FLOW_LAYOUT,FLOW_SPEC_LIMITS,layoutFlow,parseFlowSpec}from"./chunk-FAERBT6Y.js";export{ChartBrush}from"./chunk-SAMPXZF3.js";export{ChartDot}from"./chunk-CK2YOGUS.js";export{ChartFrame}from"./chunk-A6TOHNJY.js";export{arcPath,areaBetween,areaFrom,bumpPath,curvePath,linearPath,monotonePath,polygonPoints,splinePath,stepPath}from"./chunk-VFC6QUEN.js";export{ColumnChart}from"./chunk-AQVPWUJ3.js";export{ChartDefs,MOTION,dashFor,fillFor,fillId,glowId,groundId,maskId,stagger}from"./chunk-465RRWBY.js";export{ChartSkeleton}from"./chunk-MEFB2KGF.js";export{ChartHighlightProvider,autoHighlightIndex,highlightOpacity,useHighlight}from"./chunk-CNYAHYE6.js";export{ImageAnnotator_default as ImageAnnotator}from"./chunk-OHRKENEP.js";import{publishDesktopFolders as Ye,requestFilesTrashView as Ge,FolderGlyph as ze,requestFilesDesktopFolderView as Ke,FileIconTile as Ve}from"./chunk-ST6FPYJ7.js";import{setPdfPreview as Xe}from"./chunk-I4RJAMLJ.js";import{cancelWindowFront as Je,windowHoldsChanges as Qe,requestWindowFront as Ze,confirmWindowDiscard as qe,useWindowManager as et,WINDOW_REGISTRY as tt,isPageEntry as rt,Modal as nt,setPerfCollecting as ot,drainPerfEvents as at,useDesktopHost as st,forgetMaximizedWindowBoxes as it,markMenuOpen as lt,setShellHomeRoute as ct,setShellTabStrip as dt,useCurrentTabKey as ut,useEnclosingModalId as mt,isShellApiClientConfigured as ht,isDraftEntityId as pt,activateWindowById as ft,CancelButton as gt,setWindowPosition as bt,isDraftEntityWindow as xt,subscribeWindowChrome as yt,getWindowChromeVersion as wt,isTabWindow as kt,readWindowChrome as vt,tabGroupOf as Nt,isEntityEntry as Ct}from"./chunk-EJTAPBGB.js";export{CancelButton,DesktopHostProvider,DocFavStar,EntityWindowFallback,EntityWindowLoading,EntityWindowState,MODAL_SUBMIT_SELECTOR,Modal,ModalActions,ModalMoreActions,UndoProvider,WindowCrashedFallback,WindowEditSlot,WindowErrorBoundary,WindowManagerProvider,WindowTitle,activateWindowById,beginWindowGesture,commitExposeHighlight,exitExposeMode,getActiveWindowRoute,getExposeHighlight,getWindowPosition,isEntityEntry,isPageEntry,markMenuOpen,requestWindowFront,setExposeHighlight,setShellWindowRegistry,setWindowDefaultPosition,setWindowPosition,splitTitle,subscribeExposeHighlight,toggleExposeMode,useCurrentTabKey,useDesktopHost,useEnclosingModalId,useIsActiveWindow,usePageSearch,useUndo,useUndoCanEdit,useWidgetSettings,useWindowDirty,useWindowManager,useWindowMenuItem,useWindowTitle}from"./chunk-EJTAPBGB.js";import{startMenuCategories as St,navSections as _t,navIcons as Et,sectionIcons as Tt,RAIL_W as jt,RAIL_MIN_W as Mt,RAIL_MAX_W as It,RAIL_COLLAPSED_W as Lt,WORK_AREA_CHANGED_EVENT as Pt,TAB_STRIP_H as Rt}from"./chunk-VIPNHDD3.js";export{setShellNavIcons}from"./chunk-VIPNHDD3.js";import"./chunk-KNUR2UEG.js";export{NEXT_CHUNK_PATH_PREFIX,STALE_CHUNK_RELOAD_COOLDOWN_MS,STALE_CHUNK_RELOAD_KEY,VITE_PRELOAD_ERROR_EVENT,installStaleChunkReload,isStaleChunkError}from"./chunk-JDCM2VHG.js";export{Result}from"./chunk-PSVGB7KT.js";import{navVisible as At,isSection as Dt,isReachable as Ot,visibleChildren as Ft}from"./chunk-5A7MWTXX.js";import"./chunk-YI4T5I5D.js";export{CopyButton}from"./chunk-TJ5YMXVB.js";export{ConfirmProvider,confirm,confirmDestructive,prompt,useConfirm}from"./chunk-OLXUMB2V.js";export{Dialog}from"./chunk-R7OZ2AQD.js";import"./chunk-EIFNESXS.js";import{ItemCount as Wt}from"./chunk-PO2KNVCC.js";export{ItemCount}from"./chunk-PO2KNVCC.js";import"./chunk-CJ4OEY3T.js";import"./chunk-LLXI57MB.js";import"./chunk-NQWORKZD.js";import"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as $t}from"./chunk-DBQNYJZ6.js";export{ColoredBadge}from"./chunk-L2WQOJ3T.js";export{matchUndoHotkey,useUndoHistory}from"./chunk-ZLB5GRL6.js";import{ROW_HEIGHTS as Bt,CONTROL_HEIGHTS as Ht}from"./chunk-5VJVEKVM.js";export{CONTROL_HEIGHTS,ROW_HEIGHTS,SPACING_ROLES,SPACING_SCALE,isSpacingStep}from"./chunk-5VJVEKVM.js";import{parseOption as Ut}from"./chunk-YPXONNBV.js";export{parseOption}from"./chunk-YPXONNBV.js";import"./chunk-4PJFL26P.js";export{ShellAuthProvider,useShellAuth}from"./chunk-2QY5BJLA.js";import{useIsMobile as Yt,useIsPhone as Gt}from"./chunk-UGTRSRIW.js";export{useIsMobile}from"./chunk-UGTRSRIW.js";import{useShellPrefs as zt,useShellPrefsAdapter as Kt}from"./chunk-POBVGDZP.js";export{ShellPrefsProvider,useLocalStoragePrefs,useShellPrefs}from"./chunk-POBVGDZP.js";import{useModalActive as Vt}from"./chunk-F3ZOO23R.js";export{useModalActive}from"./chunk-F3ZOO23R.js";import{APP_VERSION as Xt,VERSION as Jt}from"./chunk-ZHBKWBIJ.js";export{VERSION}from"./chunk-ZHBKWBIJ.js";export{DropdownMenu}from"./chunk-NJY4HPNB.js";import"./chunk-PM6HY5BH.js";export{useFocusTrap,useScrollLock}from"./chunk-DWGYC7OD.js";import{IconButton_default as Qt}from"./chunk-4YH7U7WL.js";export{IconButton_default as IconButton}from"./chunk-4YH7U7WL.js";export{GROUP_COLORS,GROUP_COLORS_SOLID,StatusBadge,StatusBadgeProvider,groupColors,statusLabel,useStatusLabel}from"./chunk-ABIWAS5K.js";import{PopupMenuDivider as Zt,PopupMenu as qt,PopupMenuLabel as er,PopupMenuItem as tr,resolveMenuLevels as rr,MenuIcon as nr,openMenuLevel as or,closeMenuBelow as ar,clampMenuTop as sr,menuPanelLeft as ir}from"./chunk-P56YLT73.js";export{PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu}from"./chunk-P56YLT73.js";import"./chunk-URHGHXDN.js";import{leavesContextMenuAlone as lr,describeContextTarget as cr}from"./chunk-5QFPTDQF.js";export{MENU_ON_MEDIA_ATTR,NATIVE_MENU_ATTR,describeContextTarget,keepsNativeMenu,leavesContextMenuAlone}from"./chunk-5QFPTDQF.js";import{Button_default as dr}from"./chunk-37FQVY2O.js";export{Button_default as Button}from"./chunk-37FQVY2O.js";import"./chunk-TSZPGDU3.js";import{Icon as ur,kitDrawing as mr}from"./chunk-ISVODSRP.js";export{Icon}from"./chunk-ISVODSRP.js";import{setThemeIconSetLoader as hr,subscribeIcons as pr,iconsVersion as fr,iconSets as gr,drawingIn as br,defaultIconSet as xr,hasIconSet as yr,registerIconSet as wr}from"./chunk-J75ZT2JQ.js";export{activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"./chunk-J75ZT2JQ.js";import{SpinnerRing as kr}from"./chunk-R2VKEMZH.js";export{LoadingSpinner,SpinnerRing}from"./chunk-R2VKEMZH.js";import{PANEL_SURFACE as vr}from"./chunk-BWJZTHZ6.js";import{TH_ONE_LINE as Nr}from"./chunk-FAPZFMS3.js";export{Tooltip}from"./chunk-CIZAUBWA.js";import{onOverlayOpen as Cr}from"./chunk-PGN5ME7B.js";export{OVERLAY_OPEN_EVENT,dismissPopups}from"./chunk-PGN5ME7B.js";import{createShellPortal as Sr}from"./chunk-5QRHQCRG.js";import{Z_LAYERS as _r}from"./chunk-62LW225J.js";export{Z_LAYERS}from"./chunk-62LW225J.js";export{MENU_MAX_HEIGHT,POPUP_MAX_WIDTH,placeMenu,popupBounds,useDropdownPosition}from"./chunk-TAHHZGRH.js";import{useBrowserState as Er}from"./chunk-KEFNQEXZ.js";export{IN_BROWSER}from"./chunk-KEFNQEXZ.js";export{useBrowserLayoutEffect}from"./chunk-PU2GJVMG.js";import"./chunk-3FININUU.js";export{setShellApiClient}from"./chunk-STKJA4PV.js";export{useUndoable,useUndoableState}from"./chunk-GZ4AMXEU.js";export{FitFrame,fitBoxScale,fitFrameStyle,fitScale}from"./chunk-M6UKCZHT.js";import"./chunk-3AUPCKBR.js";import{toast_default as Tr}from"./chunk-VLT4ZEHT.js";export{UNDOABLE_MS,toast_default as toast}from"./chunk-VLT4ZEHT.js";export{buttonClasses,iconButtonClasses}from"./chunk-LYGIOJ3J.js";import"./chunk-MRJKZWWV.js";export{BoxPlotChart}from"./chunk-P234FPKJ.js";export{CandlestickChart}from"./chunk-BEXFMSNK.js";export{CartesianPlot}from"./chunk-S4RD6UJU.js";import"./chunk-LLSGIMLG.js";export{angleScale,bandScale,binValues,ladderScale,linearScale,logScale,niceAxis,niceMax,radiusScale}from"./chunk-2JWPNR2U.js";export{ChartTooltip}from"./chunk-WDQI3FV6.js";export{CHART_INK,SERIES_SLOT_COUNT,SERIES_VARS,STATUS_VARS,assignSeriesSlots,resolveSeriesColor,resolveSeriesColorWithin,seriesColor,toggleSeriesSlot}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as jr}from"./chunk-TWVUQUUD.js";export{registerModalEscapeInterceptor}from"./chunk-TWVUQUUD.js";import{GLASS_INPUT_BG as Mr,glassStyle as Ir}from"./chunk-5FYDNH4Y.js";export{GLASS_DIVIDER,GLASS_INPUT_BG,glassStyle,solidSurfaceStyle}from"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";export{usePlotWidth}from"./chunk-MAFUXCPZ.js";import{useShellStrings as Lr,useShellLocale as Pr}from"./chunk-NRHG4R2Q.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"./chunk-NRHG4R2Q.js";import{formatGrouped as Rr}from"./chunk-C3QOHMR6.js";import{lazy as Ar,createContext as Dr,useSyncExternalStore as Or,useState as Fr,useEffect as Wr,useRef as $r,useCallback as Br,useLayoutEffect as Hr,Fragment as Ur,useMemo as Yr,isValidElement as Gr,cloneElement as zr,Suspense as Kr,useId as Vr,useContext as Xr}from"react";import{Dialog as Jr,DialogBackdrop as Qr,DialogPanel as Zr}from"@headlessui/react";import{jsxs as qr,jsx as en,Fragment as tn}from"react/jsx-runtime";import{useQueryClient as rn,useQuery as nn,useInfiniteQuery as on}from"@tanstack/react-query";import"react-router-dom";function an(...e){return Object.assign({},...e)}function sn(e){let t=null,r=0,n=0;const o=/* @__PURE__ */new Set,a=()=>{o.forEach(e=>e())},s=(n,o)=>{t={...n,nav:++r},a(),!1!==o?.raise&&Ze(e)};return{windowKey:e,set(r,o){const i=++n;if(null===r)return t=null,Je(e),void a();t&&!1!==o?.askDiscard&&Qe(e)?(!1!==o?.raise&&Ze(e),qe(e).then(e=>{e&&i===n&&s(r,o)})):s(r,o)},get:()=>t,subscribe:e=>(o.add(e),()=>{o.delete(e)})}}function ln(e){return Or(e.subscribe,e.get,e.get)}var cn=[{title:"Global",shortcuts:[{keys:$,description:"Search"},{keys:B,description:"Start menu, or collapse the sidebar"},{keys:"Ctrl F11",description:"Toggle fullscreen"},{keys:"ESC",description:"Exit fullscreen (when no windows open)"},{keys:"?",description:"Show keyboard shortcuts"}]},{title:"Windows (window buttons focused)",shortcuts:[{keys:"←↑→↓",description:"Move window"},{keys:`${H} Arrows`,description:"Resize window"},{keys:`${U} ←/→`,description:"Snap to left / right half"},{keys:`${U} ↑`,description:"Maximize"},{keys:`${U} ↓`,description:"Restore / minimize"},{keys:Y,description:"Toggle maximize"}]},{title:"Tabs (Sidebar layout, tab focused)",shortcuts:[{keys:"←/→",description:"Previous / next tab"},{keys:`${U} ${H} ←/→`,description:"Move tab left / right"}]},{title:"Edit",shortcuts:[{keys:G,description:"Undo, in the window in front"},{keys:z,description:"Redo"},...q?[]:[{keys:"Ctrl+Y",description:"Redo"}]]},{title:"Lists",shortcuts:[{keys:"J / ↓",description:"Next row"},{keys:"K / ↑",description:"Previous row"},{keys:"⏎",description:"Open selected row"},{keys:"⇧J / ⇧K",description:"Move and select"},{keys:"⇧ Click",description:"Range select"},{keys:"Space",description:"Toggle row checkbox"},{keys:K,description:"Select / deselect all"},{keys:V,description:"Create new item"},{keys:X,description:"Edit selected item"}]},{title:"Modals / Forms",shortcuts:[{keys:J,description:"Submit"},{keys:Q,description:"Save"},{keys:Z,description:"Save as new (duplicate)"},{keys:"ESC",description:"Close modal"}]}];function dn(){const[e,t]=Fr(!1);return Wr(()=>{const e=()=>t(e=>!e);return document.addEventListener("toggle-shortcut-help",e),()=>document.removeEventListener("toggle-shortcut-help",e)},[]),Wr(()=>{const e=e=>{if("?"===e.key&&!e.metaKey&&!e.ctrlKey&&!e.altKey){const r=e.target?.tagName;if("INPUT"===r||"TEXTAREA"===r||"SELECT"===r)return;if(e.target?.isContentEditable)return;e.preventDefault(),t(e=>!e)}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[]),$t(e),/* @__PURE__ */qr(Jr,{open:e,onClose:()=>t(!1),className:"relative",style:{zIndex:_r.overlay},children:[
|
|
2
|
+
import{subscribePomo as e,getPomoSnapshot as t}from"./chunk-DYJQIZX2.js";export{setShellTodoProvider}from"./chunk-DYJQIZX2.js";import{wallpaperSrc as r,WALLPAPER_PREF_TOKEN as n,uploadWallpaper as o,wallpaperUploadError as a,deleteWallpaper as s,getWallpaper as i}from"./chunk-H6JJAVYL.js";import{PREVIEW_OPENED_EVENT as l,openPreviewFile as c}from"./chunk-WD3S3ATX.js";import{playNotification as d,playStartup as u,soundsEnabled as m,getSoundConfig as h,SOUND_GRID_SHOWN as p,SOUND_PACK_KEYS as f,soundPackName as g,SOUND_TYPES as b,soundTypeName as x,setSoundForType as y,previewSound as w,setAllSounds as k,playLogout as v}from"./chunk-CPWXLXQ7.js";import{useAuth as N,readStored as C,initialRailCollapsed as S,RAIL_COLLAPSED_KEY as _,writeStored as E,RAIL_WIDTH_KEY as T}from"./chunk-AQH6MAYK.js";export{setShellAuthBridge}from"./chunk-AQH6MAYK.js";import"./chunk-SSAYFELC.js";export{ErrorBoundary}from"./chunk-P7X4PWJJ.js";export{ErrorPage}from"./chunk-6NXPOZ6X.js";export{FormLayoutPage}from"./chunk-GNB6KUCT.js";export{GalleryTemplate}from"./chunk-JKO4JZPO.js";export{ACCENT_ROLES,COLOUR_ROLES,FLAT_STATUS_ROLES,IDENTITY_ROLES,NEUTRAL_ROLES,SCRIM_ROLES,STATUS_GROUPS,STATUS_ROLES}from"./chunk-VVJIKS47.js";export{ELEVATION_LEVELS,RADIUS_ROLES}from"./chunk-4MVRSCQE.js";export{startClientTelemetry}from"./chunk-MS6IZF6E.js";export{AuthScreen}from"./chunk-THVE54FN.js";export{ChatTemplate}from"./chunk-MGGZINTI.js";export{CheckoutTemplate}from"./chunk-7AF5JGRM.js";export{DashboardTemplate}from"./chunk-NO5BMPT5.js";export{DataTablePage}from"./chunk-JUGRSO5J.js";export{EmailTemplate}from"./chunk-H2S75BKK.js";export{useTransferProgress}from"./chunk-QHOEMRR7.js";export{Stepper}from"./chunk-KTO427N3.js";export{Tabs,tabButtonId,tabPanelId}from"./chunk-EJMCK7E3.js";export{Paragraph,Text,Title}from"./chunk-366URRSE.js";import{TimeAgo as j}from"./chunk-DV6TUXCZ.js";export{TimeAgo}from"./chunk-DV6TUXCZ.js";export{TopNav}from"./chunk-FHTL7ZZR.js";export{SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,SidebarSection}from"./chunk-4BB5DHFX.js";export{Skeleton}from"./chunk-4Z62SEA5.js";export{ListRow,SortableList}from"./chunk-5LG6TOV6.js";export{Grid,Inline,Stack}from"./chunk-3RPER7VH.js";export{Statistic}from"./chunk-R3BSWWGB.js";export{SettingReset}from"./chunk-INQQUAIO.js";export{SettingRow}from"./chunk-LRMDLZMM.js";export{MetricBar}from"./chunk-PLESHI3E.js";export{isSeverityTone,severityOf}from"./chunk-TZFNWAED.js";export{MetricBarLegend}from"./chunk-VTCMO3K7.js";import"./chunk-URBCGEXG.js";export{MilestoneTimeline}from"./chunk-E57C7NBA.js";export{PageHeader}from"./chunk-3EYJ4G7L.js";export{POST_PRODUCTION_STATUSES,ProductionTimeline,STAGES,calcOverall,calcReportOverall,useProductionTimeline}from"./chunk-KE7P74XM.js";import"./chunk-S4Z657L6.js";export{TimelineTrack}from"./chunk-Q7FPGOUY.js";export{fmtSliderDate,toDayMs}from"./chunk-5CFERCYW.js";import{GlobalSearch as M,openGlobalSearch as I}from"./chunk-HU5FTTW2.js";export{GlobalSearch,openGlobalSearch}from"./chunk-HU5FTTW2.js";import{navPagesProvider as L,partitionNav as P,sanitizeRecent as R,favoritesToResults as A,pushRecent as D,PAGE_RESULT_ENTITY as O,parsePageResultTarget as F}from"./chunk-HGOWQO63.js";export{pushRecent as pushRecentSearch,sanitizeRecent as sanitizeRecentSearches}from"./chunk-HGOWQO63.js";export{HelpCenter}from"./chunk-2NHYLLHO.js";export{SidebarActionButton}from"./chunk-KMTCYDJH.js";import{SidebarLayout as W}from"./chunk-XN72RFDV.js";export{SidebarLayout,useWindowControlsInset}from"./chunk-XN72RFDV.js";import"./chunk-QWK6DRSN.js";export{IconRail,IconRailButton}from"./chunk-SJUEGYT2.js";import"./chunk-FQEALPZJ.js";import{CMD_K as $,CMD_DOT as B,SHIFT as H,MOD as U,ENTER as Y,CMD_Z as G,CMD_SHIFT_Z as z,CMD_A as K,ALT_SHIFT_N as V,ALT_SHIFT_E as X,CMD_ENTER as J,CMD_S as Q,ALT_SHIFT_D as Z,isMac as q}from"./chunk-TTD2M6RF.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,MOD,SHIFT,isMac}from"./chunk-TTD2M6RF.js";export{LanguagePanel,LanguageSelect,languageSelectWidth}from"./chunk-CHWZGSYG.js";import{withSpareRow as ee,EditableGrid as te}from"./chunk-YGNJIOOH.js";export{EditableGrid}from"./chunk-YGNJIOOH.js";export{EmptyValue}from"./chunk-HNQPF5QZ.js";export{FloatingBar}from"./chunk-WSQ73CRR.js";export{Card,StatCard}from"./chunk-RKSCB5BJ.js";export{ContainerFillChart}from"./chunk-BL347U3N.js";export{CountBadge}from"./chunk-PFOTEDSQ.js";import{TabStrip as re}from"./chunk-5LB7LCEG.js";export{ENGLISH,SHELL_LANGUAGE_STORAGE_KEY,ShellLanguageProvider,matchShellLanguage,readSavedShellLanguage,resolveShellLanguage,saveShellLanguage,useShellLanguage}from"./chunk-GKYGPCGL.js";export{Accordion,AccordionBody,AccordionHeading}from"./chunk-3BQMICGG.js";export{APP_UPDATE_POLL_MS,AppUpdateBanner,useAppUpdate}from"./chunk-BGLUOC7W.js";export{BudgetBar,budgetState}from"./chunk-7B6JPNOD.js";export{ICON_NAMES,isIconName}from"./chunk-3C7JKJGL.js";export{BRAND_ICON_NAMES,isBrandIconName}from"./chunk-RQGLDRRF.js";export{BRAND_MAX_HEIGHT,BRAND_MIN_HEIGHT_PX,brandBox}from"./chunk-64ACCUNN.js";export{WidthsBar}from"./chunk-OX7Q5PPR.js";export{COLUMN_COUNT_MAX,COLUMN_COUNT_WIDTHS,COLUMN_SHARES_EQUAL,COLUMN_SHARE_MIN,columnSharesWidths,resolveColumnShares,resolveColumnWidths}from"./chunk-PLGJOHEG.js";export{SplitButton_default as SplitButton}from"./chunk-GURLMAZM.js";export{Switch_default as Switch}from"./chunk-M3R4C3A6.js";export{TagInput}from"./chunk-B36ZROD7.js";export{TextToolbar,textToolbarRows,textToolbarWindowColumns}from"./chunk-IDH323EU.js";export{TEXT_ALIGNS,TEXT_ALIGN_FIT,TEXT_ALIGN_ICONS,textAlignFit,textAlignOptions,textAlignWords}from"./chunk-72UHB4JU.js";export{Textarea_default as Textarea}from"./chunk-PB7G6CJ7.js";export{TileButton_default as TileButton}from"./chunk-H2R4SNNO.js";export{TimePicker_default as TimePicker}from"./chunk-ZRWZHWKI.js";export{SearchInput_default as SearchInput}from"./chunk-YQKNRT7L.js";import{ShowWhen as ne}from"./chunk-YEM4KYCW.js";export{ShowWhen}from"./chunk-YEM4KYCW.js";export{SidesEachToggle,SidesInput,sidesStartEach}from"./chunk-MDXZ7YAC.js";export{Slider,SliderGroup}from"./chunk-7EPCBDS5.js";export{Snippet}from"./chunk-QY2DGLCJ.js";export{NumericKeypad}from"./chunk-54WCVNJJ.js";export{MAX_FRACTION_DIGITS,appendKey,backspace}from"./chunk-VEPVOHCV.js";export{PICTURE_TILES_COLUMNS_VAR,PictureTiles}from"./chunk-OHWP24DL.js";export{PositionInput}from"./chunk-JU6VBLTU.js";export{RadioGroup}from"./chunk-32VV2J22.js";export{Radio_default as Radio}from"./chunk-NI5FXWK5.js";export{LinkPicker,TextLinkField}from"./chunk-ATTQTQJI.js";export{SearchableSelect}from"./chunk-DFI5EHSV.js";export{Label,labelClasses}from"./chunk-EQKUFYX6.js";export{MEDIA_FILES_DRAG_TYPE,MEDIA_FILE_DRAG_TYPE,MEDIA_FOLDER_DRAG_TYPE,MediaLibrary,readMediaFileDrag}from"./chunk-N7EZ2BFE.js";export{Tree,TreeEmptySlot,TreeGroup,TreeGroupLabel,TreeRow,TreeSeam}from"./chunk-BTMZ5MUY.js";import"./chunk-5B7CLXHC.js";import{MarqueeBox as oe}from"./chunk-IC72MGON.js";export{MarqueeBox}from"./chunk-IC72MGON.js";import{readStoredWidth as ae}from"./chunk-2KD6R2XF.js";export{ResizeHandle}from"./chunk-2KD6R2XF.js";export{ImageLightbox,lightboxKind}from"./chunk-ONUNFTZD.js";export{LIGHTBOX_PICTURE_FIT,ZoomableImage}from"./chunk-CGUMJZUB.js";export{Drawer}from"./chunk-AYTGYEOI.js";export{EmptyState}from"./chunk-W3454ZES.js";export{DescriptionList}from"./chunk-SACUSHVN.js";export{Breadcrumbs}from"./chunk-WREUA43Q.js";export{mediaLibraryMenu}from"./chunk-UFJR63AO.js";export{mediaMoveItems,mediaMoveSubmenu,useMediaMoveItems}from"./chunk-GRAFJD3L.js";export{RenameField}from"./chunk-F4KB3K3I.js";export{FULL_BADGE_TILE_PX,MediaUploadGrid}from"./chunk-B4Y5NGHR.js";export{MediaUsedInList}from"./chunk-XOEYCDWT.js";export{NativeSelect,Select_default as Select}from"./chunk-W7HTHKN2.js";import{firstEnabledIndex as se,lastEnabledIndex as ie,nextEnabledIndex as le,matchTypeahead as ce}from"./chunk-EO5RLFRX.js";import"./chunk-GML6FVPA.js";export{CornersInput}from"./chunk-GZ57F6PN.js";export{DatePicker_default as DatePicker}from"./chunk-GGNQEZ2D.js";export{DateRangePicker,toISODate}from"./chunk-AZANUXJT.js";export{DateTimePicker_default as DateTimePicker}from"./chunk-ROYHU3E5.js";export{DisplayChips}from"./chunk-52RSW6TO.js";export{FilePicker_default as FilePicker}from"./chunk-QE2F4YQQ.js";export{FormErrorSummary}from"./chunk-UDJPSHVI.js";export{BorderInput,borderSides,borderStartEach}from"./chunk-7KUHILEA.js";export{IconPicker}from"./chunk-ZKWAWQ74.js";export{BrandAssetEditor}from"./chunk-3OK5VZOU.js";export{MediaUploadField}from"./chunk-KJ4CHRRC.js";export{ImageFocusPoint}from"./chunk-CUJ537IY.js";import{FormField as de}from"./chunk-6KBDNYRW.js";export{FormField}from"./chunk-6KBDNYRW.js";import{BrandMark as ue}from"./chunk-MI67DI3H.js";export{BrandMark,resolveBrandMarkTreatment}from"./chunk-MI67DI3H.js";import{Calendar as me}from"./chunk-PPHGBEJA.js";export{Calendar}from"./chunk-PPHGBEJA.js";export{ColorPicker,ColorPickerPanel,ColorSwatch,HexInput,colorFill,colorSwatchClasses}from"./chunk-LH7ZKPHJ.js";export{Popover}from"./chunk-LRASKGEZ.js";export{InputNumber_default as InputNumber}from"./chunk-TM5NQTFA.js";export{UnitMenu}from"./chunk-4MDSZSLC.js";export{WidestLabel}from"./chunk-X3LMTOMA.js";export{useSettingAuto,useSettingRowName}from"./chunk-2NMW66P5.js";export{useDebouncedValue}from"./chunk-SLGT5WPJ.js";export{useGridSelection}from"./chunk-VLKDWKVR.js";export{MARQUEE_IGNORE,marqueeHits,rectsIntersect,useMarquee}from"./chunk-OLFYNMTD.js";export{edgeScrollDelta,getScrollParent,scrollBoundsOf}from"./chunk-LACL4MAR.js";export{useRootIsDark}from"./chunk-UPXDDO3U.js";import{useTheme as he,resolveTheme as pe,CORNERS_FOR_THEME as fe,resolveCorners as ge,applyThemePrefs as be}from"./chunk-4K32E3AO.js";export{CORNERS,CORNERS_FOR_THEME,applyCorners,applyIconSet,applyThemePrefs,cornersFor,resolveCorners,resolveTheme,useTheme}from"./chunk-4K32E3AO.js";import{THEME_ICON_SETS as xe,loadIconSet as ye,ICON_SET_FOR_THEME as we}from"./chunk-VQCKMT5F.js";export{ICON_SET_FOR_THEME,THEME_ICON_SETS,iconSetFor,loadIconSet}from"./chunk-VQCKMT5F.js";export{AlignmentGrid}from"./chunk-VB4ZPIZF.js";export{statusColumn}from"./chunk-QLK2NCXK.js";export{BORDER_WIDTHS,FONT_WEIGHTS,MOTION_DURATIONS,TYPE_SCALE}from"./chunk-LH7IKIGE.js";import"./chunk-UVCMV2TL.js";export{useSort}from"./chunk-22SVN2ZM.js";export{slugify}from"./chunk-24AL3CDS.js";export{ENTRANCE_ATTR,ENTRANCE_FROM,ENTRANCE_FROM_ATTR,ENTRANCE_FROM_DEFAULT,ENTRANCE_KINDS,ENTRANCE_KINDS_WITH_FROM,ENTRANCE_STATE_ATTR,armEntrance,entranceAttrs,playEntrance,readEntrance}from"./chunk-YYGA4Y6E.js";export{HOVER_MOTION,MOTION_EASING,MOTION_GROUPS,MOTION_TIMING,motionSeconds,rotateDegrees}from"./chunk-AIJ3G6BD.js";export{hexWithAlpha,mixHex,rgbToHex}from"./chunk-CJSZW3OS.js";export{addShowWhenFacts,isShown,lazyShowWhenContext,showWhenFactReaders,showWhenFactsContext,showWhenOf,shownForOption,truthy,withRowRules,withRowsShownWhen,withShowWhen,withShowWhenFacts}from"./chunk-HCP7WOAL.js";export{gridColumnCount}from"./chunk-VNNVG4NR.js";export{BORDER_LINE_STYLES}from"./chunk-NOMWJTN2.js";export{FOCAL_DEFAULT,FOCAL_NUDGE_COARSE,FOCAL_NUDGE_STEP,focalFromRect,formatFocal,nudgeFocal,parseFocal}from"./chunk-25RR3GQW.js";export{contrastRatio,hexToHsv,hexToRgb,hsvToHex,parseHexColor,readableInk,relativeLuminance}from"./chunk-S6OB6HJB.js";export{DataTable}from"./chunk-5Y2JZL3I.js";export{EntityList}from"./chunk-QO2CN2ND.js";import{selectionAt as ke,copyToClipboard as ve}from"./chunk-452LT77I.js";export{copyToClipboard}from"./chunk-452LT77I.js";export{ResizableTable}from"./chunk-TXGVSWH6.js";import{useClickOutside as Ne}from"./chunk-SI26KESU.js";export{useClickOutside}from"./chunk-SI26KESU.js";export{useColumnConfig}from"./chunk-XGEN76DG.js";import"./chunk-ULJQYXHB.js";export{useTableNav}from"./chunk-ATMJ5ZPK.js";export{escapeHtml}from"./chunk-G6DKCCWH.js";export{Checkbox_default as Checkbox}from"./chunk-CGZBDI6C.js";export{Gantt}from"./chunk-JGN27L4Q.js";import{Segmented as Ce}from"./chunk-TALQMTCE.js";export{Segmented}from"./chunk-TALQMTCE.js";import"./chunk-EFKJLUYP.js";export{Kanban}from"./chunk-MXRF5YVN.js";export{ListFooter}from"./chunk-U73K3ICC.js";export{ListLoadError}from"./chunk-SYASK4QG.js";export{ListToolbar}from"./chunk-C75ICYHF.js";export{Pagination}from"./chunk-Q2RNFBYS.js";export{PortalBrandingProvider,resolvePortalBrandAsset,usePortalBranding}from"./chunk-ACYYVK6G.js";export{TreemapChart}from"./chunk-PRN2QDX6.js";export{squarify}from"./chunk-46BYGPGD.js";export{WaterfallChart}from"./chunk-WCAABJEV.js";export{RangeChart}from"./chunk-Q7CM4UDG.js";export{RankedBars}from"./chunk-53HHYEN4.js";export{SankeyChart}from"./chunk-R72SBGYR.js";export{SCATTER_SERIES_CAP,ScatterChart}from"./chunk-PPI4WJ3V.js";export{StatTile}from"./chunk-XX34ZFYB.js";export{Sparkline}from"./chunk-CKCDGSTC.js";export{SunburstChart}from"./chunk-3H476JWK.js";export{FunnelChart}from"./chunk-QZ2XRFDP.js";export{HeatmapChart}from"./chunk-FBI3XJWH.js";export{HistogramChart}from"./chunk-N64YAF5N.js";export{Meter}from"./chunk-MMA3WTF2.js";export{PieChart}from"./chunk-6EGZ4PV4.js";export{RADAR_SERIES_CAP,RadarChart}from"./chunk-FGP2IOFN.js";export{RadialBarChart}from"./chunk-OOND66P2.js";export{ChordChart}from"./chunk-35Q7ZMQD.js";import"./chunk-RTZFWH5U.js";export{StepChain,StepChainItem}from"./chunk-Z2Z653OO.js";import{Markdown as Se}from"./chunk-NPBRNEMR.js";export{Markdown,Markdown as MarkdownLite,plainCell,tableToCsv}from"./chunk-NPBRNEMR.js";export{Divider}from"./chunk-DFOFEBYX.js";export{Avatar,AvatarGroup}from"./chunk-SCNQK5NF.js";import"./chunk-UJUTS6LJ.js";export{isSafeLinkHref}from"./chunk-Z5TE3MEG.js";import{ContextMenu as _e}from"./chunk-MF7OELXP.js";export{ContextMenu,useContextMenu}from"./chunk-MF7OELXP.js";export{Banner}from"./chunk-OSMRYND3.js";import{END_ACTIONS_PAD as Ee,Input_default as Te,InputEndActionSlot as je,InputEndActionButton as Me}from"./chunk-BYTQRQ5P.js";export{Input_default as Input}from"./chunk-BYTQRQ5P.js";import{PLACEHOLDER_INK as Ie,FILTER_ON as Le,FILTER_ON_INK as Pe,FILTER_OFF as Re}from"./chunk-AYZY3YNC.js";export{INPUT_BASE,INPUT_SIZES,PLACEHOLDER_INK,inputClasses}from"./chunk-AYZY3YNC.js";export{AttachButton,AttachmentDropZone,AttachmentList,ComposerAttachments,PaperclipGlyph}from"./chunk-43YU7YWL.js";export{mediaFileName}from"./chunk-TAIH2VIW.js";import{TransferProgress as Ae}from"./chunk-TAB3K2WF.js";export{TransferProgress}from"./chunk-TAB3K2WF.js";import{useFileIntake as De,FileIntakeAlert as Oe}from"./chunk-TNGIXSTM.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"./chunk-TNGIXSTM.js";export{CHART_SPEC_LIMITS,parseChartSpec}from"./chunk-CR7T435F.js";export{SpecChart}from"./chunk-CMEPDSYB.js";import{timeAgo as Fe}from"./chunk-OJI4ROSD.js";export{currencyDecimals,currencySymbol,formatBytes,formatMoney,setCurrencyFormats,timeAgo}from"./chunk-OJI4ROSD.js";import{formatDate as We,formatTime as $e,formatDateTime as Be,userToday as He}from"./chunk-NHKT5IH6.js";export{DATE_FORMAT_OPTIONS,TZ_AUTO,dayKeyInZone,firstDayOfWeek,formatDate,formatDateTime,formatTime,getUserDateFormat,getUserTimezone,instantOnDayKey,knownZone,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile,userToday,userZone}from"./chunk-NHKT5IH6.js";export{EMPTY_VALUE}from"./chunk-36BRD5J3.js";export{DAY_MS,fromDateKey,toDateKey}from"./chunk-JRQMX4PK.js";import{pad2 as Ue}from"./chunk-LF27WIN2.js";export{TimeSeriesChart}from"./chunk-P5TSGXL4.js";export{DEFAULT_FLOW_CHART_LABELS,FlowChart}from"./chunk-2EBHJGMM.js";export{FLOW_LAYOUT,FLOW_SPEC_LIMITS,layoutFlow,parseFlowSpec}from"./chunk-FAERBT6Y.js";export{ChartBrush}from"./chunk-SAMPXZF3.js";export{ChartDot}from"./chunk-CK2YOGUS.js";export{ChartFrame}from"./chunk-A6TOHNJY.js";export{arcPath,areaBetween,areaFrom,bumpPath,curvePath,linearPath,monotonePath,polygonPoints,splinePath,stepPath}from"./chunk-VFC6QUEN.js";export{ColumnChart}from"./chunk-AQVPWUJ3.js";export{ChartDefs,MOTION,dashFor,fillFor,fillId,glowId,groundId,maskId,stagger}from"./chunk-465RRWBY.js";export{ChartSkeleton}from"./chunk-MEFB2KGF.js";export{ChartHighlightProvider,autoHighlightIndex,highlightOpacity,useHighlight}from"./chunk-CNYAHYE6.js";export{ImageAnnotator_default as ImageAnnotator}from"./chunk-OHRKENEP.js";import{publishDesktopFolders as Ye,requestFilesTrashView as Ge,FolderGlyph as ze,requestFilesDesktopFolderView as Ke,FileIconTile as Ve}from"./chunk-ST6FPYJ7.js";import{setPdfPreview as Xe}from"./chunk-I4RJAMLJ.js";import{cancelWindowFront as Je,windowHoldsChanges as Qe,requestWindowFront as Ze,confirmWindowDiscard as qe,useWindowManager as et,WINDOW_REGISTRY as tt,isPageEntry as rt,Modal as nt,setPerfCollecting as ot,drainPerfEvents as at,useDesktopHost as st,forgetMaximizedWindowBoxes as it,markMenuOpen as lt,setShellHomeRoute as ct,setShellTabStrip as dt,useCurrentTabKey as ut,useEnclosingModalId as mt,isShellApiClientConfigured as ht,isDraftEntityId as pt,activateWindowById as ft,CancelButton as gt,setWindowPosition as bt,isDraftEntityWindow as xt,subscribeWindowChrome as yt,getWindowChromeVersion as wt,isTabWindow as kt,readWindowChrome as vt,tabGroupOf as Nt,isEntityEntry as Ct}from"./chunk-EJTAPBGB.js";export{CancelButton,DesktopHostProvider,DocFavStar,EntityWindowFallback,EntityWindowLoading,EntityWindowState,MODAL_SUBMIT_SELECTOR,Modal,ModalActions,ModalMoreActions,UndoProvider,WindowCrashedFallback,WindowEditSlot,WindowErrorBoundary,WindowManagerProvider,WindowTitle,activateWindowById,beginWindowGesture,commitExposeHighlight,exitExposeMode,getActiveWindowRoute,getExposeHighlight,getWindowPosition,isEntityEntry,isPageEntry,markMenuOpen,requestWindowFront,setExposeHighlight,setShellWindowRegistry,setWindowDefaultPosition,setWindowPosition,splitTitle,subscribeExposeHighlight,toggleExposeMode,useCurrentTabKey,useDesktopHost,useEnclosingModalId,useIsActiveWindow,usePageSearch,useUndo,useUndoCanEdit,useWidgetSettings,useWindowDirty,useWindowManager,useWindowMenuItem,useWindowTitle}from"./chunk-EJTAPBGB.js";import{startMenuCategories as St,navSections as _t,navIcons as Et,sectionIcons as Tt,RAIL_W as jt,RAIL_MIN_W as Mt,RAIL_MAX_W as It,RAIL_COLLAPSED_W as Lt,WORK_AREA_CHANGED_EVENT as Pt,TAB_STRIP_H as Rt}from"./chunk-VIPNHDD3.js";export{setShellNavIcons}from"./chunk-VIPNHDD3.js";import"./chunk-KNUR2UEG.js";export{NEXT_CHUNK_PATH_PREFIX,STALE_CHUNK_RELOAD_COOLDOWN_MS,STALE_CHUNK_RELOAD_KEY,VITE_PRELOAD_ERROR_EVENT,installStaleChunkReload,isStaleChunkError}from"./chunk-JDCM2VHG.js";export{Result}from"./chunk-PSVGB7KT.js";import{navVisible as At,isSection as Dt,isReachable as Ot,visibleChildren as Ft}from"./chunk-5A7MWTXX.js";import"./chunk-YI4T5I5D.js";export{CopyButton}from"./chunk-TJ5YMXVB.js";export{ConfirmProvider,confirm,confirmDestructive,prompt,useConfirm}from"./chunk-OLXUMB2V.js";export{Dialog}from"./chunk-R7OZ2AQD.js";import"./chunk-EIFNESXS.js";import{ItemCount as Wt}from"./chunk-PO2KNVCC.js";export{ItemCount}from"./chunk-PO2KNVCC.js";import"./chunk-CJ4OEY3T.js";import"./chunk-LLXI57MB.js";import"./chunk-NQWORKZD.js";import"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as $t}from"./chunk-DBQNYJZ6.js";export{ColoredBadge}from"./chunk-L2WQOJ3T.js";export{matchUndoHotkey,useUndoHistory}from"./chunk-ZLB5GRL6.js";import{ROW_HEIGHTS as Bt,CONTROL_HEIGHTS as Ht}from"./chunk-5VJVEKVM.js";export{CONTROL_HEIGHTS,ROW_HEIGHTS,SPACING_ROLES,SPACING_SCALE,isSpacingStep}from"./chunk-5VJVEKVM.js";import{parseOption as Ut}from"./chunk-YPXONNBV.js";export{parseOption}from"./chunk-YPXONNBV.js";import"./chunk-4PJFL26P.js";export{ShellAuthProvider,useShellAuth}from"./chunk-2QY5BJLA.js";import{useIsMobile as Yt,useIsPhone as Gt}from"./chunk-UGTRSRIW.js";export{useIsMobile}from"./chunk-UGTRSRIW.js";import{useShellPrefs as zt,useShellPrefsAdapter as Kt}from"./chunk-POBVGDZP.js";export{ShellPrefsProvider,useLocalStoragePrefs,useShellPrefs}from"./chunk-POBVGDZP.js";import{useModalActive as Vt}from"./chunk-F3ZOO23R.js";export{useModalActive}from"./chunk-F3ZOO23R.js";import{APP_VERSION as Xt,VERSION as Jt}from"./chunk-YVXF7L66.js";export{VERSION}from"./chunk-YVXF7L66.js";export{DropdownMenu}from"./chunk-NJY4HPNB.js";import"./chunk-PM6HY5BH.js";export{useFocusTrap,useScrollLock}from"./chunk-DWGYC7OD.js";import{IconButton_default as Qt}from"./chunk-4YH7U7WL.js";export{IconButton_default as IconButton}from"./chunk-4YH7U7WL.js";export{GROUP_COLORS,GROUP_COLORS_SOLID,StatusBadge,StatusBadgeProvider,groupColors,statusLabel,useStatusLabel}from"./chunk-ABIWAS5K.js";import{PopupMenuDivider as Zt,PopupMenu as qt,PopupMenuLabel as er,PopupMenuItem as tr,resolveMenuLevels as rr,MenuIcon as nr,openMenuLevel as or,closeMenuBelow as ar,clampMenuTop as sr,menuPanelLeft as ir}from"./chunk-P56YLT73.js";export{PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu}from"./chunk-P56YLT73.js";import"./chunk-URHGHXDN.js";import{leavesContextMenuAlone as lr,describeContextTarget as cr}from"./chunk-5QFPTDQF.js";export{MENU_ON_MEDIA_ATTR,NATIVE_MENU_ATTR,describeContextTarget,keepsNativeMenu,leavesContextMenuAlone}from"./chunk-5QFPTDQF.js";import{Button_default as dr}from"./chunk-37FQVY2O.js";export{Button_default as Button}from"./chunk-37FQVY2O.js";import"./chunk-TSZPGDU3.js";import{Icon as ur,kitDrawing as mr}from"./chunk-ISVODSRP.js";export{Icon}from"./chunk-ISVODSRP.js";import{setThemeIconSetLoader as hr,subscribeIcons as pr,iconsVersion as fr,iconSets as gr,drawingIn as br,defaultIconSet as xr,hasIconSet as yr,registerIconSet as wr}from"./chunk-J75ZT2JQ.js";export{activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"./chunk-J75ZT2JQ.js";import{SpinnerRing as kr}from"./chunk-R2VKEMZH.js";export{LoadingSpinner,SpinnerRing}from"./chunk-R2VKEMZH.js";import{PANEL_SURFACE as vr}from"./chunk-BWJZTHZ6.js";import{TH_ONE_LINE as Nr}from"./chunk-FAPZFMS3.js";export{Tooltip}from"./chunk-CIZAUBWA.js";import{onOverlayOpen as Cr}from"./chunk-PGN5ME7B.js";export{OVERLAY_OPEN_EVENT,dismissPopups}from"./chunk-PGN5ME7B.js";import{createShellPortal as Sr}from"./chunk-5QRHQCRG.js";import{Z_LAYERS as _r}from"./chunk-62LW225J.js";export{Z_LAYERS}from"./chunk-62LW225J.js";export{MENU_MAX_HEIGHT,POPUP_MAX_WIDTH,placeMenu,popupBounds,useDropdownPosition}from"./chunk-TAHHZGRH.js";import{useBrowserState as Er}from"./chunk-KEFNQEXZ.js";export{IN_BROWSER}from"./chunk-KEFNQEXZ.js";export{useBrowserLayoutEffect}from"./chunk-PU2GJVMG.js";import"./chunk-3FININUU.js";export{setShellApiClient}from"./chunk-STKJA4PV.js";export{useUndoable,useUndoableState}from"./chunk-GZ4AMXEU.js";export{FitFrame,fitBoxScale,fitFrameStyle,fitScale}from"./chunk-M6UKCZHT.js";import"./chunk-3AUPCKBR.js";import{toast_default as Tr}from"./chunk-VLT4ZEHT.js";export{UNDOABLE_MS,toast_default as toast}from"./chunk-VLT4ZEHT.js";export{buttonClasses,iconButtonClasses}from"./chunk-LYGIOJ3J.js";import"./chunk-MRJKZWWV.js";export{BoxPlotChart}from"./chunk-P234FPKJ.js";export{CandlestickChart}from"./chunk-BEXFMSNK.js";export{CartesianPlot}from"./chunk-S4RD6UJU.js";import"./chunk-LLSGIMLG.js";export{angleScale,bandScale,binValues,ladderScale,linearScale,logScale,niceAxis,niceMax,radiusScale}from"./chunk-2JWPNR2U.js";export{ChartTooltip}from"./chunk-WDQI3FV6.js";export{CHART_INK,SERIES_SLOT_COUNT,SERIES_VARS,STATUS_VARS,assignSeriesSlots,resolveSeriesColor,resolveSeriesColorWithin,seriesColor,toggleSeriesSlot}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as jr}from"./chunk-TWVUQUUD.js";export{registerModalEscapeInterceptor}from"./chunk-TWVUQUUD.js";import{GLASS_INPUT_BG as Mr,glassStyle as Ir}from"./chunk-5FYDNH4Y.js";export{GLASS_DIVIDER,GLASS_INPUT_BG,glassStyle,solidSurfaceStyle}from"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";export{usePlotWidth}from"./chunk-MAFUXCPZ.js";import{useShellStrings as Lr,useShellLocale as Pr}from"./chunk-NRHG4R2Q.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"./chunk-NRHG4R2Q.js";import{formatGrouped as Rr}from"./chunk-C3QOHMR6.js";import{lazy as Ar,createContext as Dr,useSyncExternalStore as Or,useState as Fr,useEffect as Wr,useRef as $r,useCallback as Br,useLayoutEffect as Hr,Fragment as Ur,useMemo as Yr,isValidElement as Gr,cloneElement as zr,Suspense as Kr,useId as Vr,useContext as Xr}from"react";import{Dialog as Jr,DialogBackdrop as Qr,DialogPanel as Zr}from"@headlessui/react";import{jsxs as qr,jsx as en,Fragment as tn}from"react/jsx-runtime";import{useQueryClient as rn,useQuery as nn,useInfiniteQuery as on}from"@tanstack/react-query";import"react-router-dom";function an(...e){return Object.assign({},...e)}function sn(e){let t=null,r=0,n=0;const o=/* @__PURE__ */new Set,a=()=>{o.forEach(e=>e())},s=(n,o)=>{t={...n,nav:++r},a(),!1!==o?.raise&&Ze(e)};return{windowKey:e,set(r,o){const i=++n;if(null===r)return t=null,Je(e),void a();t&&!1!==o?.askDiscard&&Qe(e)?(!1!==o?.raise&&Ze(e),qe(e).then(e=>{e&&i===n&&s(r,o)})):s(r,o)},get:()=>t,subscribe:e=>(o.add(e),()=>{o.delete(e)})}}function ln(e){return Or(e.subscribe,e.get,e.get)}var cn=[{title:"Global",shortcuts:[{keys:$,description:"Search"},{keys:B,description:"Start menu, or collapse the sidebar"},{keys:"Ctrl F11",description:"Toggle fullscreen"},{keys:"ESC",description:"Exit fullscreen (when no windows open)"},{keys:"?",description:"Show keyboard shortcuts"}]},{title:"Windows (window buttons focused)",shortcuts:[{keys:"←↑→↓",description:"Move window"},{keys:`${H} Arrows`,description:"Resize window"},{keys:`${U} ←/→`,description:"Snap to left / right half"},{keys:`${U} ↑`,description:"Maximize"},{keys:`${U} ↓`,description:"Restore / minimize"},{keys:Y,description:"Toggle maximize"}]},{title:"Tabs (Sidebar layout, tab focused)",shortcuts:[{keys:"←/→",description:"Previous / next tab"},{keys:`${U} ${H} ←/→`,description:"Move tab left / right"}]},{title:"Edit",shortcuts:[{keys:G,description:"Undo, in the window in front"},{keys:z,description:"Redo"},...q?[]:[{keys:"Ctrl+Y",description:"Redo"}]]},{title:"Lists",shortcuts:[{keys:"J / ↓",description:"Next row"},{keys:"K / ↑",description:"Previous row"},{keys:"⏎",description:"Open selected row"},{keys:"⇧J / ⇧K",description:"Move and select"},{keys:"⇧ Click",description:"Range select"},{keys:"Space",description:"Toggle row checkbox"},{keys:K,description:"Select / deselect all"},{keys:V,description:"Create new item"},{keys:X,description:"Edit selected item"}]},{title:"Modals / Forms",shortcuts:[{keys:J,description:"Submit"},{keys:Q,description:"Save"},{keys:Z,description:"Save as new (duplicate)"},{keys:"ESC",description:"Close modal"}]}];function dn(){const[e,t]=Fr(!1);return Wr(()=>{const e=()=>t(e=>!e);return document.addEventListener("toggle-shortcut-help",e),()=>document.removeEventListener("toggle-shortcut-help",e)},[]),Wr(()=>{const e=e=>{if("?"===e.key&&!e.metaKey&&!e.ctrlKey&&!e.altKey){const r=e.target?.tagName;if("INPUT"===r||"TEXTAREA"===r||"SELECT"===r)return;if(e.target?.isContentEditable)return;e.preventDefault(),t(e=>!e)}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[]),$t(e),/* @__PURE__ */qr(Jr,{open:e,onClose:()=>t(!1),className:"relative",style:{zIndex:_r.overlay},children:[
|
|
3
3
|
/* @__PURE__ */en(Qr,{className:"fixed inset-0 bg-black/30 backdrop-blur-sm transition-opacity"}),
|
|
4
4
|
/* @__PURE__ */en("div",{className:"fixed inset-0 flex items-center justify-center p-6",children:/* @__PURE__ */qr(Zr,{className:"w-full max-w-md rounded-lg bg-white shadow-xl",children:[
|
|
5
5
|
/* @__PURE__ */qr("div",{className:"flex items-center justify-between px-5 pt-5 pb-3 border-b border-gray-200",children:[
|
|
@@ -34,8 +34,15 @@ declare function shortestOrbit(from: Orbit, to: Orbit): Orbit;
|
|
|
34
34
|
* types never reach three.js (an optional peer a host may not have types for).
|
|
35
35
|
*/
|
|
36
36
|
|
|
37
|
+
/** The procedural light rooms the stage can always draw: the default, what
|
|
38
|
+
* shows while an HDR loads, and the fallback when one fails. */
|
|
37
39
|
type StageEnvironment = 'studio' | 'daylight' | 'showroom' | 'garage';
|
|
38
|
-
type StageBackground = 'white' | 'light' | 'mid' | 'dark' | 'transparent';
|
|
40
|
+
type StageBackground = 'white' | 'light' | 'mid' | 'dark' | 'black' | 'transparent';
|
|
41
|
+
/** What is drawn behind the subject. */
|
|
42
|
+
type StageBackgroundMode = 'colour' | 'environment' | 'backplate';
|
|
43
|
+
/** Procedural surface textures (drawn as bump maps, no files). */
|
|
44
|
+
type StageBump = 'none' | 'sandblast' | 'brushed' | 'radial' | 'knurl' | 'hammered' | 'carbon' | 'grain';
|
|
45
|
+
type StageFlakes = 'none' | 'fine' | 'coarse';
|
|
39
46
|
/** One layer's look, already resolved to PBR numbers by the host. */
|
|
40
47
|
interface StageMaterial {
|
|
41
48
|
color: string;
|
|
@@ -43,24 +50,55 @@ interface StageMaterial {
|
|
|
43
50
|
roughness: number;
|
|
44
51
|
clearcoat?: number;
|
|
45
52
|
clearcoatRoughness?: number;
|
|
53
|
+
/** False hides the layer's surfaces (a host's show/hide toggle). Default true. */
|
|
54
|
+
visible?: boolean;
|
|
55
|
+
/** A surface texture. `radial` is brushed round the wheel's axis. */
|
|
56
|
+
bump?: StageBump;
|
|
57
|
+
/** 0–1. */
|
|
58
|
+
bumpDepth?: number;
|
|
59
|
+
/** Metallic flake under the clear coat. */
|
|
60
|
+
flakes?: StageFlakes;
|
|
46
61
|
}
|
|
47
62
|
interface StageScene {
|
|
63
|
+
/** The procedural room: the light when `environmentUrl` is unset, and
|
|
64
|
+
* while it loads or if it fails. */
|
|
48
65
|
environment: StageEnvironment;
|
|
66
|
+
/** A same-origin equirectangular Radiance `.hdr` to light with. */
|
|
67
|
+
environmentUrl?: string | null;
|
|
49
68
|
/** Degrees, 0–359. */
|
|
50
69
|
environmentRotation: number;
|
|
51
70
|
/** Percent, 50–150. */
|
|
52
71
|
brightness: number;
|
|
72
|
+
/** Percent, 50–150: the key light against the environment. Default 100. */
|
|
73
|
+
contrast?: number;
|
|
74
|
+
/** Default `colour`. */
|
|
75
|
+
backgroundMode?: StageBackgroundMode;
|
|
76
|
+
/** The colour, for `colour` mode. */
|
|
53
77
|
background: StageBackground;
|
|
78
|
+
/** Percent, 0–100: how soft the environment looks behind the subject. */
|
|
79
|
+
backgroundBlur?: number;
|
|
80
|
+
/** An image URL (same-origin or `blob:`) for `backplate` mode. */
|
|
81
|
+
backplateUrl?: string | null;
|
|
82
|
+
/** Default `fill` (cover the frame); `fit` shows it whole. */
|
|
83
|
+
backplateFit?: 'fill' | 'fit';
|
|
54
84
|
groundShadow: boolean;
|
|
55
85
|
/** Percent, 0–100. */
|
|
56
86
|
shadowSoftness: number;
|
|
87
|
+
/** Percent, 0–100. Default 35. */
|
|
88
|
+
shadowDarkness?: number;
|
|
57
89
|
groundReflection: boolean;
|
|
90
|
+
/** Soft darkening where parts meet (screen-space). Default off. */
|
|
91
|
+
ambientOcclusion?: boolean;
|
|
58
92
|
/** 35 mm-equivalent focal length, mm. */
|
|
59
93
|
focalLength: number;
|
|
60
94
|
}
|
|
61
95
|
interface StageCamera extends Orbit {
|
|
62
96
|
userInteraction: boolean;
|
|
63
97
|
}
|
|
98
|
+
/** One object (body) of the model: the surface ids it is made of. */
|
|
99
|
+
interface StageObject {
|
|
100
|
+
surfaces: readonly number[];
|
|
101
|
+
}
|
|
64
102
|
|
|
65
103
|
/** Where a stage is: fetching three.js or the model, drawing it, or showing
|
|
66
104
|
* its fallback (no WebGL, or the model failed to load). */
|
|
@@ -78,13 +116,20 @@ interface ModelStageProps {
|
|
|
78
116
|
layers: readonly (readonly number[])[];
|
|
79
117
|
/** One look per layer, same order. */
|
|
80
118
|
materials: readonly StageMaterial[];
|
|
81
|
-
/** Surfaces drawn highlighted (a selection in progress
|
|
119
|
+
/** Surfaces drawn highlighted (a selection in progress, or an object a
|
|
120
|
+
* person points at). */
|
|
82
121
|
selected?: ReadonlySet<number>;
|
|
122
|
+
/** Surfaces left out entirely — neither drawn nor picked (a hidden
|
|
123
|
+
* object). Pass a new set when it changes. */
|
|
124
|
+
hidden?: ReadonlySet<number>;
|
|
83
125
|
scene: StageScene;
|
|
84
126
|
/** The camera's starting orbit. */
|
|
85
127
|
initialOrbit: Orbit;
|
|
86
128
|
/** Drag to turn and scroll to zoom; off, only `goTo` moves the camera. */
|
|
87
129
|
interactive?: boolean;
|
|
130
|
+
/** With `interactive`, a right-click or two-finger drag also slides the
|
|
131
|
+
* subject in the frame; `goTo` centres it again. Off by default. */
|
|
132
|
+
pan?: boolean;
|
|
88
133
|
/** Click picks surfaces (`onPickSurface`) instead of nothing. */
|
|
89
134
|
selectMode?: boolean;
|
|
90
135
|
/** Turn slowly, round and round. */
|
|
@@ -114,6 +159,24 @@ interface ModelStageHandle {
|
|
|
114
159
|
*/
|
|
115
160
|
declare const ModelStage: react.ForwardRefExoticComponent<ModelStageProps & react.RefAttributes<ModelStageHandle>>;
|
|
116
161
|
|
|
162
|
+
/**
|
|
163
|
+
* Procedural surface textures for the model stage, drawn on a canvas so no
|
|
164
|
+
* texture file ships or is fetched: a grey height map per bump (the engine
|
|
165
|
+
* uses it as `bumpMap`), a normal map for metallic flake, and the frame a
|
|
166
|
+
* backplate is drawn into (filled or fitted to the view's aspect).
|
|
167
|
+
*
|
|
168
|
+
* Seeded, so every stage draws the same texture.
|
|
169
|
+
*/
|
|
170
|
+
|
|
171
|
+
/** Where to draw an image of `iw`×`ih` into a `w`×`h` frame: `fill` covers
|
|
172
|
+
* it (cropping), `fit` shows it whole (bands of `pad` round it). Pure. */
|
|
173
|
+
declare function placeImage(iw: number, ih: number, w: number, h: number, fit: 'fill' | 'fit'): {
|
|
174
|
+
x: number;
|
|
175
|
+
y: number;
|
|
176
|
+
w: number;
|
|
177
|
+
h: number;
|
|
178
|
+
};
|
|
179
|
+
|
|
117
180
|
/**
|
|
118
181
|
* Turning a surface model's per-vertex surface ids into draw groups: one
|
|
119
182
|
* group per (layer, selected) pair, so the whole wheel is one geometry drawn
|
|
@@ -144,11 +207,12 @@ interface DrawGroup {
|
|
|
144
207
|
/**
|
|
145
208
|
* The index buffer reordered so each (layer, selected) run is contiguous,
|
|
146
209
|
* and the groups over it. `index` null = a non-indexed geometry (vertex
|
|
147
|
-
* `3t, 3t+1, 3t+2` per triangle).
|
|
210
|
+
* `3t, 3t+1, 3t+2` per triangle). Triangles of a `hidden` surface (an
|
|
211
|
+
* object a person hid) are left out, so they are neither drawn nor picked.
|
|
148
212
|
*/
|
|
149
|
-
declare function buildDrawGroups(index: ArrayLike<number> | null, triSurface: Int32Array, layerOfSurface: Int32Array, selected: ReadonlySet<number>, layerCount: number): {
|
|
213
|
+
declare function buildDrawGroups(index: ArrayLike<number> | null, triSurface: Int32Array, layerOfSurface: Int32Array, selected: ReadonlySet<number>, layerCount: number, hidden?: ReadonlySet<number>): {
|
|
150
214
|
index: Uint32Array;
|
|
151
215
|
groups: DrawGroup[];
|
|
152
216
|
};
|
|
153
217
|
|
|
154
|
-
export { type DrawGroup, ModelStage, type ModelStageHandle, type ModelStageProps, type ModelStageStatus, type Orbit, type StageBackground, type StageCamera, type StageEnvironment, type StageMaterial, type StageScene, buildDrawGroups, framingDistance, layerOfSurfaces, orbitOf, orbitOffset, shortestOrbit, triangleSurfaces, wrapTurn };
|
|
218
|
+
export { type DrawGroup, ModelStage, type ModelStageHandle, type ModelStageProps, type ModelStageStatus, type Orbit, type StageBackground, type StageBackgroundMode, type StageBump, type StageCamera, type StageEnvironment, type StageFlakes, type StageMaterial, type StageObject, type StageScene, buildDrawGroups, framingDistance, layerOfSurfaces, orbitOf, orbitOffset, placeImage, shortestOrbit, triangleSurfaces, wrapTurn };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{buildDrawGroups,framingDistance,layerOfSurfaces,orbitOf,orbitOffset,shortestOrbit,triangleSurfaces,wrapTurn}from"../chunk-
|
|
3
|
-
return
|
|
4
|
-
/* @__PURE__ */l("canvas",{ref:
|
|
2
|
+
export{buildDrawGroups,framingDistance,layerOfSurfaces,orbitOf,orbitOffset,placeImage,shortestOrbit,triangleSurfaces,wrapTurn}from"../chunk-OHC6Q4QD.js";import{webglAvailable as e}from"../chunk-WS4C6Z22.js";export{fieldOfViewFor}from"../chunk-4N24K3UX.js";import{useShellStrings as r}from"../chunk-NRHG4R2Q.js";import"../chunk-C3QOHMR6.js";import{forwardRef as t,useRef as n,useState as i,useEffect as a,useImperativeHandle as c}from"react";import{jsxs as o,jsx as l}from"react/jsx-runtime";var s=(...e)=>e.filter(Boolean).join(" "),u=t(function({src:t,surfaceCount:u,alt:d,layers:f,materials:m,selected:g,hidden:h,scene:p,initialOrbit:C,interactive:b=!0,pan:v=!1,selectMode:S=!1,turntable:O=!1,onPickSurface:w,onCameraChange:k,onStatusChange:y,className:j},x){const M=r().modelViewer,N=n(null),E=n(null),P=n(null),[H,L]=i("loading"),[T,I]=i(!1),Q=n({onPickSurface:w,onCameraChange:k,onStatusChange:y,selectMode:S,initialOrbit:C});Q.current={onPickSurface:w,onCameraChange:k,onStatusChange:y,selectMode:S,initialOrbit:C};const R=n(/* @__PURE__ */new Set);a(()=>{Q.current.onStatusChange?.(H)},[H]),c(x,()=>({goTo(e,r=!0){P.current?.goTo(e,r)},renderImage:(e,r)=>P.current?P.current.renderImage(e,Boolean(r?.transparent)):Promise.reject(new Error(M.loading))}),[M.loading]),a(()=>{if(!e())return void L("still");let r=!0,t=null;return import("../engine-4U3WOFMO.js").then(({StageEngine:e})=>{r&&E.current&&(t=new e(E.current),t.onCameraChange=e=>Q.current.onCameraChange?.(e),P.current=t,I(!0))}).catch(()=>{r&&L("failed")}),()=>{r=!1,t?.dispose(),P.current=null}},[]),a(()=>{const e=N.current;if(!T||!e)return;const r=()=>P.current?.resize(e.clientWidth,e.clientHeight);r();const t=new ResizeObserver(r);return t.observe(e),()=>t.disconnect()},[T]),a(()=>{const e=P.current;if(!T||!e)return;let r=!0;return L("loading"),e.load(t,u).then(()=>{r&&(e.goTo(Q.current.initialOrbit,!1),L("ready"))}).catch(()=>{r&&L("failed")}),()=>{r=!1}},[T,t,u]),a(()=>{T&&P.current?.setLayers(f,m,g??R.current)},[T,H,f,m,g]),a(()=>{T&&P.current?.setHidden(h??R.current)},[T,H,h]),a(()=>{T&&P.current?.setScene(p)},[T,H,p]),a(()=>{T&&P.current?.setInteractive(b)},[T,b]),a(()=>{T&&P.current?.setTurntable(O)},[T,O]),a(()=>{T&&P.current?.setPan(v)},[T,v]),a(()=>{const e=E.current;if(!T||!e)return;let r=null;const t=e=>{r={x:e.clientX,y:e.clientY}},n=e=>{if(!r||!Q.current.selectMode)return;const t=Math.hypot(e.clientX-r.x,e.clientY-r.y);r=null,t>4||Q.current.onPickSurface?.(P.current?.pick(e.clientX,e.clientY)??null,{shiftKey:e.shiftKey})};return e.addEventListener("pointerdown",t),e.addEventListener("pointerup",n),()=>{e.removeEventListener("pointerdown",t),e.removeEventListener("pointerup",n)}},[T]);const W="still"===H||"failed"===H;/* @__PURE__ */
|
|
3
|
+
return o("div",{ref:N,className:s("relative overflow-hidden",j),"data-model-stage":H,children:[
|
|
4
|
+
/* @__PURE__ */l("canvas",{ref:E,role:"img","aria-label":d,className:s("absolute inset-0 h-full w-full",S?"cursor-crosshair":b&&"cursor-grab"),hidden:W}),"loading"===H&&/* @__PURE__ */l("p",{role:"status",className:"sr-only",children:M.loading}),W&&/* @__PURE__ */l("p",{className:"absolute inset-0 grid place-items-center p-4 text-center text-sm text-ink-faint",children:"still"===H?M.noWebgl:M.failed})]})});export{u as ModelStage};
|