efficient-shell 4.160.0 → 4.162.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.
Files changed (67) hide show
  1. package/README.md +22 -4
  2. package/dist/{Browser-3KOGROX7.js → Browser-TNUODLDN.js} +25 -25
  3. package/dist/Calculator-HHPPI72V.js +29 -0
  4. package/dist/ConfirmDialog-D46T6ZXW.js +1 -0
  5. package/dist/{CurrencyConverter-3GTKDKHH.js → CurrencyConverter-4XKRUO7Y.js} +6 -6
  6. package/dist/{Documents-FDGF7QBQ.js → Documents-VYDMJL37.js} +6 -6
  7. package/dist/{Files-TTSYOPVB.js → Files-D3D6JWSJ.js} +28 -28
  8. package/dist/{Notepad-ITHIATP2.js → Notepad-CBJIS3WA.js} +10 -10
  9. package/dist/PdfViewer-UEMING6A.js +1 -0
  10. package/dist/{PomodoroTimer-CRKL26PP.js → PomodoroTimer-PB6J2LMS.js} +18 -18
  11. package/dist/{Preview-GZTTEZWS.js → Preview-O2UZROZO.js} +17 -17
  12. package/dist/{Sidebar-ECJEQXFK.js → Sidebar-PPC3OK4H.js} +36 -36
  13. package/dist/Spreadsheet-AYV4CQP3.js +37 -0
  14. package/dist/{Stock-NAHSVLAJ.js → Stock-FGJ5HQ7H.js} +4 -4
  15. package/dist/{Weather-AY3QWBQT.js → Weather-FW3WWYCI.js} +21 -21
  16. package/dist/{WorldClock-AXNMA4PG.js → WorldClock-UC4CXE2N.js} +6 -6
  17. package/dist/apps/index.js +1 -1
  18. package/dist/brand.css +1 -1
  19. package/dist/{chunk-A6FPBD7W.js → chunk-2S73NE3L.js} +1 -1
  20. package/dist/{chunk-UPI2GKKD.js → chunk-4SQNYTO3.js} +12 -12
  21. package/dist/{chunk-XN76YBX3.js → chunk-4VMA4ALC.js} +8 -8
  22. package/dist/chunk-5A7MWTXX.js +1 -0
  23. package/dist/{chunk-HQTSPK5Q.js → chunk-5UNSI4UI.js} +1 -1
  24. package/dist/{chunk-LCB4IVEL.js → chunk-6CKRJ4YK.js} +250 -250
  25. package/dist/chunk-6KO2U66R.js +3 -0
  26. package/dist/chunk-6WLGERBO.js +27 -0
  27. package/dist/{chunk-26RS37FG.js → chunk-7EACKL5V.js} +1 -1
  28. package/dist/{chunk-HF4IZFFX.js → chunk-7ESGXPKN.js} +11 -11
  29. package/dist/{chunk-FHIF6IUV.js → chunk-A2FL26TE.js} +1 -1
  30. package/dist/{chunk-KZPQW6UL.js → chunk-C2A4PIGZ.js} +2 -2
  31. package/dist/chunk-DSSLOQDW.js +2 -0
  32. package/dist/{chunk-VNEH2Y6H.js → chunk-DYVN6C2E.js} +3 -3
  33. package/dist/{chunk-XPSADW6W.js → chunk-EU3AQ4B2.js} +1 -1
  34. package/dist/{chunk-B2TBCVHH.js → chunk-EYU4IAEZ.js} +1 -1
  35. package/dist/{chunk-PDTZTADH.js → chunk-GBL5KOGP.js} +17 -17
  36. package/dist/{chunk-T6MKFQRH.js → chunk-GTQJYE6M.js} +6 -6
  37. package/dist/chunk-HQLEQIMG.js +21 -0
  38. package/dist/{chunk-JGHRZYNV.js → chunk-ILTSTULF.js} +1 -1
  39. package/dist/chunk-LQVXGB7A.js +1 -0
  40. package/dist/{chunk-KASHUEJV.js → chunk-O46U4PVN.js} +4 -4
  41. package/dist/chunk-S2PS4IOT.js +2 -0
  42. package/dist/{chunk-ZJ66QFOH.js → chunk-S6ZIQSAF.js} +1 -1
  43. package/dist/{chunk-36QR65KW.js → chunk-STJVLCQU.js} +2 -2
  44. package/dist/chunk-UZUH5PVW.js +1 -0
  45. package/dist/chunk-ZWYKMIX7.js +112 -0
  46. package/dist/file-intake/index.js +1 -1
  47. package/dist/{index-Brl0XepS.d.ts → index-DYVoKNru.d.ts} +86 -3
  48. package/dist/index.d.ts +47 -10
  49. package/dist/index.js +645 -645
  50. package/dist/map/index.js +2 -2
  51. package/dist/page-tabs/index.d.ts +9 -1
  52. package/dist/page-tabs/index.js +5 -5
  53. package/dist/pdf/index.js +1 -1
  54. package/dist/ui/index.d.ts +1 -1
  55. package/dist/ui/index.js +1 -1
  56. package/package.json +1 -1
  57. package/dist/Calculator-QLJJ3ICT.js +0 -29
  58. package/dist/ConfirmDialog-7Q2OOU4W.js +0 -1
  59. package/dist/PdfViewer-VIT7Y55M.js +0 -1
  60. package/dist/Spreadsheet-PFKZTLSI.js +0 -37
  61. package/dist/chunk-6UXY7MPY.js +0 -2
  62. package/dist/chunk-GF2XCISN.js +0 -1
  63. package/dist/chunk-JK3IIJN5.js +0 -22
  64. package/dist/chunk-VRW5JNMR.js +0 -18
  65. package/dist/chunk-VVI77XNV.js +0 -1
  66. package/dist/chunk-X6E6UULK.js +0 -113
  67. package/dist/chunk-YKZGKYVT.js +0 -2
