efficient-shell 7.43.0 → 7.45.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 (59) hide show
  1. package/README.md +54 -1
  2. package/dist/{Browser-XNIEIZS2.js → Browser-7M22OFSW.js} +14 -14
  3. package/dist/Calculator-LKWOOCNC.js +29 -0
  4. package/dist/ConfirmDialog-ZT3XT66V.js +1 -0
  5. package/dist/{CurrencyConverter-QIH4GI3K.js → CurrencyConverter-4QTVWEFM.js} +6 -6
  6. package/dist/{Documents-7AYPEXL2.js → Documents-LELK7IBM.js} +21 -21
  7. package/dist/Files-LAWZGFQQ.js +87 -0
  8. package/dist/{Notepad-W4FJYXO4.js → Notepad-CLHKYQ34.js} +14 -14
  9. package/dist/PdfViewer-VJ743BW7.js +1 -0
  10. package/dist/{PomodoroTimer-LMLEPMFD.js → PomodoroTimer-L45QS5OR.js} +64 -64
  11. package/dist/{Preview-DI7VDRQR.js → Preview-47BCBIP4.js} +55 -55
  12. package/dist/{Sidebar-HT7BIMTD.js → Sidebar-AYYJL3IJ.js} +28 -28
  13. package/dist/{Spreadsheet-NTLSJ37V.js → Spreadsheet-6NX5WA4J.js} +14 -14
  14. package/dist/{Stock-VUGVYNNI.js → Stock-ZZ6AM43M.js} +3 -3
  15. package/dist/{Weather-TAJQCYIV.js → Weather-K3BZD2NX.js} +17 -17
  16. package/dist/{WorldClock-ZQ2VI2NB.js → WorldClock-5STYQA56.js} +6 -6
  17. package/dist/apps/index.js +1 -1
  18. package/dist/bin/ui-check.js +1 -1
  19. package/dist/{chunk-NT4SZH5L.js → chunk-ABKFLSHY.js} +1 -1
  20. package/dist/{chunk-YD4DPX4H.js → chunk-CWCKDF37.js} +3 -3
  21. package/dist/{chunk-FBXOKW33.js → chunk-FQIZMZDX.js} +3 -3
  22. package/dist/{chunk-ZN6W2KOC.js → chunk-G4UIEBPD.js} +11 -11
  23. package/dist/{chunk-4TOFAEAW.js → chunk-GM2ASLIK.js} +29 -29
  24. package/dist/{chunk-7RI5F5VX.js → chunk-HPUHB47C.js} +1 -1
  25. package/dist/{chunk-22EP5XS2.js → chunk-HQ74L5MM.js} +1 -1
  26. package/dist/{chunk-TFYZB4NY.js → chunk-JJBFXVOY.js} +2 -2
  27. package/dist/{chunk-QDCMVFK5.js → chunk-JXMYF3JR.js} +7 -7
  28. package/dist/{chunk-6K5EFHDQ.js → chunk-K6YIBHZN.js} +16 -16
  29. package/dist/{chunk-JK4PTQFV.js → chunk-LK7BWXYY.js} +1 -1
  30. package/dist/{chunk-WSRZRWN7.js → chunk-LTEM56OL.js} +1 -1
  31. package/dist/{chunk-FWEGDHFT.js → chunk-M2AM6DAA.js} +1 -1
  32. package/dist/chunk-NGWXT4QX.js +1 -0
  33. package/dist/{chunk-7D6TZW44.js → chunk-NZBFQTOB.js} +4 -4
  34. package/dist/{chunk-OMOQC57R.js → chunk-PR7MCFEU.js} +60 -60
  35. package/dist/{chunk-BY3KWWWU.js → chunk-UNLQRUWP.js} +4 -4
  36. package/dist/{chunk-PMDHTWBR.js → chunk-WGSCC6QU.js} +576 -573
  37. package/dist/{chunk-ZELMENOO.js → chunk-X6NYTLYX.js} +2 -2
  38. package/dist/{chunk-COUELSZF.js → chunk-XDR3Y3WU.js} +5 -5
  39. package/dist/{chunk-FY3H52BM.js → chunk-XYG3CVL5.js} +1 -1
  40. package/dist/icons/efficient-looks.js +4 -2
  41. package/dist/icons/efficient.d.ts +4 -2
  42. package/dist/icons/efficient.js +152 -151
  43. package/dist/icons/index.d.ts +1 -1
  44. package/dist/icons/index.js +1 -1
  45. package/dist/{index-p7sSFfAC.d.ts → index-BWDtKUcA.d.ts} +66 -3
  46. package/dist/index.d.ts +2 -2
  47. package/dist/index.js +216 -216
  48. package/dist/map/index.js +7 -7
  49. package/dist/page-tabs/index.js +5 -5
  50. package/dist/pdf/index.js +1 -1
  51. package/dist/telemetry/index.js +1 -1
  52. package/dist/ui/index.d.ts +1 -1
  53. package/dist/ui/index.js +1 -1
  54. package/package.json +1 -1
  55. package/dist/Calculator-Q3TNKTCG.js +0 -29
  56. package/dist/ConfirmDialog-QT4KJAP7.js +0 -1
  57. package/dist/Files-GKEGMDUL.js +0 -87
  58. package/dist/PdfViewer-LGD633HY.js +0 -1
  59. package/dist/chunk-7TD4XKYF.js +0 -1
package/dist/map/index.js CHANGED
@@ -1,21 +1,21 @@
1
1
  "use client";