package/dist/map/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import{Button_default as e}from"../chunk-PH3PRIFP.js";import{rootIsDark as t,ROOT_THEME_ATTRIBUTES as n}from"../chunk-MAIHBBWT.js";import{useShellStrings as r}from"../chunk-VVI77XNV.js";import{useRef as o,useState as a,useEffect as l,useCallback as i,useMemo as s,useSyncExternalStore as c}from"react";import{createPortal as u}from"react-dom";import{jsxs as d,jsx as p,Fragment as m}from"react/jsx-runtime";import{useQuery as h}from"@tanstack/react-query";var g="maplibregl-compact-show";function f(e){if(!e)return()=>{};const t=()=>!!e.classList.contains(g)&&(e.classList.remove(g),!0);if(t())return()=>{};const n=new MutationObserver(()=>{t()&&n.disconnect()});return n.observe(e,{attributes:!0,attributeFilter:["class"]}),()=>n.disconnect()}var y=20,b=12,x=480,v={center:[0,0],left:[y,0],right:[-20,0],top:[0,y],"top-left":[0,y],"top-right":[0,y],bottom:[0,-20],"bottom-left":[0,-20],"bottom-right":[0,-20]},w=(e,t=12)=>Math.max(0,Math.floor(e-t-b-y-10-16));function k(e,t,n,r=12){const o=e.y-y-r,a=n.height-e.y-y-b,l=t.height<=o||t.height>a&&o>=a,i=l?Math.max(0,t.height-o):-Math.max(0,t.height-a);let s="",c=0;return e.x-t.width/2<b?(s="-left",c=Math.max(0,b-e.x)):e.x+t.width/2>n.width-b&&(s="-right",c=-Math.max(0,e.x-(n.width-b))),{anchor:`${l?"bottom":"top"}${s}`,move:{x:c,y:i}}}var M="maplibre-gl-worker.mjs",N=e=>`/maplibre-gl/${e}/${M}`,C=null;function L(){return C??=Promise.all([import("maplibre-gl"),import("maplibre-gl/dist/maplibre-gl.css")]).then(([e])=>(e.setWorkerUrl(N(e.getVersion())),e)).catch(e=>{throw C=null,e}),C}var $=24,E=28,S=29;function j(e){const t=[...e].sort((e,t)=>e-t),n=[];for(let e=0;e<t.length;){let r=e;for(;r+1<t.length&&t[r+1]===t[r]+1;)r++;n.push(r===e?String(t[e]):`${t[e]}–${t[r]}`),e=r+1}return n.join(", ")}function A(e){const t=Math.max(E,12+8*e.length);return t+t%2}var z=(e,t,n,r)=>({left:e-n/2,top:t-r/2,right:e+n/2,bottom:t+r/2});function B(e,t){return e.left<t.right+1&&t.left<e.right+1&&e.top<t.bottom+1&&t.top<e.bottom+1}var R=e=>z(e.x,e.y,e.width,e.height);function T(e){for(let t=0;t<e.length;t++)for(let n=t+1;n<e.length;n++)if(B(R(e[t]),R(e[n])))return[e[t],e[n]];return null}function O(e,t=[]){const n=[],r=e=>t.some(t=>B(t,e));let o=e.filter(e=>null!==e.stop).sort((e,t)=>e.stop-t.stop).map(e=>({keys:[e.key],stops:[e.stop],x:e.x,y:e.y,width:E,height:E,under:0}));for(let e=T(o);e;e=T(o)){const[t,n]=e;t.keys.push(...n.keys),t.stops.push(...n.stops),t.stops.sort((e,t)=>e-t),t.width=A(j(t.stops)),o=o.filter(e=>e!==n)}o=o.filter(e=>!r(R(e))||(n.push(...e.keys),!1));const a=[];for(const t of e){if(null!==t.stop)continue;const e=z(t.x,t.y,$,$),l=o.find(t=>B(R(t),e));if(l||r(e)){n.push(t.key),l&&l.under++;continue}const i=a.find(t=>B(R(t),e));i?i.keys.push(t.key):a.push({keys:[t.key],stops:[],x:t.x,y:t.y,width:$,height:$,under:0})}return{groups:[...o,...a],hidden:n}}function W(e,t,n){let r=-1/0;for(const o of t){const t=Math.max(Math.abs(o.x-e.x),Math.abs(o.y-e.y));r=Math.max(r,0===t?1/0:n+Math.log2(29/t))}return r}function F(e){const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:n}),()=>t.disconnect()}var q=t;var K="routes",P=["routes-road","routes-estimate"];function _(e){const t=document.createElement("span");t.style.display="none",t.style.color=e,document.body.appendChild(t);const n=getComputedStyle(t).color||"#2563eb";return t.remove(),H(n)}function H(e){const t=document.createElement("canvas").getContext("2d");if(!t)return"#2563eb";t.fillStyle="#2563eb",t.fillStyle=e,t.fillRect(0,0,1,1);const[n,r,o]=t.getImageData(0,0,1,1).data;return`rgb(${n}, ${r}, ${o})`}var I={light:"https://tiles.openfreemap.org/styles/positron",dark:"https://tiles.openfreemap.org/styles/dark"},V={center:[30,20],zoom:1},D="ring-2 ring-gray-900 ring-offset-2";var Z="var(--color-gray-600, #4b5563)",G="http://www.w3.org/2000/svg",U=()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches,X=/^(?:\d+|[xytrblse](?:-\d+)?|solid|dashed|dotted|double|hidden|none)$/;function J(e){return e.split(/\s+/).some(e=>{const t=e.search(/[[(]/),n=t<0?e:e.slice(0,t),r=e.slice(n.lastIndexOf(":")+1);return r.startsWith("border-")&&!X.test(r.slice(7))})}var Q=(...e)=>e.filter(Boolean).join(" ");function Y(e){const t=document.createElementNS(G,"svg");t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("fill","none"),t.setAttribute("stroke","currentColor"),t.setAttribute("stroke-width","2"),t.setAttribute("aria-hidden","true");for(const n of e){const e=document.createElementNS(G,"path");e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),e.setAttribute("d",n),t.appendChild(e)}return t}function ee(e,t){for(const[n,r]of Object.entries(t??{}))e.dataset[n]=r}var te=(e,t)=>Q("relative grid place-items-center rounded-full cursor-pointer",t&&(null!=e.stop?"h-7 w-7":"h-6 w-6"));function ne(e,t,n,r){const o=t&&!r&&null==e.stop&&!e.dot;return Q("grid place-items-center rounded-full border-2 font-semibold leading-none shadow-md transition-transform motion-reduce:transition-none",!J(e.tone)&&"border-white",e.tone,e.dot?"h-4 w-4 opacity-80":null!=e.stop?"h-7 w-7 text-xs ring-2 ring-gray-900":o?"h-8 w-8 text-xs [&_svg]:h-4 [&_svg]:w-4":"h-6 w-6 text-[10px] [&_svg]:h-3.5 [&_svg]:w-3.5",t&&(o?"ring-2 ring-gray-900 ring-offset-1":D),e.approximate&&"border-dashed opacity-80",e.faded&&!t&&"opacity-40",n&&"scale-125 opacity-100")}var re=e=>Q("grid place-items-center border-2 px-0.5 text-xs font-semibold leading-none shadow-sm",e.stop?"h-7 min-w-7":"h-6 min-w-6",!J(e.tone??"")&&"border-white",e.tone??"bg-gray-900 text-white");function oe({pins:t,selectedKey:n,focus:s,onSelect:m,ariaLabel:h,className:g="",children:y,routes:b,fitTo:x,attribution:M,marks:N,groupCrowded:C=!1,noun:S,highlightKey:A=null,picking:z=!1,onPick:B,card:R,cardMinMapWidth:T=480,fullScreen:G,initialView:X=V,cooperativeGestures:J=!1}){const oe=r().map,ie=o(null),se=o(null),ce=o(null),ue=o(null),de=o([]),pe=o(/* @__PURE__ */new Map),me=o(/* @__PURE__ */new Map),he=o(/* @__PURE__ */new Map),ge=o(null),fe=o(/* @__PURE__ */new Map),ye=o(""),[be,xe]=a(!1),[ve,we]=a(!1),ke=c(F,q,()=>!1)?"dark":"light",Me=o({onSelect:m,onPick:B,picking:z,pins:t,selectedKey:n,highlightKey:A,groupCrowded:C,strings:oe,noun:S});l(()=>{Me.current={onSelect:m,onPick:B,picking:z,pins:t,selectedKey:n,highlightKey:A,groupCrowded:C,strings:oe,noun:S}});const Ne=i(()=>{const e=ce.current,{pins:t,selectedKey:n}=Me.current,r=n?t.find(e=>e.key===n):void 0;e&&r&&!e.getBounds().contains([r.lng,r.lat])&&e.easeTo({center:[r.lng,r.lat],duration:U()?0:400})},[]),Ce=o(!1),Le=i((e,t)=>{const n=ce.current,r=ue.current;if(!n||!r)return;const o=n.getZoom();if(o>=17.5){const t=e.indexOf(Me.current.selectedKey??"");return void Me.current.onSelect(e[(t+1)%e.length])}const a=e.map(e=>pe.current.get(e).pin),l=new r.LngLatBounds([a[0].lng,a[0].lat],[a[0].lng,a[0].lat]);for(const e of a)l.extend([e.lng,e.lat]);const i=a.map(e=>n.project([e.lng,e.lat])),s=Math.max(...i.map((e,t)=>W(e,i.filter((e,n)=>n!==t),o))),{clientWidth:c,clientHeight:u}=n.getContainer(),d=n.cameraForBounds(l,{padding:Math.min(64,c/4,u/4)})?.zoom??18,p=document.activeElement===t;Ce.current=!0,n.once("moveend",()=>{if(Ce.current=!1,!p)return;const e=a[0].key,t=pe.current.get(e)?.button,n=t&&"none"!==t.style.display?t:[...me.current.values()].find(t=>t.keys.includes(e))?.button;n?.focus({preventScroll:!0})}),n.easeTo({center:l.getCenter(),zoom:Math.min(18,Math.max(o+1,Math.min(d,s))),duration:U()?0:600})},[]),$e=i(()=>{const e=ce.current,t=ue.current;if(!e||!t||!ie.current||Ce.current&&e.isMoving())return;const{selectedKey:n,highlightKey:r,groupCrowded:o,strings:a,noun:l}=Me.current;for(const[e,t]of pe.current){const a=ne(t.pin,e===n,e===r,o);t.mark.className!==a&&(t.mark.className=a);const l=e===n?"1":"";t.button.style.zIndex!==l&&(t.button.style.zIndex=l)}let i=null;if(o){const r=e.getContainer().getBoundingClientRect(),o=[...ie.current.querySelectorAll("a[href], button, input, select, textarea, summary, [role='button'], [tabindex]:not([tabindex='-1'])")].filter(e=>!e.closest("[data-pin], [data-pin-group], .maplibregl-canvas")).map(e=>{const t=e.getBoundingClientRect(),n=e.closest("[data-map-card]")?.getBoundingClientRect()??t;return{left:Math.max(t.left,n.left)-r.left,top:Math.max(t.top,n.top)-r.top,right:Math.min(t.right,n.right)-r.left,bottom:Math.min(t.bottom,n.bottom)-r.top}}).filter(e=>e.right>e.left&&e.bottom>e.top);i=O([...pe.current.values()].map(({pin:t})=>{const n=e.project([t.lng,t.lat]);return{key:t.key,x:n.x,y:n.y,stop:t.stop??null}}),o);const s=e=>(l??a.places)(e),c=e.getZoom()<17.5?a.spread:a.cycle,u=(e,t)=>{const n=t?"":"none";e.style.display!==n&&(e.style.display=n)},d=/* @__PURE__ */new Map;for(const r of i.groups){const o=r.under>0?a.closeBy(r.under,s(r.under)):null,l=1===r.keys.length?pe.current.get(r.keys[0]):null;if(l){u(l.button,!0),l.button.setAttribute("aria-label",o?`${l.name}; ${o}`:l.name),l.button.title=o?`${l.title}\n${o}`:l.title;continue}for(const e of r.keys)u(pe.current.get(e).button,!1);const i=r.keys.join(" ");let p=me.current.get(i);if(!p){const n=document.createElement("button");n.type="button",n.dataset.pinGroup="",n.className="grid place-items-center rounded-full cursor-pointer",n.append(document.createElement("span"));const o=pe.current.get(r.keys[0]).pin,a={button:n,keys:r.keys,marker:new t.Marker({element:n,anchor:"center"}).setLngLat([o.lng,o.lat]).addTo(e)};n.addEventListener("click",e=>{e.stopPropagation(),Le(a.keys,n)}),p=a}p.keys=r.keys;const m=r.keys.map(e=>pe.current.get(e)),h=r.stops.length>0?j(r.stops):String(m.length),g=r.stops.length>0?a.stops(h):a.group(m.length,s(m.length));p.button.style.width=`${r.width}px`,p.button.style.height=`${r.height}px`,p.button.setAttribute("aria-label",`${g}: ${m.map(e=>e.pin.label).join("; ")}. ${c}${o?`; ${o}`:""}.`),p.button.title=[`${g}:`,...m.map(e=>e.title),...o?[o]:[],c].join("\n");const f=p.button.firstElementChild;f.textContent=h;const y=Q("grid place-items-center rounded-full border-2 border-gray-700 bg-white font-semibold leading-none text-gray-900 shadow-sm",r.stops.length>0?"h-7 w-full px-1 text-xs ring-2 ring-gray-900":m.every(e=>e.pin.dot)?"h-5 w-5 text-[0.6rem]":"h-6 w-6 text-[0.7rem]",null!=n&&r.keys.includes(n)&&D);f.className!==y&&(f.className=y),d.set(i,p)}for(const e of i.hidden)u(pe.current.get(e).button,!1);for(const[e,t]of me.current)d.has(e)||t.marker.remove();me.current=d}if(ge.current){const e=r&&i?i.groups.find(e=>e.keys.includes(r)&&e.keys.length>1):void 0,t=r?pe.current.get(r):void 0,n=r?he.current.get(r):void 0,o=e?{at:pe.current.get(e.keys[0]).pin,width:e.width,height:e.height}:t?{at:t.pin,width:t.button.offsetWidth||(null!=t.pin.stop?E:$),height:t.button.offsetHeight||(null!=t.pin.stop?E:$)}:n?{at:n.mark,width:n.element.offsetWidth||E,height:n.element.offsetHeight||E}:null,a=ge.current.getElement();a.style.display=o?"":"none",o&&(ge.current.setLngLat([o.at.lng,o.at.lat]),a.style.width=`${o.width+22}px`,a.style.height=`${o.height+22}px`)}},[Le]);l(()=>{if($e(),!ie.current)return;const e=new ResizeObserver(()=>$e());e.observe(ie.current);for(const t of ie.current.children)t.contains(se.current)||e.observe(t);return()=>e.disconnect()}),l(()=>{let e=!1,t=null,n=null,r=()=>{};return(async()=>{try{const o=await L();if(e||!se.current)return;ue.current=o,t=new o.Map({container:se.current,style:I[ke],center:X.center,zoom:X.zoom,attributionControl:M?{compact:!0,customAttribution:M}:{compact:!0},dragRotate:!1,pitchWithRotate:!1,touchPitch:!1,maxPitch:0,cooperativeGestures:"coarse"===J?window.matchMedia("(pointer: coarse)").matches:J}),t.touchZoomRotate.disableRotation(),t.keyboard.disableRotation(),t.addControl(new o.NavigationControl({showCompass:!1}),"top-right");const a=document.createElement("div");a.dataset.pinRing="",a.setAttribute("aria-hidden","true"),a.className="pointer-events-none rounded-full border-2 border-gray-900 bg-gray-900/15 shadow-[0_0_0_2px_var(--color-white,#fff)]",a.style.display="none",ge.current=new o.Marker({element:a,anchor:"center"}).setLngLat(X.center).addTo(t),t.on("click",e=>{Me.current.picking&&Me.current.onPick?.({lat:e.lngLat.lat,lng:e.lngLat.lng})}),t.on("move",$e),t.on("moveend",$e),t.on("resize",$e),t.on("error",e=>console.warn("[map]",e.error?.message)),r=f(se.current.querySelector(".maplibregl-ctrl-attrib"));const l=t;n=new ResizeObserver(()=>{l.resize(),Ne()}),n.observe(se.current),ce.current=t,xe(!0)}catch(t){console.error("[map] could not start",t),e||we(!0)}})(),()=>{e=!0,n?.disconnect(),r(),de.current.forEach(e=>e.remove()),de.current=[],me.current.forEach(e=>e.marker.remove()),me.current.clear(),ge.current?.remove(),ge.current=null,t?.remove(),ce.current=null}},[]);const Ee=o(ke);l(()=>{be&&ce.current&&Ee.current!==ke&&(Ee.current=ke,ce.current.setStyle(I[ke]))},[be,ke]),l(()=>{const e=ce.current,n=ue.current;if(!be||!e||!n)return;de.current.forEach(e=>e.remove()),de.current=[],me.current.forEach(e=>e.marker.remove()),me.current.clear(),pe.current.clear(),he.current.clear();for(const e of fe.current.keys())t.some(t=>t.key===e)||fe.current.delete(e);const r=Me.current.strings;for(const o of t){const t=document.createElement("button");t.type="button",t.dataset.pin=o.key,t.className=te(o,C);const a=o.approximate?r.approximate(o.label):o.label,l=o.title??(o.approximate?r.approximateTitle(o.label):o.label);t.setAttribute("aria-label",a),t.title=l;const i=document.createElement("span");if(ee(i,o.data),o.dot);else if(null!=o.iconNode){const e=fe.current.get(o.key);e&&i.append(e)}else o.icon?.length?i.append(Y(o.icon)):i.textContent=null!=o.stop?String(o.stop):o.glyph;if(t.append(i),o.badge){const e=document.createElement("span");e.setAttribute("aria-hidden","true"),e.className=Q("absolute -right-2 -top-2 grid h-4 min-w-4 place-items-center rounded-full px-0.5 text-[9px] font-semibold leading-none shadow",o.badgeTone??"bg-white text-gray-900"),e.textContent=o.badge,t.appendChild(e)}t.addEventListener("click",e=>{e.stopPropagation(),Me.current.onSelect(o.key)}),de.current.push(new n.Marker({element:t,anchor:"center"}).setLngLat([o.lng,o.lat]).addTo(e)),pe.current.set(o.key,{pin:o,button:t,mark:i,name:a,title:l})}for(const t of N??[]){const r=document.createElement("div");r.dataset.mapMark=t.key,ee(r,t.data),r.className=re(t),r.textContent=t.text,r.title=t.title??t.label,r.setAttribute("role","img"),r.setAttribute("aria-label",t.label),de.current.push(new n.Marker({element:r,anchor:"center"}).setLngLat([t.lng,t.lat]).addTo(e)),he.current.set(t.key,{mark:t,element:r})}$e()},[be,t,N,C,$e]),l(()=>{be&&$e()},[be,n,A,$e]),l(()=>{if(!be||!n)return;const e=requestAnimationFrame(Ne);return()=>cancelAnimationFrame(e)},[be,n,Ne]),l(()=>{const e=ce.current,n=ue.current,r=x?[...t,...N??[]].filter(e=>x.includes(e.key)):t;if(!be||!e||!n||0===r.length)return;const o=r.map(e=>`${e.key}@${e.lat},${e.lng}`).sort().join("|");if(ye.current===o)return;const a=""===ye.current;if(ye.current=o,1===r.length)return void e.jumpTo({center:[r[0].lng,r[0].lat],zoom:13});const l=new n.LngLatBounds([r[0].lng,r[0].lat],[r[0].lng,r[0].lat]);for(const e of r)l.extend([e.lng,e.lat]);e.fitBounds(l,{padding:48,maxZoom:14,animate:!a})},[be,t,N,x]),l(()=>{const e=ce.current;if(!be||!e)return;const t=(b??[]).filter(e=>e.coordinates.length>=2),n=[...new Set(t.flatMap(e=>e.attribution?[e.attribution]:[]))].join(" · "),r=()=>{const r=function(){const e=document.createElement("span");e.className="text-blue-600",e.style.display="none",document.body.appendChild(e);const t=getComputedStyle(e).color||"#2563eb";return e.remove(),H(t)}(),o={type:"FeatureCollection",features:t.map(e=>({type:"Feature",properties:{key:e.key,estimate:e.estimate,faded:!!e.faded,color:e.color?_(e.color):r},geometry:{type:"LineString",coordinates:e.coordinates}}))},a=["case",["get","faded"],.25,.85],l=["get","color"],i=e.getSource(K);if(i&&(i.attribution||"")!==n){for(const t of P)e.getLayer(t)&&e.removeLayer(t);e.removeSource(K)}const s=e.getSource(K);s?s.setData(o):e.addSource(K,{type:"geojson",data:o,...n?{attribution:n}:{}}),e.getLayer("routes-road")||e.addLayer({id:"routes-road",type:"line",source:K,filter:["!",["get","estimate"]],layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":l,"line-width":4,"line-opacity":a}}),e.getLayer("routes-estimate")||e.addLayer({id:"routes-estimate",type:"line",source:K,filter:["get","estimate"],layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":l,"line-width":3,"line-dasharray":[1.5,1.5],"line-opacity":a}})},o=()=>{try{r()}catch(e){console.debug("[map] routes wait for the style",e)}};return o(),e.on("style.load",o),e.once("idle",o),()=>{e.off("style.load",o),e.off("idle",o)}},[be,b,ke]),l(()=>{const e=ce.current;if(!be||!e||!s)return;const n=t.find(e=>e.key===s.key);if(!n)return;const r=e.getZoom(),o=C?W(e.project([n.lng,n.lat]),t.filter(e=>e.key!==n.key).map(t=>e.project([t.lng,t.lat])),r):-1/0,a={center:[n.lng,n.lat],zoom:Math.min(18,Math.max(r,13,o))};U()?e.jumpTo(a):e.flyTo({...a,duration:600})},[be,s?.n]);const[Se,je]=a(!1);l(()=>{const e=ie.current;if(!e)return;const t=()=>je(e.clientWidth<T);t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[T]);const Ae=n?t.find(e=>e.key===n)??null:null,ze=Ae?.key??null,Be=Ae?.lng??0,Re=Ae?.lat??0,Te=be&&!Se&&null!=R&&!!Ae,[Oe,We]=a(null);l(()=>{const e=ce.current,t=ue.current;if(!(Te&&e&&t&&ze))return;const n=document.createElement("div");n.dataset.mapCard="",n.className="w-[26rem] overflow-y-auto overscroll-contain";const r=new t.Popup({anchor:"bottom",offset:v,className:"rosh-map-card",maxWidth:"none",closeButton:!1,closeOnClick:!1,closeOnMove:!1,focusAfterOpen:!1}).setLngLat([Be,Re]).setDOMContent(n).addTo(e),o=r.getElement(),a=o.querySelector(".maplibregl-popup-content");a&&Object.assign(a.style,{padding:"0",background:"transparent",borderRadius:"0",boxShadow:"none"});const l=o.querySelector(".maplibregl-popup-tip");l&&Object.assign(l.style,{borderTopColor:Z,borderBottomColor:Z}),We(n);let i=!1,s=!1;const c=(t=!0)=>{if(s)return;if(e.isMoving())return void(i||(i=!0,e.once("moveend",()=>{i=!1,c()})));const{clientWidth:o,clientHeight:a}=e.getContainer(),l=function(e,t){const n=e.getBoundingClientRect().top,r=[...e.querySelectorAll(".maplibregl-ctrl-top-left > *, .maplibregl-ctrl-top-right > *"),...t?.querySelectorAll(":scope > [data-map-control]")??[]];let o=0;for(const e of r){const t=e.getBoundingClientRect();t.height>0&&(o=Math.max(o,t.bottom-n))}return o}(e.getContainer(),ie.current)+8,u=`${w(a,l)}px`;n.style.maxHeight!==u&&(n.style.maxHeight=u);const d=r.getElement(),p=r.getLngLat(),{anchor:m,move:h}=k(e.project(p),{width:d.offsetWidth,height:d.offsetHeight},{width:o,height:a},l);r.options.anchor!==m&&(r.options.anchor=m,r.setLngLat(p)),!t||0===h.x&&0===h.y||e.panBy([-h.x,-h.y],{duration:U()?0:250}),$e()},u=new ResizeObserver(()=>c());u.observe(n);const d=()=>c(),p=()=>{i||c(!1)};e.on("resize",d),e.on("moveend",p);let m=!1;const h=pe.current,g=e=>{m=n.contains(e.target)};return document.addEventListener("focusin",g),()=>{if(s=!0,u.disconnect(),e.off("resize",d),e.off("moveend",p),document.removeEventListener("focusin",g),r.remove(),We(null),m&&(!document.activeElement||document.activeElement===document.body)){const e=h.get(ze)?.button;e&&"none"!==e.style.display&&e.focus({preventScroll:!0})}}},[Te,ze,Be,Re,$e]);const Fe=G?.active??!1,qe=o(G?.onChange);l(()=>{qe.current=G?.onChange}),l(()=>{if(!G)return;const e=document.documentElement;Fe&&!document.fullscreenElement&&e.requestFullscreen&&e.requestFullscreen().catch(()=>{}),!Fe&&document.fullscreenElement&&document.exitFullscreen().catch(()=>{})},[Fe]);const Ke=!!G;return l(()=>{if(!Ke)return;const e=()=>{document.fullscreenElement||qe.current?.(!1)};return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[Ke]),/* @__PURE__ */d("div",{ref:ie,className:Q("relative min-h-72 overflow-hidden rounded-lg border border-gray-200 bg-gray-100",z&&"[&_canvas]:cursor-crosshair",g),children:[
3
- /* @__PURE__ */p("div",{className:"absolute inset-0",children:/* @__PURE__ */p("div",{ref:se,className:"h-full w-full",role:"region","aria-label":h})}),ve&&/* @__PURE__ */p("p",{className:"absolute inset-0 grid place-items-center p-6 text-center text-sm text-gray-500",children:oe.failed}),G&&/* @__PURE__ */p(e,{"data-map-control":"",variant:"secondary",size:"sm",className:"absolute left-3 top-3 z-10",onClick:()=>G.onChange(!G.active),leftIcon:/* @__PURE__ */p(le,{leave:G.active}),children:G.active?oe.leaveFullScreen:oe.fullScreen}),y,null!=R&&!Te&&/* @__PURE__ */p("div",{"data-map-card":"",className:"absolute bottom-3 left-3 right-3 z-10 max-h-[calc(100%-1.5rem)] max-w-md overflow-y-auto overscroll-contain",children:R}),Te&&Oe?u(R,Oe):null,be&&/* @__PURE__ */p(ae,{pins:t,hosts:fe.current})]})}function ae({pins:e,hosts:t}){/* @__PURE__ */
2
+ import{Button_default as e}from"../chunk-PH3PRIFP.js";import{rootIsDark as t,ROOT_THEME_ATTRIBUTES as n}from"../chunk-MAIHBBWT.js";import{useShellStrings as r}from"../chunk-UZUH5PVW.js";import{useRef as o,useState as a,useEffect as l,useCallback as i,useMemo as s,useSyncExternalStore as c}from"react";import{createPortal as u}from"react-dom";import{jsxs as d,jsx as p,Fragment as m}from"react/jsx-runtime";import{useQuery as h}from"@tanstack/react-query";var g="maplibregl-compact-show";function f(e){if(!e)return()=>{};const t=()=>!!e.classList.contains(g)&&(e.classList.remove(g),!0);if(t())return()=>{};const n=new MutationObserver(()=>{t()&&n.disconnect()});return n.observe(e,{attributes:!0,attributeFilter:["class"]}),()=>n.disconnect()}var y=20,b=12,x=480,v={center:[0,0],left:[y,0],right:[-20,0],top:[0,y],"top-left":[0,y],"top-right":[0,y],bottom:[0,-20],"bottom-left":[0,-20],"bottom-right":[0,-20]},w=(e,t=12)=>Math.max(0,Math.floor(e-t-b-y-10-16));function k(e,t,n,r=12){const o=e.y-y-r,a=n.height-e.y-y-b,l=t.height<=o||t.height>a&&o>=a,i=l?Math.max(0,t.height-o):-Math.max(0,t.height-a);let s="",c=0;return e.x-t.width/2<b?(s="-left",c=Math.max(0,b-e.x)):e.x+t.width/2>n.width-b&&(s="-right",c=-Math.max(0,e.x-(n.width-b))),{anchor:`${l?"bottom":"top"}${s}`,move:{x:c,y:i}}}var M="maplibre-gl-worker.mjs",N=e=>`/maplibre-gl/${e}/${M}`,C=null;function L(){return C??=Promise.all([import("maplibre-gl"),import("maplibre-gl/dist/maplibre-gl.css")]).then(([e])=>(e.setWorkerUrl(N(e.getVersion())),e)).catch(e=>{throw C=null,e}),C}var $=24,E=28,S=29;function j(e){const t=[...e].sort((e,t)=>e-t),n=[];for(let e=0;e<t.length;){let r=e;for(;r+1<t.length&&t[r+1]===t[r]+1;)r++;n.push(r===e?String(t[e]):`${t[e]}–${t[r]}`),e=r+1}return n.join(", ")}function A(e){const t=Math.max(E,12+8*e.length);return t+t%2}var z=(e,t,n,r)=>({left:e-n/2,top:t-r/2,right:e+n/2,bottom:t+r/2});function B(e,t){return e.left<t.right+1&&t.left<e.right+1&&e.top<t.bottom+1&&t.top<e.bottom+1}var R=e=>z(e.x,e.y,e.width,e.height);function T(e){for(let t=0;t<e.length;t++)for(let n=t+1;n<e.length;n++)if(B(R(e[t]),R(e[n])))return[e[t],e[n]];return null}function O(e,t=[]){const n=[],r=e=>t.some(t=>B(t,e));let o=e.filter(e=>null!==e.stop).sort((e,t)=>e.stop-t.stop).map(e=>({keys:[e.key],stops:[e.stop],x:e.x,y:e.y,width:E,height:E,under:0}));for(let e=T(o);e;e=T(o)){const[t,n]=e;t.keys.push(...n.keys),t.stops.push(...n.stops),t.stops.sort((e,t)=>e-t),t.width=A(j(t.stops)),o=o.filter(e=>e!==n)}o=o.filter(e=>!r(R(e))||(n.push(...e.keys),!1));const a=[];for(const t of e){if(null!==t.stop)continue;const e=z(t.x,t.y,$,$),l=o.find(t=>B(R(t),e));if(l||r(e)){n.push(t.key),l&&l.under++;continue}const i=a.find(t=>B(R(t),e));i?i.keys.push(t.key):a.push({keys:[t.key],stops:[],x:t.x,y:t.y,width:$,height:$,under:0})}return{groups:[...o,...a],hidden:n}}function W(e,t,n){let r=-1/0;for(const o of t){const t=Math.max(Math.abs(o.x-e.x),Math.abs(o.y-e.y));r=Math.max(r,0===t?1/0:n+Math.log2(29/t))}return r}function F(e){const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:n}),()=>t.disconnect()}var P=t;var q="routes",K=["routes-road","routes-estimate"];function _(e){const t=document.createElement("span");t.style.display="none",t.style.color=e,document.body.appendChild(t);const n=getComputedStyle(t).color||"#2563eb";return t.remove(),H(n)}function H(e){const t=document.createElement("canvas").getContext("2d");if(!t)return"#2563eb";t.fillStyle="#2563eb",t.fillStyle=e,t.fillRect(0,0,1,1);const[n,r,o]=t.getImageData(0,0,1,1).data;return`rgb(${n}, ${r}, ${o})`}var I={light:"https://tiles.openfreemap.org/styles/positron",dark:"https://tiles.openfreemap.org/styles/dark"},Z={center:[30,20],zoom:1},D="ring-2 ring-gray-900 ring-offset-2";var V="var(--color-gray-600, #4b5563)",U="http://www.w3.org/2000/svg",G=()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches,J=/^(?:\d+|[xytrblse](?:-\d+)?|solid|dashed|dotted|double|hidden|none)$/;function Q(e){return e.split(/\s+/).some(e=>{const t=e.search(/[[(]/),n=t<0?e:e.slice(0,t),r=e.slice(n.lastIndexOf(":")+1);return r.startsWith("border-")&&!J.test(r.slice(7))})}var X=(...e)=>e.filter(Boolean).join(" ");function Y(e){const t=document.createElementNS(U,"svg");t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("fill","none"),t.setAttribute("stroke","currentColor"),t.setAttribute("stroke-width","2"),t.setAttribute("aria-hidden","true");for(const n of e){const e=document.createElementNS(U,"path");e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),e.setAttribute("d",n),t.appendChild(e)}return t}function ee(e,t){for(const[n,r]of Object.entries(t??{}))e.dataset[n]=r}var te=(e,t)=>X("relative grid place-items-center rounded-full cursor-pointer",t&&(null!=e.stop?"h-7 w-7":"h-6 w-6"));function ne(e,t,n,r){const o=t&&!r&&null==e.stop&&!e.dot;return X("grid place-items-center rounded-full border-2 font-semibold leading-none shadow-md transition-transform motion-reduce:transition-none",!Q(e.tone)&&"border-white",e.tone,e.dot?"h-4 w-4 opacity-80":null!=e.stop?"h-7 w-7 text-xs ring-2 ring-gray-900":o?"h-8 w-8 text-xs [&_svg]:h-4 [&_svg]:w-4":"h-6 w-6 text-[10px] [&_svg]:h-3.5 [&_svg]:w-3.5",t&&(o?"ring-2 ring-gray-900 ring-offset-1":D),e.approximate&&"border-dashed opacity-80",e.faded&&!t&&"opacity-40",n&&"scale-125 opacity-100")}var re=e=>X("grid place-items-center border-2 px-0.5 text-xs font-semibold leading-none shadow-sm",e.stop?"h-7 min-w-7":"h-6 min-w-6",!Q(e.tone??"")&&"border-white",e.tone??"bg-gray-900 text-white");function oe({pins:t,selectedKey:n,focus:s,onSelect:m,ariaLabel:h,className:g="",children:y,routes:b,fitTo:x,attribution:M,marks:N,groupCrowded:C=!1,noun:S,highlightKey:A=null,picking:z=!1,onPick:B,card:R,cardMinMapWidth:T=480,fullScreen:U,initialView:J=Z,cooperativeGestures:Q=!1}){const oe=r().map,ie=o(null),se=o(null),ce=o(null),ue=o(null),de=o([]),pe=o(/* @__PURE__ */new Map),me=o(/* @__PURE__ */new Map),he=o(/* @__PURE__ */new Map),ge=o(null),fe=o(/* @__PURE__ */new Map),ye=o(""),[be,xe]=a(!1),[ve,we]=a(!1),ke=c(F,P,()=>!1)?"dark":"light",Me=o({onSelect:m,onPick:B,picking:z,pins:t,selectedKey:n,highlightKey:A,groupCrowded:C,strings:oe,noun:S});l(()=>{Me.current={onSelect:m,onPick:B,picking:z,pins:t,selectedKey:n,highlightKey:A,groupCrowded:C,strings:oe,noun:S}});const Ne=i(()=>{const e=ce.current,{pins:t,selectedKey:n}=Me.current,r=n?t.find(e=>e.key===n):void 0;e&&r&&!e.getBounds().contains([r.lng,r.lat])&&e.easeTo({center:[r.lng,r.lat],duration:G()?0:400})},[]),Ce=o(!1),Le=i((e,t)=>{const n=ce.current,r=ue.current;if(!n||!r)return;const o=n.getZoom();if(o>=17.5){const t=e.indexOf(Me.current.selectedKey??"");return void Me.current.onSelect(e[(t+1)%e.length])}const a=e.map(e=>pe.current.get(e).pin),l=new r.LngLatBounds([a[0].lng,a[0].lat],[a[0].lng,a[0].lat]);for(const e of a)l.extend([e.lng,e.lat]);const i=a.map(e=>n.project([e.lng,e.lat])),s=Math.max(...i.map((e,t)=>W(e,i.filter((e,n)=>n!==t),o))),{clientWidth:c,clientHeight:u}=n.getContainer(),d=n.cameraForBounds(l,{padding:Math.min(64,c/4,u/4)})?.zoom??18,p=document.activeElement===t;Ce.current=!0,n.once("moveend",()=>{if(Ce.current=!1,!p)return;const e=a[0].key,t=pe.current.get(e)?.button,n=t&&"none"!==t.style.display?t:[...me.current.values()].find(t=>t.keys.includes(e))?.button;n?.focus({preventScroll:!0})}),n.easeTo({center:l.getCenter(),zoom:Math.min(18,Math.max(o+1,Math.min(d,s))),duration:G()?0:600})},[]),$e=i(()=>{const e=ce.current,t=ue.current;if(!e||!t||!ie.current||Ce.current&&e.isMoving())return;const{selectedKey:n,highlightKey:r,groupCrowded:o,strings:a,noun:l}=Me.current;for(const[e,t]of pe.current){const a=ne(t.pin,e===n,e===r,o);t.mark.className!==a&&(t.mark.className=a);const l=e===n?"1":"";t.button.style.zIndex!==l&&(t.button.style.zIndex=l)}let i=null;if(o){const r=e.getContainer().getBoundingClientRect(),o=[...ie.current.querySelectorAll("a[href], button, input, select, textarea, summary, [role='button'], [tabindex]:not([tabindex='-1'])")].filter(e=>!e.closest("[data-pin], [data-pin-group], .maplibregl-canvas")).map(e=>{const t=e.getBoundingClientRect(),n=e.closest("[data-map-card]")?.getBoundingClientRect()??t;return{left:Math.max(t.left,n.left)-r.left,top:Math.max(t.top,n.top)-r.top,right:Math.min(t.right,n.right)-r.left,bottom:Math.min(t.bottom,n.bottom)-r.top}}).filter(e=>e.right>e.left&&e.bottom>e.top);i=O([...pe.current.values()].map(({pin:t})=>{const n=e.project([t.lng,t.lat]);return{key:t.key,x:n.x,y:n.y,stop:t.stop??null}}),o);const s=e=>(l??a.places)(e),c=e.getZoom()<17.5?a.spread:a.cycle,u=(e,t)=>{const n=t?"":"none";e.style.display!==n&&(e.style.display=n)},d=/* @__PURE__ */new Map;for(const r of i.groups){const o=r.under>0?a.closeBy(r.under,s(r.under)):null,l=1===r.keys.length?pe.current.get(r.keys[0]):null;if(l){u(l.button,!0),l.button.setAttribute("aria-label",o?`${l.name}; ${o}`:l.name),l.button.title=o?`${l.title}\n${o}`:l.title;continue}for(const e of r.keys)u(pe.current.get(e).button,!1);const i=r.keys.join(" ");let p=me.current.get(i);if(!p){const n=document.createElement("button");n.type="button",n.dataset.pinGroup="",n.className="grid place-items-center rounded-full cursor-pointer",n.append(document.createElement("span"));const o=pe.current.get(r.keys[0]).pin,a={button:n,keys:r.keys,marker:new t.Marker({element:n,anchor:"center"}).setLngLat([o.lng,o.lat]).addTo(e)};n.addEventListener("click",e=>{e.stopPropagation(),Le(a.keys,n)}),p=a}p.keys=r.keys;const m=r.keys.map(e=>pe.current.get(e)),h=r.stops.length>0?j(r.stops):String(m.length),g=r.stops.length>0?a.stops(h):a.group(m.length,s(m.length));p.button.style.width=`${r.width}px`,p.button.style.height=`${r.height}px`,p.button.setAttribute("aria-label",`${g}: ${m.map(e=>e.pin.label).join("; ")}. ${c}${o?`; ${o}`:""}.`),p.button.title=[`${g}:`,...m.map(e=>e.title),...o?[o]:[],c].join("\n");const f=p.button.firstElementChild;f.textContent=h;const y=X("grid place-items-center rounded-full border-2 border-gray-700 bg-white font-semibold leading-none text-gray-900 shadow-sm",r.stops.length>0?"h-7 w-full px-1 text-xs ring-2 ring-gray-900":m.every(e=>e.pin.dot)?"h-5 w-5 text-[0.6rem]":"h-6 w-6 text-[0.7rem]",null!=n&&r.keys.includes(n)&&D);f.className!==y&&(f.className=y),d.set(i,p)}for(const e of i.hidden)u(pe.current.get(e).button,!1);for(const[e,t]of me.current)d.has(e)||t.marker.remove();me.current=d}if(ge.current){const e=r&&i?i.groups.find(e=>e.keys.includes(r)&&e.keys.length>1):void 0,t=r?pe.current.get(r):void 0,n=r?he.current.get(r):void 0,o=e?{at:pe.current.get(e.keys[0]).pin,width:e.width,height:e.height}:t?{at:t.pin,width:t.button.offsetWidth||(null!=t.pin.stop?E:$),height:t.button.offsetHeight||(null!=t.pin.stop?E:$)}:n?{at:n.mark,width:n.element.offsetWidth||E,height:n.element.offsetHeight||E}:null,a=ge.current.getElement();a.style.display=o?"":"none",o&&(ge.current.setLngLat([o.at.lng,o.at.lat]),a.style.width=`${o.width+22}px`,a.style.height=`${o.height+22}px`)}},[Le]);l(()=>{if($e(),!ie.current)return;const e=new ResizeObserver(()=>$e());e.observe(ie.current);for(const t of ie.current.children)t.contains(se.current)||e.observe(t);return()=>e.disconnect()}),l(()=>{let e=!1,t=null,n=null,r=()=>{};return(async()=>{try{const o=await L();if(e||!se.current)return;ue.current=o,t=new o.Map({container:se.current,style:I[ke],center:J.center,zoom:J.zoom,attributionControl:M?{compact:!0,customAttribution:M}:{compact:!0},dragRotate:!1,pitchWithRotate:!1,touchPitch:!1,maxPitch:0,cooperativeGestures:"coarse"===Q?window.matchMedia("(pointer: coarse)").matches:Q}),t.touchZoomRotate.disableRotation(),t.keyboard.disableRotation(),t.addControl(new o.NavigationControl({showCompass:!1}),"top-right");const a=document.createElement("div");a.dataset.pinRing="",a.setAttribute("aria-hidden","true"),a.className="pointer-events-none rounded-full border-2 border-gray-900 bg-gray-900/15 shadow-[0_0_0_2px_var(--color-white,#fff)]",a.style.display="none",ge.current=new o.Marker({element:a,anchor:"center"}).setLngLat(J.center).addTo(t),t.on("click",e=>{Me.current.picking&&Me.current.onPick?.({lat:e.lngLat.lat,lng:e.lngLat.lng})}),t.on("move",$e),t.on("moveend",$e),t.on("resize",$e),t.on("error",e=>console.warn("[map]",e.error?.message)),r=f(se.current.querySelector(".maplibregl-ctrl-attrib"));const l=t;n=new ResizeObserver(()=>{l.resize(),Ne()}),n.observe(se.current),ce.current=t,xe(!0)}catch(t){console.error("[map] could not start",t),e||we(!0)}})(),()=>{e=!0,n?.disconnect(),r(),de.current.forEach(e=>e.remove()),de.current=[],me.current.forEach(e=>e.marker.remove()),me.current.clear(),ge.current?.remove(),ge.current=null,t?.remove(),ce.current=null}},[]);const Ee=o(ke);l(()=>{be&&ce.current&&Ee.current!==ke&&(Ee.current=ke,ce.current.setStyle(I[ke]))},[be,ke]),l(()=>{const e=ce.current,n=ue.current;if(!be||!e||!n)return;de.current.forEach(e=>e.remove()),de.current=[],me.current.forEach(e=>e.marker.remove()),me.current.clear(),pe.current.clear(),he.current.clear();for(const e of fe.current.keys())t.some(t=>t.key===e)||fe.current.delete(e);const r=Me.current.strings;for(const o of t){const t=document.createElement("button");t.type="button",t.dataset.pin=o.key,t.className=te(o,C);const a=o.approximate?r.approximate(o.label):o.label,l=o.title??(o.approximate?r.approximateTitle(o.label):o.label);t.setAttribute("aria-label",a),t.title=l;const i=document.createElement("span");if(ee(i,o.data),o.dot);else if(null!=o.iconNode){const e=fe.current.get(o.key);e&&i.append(e)}else o.icon?.length?i.append(Y(o.icon)):i.textContent=null!=o.stop?String(o.stop):o.glyph;if(t.append(i),o.badge){const e=document.createElement("span");e.setAttribute("aria-hidden","true"),e.className=X("absolute -right-2 -top-2 grid h-4 min-w-4 place-items-center rounded-full px-0.5 text-[9px] font-semibold leading-none shadow",o.badgeTone??"bg-white text-gray-900"),e.textContent=o.badge,t.appendChild(e)}t.addEventListener("click",e=>{e.stopPropagation(),Me.current.onSelect(o.key)}),de.current.push(new n.Marker({element:t,anchor:"center"}).setLngLat([o.lng,o.lat]).addTo(e)),pe.current.set(o.key,{pin:o,button:t,mark:i,name:a,title:l})}for(const t of N??[]){const r=document.createElement("div");r.dataset.mapMark=t.key,ee(r,t.data),r.className=re(t),r.textContent=t.text,r.title=t.title??t.label,r.setAttribute("role","img"),r.setAttribute("aria-label",t.label),de.current.push(new n.Marker({element:r,anchor:"center"}).setLngLat([t.lng,t.lat]).addTo(e)),he.current.set(t.key,{mark:t,element:r})}$e()},[be,t,N,C,$e]),l(()=>{be&&$e()},[be,n,A,$e]),l(()=>{if(!be||!n)return;const e=requestAnimationFrame(Ne);return()=>cancelAnimationFrame(e)},[be,n,Ne]),l(()=>{const e=ce.current,n=ue.current,r=x?[...t,...N??[]].filter(e=>x.includes(e.key)):t;if(!be||!e||!n||0===r.length)return;const o=r.map(e=>`${e.key}@${e.lat},${e.lng}`).sort().join("|");if(ye.current===o)return;const a=""===ye.current;if(ye.current=o,1===r.length)return void e.jumpTo({center:[r[0].lng,r[0].lat],zoom:13});const l=new n.LngLatBounds([r[0].lng,r[0].lat],[r[0].lng,r[0].lat]);for(const e of r)l.extend([e.lng,e.lat]);e.fitBounds(l,{padding:48,maxZoom:14,animate:!a})},[be,t,N,x]),l(()=>{const e=ce.current;if(!be||!e)return;const t=(b??[]).filter(e=>e.coordinates.length>=2),n=[...new Set(t.flatMap(e=>e.attribution?[e.attribution]:[]))].join(" · "),r=()=>{const r=function(){const e=document.createElement("span");e.className="text-blue-600",e.style.display="none",document.body.appendChild(e);const t=getComputedStyle(e).color||"#2563eb";return e.remove(),H(t)}(),o={type:"FeatureCollection",features:t.map(e=>({type:"Feature",properties:{key:e.key,estimate:e.estimate,faded:!!e.faded,color:e.color?_(e.color):r},geometry:{type:"LineString",coordinates:e.coordinates}}))},a=["case",["get","faded"],.25,.85],l=["get","color"],i=e.getSource(q);if(i&&(i.attribution||"")!==n){for(const t of K)e.getLayer(t)&&e.removeLayer(t);e.removeSource(q)}const s=e.getSource(q);s?s.setData(o):e.addSource(q,{type:"geojson",data:o,...n?{attribution:n}:{}}),e.getLayer("routes-road")||e.addLayer({id:"routes-road",type:"line",source:q,filter:["!",["get","estimate"]],layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":l,"line-width":4,"line-opacity":a}}),e.getLayer("routes-estimate")||e.addLayer({id:"routes-estimate",type:"line",source:q,filter:["get","estimate"],layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":l,"line-width":3,"line-dasharray":[1.5,1.5],"line-opacity":a}})},o=()=>{try{r()}catch(e){console.debug("[map] routes wait for the style",e)}};return o(),e.on("style.load",o),e.once("idle",o),()=>{e.off("style.load",o),e.off("idle",o)}},[be,b,ke]),l(()=>{const e=ce.current;if(!be||!e||!s)return;const n=t.find(e=>e.key===s.key);if(!n)return;const r=e.getZoom(),o=C?W(e.project([n.lng,n.lat]),t.filter(e=>e.key!==n.key).map(t=>e.project([t.lng,t.lat])),r):-1/0,a={center:[n.lng,n.lat],zoom:Math.min(18,Math.max(r,13,o))};G()?e.jumpTo(a):e.flyTo({...a,duration:600})},[be,s?.n]);const[Se,je]=a(!1);l(()=>{const e=ie.current;if(!e)return;const t=()=>je(e.clientWidth<T);t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[T]);const Ae=n?t.find(e=>e.key===n)??null:null,ze=Ae?.key??null,Be=Ae?.lng??0,Re=Ae?.lat??0,Te=be&&!Se&&null!=R&&!!Ae,[Oe,We]=a(null);l(()=>{const e=ce.current,t=ue.current;if(!(Te&&e&&t&&ze))return;const n=document.createElement("div");n.dataset.mapCard="",n.className="w-[26rem] overflow-y-auto overscroll-contain";const r=new t.Popup({anchor:"bottom",offset:v,className:"rosh-map-card",maxWidth:"none",closeButton:!1,closeOnClick:!1,closeOnMove:!1,focusAfterOpen:!1}).setLngLat([Be,Re]).setDOMContent(n).addTo(e),o=r.getElement(),a=o.querySelector(".maplibregl-popup-content");a&&Object.assign(a.style,{padding:"0",background:"transparent",borderRadius:"0",boxShadow:"none"});const l=o.querySelector(".maplibregl-popup-tip");l&&Object.assign(l.style,{borderTopColor:V,borderBottomColor:V}),We(n);let i=!1,s=!1;const c=(t=!0)=>{if(s)return;if(e.isMoving())return void(i||(i=!0,e.once("moveend",()=>{i=!1,c()})));const{clientWidth:o,clientHeight:a}=e.getContainer(),l=function(e,t){const n=e.getBoundingClientRect().top,r=[...e.querySelectorAll(".maplibregl-ctrl-top-left > *, .maplibregl-ctrl-top-right > *"),...t?.querySelectorAll(":scope > [data-map-control]")??[]];let o=0;for(const e of r){const t=e.getBoundingClientRect();t.height>0&&(o=Math.max(o,t.bottom-n))}return o}(e.getContainer(),ie.current)+8,u=`${w(a,l)}px`;n.style.maxHeight!==u&&(n.style.maxHeight=u);const d=r.getElement(),p=r.getLngLat(),{anchor:m,move:h}=k(e.project(p),{width:d.offsetWidth,height:d.offsetHeight},{width:o,height:a},l);r.options.anchor!==m&&(r.options.anchor=m,r.setLngLat(p)),!t||0===h.x&&0===h.y||e.panBy([-h.x,-h.y],{duration:G()?0:250}),$e()},u=new ResizeObserver(()=>c());u.observe(n);const d=()=>c(),p=()=>{i||c(!1)};e.on("resize",d),e.on("moveend",p);let m=!1;const h=pe.current,g=e=>{m=n.contains(e.target)};return document.addEventListener("focusin",g),()=>{if(s=!0,u.disconnect(),e.off("resize",d),e.off("moveend",p),document.removeEventListener("focusin",g),r.remove(),We(null),m&&(!document.activeElement||document.activeElement===document.body)){const e=h.get(ze)?.button;e&&"none"!==e.style.display&&e.focus({preventScroll:!0})}}},[Te,ze,Be,Re,$e]);const Fe=U?.active??!1,Pe=o(U?.onChange);l(()=>{Pe.current=U?.onChange}),l(()=>{if(!U)return;const e=document.documentElement;Fe&&!document.fullscreenElement&&e.requestFullscreen&&e.requestFullscreen().catch(()=>{}),!Fe&&document.fullscreenElement&&document.exitFullscreen().catch(()=>{})},[Fe]);const qe=!!U;return l(()=>{if(!qe)return;const e=()=>{document.fullscreenElement||Pe.current?.(!1)};return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[qe]),/* @__PURE__ */d("div",{ref:ie,className:X("relative min-h-72 overflow-hidden rounded-lg border border-gray-200 bg-gray-100",z&&"[&_canvas]:cursor-crosshair",g),children:[
3
+ /* @__PURE__ */p("div",{className:"absolute inset-0",children:/* @__PURE__ */p("div",{ref:se,className:"h-full w-full",role:"region","aria-label":h})}),ve&&/* @__PURE__ */p("p",{className:"absolute inset-0 grid place-items-center p-6 text-center text-sm text-gray-500",children:oe.failed}),U&&/* @__PURE__ */p(e,{"data-map-control":"",variant:"secondary",size:"sm",className:"absolute left-3 top-3 z-10",onClick:()=>U.onChange(!U.active),leftIcon:/* @__PURE__ */p(le,{leave:U.active}),children:U.active?oe.leaveFullScreen:oe.fullScreen}),y,null!=R&&!Te&&/* @__PURE__ */p("div",{"data-map-card":"",className:"absolute bottom-3 left-3 right-3 z-10 max-h-[calc(100%-1.5rem)] max-w-md overflow-y-auto overscroll-contain",children:R}),Te&&Oe?u(R,Oe):null,be&&/* @__PURE__ */p(ae,{pins:t,hosts:fe.current})]})}function ae({pins:e,hosts:t}){/* @__PURE__ */
4
4
  return p(m,{children:e.map(e=>{if(null==e.iconNode||e.dot)return null;let n=t.get(e.key);return n||(n=document.createElement("span"),n.className="contents",t.set(e.key,n)),u(e.iconNode,n,e.key)})})}function le({leave:e}){/* @__PURE__ */
5
5
  return p("svg",{"aria-hidden":"true",className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */p("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e?"M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25":"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"})})}function ie(){const[e,t]=a(null);return{highlightKey:e,pointAt:i(e=>{const n=()=>t(e),r=()=>t(t=>t===e?null:t);return{onMouseEnter:n,onMouseLeave:r,onFocus:n,onBlur:r}},[])}}var se=3e3,ce=e=>!!e?.pending&&3e3,ue=e=>`${e.kind}:${e.id}`,de=e=>("located"===e.placement||"approximate"===e.placement)&&null!=e.lat&&null!=e.lng;function pe(e){switch(e){case"located":return null;case"approximate":return"Approximate: only the suburb or postcode matched";case"pending":return"Locating…";case"not_found":return"Not on the map: address not found";case"failed":return"Not on the map: the map service could not be reached";case"no_address":return"Not on the map: no city or postcode"}}var me={importer:{label:"Importer",tone:"bg-sky-600 text-white"},dealer:{label:"Dealer",tone:"bg-purple-600 text-white"},retail:{label:"Retail",tone:"bg-green-600 text-white"},supplier:{label:"Supplier",tone:"bg-sky-600 text-white"},delivery_location:{label:"Delivery location",tone:"bg-amber-600 text-white"},warehouse:{label:"Warehouse",tone:"bg-amber-600 text-white"}},he=["importer","dealer","retail","supplier","delivery_location","warehouse"];function ge(e){return"supplier"===e.kind?"supplier":"customer"===e.kind?e.category||"importer":e.kind}var fe=(e,t=me)=>t[e]?.tone??"bg-gray-700 text-white",ye=(e,t=me)=>t[e]?.label??e,be=(e,t)=>fe(ge(e),t);function xe(e,t,n=me){return null!=t?String(t):(n[ge(e)]?.label??"").charAt(0).toUpperCase()}var ve=["delivery_location","warehouse"];function we(e,t=ve){const n=/* @__PURE__ */new Map;let r=0;for(const o of e)t.includes(o.kind)&&n.set(ue(o),++r);return n}function ke(e){const t={onMap:0,approximate:0,pending:0,off:0};for(const n of e)de(n)?(t.onMap+=1,"approximate"===n.placement&&(t.approximate+=1)):"pending"===n.placement?t.pending+=1:t.off+=1;return t}function Me(e){const t=[`${e.onMap} on the map`];return e.approximate&&t.push(`${e.approximate} approximate`),e.pending&&t.push(`${e.pending} locating`),e.off&&t.push(`${e.off} not on the map`),t.join(" · ")}function Ne(e){const t=[...new Set(e.filter(de).map(ge))];return[...he.filter(e=>t.includes(e)),...t.filter(e=>!he.includes(e))]}function Ce(e,t){return e.filter(e=>!de(e)&&"pending"!==e.placement).map(e=>{const n=t?.get(ue(e)),r=pe(e.placement)?.replace(/^Not on the map: /,"")??"";return{key:ue(e),text:`${null!=n?`${n}. `:""}${e.label}: ${r}`}})}function Le({categories:e,palette:t=me,floating:n=!0}){return e.length<2?null:/* @__PURE__ */p("div",{className:(n?"absolute left-3 top-3 z-10 ":"")+"flex flex-wrap gap-x-3 gap-y-1 rounded-lg border border-gray-200 bg-white px-2.5 py-1.5 text-xs text-gray-600 shadow-sm",children:e.map(e=>/* @__PURE__ */d("span",{className:"inline-flex items-center gap-1.5",children:[
6
6
  /* @__PURE__ */p("span",{"aria-hidden":!0,className:`h-2.5 w-2.5 rounded-full ${fe(e,t)}`}),ye(e,t)]},e))})}function $e({point:t,number:n,onOpen:o,onClose:a,palette:l=me}){const i=pe(t.placement),s=ge(t),c=r().map;/* @__PURE__ */
@@ -141,6 +141,14 @@ declare function usePageTab(): PageTabHandle;
141
141
  * The name sticks: moving within the tab (a filter, a hash) keeps it.
142
142
  */
143
143
  declare function usePageTabTitle(title: string | null | undefined): void;
144
+ /**
145
+ * Give this page's tab a copy icon for `text` — the record's number. The tab
146
+ * is the page's title bar, so the copy icon a title would carry sits in the
147
+ * tab, shown while the tab is the active one. Nothing (or an empty string)
148
+ * means no icon. The page sets it while it is on screen: a hidden tab shows no
149
+ * icon anyway, and the page sets it again when it comes back.
150
+ */
151
+ declare function usePageTabCopy(text: string | null | undefined): void;
144
152
  /**
145
153
  * Mark this page's tab as holding unsaved changes. Closing it then asks
146
154
  * first, and the browser tab asks before a reload.
@@ -153,4 +161,4 @@ declare function usePageTabTitle(title: string | null | undefined): void;
153
161
  */
154
162
  declare function usePageTabDirty(dirty: boolean): void;
155
163
 
156
- export { type CloseTabOptions, DEFAULT_MAX_TABS, PAGE_TABS_PAUSE_HIDDEN, type PageTab, PageTabBar, type PageTabBarProps, type PageTabHandle, type PageTabRoute, type PageTabsApi, PageTabsOutlet, type PageTabsOutletProps, PageTabsProvider, type PageTabsProviderProps, type ResolvePageTab, type TabLocation, parseTabPath, usePageTab, usePageTabDirty, usePageTabTitle, usePageTabs };
164
+ export { type CloseTabOptions, DEFAULT_MAX_TABS, PAGE_TABS_PAUSE_HIDDEN, type PageTab, PageTabBar, type PageTabBarProps, type PageTabHandle, type PageTabRoute, type PageTabsApi, PageTabsOutlet, type PageTabsOutletProps, PageTabsProvider, type PageTabsProviderProps, type ResolvePageTab, type TabLocation, parseTabPath, usePageTab, usePageTabCopy, usePageTabDirty, usePageTabTitle, usePageTabs };
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import{TabStrip as e}from"../chunk-VRW5JNMR.js";import{confirm as t}from"../chunk-PDTZTADH.js";import"../chunk-VNEH2Y6H.js";import"../chunk-OSJ3ADF2.js";import"../chunk-MAIHBBWT.js";import{useShellStrings as n}from"../chunk-VVI77XNV.js";import{useBrowserLayoutEffect as r}from"../chunk-D65T4H6J.js";import*as i from"react";import{createContext as l,memo as a,useRef as c,useEffect as s,useMemo as o,useId as u,useCallback as y,useReducer as d,useContext as f}from"react";import{useLocation as p,useNavigate as k}from"react-router-dom";import{jsx as m,Fragment as b,jsxs as v}from"react/jsx-runtime";var h=l(null),g=l(null),K=12;var T=(e,t)=>e.filter(e=>e!==t);function F(e,t){return[...t.map(t=>e.find(e=>e.key===t)).filter(e=>Boolean(e)),...e.filter(e=>!t.includes(e.key))]}function N(e,t,n=12){const r=e.clock+1;let i;i=e.tabs.find(e=>e.key===t.key)?e.tabs.map(e=>e.key===t.key?{...e,path:t.path,title:"page"===e.titleFrom?e.title:t.title||e.title,lastActive:r}:e):[...e.tabs,{key:t.key,path:t.path,title:t.title,titleFrom:"route",pinned:!1,lastActive:r}];let l={...e,tabs:i,activeKey:t.key,mounted:(a=e.mounted,c=t.key,a.includes(c)?a:[...a,c]),clock:r};var a,c;return l.closing&&l.closing!==t.key?l=I(l,l.closing):l.closing===t.key&&(l={...l,closing:null}),function(e,t){let n=e;for(;n.tabs.length>t;){const e=n.tabs.filter(e=>!e.pinned&&e.key!==n.activeKey&&!n.dirty.includes(e.key)&&e.key!==n.closing).sort((e,t)=>e.lastActive-t.lastActive);if(0===e.length)break;n=I(n,e[0].key)}return n}(l,n)}function A(e){let t={...e,activeKey:null};return t.closing&&(t=I(t,t.closing)),t}function I(e,t){return{...e,tabs:e.tabs.filter(e=>e.key!==t),mounted:T(e.mounted,t),dirty:T(e.dirty,t),activeKey:e.activeKey===t?null:e.activeKey,closing:e.closing===t?null:e.closing}}function w(e,t){switch(t.type){case"visit":return N(e,t.entry,t.maxTabs);case"transient":return A(e);case"close":{let n=e;for(const e of t.keys)n=I(n,e);return t.closing?function(e,t){return{...e,closing:t}}(n,t.closing):n}case"title":return function(e,t,n){const r=e.tabs.find(e=>e.key===t);return!r||!n||r.title===n&&"page"===r.titleFrom?e:{...e,tabs:e.tabs.map(e=>e.key===t?{...e,title:n,titleFrom:"page"}:e)}}(e,t.key,t.title);case"dirty":return function(e,t,n){return n===e.dirty.includes(t)?e:{...e,dirty:n?[...e.dirty,t]:T(e.dirty,t)}}(e,t.key,t.dirty)}}var M=e=>`${e.pathname}${e.search}`;function x(e){const t=e.indexOf("#"),n=t>=0?e.slice(t):"",r=t>=0?e.slice(0,t):e,i=r.indexOf("?");return{pathname:i>=0?r.slice(0,i):r,search:i>=0?r.slice(i):"",hash:n}}function O({children:e,resolve:i,pinned:l=[],storageKey:a,maxTabs:f=12,enabled:b=!0,confirmDiscard:v}){const g=p(),K=k(),T=n().pageTabs,I=u(),O=c(i);O.current=i;const j=y(e=>{const t=O.current(e);return t?{key:t.key??e.pathname,path:M(e),title:t.title}:null},[]),[C,D]=d(w,void 0,()=>{const e=function(e,t){if(!e)return[];let n;try{n=JSON.parse(e)}catch{return[]}const r=n;if(!r||1!==r.v||!Array.isArray(r.tabs))return[];const i=[];for(const e of r.tabs){if(!e||"string"!=typeof e.path||!e.path.startsWith("/")||e.path.startsWith("//"))continue;const n=e.path.indexOf("#"),r=n>=0?e.path.slice(0,n):e.path,l=t(r);if(!l||i.some(e=>e.key===l.key))continue;const a="page"===e.titleFrom&&"string"==typeof e.title&&e.title;i.push({key:l.key,path:r,title:a||l.title,titleFrom:a?"page":"route",pinned:!1,lastActive:0})}return i}(function(e){if(!e)return null;try{return localStorage.getItem(e)}catch{return null}}(a),e=>j(x(e)));let t=function(e,t){const n=t.map(e=>e.key);let r=e.tabs.map(e=>({...e,pinned:n.includes(e.key)}));for(const e of t)r.some(t=>t.key===e.key)||(r=[...r,{key:e.key,path:e.path,title:e.title,titleFrom:"route",pinned:!0,lastActive:0}]);return{...e,tabs:F(r,n)}}({tabs:[],activeKey:null,mounted:[],dirty:[],closing:null,clock:0,tabs:e},l.map(e=>j(x(e))).filter(e=>Boolean(e)));const n=b?j(g):null;return t=n?N(t,n,f):A(t),t}),L=c(C);L.current=C;const S=c(/* @__PURE__ */new Map),$=b?j(g):null,E=$?.key??null;r(()=>{if(!b)return;const e=j(g);e?(S.current.set(e.key,g),D({type:"visit",entry:e,maxTabs:f})):D({type:"transient"})},[g,b,f,j]),s(()=>{const e=new Set(C.tabs.map(e=>e.key));for(const t of S.current.keys())e.has(t)||S.current.delete(t)},[C.tabs]);const R=o(()=>function(e){const t={v:1,tabs:e.tabs.filter(t=>t.key!==e.closing).map(({key:e,path:t,title:n,titleFrom:r})=>({key:e,path:t,title:n,titleFrom:r}))};return JSON.stringify(t)}(C),[C]);s(()=>{if(a)try{localStorage.setItem(a,R)}catch{}},[R,a]);const V=C.dirty.length>0;s(()=>{if(!V)return;const e=e=>{e.preventDefault(),e.returnValue=""};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[V]);const B=c(/* @__PURE__ */new Map),H=y((e,t)=>{let n=B.current.get(e);return void 0===n&&(n=B.current.size,B.current.set(e,n)),`${I}-page-${t}-${n}`},[I]),J=y(e=>v?v(e):t({title:T.discardTitle,message:1===e.length?T.discardOne:T.discardCount?.(e.length)??`${e.length} ${T.discardMany}`,confirmLabel:T.discardConfirm,cancelLabel:T.keepEditing,variant:"warning"}),[v,T]),W=y(()=>{const e=L.current;return e.tabs.find(e=>e.pinned)?.path??"/"},[]),P=y((e,t,n)=>{const r=L.current,i=r.activeKey;if(!i||!e.includes(i))return void D({type:"close",keys:e,closing:null});let l=t;if(!l){const t={...r,tabs:r.tabs.filter(t=>t.key===i||!e.includes(t.key))},a=n?r.tabs.find(t=>t.key===n&&!e.includes(t.key)):void 0;l=(a??function(e,t){const n=e.tabs.filter(n=>n.key!==e.closing||n.key===t),r=n.findIndex(e=>e.key===t);return r<0?null:n[r+1]??n[r-1]??null}(t,i))?.path??W()}D({type:"close",keys:e.filter(e=>e!==i),closing:i}),K(l)},[K,W]),z=y(async(e,t={})=>{const n=L.current.tabs.find(t=>t.key===e);return!n||n.pinned?(t.to&&K(t.to),!1):!(!t.force&&L.current.dirty.includes(e)&&!await J([n]))&&(!!L.current.tabs.some(t=>t.key===e)&&(P([e],t.to),!0))},[J,P,K]),X=y(async(e,t)=>{let n=function(e,t,n){const r=e.tabs.filter(e=>!e.pinned);if("all"===t)return r.map(e=>e.key);if("others"===t)return r.filter(e=>e.key!==n).map(e=>e.key);const i=e.tabs.findIndex(e=>e.key===n);return i<0?[]:e.tabs.slice(i+1).filter(e=>!e.pinned).map(e=>e.key)}(L.current,e,t);const r=L.current.tabs.filter(e=>n.includes(e.key)&&L.current.dirty.includes(e.key));r.length&&!await J(r)&&(n=n.filter(e=>!r.some(t=>t.key===e)));const i=new Set(L.current.tabs.map(e=>e.key));n=n.filter(e=>i.has(e)),n.length&&P(n,void 0,"all"===e?null:t)},[J,P]),Y=y(e=>{const t=L.current.tabs.find(t=>t.key===e);t&&e!==L.current.activeKey&&K(t.path)},[K]),Z=y((e,t)=>D({type:"title",key:e,title:t}),[]),q=y((e,t)=>D({type:"dirty",key:e,dirty:t}),[]),G=y(e=>j(e)?.key??null,[j]),Q=y(e=>S.current.get(e),[]),U=o(()=>b?C.tabs.filter(e=>e.key!==C.closing):[],[b,C.tabs,C.closing]),_=o(()=>({enabled:b,state:C,currentKey:E,resolve:i,keyFor:G,locationFor:Q,idFor:H,activate:Y,close:z,closeMany:X,setTitle:Z,setDirty:q,visibleTabs:U}),[b,C,E,i,G,Q,H,Y,z,X,Z,q,U]);/* @__PURE__ */
3
- return m(h.Provider,{value:_,children:e})}var j=i.Activity,C=Boolean(j);function D({active:e,children:t}){return j?/* @__PURE__ */m(j,{mode:e?"visible":"hidden",children:t}):/* @__PURE__ */m(b,{children:t})}var L=a(function({tabKey:e,active:t,location:n,render:i,className:l,panelId:a,tabId:u}){const y=c(null),d=c(t),f=c(/* @__PURE__ */new Map);r(()=>{const e=d.current;if(d.current=t,t&&!e)for(const[e,[t,n]]of f.current)e.isConnected?(e.scrollTop=t,e.scrollLeft=n):f.current.delete(e)},[t]),s(()=>{const e=y.current;if(!e)return;const t=e=>{if(!d.current)return;const t=e.target;t&&"number"==typeof t.scrollTop&&f.current.set(t,[t.scrollTop,t.scrollLeft])};return e.addEventListener("scroll",t,!0),()=>e.removeEventListener("scroll",t,!0)},[]);const p=o(()=>({key:e,activeRef:d}),[e]);/* @__PURE__ */
4
- return m("div",{ref:y,role:a?"tabpanel":void 0,id:a,"aria-labelledby":u,hidden:!t,style:t?void 0:{display:"none"},className:l,"data-page-tab":e,children:/* @__PURE__ */m(g.Provider,{value:p,children:/* @__PURE__ */m(D,{active:t,children:i(n)})})})},(e,t)=>e.active===t.active&&e.location===t.location&&e.className===t.className&&e.panelId===t.panelId&&e.tabId===t.tabId&&(!t.active||e.render===t.render)),S="\0transient";function $({children:e,frameClassName:t}){const n=f(h),r=p();if(!n||!n.enabled)/* @__PURE__ */
5
- return m("div",{className:t,children:e(r)},S);const{state:i,currentKey:l,locationFor:a,idFor:c}=n,s=i.tabs.filter(e=>i.mounted.includes(e.key)).map(e=>e.key);return l&&!s.includes(l)&&s.push(l),/* @__PURE__ */v(b,{children:[s.map(n=>{const i=n===l,s=i?r:a(n);return s?/* @__PURE__ */m(L,{tabKey:n,active:i,location:s,render:e,className:t,panelId:c(n,"panel"),tabId:c(n,"tab")},n):null}),!l&&/* @__PURE__ */m(L,{tabKey:S,active:!0,location:r,render:e,className:t},S)]})}function E({className:t,activeClassName:r,end:i}){const l=f(h),a=n().pageTabs;if(!l||!l.enabled)return null;const{visibleTabs:c,state:s,idFor:o,activate:u,close:y,closeMany:d,resolve:p}=l;/* @__PURE__ */
6
- return m(e,{tabs:c.map(e=>({key:e.key,title:e.title,pinned:e.pinned,dirty:s.dirty.includes(e.key),icon:p(x(e.path))?.icon})),activeKey:l.currentKey??null,idFor:o,panelMounted:e=>s.mounted.includes(e),onActivate:u,onClose:e=>{y(e)},onCloseMany:(e,t)=>{d(e,t)},label:a.label,className:t,activeClassName:r,end:i})}var R={enabled:!1,tabs:[],activeKey:null,activate:()=>{},close:async()=>!1,closeOthers:async()=>{},closeRight:async()=>{},closeAll:async()=>{}};function V(){const e=f(h);return e&&e.enabled?{enabled:!0,tabs:e.visibleTabs,activeKey:e.currentKey,activate:e.activate,close:e.close,closeOthers:t=>e.closeMany("others",t),closeRight:t=>e.closeMany("right",t),closeAll:()=>e.closeMany("all",null)}:R}function B(){const e=f(h),t=f(g),n=k();return{key:e?.enabled&&t?t.key:null,close:y(async(r={})=>e?.enabled&&t&&e.state.tabs.some(e=>e.key===t.key)?e.close(t.key,r):(r.to&&n(r.to),!1),[e,t,n])}}function H(e){const t=f(h),n=f(g),r=t?.enabled?t.setTitle:void 0,i=n?.key;s(()=>{r&&i&&e&&r(i,e)},[r,i,e])}function J(e){const t=f(h),n=f(g),r=t?.enabled?t.setDirty:void 0;s(()=>{if(r&&n)return r(n.key,e),()=>{n.activeRef.current&&r(n.key,!1)}},[r,n,e])}export{K as DEFAULT_MAX_TABS,C as PAGE_TABS_PAUSE_HIDDEN,E as PageTabBar,$ as PageTabsOutlet,O as PageTabsProvider,x as parseTabPath,B as usePageTab,J as usePageTabDirty,H as usePageTabTitle,V as usePageTabs};
2
+ import{TabStrip as e}from"../chunk-HQLEQIMG.js";import"../chunk-6KO2U66R.js";import{confirm as t}from"../chunk-GBL5KOGP.js";import"../chunk-DYVN6C2E.js";import{useBrowserLayoutEffect as n}from"../chunk-D65T4H6J.js";import"../chunk-OSJ3ADF2.js";import"../chunk-MAIHBBWT.js";import{useShellStrings as r}from"../chunk-UZUH5PVW.js";import*as i from"react";import{createContext as l,memo as c,useRef as a,useEffect as s,useMemo as o,useId as u,useCallback as y,useReducer as d,useState as f,useContext as p}from"react";import{useLocation as k,useNavigate as m}from"react-router-dom";import{jsx as b,Fragment as v,jsxs as h}from"react/jsx-runtime";var g=l(null),K=l(null),F=12;var T=(e,t)=>e.filter(e=>e!==t);function N(e,t){return[...t.map(t=>e.find(e=>e.key===t)).filter(e=>Boolean(e)),...e.filter(e=>!t.includes(e.key))]}function A(e,t,n=12){const r=e.clock+1;let i;i=e.tabs.find(e=>e.key===t.key)?e.tabs.map(e=>e.key===t.key?{...e,path:t.path,title:"page"===e.titleFrom?e.title:t.title||e.title,lastActive:r}:e):[...e.tabs,{key:t.key,path:t.path,title:t.title,titleFrom:"route",pinned:!1,lastActive:r}];let l={...e,tabs:i,activeKey:t.key,mounted:(c=e.mounted,a=t.key,c.includes(a)?c:[...c,a]),clock:r};var c,a;return l.closing&&l.closing!==t.key?l=w(l,l.closing):l.closing===t.key&&(l={...l,closing:null}),function(e,t){let n=e;for(;n.tabs.length>t;){const e=n.tabs.filter(e=>!e.pinned&&e.key!==n.activeKey&&!n.dirty.includes(e.key)&&e.key!==n.closing).sort((e,t)=>e.lastActive-t.lastActive);if(0===e.length)break;n=w(n,e[0].key)}return n}(l,n)}function I(e){let t={...e,activeKey:null};return t.closing&&(t=w(t,t.closing)),t}function w(e,t){return{...e,tabs:e.tabs.filter(e=>e.key!==t),mounted:T(e.mounted,t),dirty:T(e.dirty,t),activeKey:e.activeKey===t?null:e.activeKey,closing:e.closing===t?null:e.closing}}function M(e,t){switch(t.type){case"visit":return A(e,t.entry,t.maxTabs);case"transient":return I(e);case"close":{let n=e;for(const e of t.keys)n=w(n,e);return t.closing?function(e,t){return{...e,closing:t}}(n,t.closing):n}case"title":return function(e,t,n){const r=e.tabs.find(e=>e.key===t);return!r||!n||r.title===n&&"page"===r.titleFrom?e:{...e,tabs:e.tabs.map(e=>e.key===t?{...e,title:n,titleFrom:"page"}:e)}}(e,t.key,t.title);case"dirty":return function(e,t,n){return n===e.dirty.includes(t)?e:{...e,dirty:n?[...e.dirty,t]:T(e.dirty,t)}}(e,t.key,t.dirty)}}var C=e=>`${e.pathname}${e.search}`;function O(e){const t=e.indexOf("#"),n=t>=0?e.slice(t):"",r=t>=0?e.slice(0,t):e,i=r.indexOf("?");return{pathname:i>=0?r.slice(0,i):r,search:i>=0?r.slice(i):"",hash:n}}function x({children:e,resolve:i,pinned:l=[],storageKey:c,maxTabs:p=12,enabled:v=!0,confirmDiscard:h}){const K=k(),F=m(),T=r().pageTabs,w=u(),x=a(i);x.current=i;const L=y(e=>{const t=x.current(e);return t?{key:t.key??e.pathname,path:C(e),title:t.title}:null},[]),[j,D]=d(M,void 0,()=>{const e=function(e,t){if(!e)return[];let n;try{n=JSON.parse(e)}catch{return[]}const r=n;if(!r||1!==r.v||!Array.isArray(r.tabs))return[];const i=[];for(const e of r.tabs){if(!e||"string"!=typeof e.path||!e.path.startsWith("/")||e.path.startsWith("//"))continue;const n=e.path.indexOf("#"),r=n>=0?e.path.slice(0,n):e.path,l=t(r);if(!l||i.some(e=>e.key===l.key))continue;const c="page"===e.titleFrom&&"string"==typeof e.title&&e.title;i.push({key:l.key,path:r,title:c||l.title,titleFrom:c?"page":"route",pinned:!1,lastActive:0})}return i}(function(e){if(!e)return null;try{return localStorage.getItem(e)}catch{return null}}(c),e=>L(O(e)));let t=function(e,t){const n=t.map(e=>e.key);let r=e.tabs.map(e=>({...e,pinned:n.includes(e.key)}));for(const e of t)r.some(t=>t.key===e.key)||(r=[...r,{key:e.key,path:e.path,title:e.title,titleFrom:"route",pinned:!0,lastActive:0}]);return{...e,tabs:N(r,n)}}({tabs:[],activeKey:null,mounted:[],dirty:[],closing:null,clock:0,tabs:e},l.map(e=>L(O(e))).filter(e=>Boolean(e)));const n=v?L(K):null;return t=n?A(t,n,p):I(t),t}),E=a(j);E.current=j;const S=a(/* @__PURE__ */new Map),$=v?L(K):null,B=$?.key??null;n(()=>{if(!v)return;const e=L(K);e?(S.current.set(e.key,K),D({type:"visit",entry:e,maxTabs:p})):D({type:"transient"})},[K,v,p,L]),s(()=>{const e=new Set(j.tabs.map(e=>e.key));for(const t of S.current.keys())e.has(t)||S.current.delete(t)},[j.tabs]);const R=o(()=>function(e){const t={v:1,tabs:e.tabs.filter(t=>t.key!==e.closing).map(({key:e,path:t,title:n,titleFrom:r})=>({key:e,path:t,title:n,titleFrom:r}))};return JSON.stringify(t)}(j),[j]);s(()=>{if(c)try{localStorage.setItem(c,R)}catch{}},[R,c]);const H=j.dirty.length>0;s(()=>{if(!H)return;const e=e=>{e.preventDefault(),e.returnValue=""};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[H]);const J=a(/* @__PURE__ */new Map),P=y((e,t)=>{let n=J.current.get(e);return void 0===n&&(n=J.current.size,J.current.set(e,n)),`${w}-page-${t}-${n}`},[w]),W=y(e=>h?h(e):t({title:T.discardTitle,message:1===e.length?T.discardOne:T.discardCount?.(e.length)??`${e.length} ${T.discardMany}`,confirmLabel:T.discardConfirm,cancelLabel:T.keepEditing,variant:"warning"}),[h,T]),G=y(()=>{const e=E.current;return e.tabs.find(e=>e.pinned)?.path??"/"},[]),U=y((e,t,n)=>{const r=E.current,i=r.activeKey;if(!i||!e.includes(i))return void D({type:"close",keys:e,closing:null});let l=t;if(!l){const t={...r,tabs:r.tabs.filter(t=>t.key===i||!e.includes(t.key))},c=n?r.tabs.find(t=>t.key===n&&!e.includes(t.key)):void 0;l=(c??function(e,t){const n=e.tabs.filter(n=>n.key!==e.closing||n.key===t),r=n.findIndex(e=>e.key===t);return r<0?null:n[r+1]??n[r-1]??null}(t,i))?.path??G()}D({type:"close",keys:e.filter(e=>e!==i),closing:i}),F(l)},[F,G]),V=y(async(e,t={})=>{const n=E.current.tabs.find(t=>t.key===e);return!n||n.pinned?(t.to&&F(t.to),!1):!(!t.force&&E.current.dirty.includes(e)&&!await W([n]))&&(!!E.current.tabs.some(t=>t.key===e)&&(U([e],t.to),!0))},[W,U,F]),Q=y(async(e,t)=>{let n=function(e,t,n){const r=e.tabs.filter(e=>!e.pinned);if("all"===t)return r.map(e=>e.key);if("others"===t)return r.filter(e=>e.key!==n).map(e=>e.key);const i=e.tabs.findIndex(e=>e.key===n);return i<0?[]:e.tabs.slice(i+1).filter(e=>!e.pinned).map(e=>e.key)}(E.current,e,t);const r=E.current.tabs.filter(e=>n.includes(e.key)&&E.current.dirty.includes(e.key));r.length&&!await W(r)&&(n=n.filter(e=>!r.some(t=>t.key===e)));const i=new Set(E.current.tabs.map(e=>e.key));n=n.filter(e=>i.has(e)),n.length&&U(n,void 0,"all"===e?null:t)},[W,U]),z=y(e=>{const t=E.current.tabs.find(t=>t.key===e);t&&e!==E.current.activeKey&&F(t.path)},[F]),Y=y((e,t)=>D({type:"title",key:e,title:t}),[]),Z=y((e,t)=>D({type:"dirty",key:e,dirty:t}),[]),[q,X]=f({}),_=y((e,t)=>{X(n=>{if((n[e]??null)===t)return n;const r={...n};return t?r[e]=t:delete r[e],r})},[]),ee=y(e=>L(e)?.key??null,[L]),te=y(e=>S.current.get(e),[]),ne=o(()=>v?j.tabs.filter(e=>e.key!==j.closing):[],[v,j.tabs,j.closing]),re=o(()=>({enabled:v,state:j,currentKey:B,resolve:i,keyFor:ee,locationFor:te,idFor:P,activate:z,close:V,closeMany:Q,setTitle:Y,setDirty:Z,copies:q,setCopy:_,visibleTabs:ne}),[v,j,B,i,ee,te,P,z,V,Q,Y,Z,q,_,ne]);/* @__PURE__ */
3
+ return b(g.Provider,{value:re,children:e})}var L=i.Activity,j=Boolean(L);function D({active:e,children:t}){return L?/* @__PURE__ */b(L,{mode:e?"visible":"hidden",children:t}):/* @__PURE__ */b(v,{children:t})}var E=c(function({tabKey:e,active:t,location:r,render:i,className:l,panelId:c,tabId:u}){const y=a(null),d=a(t),f=a(/* @__PURE__ */new Map);n(()=>{const e=d.current;if(d.current=t,t&&!e)for(const[e,[t,n]]of f.current)e.isConnected?(e.scrollTop=t,e.scrollLeft=n):f.current.delete(e)},[t]),s(()=>{const e=y.current;if(!e)return;const t=e=>{if(!d.current)return;const t=e.target;t&&"number"==typeof t.scrollTop&&f.current.set(t,[t.scrollTop,t.scrollLeft])};return e.addEventListener("scroll",t,!0),()=>e.removeEventListener("scroll",t,!0)},[]);const p=o(()=>({key:e,activeRef:d}),[e]);/* @__PURE__ */
4
+ return b("div",{ref:y,role:c?"tabpanel":void 0,id:c,"aria-labelledby":u,hidden:!t,style:t?void 0:{display:"none"},className:l,"data-page-tab":e,children:/* @__PURE__ */b(K.Provider,{value:p,children:/* @__PURE__ */b(D,{active:t,children:i(r)})})})},(e,t)=>e.active===t.active&&e.location===t.location&&e.className===t.className&&e.panelId===t.panelId&&e.tabId===t.tabId&&(!t.active||e.render===t.render)),S="\0transient";function $({children:e,frameClassName:t}){const n=p(g),r=k();if(!n||!n.enabled)/* @__PURE__ */
5
+ return b("div",{className:t,children:e(r)},S);const{state:i,currentKey:l,locationFor:c,idFor:a}=n,s=i.tabs.filter(e=>i.mounted.includes(e.key)).map(e=>e.key);return l&&!s.includes(l)&&s.push(l),/* @__PURE__ */h(v,{children:[s.map(n=>{const i=n===l,s=i?r:c(n);return s?/* @__PURE__ */b(E,{tabKey:n,active:i,location:s,render:e,className:t,panelId:a(n,"panel"),tabId:a(n,"tab")},n):null}),!l&&/* @__PURE__ */b(E,{tabKey:S,active:!0,location:r,render:e,className:t},S)]})}function B({className:t,activeClassName:n,end:i}){const l=p(g),c=r().pageTabs;if(!l||!l.enabled)return null;const{visibleTabs:a,state:s,idFor:o,activate:u,close:y,closeMany:d,resolve:f}=l;/* @__PURE__ */
6
+ return b(e,{tabs:a.map(e=>({key:e.key,title:e.title,pinned:e.pinned,dirty:s.dirty.includes(e.key),copy:l.copies[e.key],icon:f(O(e.path))?.icon})),activeKey:l.currentKey??null,idFor:o,panelMounted:e=>s.mounted.includes(e),onActivate:u,onClose:e=>{y(e)},onCloseMany:(e,t)=>{d(e,t)},label:c.label,className:t,activeClassName:n,end:i})}var R={enabled:!1,tabs:[],activeKey:null,activate:()=>{},close:async()=>!1,closeOthers:async()=>{},closeRight:async()=>{},closeAll:async()=>{}};function H(){const e=p(g);return e&&e.enabled?{enabled:!0,tabs:e.visibleTabs,activeKey:e.currentKey,activate:e.activate,close:e.close,closeOthers:t=>e.closeMany("others",t),closeRight:t=>e.closeMany("right",t),closeAll:()=>e.closeMany("all",null)}:R}function J(){const e=p(g),t=p(K),n=m();return{key:e?.enabled&&t?t.key:null,close:y(async(r={})=>e?.enabled&&t&&e.state.tabs.some(e=>e.key===t.key)?e.close(t.key,r):(r.to&&n(r.to),!1),[e,t,n])}}function P(e){const t=p(g),n=p(K),r=t?.enabled?t.setTitle:void 0,i=n?.key;s(()=>{r&&i&&e&&r(i,e)},[r,i,e])}function W(e){const t=p(g),n=p(K),r=t?.enabled?t.setCopy:void 0,i=n?.key;s(()=>{if(r&&i)return r(i,e||null),()=>r(i,null)},[r,i,e])}function G(e){const t=p(g),n=p(K),r=t?.enabled?t.setDirty:void 0;s(()=>{if(r&&n)return r(n.key,e),()=>{n.activeRef.current&&r(n.key,!1)}},[r,n,e])}export{F as DEFAULT_MAX_TABS,j as PAGE_TABS_PAUSE_HIDDEN,B as PageTabBar,$ as PageTabsOutlet,x as PageTabsProvider,O as parseTabPath,J as usePageTab,W as usePageTabCopy,G as usePageTabDirty,P as usePageTabTitle,H as usePageTabs};
package/dist/pdf/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{lazy as r}from"react";var e=r(()=>import("../PdfViewer-VIT7Y55M.js"));export{e as PdfViewer};
2
+ import{lazy as r}from"react";var e=r(()=>import("../PdfViewer-UEMING6A.js"));export{e as PdfViewer};
@@ -1,4 +1,4 @@
1
- export { A as ALT, b as ALT_SHIFT_D, c as ALT_SHIFT_E, d as ALT_SHIFT_N, e as APP_UPDATE_POLL_MS, f as Accordion, g as AccordionItem, h as AccordionProps, i as Align, j as AngleScale, k as AppUpdateBanner, l as AppUpdateBannerProps, m as AttachButton, n as AttachButtonProps, o as AttachmentDropZone, p as AttachmentDropZoneProps, q as AttachmentList, r as AttachmentListProps, s as AuthScreen, t as AuthScreenProps, u as Avatar, v as AvatarGroup, w as AvatarGroupProps, x as AvatarProps, y as AvatarSize, z as AvatarStatus, B as BackgroundVariant, D as BandScale, E as Banner, F as BannerEmphasis, G as BannerProps, H as BannerTone, I as BarChart, J as BarChartProps, K as BoxPlotBox, L as BoxPlotChart, M as BoxPlotChartProps, N as BrandAssetEditor, O as BrandAssetEditorProps, Q as BrandAssetPreview, R as BrandMark, T as BrandMarkProps, U as BrandMarkSlot, V as BrandMarkSurface, W as BrandMarkTreatment, X as BreadcrumbItem, Y as Breadcrumbs, Z as BreadcrumbsProps, _ as BudgetBar, $ as BudgetBarProps, a0 as BudgetState, a1 as Button, a2 as ButtonClassesOptions, a3 as ButtonProps, a4 as ButtonSize, a5 as ButtonVariant, a6 as CHART_INK, a7 as CMD_A, a8 as CMD_DOT, a9 as CMD_ENTER, aa as CMD_K, ab as CMD_S, ac as Calendar, ad as CalendarMode, ae as CalendarProps, af as Candle, ag as CandlestickChart, ah as CandlestickChartProps, ai as Card, aj as CardPadding, ak as CardProps, al as CartesianPlot, am as CartesianPlotProps, an as CellStyle, ao as ChartBackgroundVariant, ap as ChartBrush, aq as ChartBrushProps, ar as ChartCurve, as as ChartDefs, at as ChartDefsProps, au as ChartDot, av as ChartDotProps, aw as ChartDotVariant, ax as ChartFillVariant, ay as ChartFrame, az as ChartFrameProps, aA as ChartHighlightProvider, aB as ChartLegendEntry, aC as ChartLegendSwatch, aD as ChartRange, aE as ChartReferenceLine, aF as ChartRevealDirection, aG as ChartSkeleton, aH as ChartSkeletonProps, aI as ChartStatusTone, aJ as ChartStrokeVariant, aK as ChartTooltip, aL as ChartTooltipProps, aM as ChartTooltipRow, aN as ChatTemplate, aO as Checkbox, aP as CheckboxProps, aQ as CheckoutTemplate, aR as ChordChart, aS as ChordChartProps, aT as ColoredBadge, aU as ColoredBadgeProps, aV as ColumnChart, aW as ColumnChartProps, C as ColumnDef, aX as ColumnSeries, aY as ComposerAttachments, aZ as ComposerAttachmentsProps, a_ as ConfirmProvider, a$ as ContainerFillChart, b0 as ContainerFillChartProps, b1 as ContainerFillItem, b2 as CountBadge, b3 as CountBadgeProps, b4 as CountBadgeTone, b5 as Curve, b6 as DAY_MS, b7 as DEFAULT_SHELL_STRINGS, b8 as DashboardTemplate, b9 as DataTable, ba as DataTableColumn, bb as DataTableColumnGroup, bc as DataTableHeader, bd as DataTablePage, be as DataTableProps, bf as DataTableRowLink, bg as DataTableRowProps, bh as DatePicker, bi as DatePickerProps, bj as DateRangePicker, bk as DateRangePickerProps, bl as DateTimePicker, bm as DateTimePickerProps, bn as DescriptionColumns, bo as DescriptionItem, bp as DescriptionList, bq as DescriptionListProps, br as Dialog, bs as DialogProps, bt as DialogSize, bu as Divider, bv as DividerProps, bw as DividerSpacing, bx as DonutChart, by as DonutChartProps, bz as DonutSegment, bA as Drawer, bB as DrawerProps, bC as DrawerSide, bD as DrawerSize, bE as DropdownMenu, bF as DropdownMenuAlign, bG as DropdownMenuCheckboxItem, bH as DropdownMenuDividerItem, bI as DropdownMenuEntry, bJ as DropdownMenuItem, bK as DropdownMenuLabelItem, bL as DropdownMenuLinkItem, bM as DropdownMenuProps, bN as DropdownMenuRadioItem, bO as DropdownMenuSide, bP as DropdownPositionOptions, bQ as ENTER, bR as EditableGrid, bS as EditableGridProps, bT as EmailTemplate, bU as EmptyState, bV as EmptyStateProps, bW as EmptyValue, bX as EmptyValueProps, bY as ErrorBoundary, bZ as ErrorBoundaryProps, b_ as ErrorPage, b$ as ErrorPageProps, c0 as FileIntake, c1 as FilePicker, c2 as FilePickerProps, c3 as FillVariant, c4 as FormError, c5 as FormErrorSummary, c6 as FormErrorSummaryProps, c7 as FormField, c8 as FormFieldProps, c9 as FormLayoutPage, ca as FunnelChart, cb as FunnelChartProps, cc as FunnelStage, cd as GLASS_DIVIDER, cf as GROUP_COLORS, cg as GROUP_COLORS_SOLID, ch as GalleryTemplate, ci as Gap, cj as GlassOptions, ck as GlobalSearch, cl as GlobalSearchProps, cm as Grid, cn as GridCols, co as GridColumn, cp as GridProps, cq as HeatmapChart, cr as HeatmapChartProps, cs as HelpCenter, ct as HelpCenterDoc, cu as HelpCenterProps, cv as HistogramBin, cw as HistogramChart, cx as HistogramChartProps, cy as INPUT_BASE, cz as INPUT_SIZES, cA as IconButton, cB as IconButtonClassesOptions, cC as IconButtonProps, cD as Inline, cE as InlineProps, cF as Input, cG as InputNumber, cH as InputNumberProps, cI as InputProps, cJ as InputSize, cK as Justify, cL as Kanban, cM as KanbanColumn, cN as KanbanProps, cO as Kbd, cP as KbdProps, cQ as KbdSize, cR as Label, cS as LabelClassesOptions, cT as LabelProps, cU as LadderScale, cV as LineChart, cW as LineChartProps, cX as LineChartSeries, cY as LinearScale, cZ as ListFooter, c_ as ListLoadError, c$ as ListLoadErrorProps, d0 as LoadingSpinner, d1 as LoadingSpinnerProps, d2 as MAX_FRACTION_DIGITS, d3 as MENU_MAX_HEIGHT, d4 as MOD, d5 as MOTION, d6 as Markdown, d6 as MarkdownLite, d7 as MarkdownLiteProps, d7 as MarkdownProps, d8 as MediaUploadField, d9 as MediaUploadFieldProps, da as MediaUploadGrid, db as MediaUploadGridItem, dc as MediaUploadGridProps, dd as MenuPos, de as Meter, df as MeterProps, dg as MetricBar, dh as MetricBarProps, di as Milestone, dj as MilestoneKind, dk as MilestoneTimeline, dl as MilestoneTimelineProps, dm as NEXT_CHUNK_PATH_PREFIX, dn as NativeSelect, dp as NumericKeypad, dq as NumericKeypadProps, dr as OVERLAY_OPEN_EVENT, ds as POPUP_MAX_WIDTH, dt as POST_PRODUCTION_STATUSES, du as PageHeader, dv as PageHeaderProps, P as PaginatedResponse, dw as Pagination, dx as PaginationProps, dy as PaperclipGlyph, dz as Paragraph, dA as ParagraphProps, dB as PieChart, dC as PieChartProps, dD as PieSegment, dE as PlotGeometry, dF as Point, dG as Popover, dH as PopoverAlign, dI as PopoverProps, dJ as PopoverRenderProps, dK as PopoverSide, dL as PopupMenu, dM as PopupMenuDivider, dN as PopupMenuItem, dO as PopupMenuItemProps, dP as PopupMenuLabel, dQ as PopupMenuProps, dR as PopupSubmenu, dS as PopupSubmenuProps, dT as PortalBrandingContextValue, dU as PortalBrandingProvider, dV as PortalBrandingProviderProps, dW as ProductionTimeline, dX as ProductionTimelineProps, dY as ProductionTimelineSnapshot, dZ as ProgressItem, d_ as PublicPortal, d$ as PublicPortalBranding, e0 as RADAR_SERIES_CAP, e1 as RadarAxis, e2 as RadarChart, e3 as RadarChartProps, e4 as RadarSeries, e5 as RadialBarChart, e6 as RadialBarChartProps, e7 as RadialBarRow, e8 as Radio, e9 as RadioGroup, ea as RadioGroupOption, eb as RadioGroupOrientation, ec as RadioGroupProps, ed as RadioProps, ee as Range, ef as RangeChart, eg as RangeChartProps, eh as RangeRow, ei as RankedBars, ej as RankedBarsProps, ek as RankedBarsRow, el as ResolvedPortalBrandAsset, em as Result, en as ResultProps, eo as ResultStatus, ep as RevealDirection, eq as SCATTER_SERIES_CAP, er as SERIES_SLOT_COUNT, es as SERIES_VARS, et as SHIFT, eu as STAGES, ev as STALE_CHUNK_RELOAD_COOLDOWN_MS, ew as STALE_CHUNK_RELOAD_KEY, ex as STATUS_VARS, ey as SankeyChart, ez as SankeyChartProps, eA as SankeyLink, eB as SankeyNode, eC as ScatterChart, eD as ScatterChartProps, eE as ScatterPoint, eF as ScatterSeries, S as SearchConfig, eG as SearchProvider, eH as SearchResult, eI as SearchableOption, eJ as SearchableSelect, eK as SearchableSelectProps, eL as Segmented, eM as SegmentedOption, eN as SegmentedProps, eO as SegmentedSize, eP as Select, eQ as SelectOption, eR as SelectProps, eS as SemanticGroup, eT as SettingRow, eU as SettingRowProps, eV as SeverityTone, eW as ShellPrefsAdapter, eX as ShellPrefsProvider, eY as ShellStrings, eZ as ShellStringsOverride, e_ as ShellStringsProvider, e$ as SidebarActionButton, f0 as SidebarActionButtonProps, f1 as SidebarGroupLabel, f2 as SidebarGroupLabelProps, f3 as SidebarLayout, f4 as SidebarLayoutProps, f5 as SidebarNavGroup, f6 as SidebarNavGroupProps, f7 as SidebarNavItem, f8 as SidebarNavItemProps, f9 as Skeleton, fa as SkeletonProps, fb as SkeletonVariant, fc as Snippet, fd as SnippetProps, fe as SnippetSize, ff as SnippetVariant, a as SortState, fg as Sparkline, fh as SparklineProps, fi as Stack, fj as StackProps, fk as StaleChunkReloadOptions, fl as StatCard, fm as StatCardProps, fn as StatTile, fo as StatTileProps, fp as Statistic, fq as StatisticProps, fr as StatisticSize, fs as StatisticTone, ft as StatusBadge, fu as StatusBadgeProvider, fv as StatusEmphasis, fw as StepItem, fx as Stepper, fy as StepperProps, fz as StrokeVariant, fA as SunburstChart, fB as SunburstChartProps, fC as SunburstNode, fD as Switch, fE as SwitchProps, fF as SwitchSize, fG as TabItem, fH as Tabs, fI as TabsProps, fJ as TagInput, fK as TagInputOption, fL as TagInputProps, fM as Text, fN as TextProps, fO as TextSize, fP as TextTone, fQ as TextWeight, fR as Textarea, fS as TextareaProps, fT as Theme, fU as TileButton, fV as TileButtonProps, fW as TileSize, fX as TimeAgo, fY as TimeAgoProps, fZ as TimePicker, f_ as TimePickerProps, f$ as TimeSeriesChart, g0 as TimeSeriesChartProps, g1 as TimeSeriesSeries, g2 as TimelineMarker, g3 as TimelineMarkerKind, g4 as TimelineReport, g5 as TimelineScrubProgress, g6 as TimelineTrack, g7 as TimelineTrackItem, g8 as TimelineTrackKind, g9 as TimelineTrackPending, ga as TimelineTrackPhase, gb as TimelineTrackPlayback, gc as TimelineTrackProps, gd as TimelineTrackThumb, ge as Title, gf as TitleLevel, gg as TitleProps, gh as ToastOptions, gi as ToastPlacement, gj as Tooltip, gk as TooltipProps, gl as TopNav, gm as TopNavItem, gn as TopNavProps, go as TreemapChart, gp as TreemapChartProps, gq as TreemapItem, gr as TreemapTile, gs as UseAppUpdateOptions, gt as UseProductionTimelineOpts, gu as VERSION, gv as VITE_PRELOAD_ERROR_EVENT, gw as WaterfallChart, gx as WaterfallChartProps, gy as WaterfallStep, gz as ZLayer, gA as Z_LAYERS, gB as angleScale, gC as appendKey, gD as applyThemePrefs, gE as arcPath, gF as areaBetween, gG as areaFrom, gH as autoHighlightIndex, gI as backspace, gJ as bandScale, gK as binValues, gL as budgetState, gM as bumpPath, gN as buttonClasses, gO as calcOverall, gP as calcReportOverall, gQ as confirm, gR as confirmDestructive, gS as curvePath, gT as dashFor, gU as dismissPopups, gV as fillFor, gW as fillId, gX as fmtSliderDate, gY as fromDateKey, gZ as glassStyle, g_ as glowId, g$ as groundId, h0 as groupColors, h1 as highlightOpacity, h2 as iconButtonClasses, h3 as inputClasses, h4 as installStaleChunkReload, h5 as isMac, h6 as isSeverityTone, h7 as isStaleChunkError, h8 as labelClasses, h9 as ladderScale, ha as linearPath, hb as linearScale, hc as logScale, hd as maskId, he as mediaFileName, hf as monotonePath, hg as niceMax, hh as openGlobalSearch, hi as polygonPoints, hj as popupBounds, hk as prompt, hl as radiusScale, hm as resolveBrandMarkTreatment, hn as resolvePortalBrandAsset, ho as resolveSeriesColor, hp as resolveTheme, hq as seriesColor, hr as severityOf, hs as splinePath, ht as squarify, hu as stagger, hv as stepPath, hw as tabButtonId, hx as tabPanelId, hy as toDateKey, hz as toDayMs, hA as toISODate, hB as toast, hC as useAppUpdate, hD as useClickOutside, hE as useConfirm, hF as useDebouncedValue, hG as useDropdownPosition, hH as useFocusTrap, hI as useHighlight, hJ as useIsMobile, hK as useLocalStoragePrefs, hL as usePlotWidth, hM as usePortalBranding, hN as useProductionTimeline, hO as useScrollLock, hP as useShellLocale, hQ as useShellPrefs, hR as useShellStrings, hS as useTheme } from '../index-Brl0XepS.js';
1
+ export { A as ALT, b as ALT_SHIFT_D, c as ALT_SHIFT_E, d as ALT_SHIFT_N, e as APP_UPDATE_POLL_MS, f as Accordion, g as AccordionItem, h as AccordionProps, i as Align, j as AngleScale, k as AppUpdateBanner, l as AppUpdateBannerProps, m as AttachButton, n as AttachButtonProps, o as AttachmentDropZone, p as AttachmentDropZoneProps, q as AttachmentList, r as AttachmentListProps, s as AuthScreen, t as AuthScreenProps, u as Avatar, v as AvatarGroup, w as AvatarGroupProps, x as AvatarProps, y as AvatarSize, z as AvatarStatus, B as BackgroundVariant, D as BandScale, E as Banner, F as BannerEmphasis, G as BannerProps, H as BannerTone, I as BarChart, J as BarChartProps, K as BoxPlotBox, L as BoxPlotChart, M as BoxPlotChartProps, N as BrandAssetEditor, O as BrandAssetEditorProps, Q as BrandAssetPreview, R as BrandMark, T as BrandMarkProps, U as BrandMarkSlot, V as BrandMarkSurface, W as BrandMarkTreatment, X as BreadcrumbItem, Y as Breadcrumbs, Z as BreadcrumbsProps, _ as BudgetBar, $ as BudgetBarProps, a0 as BudgetState, a1 as Button, a2 as ButtonClassesOptions, a3 as ButtonProps, a4 as ButtonSize, a5 as ButtonVariant, a6 as CHART_INK, a7 as CMD_A, a8 as CMD_DOT, a9 as CMD_ENTER, aa as CMD_K, ab as CMD_S, ac as Calendar, ad as CalendarMode, ae as CalendarProps, af as Candle, ag as CandlestickChart, ah as CandlestickChartProps, ai as Card, aj as CardPadding, ak as CardProps, al as CartesianPlot, am as CartesianPlotProps, an as CellStyle, ao as ChartBackgroundVariant, ap as ChartBrush, aq as ChartBrushProps, ar as ChartCurve, as as ChartDefs, at as ChartDefsProps, au as ChartDot, av as ChartDotProps, aw as ChartDotVariant, ax as ChartFillVariant, ay as ChartFrame, az as ChartFrameProps, aA as ChartHighlightProvider, aB as ChartLegendEntry, aC as ChartLegendSwatch, aD as ChartRange, aE as ChartReferenceLine, aF as ChartRevealDirection, aG as ChartSkeleton, aH as ChartSkeletonProps, aI as ChartStatusTone, aJ as ChartStrokeVariant, aK as ChartTooltip, aL as ChartTooltipProps, aM as ChartTooltipRow, aN as ChatTemplate, aO as Checkbox, aP as CheckboxProps, aQ as CheckoutTemplate, aR as ChordChart, aS as ChordChartProps, aT as ColoredBadge, aU as ColoredBadgeProps, aV as ColumnChart, aW as ColumnChartProps, C as ColumnDef, aX as ColumnSeries, aY as ComposerAttachments, aZ as ComposerAttachmentsProps, a_ as ConfirmProvider, a$ as ContainerFillChart, b0 as ContainerFillChartProps, b1 as ContainerFillItem, b2 as CountBadge, b3 as CountBadgeProps, b4 as CountBadgeTone, b5 as Curve, b6 as DAY_MS, b7 as DEFAULT_SHELL_STRINGS, b8 as DashboardTemplate, b9 as DataTable, ba as DataTableColumn, bb as DataTableColumnGroup, bc as DataTableHeader, bd as DataTablePage, be as DataTableProps, bf as DataTableRowLink, bg as DataTableRowProps, bh as DatePicker, bi as DatePickerProps, bj as DateRangePicker, bk as DateRangePickerProps, bl as DateTimePicker, bm as DateTimePickerProps, bn as DescriptionColumns, bo as DescriptionItem, bp as DescriptionList, bq as DescriptionListProps, br as Dialog, bs as DialogProps, bt as DialogSize, bu as Divider, bv as DividerProps, bw as DividerSpacing, bx as DonutChart, by as DonutChartProps, bz as DonutSegment, bA as Drawer, bB as DrawerProps, bC as DrawerSide, bD as DrawerSize, bE as DropdownMenu, bF as DropdownMenuAlign, bG as DropdownMenuCheckboxItem, bH as DropdownMenuDividerItem, bI as DropdownMenuEntry, bJ as DropdownMenuItem, bK as DropdownMenuLabelItem, bL as DropdownMenuLinkItem, bM as DropdownMenuProps, bN as DropdownMenuRadioItem, bO as DropdownMenuSide, bP as DropdownPositionOptions, bQ as ENTER, bR as EditableGrid, bS as EditableGridProps, bT as EmailTemplate, bU as EmptyState, bV as EmptyStateProps, bW as EmptyValue, bX as EmptyValueProps, bY as ErrorBoundary, bZ as ErrorBoundaryProps, b_ as ErrorPage, b$ as ErrorPageProps, c0 as FileIntake, c1 as FilePicker, c2 as FilePickerProps, c3 as FillVariant, c4 as FormError, c5 as FormErrorSummary, c6 as FormErrorSummaryProps, c7 as FormField, c8 as FormFieldProps, c9 as FormLayoutPage, ca as FunnelChart, cb as FunnelChartProps, cc as FunnelStage, cd as GLASS_DIVIDER, cf as GROUP_COLORS, cg as GROUP_COLORS_SOLID, ch as GalleryTemplate, ci as Gap, cj as GlassOptions, ck as GlobalSearch, cl as GlobalSearchProps, cm as Grid, cn as GridCols, co as GridColumn, cp as GridProps, cq as HeatmapChart, cr as HeatmapChartProps, cs as HelpCenter, ct as HelpCenterDoc, cu as HelpCenterProps, cv as HistogramBin, cw as HistogramChart, cx as HistogramChartProps, cy as INPUT_BASE, cz as INPUT_SIZES, cA as IconButton, cB as IconButtonClassesOptions, cC as IconButtonProps, cD as Inline, cE as InlineProps, cF as Input, cG as InputNumber, cH as InputNumberProps, cI as InputProps, cJ as InputSize, cK as Justify, cL as Kanban, cM as KanbanColumn, cN as KanbanProps, cO as Kbd, cP as KbdProps, cQ as KbdSize, cR as Label, cS as LabelClassesOptions, cT as LabelProps, cU as LadderScale, cV as LineChart, cW as LineChartProps, cX as LineChartSeries, cY as LinearScale, cZ as ListFooter, c_ as ListLoadError, c$ as ListLoadErrorProps, d0 as LoadingSpinner, d1 as LoadingSpinnerProps, d2 as MAX_FRACTION_DIGITS, d3 as MENU_MAX_HEIGHT, d4 as MOD, d5 as MOTION, d6 as Markdown, d6 as MarkdownLite, d7 as MarkdownLiteProps, d7 as MarkdownProps, d8 as MediaUploadField, d9 as MediaUploadFieldProps, da as MediaUploadGrid, db as MediaUploadGridItem, dc as MediaUploadGridProps, dd as MenuPos, de as Meter, df as MeterProps, dg as MetricBar, dh as MetricBarProps, di as Milestone, dj as MilestoneKind, dk as MilestoneTimeline, dl as MilestoneTimelineProps, dm as NEXT_CHUNK_PATH_PREFIX, dn as NativeSelect, dp as NumericKeypad, dq as NumericKeypadProps, dr as OVERLAY_OPEN_EVENT, ds as POPUP_MAX_WIDTH, dt as POST_PRODUCTION_STATUSES, du as PageHeader, dv as PageHeaderProps, P as PaginatedResponse, dw as Pagination, dx as PaginationProps, dy as PaperclipGlyph, dz as Paragraph, dA as ParagraphProps, dB as PieChart, dC as PieChartProps, dD as PieSegment, dE as PlotGeometry, dF as Point, dG as Popover, dH as PopoverAlign, dI as PopoverProps, dJ as PopoverRenderProps, dK as PopoverSide, dL as PopupMenu, dM as PopupMenuDivider, dN as PopupMenuItem, dO as PopupMenuItemProps, dP as PopupMenuLabel, dQ as PopupMenuProps, dR as PopupSubmenu, dS as PopupSubmenuProps, dT as PortalBrandingContextValue, dU as PortalBrandingProvider, dV as PortalBrandingProviderProps, dW as ProductionTimeline, dX as ProductionTimelineProps, dY as ProductionTimelineSnapshot, dZ as ProgressItem, d_ as PublicPortal, d$ as PublicPortalBranding, e0 as RADAR_SERIES_CAP, e1 as RadarAxis, e2 as RadarChart, e3 as RadarChartProps, e4 as RadarSeries, e5 as RadialBarChart, e6 as RadialBarChartProps, e7 as RadialBarRow, e8 as Radio, e9 as RadioGroup, ea as RadioGroupOption, eb as RadioGroupOrientation, ec as RadioGroupProps, ed as RadioProps, ee as Range, ef as RangeChart, eg as RangeChartProps, eh as RangeRow, ei as RankedBars, ej as RankedBarsProps, ek as RankedBarsRow, el as ResolvedPortalBrandAsset, em as Result, en as ResultProps, eo as ResultStatus, ep as RevealDirection, eq as SCATTER_SERIES_CAP, er as SERIES_SLOT_COUNT, es as SERIES_VARS, et as SHIFT, eu as STAGES, ev as STALE_CHUNK_RELOAD_COOLDOWN_MS, ew as STALE_CHUNK_RELOAD_KEY, ex as STATUS_VARS, ey as SankeyChart, ez as SankeyChartProps, eA as SankeyLink, eB as SankeyNode, eC as ScatterChart, eD as ScatterChartProps, eE as ScatterPoint, eF as ScatterSeries, S as SearchConfig, eG as SearchListRoute, eH as SearchProvider, eI as SearchQuickAction, eJ as SearchResponse, eK as SearchResult, eL as SearchableOption, eM as SearchableSelect, eN as SearchableSelectProps, eO as Segmented, eP as SegmentedOption, eQ as SegmentedProps, eR as SegmentedSize, eS as Select, eT as SelectOption, eU as SelectProps, eV as SemanticGroup, eW as SettingRow, eX as SettingRowProps, eY as SeverityTone, eZ as ShellPrefsAdapter, e_ as ShellPrefsProvider, e$ as ShellStrings, f0 as ShellStringsOverride, f1 as ShellStringsProvider, f2 as SidebarActionButton, f3 as SidebarActionButtonProps, f4 as SidebarGroupLabel, f5 as SidebarGroupLabelProps, f6 as SidebarLayout, f7 as SidebarLayoutProps, f8 as SidebarNavGroup, f9 as SidebarNavGroupProps, fa as SidebarNavItem, fb as SidebarNavItemProps, fc as Skeleton, fd as SkeletonProps, fe as SkeletonVariant, ff as Snippet, fg as SnippetProps, fh as SnippetSize, fi as SnippetVariant, a as SortState, fj as Sparkline, fk as SparklineProps, fl as Stack, fm as StackProps, fn as StaleChunkReloadOptions, fo as StatCard, fp as StatCardProps, fq as StatTile, fr as StatTileProps, fs as Statistic, ft as StatisticProps, fu as StatisticSize, fv as StatisticTone, fw as StatusBadge, fx as StatusBadgeProvider, fy as StatusEmphasis, fz as StepItem, fA as Stepper, fB as StepperProps, fC as StrokeVariant, fD as SunburstChart, fE as SunburstChartProps, fF as SunburstNode, fG as Switch, fH as SwitchProps, fI as SwitchSize, fJ as TabItem, fK as Tabs, fL as TabsProps, fM as TagInput, fN as TagInputOption, fO as TagInputProps, fP as Text, fQ as TextProps, fR as TextSize, fS as TextTone, fT as TextWeight, fU as Textarea, fV as TextareaProps, fW as Theme, fX as TileButton, fY as TileButtonProps, fZ as TileSize, f_ as TimeAgo, f$ as TimeAgoProps, g0 as TimePicker, g1 as TimePickerProps, g2 as TimeSeriesChart, g3 as TimeSeriesChartProps, g4 as TimeSeriesSeries, g5 as TimelineMarker, g6 as TimelineMarkerKind, g7 as TimelineReport, g8 as TimelineScrubProgress, g9 as TimelineTrack, ga as TimelineTrackItem, gb as TimelineTrackKind, gc as TimelineTrackPending, gd as TimelineTrackPhase, ge as TimelineTrackPlayback, gf as TimelineTrackProps, gg as TimelineTrackThumb, gh as Title, gi as TitleLevel, gj as TitleProps, gk as ToastOptions, gl as ToastPlacement, gm as Tooltip, gn as TooltipProps, go as TopNav, gp as TopNavItem, gq as TopNavProps, gr as TreemapChart, gs as TreemapChartProps, gt as TreemapItem, gu as TreemapTile, gv as UseAppUpdateOptions, gw as UseProductionTimelineOpts, gx as VERSION, gy as VITE_PRELOAD_ERROR_EVENT, gz as WaterfallChart, gA as WaterfallChartProps, gB as WaterfallStep, gC as ZLayer, gD as Z_LAYERS, gE as angleScale, gF as appendKey, gG as applyThemePrefs, gH as arcPath, gI as areaBetween, gJ as areaFrom, gK as autoHighlightIndex, gL as backspace, gM as bandScale, gN as binValues, gO as budgetState, gP as bumpPath, gQ as buttonClasses, gR as calcOverall, gS as calcReportOverall, gT as confirm, gU as confirmDestructive, gV as curvePath, gW as dashFor, gX as dismissPopups, gY as fillFor, gZ as fillId, g_ as fmtSliderDate, g$ as fromDateKey, h0 as glassStyle, h1 as glowId, h2 as groundId, h3 as groupColors, h4 as highlightOpacity, h5 as iconButtonClasses, h6 as inputClasses, h7 as installStaleChunkReload, h8 as isMac, h9 as isSeverityTone, ha as isStaleChunkError, hb as labelClasses, hc as ladderScale, hd as linearPath, he as linearScale, hf as logScale, hg as maskId, hh as mediaFileName, hi as monotonePath, hj as niceMax, hk as openGlobalSearch, hl as polygonPoints, hm as popupBounds, hn as prompt, ho as pushRecentSearch, hp as radiusScale, hq as resolveBrandMarkTreatment, hr as resolvePortalBrandAsset, hs as resolveSeriesColor, ht as resolveTheme, hu as sanitizeRecentSearches, hv as seriesColor, hw as severityOf, hx as splinePath, hy as squarify, hz as stagger, hA as stepPath, hB as tabButtonId, hC as tabPanelId, hD as toDateKey, hE as toDayMs, hF as toISODate, hG as toast, hH as useAppUpdate, hI as useClickOutside, hJ as useConfirm, hK as useDebouncedValue, hL as useDropdownPosition, hM as useFocusTrap, hN as useHighlight, hO as useIsMobile, hP as useLocalStoragePrefs, hQ as usePlotWidth, hR as usePortalBranding, hS as useProductionTimeline, hT as useScrollLock, hU as useShellLocale, hV as useShellPrefs, hW as useShellStrings, hX as useTheme } from '../index-DYVoKNru.js';
2
2
  export { FileIntakeAlert, FileIntakeLimits, FileIntakeOptions, FileRejection, FileRejectionReason, acceptsFile, useFileIntake } from '../file-intake/index.js';
3
3
  export { C as CurrencyFormat, D as DATE_FORMAT_OPTIONS, a as DateFormatKey, E as EMPTY_VALUE, F as FormatDateOptions, b as FormatMoneyOptions, T as TZ_AUTO, c as TimeAgoOptions, d as currencyDecimals, e as currencySymbol, f as firstDayOfWeek, g as formatBytes, h as formatDate, i as formatDateTime, j as formatMoney, k as formatTime, l as getUserDateFormat, m as getUserTimezone, s as setCurrencyFormats, n as setUserDateFormat, o as setUserTimezone, p as syncTimezoneFromProfile, t as timeAgo } from '../index-DCUzlKPZ.js';
4
4
  import 'react';
package/dist/ui/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{APP_UPDATE_POLL_MS,Accordion,AppUpdateBanner,AttachButton,AttachmentDropZone,AttachmentList,AuthScreen,Avatar,AvatarGroup,Banner,BarChart,BoxPlotChart,BrandAssetEditor,BudgetBar,CHART_INK,Calendar,CandlestickChart,Card,CartesianPlot,ChartBrush,ChartDefs,ChartDot,ChartFrame,ChartHighlightProvider,ChartSkeleton,ChartTooltip,ChatTemplate,Checkbox_default as Checkbox,CheckoutTemplate,ChordChart,ColoredBadge,ColumnChart,ComposerAttachments,ContainerFillChart,CountBadge,DAY_MS,DashboardTemplate,DataTable,DataTablePage,DatePicker_default as DatePicker,DateRangePicker,DateTimePicker_default as DateTimePicker,DescriptionList,Divider,DonutChart,Drawer,DropdownMenu,EmailTemplate,EmptyState,EmptyValue,ErrorBoundary,ErrorPage,FilePicker_default as FilePicker,FormErrorSummary,FormField,FormLayoutPage,FunnelChart,GROUP_COLORS,GROUP_COLORS_SOLID,GalleryTemplate,Grid,HeatmapChart,HelpCenter,HistogramChart,INPUT_BASE,INPUT_SIZES,IconButton_default as IconButton,Inline,Input_default as Input,InputNumber_default as InputNumber,Kanban,Label,LineChart,ListFooter,ListLoadError,MAX_FRACTION_DIGITS,MENU_MAX_HEIGHT,MOTION,Markdown,Markdown as MarkdownLite,MediaUploadField,MediaUploadGrid,Meter,MetricBar,MilestoneTimeline,NativeSelect,NumericKeypad,POPUP_MAX_WIDTH,POST_PRODUCTION_STATUSES,PageHeader,Pagination,PaperclipGlyph,Paragraph,PieChart,Popover,PortalBrandingProvider,ProductionTimeline,RADAR_SERIES_CAP,RadarChart,RadialBarChart,Radio_default as Radio,RadioGroup,RangeChart,RankedBars,SCATTER_SERIES_CAP,SERIES_SLOT_COUNT,SERIES_VARS,STAGES,STATUS_VARS,SankeyChart,ScatterChart,SearchableSelect,Segmented,Select_default as Select,SettingRow,SidebarActionButton,SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,Skeleton,Snippet,Sparkline,Stack,StatCard,StatTile,Statistic,StatusBadge,StatusBadgeProvider,Stepper,SunburstChart,Switch_default as Switch,Tabs,TagInput,Text,Textarea_default as Textarea,TileButton_default as TileButton,TimeAgo,TimePicker_default as TimePicker,TimeSeriesChart,TimelineTrack,Title,Tooltip,TopNav,TreemapChart,WaterfallChart,angleScale,appendKey,applyThemePrefs,arcPath,areaBetween,areaFrom,autoHighlightIndex,backspace,bandScale,binValues,budgetState,bumpPath,calcOverall,calcReportOverall,curvePath,dashFor,fillFor,fillId,fmtSliderDate,fromKey as fromDateKey,glowId,groundId,groupColors,highlightOpacity,inputClasses,isSeverityTone,labelClasses,ladderScale,linearPath,linearScale,logScale,maskId,mediaFileName,monotonePath,niceMax,polygonPoints,popupBounds,radiusScale,resolvePortalBrandAsset,resolveSeriesColor,resolveTheme,seriesColor,severityOf,splinePath,squarify,stagger,stepPath,tabButtonId,tabPanelId,toKey as toDateKey,toDayMs,toISODate,useAppUpdate,useClickOutside,useDebouncedValue,useDropdownPosition,useHighlight,usePlotWidth,usePortalBranding,useProductionTimeline,useTheme}from"../chunk-LCB4IVEL.js";export{Breadcrumbs}from"../chunk-26RS37FG.js";export{SidebarLayout}from"../chunk-KASHUEJV.js";export{BrandMark,GlobalSearch,openGlobalSearch,resolveBrandMarkTreatment}from"../chunk-JK3IIJN5.js";export{EditableGrid}from"../chunk-XN76YBX3.js";import"../chunk-BR22X7E5.js";export{toast_default as toast}from"../chunk-B2TBCVHH.js";export{VERSION}from"../chunk-GF2XCISN.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,LoadingSpinner,MOD,NEXT_CHUNK_PATH_PREFIX,Result,SHIFT,STALE_CHUNK_RELOAD_COOLDOWN_MS,STALE_CHUNK_RELOAD_KEY,ShellPrefsProvider,VITE_PRELOAD_ERROR_EVENT,installStaleChunkReload,isMac,isStaleChunkError,useIsMobile,useLocalStoragePrefs,useShellPrefs}from"../chunk-T6MKFQRH.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-FHIF6IUV.js";export{DATE_FORMAT_OPTIONS,EMPTY_VALUE,TZ_AUTO,currencyDecimals,currencySymbol,firstDayOfWeek,formatBytes,formatDate,formatDateTime,formatMoney,formatTime,getUserDateFormat,getUserTimezone,setCurrencyFormats,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile,timeAgo}from"../chunk-S2AZZGFF.js";export{Button_default as Button,buttonClasses,iconButtonClasses}from"../chunk-PH3PRIFP.js";export{ConfirmProvider,Dialog,confirm,confirmDestructive,prompt,useConfirm,useFocusTrap,useScrollLock}from"../chunk-PDTZTADH.js";export{GLASS_DIVIDER,PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu,glassStyle}from"../chunk-VNEH2Y6H.js";export{OVERLAY_OPEN_EVENT,Z_LAYERS,dismissPopups}from"../chunk-OSJ3ADF2.js";import"../chunk-MAIHBBWT.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-VVI77XNV.js";import"../chunk-D65T4H6J.js";
2
+ export{APP_UPDATE_POLL_MS,Accordion,AppUpdateBanner,AttachButton,AttachmentDropZone,AttachmentList,AuthScreen,Avatar,AvatarGroup,Banner,BarChart,BoxPlotChart,BrandAssetEditor,BudgetBar,CHART_INK,Calendar,CandlestickChart,Card,CartesianPlot,ChartBrush,ChartDefs,ChartDot,ChartFrame,ChartHighlightProvider,ChartSkeleton,ChartTooltip,ChatTemplate,Checkbox_default as Checkbox,CheckoutTemplate,ChordChart,ColoredBadge,ColumnChart,ComposerAttachments,ContainerFillChart,CountBadge,DAY_MS,DashboardTemplate,DataTable,DataTablePage,DatePicker_default as DatePicker,DateRangePicker,DateTimePicker_default as DateTimePicker,DescriptionList,Divider,DonutChart,Drawer,DropdownMenu,EmailTemplate,EmptyState,EmptyValue,ErrorBoundary,ErrorPage,FilePicker_default as FilePicker,FormErrorSummary,FormField,FormLayoutPage,FunnelChart,GROUP_COLORS,GROUP_COLORS_SOLID,GalleryTemplate,Grid,HeatmapChart,HelpCenter,HistogramChart,INPUT_BASE,INPUT_SIZES,IconButton_default as IconButton,Inline,Input_default as Input,InputNumber_default as InputNumber,Kanban,Label,LineChart,ListFooter,ListLoadError,MAX_FRACTION_DIGITS,MENU_MAX_HEIGHT,MOTION,Markdown,Markdown as MarkdownLite,MediaUploadField,MediaUploadGrid,Meter,MetricBar,MilestoneTimeline,NativeSelect,NumericKeypad,POPUP_MAX_WIDTH,POST_PRODUCTION_STATUSES,PageHeader,Pagination,PaperclipGlyph,Paragraph,PieChart,Popover,PortalBrandingProvider,ProductionTimeline,RADAR_SERIES_CAP,RadarChart,RadialBarChart,Radio_default as Radio,RadioGroup,RangeChart,RankedBars,SCATTER_SERIES_CAP,SERIES_SLOT_COUNT,SERIES_VARS,STAGES,STATUS_VARS,SankeyChart,ScatterChart,SearchableSelect,Segmented,Select_default as Select,SettingRow,SidebarActionButton,SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,Skeleton,Snippet,Sparkline,Stack,StatCard,StatTile,Statistic,StatusBadge,StatusBadgeProvider,Stepper,SunburstChart,Switch_default as Switch,Tabs,TagInput,Text,Textarea_default as Textarea,TileButton_default as TileButton,TimeAgo,TimePicker_default as TimePicker,TimeSeriesChart,TimelineTrack,Title,Tooltip,TopNav,TreemapChart,WaterfallChart,angleScale,appendKey,applyThemePrefs,arcPath,areaBetween,areaFrom,autoHighlightIndex,backspace,bandScale,binValues,budgetState,bumpPath,calcOverall,calcReportOverall,curvePath,dashFor,fillFor,fillId,fmtSliderDate,fromKey as fromDateKey,glowId,groundId,groupColors,highlightOpacity,inputClasses,isSeverityTone,labelClasses,ladderScale,linearPath,linearScale,logScale,maskId,mediaFileName,monotonePath,niceMax,polygonPoints,popupBounds,radiusScale,resolvePortalBrandAsset,resolveSeriesColor,resolveTheme,seriesColor,severityOf,splinePath,squarify,stagger,stepPath,tabButtonId,tabPanelId,toKey as toDateKey,toDayMs,toISODate,useAppUpdate,useClickOutside,useDebouncedValue,useDropdownPosition,useHighlight,usePlotWidth,usePortalBranding,useProductionTimeline,useTheme}from"../chunk-6CKRJ4YK.js";export{Breadcrumbs}from"../chunk-7EACKL5V.js";export{SidebarLayout}from"../chunk-O46U4PVN.js";export{BrandMark,GlobalSearch,openGlobalSearch,pushRecent as pushRecentSearch,resolveBrandMarkTreatment,sanitizeRecent as sanitizeRecentSearches}from"../chunk-6WLGERBO.js";export{EditableGrid}from"../chunk-4VMA4ALC.js";import"../chunk-BR22X7E5.js";export{toast_default as toast}from"../chunk-EYU4IAEZ.js";export{VERSION}from"../chunk-LQVXGB7A.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,LoadingSpinner,MOD,NEXT_CHUNK_PATH_PREFIX,Result,SHIFT,STALE_CHUNK_RELOAD_COOLDOWN_MS,STALE_CHUNK_RELOAD_KEY,ShellPrefsProvider,VITE_PRELOAD_ERROR_EVENT,installStaleChunkReload,isMac,isStaleChunkError,useIsMobile,useLocalStoragePrefs,useShellPrefs}from"../chunk-GTQJYE6M.js";import"../chunk-5A7MWTXX.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-A2FL26TE.js";export{DATE_FORMAT_OPTIONS,EMPTY_VALUE,TZ_AUTO,currencyDecimals,currencySymbol,firstDayOfWeek,formatBytes,formatDate,formatDateTime,formatMoney,formatTime,getUserDateFormat,getUserTimezone,setCurrencyFormats,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile,timeAgo}from"../chunk-S2AZZGFF.js";export{Button_default as Button,buttonClasses,iconButtonClasses}from"../chunk-PH3PRIFP.js";export{ConfirmProvider,Dialog,confirm,confirmDestructive,prompt,useConfirm,useFocusTrap,useScrollLock}from"../chunk-GBL5KOGP.js";export{GLASS_DIVIDER,PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu,glassStyle}from"../chunk-DYVN6C2E.js";import"../chunk-D65T4H6J.js";export{OVERLAY_OPEN_EVENT,Z_LAYERS,dismissPopups}from"../chunk-OSJ3ADF2.js";import"../chunk-MAIHBBWT.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-UZUH5PVW.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-shell",
3
- "version": "4.160.0",
3
+ "version": "4.162.0",
4
4
  "description": "Desktop-style React UI shell — windows, taskbar, start menu, sticky notes, frosted glass theming, and bundled apps.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Efficient Pty Ltd",
@@ -1,29 +0,0 @@
1
- import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-XPSADW6W.js";import{useWidgetSettings as n}from"./chunk-X6E6UULK.js";import"./chunk-T6MKFQRH.js";import"./chunk-6UXY7MPY.js";import"./chunk-PH3PRIFP.js";import"./chunk-PDTZTADH.js";import"./chunk-VNEH2Y6H.js";import"./chunk-OSJ3ADF2.js";import"./chunk-MAIHBBWT.js";import"./chunk-VVI77XNV.js";import"./chunk-D65T4H6J.js";import{useState as r,useRef as l,useCallback as a,useEffect as o}from"react";import{jsxs as i,Fragment as c,jsx as s}from"react/jsx-runtime";var u="calc_appearance";function d(){const[d,h]=r("0"),[m,b]=r(null),[g,k]=r(null),[p,v]=r(!1),[x,y]=r(""),[N,f]=r([]),[C,$]=r(!1),[j,w]=r(()=>e(u)),[E,T]=r(!1),[S,L]=r(j),A=l(null);n(a(()=>{L({...j}),T(!0)},[j]));const F=a(e=>{y(""),h(t=>p||"0"===t?(v(!1),"."===e?"0.":e):"."===e&&t.includes(".")?t:t+e)},[p]),H=a(()=>{h("0"),b(null),k(null),v(!1)},[]),W=a((e,t,n)=>{switch(n){case"+":return e+t;case"-":return e-t;case"×":return e*t;case"÷":return 0===t?0:e/t;default:return t}},[]),B=a(e=>{const t=parseFloat(d);if(null!==m&&g&&!p){const e=W(m,t,g);h(String(e)),b(e),f(n=>[`${m} ${g} ${t} = ${e}`,...n].slice(0,20))}else b(t);k(e),v(!0)},[d,m,g,p,W]),D=a(()=>{if(null===m||!g)return;const e=parseFloat(d),t=W(m,e,g),n=`${m} ${g} ${e} =`;f(e=>[`${n} ${t}`,...e].slice(0,20)),y(n),h(String(t)),b(null),k(null),v(!0)},[d,m,g,W]),P=a(()=>{h(e=>String(parseFloat(e)/100))},[]),M=a(()=>{h(e=>e.startsWith("-")?e.slice(1):"0"===e?e:"-"+e)},[]);o(()=>{const e=e=>{const t=e.target.tagName;"INPUT"!==t&&"TEXTAREA"!==t&&"SELECT"!==t&&(e.key>="0"&&e.key<="9"?F(e.key):"."===e.key?F("."):"+"===e.key?B("+"):"-"===e.key?B("-"):"*"===e.key?B("×"):"/"===e.key?(e.preventDefault(),B("÷")):"Enter"===e.key||"="===e.key?("Enter"===e.key&&e.target instanceof Node&&A.current?.contains(e.target)&&e.preventDefault(),D()):"Escape"===e.key?H():"Backspace"===e.key?h(e=>e.length>1?e.slice(0,-1):"0"):"%"===e.key&&P())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[F,B,D,H,P]);const I="flex items-center justify-center rounded-lg text-sm font-medium transition-colors",V=`${I} bg-white border border-gray-200 text-gray-900 hover:bg-gray-50 active:bg-gray-100`,X=`${I} bg-blue-50 border border-blue-200 text-blue-700 hover:bg-blue-100 active:bg-blue-200`,U=`${I} bg-gray-100 border border-gray-200 text-gray-600 hover:bg-gray-200 active:bg-gray-300`,J=`${I} bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800`;/* @__PURE__ */
2
- return i(c,{children:[
3
- /* @__PURE__ */i("div",{ref:A,className:"flex flex-col h-full",style:{opacity:j.activeOpacity/100,backdropFilter:j.activeBlur>0?`blur(${j.activeBlur}px)`:void 0},children:[
4
- /* @__PURE__ */i("div",{className:"bg-slate-200 rounded-t-lg px-4 py-2 group/display relative flex flex-col justify-end min-h-[120px] border-b border-slate-300",children:[
5
- /* @__PURE__ */s("div",{className:"flex flex-col justify-end flex-1 overflow-hidden",children:N.slice(0,3).reverse().map((e,t)=>/* @__PURE__ */s("div",{className:"text-[11px] text-slate-400 text-right font-mono truncate",children:e},t))}),(x||g&&null!==m)&&/* @__PURE__ */s("div",{className:"text-base text-slate-600 text-right font-mono",children:x||`${m} ${g} ${p?"":d}`}),
6
- /* @__PURE__ */i("div",{className:"flex items-center gap-2",children:[
7
- /* @__PURE__ */s("button",{onClick:()=>{navigator.clipboard.writeText(d),$(!0),setTimeout(()=>$(!1),1200)},title:"Copy result",className:"shrink-0 text-slate-300 hover:text-slate-500 transition-colors opacity-0 group-hover/display:opacity-100",children:/* @__PURE__ */s("svg",C?{className:"h-5 w-5 text-green-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */s("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}:{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */s("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})}),
8
- /* @__PURE__ */s("div",{className:"text-right text-4xl font-mono font-bold text-slate-800 truncate flex-1",children:(e=>{const t=parseFloat(e);return isNaN(t)||e.endsWith(".")||e.endsWith(".0")||Math.abs(t)<1e15&&e.length<16?e:t.toExponential(6)})(d)})]})]}),
9
- /* @__PURE__ */i("div",{className:"grid grid-cols-4 grid-rows-5 gap-1.5 flex-1 min-h-0 p-2",children:[
10
- /* @__PURE__ */s("button",{onClick:H,className:U,children:"AC"}),
11
- /* @__PURE__ */s("button",{onClick:M,className:U,children:"+/−"}),
12
- /* @__PURE__ */s("button",{onClick:P,className:U,children:"%"}),
13
- /* @__PURE__ */s("button",{onClick:()=>B("÷"),className:`${X} ${"÷"===g?"ring-2 ring-blue-400":""}`,children:"÷"}),
14
- /* @__PURE__ */s("button",{onClick:()=>F("7"),className:V,children:"7"}),
15
- /* @__PURE__ */s("button",{onClick:()=>F("8"),className:V,children:"8"}),
16
- /* @__PURE__ */s("button",{onClick:()=>F("9"),className:V,children:"9"}),
17
- /* @__PURE__ */s("button",{onClick:()=>B("×"),className:`${X} ${"×"===g?"ring-2 ring-blue-400":""}`,children:"×"}),
18
- /* @__PURE__ */s("button",{onClick:()=>F("4"),className:V,children:"4"}),
19
- /* @__PURE__ */s("button",{onClick:()=>F("5"),className:V,children:"5"}),
20
- /* @__PURE__ */s("button",{onClick:()=>F("6"),className:V,children:"6"}),
21
- /* @__PURE__ */s("button",{onClick:()=>B("-"),className:`${X} ${"-"===g?"ring-2 ring-blue-400":""}`,children:"−"}),
22
- /* @__PURE__ */s("button",{onClick:()=>F("1"),className:V,children:"1"}),
23
- /* @__PURE__ */s("button",{onClick:()=>F("2"),className:V,children:"2"}),
24
- /* @__PURE__ */s("button",{onClick:()=>F("3"),className:V,children:"3"}),
25
- /* @__PURE__ */s("button",{onClick:()=>B("+"),className:`${X} ${"+"===g?"ring-2 ring-blue-400":""}`,children:"+"}),
26
- /* @__PURE__ */s("button",{onClick:()=>F("0"),className:`${V} col-span-2`,children:"0"}),
27
- /* @__PURE__ */s("button",{onClick:()=>F("."),className:V,children:"."}),
28
- /* @__PURE__ */s("button",{onClick:D,className:J,children:"="})]})]}),
29
- /* @__PURE__ */s(t,{open:E,onClose:()=>T(!1),title:"Calculator Settings",appearance:S,onAppearanceChange:L,onSave:()=>{w(S),localStorage.setItem(u,JSON.stringify(S)),T(!1)}})]})}export{d as default};
@@ -1 +0,0 @@
1
- export{ConfirmProvider,confirm,confirmDestructive,prompt,useConfirm}from"./chunk-PDTZTADH.js";import"./chunk-OSJ3ADF2.js";import"./chunk-VVI77XNV.js";
@@ -1 +0,0 @@
1
- export{PdfViewer as default,fitScale,pdfWasmParams}from"./chunk-HF4IZFFX.js";import"./chunk-B2TBCVHH.js";import"./chunk-VVI77XNV.js";
@@ -1,37 +0,0 @@
1
- import{EditableGrid as e}from"./chunk-XN76YBX3.js";import"./chunk-BR22X7E5.js";import{AboutApp as t}from"./chunk-A6FPBD7W.js";import{peekSpreadsheetPreviewStage as r,claimSpreadsheetPreviewStage as n,SPREADSHEET_PREVIEW_UPDATE_EVENT as o}from"./chunk-VTVSMRFX.js";import"./chunk-GF2XCISN.js";import{WindowTitle as a}from"./chunk-X6E6UULK.js";import"./chunk-T6MKFQRH.js";import"./chunk-6UXY7MPY.js";import"./chunk-PH3PRIFP.js";import"./chunk-PDTZTADH.js";import"./chunk-VNEH2Y6H.js";import"./chunk-OSJ3ADF2.js";import"./chunk-MAIHBBWT.js";import"./chunk-VVI77XNV.js";import"./chunk-D65T4H6J.js";import{useRef as l,useState as s,useEffect as c,useCallback as i}from"react";import{jsxs as u,jsx as d,Fragment as h}from"react/jsx-runtime";var m="ABCDEFGHIJKLMNOPQRSTUVWXYZ",p=10,x=30;function g(e){return e<26?m[e]:m[Math.floor(e/26)-1]+m[e%26]}function y(e){return Array.from({length:e},(e,t)=>({key:`col_${t}`,title:g(t),width:100}))}function b(e,t){return Array.from({length:e},()=>Array(t).fill(""))}function f(e){return{id:crypto.randomUUID(),name:e,columns:y(p),data:b(x,p),cellStyles:{}}}function v(e){return e.split("\n").map(e=>{if(e.includes("\t"))return e.split("\t").map(e=>e.trim());const t=[];let r="",n=!1;for(const o of e)'"'!==o?","!==o||n?r+=o:(t.push(r.trim()),r=""):n=!n;return t.push(r.trim()),t}).filter(e=>e.some(e=>e.trim()))}function w(e,t){const r=v(e);if(0===r.length)return null;const n=Math.max(p,r.reduce((e,t)=>Math.max(e,t.length),0)),o=r.map(e=>{for(;e.length<n;)e.push("");return e});for(;o.length<x;)o.push(Array(n).fill(""));return{id:crypto.randomUUID(),name:t,columns:y(n),data:o,cellStyles:{}}}function k(){const m=l(null),g=l(void 0);void 0===g.current&&(g.current=r());const k=l(g.current?.data??null),N=(()=>{const e=g.current;if(!e)return null;const t=w(e.data.csv,"Sheet 1");if(!t)return null;return{sheet:t,title:e.data.filename.replace(/\.(csv|tsv|txt)$/i,"")}})(),[C,S]=s(N?[N.sheet]:[f("Sheet 1")]),[j,$]=s(0),M=l([]),U=l(C),E=l(!1);c(()=>{E.current?E.current=!1:U.current!==C&&(M.current.push(U.current),M.current.length>50&&M.current.shift()),U.current=C},[C]);const A=i(()=>{const e=M.current.pop();e&&(E.current=!0,S(e))},[]);c(()=>{const e=e=>{if(!m.current?.contains(document.activeElement)&&!m.current?.matches(":focus-within"))return;(e.ctrlKey||e.metaKey)&&!e.shiftKey&&("z"===e.key||"Z"===e.key)&&(e.preventDefault(),A())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[A]);const[D,F]=s(N?.title??"Untitled"),[L,B]=s(()=>g.current?.data.onEmail),I=i(e=>{const t=w(e.csv,"Sheet 1");t&&(S([t]),$(0),F(e.filename.replace(/\.(csv|tsv|txt)$/i,"")),B(()=>e.onEmail))},[]);c(()=>{const e=g.current;null!=e&&(n(e),e.data!==k.current&&I(e.data))},[]),c(()=>{const e=g.current?.token;if(null==e)return;const t=t=>{const r=t.detail;r&&r.token===e&&I(r.data)};return window.addEventListener(o,t),()=>window.removeEventListener(o,t)},[]);const[R,X]=s(!1),[H,K]=s(null),[P,V]=s(""),T=l(null),[O,Y]=s("1"),[z,J]=s("10"),W=C[j]||C[0],Z=W.data,_=W.columns,G=W.cellStyles??{},[Q,q]=s(null),[ee,te]=s(null),re=i(()=>{if(ee){const e=Math.min(ee.anchor.row,ee.end.row),t=Math.max(ee.anchor.row,ee.end.row),r=Math.min(ee.anchor.col,ee.end.col),n=Math.max(ee.anchor.col,ee.end.col),o=[];for(let a=e;a<=t;a++)for(let e=r;e<=n;e++)o.push({row:a,col:e});return o}return Q?[Q]:[]},[ee,Q]),ne=i((e,t)=>{const r=re();0!==r.length&&S(n=>n.map((n,o)=>{if(o!==j)return n;const a={...n.cellStyles??{}},l=`${r[0].row}:${r[0].col}`,s=void 0!==t?t:!(a[l]??{})[e];for(const{row:t,col:n}of r){const r=`${t}:${n}`;a[r]={...a[r]??{},[e]:s}}return{...n,cellStyles:a}}))},[re,j]),oe=ee?{row:ee.anchor.row,col:ee.anchor.col}:Q,ae=oe?G[`${oe.row}:${oe.col}`]??{}:{},le=!!oe,se=i(e=>{S(t=>t.map((t,r)=>r===j?{...t,...e}:t))},[j]),ce=i(e=>{const t=e.reduce((e,t)=>Math.max(e,t.length),0);t!==_.length?se({data:e,columns:y(t)}):se({data:e})},[se,_.length]),ie=(e,t)=>{S(r=>r.map((r,n)=>n===e?{...r,name:t}:r)),K(null)},ue=()=>Z.filter(e=>e.some(e=>e.trim())).map(e=>e.map(e=>e.includes(",")||e.includes('"')||e.includes("\n")?`"${e.replace(/"/g,'""')}"`:e).join(",")).join("\n"),de=[];Z.forEach(e=>e.forEach(e=>{const t=parseFloat(e);!isNaN(t)&&e.trim()&&de.push(t)}));const he=Z.reduce((e,t)=>e+t.filter(e=>e.trim()).length,0);/* @__PURE__ */
2
- return u("div",{ref:m,className:"flex flex-col h-full",children:[
3
- /* @__PURE__ */d(a,{title:`${me=D||"Untitled",me.length>24?`${me.slice(0,23)}…`:me} - Spreadsheets`}),
4
- /* @__PURE__ */d(t,{app:"spreadsheet"}),
5
- /* @__PURE__ */u("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-gray-200 bg-gray-50 shrink-0",children:[R?/* @__PURE__ */d("input",{type:"text",value:D,onChange:e=>F(e.target.value),onBlur:()=>X(!1),onKeyDown:e=>{"Enter"===e.key&&X(!1)},autoFocus:!0,className:"text-sm font-medium text-gray-900 border border-gray-300 rounded px-2 py-0.5 w-40 focus:border-blue-500 focus:ring-blue-500"}):/* @__PURE__ */d("button",{onClick:()=>X(!0),className:"text-sm font-medium text-gray-900 hover:text-blue-600 truncate max-w-[200px]",title:"Click to rename",children:D||"Untitled"}),
6
- /* @__PURE__ */d("div",{className:"h-4 w-px bg-gray-300"}),
7
- /* @__PURE__ */d("input",{ref:T,type:"file",accept:".csv,.tsv,.txt,.xlsx,.xls,.ods",onChange:async e=>{const t=e.target.files?.[0];if(!t)return;const r=t.name.replace(/\.(csv|tsv|txt|xlsx|xls|ods)$/i,"");if(/\.(xlsx|xls|ods)$/i.test(t.name)){const e=new Uint8Array(await t.arrayBuffer()),n=await(import("xlsx")),o=n.read(e,{type:"array"}),a=o.SheetNames.map(e=>{const t=n.utils.sheet_to_json(o.Sheets[e],{header:1,defval:""}),r=Math.max(p,t.reduce((e,t)=>Math.max(e,t.length),0)),a=t.map(e=>{const t=e.map(e=>String(e??""));for(;t.length<r;)t.push("");return t});for(;a.length<x;)a.push(Array(r).fill(""));return{id:crypto.randomUUID(),name:e,columns:y(r),data:a}});S(a),$(0),F(r)}else{const e=v(await t.text());if(0===e.length)return;const n=Math.max(p,e.reduce((e,t)=>Math.max(e,t.length),0)),o=e.map(e=>{for(;e.length<n;)e.push("");return e});for(;o.length<x;)o.push(Array(n).fill(""));se({columns:y(n),data:o}),F(r)}T.current&&(T.current.value="")},className:"hidden"}),
8
- /* @__PURE__ */d("button",{onClick:()=>T.current?.click(),className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"Open"}),
9
- /* @__PURE__ */d("button",{onClick:()=>{const e=new Blob([ue()],{type:"text/csv"}),t=URL.createObjectURL(e),r=document.createElement("a");r.href=t,r.download=`${D||"spreadsheet"}.csv`,r.click(),URL.revokeObjectURL(t)},className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"Save CSV"}),L&&/* @__PURE__ */d("button",{onClick:()=>L(ue(),`${D||"spreadsheet"}.csv`),className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"Email"}),
10
- /* @__PURE__ */d("div",{className:"h-4 w-px bg-gray-300"}),
11
- /* @__PURE__ */u("div",{className:"flex items-center gap-1",children:[
12
- /* @__PURE__ */d("input",{type:"number",min:"1",max:"50",value:O,onChange:e=>Y(e.target.value),className:"w-10 text-xs text-center border border-gray-300 rounded px-1 py-0.5 focus:border-blue-500 focus:ring-blue-500"}),
13
- /* @__PURE__ */d("button",{onClick:()=>(e=>{const t=_.length+e;se({columns:y(t),data:Z.map(t=>[...t,...Array(e).fill("")])})})(parseInt(O)||1),className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"+ Col"})]}),
14
- /* @__PURE__ */u("div",{className:"flex items-center gap-1",children:[
15
- /* @__PURE__ */d("input",{type:"number",min:"1",max:"500",value:z,onChange:e=>J(e.target.value),className:"w-10 text-xs text-center border border-gray-300 rounded px-1 py-0.5 focus:border-blue-500 focus:ring-blue-500"}),
16
- /* @__PURE__ */d("button",{onClick:()=>{return e=parseInt(z)||10,void se({data:[...Z,...Array.from({length:e},()=>Array(_.length).fill(""))]});var e},className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"+ Row"})]}),
17
- /* @__PURE__ */d("div",{className:"h-4 w-px bg-gray-300"}),
18
- /* @__PURE__ */d("button",{onClick:()=>{se({columns:y(p),data:b(x,p)})},className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"Clear"}),
19
- /* @__PURE__ */d("div",{className:"h-4 w-px bg-gray-300"}),
20
- /* @__PURE__ */u("div",{className:"flex items-center gap-0.5",title:le?"":"Click a cell first",children:[
21
- /* @__PURE__ */d("button",{onClick:()=>ne("bold"),disabled:!le,className:`px-2 py-1 text-xs rounded transition-colors font-bold ${ae.bold?"bg-blue-100 text-blue-700":"text-gray-600 hover:bg-gray-200"} disabled:opacity-40 disabled:cursor-not-allowed`,children:"B"}),
22
- /* @__PURE__ */d("button",{onClick:()=>ne("italic"),disabled:!le,className:`px-2 py-1 text-xs rounded transition-colors italic ${ae.italic?"bg-blue-100 text-blue-700":"text-gray-600 hover:bg-gray-200"} disabled:opacity-40 disabled:cursor-not-allowed`,children:"I"}),
23
- /* @__PURE__ */d("button",{onClick:()=>ne("underline"),disabled:!le,className:`px-2 py-1 text-xs rounded transition-colors underline ${ae.underline?"bg-blue-100 text-blue-700":"text-gray-600 hover:bg-gray-200"} disabled:opacity-40 disabled:cursor-not-allowed`,children:"U"}),
24
- /* @__PURE__ */u("select",{value:ae.fontSize??"base",onChange:e=>ne("fontSize",e.target.value),disabled:!le,className:"ml-1 text-xs border border-gray-300 rounded px-1 py-0.5 bg-white disabled:opacity-40 disabled:cursor-not-allowed",children:[
25
- /* @__PURE__ */d("option",{value:"sm",children:"XS"}),
26
- /* @__PURE__ */d("option",{value:"base",children:"S"}),
27
- /* @__PURE__ */d("option",{value:"lg",children:"M"}),
28
- /* @__PURE__ */d("option",{value:"xl",children:"L"})]})]})]}),
29
- /* @__PURE__ */d("div",{className:"flex-1 min-h-0",children:/* @__PURE__ */d(e,{columns:_,data:Z,onChange:ce,onColumnsChange:e=>se({columns:e}),cellStyles:G,onFocusChange:q,onSelectionChange:te,minRows:x,maxHeight:"100%"})}),
30
- /* @__PURE__ */u("div",{className:"flex items-center border-t border-gray-200 bg-gray-50 shrink-0",children:[
31
- /* @__PURE__ */u("div",{className:"flex items-center gap-0.5 px-1 py-1 overflow-x-auto flex-1 min-w-0",children:[C.map((e,t)=>/* @__PURE__ */d("button",{onClick:()=>$(t),onDoubleClick:()=>{K(t),V(e.name)},onContextMenu:e=>{e.preventDefault(),C.length>1&&(e=>{C.length<=1||(S(t=>t.filter((t,r)=>r!==e)),j>=e&&j>0&&$(j-1))})(t)},className:"px-3 py-1 text-xs font-medium rounded-b whitespace-nowrap transition-colors "+(t===j?"bg-white text-blue-700 border border-t-0 border-gray-300 -mt-px relative z-10":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"),children:H===t?/* @__PURE__ */d("input",{type:"text",value:P,onChange:e=>V(e.target.value),onBlur:()=>ie(t,P||e.name),onKeyDown:r=>{"Enter"===r.key&&ie(t,P||e.name),"Escape"===r.key&&K(null)},onClick:e=>e.stopPropagation(),autoFocus:!0,className:"w-20 text-xs border border-blue-400 rounded px-1 py-0 focus:ring-0 focus:outline-none"}):e.name},e.id)),
32
- /* @__PURE__ */d("button",{onClick:()=>{const e=`Sheet ${C.length+1}`;S(t=>[...t,f(e)]),$(C.length)},className:"px-2 py-1 text-xs text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded",title:"Add sheet",children:"+"})]}),
33
- /* @__PURE__ */u("div",{className:"flex items-center gap-4 px-3 py-1 text-xs text-gray-500 shrink-0 border-l border-gray-200",children:[
34
- /* @__PURE__ */u("span",{children:[he," cells"]}),de.length>0&&/* @__PURE__ */u(h,{children:[
35
- /* @__PURE__ */u("span",{children:["Sum: ",de.reduce((e,t)=>e+t,0).toLocaleString(void 0,{maximumFractionDigits:2})]}),
36
- /* @__PURE__ */u("span",{children:["Avg: ",(de.reduce((e,t)=>e+t,0)/de.length).toLocaleString(void 0,{maximumFractionDigits:2})]})]}),
37
- /* @__PURE__ */u("span",{children:[Z.length," × ",_.length]})]})]})]});var me}export{k as default};
@@ -1,2 +0,0 @@
1
- import{createContext as e,useContext as t}from"react";import{jsx as r}from"react/jsx-runtime";function n(e){return"items"in e}function o(e,t){return!(e.perms?.length&&!t(e.perms))&&!(e.allPerms?.length&&!e.allPerms.every(e=>t([e])))}function u(e,t){return(e.children??[]).filter(e=>o(e,t))}function a(e,t){return!e.children?.length||u(e,t).some(e=>a(e,t))}var i={},c=new Proxy(i,{get:(e,t)=>i[t],has:(e,t)=>t in i,ownKeys:()=>Object.keys(i),getOwnPropertyDescriptor(e,t){if(t in i)return{configurable:!0,enumerable:!0,value:i[t]}}});function s(e){for(const e of Object.keys(i))delete i[e];Object.assign(i,e)}var l={},m=[],d={erp:[],system:[],virtual:[],footer:[]},h=e({hasAnyPerm:()=>!0});function f({value:e,children:t}){/* @__PURE__ */
2
- return r(h.Provider,{value:e,children:t})}function p(){return t(h)}var w=240,g=68,y=52,b="react-os-shell:work-area-changed";function P(){const e=getComputedStyle(document.documentElement),t=parseInt(e.getPropertyValue("--taskbar-height"))||0,r=parseInt(e.getPropertyValue("--taskbar-width"))||0,n=e.getPropertyValue("--taskbar-position")?.trim()||"bottom",o=parseInt(e.getPropertyValue("--sidebar-width"))||0;return{x:("left"===n?r:0)+o,y:"top"===n?t:0,w:window.innerWidth-("left"===n||"right"===n?r:0)-o,h:window.innerHeight-("top"===n||"bottom"===n?t:0)}}function v(e,t,r){const n=r?t.w+280:t.w-280,o=Math.abs(e.w-t.w)<=4||Math.abs(e.w-n)<=4;return Math.abs(e.h-t.h)<=4&&o}function x({over:e,residual:t},r){return t<=1||e-t>=r-2}function M(e,t,r){let n=e;for(const o of r)x(o,t)&&(n=Math.max(n,e+o.over));return Math.ceil(n)}function k(e,t,r,n){const o=Math.min(t,r.w-2*n);if(o<=e.w+1)return e;const u=r.x+n,a=r.x+r.w-n-o,i=Math.min(Math.max(e.x-(o-e.w)/2,u),a);return{...e,x:Math.round(i),w:Math.round(o)}}function V(){return(parseInt(getComputedStyle(document.documentElement).getPropertyValue("--sidebar-width"))||0)>0}function j(){return"undefined"!=typeof document&&"sidebar"===getComputedStyle(document.documentElement).getPropertyValue("--layout-mode")?.trim()}export{g as RAIL_COLLAPSED_W,w as RAIL_W,f as ShellAuthProvider,y as TAB_STRIP_H,b as WORK_AREA_CHANGED_EVENT,v as boxFillsWorkArea,P as computeMaximizedBox,k as growBoxToWidth,a as isReachable,n as isSection,V as isSidebarStripReserved,c as navIcons,m as navSections,o as navVisible,j as readAlwaysMaximizedFlag,x as scrollerIsFluid,l as sectionIcons,s as setShellNavIcons,d as startMenuCategories,p as useShellAuth,u as visibleChildren,M as widthToFit};
@@ -1 +0,0 @@
1
- var r="4.160.0",a=r;export{a as APP_VERSION,r as VERSION};
@@ -1,22 +0,0 @@
1
- import{glassStyle as e}from"./chunk-VNEH2Y6H.js";import{useDismissPopupsOnOpen as r,Z_LAYERS as t}from"./chunk-OSJ3ADF2.js";import{useShellStrings as a}from"./chunk-VVI77XNV.js";import{useState as n,useEffect as l,useRef as o,useCallback as s}from"react";import{jsx as i,jsxs as d}from"react/jsx-runtime";import{createPortal as c}from"react-dom";var m={favicon:"h-8 w-8",compact:"h-10 w-10",wordmark:"h-10 w-40"};function h(e){return e.trim().charAt(0).toLocaleUpperCase()||"·"}function u(e,r,t){return!1===e?"framed":null==e||null==r?"plate-light":r?"light"===t?"plate-dark":"bare":"dark"===t?"plate-light":"bare"}var p={"plate-light":"bg-white shadow-[0_2px_12px_var(--rosh-mark-plate-shadow)]","plate-dark":"bg-neutral-900 shadow-[0_2px_12px_var(--rosh-mark-plate-shadow-strong)]",framed:"border border-black/10 shadow-[0_2px_12px_var(--rosh-mark-plate-shadow)]",bare:""};function g(e,r,t){return"bare"===e?{}:"framed"===e?{borderRadius:r}:{borderRadius:r,padding:t}}function b({src:e,fallbackSrc:r,fallbackHasAlpha:t=null,fallbackIsLight:a=null,fallbackAdaptive:o,alt:s,slot:d="compact",surface:c="light",size:b,width:x,height:f,decorative:y=!1,fallbackMode:v="monogram",adaptive:k=!1,hasAlpha:w=null,isLight:N=null,treatmentPadding:C=4,treatmentRadius:j=8,className:E="",style:L}){const[A,_]=n(e||r||"");l(()=>{_(e||r||"")},[e,r]);const $=Boolean(r&&A===r&&A!==e),D=($?o??k:k)?u($?t:w,$?a:N,c):"bare",B=["inline-flex shrink-0 items-center justify-center overflow-hidden",null==b&&null==x&&null==f?m[d]:"","dark"===c?"text-white":"text-gray-700",p[D],E].filter(Boolean).join(" "),K={...g(D,j,C),...null==b?{width:x,height:f}:{width:b,height:b},...L};return A?/* @__PURE__ */i("span",{className:B,"data-brand-treatment":D,style:K,children:/* @__PURE__ */i("img",{src:A,alt:y?"":s,"data-brand-slot":d,className:"block max-h-full max-w-full",style:{objectFit:"contain"},onError:()=>_(e=>r&&e!==r?r:"")})}):"none"===v?null:/* @__PURE__ */i("span",{"data-brand-fallback":!0,"data-brand-slot":d,"aria-label":y?void 0:s,"aria-hidden":y||void 0,role:y?void 0:"img",className:`${B} rounded-md bg-gray-100 font-semibold`,style:K,children:y?null:h(s)})}var x="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z",f="react-os-shell:open-global-search";function y(){"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(f))}function v({providers:m,typeIcons:h,placeholder:u,onSelect:p}={}){const g=a().search,b=u??g.placeholder,[y,v]=n(!1),[k,w]=n(""),[N,C]=n([]),[j,E]=n(!1),[L,A]=n(0),_=o(null),$=o(),D=o(function(){let e=0,r=null;const t=()=>{e+=1,r?.abort(),r=null};return{begin:()=>{t();const a=e,n=new AbortController;return r=n,{signal:n.signal,isCurrent:()=>a===e}},cancel:t}}());l(()=>{const e=e=>{(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),v(e=>!e)),"Escape"===e.key&&y&&v(!1)},r=()=>v(!0);return window.addEventListener("keydown",e),window.addEventListener(f,r),()=>{window.removeEventListener("keydown",e),window.removeEventListener(f,r)}},[y]),r(y),l(()=>{y?setTimeout(()=>_.current?.focus(),50):(w(""),C([]))},[y]),l(()=>{const e=D.current;return $.current&&clearTimeout($.current),k.length<2||!m||0===m.length?(e.cancel(),C([]),void E(!1)):($.current=setTimeout(async()=>{const r=e.begin();E(!0);const t=await Promise.all(m.map(async e=>{try{return await e(k,{signal:r.signal})}catch{return[]}}));r.isCurrent()&&(C(t.flat()),A(0),E(!1))},250),()=>{$.current&&clearTimeout($.current),e.cancel()})},[k,m]);const B=s(e=>{v(!1),p?.(e)},[p]);return y?c(
2
- /* @__PURE__ */d("div",{"data-global-search":"",className:"fixed inset-0 flex items-start justify-center pt-[15vh]",style:{zIndex:t.overlay},onClick:()=>v(!1),children:[
3
- /* @__PURE__ */i("div",{"data-global-search-backdrop":"",className:"absolute inset-0 bg-black/50 backdrop-blur-sm"}),
4
- /* @__PURE__ */d("div",{className:"relative z-10 w-full max-w-xl rounded-2xl overflow-hidden",onClick:e=>e.stopPropagation(),style:e(),children:[
5
- /* @__PURE__ */d("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-gray-200",children:[
6
- /* @__PURE__ */i("svg",{className:"h-5 w-5 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */i("path",{strokeLinecap:"round",strokeLinejoin:"round",d:x})}),
7
- /* @__PURE__ */i("input",{ref:_,type:"text",value:k,onChange:e=>w(e.target.value),onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),A(e=>Math.min(e+1,N.length-1))):"ArrowUp"===e.key?(e.preventDefault(),A(e=>Math.max(e-1,0))):"Enter"===e.key&&N[L]&&B(N[L])},placeholder:b,className:"flex-1 text-sm bg-transparent border-0 rosh-focus-ring placeholder-gray-400"}),
8
- /* @__PURE__ */i("kbd",{className:"hidden sm:inline-flex items-center rounded border border-gray-300 px-1.5 py-0.5 text-[10px] font-medium text-gray-400",children:g.escBadge})]}),
9
- /* @__PURE__ */d("div",{className:"max-h-[50vh] overflow-y-auto",children:[j&&/* @__PURE__ */i("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:g.searching}),!j&&k.length>=2&&0===N.length&&/* @__PURE__ */i("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:g.noResults}),!j&&N.length>0&&/* @__PURE__ */i("ul",{className:"py-2",children:N.map((e,r)=>/* @__PURE__ */i("li",{children:/* @__PURE__ */d("button",{className:"flex items-center gap-3 w-full px-4 py-2.5 text-left transition-colors "+(r===L?"bg-blue-50":"hover:bg-gray-50"),onClick:()=>B(e),onMouseEnter:()=>A(r),children:[
10
- /* @__PURE__ */i("svg",{className:"h-4 w-4 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */i("path",{strokeLinecap:"round",strokeLinejoin:"round",d:h?.[e.type]||x})}),
11
- /* @__PURE__ */d("div",{className:"flex-1 min-w-0",children:[
12
- /* @__PURE__ */i("p",{className:"text-sm font-medium text-gray-900 truncate",children:e.label}),e.sub&&/* @__PURE__ */i("p",{className:"text-xs text-gray-400 truncate",children:e.sub})]}),
13
- /* @__PURE__ */i("span",{className:"shrink-0 rounded-full bg-gray-100 px-2 py-0.5 text-[10px] font-medium text-gray-500",children:e.type})]})},`${e.type}-${e.label}-${r}`))}),!j&&k.length<2&&/* @__PURE__ */i("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:g.minChars(2)})]}),
14
- /* @__PURE__ */d("div",{className:"flex items-center justify-between px-4 py-2 border-t border-gray-100 bg-gray-50 text-[11px] text-gray-400",children:[
15
- /* @__PURE__ */d("div",{className:"flex items-center gap-3",children:[
16
- /* @__PURE__ */d("span",{className:"flex items-center gap-1",children:[
17
- /* @__PURE__ */i("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:"↑"}),
18
- /* @__PURE__ */i("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:"↓"}),` ${g.navigate}`]}),
19
- /* @__PURE__ */d("span",{className:"flex items-center gap-1",children:[
20
- /* @__PURE__ */i("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:g.enterKey}),` ${g.open}`]})]}),
21
- /* @__PURE__ */d("span",{className:"flex items-center gap-1",children:[
22
- /* @__PURE__ */i("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:g.escKey}),` ${g.close}`]})]})]})]}),document.body):null}export{b as BrandMark,v as GlobalSearch,y as openGlobalSearch,u as resolveBrandMarkTreatment};
@@ -1,18 +0,0 @@
1
- import{PopupMenu as e,PopupMenuItem as r,PopupMenuDivider as n}from"./chunk-VNEH2Y6H.js";import{useShellStrings as t}from"./chunk-VVI77XNV.js";import{useState as l,useEffect as i,Fragment as a}from"react";import{jsxs as o,jsx as s}from"react/jsx-runtime";var d="outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-500";function c(){/* @__PURE__ */
2
- return s("svg",{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",className:"size-3.5",children:/* @__PURE__ */s("path",{d:"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z"})})}function m({tabs:m,activeKey:u,idFor:h,panelMounted:y,onActivate:p,onClose:f,onCloseMany:g,label:x,className:b,activeClassName:k,end:v}){const w=t().pageTabs,[N,C]=l(null),$=m.length;i(()=>{if(!u)return;const e=document.getElementById(h(u,"tab"));e?.scrollIntoView?.({block:"nearest",inline:"nearest"})},[h,u,$]);const j=m.some(e=>e.key===u)?u:m[0]?.key,z=e=>{const r=m[(e+m.length)%m.length];r&&document.getElementById(h(r.key,"tab"))?.focus()},I=N?m.find(e=>e.key===N.key):void 0,D=I?m.indexOf(I):-1,A=e=>e.some(e=>!e.pinned),E=e=>()=>{C(null),e()};/* @__PURE__ */
3
- return o("div",{className:b??"relative flex h-10 shrink-0 items-end gap-3 bg-gray-100 px-3",children:[
4
- /* @__PURE__ */s("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 h-px bg-gray-200"}),
5
- /* @__PURE__ */s("div",{role:"tablist","aria-label":x,onKeyDown:e=>{const r=m.findIndex(r=>document.getElementById(h(r.key,"tab"))===e.target);if(!(r<0)){if("ArrowRight"===e.key)z(r+1);else if("ArrowLeft"===e.key)z(r-1);else if("Home"===e.key)z(0);else if("End"===e.key)z(m.length-1);else{if("Delete"!==e.key||m[r].pinned)return;f(m[r].key)}e.preventDefault()}},className:"flex min-w-0 flex-1 items-end overflow-x-auto overflow-y-hidden [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:m.map((e,r)=>{const n=e.key===u,t=!!e.dirty,l=e.icon,i=n?k??"z-[1] border-gray-200 bg-gray-50 text-gray-900":"border-transparent text-gray-600 hover:bg-gray-200/70 hover:text-gray-900",g=r>0&&!n&&m[r-1].key!==u,x={type:"button",role:"tab",id:h(e.key,"tab"),"aria-selected":n,"aria-controls":y?.(e.key)?h(e.key,"panel"):void 0,tabIndex:e.key===j?0:-1,title:e.title,onClick:()=>p(e.key)},b={onContextMenu:r=>((e,r)=>{e.preventDefault(),C({x:e.clientX,y:e.clientY,key:r.key})})(r,e),onAuxClick:r=>((e,r)=>{1!==e.button||r.pinned||(e.preventDefault(),f(r.key))})(r,e),onMouseDown:e=>{1===e.button&&e.preventDefault()}},v=l&&
6
- /* @__PURE__ */o("span",{className:"relative flex size-4 shrink-0 items-center justify-center text-gray-500 [&>svg]:size-4","aria-hidden":"true",children:[l,t&&!n&&!e.pinned&&
7
- /* @__PURE__ */s("span",{className:"absolute -right-1 -top-1 hidden size-2 rounded-full bg-gray-500 ring-2 ring-gray-100 @max-[6.5rem]:block @max-[6.5rem]:group-hover:hidden"})]});return e.pinned?/* @__PURE__ */s("div",{role:"presentation",className:`group relative flex h-9 flex-none items-center justify-center rounded-t-md border border-b-0 transition-colors ${l?"w-10":""} ${i}`,...b,children:/* @__PURE__ */o("button",{...x,className:`flex h-full items-center justify-center rounded-t-md ${l?"w-full":"px-3"} ${d}`,children:[v,
8
- /* @__PURE__ */s("span",{className:l?"sr-only":"whitespace-nowrap text-[13px]",children:e.title})]})},e.key):/* @__PURE__ */o(a,{children:[g&&/* @__PURE__ */s("span",{"aria-hidden":"true",className:"mb-2.5 h-4 w-px shrink-0 self-end border-l border-gray-300"}),
9
- /* @__PURE__ */o("div",{role:"presentation",className:`group @container relative flex h-9 flex-[0_1_15rem] items-center rounded-t-md border border-b-0 text-[13px] transition-colors ${n?"min-w-[4.25rem]":"min-w-[2.75rem]"} ${i}`,...b,children:[
10
- /* @__PURE__ */o("button",{...x,className:`flex h-full min-w-0 flex-1 items-center gap-2 rounded-t-md pl-3 pr-1 text-left ${d} ${n?"@max-[5rem]:pl-2.5":"@max-[6.5rem]:pr-3 @max-[6.5rem]:group-hover:pr-1 @max-[4.5rem]:justify-center @max-[4.5rem]:px-0 @max-[4.5rem]:group-hover:pl-1.5"}`,children:[v,
11
- /* @__PURE__ */s("span",{className:"min-w-0 flex-1 overflow-hidden whitespace-nowrap [mask-image:linear-gradient(to_right,#000_calc(100%-1rem),transparent)] "+(l?n?"@max-[5rem]:sr-only":"@max-[4.5rem]:sr-only":""),children:e.title})]}),
12
- /* @__PURE__ */o("span",{className:"mr-1.5 flex size-5 shrink-0 items-center justify-center "+(n?"":"@max-[6.5rem]:hidden @max-[6.5rem]:group-hover:flex"),children:[t&&/* @__PURE__ */s("span",{role:"img","aria-label":w.unsaved,className:"size-2 rounded-full bg-gray-500 group-hover:hidden"}),
13
- /* @__PURE__ */s("button",{type:"button",tabIndex:-1,"aria-label":w.closeTab?.(e.title)??`${w.close} ${e.title}`,onClick:()=>f(e.key),className:"size-5 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 "+(t?"hidden group-hover:flex":n?"flex":"flex opacity-0 group-hover:opacity-100 focus-visible:opacity-100"),children:/* @__PURE__ */s(c,{})})]})]})]},e.key)})}),v&&/* @__PURE__ */s("div",{className:"flex shrink-0 items-center gap-2 self-center",children:v}),N&&I&&/* @__PURE__ */o(e,{portal:!0,style:{left:N.x,top:N.y},onClose:()=>C(null),children:[
14
- /* @__PURE__ */s(r,{disabled:I.pinned,onClick:E(()=>f(I.key)),children:w.close}),
15
- /* @__PURE__ */s(n,{}),
16
- /* @__PURE__ */s(r,{disabled:!A(m.filter(e=>e.key!==I.key)),onClick:E(()=>g("others",I.key)),children:w.closeOthers}),
17
- /* @__PURE__ */s(r,{disabled:!A(m.slice(D+1)),onClick:E(()=>g("right",I.key)),children:w.closeRight}),
18
- /* @__PURE__ */s(r,{disabled:!A(m),onClick:E(()=>g("all",null)),children:w.closeAll})]})]})}export{m as TabStrip};
@@ -1 +0,0 @@
1
- import{createContext as e,useContext as o,useMemo as t,useEffect as a}from"react";import{jsx as n}from"react/jsx-runtime";var i=/* @__PURE__ */new Map;function r(e,o){const t=`${e}|${JSON.stringify(o)}`;let a=i.get(t);return a||(a=new Intl.NumberFormat(e,o),i.set(t,a)),a}function s(e,o){return o?r(o,{maximumFractionDigits:20}).format(e):String(e)}function l(e,o,t){return t?r(t,{minimumFractionDigits:o,maximumFractionDigits:o}).format(e):e.toFixed(o)}function d(e,o,t){return t?r(t,{style:"percent",minimumFractionDigits:o,maximumFractionDigits:o}).format(e/100):`${e.toFixed(o)}%`}function c(e){const o=o=>s(o,e),t=o=>function(e,o){return o?r(o,{}).format(e):e.toLocaleString()}(o,e),a=(o,t)=>l(o,t,e);return{window:{minimize:"Minimize",restore:"Restore",maximize:"Maximize",windowed:"Windowed",pinOnTop:"Pin on top",unpin:"Unpin from top",close:"Close",windowSuffix:"window",prev:"Prev",next:"Next",snapLayouts:"Snap layouts",snapLeft:"Snap left half",snapRight:"Snap right half",snapTopLeft:"Snap top-left quarter",snapTopRight:"Snap top-right quarter",snapBottomLeft:"Snap bottom-left quarter",snapBottomRight:"Snap bottom-right quarter"},taskbar:{closeWindow:"Close window",offscreenHint:"This window is off screen — click to bring it back",offscreenDot:"Off screen — click to bring this window back",expose:"Exposé — show all open windows as thumbnails",addToDesktop:"Add to desktop",removeFromDesktop:"Remove from desktop",minimizeAllWindows:"Minimize all",restoreAllWindows:"Restore all",closeAllWindows:"Close all"},logout:{goodbye:"Goodbye",seeYou:"See you next time"},about:{aboutPrefix:"About",thisApp:"this app",openSourceLicenses:"Open Source Licenses",whatsNew:"What's New",noChangelog:"No changelog available."},table:{empty:"Nothing to show",loading:"Loading",selectAll:"Select all rows",selectRow:"Select row"},select:{none:"— None —",noMatches:"No matches",allSelected:"All options selected",clear:"Clear selection",remove:"Remove"},notifications:{title:"Notifications",markAllRead:"Mark all read",dnd:"Do not disturb",dndOn:"Do not disturb is on",caughtUp:"All caught up",empty:"No notifications yet",viewAll:"View all notifications",cardLabel:"Notification",dismiss:"Dismiss notification"},form:{errorSummaryTitle:"There is a problem"},help:{title:"Help",searchPlaceholder:"Search help…",empty:"No help articles yet.",noResults:"No articles match your search.",loading:"Loading…",pickArticle:"Pick a help article from the left.",noBody:"This article has no body yet.",draft:"Draft",newArticle:"+ New",edit:"Edit"},update:{available:"A new version is available.",refreshNow:"Refresh now"},pageTabs:{label:"Open pages",close:"Close",closeOthers:"Close other tabs",closeRight:"Close tabs to the right",closeAll:"Close all tabs",unsaved:"Unsaved changes",discardTitle:"Discard unsaved changes?",discardOne:"This page has changes that have not been saved. Close it anyway?",discardMany:"pages have changes that have not been saved. Close them anyway?",discardConfirm:"Discard and close",keepEditing:"Keep editing"},dialog:{close:"Close",cancel:"Cancel",ok:"OK",confirmTitle:"Confirm",destructiveTitle:"Confirm Action",destructiveCancel:"Dismiss",destructiveConfirm:"Delete",typeToConfirm:e=>`Type ${e} to confirm:`,promptTitle:"Enter a value"},calendar:{previousMonth:"Previous month",nextMonth:"Next month",previousYear:"Previous year",nextYear:"Next year",previousYears:"Previous years",nextYears:"Next years",monthPanel:"Choose a month",yearPanel:"Choose a year",chooseMonth:e=>`Choose a month, currently ${e}`,chooseYear:e=>`Choose a year, currently ${e}`},datePicker:{placeholder:"Select a date",dialog:"Choose a date",clear:"Clear",today:"Today",required:"Required"},dateRange:{placeholder:"Date Range",clearRange:"Clear date range",dialog:"Date range",from:"From",to:"To",start:"Start",end:"End",fromOnly:e=>`From ${e}`,toOnly:e=>`To ${e}`,range:(e,o)=>`${e} to ${o}`,required:"Required",last2Weeks:"Last 2 Weeks",lastMonth:"Last Month",last3Months:"Last 3 Months",last6Months:"Last 6 Months",last12Months:"Last 12 Months",custom:"Custom",clear:"Clear",cancel:"Cancel",apply:"Apply"},pagination:{label:"Pagination",first:"First page",previous:"Previous page",next:"Next page",last:"Last page"},list:{selected:e=>`${o(e)} selected`,selectedNotShown:(e,t)=>`${o(e)} selected, ${o(t)} not shown`,allLoaded:(e,o)=>`All ${t(e)} ${o} loaded`,count:(e,o)=>`${t(e)} ${o}`,loadedOf:(e,o,a)=>`${t(e)} of ${t(o)} ${a}`,loadingMore:"Loading more...",loadError:"Couldn't load this list",loadErrorMessage:"Something went wrong fetching these records. Check your connection and try again.",retry:"Try again"},kanban:{loading:"Loading…",empty:"No items.",dropHere:"Drop here",addItem:"Add item"},files:{attach:"Attach files",drop:"Drop files to attach",remove:e=>`Remove ${e}`,chooseMany:"Choose files",chooseOne:"Choose a file",dragMany:"or drag them here",dragOne:"or drag it here",notAccepted:(e,o)=>`${e} is not an accepted file type${o?` (${o})`:""}`,tooLarge:(e,o,t)=>`${e} is ${o} — the limit is ${t}`,tooMany:(e,t)=>`${e} was not added — ${o(t)} ${1===t?"file":"files"} is the limit`,bytes:e=>`${o(e)} B`,kilobytes:e=>`${o(e)} KB`,megabytes:e=>`${a(e,1)} MB`},media:{uploadImage:"Upload an image",uploadVideo:"Upload a video",uploadFile:"Upload a file",upload:"Upload media",cta:"Choose from library or upload",replace:"Replace",remove:"Remove",uploading:"Uploading…",cover:"Cover",add:"Add",addMedia:"Add media",empty:"No media.",removeItem:e=>`Remove ${e}`,reorder:(e,t,a)=>`${e}, item ${o(t)} of ${o(a)}. Use arrow keys to reorder.`},brandAsset:{save:e=>`Save ${e}`,remove:e=>`Remove ${e}`,discard:"Discard change",saveFailed:e=>`Could not save ${e}.`,removeFailed:e=>`Could not remove ${e}.`,region:(e,o)=>`${e} for ${o}`,usedFor:e=>`Used for ${e}.`,previews:e=>`${e} previews`,preview:"Preview",alt:(e,o)=>`${e} ${o}`},copy:{copy:"Copy",copyLabel:e=>`Copy ${e}`,copied:"Copied",copiedLabel:e=>`${e} copied`,failed:"Could not copy to the clipboard"},keypad:{backspace:"Backspace",enter:"Enter"},banner:{dismiss:"Dismiss"},badge:{remove:"Remove",removeItem:e=>`Remove ${e}`},breadcrumbs:{label:"Breadcrumb",hidden:"Hidden crumbs"},emptyState:{message:"Nothing here yet."},errors:{notFound:"Page not found",notFoundBody:"The page you're looking for doesn't exist or was moved.",forbidden:"Access denied",forbiddenBody:"You don't have permission to view this page.",noAccess:"You don't have access to this",serverError:"Something went wrong",serverErrorBody:"An unexpected error occurred. Please try again.",retry:"Try again",details:"Error details"},search:{placeholder:"Search...",escBadge:"ESC",searching:"Searching...",noResults:"No results found.",minChars:e=>`Type at least ${o(e)} characters to search...`,navigate:"navigate",open:"open",close:"close",enterKey:"Enter",escKey:"Esc"},grid:{selectAll:"Select all",insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",deleteRow:e=>`Delete row ${e}`,insertColumnLeft:"Insert column left",insertColumnRight:"Insert column right",deleteColumn:e=>`Delete column ${e}`,resize:"Drag to resize · double-click to auto-fit",fill:"Drag to fill"},sidebar:{resize:"Drag to resize · double-click to reset"},layout:{desktop:"Desktop",sidebar:"Sidebar",switchToDesktop:"Switch to Desktop",switchToSidebar:"Switch to Sidebar",collapseSidebar:"Collapse sidebar",expandSidebar:"Expand sidebar",search:"Search…",navLabel:"Main menu",openWindows:"Open windows",pageResult:"Page",accountMenu:e=>`Account menu for ${e}`,profile:"My Profile",notifications:"Notifications",reportIssue:"Suggestion or Bug",signOut:"Sign Out",signOutTitle:"Sign Out",signOutMessage:"Do you want to log out? All windows will reopen when you log back in."},markdown:{screenshot:"Screenshot"},severity:{success:"ok",warning:"warning",danger:"critical",unrecognised:e=>`unrecognised severity ${e}`},meter:{noData:"no data",warningAt:e=>`warning ≥ ${o(e)}`,criticalAt:e=>`critical ≥ ${o(e)}`,noReading:"no reading",noBudget:"no budget",ofBudget:e=>`${e} of budget`,budget:"budget",hoursMinutes:(e,t)=>`${o(e)}h ${o(t)}m`,minutesSeconds:(e,t)=>`${o(e)}m ${o(t)}s`,seconds:e=>`${o(e)}s`},charts:{showTable:"Show the data as a table",loading:"Loading chart data",noData:"No data in this window.",windowStart:"Window start",windowEnd:"Window end",window:(e,t,a)=>`Time window — showing ${e} to ${t} of ${o(a)} intervals`,overIntervals:(e,t)=>`${e.join(", ")} over ${o(t)} intervals`,acrossCategories:(e,t)=>`${e.join(", ")} across ${o(t)} categories`,acrossMeasures:(e,t)=>`${e.join(", ")} across ${o(t)} measures`,breakdown:(e,t)=>`Breakdown of ${e} across ${o(t)} segments`,funnel:(e,t,a)=>`Funnel of ${o(e)} stages, ${t} down to ${a}`,radialTrack:e=>`${o(e)} categories, as concentric proportions`,radialCycle:e=>`${o(e)} categories, around a cycle`,tableFrom:"From",tableTo:"To",tableItem:"Item",tableLevel:"Level",tableSeries:"Series",inBucket:e=>`${e} in this bucket`,inCategory:e=>`${e} in this category`,value:"Value",share:"Share",count:"Count",flow:"Flow",totalFlow:"Total flow",throughput:"Throughput",open:"Open",high:"High",low:"Low",close:"Close",maximum:"Maximum",q3:"Q3",median:"Median",q1:"Q1",minimum:"Minimum",distribution:"Distribution",fiveNumber:(e,t)=>`${e}: five-number summary for ${o(t)} categories`,outliers:e=>`${o(e)} outlier${e>1?"s":""} beyond the whiskers`,price:"Price",ohlc:(e,t)=>`${e}: open, high, low and close across ${o(t)} periods`,closedAbove:"Closed above its open",closedBelow:"Closed below its open",noFlows:"No flows to chart.",chord:e=>`Flows between ${o(e)} participants`,noStages:"No stages to chart.",ofFirstStage:"Of first stage",droppedHere:"Dropped here",intensity:"Intensity",noActivity:"No activity in this window.",heatmap:(e,t,a)=>`${e} across ${o(t)} rows and ${o(a)} columns`,countAxis:"count",histogram:(e,t,a)=>`${e}: ${o(t)} bins over ${o(a)} observations`,observations:"Observations",notEnough:"Not enough eligible requests to judge.",objectiveMet:e=>`objective ${e} met`,objectiveMissed:e=>`objective ${e} missed`,nothingToPlot:"Nothing to plot.",nothingToCompare:"Nothing to compare.",other:"Other",nothingToBreakDown:"Nothing to break down.",range:"Range",rangeLabel:(e,t)=>`${e}: low and high across ${o(t)} categories`,nothingToRank:"Nothing to rank in this window.",emphasised:"(emphasised)",sankey:(e,t)=>`Flow between ${o(e)} nodes over ${o(t)} links`,noObservations:"No observations in this window.",xAxis:"x",yAxis:"y",size:"Size",scatter:(e,o,t)=>`${e.join(", ")}: ${o} against ${t}`,outsideRange:e=>`${o(e)} ${1===e?"point":"points"} outside the shown range`,waterfall:(e,t,a)=>`Waterfall of ${o(e)} steps from ${t} to ${a}`,balance:"Balance",increase:"Increase",decrease:"Decrease",runningTotal:"Running total",sunburst:(e,t)=>`Hierarchy of ${e} across ${o(t)} levels`,treemap:e=>`Treemap of ${o(e)} items`,trendUp:"up",trendDown:"down",trendFlat:"flat"},timeline:{days:e=>`${t(e)} days`,daysToToday:e=>`${t(e)} days to today`,notReached:"Not yet reached",next:"Next",more:e=>`+${o(e)} more`,today:"Today",todayTitle:e=>`Today — ${e}`,open:e=>`Open ${e}`,openButton:"Open",scrub:"Scrub the timeline",alsoToCome:e=>`Also to come: ${e.join(", ")}`,start:e=>`Start · ${e}`,events:(e,t)=>`${o(e)} events · ${t.join(", ")}`,started:e=>`started ${e}`,duration:e=>`${t(e)} day${1===e?"":"s"}`,reached:(e,t)=>`${o(e)} of ${o(t)} milestones`,milestones:e=>`${e} milestones`},production:{heading:"Production progress",start:"Start",estimated:"Estimated",estimatedCompletion:"Estimated completion",estDone:"Est. done",play:"Play",pause:"Pause",playTitle:"Play the timeline, report by report",backTo:e=>`Back to ${e}`,showing:e=>`Showing ${e}`,overall:o=>`${((o,t)=>d(o,t,e))(o,0)} overall`,inStock:e=>`${t(e)} pc in stock`,noReport:"No production report filed yet",leadTime:e=>`${t(e)} day${1===e?"":"s"} lead time`,report:"Production report",shipment:"Shipment",inspection:"Inspection",invoice:"Invoice",scrub:"Scrub the production timeline",label:(e,o)=>`Production reports and events, ${e} to ${o}`},containers:{items:e=>`${o(e)} items`,pieces:e=>`${o(e)} pcs`,split:(e,t)=>`(${o(e)} instr / ${o(t)} loaded)`,added:(e,t)=>`${o(e)} new (${o(t)} pcs)`,fill:(e,t)=>`${a(e,1)} / ${o(t)} m³`,total:"Total:",instructed:e=>`${a(e,2)} m³ instruction`,loaded:e=>`${a(e,2)} m³ loaded`,volume:e=>`${a(e,2)} m³`,noVolume:"Volume: N/A (no volume data for these part numbers)"},toast:{notification:"Notification"},map:{failed:"The map could not be drawn here. The list has everything it shows.",approximate:e=>`${e}, approximate location`,approximateTitle:e=>`${e} (approximate)`,places:e=>1===e?"place":"places",group:(e,t)=>`${o(e)} ${t} here`,stops:e=>`Stops ${e}`,closeBy:(e,t)=>`${o(e)} more ${t} close by, drawn when the map is closer`,spread:"Press to see them apart",cycle:"They stand on one spot: press for the next of them",fullScreen:"Full screen",leaveFullScreen:"Leave full screen",chosen:e=>`${e}, chosen on the map`,closeCard:"Close",openRecord:"Open"},pdf:{previousPage:"Previous page",nextPage:"Next page",pageOf:(e,t)=>`${o(e)} / ${o(t)}`,zoomOut:"Zoom out",zoomIn:"Zoom in",zoom:"Zoom",fitWidth:"Fit width",fitPage:"Fit page",fit:"Fit",fitHint:"Fit to the pane: follows its size until you zoom by hand",print:"Print",download:"Download",email:"Email",loading:"Loading PDF…",loadFailed:"Failed to load PDF",allowPopups:"Allow popups to print"}}}var p=c(),u=/* @__PURE__ */new Map;var m=e(p),h=e(null),g=/* @__PURE__ */new Set;var $=p,f={};function w(){return $}function v({value:e=f,locale:i,children:r}){const s=o(h),l=t(()=>function(e){if(e)try{return Intl.getCanonicalLocales(e)[0]}catch{return void(g.has(e)||(g.add(e),console.error(`[efficient-shell] ShellStringsProvider: locale="${e}" is not a BCP 47 language tag, so it is ignored and numbers and dates keep their default formatting. Pass a tag such as "de-DE" or "ja".`)))}}(i),[i]),d=void 0===i?s?.locale:l,w=t(()=>{const o=function(e){if(!e)return p;let o=u.get(e);return o||(o=c(e),u.set(e,o)),o}(d),t={};for(const a of Object.keys(o))t[a]={...o[a],...e[a]??{}};return t},[e,d]),v=t(()=>({locale:d}),[d]),y=null!==s;return a(()=>{if(!y)return $=w,()=>{$===w&&($=p)}},[w,y]),/* @__PURE__ */n(h.Provider,{value:v,children:/* @__PURE__ */n(m.Provider,{value:w,children:r})})}function y(){return o(m)}function b(){return o(h)?.locale}function S(e){const[o="",...t]=e("\0").split("\0");return[o,t.join("")]}export{p as DEFAULT_SHELL_STRINGS,v as ShellStringsProvider,w as currentShellStrings,l as formatFixed,d as formatPercent,s as formatPlain,S as splitAround,b as useShellLocale,y as useShellStrings};