2
- import{Button_default as e}from"../chunk-G5GERM76.js";import"../chunk-3E27HV76.js";import{rootIsDark as t,ROOT_THEME_ATTRIBUTES as n}from"../chunk-7IQ3B77H.js";import"../chunk-FIEA5CGB.js";import"../chunk-K7PQXJO7.js";import"../chunk-D65T4H6J.js";import{Icon as r}from"../chunk-3G5TA3IF.js";import{useShellStrings as o}from"../chunk-LVCRH3K6.js";import"../chunk-C3QOHMR6.js";import{SpinnerRing as a}from"../chunk-2J6F4EE7.js";import{useRef as l,useState as i,useEffect as s,useCallback as c,useMemo as u,useSyncExternalStore as d}from"react";import{createPortal as p}from"react-dom";import{jsxs as m,jsx as h,Fragment as g}from"react/jsx-runtime";import{useQuery as f}from"@tanstack/react-query";var y="maplibregl-compact-show";function b(e){if(!e)return()=>{};const t=()=>!!e.classList.contains(y)&&(e.classList.remove(y),!0);if(t())return()=>{};const n=new MutationObserver(()=>{t()&&n.disconnect()});return n.observe(e,{attributes:!0,attributeFilter:["class"]}),()=>n.disconnect()}var x=20,v=12,w=480,k={center:[0,0],left:[x,0],right:[-20,0],top:[0,x],"top-left":[0,x],"top-right":[0,x],bottom:[0,-20],"bottom-left":[0,-20],"bottom-right":[0,-20]},N=(e,t=12)=>Math.max(0,Math.floor(e-t-v-x-10-16));function M(e,t,n,r=12){const o=e.y-x-r,a=n.height-e.y-x-v,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<v?(s="-left",c=Math.max(0,v-e.x)):e.x+t.width/2>n.width-v&&(s="-right",c=-Math.max(0,e.x-(n.width-v))),{anchor:`${l?"bottom":"top"}${s}`,move:{x:c,y:i}}}var C="maplibre-gl-worker.mjs",L=e=>`/maplibre-gl/${e}/${C}`,E=null;function $(){return E??=Promise.all([import("maplibre-gl"),import("maplibre-gl/dist/maplibre-gl.css")]).then(([e])=>(e.setWorkerUrl(L(e.getVersion())),e)).catch(e=>{throw E=null,e}),E}var S=24,j=28,A=29;function z(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 R(e){const t=Math.max(j,12+8*e.length);return t+t%2}var O=(e,t,n,r)=>({left:e-n/2,top:t-r/2,right:e+n/2,bottom:t+r/2});function T(e,t){return e.left<t.right+1&&t.left<e.right+1&&e.top<t.bottom+1&&t.top<e.bottom+1}var B=e=>O(e.x,e.y,e.width,e.height);function F(e){for(let t=0;t<e.length;t++)for(let n=t+1;n<e.length;n++)if(T(B(e[t]),B(e[n])))return[e[t],e[n]];return null}function K(e,t=[]){const n=[],r=e=>t.some(t=>T(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:j,height:j,under:0}));for(let e=F(o);e;e=F(o)){const[t,n]=e;t.keys.push(...n.keys),t.stops.push(...n.stops),t.stops.sort((e,t)=>e-t),t.width=R(z(t.stops)),o=o.filter(e=>e!==n)}o=o.filter(e=>!r(B(e))||(n.push(...e.keys),!1));const a=[];for(const t of e){if(null!==t.stop)continue;const e=O(t.x,t.y,S,S),l=o.find(t=>T(B(t),e));if(l||r(e)){n.push(t.key),l&&l.under++;continue}const i=a.find(t=>T(B(t),e));i?i.keys.push(t.key):a.push({keys:[t.key],stops:[],x:t.x,y:t.y,width:S,height:S,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 q(e){const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:n}),()=>t.disconnect()}var _=t;var H="routes",P=["routes-road","routes-estimate"];function I(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(),G(n)}function G(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 D={light:"https://tiles.openfreemap.org/styles/positron",dark:"https://tiles.openfreemap.org/styles/dark"},Z={center:[30,20],zoom:1},V="ring-2 ring-gray-900 ring-offset-2";var J="var(--color-gray-600, #4b5563)",Q="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 Y(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 ee=(...e)=>e.filter(Boolean).join(" ");function te(e){const t=document.createElementNS(Q,"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(Q,"path");e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),e.setAttribute("d",n),t.appendChild(e)}return t}function ne(e,t){for(const[n,r]of Object.entries(t??{}))e.dataset[n]=r}var re=(e,t)=>ee("relative grid place-items-center rounded-full cursor-pointer",t&&(null!=e.stop?"h-7 w-7":"h-6 w-6"));function oe(e,t,n,r){const o=t&&!r&&null==e.stop&&!e.dot;return ee("grid place-items-center rounded-full border-2 font-semibold leading-none shadow-sm transition-transform motion-reduce:transition-none",!Y(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-2xs [&_svg]:h-3.5 [&_svg]:w-3.5",t&&(o?"ring-2 ring-gray-900 ring-offset-1":V),e.approximate&&"border-dashed opacity-80",e.faded&&!t&&"opacity-40",n&&"scale-125 opacity-100")}var ae=e=>ee("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",!Y(e.tone??"")&&"border-white",e.tone??"bg-gray-900 text-white");function le({pins:t,selectedKey:n,focus:r,onSelect:a,ariaLabel:u,className:g="",children:f,routes:y,fitTo:x,attribution:v,marks:w,groupCrowded:C=!1,noun:L,highlightKey:E=null,picking:A=!1,onPick:R,card:O,cardMinMapWidth:T=480,fullScreen:B,initialView:F=Z,cooperativeGestures:Q=!1}){const X=o().map,Y=l(null),le=l(null),ce=l(null),ue=l(null),de=l([]),pe=l(/* @__PURE__ */new Map),me=l(/* @__PURE__ */new Map),he=l(/* @__PURE__ */new Map),ge=l(null),fe=l(/* @__PURE__ */new Map),ye=l(""),[be,xe]=i(!1),[ve,we]=i(!1),ke=d(q,_,()=>!1)?"dark":"light",Ne=l({onSelect:a,onPick:R,picking:A,pins:t,selectedKey:n,highlightKey:E,groupCrowded:C,strings:X,noun:L});s(()=>{Ne.current={onSelect:a,onPick:R,picking:A,pins:t,selectedKey:n,highlightKey:E,groupCrowded:C,strings:X,noun:L}});const Me=c(()=>{const e=ce.current,{pins:t,selectedKey:n}=Ne.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=l(!1),Le=c((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(Ne.current.selectedKey??"");return void Ne.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})},[]),Ee=c(()=>{const e=ce.current,t=ue.current;if(!e||!t||!Y.current||Ce.current&&e.isMoving())return;const{selectedKey:n,highlightKey:r,groupCrowded:o,strings:a,noun:l}=Ne.current;for(const[e,t]of pe.current){const a=oe(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=[...Y.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=K([...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?z(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=ee("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-3xs":"h-6 w-6 text-2xs",null!=n&&r.keys.includes(n)&&V);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?j:S),height:t.button.offsetHeight||(null!=t.pin.stop?j:S)}:n?{at:n.mark,width:n.element.offsetWidth||j,height:n.element.offsetHeight||j}: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]);s(()=>{if(Ee(),!Y.current)return;const e=new ResizeObserver(()=>Ee());e.observe(Y.current);for(const t of Y.current.children)t.contains(le.current)||e.observe(t);return()=>e.disconnect()}),s(()=>{let e=!1,t=null,n=null,r=()=>{};return(async()=>{try{const o=await $();if(e||!le.current)return;ue.current=o,t=new o.Map({container:le.current,style:D[ke],center:F.center,zoom:F.zoom,attributionControl:v?{compact:!0,customAttribution:v}:{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(F.center).addTo(t),t.on("click",e=>{Ne.current.picking&&Ne.current.onPick?.({lat:e.lngLat.lat,lng:e.lngLat.lng})}),t.on("move",Ee),t.on("moveend",Ee),t.on("resize",Ee),t.on("error",e=>console.warn("[map]",e.error?.message)),r=b(le.current.querySelector(".maplibregl-ctrl-attrib"));const l=t;n=new ResizeObserver(()=>{l.resize(),Me()}),n.observe(le.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 $e=l(ke);s(()=>{be&&ce.current&&$e.current!==ke&&($e.current=ke,ce.current.setStyle(D[ke]))},[be,ke]),s(()=>{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=Ne.current.strings;for(const o of t){const t=document.createElement("button");t.type="button",t.dataset.pin=o.key,t.className=re(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(ne(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(te(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=ee("absolute -right-2 -top-2 grid h-4 min-w-4 place-items-center rounded-full px-0.5 text-3xs 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(),Ne.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 w??[]){const r=document.createElement("div");r.dataset.mapMark=t.key,ne(r,t.data),r.className=ae(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})}Ee()},[be,t,w,C,Ee]),s(()=>{be&&Ee()},[be,n,E,Ee]),s(()=>{if(!be||!n)return;const e=requestAnimationFrame(Me);return()=>cancelAnimationFrame(e)},[be,n,Me]),s(()=>{const e=ce.current,n=ue.current,r=x?[...t,...w??[]].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,w,x]),s(()=>{const e=ce.current;if(!be||!e)return;const t=(y??[]).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(),G(t)}(),o={type:"FeatureCollection",features:t.map(e=>({type:"Feature",properties:{key:e.key,estimate:e.estimate,faded:!!e.faded,color:e.color?I(e.color):r},geometry:{type:"LineString",coordinates:e.coordinates}}))},a=["case",["get","faded"],.25,.85],l=["get","color"],i=e.getSource(H);if(i&&(i.attribution||"")!==n){for(const t of P)e.getLayer(t)&&e.removeLayer(t);e.removeSource(H)}const s=e.getSource(H);s?s.setData(o):e.addSource(H,{type:"geojson",data:o,...n?{attribution:n}:{}}),e.getLayer("routes-road")||e.addLayer({id:"routes-road",type:"line",source:H,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:H,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,y,ke]),s(()=>{const e=ce.current;if(!be||!e||!r)return;const n=t.find(e=>e.key===r.key);if(!n)return;const o=e.getZoom(),a=C?W(e.project([n.lng,n.lat]),t.filter(e=>e.key!==n.key).map(t=>e.project([t.lng,t.lat])),o):-1/0,l={center:[n.lng,n.lat],zoom:Math.min(18,Math.max(o,13,a))};U()?e.jumpTo(l):e.flyTo({...l,duration:600})},[be,r?.n]);const[Se,je]=i(!1);s(()=>{const e=Y.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,Re=Ae?.lng??0,Oe=Ae?.lat??0,Te=be&&!Se&&null!=O&&!!Ae,[Be,Fe]=i(null);s(()=>{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:k,className:"rosh-map-card",maxWidth:"none",closeButton:!1,closeOnClick:!1,closeOnMove:!1,focusAfterOpen:!1}).setLngLat([Re,Oe]).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:J,borderBottomColor:J}),Fe(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(),Y.current)+8,u=`${N(a,l)}px`;n.style.maxHeight!==u&&(n.style.maxHeight=u);const d=r.getElement(),p=r.getLngLat(),{anchor:m,move:h}=M(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}),Ee()},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(),Fe(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,Re,Oe,Ee]);const Ke=B?.active??!1,We=l(B?.onChange);s(()=>{We.current=B?.onChange}),s(()=>{if(!B)return;const e=document.documentElement;Ke&&!document.fullscreenElement&&e.requestFullscreen&&e.requestFullscreen().catch(()=>{}),!Ke&&document.fullscreenElement&&document.exitFullscreen().catch(()=>{})},[Ke]);const qe=!!B;return s(()=>{if(!qe)return;const e=()=>{document.fullscreenElement||We.current?.(!1)};return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[qe]),/* @__PURE__ */m("div",{ref:Y,className:ee("relative min-h-72 overflow-hidden rounded-lg border border-gray-200 bg-gray-100",A&&"[&_canvas]:cursor-crosshair",g),children:[
2
+ import{Button_default as e}from"../chunk-G5GERM76.js";import"../chunk-3E27HV76.js";import{rootIsDark as t,ROOT_THEME_ATTRIBUTES as n}from"../chunk-7IQ3B77H.js";import"../chunk-FIEA5CGB.js";import"../chunk-K7PQXJO7.js";import{SpinnerRing as r}from"../chunk-2J6F4EE7.js";import{useShellStrings as o}from"../chunk-LVCRH3K6.js";import"../chunk-C3QOHMR6.js";import"../chunk-D65T4H6J.js";import{Icon as a}from"../chunk-3G5TA3IF.js";import{useRef as l,useState as i,useEffect as s,useCallback as c,useMemo as u,useSyncExternalStore as d}from"react";import{createPortal as p}from"react-dom";import{jsxs as m,jsx as h,Fragment as g}from"react/jsx-runtime";import{useQuery as f}from"@tanstack/react-query";var y="maplibregl-compact-show";function b(e){if(!e)return()=>{};const t=()=>!!e.classList.contains(y)&&(e.classList.remove(y),!0);if(t())return()=>{};const n=new MutationObserver(()=>{t()&&n.disconnect()});return n.observe(e,{attributes:!0,attributeFilter:["class"]}),()=>n.disconnect()}var x=20,v=12,w=480,k={center:[0,0],left:[x,0],right:[-20,0],top:[0,x],"top-left":[0,x],"top-right":[0,x],bottom:[0,-20],"bottom-left":[0,-20],"bottom-right":[0,-20]},N=(e,t=12)=>Math.max(0,Math.floor(e-t-v-x-10-16));function M(e,t,n,r=12){const o=e.y-x-r,a=n.height-e.y-x-v,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<v?(s="-left",c=Math.max(0,v-e.x)):e.x+t.width/2>n.width-v&&(s="-right",c=-Math.max(0,e.x-(n.width-v))),{anchor:`${l?"bottom":"top"}${s}`,move:{x:c,y:i}}}var C="maplibre-gl-worker.mjs",L=e=>`/maplibre-gl/${e}/${C}`,E=null;function $(){return E??=Promise.all([import("maplibre-gl"),import("maplibre-gl/dist/maplibre-gl.css")]).then(([e])=>(e.setWorkerUrl(L(e.getVersion())),e)).catch(e=>{throw E=null,e}),E}var S=24,j=28,A=29;function z(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 R(e){const t=Math.max(j,12+8*e.length);return t+t%2}var O=(e,t,n,r)=>({left:e-n/2,top:t-r/2,right:e+n/2,bottom:t+r/2});function T(e,t){return e.left<t.right+1&&t.left<e.right+1&&e.top<t.bottom+1&&t.top<e.bottom+1}var B=e=>O(e.x,e.y,e.width,e.height);function F(e){for(let t=0;t<e.length;t++)for(let n=t+1;n<e.length;n++)if(T(B(e[t]),B(e[n])))return[e[t],e[n]];return null}function K(e,t=[]){const n=[],r=e=>t.some(t=>T(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:j,height:j,under:0}));for(let e=F(o);e;e=F(o)){const[t,n]=e;t.keys.push(...n.keys),t.stops.push(...n.stops),t.stops.sort((e,t)=>e-t),t.width=R(z(t.stops)),o=o.filter(e=>e!==n)}o=o.filter(e=>!r(B(e))||(n.push(...e.keys),!1));const a=[];for(const t of e){if(null!==t.stop)continue;const e=O(t.x,t.y,S,S),l=o.find(t=>T(B(t),e));if(l||r(e)){n.push(t.key),l&&l.under++;continue}const i=a.find(t=>T(B(t),e));i?i.keys.push(t.key):a.push({keys:[t.key],stops:[],x:t.x,y:t.y,width:S,height:S,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 q(e){const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:n}),()=>t.disconnect()}var _=t;var H="routes",P=["routes-road","routes-estimate"];function I(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(),G(n)}function G(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 D={light:"https://tiles.openfreemap.org/styles/positron",dark:"https://tiles.openfreemap.org/styles/dark"},Z={center:[30,20],zoom:1},V="ring-2 ring-gray-900 ring-offset-2";var J="var(--color-gray-600, #4b5563)",Q="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 Y(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 ee=(...e)=>e.filter(Boolean).join(" ");function te(e){const t=document.createElementNS(Q,"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(Q,"path");e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),e.setAttribute("d",n),t.appendChild(e)}return t}function ne(e,t){for(const[n,r]of Object.entries(t??{}))e.dataset[n]=r}var re=(e,t)=>ee("relative grid place-items-center rounded-full cursor-pointer",t&&(null!=e.stop?"h-7 w-7":"h-6 w-6"));function oe(e,t,n,r){const o=t&&!r&&null==e.stop&&!e.dot;return ee("grid place-items-center rounded-full border-2 font-semibold leading-none shadow-sm transition-transform motion-reduce:transition-none",!Y(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-2xs [&_svg]:h-3.5 [&_svg]:w-3.5",t&&(o?"ring-2 ring-gray-900 ring-offset-1":V),e.approximate&&"border-dashed opacity-80",e.faded&&!t&&"opacity-40",n&&"scale-125 opacity-100")}var ae=e=>ee("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",!Y(e.tone??"")&&"border-white",e.tone??"bg-gray-900 text-white");function le({pins:t,selectedKey:n,focus:r,onSelect:a,ariaLabel:u,className:g="",children:f,routes:y,fitTo:x,attribution:v,marks:w,groupCrowded:C=!1,noun:L,highlightKey:E=null,picking:A=!1,onPick:R,card:O,cardMinMapWidth:T=480,fullScreen:B,initialView:F=Z,cooperativeGestures:Q=!1}){const X=o().map,Y=l(null),le=l(null),ce=l(null),ue=l(null),de=l([]),pe=l(/* @__PURE__ */new Map),me=l(/* @__PURE__ */new Map),he=l(/* @__PURE__ */new Map),ge=l(null),fe=l(/* @__PURE__ */new Map),ye=l(""),[be,xe]=i(!1),[ve,we]=i(!1),ke=d(q,_,()=>!1)?"dark":"light",Ne=l({onSelect:a,onPick:R,picking:A,pins:t,selectedKey:n,highlightKey:E,groupCrowded:C,strings:X,noun:L});s(()=>{Ne.current={onSelect:a,onPick:R,picking:A,pins:t,selectedKey:n,highlightKey:E,groupCrowded:C,strings:X,noun:L}});const Me=c(()=>{const e=ce.current,{pins:t,selectedKey:n}=Ne.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=l(!1),Le=c((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(Ne.current.selectedKey??"");return void Ne.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})},[]),Ee=c(()=>{const e=ce.current,t=ue.current;if(!e||!t||!Y.current||Ce.current&&e.isMoving())return;const{selectedKey:n,highlightKey:r,groupCrowded:o,strings:a,noun:l}=Ne.current;for(const[e,t]of pe.current){const a=oe(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=[...Y.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=K([...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?z(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=ee("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-3xs":"h-6 w-6 text-2xs",null!=n&&r.keys.includes(n)&&V);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?j:S),height:t.button.offsetHeight||(null!=t.pin.stop?j:S)}:n?{at:n.mark,width:n.element.offsetWidth||j,height:n.element.offsetHeight||j}: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]);s(()=>{if(Ee(),!Y.current)return;const e=new ResizeObserver(()=>Ee());e.observe(Y.current);for(const t of Y.current.children)t.contains(le.current)||e.observe(t);return()=>e.disconnect()}),s(()=>{let e=!1,t=null,n=null,r=()=>{};return(async()=>{try{const o=await $();if(e||!le.current)return;ue.current=o,t=new o.Map({container:le.current,style:D[ke],center:F.center,zoom:F.zoom,attributionControl:v?{compact:!0,customAttribution:v}:{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(F.center).addTo(t),t.on("click",e=>{Ne.current.picking&&Ne.current.onPick?.({lat:e.lngLat.lat,lng:e.lngLat.lng})}),t.on("move",Ee),t.on("moveend",Ee),t.on("resize",Ee),t.on("error",e=>console.warn("[map]",e.error?.message)),r=b(le.current.querySelector(".maplibregl-ctrl-attrib"));const l=t;n=new ResizeObserver(()=>{l.resize(),Me()}),n.observe(le.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 $e=l(ke);s(()=>{be&&ce.current&&$e.current!==ke&&($e.current=ke,ce.current.setStyle(D[ke]))},[be,ke]),s(()=>{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=Ne.current.strings;for(const o of t){const t=document.createElement("button");t.type="button",t.dataset.pin=o.key,t.className=re(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(ne(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(te(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=ee("absolute -right-2 -top-2 grid h-4 min-w-4 place-items-center rounded-full px-0.5 text-3xs 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(),Ne.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 w??[]){const r=document.createElement("div");r.dataset.mapMark=t.key,ne(r,t.data),r.className=ae(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})}Ee()},[be,t,w,C,Ee]),s(()=>{be&&Ee()},[be,n,E,Ee]),s(()=>{if(!be||!n)return;const e=requestAnimationFrame(Me);return()=>cancelAnimationFrame(e)},[be,n,Me]),s(()=>{const e=ce.current,n=ue.current,r=x?[...t,...w??[]].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,w,x]),s(()=>{const e=ce.current;if(!be||!e)return;const t=(y??[]).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(),G(t)}(),o={type:"FeatureCollection",features:t.map(e=>({type:"Feature",properties:{key:e.key,estimate:e.estimate,faded:!!e.faded,color:e.color?I(e.color):r},geometry:{type:"LineString",coordinates:e.coordinates}}))},a=["case",["get","faded"],.25,.85],l=["get","color"],i=e.getSource(H);if(i&&(i.attribution||"")!==n){for(const t of P)e.getLayer(t)&&e.removeLayer(t);e.removeSource(H)}const s=e.getSource(H);s?s.setData(o):e.addSource(H,{type:"geojson",data:o,...n?{attribution:n}:{}}),e.getLayer("routes-road")||e.addLayer({id:"routes-road",type:"line",source:H,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:H,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,y,ke]),s(()=>{const e=ce.current;if(!be||!e||!r)return;const n=t.find(e=>e.key===r.key);if(!n)return;const o=e.getZoom(),a=C?W(e.project([n.lng,n.lat]),t.filter(e=>e.key!==n.key).map(t=>e.project([t.lng,t.lat])),o):-1/0,l={center:[n.lng,n.lat],zoom:Math.min(18,Math.max(o,13,a))};U()?e.jumpTo(l):e.flyTo({...l,duration:600})},[be,r?.n]);const[Se,je]=i(!1);s(()=>{const e=Y.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,Re=Ae?.lng??0,Oe=Ae?.lat??0,Te=be&&!Se&&null!=O&&!!Ae,[Be,Fe]=i(null);s(()=>{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:k,className:"rosh-map-card",maxWidth:"none",closeButton:!1,closeOnClick:!1,closeOnMove:!1,focusAfterOpen:!1}).setLngLat([Re,Oe]).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:J,borderBottomColor:J}),Fe(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(),Y.current)+8,u=`${N(a,l)}px`;n.style.maxHeight!==u&&(n.style.maxHeight=u);const d=r.getElement(),p=r.getLngLat(),{anchor:m,move:h}=M(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}),Ee()},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(),Fe(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,Re,Oe,Ee]);const Ke=B?.active??!1,We=l(B?.onChange);s(()=>{We.current=B?.onChange}),s(()=>{if(!B)return;const e=document.documentElement;Ke&&!document.fullscreenElement&&e.requestFullscreen&&e.requestFullscreen().catch(()=>{}),!Ke&&document.fullscreenElement&&document.exitFullscreen().catch(()=>{})},[Ke]);const qe=!!B;return s(()=>{if(!qe)return;const e=()=>{document.fullscreenElement||We.current?.(!1)};return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[qe]),/* @__PURE__ */m("div",{ref:Y,className:ee("relative min-h-72 overflow-hidden rounded-lg border border-gray-200 bg-gray-100",A&&"[&_canvas]:cursor-crosshair",g),children:[
3
3
  /* @__PURE__ */h("div",{className:"absolute inset-0",children:/* @__PURE__ */h("div",{ref:le,className:"h-full w-full",role:"region","aria-label":u})}),ve&&/* @__PURE__ */h("p",{className:"absolute inset-0 grid place-items-center p-6 text-center text-sm text-gray-500",children:X.failed}),B&&/* @__PURE__ */h(e,{"data-map-control":"",variant:"secondary",size:"sm",className:"absolute left-3 top-3 z-10",onClick:()=>B.onChange(!B.active),leftIcon:/* @__PURE__ */h(se,{leave:B.active}),children:B.active?X.leaveFullScreen:X.fullScreen}),f,null!=O&&!Te&&/* @__PURE__ */h("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:O}),Te&&Be?p(O,Be):null,be&&/* @__PURE__ */h(ie,{pins:t,hosts:fe.current})]})}function ie({pins:e,hosts:t}){/* @__PURE__ */
4
4
  return h(g,{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)),p(e.iconNode,n,e.key)})})}function se({leave:e}){/* @__PURE__ */
5
- return h(r,e?{name:"collapse","aria-hidden":"true",className:"h-4 w-4",strokeWidth:2}:{name:"expand","aria-hidden":"true",className:"h-4 w-4",strokeWidth:2})}function ce(){const[e,t]=i(null);return{highlightKey:e,pointAt:c(e=>{const n=()=>t(e),r=()=>t(t=>t===e?null:t);return{onMouseEnter:n,onMouseLeave:r,onFocus:n,onBlur:r}},[])}}var ue=3e3,de=e=>!!e?.pending&&3e3,pe=e=>`${e.kind}:${e.id}`,me=e=>("located"===e.placement||"approximate"===e.placement)&&null!=e.lat&&null!=e.lng;function he(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 ge={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"}},fe=["importer","dealer","retail","supplier","delivery_location","warehouse"];function ye(e){return"supplier"===e.kind?"supplier":"customer"===e.kind?e.category||"importer":e.kind}var be=(e,t=ge)=>t[e]?.tone??"bg-gray-700 text-white",xe=(e,t=ge)=>t[e]?.label??e,ve=(e,t)=>be(ye(e),t);function we(e,t,n=ge){return null!=t?String(t):(n[ye(e)]?.label??"").charAt(0).toUpperCase()}var ke=["delivery_location","warehouse"];function Ne(e,t=ke){const n=/* @__PURE__ */new Map;let r=0;for(const o of e)t.includes(o.kind)&&n.set(pe(o),++r);return n}function Me(e){const t={onMap:0,approximate:0,pending:0,off:0};for(const n of e)me(n)?(t.onMap+=1,"approximate"===n.placement&&(t.approximate+=1)):"pending"===n.placement?t.pending+=1:t.off+=1;return t}function Ce(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 Le(e){const t=[...new Set(e.filter(me).map(ye))];return[...fe.filter(e=>t.includes(e)),...t.filter(e=>!fe.includes(e))]}function Ee(e,t){return e.filter(e=>!me(e)&&"pending"!==e.placement).map(e=>{const n=t?.get(pe(e)),r=he(e.placement)?.replace(/^Not on the map: /,"")??"";return{key:pe(e),text:`${null!=n?`${n}. `:""}${e.label}: ${r}`}})}function $e({categories:e,palette:t=ge,floating:n=!0}){return e.length<2?null:/* @__PURE__ */h("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-3 py-2 text-xs text-gray-600 shadow-sm",children:e.map(e=>/* @__PURE__ */m("span",{className:"inline-flex items-center gap-2",children:[
6
- /* @__PURE__ */h("span",{"aria-hidden":!0,className:`h-2.5 w-2.5 rounded-full ${be(e,t)}`}),xe(e,t)]},e))})}function Se({point:t,number:n,onOpen:a,onClose:l,palette:i=ge}){const s=he(t.placement),c=ye(t),u=o().map;/* @__PURE__ */
5
+ return h(a,e?{name:"collapse","aria-hidden":"true",className:"h-4 w-4",strokeWidth:2}:{name:"expand","aria-hidden":"true",className:"h-4 w-4",strokeWidth:2})}function ce(){const[e,t]=i(null);return{highlightKey:e,pointAt:c(e=>{const n=()=>t(e),r=()=>t(t=>t===e?null:t);return{onMouseEnter:n,onMouseLeave:r,onFocus:n,onBlur:r}},[])}}var ue=3e3,de=e=>!!e?.pending&&3e3,pe=e=>`${e.kind}:${e.id}`,me=e=>("located"===e.placement||"approximate"===e.placement)&&null!=e.lat&&null!=e.lng;function he(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 ge={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"}},fe=["importer","dealer","retail","supplier","delivery_location","warehouse"];function ye(e){return"supplier"===e.kind?"supplier":"customer"===e.kind?e.category||"importer":e.kind}var be=(e,t=ge)=>t[e]?.tone??"bg-gray-700 text-white",xe=(e,t=ge)=>t[e]?.label??e,ve=(e,t)=>be(ye(e),t);function we(e,t,n=ge){return null!=t?String(t):(n[ye(e)]?.label??"").charAt(0).toUpperCase()}var ke=["delivery_location","warehouse"];function Ne(e,t=ke){const n=/* @__PURE__ */new Map;let r=0;for(const o of e)t.includes(o.kind)&&n.set(pe(o),++r);return n}function Me(e){const t={onMap:0,approximate:0,pending:0,off:0};for(const n of e)me(n)?(t.onMap+=1,"approximate"===n.placement&&(t.approximate+=1)):"pending"===n.placement?t.pending+=1:t.off+=1;return t}function Ce(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 Le(e){const t=[...new Set(e.filter(me).map(ye))];return[...fe.filter(e=>t.includes(e)),...t.filter(e=>!fe.includes(e))]}function Ee(e,t){return e.filter(e=>!me(e)&&"pending"!==e.placement).map(e=>{const n=t?.get(pe(e)),r=he(e.placement)?.replace(/^Not on the map: /,"")??"";return{key:pe(e),text:`${null!=n?`${n}. `:""}${e.label}: ${r}`}})}function $e({categories:e,palette:t=ge,floating:n=!0}){return e.length<2?null:/* @__PURE__ */h("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-3 py-2 text-xs text-gray-600 shadow-sm",children:e.map(e=>/* @__PURE__ */m("span",{className:"inline-flex items-center gap-2",children:[
6
+ /* @__PURE__ */h("span",{"aria-hidden":!0,className:`h-2.5 w-2.5 rounded-full ${be(e,t)}`}),xe(e,t)]},e))})}function Se({point:t,number:n,onOpen:r,onClose:l,palette:i=ge}){const s=he(t.placement),c=ye(t),u=o().map;/* @__PURE__ */
7
7
  return m("section",{"aria-label":u.chosen(t.label),className:"absolute bottom-3 left-3 right-3 z-10 max-w-md space-y-2 rounded-lg border border-gray-200 bg-white p-3 shadow-(--elevation-panel)",children:[
8
8
  /* @__PURE__ */m("div",{className:"flex items-start justify-between gap-2",children:[
9
9
  /* @__PURE__ */m("div",{className:"min-w-0",children:[
10
10
  /* @__PURE__ */m("h3",{className:"text-sm font-semibold text-gray-900 [overflow-wrap:anywhere]",children:[null!=n&&/* @__PURE__ */m("span",{className:"mr-1 text-gray-400",children:[n,"."]}),t.label,t.code&&/* @__PURE__ */h("span",{className:"ml-2 text-xs font-normal text-gray-400",children:t.code})]}),
11
11
  /* @__PURE__ */h("p",{className:"text-xs text-gray-500",children:i[c]?xe(c,i):t.category})]}),
12
- /* @__PURE__ */h("button",{type:"button",onClick:l,"aria-label":u.closeCard,className:"rounded p-0.5 text-gray-400 hover:text-gray-600",children:/* @__PURE__ */h(r,{name:"close","aria-hidden":!0,className:"h-4 w-4",strokeWidth:2})})]}),
13
- /* @__PURE__ */h("p",{className:"text-sm text-gray-700 [overflow-wrap:anywhere]",children:t.address||"—"}),s&&/* @__PURE__ */h("p",{className:"text-xs text-gray-500",children:s}),t.matched&&"approximate"===t.placement&&/* @__PURE__ */m("p",{className:"text-xs text-gray-400 [overflow-wrap:anywhere]",children:["Placed at: ",t.matched]}),a&&/* @__PURE__ */h("div",{className:"flex justify-end",children:/* @__PURE__ */h(e,{variant:"secondary",size:"sm",onClick:a,children:u.openRecord})})]})}function je(e,t,{staleTime:n}={}){return f({queryKey:e,queryFn:t,staleTime:n,refetchInterval:e=>de(e.state.data)})}function Ae({queryKey:e,queryFn:t,refreshSignal:n,onOpen:r,ariaLabel:o,title:c="Locations",palette:d=ge,numbers:p,className:g="",mapClassName:f="min-h-[240px] flex-1"}){const{data:y,isError:b,refetch:x}=je(e,t,{staleTime:0}),v=l(!1);s(()=>{v.current?x():v.current=!0},[n]);const[w,k]=i(null),N=u(()=>y?.points??[],[y]),M=u(()=>p??Ne(N),[p,N]),C=u(()=>N.filter(me).map(e=>({key:pe(e),label:e.label,lat:e.lat,lng:e.lng,glyph:we(e,M.get(pe(e))??null,d),tone:ve(e,d),approximate:"approximate"===e.placement})),[N,M,d]),L=u(()=>Ee(N,M),[N,M]),E=u(()=>Le(N),[N]),$=y?.pending??0,S=N.find(e=>pe(e)===w)??null,j=S&&r?r(S):null;/* @__PURE__ */
12
+ /* @__PURE__ */h("button",{type:"button",onClick:l,"aria-label":u.closeCard,className:"rounded p-0.5 text-gray-400 hover:text-gray-600",children:/* @__PURE__ */h(a,{name:"close","aria-hidden":!0,className:"h-4 w-4",strokeWidth:2})})]}),
13
+ /* @__PURE__ */h("p",{className:"text-sm text-gray-700 [overflow-wrap:anywhere]",children:t.address||"—"}),s&&/* @__PURE__ */h("p",{className:"text-xs text-gray-500",children:s}),t.matched&&"approximate"===t.placement&&/* @__PURE__ */m("p",{className:"text-xs text-gray-400 [overflow-wrap:anywhere]",children:["Placed at: ",t.matched]}),r&&/* @__PURE__ */h("div",{className:"flex justify-end",children:/* @__PURE__ */h(e,{variant:"secondary",size:"sm",onClick:r,children:u.openRecord})})]})}function je(e,t,{staleTime:n}={}){return f({queryKey:e,queryFn:t,staleTime:n,refetchInterval:e=>de(e.state.data)})}function Ae({queryKey:e,queryFn:t,refreshSignal:n,onOpen:o,ariaLabel:a,title:c="Locations",palette:d=ge,numbers:p,className:g="",mapClassName:f="min-h-[240px] flex-1"}){const{data:y,isError:b,refetch:x}=je(e,t,{staleTime:0}),v=l(!1);s(()=>{v.current?x():v.current=!0},[n]);const[w,k]=i(null),N=u(()=>y?.points??[],[y]),M=u(()=>p??Ne(N),[p,N]),C=u(()=>N.filter(me).map(e=>({key:pe(e),label:e.label,lat:e.lat,lng:e.lng,glyph:we(e,M.get(pe(e))??null,d),tone:ve(e,d),approximate:"approximate"===e.placement})),[N,M,d]),L=u(()=>Ee(N,M),[N,M]),E=u(()=>Le(N),[N]),$=y?.pending??0,S=N.find(e=>pe(e)===w)??null,j=S&&o?o(S):null;/* @__PURE__ */
14
14
  return m("section",{"aria-label":c,className:`flex min-w-0 flex-col ${g}`,children:[
15
15
  /* @__PURE__ */m("div",{className:"flex min-h-[30px] items-center justify-between mb-2",children:[
16
16
  /* @__PURE__ */h("h3",{className:"text-sm font-semibold text-gray-900",children:c}),y&&/* @__PURE__ */h("span",{className:"text-xs text-gray-500",children:Ce(Me(N))})]}),
17
- /* @__PURE__ */m(le,{pins:C,selectedKey:w,focus:null,onSelect:k,ariaLabel:o,className:f,children:[
17
+ /* @__PURE__ */m(le,{pins:C,selectedKey:w,focus:null,onSelect:k,ariaLabel:a,className:f,children:[
18
18
  /* @__PURE__ */m("div",{className:"absolute left-3 top-3 z-10 flex max-w-[70%] flex-col items-start gap-2",children:[
19
19
  /* @__PURE__ */h($e,{categories:E,palette:d,floating:!1}),b&&/* @__PURE__ */m("div",{className:"flex items-center gap-2 rounded-lg border border-gray-200 bg-white px-3 min-h-8 py-1 text-xs text-gray-600 shadow-sm",children:["Couldn’t load the locations.",
20
20
  /* @__PURE__ */h("button",{type:"button",onClick:()=>{x()},className:"font-medium text-blue-600 hover:text-blue-800 hover:underline",children:"Try again"})]}),!b&&($>0||L.length>0)&&/* @__PURE__ */m("div",{className:"max-w-full space-y-0.5 rounded-lg border border-gray-200 bg-white px-3 py-2 text-xs shadow-sm","aria-live":"polite",children:[$>0&&/* @__PURE__ */m("p",{className:"flex items-center gap-2 text-gray-500",children:[
21
- /* @__PURE__ */h(a,{}),"Locating ",$," address",1===$?"":"es"]}),L.slice(0,3).map(e=>/* @__PURE__ */h("p",{className:"truncate text-amber-700",title:e.text,children:e.text},e.key)),L.length>3&&/* @__PURE__ */m("p",{className:"text-gray-500",children:["+",L.length-3," more not on the map"]})]})]}),S&&/* @__PURE__ */h(Se,{point:S,number:M.get(pe(S))??null,onOpen:j,onClose:()=>k(null),palette:d})]})]})}export{w as CARD_MIN_MAP_WIDTH,y as COMPACT_SHOW,le as EntityMap,Ae as LocationsMap,C as MAPLIBRE_WORKER_FILE,A as MAP_APART_PX,ge as MAP_CATEGORIES,j as MAP_STOP_PX,S as MAP_TARGET_PX,$e as MapLegend,ue as PENDING_POLL_MS,ke as SECONDARY_KINDS,Se as SelectedCard,N as cardMaxHeight,xe as categoryLabel,be as categoryTone,b as foldAttributionOnce,me as isOnMap,K as layoutPins,Le as legendCategories,$ as loadMapLibre,Ne as locationNumbers,L as mapLibreWorkerUrl,de as mapPointsRefetchInterval,Ee as offMapNotes,ye as pinCategory,we as pinGlyph,ve as pinTone,M as placeCard,he as placementNote,pe as pointKey,z as stopsLabel,Me as summarize,Ce as summaryText,ce as useMapHighlight,je as useMapPoints,W as zoomApart};
21
+ /* @__PURE__ */h(r,{}),"Locating ",$," address",1===$?"":"es"]}),L.slice(0,3).map(e=>/* @__PURE__ */h("p",{className:"truncate text-amber-700",title:e.text,children:e.text},e.key)),L.length>3&&/* @__PURE__ */m("p",{className:"text-gray-500",children:["+",L.length-3," more not on the map"]})]})]}),S&&/* @__PURE__ */h(Se,{point:S,number:M.get(pe(S))??null,onOpen:j,onClose:()=>k(null),palette:d})]})]})}export{w as CARD_MIN_MAP_WIDTH,y as COMPACT_SHOW,le as EntityMap,Ae as LocationsMap,C as MAPLIBRE_WORKER_FILE,A as MAP_APART_PX,ge as MAP_CATEGORIES,j as MAP_STOP_PX,S as MAP_TARGET_PX,$e as MapLegend,ue as PENDING_POLL_MS,ke as SECONDARY_KINDS,Se as SelectedCard,N as cardMaxHeight,xe as categoryLabel,be as categoryTone,b as foldAttributionOnce,me as isOnMap,K as layoutPins,Le as legendCategories,$ as loadMapLibre,Ne as locationNumbers,L as mapLibreWorkerUrl,de as mapPointsRefetchInterval,Ee as offMapNotes,ye as pinCategory,we as pinGlyph,ve as pinTone,M as placeCard,he as placementNote,pe as pointKey,z as stopsLabel,Me as summarize,Ce as summaryText,ce as useMapHighlight,je as useMapPoints,W as zoomApart};
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import{TabStrip as e}from"../chunk-ZN6W2KOC.js";import{useShellLanguage as t}from"../chunk-PBZ2VHS3.js";import"../chunk-YD4DPX4H.js";import{confirm as n}from"../chunk-BY3KWWWU.js";import"../chunk-UNA3BQJI.js";import"../chunk-UVBK6YSR.js";import"../chunk-7IQ3B77H.js";import"../chunk-FIEA5CGB.js";import"../chunk-K7PQXJO7.js";import{useBrowserLayoutEffect as r}from"../chunk-D65T4H6J.js";import"../chunk-3G5TA3IF.js";import{useShellStrings as i}from"../chunk-LVCRH3K6.js";import"../chunk-C3QOHMR6.js";import*as l from"react";import{createContext as c,memo as a,useRef as s,useEffect as o,useMemo as u,useId as y,useCallback as d,useReducer as f,useState as p,useContext as k}from"react";import{useLocation as m,useNavigate as b}from"react-router-dom";import{jsx as v,Fragment as h,jsxs as g}from"react/jsx-runtime";var K=c(null),F=c(null),I=12;var N=(e,t)=>e.filter(e=>e!==t);function T(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=C(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=C(n,e[0].key)}return n}(l,n)}function j(e){let t={...e,activeKey:null};return t.closing&&(t=C(t,t.closing)),t}function C(e,t){return{...e,tabs:e.tabs.filter(e=>e.key!==t),mounted:N(e.mounted,t),dirty:N(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 A(e,t.entry,t.maxTabs);case"transient":return j(e);case"close":{let n=e;for(const e of t.keys)n=C(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]:N(e.dirty,t)}}(e,t.key,t.dirty)}}var M=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:l,pinned:c=[],storageKey:a,maxTabs:k=12,enabled:h=!0,confirmDiscard:g}){const F=m(),I=b(),N=i().pageTabs,C=y(),x=s(l);x.current=l;const B=d(e=>{const t=x.current(e);return t?{key:t.key??e.pathname,path:M(e),title:t.title}:null},[]),{language:L}=t(),[S,D]=f(w,void 0,()=>{const e=function(e,t,n){if(!e)return[];let r;try{r=JSON.parse(e)}catch{return[]}const i=r;if(!i||1!==i.v||!Array.isArray(i.tabs))return[];const l=Boolean(n&&"string"==typeof i.lang&&i.lang!==n),c=[];for(const e of i.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,i=t(r);if(!i||c.some(e=>e.key===i.key))continue;const a=!l&&"page"===e.titleFrom&&"string"==typeof e.title&&e.title;c.push({key:i.key,path:r,title:a||i.title,titleFrom:a?"page":"route",pinned:!1,lastActive:0})}return c}(function(e){if(!e)return null;try{return localStorage.getItem(e)}catch{return null}}(a),e=>B(O(e)),L);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:T(r,n)}}({tabs:[],activeKey:null,mounted:[],dirty:[],closing:null,clock:0,tabs:e},c.map(e=>B(O(e))).filter(e=>Boolean(e)));const n=h?B(F):null;return t=n?A(t,n,k):j(t),t}),R=s(S);R.current=S;const $=s(/* @__PURE__ */new Map),E=h?B(F):null,H=E?.key??null;r(()=>{if(!h)return;const e=B(F);e?($.current.set(e.key,F),D({type:"visit",entry:e,maxTabs:k})):D({type:"transient"})},[F,h,k,B]),o(()=>{const e=new Set(S.tabs.map(e=>e.key));for(const t of $.current.keys())e.has(t)||$.current.delete(t)},[S.tabs]);const W=u(()=>function(e,t){const n={v:1,...t?{lang:t}:{},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(n)}(S,L),[S,L]);o(()=>{if(a)try{localStorage.setItem(a,W)}catch{}},[W,a]);const J=S.dirty.length>0;o(()=>{if(!J)return;const e=e=>{e.preventDefault(),e.returnValue=""};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[J]);const P=s(/* @__PURE__ */new Map),Q=d((e,t)=>{let n=P.current.get(e);return void 0===n&&(n=P.current.size,P.current.set(e,n)),`${C}-page-${t}-${n}`},[C]),V=d(e=>g?g(e):n({title:N.discardTitle,message:1===e.length?N.discardOne:N.discardCount?.(e.length)??`${e.length} ${N.discardMany}`,confirmLabel:N.discardConfirm,cancelLabel:N.keepEditing,variant:"warning"}),[g,N]),U=d(()=>{const e=R.current;return e.tabs.find(e=>e.pinned)?.path??"/"},[]),Y=d((e,t,n)=>{const r=R.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??U()}D({type:"close",keys:e.filter(e=>e!==i),closing:i}),I(l)},[I,U]),G=d(async(e,t={})=>{const n=R.current.tabs.find(t=>t.key===e);return!n||n.pinned?(t.to&&I(t.to),!1):!(!t.force&&R.current.dirty.includes(e)&&!await V([n]))&&(!!R.current.tabs.some(t=>t.key===e)&&(Y([e],t.to),!0))},[V,Y,I]),X=d(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)}(R.current,e,t);const r=R.current.tabs.filter(e=>n.includes(e.key)&&R.current.dirty.includes(e.key));r.length&&!await V(r)&&(n=n.filter(e=>!r.some(t=>t.key===e)));const i=new Set(R.current.tabs.map(e=>e.key));n=n.filter(e=>i.has(e)),n.length&&Y(n,void 0,"all"===e?null:t)},[V,Y]),Z=d(e=>{const t=R.current.tabs.find(t=>t.key===e);t&&e!==R.current.activeKey&&I(t.path)},[I]),z=d((e,t)=>D({type:"title",key:e,title:t}),[]),q=d((e,t)=>D({type:"dirty",key:e,dirty:t}),[]),[_,ee]=p({}),te=d((e,t)=>{ee(n=>{if((n[e]??null)===t)return n;const r={...n};return t?r[e]=t:delete r[e],r})},[]),ne=d(e=>B(e)?.key??null,[B]),re=d(e=>$.current.get(e),[]),ie=u(()=>h?S.tabs.filter(e=>e.key!==S.closing):[],[h,S.tabs,S.closing]),le=u(()=>({enabled:h,state:S,currentKey:H,resolve:l,keyFor:ne,locationFor:re,idFor:Q,activate:Z,close:G,closeMany:X,setTitle:z,setDirty:q,copies:_,setCopy:te,visibleTabs:ie}),[h,S,H,l,ne,re,Q,Z,G,X,z,q,_,te,ie]);/* @__PURE__ */
3
- return v(K.Provider,{value:le,children:e})}var B=l.Activity,L=Boolean(B);function S({active:e,children:t}){return B?/* @__PURE__ */v(B,{mode:e?"visible":"hidden",children:t}):/* @__PURE__ */v(h,{children:t})}var D=a(function({tabKey:e,active:t,location:n,render:i,className:l,panelId:c,tabId:a}){const y=s(null),d=s(t),f=s(/* @__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]),o(()=>{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=u(()=>({key:e,activeRef:d}),[e]);/* @__PURE__ */
4
- return v("div",{ref:y,role:c?"tabpanel":void 0,id:c,"aria-labelledby":a,hidden:!t,style:t?void 0:{display:"none"},className:l,"data-page-tab":e,children:/* @__PURE__ */v(F.Provider,{value:p,children:/* @__PURE__ */v(S,{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)),R="\0transient";function $({children:e,frameClassName:t}){const n=k(K),r=m();if(!n||!n.enabled)/* @__PURE__ */
5
- return v("div",{className:t,children:e(r)},R);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__ */g(h,{children:[s.map(n=>{const i=n===l,s=i?r:c(n);return s?/* @__PURE__ */v(D,{tabKey:n,active:i,location:s,render:e,className:t,panelId:a(n,"panel"),tabId:a(n,"tab")},n):null}),!l&&/* @__PURE__ */v(D,{tabKey:R,active:!0,location:r,render:e,className:t},R)]})}function E({className:t,activeClassName:n,end:r}){const l=k(K),c=i().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 v(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:r})}var H={enabled:!1,tabs:[],activeKey:null,activate:()=>{},close:async()=>!1,closeOthers:async()=>{},closeRight:async()=>{},closeAll:async()=>{}};function W(){const e=k(K);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)}:H}function J(){const e=k(K),t=k(F),n=b();return{key:e?.enabled&&t?t.key:null,close:d(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=k(K),n=k(F),r=t?.enabled?t.setTitle:void 0,i=n?.key;o(()=>{r&&i&&e&&r(i,e)},[r,i,e])}function Q(e){const t=k(K),n=k(F),r=t?.enabled?t.setCopy:void 0,i=n?.key;o(()=>{if(r&&i)return r(i,e||null),()=>r(i,null)},[r,i,e])}function V(e){const t=k(K),n=k(F),r=t?.enabled?t.setDirty:void 0;o(()=>{if(r&&n)return r(n.key,e),()=>{n.activeRef.current&&r(n.key,!1)}},[r,n,e])}export{I as DEFAULT_MAX_TABS,L as PAGE_TABS_PAUSE_HIDDEN,E as PageTabBar,$ as PageTabsOutlet,x as PageTabsProvider,O as parseTabPath,J as usePageTab,Q as usePageTabCopy,V as usePageTabDirty,P as usePageTabTitle,W as usePageTabs};
2
+ import{TabStrip as e}from"../chunk-G4UIEBPD.js";import{useShellLanguage as t}from"../chunk-PBZ2VHS3.js";import"../chunk-CWCKDF37.js";import{confirm as n}from"../chunk-UNLQRUWP.js";import"../chunk-UNA3BQJI.js";import"../chunk-UVBK6YSR.js";import"../chunk-7IQ3B77H.js";import"../chunk-FIEA5CGB.js";import"../chunk-K7PQXJO7.js";import{useShellStrings as r}from"../chunk-LVCRH3K6.js";import"../chunk-C3QOHMR6.js";import{useBrowserLayoutEffect as i}from"../chunk-D65T4H6J.js";import"../chunk-3G5TA3IF.js";import*as l from"react";import{createContext as c,memo as a,useRef as s,useEffect as o,useMemo as u,useId as y,useCallback as d,useReducer as f,useState as p,useContext as k}from"react";import{useLocation as m,useNavigate as b}from"react-router-dom";import{jsx as v,Fragment as h,jsxs as g}from"react/jsx-runtime";var K=c(null),F=c(null),I=12;var N=(e,t)=>e.filter(e=>e!==t);function T(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=j(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=j(n,e[0].key)}return n}(l,n)}function C(e){let t={...e,activeKey:null};return t.closing&&(t=j(t,t.closing)),t}function j(e,t){return{...e,tabs:e.tabs.filter(e=>e.key!==t),mounted:N(e.mounted,t),dirty:N(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 A(e,t.entry,t.maxTabs);case"transient":return C(e);case"close":{let n=e;for(const e of t.keys)n=j(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]:N(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 B({children:e,resolve:l,pinned:c=[],storageKey:a,maxTabs:k=12,enabled:h=!0,confirmDiscard:g}){const F=m(),I=b(),N=r().pageTabs,j=y(),B=s(l);B.current=l;const L=d(e=>{const t=B.current(e);return t?{key:t.key??e.pathname,path:M(e),title:t.title}:null},[]),{language:O}=t(),[R,S]=f(w,void 0,()=>{const e=function(e,t,n){if(!e)return[];let r;try{r=JSON.parse(e)}catch{return[]}const i=r;if(!i||1!==i.v||!Array.isArray(i.tabs))return[];const l=Boolean(n&&"string"==typeof i.lang&&i.lang!==n),c=[];for(const e of i.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,i=t(r);if(!i||c.some(e=>e.key===i.key))continue;const a=!l&&"page"===e.titleFrom&&"string"==typeof e.title&&e.title;c.push({key:i.key,path:r,title:a||i.title,titleFrom:a?"page":"route",pinned:!1,lastActive:0})}return c}(function(e){if(!e)return null;try{return localStorage.getItem(e)}catch{return null}}(a),e=>L(x(e)),O);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:T(r,n)}}({tabs:[],activeKey:null,mounted:[],dirty:[],closing:null,clock:0,tabs:e},c.map(e=>L(x(e))).filter(e=>Boolean(e)));const n=h?L(F):null;return t=n?A(t,n,k):C(t),t}),D=s(R);D.current=R;const E=s(/* @__PURE__ */new Map),$=h?L(F):null,P=$?.key??null;i(()=>{if(!h)return;const e=L(F);e?(E.current.set(e.key,F),S({type:"visit",entry:e,maxTabs:k})):S({type:"transient"})},[F,h,k,L]),o(()=>{const e=new Set(R.tabs.map(e=>e.key));for(const t of E.current.keys())e.has(t)||E.current.delete(t)},[R.tabs]);const H=u(()=>function(e,t){const n={v:1,...t?{lang:t}:{},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(n)}(R,O),[R,O]);o(()=>{if(a)try{localStorage.setItem(a,H)}catch{}},[H,a]);const J=R.dirty.length>0;o(()=>{if(!J)return;const e=e=>{e.preventDefault(),e.returnValue=""};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[J]);const Q=s(/* @__PURE__ */new Map),U=d((e,t)=>{let n=Q.current.get(e);return void 0===n&&(n=Q.current.size,Q.current.set(e,n)),`${j}-page-${t}-${n}`},[j]),V=d(e=>g?g(e):n({title:N.discardTitle,message:1===e.length?N.discardOne:N.discardCount?.(e.length)??`${e.length} ${N.discardMany}`,confirmLabel:N.discardConfirm,cancelLabel:N.keepEditing,variant:"warning"}),[g,N]),W=d(()=>{const e=D.current;return e.tabs.find(e=>e.pinned)?.path??"/"},[]),G=d((e,t,n)=>{const r=D.current,i=r.activeKey;if(!i||!e.includes(i))return void S({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??W()}S({type:"close",keys:e.filter(e=>e!==i),closing:i}),I(l)},[I,W]),z=d(async(e,t={})=>{const n=D.current.tabs.find(t=>t.key===e);return!n||n.pinned?(t.to&&I(t.to),!1):!(!t.force&&D.current.dirty.includes(e)&&!await V([n]))&&(!!D.current.tabs.some(t=>t.key===e)&&(G([e],t.to),!0))},[V,G,I]),X=d(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)}(D.current,e,t);const r=D.current.tabs.filter(e=>n.includes(e.key)&&D.current.dirty.includes(e.key));r.length&&!await V(r)&&(n=n.filter(e=>!r.some(t=>t.key===e)));const i=new Set(D.current.tabs.map(e=>e.key));n=n.filter(e=>i.has(e)),n.length&&G(n,void 0,"all"===e?null:t)},[V,G]),Y=d(e=>{const t=D.current.tabs.find(t=>t.key===e);t&&e!==D.current.activeKey&&I(t.path)},[I]),Z=d((e,t)=>S({type:"title",key:e,title:t}),[]),q=d((e,t)=>S({type:"dirty",key:e,dirty:t}),[]),[_,ee]=p({}),te=d((e,t)=>{ee(n=>{if((n[e]??null)===t)return n;const r={...n};return t?r[e]=t:delete r[e],r})},[]),ne=d(e=>L(e)?.key??null,[L]),re=d(e=>E.current.get(e),[]),ie=u(()=>h?R.tabs.filter(e=>e.key!==R.closing):[],[h,R.tabs,R.closing]),le=u(()=>({enabled:h,state:R,currentKey:P,resolve:l,keyFor:ne,locationFor:re,idFor:U,activate:Y,close:z,closeMany:X,setTitle:Z,setDirty:q,copies:_,setCopy:te,visibleTabs:ie}),[h,R,P,l,ne,re,U,Y,z,X,Z,q,_,te,ie]);/* @__PURE__ */
3
+ return v(K.Provider,{value:le,children:e})}var L=l.Activity,O=Boolean(L);function R({active:e,children:t}){return L?/* @__PURE__ */v(L,{mode:e?"visible":"hidden",children:t}):/* @__PURE__ */v(h,{children:t})}var S=a(function({tabKey:e,active:t,location:n,render:r,className:l,panelId:c,tabId:a}){const y=s(null),d=s(t),f=s(/* @__PURE__ */new Map);i(()=>{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]),o(()=>{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=u(()=>({key:e,activeRef:d}),[e]);/* @__PURE__ */
4
+ return v("div",{ref:y,role:c?"tabpanel":void 0,id:c,"aria-labelledby":a,hidden:!t,style:t?void 0:{display:"none"},className:l,"data-page-tab":e,children:/* @__PURE__ */v(F.Provider,{value:p,children:/* @__PURE__ */v(R,{active:t,children:r(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)),D="\0transient";function E({children:e,frameClassName:t}){const n=k(K),r=m();if(!n||!n.enabled)/* @__PURE__ */
5
+ return v("div",{className:t,children:e(r)},D);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__ */g(h,{children:[s.map(n=>{const i=n===l,s=i?r:c(n);return s?/* @__PURE__ */v(S,{tabKey:n,active:i,location:s,render:e,className:t,panelId:a(n,"panel"),tabId:a(n,"tab")},n):null}),!l&&/* @__PURE__ */v(S,{tabKey:D,active:!0,location:r,render:e,className:t},D)]})}function $({className:t,activeClassName:n,end:i}){const l=k(K),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 v(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(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:c.label,className:t,activeClassName:n,end:i})}var P={enabled:!1,tabs:[],activeKey:null,activate:()=>{},close:async()=>!1,closeOthers:async()=>{},closeRight:async()=>{},closeAll:async()=>{}};function H(){const e=k(K);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)}:P}function J(){const e=k(K),t=k(F),n=b();return{key:e?.enabled&&t?t.key:null,close:d(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 Q(e){const t=k(K),n=k(F),r=t?.enabled?t.setTitle:void 0,i=n?.key;o(()=>{r&&i&&e&&r(i,e)},[r,i,e])}function U(e){const t=k(K),n=k(F),r=t?.enabled?t.setCopy:void 0,i=n?.key;o(()=>{if(r&&i)return r(i,e||null),()=>r(i,null)},[r,i,e])}function V(e){const t=k(K),n=k(F),r=t?.enabled?t.setDirty:void 0;o(()=>{if(r&&n)return r(n.key,e),()=>{n.activeRef.current&&r(n.key,!1)}},[r,n,e])}export{I as DEFAULT_MAX_TABS,O as PAGE_TABS_PAUSE_HIDDEN,$ as PageTabBar,E as PageTabsOutlet,B as PageTabsProvider,x as parseTabPath,J as usePageTab,U as usePageTabCopy,V as usePageTabDirty,Q 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-LGD633HY.js"));export{e as PdfViewer};
2
+ import{lazy as r}from"react";var e=r(()=>import("../PdfViewer-VJ743BW7.js"));export{e as PdfViewer};
@@ -1 +1 @@
1
- export{startClientTelemetry}from"../chunk-NT4SZH5L.js";import"../chunk-7TD4XKYF.js";import"../chunk-KNUR2UEG.js";
1
+ export{startClientTelemetry}from"../chunk-ABKFLSHY.js";import"../chunk-NGWXT4QX.js";import"../chunk-KNUR2UEG.js";
@@ -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 AlignmentGrid, k as AlignmentGridProps, l as AlignmentPoint, m as AngleScale, n as AppUpdateBanner, o as AppUpdateBannerProps, p as AttachButton, q as AttachButtonProps, r as AttachmentDropZone, s as AttachmentDropZoneProps, t as AttachmentList, u as AttachmentListProps, v as AuthScreen, w as AuthScreenProps, x as Avatar, y as AvatarGroup, z as AvatarGroupProps, B as AvatarProps, D as AvatarSize, E as AvatarStatus, F as BORDER_LINE_STYLES, G as BORDER_WIDTHS, H as BackgroundVariant, I as BandScale, J as Banner, K as BannerEmphasis, L as BannerProps, M as BannerTone, N as BorderInput, O as BorderInputProps, Q as BorderLineStyle, R as BorderRole, T as BorderValue, U as BoxPlotBox, V as BoxPlotChart, W as BoxPlotChartProps, X as BrandAssetEditor, Y as BrandAssetEditorProps, Z as BrandAssetPreview, _ as BrandMark, $ as BrandMarkProps, a0 as BrandMarkSlot, a1 as BrandMarkSurface, a2 as BrandMarkTreatment, a3 as BreadcrumbItem, a4 as Breadcrumbs, a5 as BreadcrumbsProps, a6 as BudgetBar, a7 as BudgetBarProps, a8 as BudgetState, a9 as Button, aa as ButtonClassesOptions, ab as ButtonProps, ac as ButtonSize, ad as ButtonVariant, ae as CHART_INK, af as CMD_A, ag as CMD_DOT, ah as CMD_ENTER, ai as CMD_K, aj as CMD_S, ak as COLUMN_COUNT_MAX, al as COLUMN_COUNT_WIDTHS, am as COLUMN_SHARES_EQUAL, an as COLUMN_SHARE_MIN, ao as CONTROL_HEIGHTS, ap as CORNERS, aq as CORNERS_FOR_THEME, ar as Calendar, as as CalendarMode, at as CalendarProps, au as Candle, av as CandlestickChart, aw as CandlestickChartProps, ax as Card, ay as CardPadding, az as CardProps, aA as CardTone, aB as CartesianPlot, aC as CartesianPlotProps, aD as CellStyle, aE as ChartBackgroundVariant, aF as ChartBrush, aG as ChartBrushProps, aH as ChartCurve, aI as ChartDefs, aJ as ChartDefsProps, aK as ChartDot, aL as ChartDotProps, aM as ChartDotVariant, aN as ChartFillVariant, aO as ChartFrame, aP as ChartFrameProps, aQ as ChartHighlightProvider, aR as ChartLegendEntry, aS as ChartLegendSwatch, aT as ChartRange, aU as ChartReferenceLine, aV as ChartRevealDirection, aW as ChartSkeleton, aX as ChartSkeletonProps, aY as ChartStatusTone, aZ as ChartStrokeVariant, a_ as ChartTooltip, a$ as ChartTooltipProps, b0 as ChartTooltipRow, b1 as ChatTemplate, b2 as Checkbox, b3 as CheckboxProps, b4 as CheckoutTemplate, b5 as ChordChart, b6 as ChordChartProps, b7 as ColorPicker, b8 as ColorPickerPanel, b9 as ColorPickerPanelProps, ba as ColorPickerProps, bb as ColorPreset, bc as ColorSwatch, bd as ColorSwatchProps, be as ColorSwatchSize, bf as ColoredBadge, bg as ColoredBadgeProps, bh as ColumnChart, bi as ColumnChartProps, C as ColumnDef, bj as ColumnSeries, bk as ColumnShares, bl as ComposerAttachments, bm as ComposerAttachmentsProps, bn as ConfirmProvider, bo as ContainerFillChart, bp as ContainerFillChartProps, bq as ContainerFillItem, br as ContextMenu, bs as ContextMenuPoint, bt as ContextMenuProps, bu as ContextMenuState, bv as ControlSize, bw as CornerOption, bx as Corners, by as CornersInput, bz as CornersInputProps, bA as CountBadge, bB as CountBadgeProps, bC as CountBadgeTone, bD as Curve, bE as DAY_MS, bF as DashboardTemplate, bG as DataTable, bH as DataTableColumn, bI as DataTableColumnGroup, bJ as DataTableHeader, bK as DataTablePage, bL as DataTableProps, bM as DataTableRowLink, bN as DataTableRowProps, bO as DatePicker, bP as DatePickerProps, bQ as DateRangePicker, bR as DateRangePickerProps, bS as DateTimePicker, bT as DateTimePickerProps, bU as DescriptionColumns, bV as DescriptionItem, bW as DescriptionList, bX as DescriptionListProps, bY as Dialog, bZ as DialogProps, b_ as DialogSize, b$ as DisplayChipItem, c0 as DisplayChips, c1 as DisplayChipsProps, c2 as Divider, c3 as DividerProps, c4 as DividerSpacing, c5 as Drawer, c6 as DrawerProps, c7 as DrawerSide, c8 as DrawerSize, c9 as DropdownMenu, ca as DropdownMenuAlign, cb as DropdownMenuCheckboxItem, cc as DropdownMenuDividerItem, cd as DropdownMenuEntry, ce as DropdownMenuItem, cf as DropdownMenuLabelItem, cg as DropdownMenuLinkItem, ch as DropdownMenuProps, ci as DropdownMenuRadioItem, cj as DropdownMenuSide, ck as DropdownMenuStatusItem, cl as DropdownPositionOptions, cm as ELEVATION_LEVELS, cn as ENGLISH, co as ENTER, cp as EditableGrid, cq as EditableGridProps, cr as ElevationLevel, cs as EmailTemplate, ct as EmptyState, cu as EmptyStateProps, cv as EmptyValue, cw as EmptyValueProps, cx as ErrorBoundary, cy as ErrorBoundaryProps, cz as ErrorPage, cA as ErrorPageProps, cB as FONT_WEIGHTS, cC as FileIntake, cD as FilePicker, cE as FilePickerProps, cF as FillVariant, cG as FloatingBar, cH as FloatingBarAlign, cI as FloatingBarProps, cJ as FloatingBarSide, cK as FontWeightRole, cL as FormError, cM as FormErrorSummary, cN as FormErrorSummaryProps, cO as FormField, cP as FormFieldProps, cQ as FormLayoutPage, cR as FunnelChart, cS as FunnelChartProps, cT as FunnelStage, cU as GLASS_DIVIDER, cW as GROUP_COLORS, cX as GROUP_COLORS_SOLID, cY as GalleryTemplate, cZ as Gap, c_ as GlassOptions, c$ as GlobalSearch, d0 as GlobalSearchProps, d1 as Grid, d2 as GridCols, d3 as GridColumn, d4 as GridProps, d5 as HeatmapChart, d6 as HeatmapChartProps, d7 as HelpCenter, d8 as HelpCenterDoc, d9 as HelpCenterProps, da as HexInput, db as HistogramBin, dc as HistogramChart, dd as HistogramChartProps, de as Hsv, df as INPUT_BASE, dg as INPUT_SIZES, dh as IconButton, di as IconButtonClassesOptions, dj as IconButtonProps, dk as IconPicker, dl as IconPickerOption, dm as IconPickerProps, dn as IconRail, dp as IconRailButton, dq as IconRailButtonProps, dr as IconRailLabels, ds as IconRailLabelsShown, dt as IconRailOrientation, du as IconRailProps, dv as ImageFocusPoint, dw as ImageFocusPointProps, dx as Inline, dy as InlineProps, dz as Input, dA as InputNumber, dB as InputNumberProps, dC as InputProps, dD as InputSize, dE as Justify, dF as Kanban, dG as KanbanColumn, dH as KanbanProps, dI as Kbd, dJ as KbdProps, dK as KbdSize, dL as KbdTone, dM as Label, dN as LabelClassesOptions, dO as LabelProps, dP as LadderScale, dQ as LanguagePanel, dR as LanguagePanelProps, dS as LanguageSelect, dT as LanguageSelectProps, dU as LinearScale, dV as LinkFilter, dW as LinkFilterField, dX as LinkKindChoice, dY as LinkOption, dZ as LinkOptionGroup, d_ as LinkPicker, d$ as LinkPickerFieldProps, e0 as LinkPickerProps, e1 as LinkPickerWindowProps, e2 as LinkRules, e3 as LinkTarget, e4 as ListDrop, e5 as ListFooter, e6 as ListLoadError, e7 as ListLoadErrorProps, e8 as ListMove, e9 as ListRow, ea as ListRowProps, eb as LoadingSpinner, ec as LoadingSpinnerProps, ed as MAX_FRACTION_DIGITS, ee as MENU_MAX_HEIGHT, ef as MOD, eg as MOTION, eh as MOTION_DURATIONS, ei as Markdown, ei as MarkdownLite, ej as MarkdownLiteProps, ej as MarkdownProps, ek as MediaUploadField, el as MediaUploadFieldProps, em as MediaUploadGrid, en as MediaUploadGridItem, eo as MediaUploadGridProps, ep as MenuPos, eq as Meter, er as MeterProps, es as MetricBar, et as MetricBarProps, eu as Milestone, ev as MilestoneKind, ew as MilestoneTimeline, ex as MilestoneTimelineProps, ey as MotionSpeed, eA as NEXT_CHUNK_PATH_PREFIX, eB as NativeSelect, eC as NiceAxis, eD as NumericKeypad, eE as NumericKeypadProps, eF as OVERLAY_OPEN_EVENT, eG as PLACEHOLDER_INK, eH as POPUP_MAX_WIDTH, eI as POST_PRODUCTION_STATUSES, eJ as PageHeader, eK as PageHeaderProps, P as PaginatedResponse, eL as Pagination, eM as PaginationProps, eN as PaperclipGlyph, eO as Paragraph, eP as ParagraphProps, eQ as PieChart, eR as PieChartProps, eS as PieSegment, eT as PlotGeometry, eU as Point, eV as Popover, eW as PopoverAlign, eX as PopoverProps, eY as PopoverRenderProps, eZ as PopoverSide, e_ as PopupMenu, e$ as PopupMenuDivider, f0 as PopupMenuItem, f1 as PopupMenuItemProps, f2 as PopupMenuLabel, f3 as PopupMenuProps, f4 as PopupSubmenu, f5 as PopupSubmenuProps, f6 as PortalBrandingContextValue, f7 as PortalBrandingProvider, f8 as PortalBrandingProviderProps, f9 as ProductionTimeline, fa as ProductionTimelineProps, fb as ProductionTimelineSnapshot, fc as ProgressItem, fd as PublicPortal, fe as PublicPortalBranding, ff as RADAR_SERIES_CAP, fg as RADIUS_ROLES, fh as ROW_HEIGHTS, fi as RadarAxis, fj as RadarChart, fk as RadarChartProps, fl as RadarSeries, fm as RadialBarChart, fn as RadialBarChartProps, fo as RadialBarRow, fp as Radio, fq as RadioGroup, fr as RadioGroupOption, fs as RadioGroupOrientation, ft as RadioGroupProps, fu as RadioProps, fv as RadiusRole, fw as Range, fx as RangeChart, fy as RangeChartProps, fz as RangeRow, fA as RankedBars, fB as RankedBarsProps, fC as RankedBarsRow, fD as ResizeHandle, fE as ResizeHandleOrientation, fF as ResizeHandleProps, fG as ResizeHandleSide, fH as ResizeHandleStackSide, fI as ResolvedPortalBrandAsset, fJ as Result, fK as ResultProps, fL as ResultStatus, fM as RevealDirection, fN as SCATTER_SERIES_CAP, fO as SERIES_SLOT_COUNT, fP as SERIES_VARS, fQ as SHELL_LANGUAGE_STORAGE_KEY, fR as SHIFT, fS as SPACING_ROLES, fT as SPACING_SCALE, fU as STAGES, fV as STALE_CHUNK_RELOAD_COOLDOWN_MS, fW as STALE_CHUNK_RELOAD_KEY, fX as STATUS_VARS, fY as SankeyChart, fZ as SankeyChartProps, f_ as SankeyLink, f$ as SankeyNode, g0 as ScatterChart, g1 as ScatterChartProps, g2 as ScatterPoint, g3 as ScatterSeries, S as SearchConfig, g4 as SearchListRoute, g5 as SearchProvider, g6 as SearchQuickAction, g7 as SearchResponse, g8 as SearchResult, g9 as SearchableItem, ga as SearchableOption, gb as SearchableOptionGroup, gc as SearchableSelect, gd as SearchableSelectBaseProps, ge as SearchableSelectMultipleProps, gf as SearchableSelectProps, gg as Segmented, gh as SegmentedOption, gi as SegmentedProps, gj as SegmentedSize, gk as Select, gl as SelectBaseProps, gm as SelectFooterAction, gn as SelectItem, go as SelectMultipleProps, gp as SelectOption, gq as SelectOptionGroup, gr as SelectProps, gs as SemanticGroup, gt as SeriesSlots, gu as SettingRow, gv as SettingRowProps, gw as SeverityTone, gz as ShellLanguage, gA as ShellLanguageProvider, gB as ShellLanguageState, gC as ShellPrefsAdapter, gD as ShellPrefsProvider, gE as Side, gF as SidebarActionButton, gG as SidebarActionButtonProps, gH as SidebarGroupLabel, gI as SidebarGroupLabelProps, gJ as SidebarLayout, gK as SidebarLayoutProps, gL as SidebarNavGroup, gM as SidebarNavGroupProps, gN as SidebarNavItem, gO as SidebarNavItemProps, gP as SidesEachToggle, gQ as SidesInput, gR as SidesInputProps, gS as SidesValue, gT as Skeleton, gU as SkeletonProps, gV as SkeletonVariant, gW as Slider, gX as SliderGroup, gY as SliderProps, gZ as SliderSize, g_ as Snippet, g$ as SnippetProps, h0 as SnippetSize, h1 as SnippetVariant, a as SortState, h2 as SortableList, h3 as SortableListProps, h4 as SortableListSpacing, h5 as SpacingRole, h6 as SpacingStep, h7 as Sparkline, h8 as SparklineProps, h9 as SpinnerRing, ha as SpinnerRingProps, hb as SplitButton, hc as SplitButtonProps, hd as SplitButtonVariant, he as Stack, hf as StackProps, hg as StaleChunkReloadOptions, hh as StatCard, hi as StatCardProps, hj as StatTile, hk as StatTileProps, hl as Statistic, hm as StatisticProps, hn as StatisticSize, ho as StatisticTone, hp as StatusBadge, hq as StatusBadgeProvider, hr as StatusEmphasis, hs as StepItem, ht as Stepper, hu as StepperProps, hv as StrokeVariant, hw as SunburstChart, hx as SunburstChartProps, hy as SunburstNode, hz as Switch, hA as SwitchProps, hB as SwitchSize, hC as TYPE_SCALE, hD as TabItem, hE as Tabs, hF as TabsProps, hG as TagInput, hH as TagInputOption, hI as TagInputProps, hJ as TagInputTone, hK as Text, hL as TextLinkField, hM as TextLinkFieldProps, hN as TextProps, hO as TextSize, hP as TextTone, hQ as TextToolbar, hR as TextToolbarAlign, hS as TextToolbarCase, hT as TextToolbarMark, hU as TextToolbarProps, hV as TextWeight, hW as Textarea, hX as TextareaProps, hY as Theme, hZ as TileButton, h_ as TileButtonProps, h$ as TileSize, i0 as TimeAgo, i1 as TimeAgoProps, i2 as TimePicker, i3 as TimePickerProps, i4 as TimeSeriesChart, i5 as TimeSeriesChartProps, i6 as TimeSeriesSeries, i7 as TimelineMarker, i8 as TimelineMarkerKind, i9 as TimelineReport, ia as TimelineScrubProgress, ib as TimelineTrack, ic as TimelineTrackItem, id as TimelineTrackKind, ie as TimelineTrackPending, ig as TimelineTrackPhase, ih as TimelineTrackPlayback, ii as TimelineTrackProps, ij as TimelineTrackThumb, ik as Title, il as TitleLevel, im as TitleProps, io as ToastAction, ip as ToastCloseReason, iq as ToastOptions, ir as ToastPlacement, is as ToastUndoableOptions, it as Tooltip, iu as TooltipProps, iv as TopNav, iw as TopNavItem, ix as TopNavProps, iy as TransferProgress, iz as TransferProgressProps, iA as TransferProgressState, iB as Tree, iC as TreeDrop, iD as TreeEmptySlot, iE as TreeEmptySlotProps, iF as TreeGroup, iG as TreeGroupLabel, iH as TreeGroupLabelProps, iI as TreeGroupProps, iJ as TreeMove, iK as TreeProps, iL as TreeRow, iM as TreeRowProps, iN as TreeSeam, iO as TreeSeamProps, iP as TreemapChart, iQ as TreemapChartProps, iR as TreemapItem, iS as TreemapTile, iT as TypeStep, iU as UNDOABLE_MS, iV as UseAppUpdateOptions, iW as UseContextMenu, iX as UseProductionTimelineOpts, iY as VERSION, iZ as VITE_PRELOAD_ERROR_EVENT, i_ as WaterfallChart, i$ as WaterfallChartProps, j0 as WaterfallStep, j1 as WidthsBar, j2 as WidthsBarProps, j3 as ZLayer, j4 as Z_LAYERS, j5 as angleScale, j6 as appendKey, j7 as applyCorners, j8 as applyIconSet, j9 as applyThemePrefs, ja as arcPath, jb as areaBetween, jc as areaFrom, jd as assignSeriesSlots, je as autoHighlightIndex, jf as backspace, jg as bandScale, jh as binValues, ji as borderSides, jj as borderStartEach, jk as budgetState, jl as bumpPath, jm as buttonClasses, jn as calcOverall, jo as calcReportOverall, jp as colorFill, jq as colorSwatchClasses, jr as columnSharesWidths, js as confirm, jt as confirmDestructive, ju as cornersFor, jv as curvePath, jw as dashFor, jy as dismissPopups, jz as fillFor, jA as fillId, jB as fmtSliderDate, jC as fromDateKey, jD as glassStyle, jE as glowId, jF as groundId, jG as groupColors, jH as hexToHsv, jI as highlightOpacity, jJ as hsvToHex, jK as iconButtonClasses, jL as inputClasses, jM as installStaleChunkReload, jN as isMac, jO as isSeverityTone, jP as isSpacingStep, jQ as isStaleChunkError, jS as labelClasses, jT as ladderScale, jU as languageSelectWidth, jV as leavesContextMenuAlone, jW as linearPath, jX as linearScale, jY as logScale, jZ as maskId, j_ as matchShellLanguage, j$ as mediaFileName, k0 as monotonePath, k1 as niceAxis, k2 as niceMax, k3 as openGlobalSearch, k4 as parseHexColor, k5 as polygonPoints, k6 as popupBounds, k7 as prompt, k8 as pushRecentSearch, k9 as radiusScale, ka as readSavedShellLanguage, kb as registerModalEscapeInterceptor, kc as resolveBrandMarkTreatment, kd as resolveColumnShares, ke as resolveColumnWidths, kf as resolveCorners, kg as resolvePortalBrandAsset, kh as resolveSeriesColor, ki as resolveSeriesColorWithin, kj as resolveShellLanguage, kk as resolveTheme, kl as sanitizeRecentSearches, km as saveShellLanguage, kn as seriesColor, ko as severityOf, kp as sidesStartEach, kq as solidSurfaceStyle, kr as splinePath, ks as squarify, kt as stagger, ku as stepPath, kv as tabButtonId, kw as tabPanelId, kx as textToolbarRows, ky as textToolbarWindowColumns, kz as toDateKey, kA as toDayMs, kB as toISODate, kC as toast, kD as toggleSeriesSlot, kE as useAppUpdate, kF as useClickOutside, kG as useConfirm, kH as useContextMenu, kI as useDebouncedValue, kJ as useDropdownPosition, kK as useFocusTrap, kL as useHighlight, kM as useIsMobile, kN as useLocalStoragePrefs, kO as usePlotWidth, kP as usePortalBranding, kQ as useProductionTimeline, kR as useScrollLock, kS as useShellLanguage, kT as useShellPrefs, kU as useStatusLabel, kV as useTheme, kW as useTransferProgress } from '../index-p7sSFfAC.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 AlignmentGrid, k as AlignmentGridProps, l as AlignmentPoint, m as AngleScale, n as AppUpdateBanner, o as AppUpdateBannerProps, p as AttachButton, q as AttachButtonProps, r as AttachmentDropZone, s as AttachmentDropZoneProps, t as AttachmentList, u as AttachmentListProps, v as AuthScreen, w as AuthScreenProps, x as Avatar, y as AvatarGroup, z as AvatarGroupProps, B as AvatarProps, D as AvatarSize, E as AvatarStatus, F as BORDER_LINE_STYLES, G as BORDER_WIDTHS, H as BackgroundVariant, I as BandScale, J as Banner, K as BannerEmphasis, L as BannerProps, M as BannerTone, N as BorderInput, O as BorderInputProps, Q as BorderLineStyle, R as BorderRole, T as BorderValue, U as BoxPlotBox, V as BoxPlotChart, W as BoxPlotChartProps, X as BrandAssetEditor, Y as BrandAssetEditorProps, Z as BrandAssetPreview, _ as BrandMark, $ as BrandMarkProps, a0 as BrandMarkSlot, a1 as BrandMarkSurface, a2 as BrandMarkTreatment, a3 as BreadcrumbItem, a4 as Breadcrumbs, a5 as BreadcrumbsProps, a6 as BudgetBar, a7 as BudgetBarProps, a8 as BudgetState, a9 as Button, aa as ButtonClassesOptions, ab as ButtonProps, ac as ButtonSize, ad as ButtonVariant, ae as CHART_INK, af as CMD_A, ag as CMD_DOT, ah as CMD_ENTER, ai as CMD_K, aj as CMD_S, ak as COLUMN_COUNT_MAX, al as COLUMN_COUNT_WIDTHS, am as COLUMN_SHARES_EQUAL, an as COLUMN_SHARE_MIN, ao as CONTROL_HEIGHTS, ap as CORNERS, aq as CORNERS_FOR_THEME, ar as Calendar, as as CalendarMode, at as CalendarProps, au as Candle, av as CandlestickChart, aw as CandlestickChartProps, ax as Card, ay as CardPadding, az as CardProps, aA as CardTone, aB as CartesianPlot, aC as CartesianPlotProps, aD as CellStyle, aE as ChartBackgroundVariant, aF as ChartBrush, aG as ChartBrushProps, aH as ChartCurve, aI as ChartDefs, aJ as ChartDefsProps, aK as ChartDot, aL as ChartDotProps, aM as ChartDotVariant, aN as ChartFillVariant, aO as ChartFrame, aP as ChartFrameProps, aQ as ChartHighlightProvider, aR as ChartLegendEntry, aS as ChartLegendSwatch, aT as ChartRange, aU as ChartReferenceLine, aV as ChartRevealDirection, aW as ChartSkeleton, aX as ChartSkeletonProps, aY as ChartStatusTone, aZ as ChartStrokeVariant, a_ as ChartTooltip, a$ as ChartTooltipProps, b0 as ChartTooltipRow, b1 as ChatTemplate, b2 as Checkbox, b3 as CheckboxProps, b4 as CheckoutTemplate, b5 as ChordChart, b6 as ChordChartProps, b7 as ColorPicker, b8 as ColorPickerPanel, b9 as ColorPickerPanelProps, ba as ColorPickerProps, bb as ColorPreset, bc as ColorSwatch, bd as ColorSwatchProps, be as ColorSwatchSize, bf as ColoredBadge, bg as ColoredBadgeProps, bh as ColumnChart, bi as ColumnChartProps, C as ColumnDef, bj as ColumnSeries, bk as ColumnShares, bl as ComposerAttachments, bm as ComposerAttachmentsProps, bn as ConfirmProvider, bo as ContainerFillChart, bp as ContainerFillChartProps, bq as ContainerFillItem, br as ContextMenu, bs as ContextMenuPoint, bt as ContextMenuProps, bu as ContextMenuState, bv as ControlSize, bw as CornerOption, bx as Corners, by as CornersInput, bz as CornersInputProps, bA as CountBadge, bB as CountBadgeProps, bC as CountBadgeTone, bD as Curve, bE as DAY_MS, bF as DashboardTemplate, bG as DataTable, bH as DataTableColumn, bI as DataTableColumnGroup, bJ as DataTableHeader, bK as DataTablePage, bL as DataTableProps, bM as DataTableRowLink, bN as DataTableRowProps, bO as DatePicker, bP as DatePickerProps, bQ as DateRangePicker, bR as DateRangePickerProps, bS as DateTimePicker, bT as DateTimePickerProps, bU as DescriptionColumns, bV as DescriptionItem, bW as DescriptionList, bX as DescriptionListProps, bY as Dialog, bZ as DialogProps, b_ as DialogSize, b$ as DisplayChipItem, c0 as DisplayChips, c1 as DisplayChipsProps, c2 as Divider, c3 as DividerProps, c4 as DividerSpacing, c5 as Drawer, c6 as DrawerProps, c7 as DrawerSide, c8 as DrawerSize, c9 as DropdownMenu, ca as DropdownMenuAlign, cb as DropdownMenuCheckboxItem, cc as DropdownMenuDividerItem, cd as DropdownMenuEntry, ce as DropdownMenuFooterApi, cf as DropdownMenuItem, cg as DropdownMenuLabelItem, ch as DropdownMenuLinkItem, ci as DropdownMenuProps, cj as DropdownMenuRadioItem, ck as DropdownMenuSide, cl as DropdownMenuStatusItem, cm as DropdownPositionOptions, cn as ELEVATION_LEVELS, co as ENGLISH, cp as ENTER, cq as EditableGrid, cr as EditableGridProps, cs as ElevationLevel, ct as EmailTemplate, cu as EmptyState, cv as EmptyStateProps, cw as EmptyValue, cx as EmptyValueProps, cy as ErrorBoundary, cz as ErrorBoundaryProps, cA as ErrorPage, cB as ErrorPageProps, cC as FONT_WEIGHTS, cD as FileIntake, cE as FilePicker, cF as FilePickerProps, cG as FillVariant, cH as FloatingBar, cI as FloatingBarAlign, cJ as FloatingBarProps, cK as FloatingBarSide, cL as FontWeightRole, cM as FormError, cN as FormErrorSummary, cO as FormErrorSummaryProps, cP as FormField, cQ as FormFieldProps, cR as FormLayoutPage, cS as FunnelChart, cT as FunnelChartProps, cU as FunnelStage, cV as GLASS_DIVIDER, cX as GROUP_COLORS, cY as GROUP_COLORS_SOLID, cZ as GalleryTemplate, c_ as Gap, c$ as GlassOptions, d0 as GlobalSearch, d1 as GlobalSearchProps, d2 as Grid, d3 as GridCols, d4 as GridColumn, d5 as GridProps, d6 as HeatmapChart, d7 as HeatmapChartProps, d8 as HelpCenter, d9 as HelpCenterDoc, da as HelpCenterProps, db as HexInput, dc as HistogramBin, dd as HistogramChart, de as HistogramChartProps, df as Hsv, dg as INPUT_BASE, dh as INPUT_SIZES, di as IconButton, dj as IconButtonClassesOptions, dk as IconButtonProps, dl as IconPicker, dm as IconPickerOption, dn as IconPickerProps, dp as IconRail, dq as IconRailButton, dr as IconRailButtonProps, ds as IconRailLabels, dt as IconRailLabelsShown, du as IconRailOrientation, dv as IconRailProps, dw as ImageFocusPoint, dx as ImageFocusPointProps, dy as Inline, dz as InlineProps, dA as Input, dB as InputNumber, dC as InputNumberProps, dD as InputProps, dE as InputSize, dF as Justify, dG as Kanban, dH as KanbanColumn, dI as KanbanProps, dJ as Kbd, dK as KbdProps, dL as KbdSize, dM as KbdTone, dN as Label, dO as LabelClassesOptions, dP as LabelProps, dQ as LadderScale, dR as LanguagePanel, dS as LanguagePanelProps, dT as LanguageSelect, dU as LanguageSelectProps, dV as LinearScale, dW as LinkFilter, dX as LinkFilterField, dY as LinkKindChoice, dZ as LinkOption, d_ as LinkOptionGroup, d$ as LinkPicker, e0 as LinkPickerFieldProps, e1 as LinkPickerProps, e2 as LinkPickerWindowProps, e3 as LinkRules, e4 as LinkTarget, e5 as ListDrop, e6 as ListFooter, e7 as ListLoadError, e8 as ListLoadErrorProps, e9 as ListMove, ea as ListRow, eb as ListRowProps, ec as LoadingSpinner, ed as LoadingSpinnerProps, ee as MAX_FRACTION_DIGITS, ef as MENU_MAX_HEIGHT, eg as MOD, eh as MOTION, ei as MOTION_DURATIONS, ej as Markdown, ej as MarkdownLite, ek as MarkdownLiteProps, ek as MarkdownProps, el as MediaUploadField, em as MediaUploadFieldProps, en as MediaUploadGrid, eo as MediaUploadGridItem, ep as MediaUploadGridProps, eq as MenuPos, er as Meter, es as MeterProps, et as MetricBar, eu as MetricBarProps, ev as Milestone, ew as MilestoneKind, ex as MilestoneTimeline, ey as MilestoneTimelineProps, ez as MotionSpeed, eB as NEXT_CHUNK_PATH_PREFIX, eC as NativeSelect, eD as NiceAxis, eE as NumericKeypad, eF as NumericKeypadProps, eG as OVERLAY_OPEN_EVENT, eH as PLACEHOLDER_INK, eI as POPUP_MAX_WIDTH, eJ as POST_PRODUCTION_STATUSES, eK as PageHeader, eL as PageHeaderProps, P as PaginatedResponse, eM as Pagination, eN as PaginationProps, eO as PaperclipGlyph, eP as Paragraph, eQ as ParagraphProps, eR as PieChart, eS as PieChartProps, eT as PieSegment, eU as PlotGeometry, eV as Point, eW as Popover, eX as PopoverAlign, eY as PopoverProps, eZ as PopoverRenderProps, e_ as PopoverSide, e$ as PopupMenu, f0 as PopupMenuDivider, f1 as PopupMenuItem, f2 as PopupMenuItemProps, f3 as PopupMenuLabel, f4 as PopupMenuProps, f5 as PopupSubmenu, f6 as PopupSubmenuProps, f7 as PortalBrandingContextValue, f8 as PortalBrandingProvider, f9 as PortalBrandingProviderProps, fa as ProductionTimeline, fb as ProductionTimelineProps, fc as ProductionTimelineSnapshot, fd as ProgressItem, fe as PublicPortal, ff as PublicPortalBranding, fg as RADAR_SERIES_CAP, fh as RADIUS_ROLES, fi as ROW_HEIGHTS, fj as RadarAxis, fk as RadarChart, fl as RadarChartProps, fm as RadarSeries, fn as RadialBarChart, fo as RadialBarChartProps, fp as RadialBarRow, fq as Radio, fr as RadioGroup, fs as RadioGroupOption, ft as RadioGroupOrientation, fu as RadioGroupProps, fv as RadioProps, fw as RadiusRole, fx as Range, fy as RangeChart, fz as RangeChartProps, fA as RangeRow, fB as RankedBars, fC as RankedBarsProps, fD as RankedBarsRow, fE as ResizeHandle, fF as ResizeHandleOrientation, fG as ResizeHandleProps, fH as ResizeHandleSide, fI as ResizeHandleStackSide, fJ as ResolvedPortalBrandAsset, fK as Result, fL as ResultProps, fM as ResultStatus, fN as RevealDirection, fO as SCATTER_SERIES_CAP, fP as SERIES_SLOT_COUNT, fQ as SERIES_VARS, fR as SHELL_LANGUAGE_STORAGE_KEY, fS as SHIFT, fT as SPACING_ROLES, fU as SPACING_SCALE, fV as STAGES, fW as STALE_CHUNK_RELOAD_COOLDOWN_MS, fX as STALE_CHUNK_RELOAD_KEY, fY as STATUS_VARS, fZ as SankeyChart, f_ as SankeyChartProps, f$ as SankeyLink, g0 as SankeyNode, g1 as ScatterChart, g2 as ScatterChartProps, g3 as ScatterPoint, g4 as ScatterSeries, S as SearchConfig, g5 as SearchListRoute, g6 as SearchProvider, g7 as SearchQuickAction, g8 as SearchResponse, g9 as SearchResult, ga as SearchableItem, gb as SearchableOption, gc as SearchableOptionGroup, gd as SearchableSelect, ge as SearchableSelectBaseProps, gf as SearchableSelectMultipleProps, gg as SearchableSelectProps, gh as Segmented, gi as SegmentedOption, gj as SegmentedProps, gk as SegmentedSize, gl as Select, gm as SelectBaseProps, gn as SelectFooterAction, go as SelectItem, gp as SelectMultipleProps, gq as SelectOption, gr as SelectOptionGroup, gs as SelectProps, gt as SemanticGroup, gu as SeriesSlots, gv as SettingRow, gw as SettingRowProps, gx as SeverityTone, gA as ShellLanguage, gB as ShellLanguageProvider, gC as ShellLanguageState, gD as ShellPrefsAdapter, gE as ShellPrefsProvider, gF as Side, gG as SidebarActionButton, gH as SidebarActionButtonProps, gI as SidebarGroupLabel, gJ as SidebarGroupLabelProps, gK as SidebarLayout, gL as SidebarLayoutProps, gM as SidebarNavGroup, gN as SidebarNavGroupProps, gO as SidebarNavItem, gP as SidebarNavItemProps, gQ as SidesEachToggle, gR as SidesInput, gS as SidesInputProps, gT as SidesValue, gU as Skeleton, gV as SkeletonProps, gW as SkeletonVariant, gX as Slider, gY as SliderGroup, gZ as SliderProps, g_ as SliderSize, g$ as Snippet, h0 as SnippetProps, h1 as SnippetSize, h2 as SnippetVariant, a as SortState, h3 as SortableList, h4 as SortableListProps, h5 as SortableListSpacing, h6 as SpacingRole, h7 as SpacingStep, h8 as Sparkline, h9 as SparklineProps, ha as SpinnerRing, hb as SpinnerRingProps, hc as SplitButton, hd as SplitButtonProps, he as SplitButtonVariant, hf as Stack, hg as StackProps, hh as StaleChunkReloadOptions, hi as StatCard, hj as StatCardProps, hk as StatTile, hl as StatTileProps, hm as Statistic, hn as StatisticProps, ho as StatisticSize, hp as StatisticTone, hq as StatusBadge, hr as StatusBadgeProvider, hs as StatusEmphasis, ht as StepItem, hu as Stepper, hv as StepperProps, hw as StrokeVariant, hx as SunburstChart, hy as SunburstChartProps, hz as SunburstNode, hA as Switch, hB as SwitchProps, hC as SwitchSize, hD as TYPE_SCALE, hE as TabItem, hF as Tabs, hG as TabsProps, hH as TagInput, hI as TagInputOption, hJ as TagInputProps, hK as TagInputTone, hL as Text, hM as TextLinkField, hN as TextLinkFieldProps, hO as TextProps, hP as TextSize, hQ as TextTone, hR as TextToolbar, hS as TextToolbarAlign, hT as TextToolbarCase, hU as TextToolbarMark, hV as TextToolbarProps, hW as TextWeight, hX as Textarea, hY as TextareaProps, hZ as Theme, h_ as TileButton, h$ as TileButtonProps, i0 as TileSize, i1 as TimeAgo, i2 as TimeAgoProps, i3 as TimePicker, i4 as TimePickerProps, i5 as TimeSeriesChart, i6 as TimeSeriesChartProps, i7 as TimeSeriesSeries, i8 as TimelineMarker, i9 as TimelineMarkerKind, ia as TimelineReport, ib as TimelineScrubProgress, ic as TimelineTrack, id as TimelineTrackItem, ie as TimelineTrackKind, ig as TimelineTrackPending, ih as TimelineTrackPhase, ii as TimelineTrackPlayback, ij as TimelineTrackProps, ik as TimelineTrackThumb, il as Title, im as TitleLevel, io as TitleProps, ip as ToastAction, iq as ToastCloseReason, ir as ToastOptions, is as ToastPlacement, it as ToastUndoableOptions, iu as Tooltip, iv as TooltipProps, iw as TopNav, ix as TopNavItem, iy as TopNavProps, iz as TransferProgress, iA as TransferProgressProps, iB as TransferProgressState, iC as Tree, iD as TreeDrop, iE as TreeEmptySlot, iF as TreeEmptySlotProps, iG as TreeGroup, iH as TreeGroupLabel, iI as TreeGroupLabelProps, iJ as TreeGroupProps, iK as TreeMove, iL as TreeProps, iM as TreeRow, iN as TreeRowProps, iO as TreeSeam, iP as TreeSeamProps, iQ as TreemapChart, iR as TreemapChartProps, iS as TreemapItem, iT as TreemapTile, iU as TypeStep, iV as UNDOABLE_MS, iW as UseAppUpdateOptions, iX as UseContextMenu, iY as UseProductionTimelineOpts, iZ as VERSION, i_ as VITE_PRELOAD_ERROR_EVENT, i$ as WaterfallChart, j0 as WaterfallChartProps, j1 as WaterfallStep, j2 as WidthsBar, j3 as WidthsBarProps, j4 as ZLayer, j5 as Z_LAYERS, j6 as angleScale, j7 as appendKey, j8 as applyCorners, j9 as applyIconSet, ja as applyThemePrefs, jb as arcPath, jc as areaBetween, jd as areaFrom, je as assignSeriesSlots, jf as autoHighlightIndex, jg as backspace, jh as bandScale, ji as binValues, jj as borderSides, jk as borderStartEach, jl as budgetState, jm as bumpPath, jn as buttonClasses, jo as calcOverall, jp as calcReportOverall, jq as colorFill, jr as colorSwatchClasses, js as columnSharesWidths, jt as confirm, ju as confirmDestructive, jv as cornersFor, jw as curvePath, jx as dashFor, jz as dismissPopups, jA as fillFor, jB as fillId, jC as fmtSliderDate, jD as fromDateKey, jE as glassStyle, jF as glowId, jG as groundId, jH as groupColors, jI as hexToHsv, jJ as highlightOpacity, jK as hsvToHex, jL as iconButtonClasses, jM as inputClasses, jN as installStaleChunkReload, jO as isMac, jP as isSeverityTone, jQ as isSpacingStep, jR as isStaleChunkError, jT as labelClasses, jU as ladderScale, jV as languageSelectWidth, jW as leavesContextMenuAlone, jX as linearPath, jY as linearScale, jZ as logScale, j_ as maskId, j$ as matchShellLanguage, k0 as mediaFileName, k1 as monotonePath, k2 as niceAxis, k3 as niceMax, k4 as openGlobalSearch, k5 as parseHexColor, k6 as polygonPoints, k7 as popupBounds, k8 as prompt, k9 as pushRecentSearch, ka as radiusScale, kb as readSavedShellLanguage, kc as registerModalEscapeInterceptor, kd as resolveBrandMarkTreatment, ke as resolveColumnShares, kf as resolveColumnWidths, kg as resolveCorners, kh as resolvePortalBrandAsset, ki as resolveSeriesColor, kj as resolveSeriesColorWithin, kk as resolveShellLanguage, kl as resolveTheme, km as sanitizeRecentSearches, kn as saveShellLanguage, ko as seriesColor, kp as severityOf, kq as sidesStartEach, kr as solidSurfaceStyle, ks as splinePath, kt as squarify, ku as stagger, kv as stepPath, kw as tabButtonId, kx as tabPanelId, ky as textToolbarRows, kz as textToolbarWindowColumns, kA as toDateKey, kB as toDayMs, kC as toISODate, kD as toast, kE as toggleSeriesSlot, kF as useAppUpdate, kG as useClickOutside, kH as useConfirm, kI as useContextMenu, kJ as useDebouncedValue, kK as useDropdownPosition, kL as useFocusTrap, kM as useHighlight, kN as useIsMobile, kO as useLocalStoragePrefs, kP as usePlotWidth, kQ as usePortalBranding, kR as useProductionTimeline, kS as useScrollLock, kT as useShellLanguage, kU as useShellPrefs, kV as useStatusLabel, kW as useTheme, kX as useTransferProgress } from '../index-BWDtKUcA.js';
2
2
  export { C as CurrencyFormat, D as DATE_FORMAT_OPTIONS, a as DateFormatKey, E as EMPTY_VALUE, F as FOCAL_DEFAULT, b as FOCAL_NUDGE_COARSE, c as FOCAL_NUDGE_STEP, d as FocalPoint, e as FormatDateOptions, f as FormatMoneyOptions, T as TZ_AUTO, g as TimeAgoOptions, h as currencyDecimals, i as currencySymbol, j as firstDayOfWeek, k as focalFromRect, l as formatBytes, m as formatDate, n as formatDateTime, o as formatFocal, p as formatMoney, q as formatTime, r as getUserDateFormat, s as getUserTimezone, t as nudgeFocal, u as parseFocal, v as setCurrencyFormats, w as setUserDateFormat, x as setUserTimezone, y as syncTimezoneFromProfile, z as timeAgo } from '../index-CHufemKB.js';
3
3
  export { isSafeLinkHref } from '../markup/index.js';
4
4
  export { FileIntakeAlert, FileIntakeLimits, FileIntakeOptions, FileRejection, FileRejectionReason, acceptsFile, useFileIntake } from '../file-intake/index.js';
package/dist/ui/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{APP_UPDATE_POLL_MS,Accordion,AlignmentGrid,AppUpdateBanner,AttachButton,AttachmentDropZone,AttachmentList,AuthScreen,Avatar,AvatarGroup,BORDER_LINE_STYLES,BORDER_WIDTHS,Banner,BorderInput,BoxPlotChart,BrandAssetEditor,BudgetBar,CHART_INK,COLUMN_COUNT_MAX,COLUMN_COUNT_WIDTHS,COLUMN_SHARES_EQUAL,COLUMN_SHARE_MIN,CONTROL_HEIGHTS,CORNERS,CORNERS_FOR_THEME,Calendar,CandlestickChart,Card,CartesianPlot,ChartBrush,ChartDefs,ChartDot,ChartFrame,ChartHighlightProvider,ChartSkeleton,ChartTooltip,ChatTemplate,Checkbox_default as Checkbox,CheckoutTemplate,ChordChart,ColorPicker,ColorPickerPanel,ColorSwatch,ColoredBadge,ColumnChart,ComposerAttachments,ContainerFillChart,ContextMenu,CornersInput,CountBadge,DAY_MS,DashboardTemplate,DataTable,DataTablePage,DatePicker_default as DatePicker,DateRangePicker,DateTimePicker_default as DateTimePicker,DescriptionList,DisplayChips,Divider,Drawer,DropdownMenu,ELEVATION_LEVELS,EmailTemplate,EmptyState,EmptyValue,ErrorBoundary,ErrorPage,FONT_WEIGHTS,FilePicker_default as FilePicker,FloatingBar,FormErrorSummary,FormField,FormLayoutPage,FunnelChart,GROUP_COLORS,GROUP_COLORS_SOLID,GalleryTemplate,Grid,HeatmapChart,HelpCenter,HexInput,HistogramChart,IconPicker,IconRail,IconRailButton,ImageFocusPoint,Inline,Input_default as Input,InputNumber_default as InputNumber,Kanban,Label,LanguagePanel,LanguageSelect,LinkPicker,ListFooter,ListLoadError,ListRow,MAX_FRACTION_DIGITS,MOTION,MOTION_DURATIONS,Markdown,Markdown as MarkdownLite,MediaUploadField,MediaUploadGrid,Meter,MetricBar,MilestoneTimeline,NativeSelect,NumericKeypad,POST_PRODUCTION_STATUSES,PageHeader,Pagination,PaperclipGlyph,Paragraph,PieChart,Popover,PortalBrandingProvider,ProductionTimeline,RADAR_SERIES_CAP,RADIUS_ROLES,ROW_HEIGHTS,RadarChart,RadialBarChart,Radio_default as Radio,RadioGroup,RangeChart,RankedBars,SCATTER_SERIES_CAP,SERIES_SLOT_COUNT,SERIES_VARS,SPACING_ROLES,SPACING_SCALE,STAGES,STATUS_VARS,SankeyChart,ScatterChart,SearchableSelect,Segmented,Select_default as Select,SettingRow,SidebarActionButton,SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,SidesEachToggle,SidesInput,Skeleton,Slider,SliderGroup,Snippet,SortableList,Sparkline,SplitButton_default as SplitButton,Stack,StatCard,StatTile,Statistic,StatusBadge,StatusBadgeProvider,Stepper,SunburstChart,Switch_default as Switch,TYPE_SCALE,Tabs,TagInput,Text,TextLinkField,TextToolbar,Textarea_default as Textarea,TileButton_default as TileButton,TimeAgo,TimePicker_default as TimePicker,TimeSeriesChart,TimelineTrack,Title,TopNav,TransferProgress,Tree,TreeEmptySlot,TreeGroup,TreeGroupLabel,TreeRow,TreeSeam,TreemapChart,WaterfallChart,WidthsBar,angleScale,appendKey,applyCorners,applyIconSet,applyThemePrefs,arcPath,areaBetween,areaFrom,assignSeriesSlots,autoHighlightIndex,backspace,bandScale,binValues,borderSides,borderStartEach,budgetState,bumpPath,calcOverall,calcReportOverall,colorFill,colorSwatchClasses,columnSharesWidths,cornersFor,curvePath,dashFor,fillFor,fillId,fmtSliderDate,fromKey as fromDateKey,glowId,groundId,groupColors,hexToHsv,highlightOpacity,hsvToHex,isSeverityTone,isSpacingStep,labelClasses,ladderScale,languageSelectWidth,linearPath,linearScale,logScale,maskId,mediaFileName,monotonePath,niceAxis,niceMax,parseHexColor,polygonPoints,radiusScale,resolveColumnShares,resolveColumnWidths,resolveCorners,resolvePortalBrandAsset,resolveSeriesColor,resolveSeriesColorWithin,resolveTheme,seriesColor,severityOf,sidesStartEach,splinePath,squarify,stagger,stepPath,tabButtonId,tabPanelId,textToolbarRows,textToolbarWindowColumns,toKey as toDateKey,toDayMs,toISODate,toggleSeriesSlot,useAppUpdate,useClickOutside,useContextMenu,useDebouncedValue,useHighlight,usePlotWidth,usePortalBranding,useProductionTimeline,useStatusLabel,useTheme,useTransferProgress}from"../chunk-PMDHTWBR.js";export{Breadcrumbs}from"../chunk-22EP5XS2.js";export{EditableGrid}from"../chunk-ZELMENOO.js";import"../chunk-BR22X7E5.js";import"../chunk-AHN2BTZR.js";export{INPUT_BASE,INPUT_SIZES,PLACEHOLDER_INK,inputClasses}from"../chunk-HJQAE6SP.js";export{ResizeHandle,SidebarLayout}from"../chunk-FBXOKW33.js";export{ENGLISH,SHELL_LANGUAGE_STORAGE_KEY,ShellLanguageProvider,matchShellLanguage,readSavedShellLanguage,resolveShellLanguage,saveShellLanguage,useShellLanguage}from"../chunk-PBZ2VHS3.js";export{BrandMark,GlobalSearch,IconButton_default as IconButton,openGlobalSearch,pushRecent as pushRecentSearch,resolveBrandMarkTreatment,sanitizeRecent as sanitizeRecentSearches}from"../chunk-7D6TZW44.js";export{ICON_NAMES,ICON_SET_FOR_THEME,THEME_ICON_SETS,iconSetFor,isIconName,loadIconSet}from"../chunk-FWEGDHFT.js";export{isSafeLinkHref}from"../chunk-PJPK2ADX.js";export{UNDOABLE_MS,toast_default as toast}from"../chunk-WSRZRWN7.js";export{VERSION}from"../chunk-7TD4XKYF.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,MOD,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-QDCMVFK5.js";import"../chunk-KNUR2UEG.js";export{ConfirmProvider,Dialog,confirm,confirmDestructive,prompt,useConfirm,useFocusTrap,useScrollLock}from"../chunk-BY3KWWWU.js";import"../chunk-5A7MWTXX.js";export{PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu,leavesContextMenuAlone}from"../chunk-UNA3BQJI.js";import"../chunk-UVBK6YSR.js";export{Button_default as Button}from"../chunk-G5GERM76.js";export{MENU_MAX_HEIGHT,POPUP_MAX_WIDTH,Tooltip,popupBounds,useDropdownPosition}from"../chunk-3E27HV76.js";export{GLASS_DIVIDER,glassStyle,solidSurfaceStyle}from"../chunk-7IQ3B77H.js";export{OVERLAY_OPEN_EVENT,Z_LAYERS,dismissPopups,registerModalEscapeInterceptor}from"../chunk-FIEA5CGB.js";export{buttonClasses,iconButtonClasses}from"../chunk-K7PQXJO7.js";import"../chunk-D65T4H6J.js";export{Icon,activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-3G5TA3IF.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-UAG5IEAY.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-LVCRH3K6.js";import"../chunk-C3QOHMR6.js";export{FOCAL_DEFAULT,FOCAL_NUDGE_COARSE,FOCAL_NUDGE_STEP,focalFromRect,formatFocal,nudgeFocal,parseFocal}from"../chunk-AP2QEJXQ.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-W32SKK3D.js";export{LoadingSpinner,SpinnerRing}from"../chunk-2J6F4EE7.js";
2
+ export{APP_UPDATE_POLL_MS,Accordion,AlignmentGrid,AppUpdateBanner,AttachButton,AttachmentDropZone,AttachmentList,AuthScreen,Avatar,AvatarGroup,BORDER_LINE_STYLES,BORDER_WIDTHS,Banner,BorderInput,BoxPlotChart,BrandAssetEditor,BudgetBar,CHART_INK,COLUMN_COUNT_MAX,COLUMN_COUNT_WIDTHS,COLUMN_SHARES_EQUAL,COLUMN_SHARE_MIN,CONTROL_HEIGHTS,CORNERS,CORNERS_FOR_THEME,Calendar,CandlestickChart,Card,CartesianPlot,ChartBrush,ChartDefs,ChartDot,ChartFrame,ChartHighlightProvider,ChartSkeleton,ChartTooltip,ChatTemplate,Checkbox_default as Checkbox,CheckoutTemplate,ChordChart,ColorPicker,ColorPickerPanel,ColorSwatch,ColoredBadge,ColumnChart,ComposerAttachments,ContainerFillChart,ContextMenu,CornersInput,CountBadge,DAY_MS,DashboardTemplate,DataTable,DataTablePage,DatePicker_default as DatePicker,DateRangePicker,DateTimePicker_default as DateTimePicker,DescriptionList,DisplayChips,Divider,Drawer,DropdownMenu,ELEVATION_LEVELS,EmailTemplate,EmptyState,EmptyValue,ErrorBoundary,ErrorPage,FONT_WEIGHTS,FilePicker_default as FilePicker,FloatingBar,FormErrorSummary,FormField,FormLayoutPage,FunnelChart,GROUP_COLORS,GROUP_COLORS_SOLID,GalleryTemplate,Grid,HeatmapChart,HelpCenter,HexInput,HistogramChart,IconPicker,IconRail,IconRailButton,ImageFocusPoint,Inline,Input_default as Input,InputNumber_default as InputNumber,Kanban,Label,LanguagePanel,LanguageSelect,LinkPicker,ListFooter,ListLoadError,ListRow,MAX_FRACTION_DIGITS,MOTION,MOTION_DURATIONS,Markdown,Markdown as MarkdownLite,MediaUploadField,MediaUploadGrid,Meter,MetricBar,MilestoneTimeline,NativeSelect,NumericKeypad,POST_PRODUCTION_STATUSES,PageHeader,Pagination,PaperclipGlyph,Paragraph,PieChart,Popover,PortalBrandingProvider,ProductionTimeline,RADAR_SERIES_CAP,RADIUS_ROLES,ROW_HEIGHTS,RadarChart,RadialBarChart,Radio_default as Radio,RadioGroup,RangeChart,RankedBars,SCATTER_SERIES_CAP,SERIES_SLOT_COUNT,SERIES_VARS,SPACING_ROLES,SPACING_SCALE,STAGES,STATUS_VARS,SankeyChart,ScatterChart,SearchableSelect,Segmented,Select_default as Select,SettingRow,SidebarActionButton,SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,SidesEachToggle,SidesInput,Skeleton,Slider,SliderGroup,Snippet,SortableList,Sparkline,SplitButton_default as SplitButton,Stack,StatCard,StatTile,Statistic,StatusBadge,StatusBadgeProvider,Stepper,SunburstChart,Switch_default as Switch,TYPE_SCALE,Tabs,TagInput,Text,TextLinkField,TextToolbar,Textarea_default as Textarea,TileButton_default as TileButton,TimeAgo,TimePicker_default as TimePicker,TimeSeriesChart,TimelineTrack,Title,TopNav,TransferProgress,Tree,TreeEmptySlot,TreeGroup,TreeGroupLabel,TreeRow,TreeSeam,TreemapChart,WaterfallChart,WidthsBar,angleScale,appendKey,applyCorners,applyIconSet,applyThemePrefs,arcPath,areaBetween,areaFrom,assignSeriesSlots,autoHighlightIndex,backspace,bandScale,binValues,borderSides,borderStartEach,budgetState,bumpPath,calcOverall,calcReportOverall,colorFill,colorSwatchClasses,columnSharesWidths,cornersFor,curvePath,dashFor,fillFor,fillId,fmtSliderDate,fromKey as fromDateKey,glowId,groundId,groupColors,hexToHsv,highlightOpacity,hsvToHex,isSeverityTone,isSpacingStep,labelClasses,ladderScale,languageSelectWidth,linearPath,linearScale,logScale,maskId,mediaFileName,monotonePath,niceAxis,niceMax,parseHexColor,polygonPoints,radiusScale,resolveColumnShares,resolveColumnWidths,resolveCorners,resolvePortalBrandAsset,resolveSeriesColor,resolveSeriesColorWithin,resolveTheme,seriesColor,severityOf,sidesStartEach,splinePath,squarify,stagger,stepPath,tabButtonId,tabPanelId,textToolbarRows,textToolbarWindowColumns,toKey as toDateKey,toDayMs,toISODate,toggleSeriesSlot,useAppUpdate,useClickOutside,useContextMenu,useDebouncedValue,useHighlight,usePlotWidth,usePortalBranding,useProductionTimeline,useStatusLabel,useTheme,useTransferProgress}from"../chunk-WGSCC6QU.js";export{Breadcrumbs}from"../chunk-HQ74L5MM.js";export{EditableGrid}from"../chunk-X6NYTLYX.js";import"../chunk-BR22X7E5.js";import"../chunk-AHN2BTZR.js";export{INPUT_BASE,INPUT_SIZES,PLACEHOLDER_INK,inputClasses}from"../chunk-HJQAE6SP.js";export{ResizeHandle,SidebarLayout}from"../chunk-FQIZMZDX.js";export{BrandMark,GlobalSearch,IconButton_default as IconButton,openGlobalSearch,pushRecent as pushRecentSearch,resolveBrandMarkTreatment,sanitizeRecent as sanitizeRecentSearches}from"../chunk-NZBFQTOB.js";export{isSafeLinkHref}from"../chunk-PJPK2ADX.js";export{ENGLISH,SHELL_LANGUAGE_STORAGE_KEY,ShellLanguageProvider,matchShellLanguage,readSavedShellLanguage,resolveShellLanguage,saveShellLanguage,useShellLanguage}from"../chunk-PBZ2VHS3.js";export{ICON_NAMES,ICON_SET_FOR_THEME,THEME_ICON_SETS,iconSetFor,isIconName,loadIconSet}from"../chunk-M2AM6DAA.js";export{UNDOABLE_MS,toast_default as toast}from"../chunk-LTEM56OL.js";export{VERSION}from"../chunk-NGWXT4QX.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,MOD,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-JXMYF3JR.js";import"../chunk-KNUR2UEG.js";import"../chunk-5A7MWTXX.js";export{ConfirmProvider,Dialog,confirm,confirmDestructive,prompt,useConfirm,useFocusTrap,useScrollLock}from"../chunk-UNLQRUWP.js";export{PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu,leavesContextMenuAlone}from"../chunk-UNA3BQJI.js";import"../chunk-UVBK6YSR.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-UAG5IEAY.js";export{FOCAL_DEFAULT,FOCAL_NUDGE_COARSE,FOCAL_NUDGE_STEP,focalFromRect,formatFocal,nudgeFocal,parseFocal}from"../chunk-AP2QEJXQ.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-W32SKK3D.js";export{Button_default as Button}from"../chunk-G5GERM76.js";export{MENU_MAX_HEIGHT,POPUP_MAX_WIDTH,Tooltip,popupBounds,useDropdownPosition}from"../chunk-3E27HV76.js";export{GLASS_DIVIDER,glassStyle,solidSurfaceStyle}from"../chunk-7IQ3B77H.js";export{OVERLAY_OPEN_EVENT,Z_LAYERS,dismissPopups,registerModalEscapeInterceptor}from"../chunk-FIEA5CGB.js";export{buttonClasses,iconButtonClasses}from"../chunk-K7PQXJO7.js";export{LoadingSpinner,SpinnerRing}from"../chunk-2J6F4EE7.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-LVCRH3K6.js";import"../chunk-C3QOHMR6.js";import"../chunk-D65T4H6J.js";export{Icon,activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-3G5TA3IF.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-shell",
3
- "version": "7.43.0",
3
+ "version": "7.45.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-7RI5F5VX.js";import{useWidgetSettings as n}from"./chunk-OMOQC57R.js";import"./chunk-YD4DPX4H.js";import"./chunk-QDCMVFK5.js";import"./chunk-KNUR2UEG.js";import"./chunk-BY3KWWWU.js";import"./chunk-DSSLOQDW.js";import"./chunk-5A7MWTXX.js";import"./chunk-UNA3BQJI.js";import"./chunk-UVBK6YSR.js";import"./chunk-G5GERM76.js";import"./chunk-3E27HV76.js";import"./chunk-7IQ3B77H.js";import"./chunk-FIEA5CGB.js";import"./chunk-K7PQXJO7.js";import"./chunk-D65T4H6J.js";import{Icon as r}from"./chunk-3G5TA3IF.js";import"./chunk-LVCRH3K6.js";import"./chunk-C3QOHMR6.js";import"./chunk-2J6F4EE7.js";import{useState as l,useRef as c,useCallback as i,useEffect as a}from"react";import{jsxs as o,Fragment as s,jsx as u}from"react/jsx-runtime";var h="calc_appearance";function d(){const[d,m]=l("0"),[k,b]=l(null),[p,g]=l(null),[y,N]=l(!1),[x,f]=l(""),[v,C]=l([]),[$,j]=l(!1),[E,w]=l(()=>e(h)),[S,F]=l(!1),[W,T]=l(E),A=c(null);n(i(()=>{T({...E}),F(!0)},[E]));const B=i(e=>{f(""),m(t=>y||"0"===t?(N(!1),"."===e?"0.":e):"."===e&&t.includes(".")?t:t+e)},[y]),D=i(()=>{m("0"),b(null),g(null),N(!1)},[]),R=i((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}},[]),I=i(e=>{const t=parseFloat(d);if(null!==k&&p&&!y){const e=R(k,t,p);m(String(e)),b(e),C(n=>[`${k} ${p} ${t} = ${e}`,...n].slice(0,20))}else b(t);g(e),N(!0)},[d,k,p,y,R]),O=i(()=>{if(null===k||!p)return;const e=parseFloat(d),t=R(k,e,p),n=`${k} ${p} ${e} =`;C(e=>[`${n} ${t}`,...e].slice(0,20)),f(n),m(String(t)),b(null),g(null),N(!0)},[d,k,p,R]),Q=i(()=>{m(e=>String(parseFloat(e)/100))},[]),H=i(()=>{m(e=>e.startsWith("-")?e.slice(1):"0"===e?e:"-"+e)},[]);a(()=>{const e=e=>{const t=e.target.tagName;"INPUT"!==t&&"TEXTAREA"!==t&&"SELECT"!==t&&(e.key>="0"&&e.key<="9"?B(e.key):"."===e.key?B("."):"+"===e.key?I("+"):"-"===e.key?I("-"):"*"===e.key?I("×"):"/"===e.key?(e.preventDefault(),I("÷")):"Enter"===e.key||"="===e.key?("Enter"===e.key&&e.target instanceof Node&&A.current?.contains(e.target)&&e.preventDefault(),O()):"Escape"===e.key?D():"Backspace"===e.key?m(e=>e.length>1?e.slice(0,-1):"0"):"%"===e.key&&Q())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[B,I,O,D,Q]);const K="flex items-center justify-center rounded-lg text-sm font-medium transition-colors",M=`${K} bg-white border border-gray-200 text-gray-900 hover:bg-gray-50 active:bg-gray-100`,U=`${K} bg-blue-50 border border-blue-200 text-blue-700 hover:bg-blue-100 active:bg-blue-200`,X=`${K} bg-gray-100 border border-gray-200 text-gray-600 hover:bg-gray-200 active:bg-gray-300`,G=`${K} bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800`;/* @__PURE__ */
2
- return o(s,{children:[
3
- /* @__PURE__ */o("div",{ref:A,className:"flex flex-col h-full",style:{opacity:E.activeOpacity/100,backdropFilter:E.activeBlur>0?`blur(${E.activeBlur}px)`:void 0},children:[
4
- /* @__PURE__ */o("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__ */u("div",{className:"flex flex-col justify-end flex-1 overflow-hidden",children:v.slice(0,3).reverse().map((e,t)=>/* @__PURE__ */u("div",{className:"text-2xs text-slate-400 text-right font-mono truncate",children:e},t))}),(x||p&&null!==k)&&/* @__PURE__ */u("div",{className:"text-base text-slate-600 text-right font-mono",children:x||`${k} ${p} ${y?"":d}`}),
6
- /* @__PURE__ */o("div",{className:"flex items-center gap-2",children:[
7
- /* @__PURE__ */u("button",{onClick:()=>{navigator.clipboard.writeText(d),j(!0),setTimeout(()=>j(!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__ */u(r,$?{name:"check",className:"h-5 w-5 text-green-500",strokeWidth:2}:{name:"copy",className:"h-5 w-5",strokeWidth:2})}),
8
- /* @__PURE__ */u("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__ */o("div",{className:"grid grid-cols-4 grid-rows-5 gap-2 flex-1 min-h-0 p-2",children:[
10
- /* @__PURE__ */u("button",{onClick:D,className:X,children:"AC"}),
11
- /* @__PURE__ */u("button",{onClick:H,className:X,children:"+/−"}),
12
- /* @__PURE__ */u("button",{onClick:Q,className:X,children:"%"}),
13
- /* @__PURE__ */u("button",{onClick:()=>I("÷"),className:`${U} ${"÷"===p?"ring-2 ring-blue-400":""}`,children:"÷"}),
14
- /* @__PURE__ */u("button",{onClick:()=>B("7"),className:M,children:"7"}),
15
- /* @__PURE__ */u("button",{onClick:()=>B("8"),className:M,children:"8"}),
16
- /* @__PURE__ */u("button",{onClick:()=>B("9"),className:M,children:"9"}),
17
- /* @__PURE__ */u("button",{onClick:()=>I("×"),className:`${U} ${"×"===p?"ring-2 ring-blue-400":""}`,children:"×"}),
18
- /* @__PURE__ */u("button",{onClick:()=>B("4"),className:M,children:"4"}),
19
- /* @__PURE__ */u("button",{onClick:()=>B("5"),className:M,children:"5"}),
20
- /* @__PURE__ */u("button",{onClick:()=>B("6"),className:M,children:"6"}),
21
- /* @__PURE__ */u("button",{onClick:()=>I("-"),className:`${U} ${"-"===p?"ring-2 ring-blue-400":""}`,children:"−"}),
22
- /* @__PURE__ */u("button",{onClick:()=>B("1"),className:M,children:"1"}),
23
- /* @__PURE__ */u("button",{onClick:()=>B("2"),className:M,children:"2"}),
24
- /* @__PURE__ */u("button",{onClick:()=>B("3"),className:M,children:"3"}),
25
- /* @__PURE__ */u("button",{onClick:()=>I("+"),className:`${U} ${"+"===p?"ring-2 ring-blue-400":""}`,children:"+"}),
26
- /* @__PURE__ */u("button",{onClick:()=>B("0"),className:`${M} col-span-2`,children:"0"}),
27
- /* @__PURE__ */u("button",{onClick:()=>B("."),className:M,children:"."}),
28
- /* @__PURE__ */u("button",{onClick:O,className:G,children:"="})]})]}),
29
- /* @__PURE__ */u(t,{open:S,onClose:()=>F(!1),title:"Calculator Settings",appearance:W,onAppearanceChange:T,onSave:()=>{w(W),localStorage.setItem(h,JSON.stringify(W)),F(!1)}})]})}export{d as default};
@@ -1 +0,0 @@
1
- export{ConfirmProvider,confirm,confirmDestructive,prompt,useConfirm}from"./chunk-BY3KWWWU.js";import"./chunk-UVBK6YSR.js";import"./chunk-FIEA5CGB.js";import"./chunk-K7PQXJO7.js";import"./chunk-3G5TA3IF.js";import"./chunk-LVCRH3K6.js";import"./chunk-C3QOHMR6.js";
@@ -1,87 +0,0 @@
1
- import{openPreviewFile as e}from"./chunk-FY3H52BM.js";import{Breadcrumbs as t}from"./chunk-22EP5XS2.js";import{TH_ONE_LINE as a}from"./chunk-AHN2BTZR.js";import{SidebarLayout as r}from"./chunk-FBXOKW33.js";import{getFilesDemoTree as n}from"./chunk-YRLOXHKG.js";import{AboutApp as s}from"./chunk-COUELSZF.js";import{peekFilesViewRequest as i,consumeFilesViewRequest as l,FILES_SHOW_TRASH_EVENT as o,FILES_OPEN_DESKTOP_FOLDER_EVENT as d,subscribeDesktopFolders as c,getDesktopFoldersSnapshot as m,FolderGlyph as h,DesktopItemMiniIcon as p,desktopItemTypeLabel as u}from"./chunk-DENNF2LM.js";import"./chunk-ESL5TDNA.js";import"./chunk-VTVSMRFX.js";import{toast_default as f}from"./chunk-WSRZRWN7.js";import"./chunk-7TD4XKYF.js";import{useWindowManager as x,WindowTitle as g}from"./chunk-OMOQC57R.js";import"./chunk-YD4DPX4H.js";import"./chunk-QDCMVFK5.js";import"./chunk-KNUR2UEG.js";import{confirm as y,prompt as b}from"./chunk-BY3KWWWU.js";import"./chunk-DSSLOQDW.js";import"./chunk-5A7MWTXX.js";import"./chunk-UNA3BQJI.js";import"./chunk-UVBK6YSR.js";import"./chunk-G5GERM76.js";import"./chunk-3E27HV76.js";import"./chunk-7IQ3B77H.js";import"./chunk-FIEA5CGB.js";import"./chunk-K7PQXJO7.js";import"./chunk-D65T4H6J.js";import{Icon as k}from"./chunk-3G5TA3IF.js";import"./chunk-LVCRH3K6.js";import"./chunk-C3QOHMR6.js";import{formatBytes as N}from"./chunk-W32SKK3D.js";import{LoadingSpinner as w}from"./chunk-2J6F4EE7.js";import{useState as v,useEffect as $,useSyncExternalStore as j,useRef as C,useCallback as D}from"react";import{jsxs as E,jsx as L,Fragment as T}from"react/jsx-runtime";var R="undefined"!=typeof window&&window.__REACT_OS_SHELL_FILE_SERVER__||"http://localhost:4000",F={pdf:"pdf",dxf:"dxf",csv:"csv",jpg:"image",jpeg:"image",png:"image",gif:"image",webp:"image",svg:"image",avif:"image",bmp:"image",stp:"3d",step:"3d",stl:"3d",obj:"3d",gltf:"3d",glb:"3d","3mf":"3d",iges:"3d",igs:"3d",ply:"3d",fbx:"3d"};function S(e,t){return"/"===e||""===e?"/"+t:e.replace(/\/$/,"")+"/"+t}function W(e){if(!e)return"—";try{const t=new Date(e);return isNaN(t.getTime())?"—":t.toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}catch{return e}}function O(){const O=R.replace(/\/$/,""),P=null!==n(),[I,M]=v("/"),[A,U]=v([]),[B,K]=v([]),[H,V]=v(null),[z,X]=v(!0),[Q,_]=v(!1),[J,G]=v(null),[Y,Z]=v(!1),[q,ee]=v(()=>{const e=i();return"trash"===e?"trash":e?{desktopFolderId:e.folderId}:"files"});$(()=>{l()},[]);const[te,ae]=v([]);$(()=>{const e=()=>{l(),ee("trash")},t=e=>{l();const t=e.detail?.folderId;t&&ee({desktopFolderId:t})};return window.addEventListener(o,e),window.addEventListener(d,t),()=>{window.removeEventListener(o,e),window.removeEventListener(d,t)}},[]);const re=j(c,m,m),ne="object"==typeof q?q.desktopFolderId:null,se=ne?re?.folders.find(e=>e.id===ne)??null:null,ie=ne&&re?.itemsByFolder[ne]||[];$(()=>{ne&&re&&!re.folders.some(e=>e.id===ne)&&ee("files")},[ne,re]);const le=C(0),oe=C(null),{openPage:de,openEntity:ce}=x(),me=t=>{"preview-file"===t.entityType&&t.filePath&&t.fileKind?e({filePath:t.filePath,filename:t.label,kind:t.fileKind,onStaged:e=>de(e)}):"page"===t.entityType?de(t.entityId):ce(t.entityType,t.entityId,null,t.label)},he=D((e,t={})=>fetch(e,{...t,credentials:"include"}),[]),pe=D(async()=>{try{const e=await he(`${O}/api/quota`);if(e.ok){const t=await e.json();G({used:t.used,limit:t.limit})}}catch{}},[he,O]),ue=D(async e=>{if(V(null),P){const t=function(e){const t=n();if(!t)return[];let a=t;for(const t of e.split("/").filter(Boolean)){const e=a.find(e=>"folder"===e.kind&&e.name===t);if(!e||!e.children)return[];a=e.children}return a.map(e=>({name:e.name,kind:e.kind,size:e.size??0,modifiedAt:e.modifiedAt??""}))}(e);return U(t),M(e),_(!1),X(!1),void("/"===e&&K(t.filter(e=>"folder"===e.kind).map(e=>e.name)))}X(!0);try{const t=await he(`${O}/api/files?path=${encodeURIComponent(e)}`);if(!t.ok){const e=await t.json().catch(()=>({}));return void f.error(e.error||`Failed to list (${t.status})`)}const a=await t.json(),r=a.entries||[];U(r),M(a.path||e),_(!1),"/"===(a.path||e)&&K(r.filter(e=>"folder"===e.kind).map(e=>e.name))}catch(e){_(!0)}finally{X(!1)}pe()},[he,O,pe,P]),fe=D(async()=>{if(P)return ae([]),void X(!1);X(!0),V(null);try{const e=await he(`${O}/api/trash`);if(!e.ok){const t=await e.json().catch(()=>({}));return void f.error(t.error||`Failed to list trash (${e.status})`)}const t=await e.json();ae(t.entries||[]),_(!1)}catch{_(!0)}finally{X(!1)}pe()},[he,O,pe,P]);$(()=>{"files"===q?ue(I):"trash"===q&&fe()},[I,q]);const xe=async e=>{const t=S(I,e.name);try{const a=await he(`${O}/api/file?path=${encodeURIComponent(t)}`);if(!a.ok)return void f.error(`Download failed (${a.status})`);const r=await a.blob(),n=URL.createObjectURL(r),s=document.createElement("a");s.href=n,s.download=e.name,s.click(),setTimeout(()=>URL.revokeObjectURL(n),1e3)}catch(e){f.error(e?.message||"Download failed")}},ge=async e=>{const t=Array.from(e);for(const e of t){const t=new FormData;t.append("file",e);try{const a=await he(`${O}/api/upload?path=${encodeURIComponent(I)}`,{method:"POST",body:t});if(!a.ok){const t=await a.json().catch(()=>({}));if(413===a.status){const a=Math.max(0,(t.limit||0)-(t.used||0));f.error(`Quota exceeded — ${N(a)} free, ${e.name} is ${N(t.attempted||e.size)}`)}else f.error(`Upload ${e.name}: ${t.error||a.status}`)}}catch(t){f.error(`Upload ${e.name}: ${t?.message||"failed"}`)}}ue(I)},ye=()=>{le.current=0,Z(!1)};if($(()=>{const e=()=>ye();return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[]),Q)/* @__PURE__ */
2
- return E("div",{className:"flex flex-col h-full bg-white",children:[
3
- /* @__PURE__ */L(g,{title:"Files - offline"}),
4
- /* @__PURE__ */L("div",{className:"flex-1 flex items-center justify-center p-8 text-center",children:/* @__PURE__ */E("div",{className:"max-w-md",children:[
5
- /* @__PURE__ */L(k,{name:"close-circle",className:"h-12 w-12 mx-auto text-gray-300 mb-3",strokeWidth:1.4}),
6
- /* @__PURE__ */L("h3",{className:"text-base font-semibold text-gray-800 mb-1",children:"Can't reach the file server"}),
7
- /* @__PURE__ */E("p",{className:"text-sm text-gray-500 mb-3",children:["No response from ",
8
- /* @__PURE__ */L("span",{className:"font-mono",children:O}),". Make sure the server is running — see ",
9
- /* @__PURE__ */L("span",{className:"font-mono",children:"examples/file-server/README.md"}),"."]}),
10
- /* @__PURE__ */L("button",{onClick:()=>ue(I),className:"px-3 h-8 text-sm bg-blue-500 text-white rounded hover:bg-blue-600",children:"Retry"})]})})]});const be="/"===I?[]:I.split("/").filter(Boolean),ke=J&&J.limit>0?Math.min(100,Math.round(J.used/J.limit*100)):0,Ne=ke>90?"bg-red-500":ke>75?"bg-amber-500":"bg-blue-500",we=[{label:"My files",onClick:()=>M("/")},...be.map((e,t)=>({label:e,onClick:()=>M("/"+be.slice(0,t+1).join("/"))}))],ve=e=>"flex w-full items-center gap-2 rounded-md px-3 min-h-(--row-height-menu) py-2 text-left text-sm transition-colors "+(e?"bg-blue-50 font-medium text-blue-700":"text-gray-700 hover:bg-gray-100"),$e=e=>/* @__PURE__ */L("svg",{className:"h-4 w-4 shrink-0 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.6,children:/* @__PURE__ */L("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})}),je=/* @__PURE__ */E("nav",{className:"p-2",children:[
11
- /* @__PURE__ */L("div",{className:"px-2 py-2 text-2xs font-semibold uppercase tracking-wide text-gray-400",children:"Locations"}),
12
- /* @__PURE__ */E("button",{onClick:()=>{ee("files"),M("/")},className:ve("files"===q&&"/"===I),children:[$e("M2.25 12l8.954-8.955a1.5 1.5 0 012.122 0L21.75 12M4.5 9.75v9.75a.75.75 0 00.75.75H9V15a.75.75 0 01.75-.75h4.5A.75.75 0 0115 15v5.25h3.75a.75.75 0 00.75-.75V9.75"),"My files"]}),B.map(e=>/* @__PURE__ */E("button",{onClick:()=>{ee("files"),M("/"+e)},className:ve("files"===q&&I==="/"+e),children:[$e("M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"),
13
- /* @__PURE__ */L("span",{className:"truncate",children:e})]},e)),!P&&/* @__PURE__ */E("button",{onClick:()=>ee("trash"),className:ve("trash"===q),children:[$e("M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79"),"Trash"]}),re&&re.folders.length>0&&/* @__PURE__ */E(T,{children:[
14
- /* @__PURE__ */L("div",{className:"px-2 pt-3 pb-2 text-2xs font-semibold uppercase tracking-wide text-gray-400",children:"Desktop"}),re.folders.map(e=>/* @__PURE__ */E("button",{onClick:()=>ee({desktopFolderId:e.id}),className:ve(ne===e.id),children:[
15
- /* @__PURE__ */L(h,{className:"h-4 w-4 shrink-0 text-amber-500"}),
16
- /* @__PURE__ */L("span",{className:"truncate",children:e.name}),e.itemCount>0&&/* @__PURE__ */L("span",{className:"ml-auto text-2xs text-gray-400 tabular-nums",children:e.itemCount})]},e.id))]})]});/* @__PURE__ */
17
- return E("div",{className:"relative flex flex-col h-full bg-white",onDragEnter:e=>{P||"object"==typeof q||e.dataTransfer?.types?.includes?.("Files")&&(e.preventDefault(),le.current++,Y||Z(!0))},onDragOver:e=>{e.dataTransfer?.types?.includes?.("Files")&&e.preventDefault()},onDragLeave:()=>{le.current>0&&le.current--,0===le.current&&Z(!1)},onDrop:e=>{e.preventDefault(),ye(),P||"object"==typeof q||e.dataTransfer.files?.length&&ge(e.dataTransfer.files)},children:[
18
- /* @__PURE__ */L(g,{title:se?`Files - ${se.name}`:"Files"+("/"===I?"":" - "+I)}),
19
- /* @__PURE__ */L(s,{app:"files"}),
20
- /* @__PURE__ */L("input",{ref:oe,type:"file",multiple:!0,className:"hidden",onChange:e=>{e.target.files?.length&&ge(e.target.files),oe.current&&(oe.current.value="")}}),
21
- /* @__PURE__ */L("div",{className:"flex-1 min-h-0",children:/* @__PURE__ */L(r,{sidebar:je,storageKey:"files.sidebarWidth",defaultWidth:200,minWidth:150,maxWidth:320,children:/* @__PURE__ */E("div",{className:"flex h-full min-w-0 flex-col",children:[
22
- /* @__PURE__ */E("div",{className:"flex items-center gap-1 px-2 py-2 border-b border-gray-200 bg-gray-50 shrink-0 text-xs",children:[/* @__PURE__ */E(T,"files"===q?{children:[
23
- /* @__PURE__ */L("button",{onClick:()=>M(function(e){if("/"===e||""===e)return"/";const t=e.replace(/\/$/,""),a=t.lastIndexOf("/");return a<=0?"/":t.slice(0,a)}(I)),disabled:"/"===I,className:"px-2 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-600",title:"Parent folder",children:/* @__PURE__ */L(k,{name:"arrow-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
24
- /* @__PURE__ */L("div",{className:"flex-1 min-w-0",children:/* @__PURE__ */L(t,{items:we,maxItems:5})}),
25
- /* @__PURE__ */L("button",{onClick:()=>ue(I),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Refresh",children:/* @__PURE__ */L(k,{name:"refresh",className:"h-3.5 w-3.5",strokeWidth:1.8})}),!P&&/* @__PURE__ */E(T,{children:[
26
- /* @__PURE__ */E("button",{onClick:()=>ee("trash"),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600 flex items-center gap-1",title:"Open trash",children:[
27
- /* @__PURE__ */L(k,{name:"trash",className:"h-3.5 w-3.5",strokeWidth:1.5}),"Trash"]}),
28
- /* @__PURE__ */E("button",{onClick:async()=>{const e=await b({title:"New folder",placeholder:"Folder name",confirmLabel:"Create"});if(!e)return;if(/[\\/]/.test(e))return void f.error("Folder names cannot contain slashes");const t=S(I,e),a=await he(`${O}/api/folder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:t})});if(!a.ok){const e=await a.json().catch(()=>({}));return void f.error(e.error||`Create folder failed (${a.status})`)}ue(I)},className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600 flex items-center gap-1",children:[
29
- /* @__PURE__ */L(k,{name:"folder-plus",className:"h-3.5 w-3.5",strokeWidth:1.5}),"New Folder"]}),
30
- /* @__PURE__ */E("button",{onClick:()=>oe.current?.click(),className:"px-2 py-1 rounded bg-blue-500 text-white hover:bg-blue-600 flex items-center gap-1",children:[
31
- /* @__PURE__ */L(k,{name:"upload",className:"h-3.5 w-3.5",strokeWidth:1.8}),"Upload"]})]})]}:"trash"===q?{children:[
32
- /* @__PURE__ */L("button",{onClick:()=>ee("files"),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Back to files",children:/* @__PURE__ */L(k,{name:"arrow-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
33
- /* @__PURE__ */L("span",{className:"flex-1 text-gray-700 font-medium px-2",children:"Trash"}),
34
- /* @__PURE__ */L("button",{onClick:fe,className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Refresh",children:/* @__PURE__ */L(k,{name:"refresh",className:"h-3.5 w-3.5",strokeWidth:1.8})}),
35
- /* @__PURE__ */L("button",{onClick:async()=>{if(0===te.length)return;if(!await y({title:"Empty trash",message:`${te.length} item${1===te.length?"":"s"} will be permanently removed. This can't be undone.`,confirmLabel:"Empty trash",variant:"danger"}))return;const e=await he(`${O}/api/trash`,{method:"DELETE"});if(!e.ok){const t=await e.json().catch(()=>({}));return void f.error(t.error||`Empty trash failed (${e.status})`)}fe()},disabled:0===te.length,className:"px-2 py-1 rounded text-red-600 hover:bg-red-50 disabled:opacity-30 flex items-center gap-1",children:"Empty trash"})]}:{children:[
36
- /* @__PURE__ */L("button",{onClick:()=>ee("files"),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Back to files",children:/* @__PURE__ */L(k,{name:"arrow-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
37
- /* @__PURE__ */L(h,{className:"h-4 w-4 text-amber-500 ml-1"}),
38
- /* @__PURE__ */L("span",{className:"flex-1 text-gray-700 font-medium px-1 truncate",children:se?.name??"Desktop folder"}),
39
- /* @__PURE__ */L("span",{className:"text-2xs text-gray-400 px-2",children:"Desktop shortcuts"})]}),J&&/* @__PURE__ */E(T,{children:[
40
- /* @__PURE__ */L("div",{className:"h-4 w-px bg-gray-300 mx-1"}),
41
- /* @__PURE__ */E("div",{className:"flex items-center gap-2",title:`${N(J.used)} of ${N(J.limit)} used`,children:[
42
- /* @__PURE__ */L("div",{className:"w-20 h-1.5 rounded-full bg-gray-200 overflow-hidden",children:/* @__PURE__ */L("div",{className:`h-full ${Ne} transition-all`,style:{width:`${ke}%`}})}),
43
- /* @__PURE__ */E("span",{className:"text-2xs text-gray-500 tabular-nums whitespace-nowrap",children:[N(J.used)," / ",N(J.limit)]})]})]})]}),
44
- /* @__PURE__ */L("div",{className:"flex-1 overflow-auto",children:"object"==typeof q?0===ie.length?/* @__PURE__ */L("div",{className:"p-10 text-center text-sm text-gray-400",children:"This desktop folder is empty. Drag shortcuts onto it on the desktop."}):/* @__PURE__ */E("table",{className:"w-full text-sm",children:[
45
- /* @__PURE__ */L("thead",{className:"bg-gray-50 text-2xs uppercase tracking-wide text-gray-500",children:/* @__PURE__ */E("tr",{children:[
46
- /* @__PURE__ */L("th",{className:`${a} text-left font-medium px-3 h-8`,children:"Name"}),
47
- /* @__PURE__ */L("th",{className:`${a} text-left font-medium px-3 h-8 w-28`,children:"Type"}),
48
- /* @__PURE__ */L("th",{className:`${a} w-56`})]})}),
49
- /* @__PURE__ */L("tbody",{children:ie.map(e=>{const t=`${e.entityType}|${e.entityId}`;/* @__PURE__ */
50
- return E("tr",{onClick:()=>V(t),onDoubleClick:()=>me(e),className:"cursor-default border-b border-gray-100 "+(H===t?"bg-blue-50":"hover:bg-gray-50"),children:[
51
- /* @__PURE__ */E("td",{className:"px-3 h-8 flex items-center gap-2",children:[
52
- /* @__PURE__ */L(p,{item:e}),
53
- /* @__PURE__ */L("span",{className:"truncate",title:e.label,children:e.label})]}),
54
- /* @__PURE__ */L("td",{className:"px-3 h-8 text-xs text-gray-500",children:u(e)}),
55
- /* @__PURE__ */E("td",{className:"px-3 h-8 text-right whitespace-nowrap",children:[
56
- /* @__PURE__ */L("button",{onClick:t=>{t.stopPropagation(),me(e)},className:"px-2 py-0.5 rounded hover:bg-gray-200 text-blue-600 text-2xs",children:"Open"}),
57
- /* @__PURE__ */L("button",{onClick:t=>{t.stopPropagation(),re?.moveToDesktop([e])},className:"px-2 py-0.5 rounded hover:bg-gray-200 text-gray-500 text-2xs ml-1",children:"Move to desktop"}),
58
- /* @__PURE__ */L("button",{onClick:t=>{t.stopPropagation(),re?.removeShortcuts([e])},className:"px-2 py-0.5 rounded hover:bg-red-100 text-red-600 text-2xs ml-1",children:"Remove"})]})]},t)})})]}):"trash"===q?z&&0===te.length?/* @__PURE__ */L(w,{size:"sm",padding:"p-6",label:"Loading"}):0===te.length?/* @__PURE__ */L("div",{className:"p-10 text-center text-sm text-gray-400",children:"Trash is empty."}):/* @__PURE__ */E("table",{className:"w-full text-sm",children:[
59
- /* @__PURE__ */L("thead",{className:"bg-gray-50 text-2xs uppercase tracking-wide text-gray-500",children:/* @__PURE__ */E("tr",{children:[
60
- /* @__PURE__ */L("th",{className:`${a} text-left font-medium px-3 h-8`,children:"Name"}),
61
- /* @__PURE__ */L("th",{className:`${a} text-left font-medium px-3 h-8`,children:"Original location"}),
62
- /* @__PURE__ */L("th",{className:`${a} text-right font-medium px-3 h-8 w-24`,children:"Size"}),
63
- /* @__PURE__ */L("th",{className:`${a} text-right font-medium px-3 h-8 w-40`,children:"Deleted"}),
64
- /* @__PURE__ */L("th",{className:`${a} w-44`})]})}),
65
- /* @__PURE__ */L("tbody",{children:te.map(e=>/* @__PURE__ */E("tr",{className:"border-b border-gray-100 hover:bg-gray-50",children:[
66
- /* @__PURE__ */E("td",{className:"px-3 h-8 flex items-center gap-2",children:["folder"===e.kind?/* @__PURE__ */L(k,{name:"folder",look:"solid",className:"h-4 w-4 text-amber-500 shrink-0"}):/* @__PURE__ */L(k,{name:"page",className:"h-4 w-4 text-gray-400 shrink-0",strokeWidth:1.5}),
67
- /* @__PURE__ */L("span",{className:"truncate",title:e.name,children:e.name})]}),
68
- /* @__PURE__ */L("td",{className:"px-3 h-8 text-gray-500 text-xs font-mono truncate",title:e.originalPath,children:e.originalPath||"—"}),
69
- /* @__PURE__ */L("td",{className:"px-3 h-8 text-right tabular-nums text-gray-500",children:N(e.size)}),
70
- /* @__PURE__ */L("td",{className:"px-3 h-8 text-right text-gray-500 tabular-nums",children:e.deletedAt?W(e.deletedAt):"—"}),
71
- /* @__PURE__ */E("td",{className:"px-3 h-8 text-right whitespace-nowrap",children:[
72
- /* @__PURE__ */L("button",{onClick:()=>(async e=>{const t=await he(`${O}/api/trash/restore`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e.id})});if(!t.ok){const e=await t.json().catch(()=>({}));return void f.error(e.error||`Restore failed (${t.status})`)}f.success(`Restored "${e.name}"`),fe()})(e),className:"px-2 py-0.5 rounded hover:bg-gray-200 text-blue-600 text-2xs",children:"Restore"}),
73
- /* @__PURE__ */L("button",{onClick:()=>(async e=>{if(!await y({title:"Permanently delete",message:`"${e.name}" will be permanently removed. This can't be undone.`,confirmLabel:"Delete forever",variant:"danger"}))return;const t=await he(`${O}/api/trash/${encodeURIComponent(e.id)}`,{method:"DELETE"});if(!t.ok){const e=await t.json().catch(()=>({}));return void f.error(e.error||`Delete failed (${t.status})`)}fe()})(e),className:"px-2 py-0.5 rounded hover:bg-red-100 text-red-600 text-2xs ml-1",children:"Delete forever"})]})]},e.id))})]}):z&&0===A.length?/* @__PURE__ */L(w,{size:"sm",padding:"p-6",label:"Loading"}):0===A.length?/* @__PURE__ */E("div",{className:"p-10 text-center text-sm text-gray-400",children:["Empty folder.",!P&&/* @__PURE__ */E(T,{children:[" Drop files here or click ",
74
- /* @__PURE__ */L("span",{className:"font-medium",children:"Upload"}),"."]})]}):/* @__PURE__ */E("table",{className:"w-full text-sm",children:[
75
- /* @__PURE__ */L("thead",{className:"bg-gray-50 text-2xs uppercase tracking-wide text-gray-500",children:/* @__PURE__ */E("tr",{children:[
76
- /* @__PURE__ */L("th",{className:`${a} text-left font-medium px-3 h-8`,children:"Name"}),
77
- /* @__PURE__ */L("th",{className:`${a} text-right font-medium px-3 h-8 w-24`,children:"Size"}),
78
- /* @__PURE__ */L("th",{className:`${a} text-right font-medium px-3 h-8 w-40`,children:"Modified"}),
79
- /* @__PURE__ */L("th",{className:`${a} w-32`})]})}),
80
- /* @__PURE__ */L("tbody",{children:A.map(t=>/* @__PURE__ */E("tr",{onClick:()=>V(t.name),onDoubleClick:()=>{"folder"===t.kind?M(S(I,t.name)):(async t=>{if(P)return;const a=S(I,t.name),r=(t.name.split(".").pop()||"").toLowerCase(),n=F[r];n?await e({filePath:a,filename:t.name,kind:n,onStaged:e=>de(e)}):xe(t)})(t)},className:"cursor-default border-b border-gray-100 "+(H===t.name?"bg-blue-50":"hover:bg-gray-50"),children:[
81
- /* @__PURE__ */E("td",{className:"px-3 h-8 flex items-center gap-2",children:["folder"===t.kind?/* @__PURE__ */L(k,{name:"folder",look:"solid",className:"h-4 w-4 text-amber-500 shrink-0"}):/* @__PURE__ */L(k,{name:"page",className:"h-4 w-4 text-gray-400 shrink-0",strokeWidth:1.5}),
82
- /* @__PURE__ */L("span",{className:"truncate",title:t.name,children:t.name})]}),
83
- /* @__PURE__ */L("td",{className:"px-3 h-8 text-right tabular-nums text-gray-500",children:"folder"===t.kind?"—":N(t.size)}),
84
- /* @__PURE__ */L("td",{className:"px-3 h-8 text-right text-gray-500 tabular-nums",children:W(t.modifiedAt)}),
85
- /* @__PURE__ */L("td",{className:"px-3 h-8 text-right whitespace-nowrap",children:!P&&/* @__PURE__ */E(T,{children:["file"===t.kind&&/* @__PURE__ */L("button",{onClick:e=>{e.stopPropagation(),xe(t)},className:"px-2 py-0.5 rounded hover:bg-gray-200 text-gray-500 text-2xs",children:"Download"}),
86
- /* @__PURE__ */L("button",{onClick:e=>{e.stopPropagation(),(async e=>{const t=await b({title:`Rename ${e.kind}`,defaultValue:e.name,confirmLabel:"Rename"});if(!t||t===e.name)return;if(/[\\/]/.test(t))return void f.error("Names cannot contain slashes");const a=S(I,e.name),r=S(I,t),n=await he(`${O}/api/rename`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({from:a,to:r})});if(!n.ok){const e=await n.json().catch(()=>({}));return void f.error(e.error||`Rename failed (${n.status})`)}ue(I)})(t)},className:"px-2 py-0.5 rounded hover:bg-gray-200 text-gray-500 text-2xs ml-1",children:"Rename"}),
87
- /* @__PURE__ */L("button",{onClick:e=>{e.stopPropagation(),(async e=>{if(!await y({title:`Delete ${e.kind}`,message:`"${e.name}"${"folder"===e.kind?" and everything inside":""} will be permanently removed.`,confirmLabel:"Delete",variant:"danger"}))return;const t=S(I,e.name),a=await he(`${O}/api/files?path=${encodeURIComponent(t)}`,{method:"DELETE"});if(!a.ok){const e=await a.json().catch(()=>({}));return void f.error(e.error||`Delete failed (${a.status})`)}ue(I)})(t)},className:"px-2 py-0.5 rounded hover:bg-red-100 text-red-600 text-2xs ml-1",children:"Delete"})]})})]},t.name))})]})})]})})}),Y&&/* @__PURE__ */L("div",{className:"absolute inset-0 bg-blue-500/15 border-4 border-dashed border-blue-500 pointer-events-none flex items-center justify-center z-20",children:/* @__PURE__ */L("div",{className:"px-4 py-2 rounded-md bg-blue-600 text-white text-sm font-medium shadow-lg",children:"Drop to upload"})})]})}export{O as default};
@@ -1 +0,0 @@
1
- export{PdfViewer as default,fitScale,pdfWasmParams}from"./chunk-6K5EFHDQ.js";import"./chunk-WSRZRWN7.js";import"./chunk-K7PQXJO7.js";import"./chunk-3G5TA3IF.js";import"./chunk-LVCRH3K6.js";import"./chunk-C3QOHMR6.js";import"./chunk-2J6F4EE7.js";
@@ -1 +0,0 @@
1
- var r="7.43.0",a=r;export{a as APP_VERSION,r as VERSION};