efficient-shell 4.163.0 → 4.164.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 (60) hide show
  1. package/README.md +44 -4
  2. package/dist/{Browser-2I27OQFE.js → Browser-AZSXQEJ2.js} +14 -14
  3. package/dist/Calculator-GRNWTZIZ.js +29 -0
  4. package/dist/ConfirmDialog-LSFNIGKM.js +1 -0
  5. package/dist/{CurrencyConverter-4EEIPAVX.js → CurrencyConverter-VT2SZDA3.js} +7 -7
  6. package/dist/{Documents-24YAA5UU.js → Documents-WIYSUFCQ.js} +12 -12
  7. package/dist/{Files-BU7FY2VD.js → Files-FAO4MFCO.js} +30 -30
  8. package/dist/{Notepad-3D4L3K5W.js → Notepad-APW5DX37.js} +11 -11
  9. package/dist/PdfViewer-3NWOBXPP.js +1 -0
  10. package/dist/{PomodoroTimer-B4OPUTJL.js → PomodoroTimer-4JBDIQZK.js} +27 -27
  11. package/dist/{Preview-VZSNH76G.js → Preview-FBVFDTPN.js} +24 -24
  12. package/dist/Sidebar-KRN5ZV3F.js +44 -0
  13. package/dist/{Spreadsheet-TAJ24BQS.js → Spreadsheet-IQF6QAWU.js} +12 -12
  14. package/dist/{Stock-VEPDDIMJ.js → Stock-NIM7MAYG.js} +3 -3
  15. package/dist/{Weather-KGZF4DDW.js → Weather-RLISJWFA.js} +14 -14
  16. package/dist/{WorldClock-UGADOCFW.js → WorldClock-G4L5OLOT.js} +6 -6
  17. package/dist/apps/index.js +1 -1
  18. package/dist/brand.css +1 -1
  19. package/dist/{chunk-ZAJPQAGP.js → chunk-37QZZRDT.js} +1 -1
  20. package/dist/{chunk-PH3PRIFP.js → chunk-4UCRT4ST.js} +5 -5
  21. package/dist/{chunk-GSBX7KIS.js → chunk-6NG4TM3E.js} +16 -16
  22. package/dist/{chunk-J5HNLMGZ.js → chunk-6ZUAHFK3.js} +11 -11
  23. package/dist/{chunk-2FZGALCU.js → chunk-DGWWPVEQ.js} +6 -6
  24. package/dist/chunk-ELSUXC3N.js +1 -0
  25. package/dist/chunk-HQREOTKI.js +9 -0
  26. package/dist/{chunk-FWY5IRGL.js → chunk-I3CQI462.js} +2 -2
  27. package/dist/{chunk-NLASNJNY.js → chunk-IY4CP2HO.js} +1 -1
  28. package/dist/{chunk-UMOVLVTC.js → chunk-J5E4VMLJ.js} +1 -1
  29. package/dist/chunk-L2W5XPZ3.js +1 -0
  30. package/dist/chunk-LZIS72CF.js +9 -0
  31. package/dist/{chunk-VWTYRICQ.js → chunk-MHGFTCEA.js} +498 -490
  32. package/dist/{chunk-E4JWTNG5.js → chunk-NNUE7M5G.js} +12 -12
  33. package/dist/{chunk-4GOHPACN.js → chunk-RKOTKWWU.js} +1 -1
  34. package/dist/{chunk-TZ2EFTST.js → chunk-SVJN7WWF.js} +8 -8
  35. package/dist/{chunk-6A7BN7EN.js → chunk-T7DDT2Z6.js} +3 -3
  36. package/dist/{chunk-TBM3ZIAN.js → chunk-TJ4YXVQQ.js} +97 -97
  37. package/dist/{chunk-PX435JG4.js → chunk-U7ZDZXOJ.js} +1 -1
  38. package/dist/{chunk-MAMJHPFN.js → chunk-XY25UBVS.js} +1 -1
  39. package/dist/{chunk-IJ3V2YOS.js → chunk-YLJ7AZON.js} +9 -9
  40. package/dist/chunk-YS57MJFM.js +1 -0
  41. package/dist/{chunk-WURTAA2S.js → chunk-Z43BI2JI.js} +1 -1
  42. package/dist/file-intake/index.js +1 -1
  43. package/dist/{index-JQXMH_km.d.ts → index-CFLEu3eh.d.ts} +135 -12
  44. package/dist/index.d.ts +11 -4
  45. package/dist/index.js +99 -99
  46. package/dist/map/index.js +6 -6
  47. package/dist/page-tabs/index.js +5 -5
  48. package/dist/pdf/index.js +1 -1
  49. package/dist/ui/index.d.ts +1 -1
  50. package/dist/ui/index.js +1 -1
  51. package/package.json +1 -1
  52. package/dist/Calculator-2EB2RAT7.js +0 -29
  53. package/dist/ConfirmDialog-4LZXI6FM.js +0 -1
  54. package/dist/PdfViewer-5VBKCPCM.js +0 -1
  55. package/dist/Sidebar-7AY5WJZC.js +0 -44
  56. package/dist/chunk-A6O4Y63A.js +0 -1
  57. package/dist/chunk-L7ZMDZAB.js +0 -9
  58. package/dist/chunk-OSJ3ADF2.js +0 -1
  59. package/dist/chunk-QRJ2ERKR.js +0 -9
  60. package/dist/chunk-YJX2IWHB.js +0 -1
package/dist/map/index.js CHANGED
@@ -1,23 +1,23 @@
1
1
  "use client";
2
- import{Button_default as e}from"../chunk-PH3PRIFP.js";import{rootIsDark as t,ROOT_THEME_ATTRIBUTES as n}from"../chunk-MAIHBBWT.js";import{useShellStrings as r}from"../chunk-YJX2IWHB.js";import{useRef as o,useState as a,useEffect as l,useCallback as i,useMemo as s,useSyncExternalStore as c}from"react";import{createPortal as u}from"react-dom";import{jsxs as d,jsx as p,Fragment as m}from"react/jsx-runtime";import{useQuery as h}from"@tanstack/react-query";var g="maplibregl-compact-show";function f(e){if(!e)return()=>{};const t=()=>!!e.classList.contains(g)&&(e.classList.remove(g),!0);if(t())return()=>{};const n=new MutationObserver(()=>{t()&&n.disconnect()});return n.observe(e,{attributes:!0,attributeFilter:["class"]}),()=>n.disconnect()}var y=20,b=12,x=480,v={center:[0,0],left:[y,0],right:[-20,0],top:[0,y],"top-left":[0,y],"top-right":[0,y],bottom:[0,-20],"bottom-left":[0,-20],"bottom-right":[0,-20]},w=(e,t=12)=>Math.max(0,Math.floor(e-t-b-y-10-16));function k(e,t,n,r=12){const o=e.y-y-r,a=n.height-e.y-y-b,l=t.height<=o||t.height>a&&o>=a,i=l?Math.max(0,t.height-o):-Math.max(0,t.height-a);let s="",c=0;return e.x-t.width/2<b?(s="-left",c=Math.max(0,b-e.x)):e.x+t.width/2>n.width-b&&(s="-right",c=-Math.max(0,e.x-(n.width-b))),{anchor:`${l?"bottom":"top"}${s}`,move:{x:c,y:i}}}var M="maplibre-gl-worker.mjs",N=e=>`/maplibre-gl/${e}/${M}`,C=null;function L(){return C??=Promise.all([import("maplibre-gl"),import("maplibre-gl/dist/maplibre-gl.css")]).then(([e])=>(e.setWorkerUrl(N(e.getVersion())),e)).catch(e=>{throw C=null,e}),C}var $=24,E=28,S=29;function j(e){const t=[...e].sort((e,t)=>e-t),n=[];for(let e=0;e<t.length;){let r=e;for(;r+1<t.length&&t[r+1]===t[r]+1;)r++;n.push(r===e?String(t[e]):`${t[e]}–${t[r]}`),e=r+1}return n.join(", ")}function A(e){const t=Math.max(E,12+8*e.length);return t+t%2}var z=(e,t,n,r)=>({left:e-n/2,top:t-r/2,right:e+n/2,bottom:t+r/2});function B(e,t){return e.left<t.right+1&&t.left<e.right+1&&e.top<t.bottom+1&&t.top<e.bottom+1}var R=e=>z(e.x,e.y,e.width,e.height);function T(e){for(let t=0;t<e.length;t++)for(let n=t+1;n<e.length;n++)if(B(R(e[t]),R(e[n])))return[e[t],e[n]];return null}function O(e,t=[]){const n=[],r=e=>t.some(t=>B(t,e));let o=e.filter(e=>null!==e.stop).sort((e,t)=>e.stop-t.stop).map(e=>({keys:[e.key],stops:[e.stop],x:e.x,y:e.y,width:E,height:E,under:0}));for(let e=T(o);e;e=T(o)){const[t,n]=e;t.keys.push(...n.keys),t.stops.push(...n.stops),t.stops.sort((e,t)=>e-t),t.width=A(j(t.stops)),o=o.filter(e=>e!==n)}o=o.filter(e=>!r(R(e))||(n.push(...e.keys),!1));const a=[];for(const t of e){if(null!==t.stop)continue;const e=z(t.x,t.y,$,$),l=o.find(t=>B(R(t),e));if(l||r(e)){n.push(t.key),l&&l.under++;continue}const i=a.find(t=>B(R(t),e));i?i.keys.push(t.key):a.push({keys:[t.key],stops:[],x:t.x,y:t.y,width:$,height:$,under:0})}return{groups:[...o,...a],hidden:n}}function W(e,t,n){let r=-1/0;for(const o of t){const t=Math.max(Math.abs(o.x-e.x),Math.abs(o.y-e.y));r=Math.max(r,0===t?1/0:n+Math.log2(29/t))}return r}function F(e){const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:n}),()=>t.disconnect()}var q=t;var K="routes",P=["routes-road","routes-estimate"];function _(e){const t=document.createElement("span");t.style.display="none",t.style.color=e,document.body.appendChild(t);const n=getComputedStyle(t).color||"#2563eb";return t.remove(),H(n)}function H(e){const t=document.createElement("canvas").getContext("2d");if(!t)return"#2563eb";t.fillStyle="#2563eb",t.fillStyle=e,t.fillRect(0,0,1,1);const[n,r,o]=t.getImageData(0,0,1,1).data;return`rgb(${n}, ${r}, ${o})`}var I={light:"https://tiles.openfreemap.org/styles/positron",dark:"https://tiles.openfreemap.org/styles/dark"},D={center:[30,20],zoom:1},Z="ring-2 ring-gray-900 ring-offset-2";var V="var(--color-gray-600, #4b5563)",G="http://www.w3.org/2000/svg",U=()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches,J=/^(?:\d+|[xytrblse](?:-\d+)?|solid|dashed|dotted|double|hidden|none)$/;function X(e){return e.split(/\s+/).some(e=>{const t=e.search(/[[(]/),n=t<0?e:e.slice(0,t),r=e.slice(n.lastIndexOf(":")+1);return r.startsWith("border-")&&!J.test(r.slice(7))})}var Y=(...e)=>e.filter(Boolean).join(" ");function Q(e){const t=document.createElementNS(G,"svg");t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("fill","none"),t.setAttribute("stroke","currentColor"),t.setAttribute("stroke-width","2"),t.setAttribute("aria-hidden","true");for(const n of e){const e=document.createElementNS(G,"path");e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),e.setAttribute("d",n),t.appendChild(e)}return t}function ee(e,t){for(const[n,r]of Object.entries(t??{}))e.dataset[n]=r}var te=(e,t)=>Y("relative grid place-items-center rounded-full cursor-pointer",t&&(null!=e.stop?"h-7 w-7":"h-6 w-6"));function ne(e,t,n,r){const o=t&&!r&&null==e.stop&&!e.dot;return Y("grid place-items-center rounded-full border-2 font-semibold leading-none shadow-md transition-transform motion-reduce:transition-none",!X(e.tone)&&"border-white",e.tone,e.dot?"h-4 w-4 opacity-80":null!=e.stop?"h-7 w-7 text-xs ring-2 ring-gray-900":o?"h-8 w-8 text-xs [&_svg]:h-4 [&_svg]:w-4":"h-6 w-6 text-[10px] [&_svg]:h-3.5 [&_svg]:w-3.5",t&&(o?"ring-2 ring-gray-900 ring-offset-1":Z),e.approximate&&"border-dashed opacity-80",e.faded&&!t&&"opacity-40",n&&"scale-125 opacity-100")}var re=e=>Y("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",!X(e.tone??"")&&"border-white",e.tone??"bg-gray-900 text-white");function oe({pins:t,selectedKey:n,focus:s,onSelect:m,ariaLabel:h,className:g="",children:y,routes:b,fitTo:x,attribution:M,marks:N,groupCrowded:C=!1,noun:S,highlightKey:A=null,picking:z=!1,onPick:B,card:R,cardMinMapWidth:T=480,fullScreen:G,initialView:J=D,cooperativeGestures:X=!1}){const oe=r().map,ie=o(null),se=o(null),ce=o(null),ue=o(null),de=o([]),pe=o(/* @__PURE__ */new Map),me=o(/* @__PURE__ */new Map),he=o(/* @__PURE__ */new Map),ge=o(null),fe=o(/* @__PURE__ */new Map),ye=o(""),[be,xe]=a(!1),[ve,we]=a(!1),ke=c(F,q,()=>!1)?"dark":"light",Me=o({onSelect:m,onPick:B,picking:z,pins:t,selectedKey:n,highlightKey:A,groupCrowded:C,strings:oe,noun:S});l(()=>{Me.current={onSelect:m,onPick:B,picking:z,pins:t,selectedKey:n,highlightKey:A,groupCrowded:C,strings:oe,noun:S}});const Ne=i(()=>{const e=ce.current,{pins:t,selectedKey:n}=Me.current,r=n?t.find(e=>e.key===n):void 0;e&&r&&!e.getBounds().contains([r.lng,r.lat])&&e.easeTo({center:[r.lng,r.lat],duration:U()?0:400})},[]),Ce=o(!1),Le=i((e,t)=>{const n=ce.current,r=ue.current;if(!n||!r)return;const o=n.getZoom();if(o>=17.5){const t=e.indexOf(Me.current.selectedKey??"");return void Me.current.onSelect(e[(t+1)%e.length])}const a=e.map(e=>pe.current.get(e).pin),l=new r.LngLatBounds([a[0].lng,a[0].lat],[a[0].lng,a[0].lat]);for(const e of a)l.extend([e.lng,e.lat]);const i=a.map(e=>n.project([e.lng,e.lat])),s=Math.max(...i.map((e,t)=>W(e,i.filter((e,n)=>n!==t),o))),{clientWidth:c,clientHeight:u}=n.getContainer(),d=n.cameraForBounds(l,{padding:Math.min(64,c/4,u/4)})?.zoom??18,p=document.activeElement===t;Ce.current=!0,n.once("moveend",()=>{if(Ce.current=!1,!p)return;const e=a[0].key,t=pe.current.get(e)?.button,n=t&&"none"!==t.style.display?t:[...me.current.values()].find(t=>t.keys.includes(e))?.button;n?.focus({preventScroll:!0})}),n.easeTo({center:l.getCenter(),zoom:Math.min(18,Math.max(o+1,Math.min(d,s))),duration:U()?0:600})},[]),$e=i(()=>{const e=ce.current,t=ue.current;if(!e||!t||!ie.current||Ce.current&&e.isMoving())return;const{selectedKey:n,highlightKey:r,groupCrowded:o,strings:a,noun:l}=Me.current;for(const[e,t]of pe.current){const a=ne(t.pin,e===n,e===r,o);t.mark.className!==a&&(t.mark.className=a);const l=e===n?"1":"";t.button.style.zIndex!==l&&(t.button.style.zIndex=l)}let i=null;if(o){const r=e.getContainer().getBoundingClientRect(),o=[...ie.current.querySelectorAll("a[href], button, input, select, textarea, summary, [role='button'], [tabindex]:not([tabindex='-1'])")].filter(e=>!e.closest("[data-pin], [data-pin-group], .maplibregl-canvas")).map(e=>{const t=e.getBoundingClientRect(),n=e.closest("[data-map-card]")?.getBoundingClientRect()??t;return{left:Math.max(t.left,n.left)-r.left,top:Math.max(t.top,n.top)-r.top,right:Math.min(t.right,n.right)-r.left,bottom:Math.min(t.bottom,n.bottom)-r.top}}).filter(e=>e.right>e.left&&e.bottom>e.top);i=O([...pe.current.values()].map(({pin:t})=>{const n=e.project([t.lng,t.lat]);return{key:t.key,x:n.x,y:n.y,stop:t.stop??null}}),o);const s=e=>(l??a.places)(e),c=e.getZoom()<17.5?a.spread:a.cycle,u=(e,t)=>{const n=t?"":"none";e.style.display!==n&&(e.style.display=n)},d=/* @__PURE__ */new Map;for(const r of i.groups){const o=r.under>0?a.closeBy(r.under,s(r.under)):null,l=1===r.keys.length?pe.current.get(r.keys[0]):null;if(l){u(l.button,!0),l.button.setAttribute("aria-label",o?`${l.name}; ${o}`:l.name),l.button.title=o?`${l.title}\n${o}`:l.title;continue}for(const e of r.keys)u(pe.current.get(e).button,!1);const i=r.keys.join(" ");let p=me.current.get(i);if(!p){const n=document.createElement("button");n.type="button",n.dataset.pinGroup="",n.className="grid place-items-center rounded-full cursor-pointer",n.append(document.createElement("span"));const o=pe.current.get(r.keys[0]).pin,a={button:n,keys:r.keys,marker:new t.Marker({element:n,anchor:"center"}).setLngLat([o.lng,o.lat]).addTo(e)};n.addEventListener("click",e=>{e.stopPropagation(),Le(a.keys,n)}),p=a}p.keys=r.keys;const m=r.keys.map(e=>pe.current.get(e)),h=r.stops.length>0?j(r.stops):String(m.length),g=r.stops.length>0?a.stops(h):a.group(m.length,s(m.length));p.button.style.width=`${r.width}px`,p.button.style.height=`${r.height}px`,p.button.setAttribute("aria-label",`${g}: ${m.map(e=>e.pin.label).join("; ")}. ${c}${o?`; ${o}`:""}.`),p.button.title=[`${g}:`,...m.map(e=>e.title),...o?[o]:[],c].join("\n");const f=p.button.firstElementChild;f.textContent=h;const y=Y("grid place-items-center rounded-full border-2 border-gray-700 bg-white font-semibold leading-none text-gray-900 shadow-sm",r.stops.length>0?"h-7 w-full px-1 text-xs ring-2 ring-gray-900":m.every(e=>e.pin.dot)?"h-5 w-5 text-[0.6rem]":"h-6 w-6 text-[0.7rem]",null!=n&&r.keys.includes(n)&&Z);f.className!==y&&(f.className=y),d.set(i,p)}for(const e of i.hidden)u(pe.current.get(e).button,!1);for(const[e,t]of me.current)d.has(e)||t.marker.remove();me.current=d}if(ge.current){const e=r&&i?i.groups.find(e=>e.keys.includes(r)&&e.keys.length>1):void 0,t=r?pe.current.get(r):void 0,n=r?he.current.get(r):void 0,o=e?{at:pe.current.get(e.keys[0]).pin,width:e.width,height:e.height}:t?{at:t.pin,width:t.button.offsetWidth||(null!=t.pin.stop?E:$),height:t.button.offsetHeight||(null!=t.pin.stop?E:$)}:n?{at:n.mark,width:n.element.offsetWidth||E,height:n.element.offsetHeight||E}:null,a=ge.current.getElement();a.style.display=o?"":"none",o&&(ge.current.setLngLat([o.at.lng,o.at.lat]),a.style.width=`${o.width+22}px`,a.style.height=`${o.height+22}px`)}},[Le]);l(()=>{if($e(),!ie.current)return;const e=new ResizeObserver(()=>$e());e.observe(ie.current);for(const t of ie.current.children)t.contains(se.current)||e.observe(t);return()=>e.disconnect()}),l(()=>{let e=!1,t=null,n=null,r=()=>{};return(async()=>{try{const o=await L();if(e||!se.current)return;ue.current=o,t=new o.Map({container:se.current,style:I[ke],center:J.center,zoom:J.zoom,attributionControl:M?{compact:!0,customAttribution:M}:{compact:!0},dragRotate:!1,pitchWithRotate:!1,touchPitch:!1,maxPitch:0,cooperativeGestures:"coarse"===X?window.matchMedia("(pointer: coarse)").matches:X}),t.touchZoomRotate.disableRotation(),t.keyboard.disableRotation(),t.addControl(new o.NavigationControl({showCompass:!1}),"top-right");const a=document.createElement("div");a.dataset.pinRing="",a.setAttribute("aria-hidden","true"),a.className="pointer-events-none rounded-full border-2 border-gray-900 bg-gray-900/15 shadow-[0_0_0_2px_var(--color-white,#fff)]",a.style.display="none",ge.current=new o.Marker({element:a,anchor:"center"}).setLngLat(J.center).addTo(t),t.on("click",e=>{Me.current.picking&&Me.current.onPick?.({lat:e.lngLat.lat,lng:e.lngLat.lng})}),t.on("move",$e),t.on("moveend",$e),t.on("resize",$e),t.on("error",e=>console.warn("[map]",e.error?.message)),r=f(se.current.querySelector(".maplibregl-ctrl-attrib"));const l=t;n=new ResizeObserver(()=>{l.resize(),Ne()}),n.observe(se.current),ce.current=t,xe(!0)}catch(t){console.error("[map] could not start",t),e||we(!0)}})(),()=>{e=!0,n?.disconnect(),r(),de.current.forEach(e=>e.remove()),de.current=[],me.current.forEach(e=>e.marker.remove()),me.current.clear(),ge.current?.remove(),ge.current=null,t?.remove(),ce.current=null}},[]);const Ee=o(ke);l(()=>{be&&ce.current&&Ee.current!==ke&&(Ee.current=ke,ce.current.setStyle(I[ke]))},[be,ke]),l(()=>{const e=ce.current,n=ue.current;if(!be||!e||!n)return;de.current.forEach(e=>e.remove()),de.current=[],me.current.forEach(e=>e.marker.remove()),me.current.clear(),pe.current.clear(),he.current.clear();for(const e of fe.current.keys())t.some(t=>t.key===e)||fe.current.delete(e);const r=Me.current.strings;for(const o of t){const t=document.createElement("button");t.type="button",t.dataset.pin=o.key,t.className=te(o,C);const a=o.approximate?r.approximate(o.label):o.label,l=o.title??(o.approximate?r.approximateTitle(o.label):o.label);t.setAttribute("aria-label",a),t.title=l;const i=document.createElement("span");if(ee(i,o.data),o.dot);else if(null!=o.iconNode){const e=fe.current.get(o.key);e&&i.append(e)}else o.icon?.length?i.append(Q(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=Y("absolute -right-2 -top-2 grid h-4 min-w-4 place-items-center rounded-full px-0.5 text-[9px] font-semibold leading-none shadow",o.badgeTone??"bg-white text-gray-900"),e.textContent=o.badge,t.appendChild(e)}t.addEventListener("click",e=>{e.stopPropagation(),Me.current.onSelect(o.key)}),de.current.push(new n.Marker({element:t,anchor:"center"}).setLngLat([o.lng,o.lat]).addTo(e)),pe.current.set(o.key,{pin:o,button:t,mark:i,name:a,title:l})}for(const t of N??[]){const r=document.createElement("div");r.dataset.mapMark=t.key,ee(r,t.data),r.className=re(t),r.textContent=t.text,r.title=t.title??t.label,r.setAttribute("role","img"),r.setAttribute("aria-label",t.label),de.current.push(new n.Marker({element:r,anchor:"center"}).setLngLat([t.lng,t.lat]).addTo(e)),he.current.set(t.key,{mark:t,element:r})}$e()},[be,t,N,C,$e]),l(()=>{be&&$e()},[be,n,A,$e]),l(()=>{if(!be||!n)return;const e=requestAnimationFrame(Ne);return()=>cancelAnimationFrame(e)},[be,n,Ne]),l(()=>{const e=ce.current,n=ue.current,r=x?[...t,...N??[]].filter(e=>x.includes(e.key)):t;if(!be||!e||!n||0===r.length)return;const o=r.map(e=>`${e.key}@${e.lat},${e.lng}`).sort().join("|");if(ye.current===o)return;const a=""===ye.current;if(ye.current=o,1===r.length)return void e.jumpTo({center:[r[0].lng,r[0].lat],zoom:13});const l=new n.LngLatBounds([r[0].lng,r[0].lat],[r[0].lng,r[0].lat]);for(const e of r)l.extend([e.lng,e.lat]);e.fitBounds(l,{padding:48,maxZoom:14,animate:!a})},[be,t,N,x]),l(()=>{const e=ce.current;if(!be||!e)return;const t=(b??[]).filter(e=>e.coordinates.length>=2),n=[...new Set(t.flatMap(e=>e.attribution?[e.attribution]:[]))].join(" · "),r=()=>{const r=function(){const e=document.createElement("span");e.className="text-blue-600",e.style.display="none",document.body.appendChild(e);const t=getComputedStyle(e).color||"#2563eb";return e.remove(),H(t)}(),o={type:"FeatureCollection",features:t.map(e=>({type:"Feature",properties:{key:e.key,estimate:e.estimate,faded:!!e.faded,color:e.color?_(e.color):r},geometry:{type:"LineString",coordinates:e.coordinates}}))},a=["case",["get","faded"],.25,.85],l=["get","color"],i=e.getSource(K);if(i&&(i.attribution||"")!==n){for(const t of P)e.getLayer(t)&&e.removeLayer(t);e.removeSource(K)}const s=e.getSource(K);s?s.setData(o):e.addSource(K,{type:"geojson",data:o,...n?{attribution:n}:{}}),e.getLayer("routes-road")||e.addLayer({id:"routes-road",type:"line",source:K,filter:["!",["get","estimate"]],layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":l,"line-width":4,"line-opacity":a}}),e.getLayer("routes-estimate")||e.addLayer({id:"routes-estimate",type:"line",source:K,filter:["get","estimate"],layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":l,"line-width":3,"line-dasharray":[1.5,1.5],"line-opacity":a}})},o=()=>{try{r()}catch(e){console.debug("[map] routes wait for the style",e)}};return o(),e.on("style.load",o),e.once("idle",o),()=>{e.off("style.load",o),e.off("idle",o)}},[be,b,ke]),l(()=>{const e=ce.current;if(!be||!e||!s)return;const n=t.find(e=>e.key===s.key);if(!n)return;const r=e.getZoom(),o=C?W(e.project([n.lng,n.lat]),t.filter(e=>e.key!==n.key).map(t=>e.project([t.lng,t.lat])),r):-1/0,a={center:[n.lng,n.lat],zoom:Math.min(18,Math.max(r,13,o))};U()?e.jumpTo(a):e.flyTo({...a,duration:600})},[be,s?.n]);const[Se,je]=a(!1);l(()=>{const e=ie.current;if(!e)return;const t=()=>je(e.clientWidth<T);t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[T]);const Ae=n?t.find(e=>e.key===n)??null:null,ze=Ae?.key??null,Be=Ae?.lng??0,Re=Ae?.lat??0,Te=be&&!Se&&null!=R&&!!Ae,[Oe,We]=a(null);l(()=>{const e=ce.current,t=ue.current;if(!(Te&&e&&t&&ze))return;const n=document.createElement("div");n.dataset.mapCard="",n.className="w-[26rem] overflow-y-auto overscroll-contain";const r=new t.Popup({anchor:"bottom",offset:v,className:"rosh-map-card",maxWidth:"none",closeButton:!1,closeOnClick:!1,closeOnMove:!1,focusAfterOpen:!1}).setLngLat([Be,Re]).setDOMContent(n).addTo(e),o=r.getElement(),a=o.querySelector(".maplibregl-popup-content");a&&Object.assign(a.style,{padding:"0",background:"transparent",borderRadius:"0",boxShadow:"none"});const l=o.querySelector(".maplibregl-popup-tip");l&&Object.assign(l.style,{borderTopColor:V,borderBottomColor:V}),We(n);let i=!1,s=!1;const c=(t=!0)=>{if(s)return;if(e.isMoving())return void(i||(i=!0,e.once("moveend",()=>{i=!1,c()})));const{clientWidth:o,clientHeight:a}=e.getContainer(),l=function(e,t){const n=e.getBoundingClientRect().top,r=[...e.querySelectorAll(".maplibregl-ctrl-top-left > *, .maplibregl-ctrl-top-right > *"),...t?.querySelectorAll(":scope > [data-map-control]")??[]];let o=0;for(const e of r){const t=e.getBoundingClientRect();t.height>0&&(o=Math.max(o,t.bottom-n))}return o}(e.getContainer(),ie.current)+8,u=`${w(a,l)}px`;n.style.maxHeight!==u&&(n.style.maxHeight=u);const d=r.getElement(),p=r.getLngLat(),{anchor:m,move:h}=k(e.project(p),{width:d.offsetWidth,height:d.offsetHeight},{width:o,height:a},l);r.options.anchor!==m&&(r.options.anchor=m,r.setLngLat(p)),!t||0===h.x&&0===h.y||e.panBy([-h.x,-h.y],{duration:U()?0:250}),$e()},u=new ResizeObserver(()=>c());u.observe(n);const d=()=>c(),p=()=>{i||c(!1)};e.on("resize",d),e.on("moveend",p);let m=!1;const h=pe.current,g=e=>{m=n.contains(e.target)};return document.addEventListener("focusin",g),()=>{if(s=!0,u.disconnect(),e.off("resize",d),e.off("moveend",p),document.removeEventListener("focusin",g),r.remove(),We(null),m&&(!document.activeElement||document.activeElement===document.body)){const e=h.get(ze)?.button;e&&"none"!==e.style.display&&e.focus({preventScroll:!0})}}},[Te,ze,Be,Re,$e]);const Fe=G?.active??!1,qe=o(G?.onChange);l(()=>{qe.current=G?.onChange}),l(()=>{if(!G)return;const e=document.documentElement;Fe&&!document.fullscreenElement&&e.requestFullscreen&&e.requestFullscreen().catch(()=>{}),!Fe&&document.fullscreenElement&&document.exitFullscreen().catch(()=>{})},[Fe]);const Ke=!!G;return l(()=>{if(!Ke)return;const e=()=>{document.fullscreenElement||qe.current?.(!1)};return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[Ke]),/* @__PURE__ */d("div",{ref:ie,className:Y("relative min-h-72 overflow-hidden rounded-lg border border-gray-200 bg-gray-100",z&&"[&_canvas]:cursor-crosshair",g),children:[
3
- /* @__PURE__ */p("div",{className:"absolute inset-0",children:/* @__PURE__ */p("div",{ref:se,className:"h-full w-full",role:"region","aria-label":h})}),ve&&/* @__PURE__ */p("p",{className:"absolute inset-0 grid place-items-center p-6 text-center text-sm text-gray-500",children:oe.failed}),G&&/* @__PURE__ */p(e,{"data-map-control":"",variant:"secondary",size:"sm",className:"absolute left-3 top-3 z-10",onClick:()=>G.onChange(!G.active),leftIcon:/* @__PURE__ */p(le,{leave:G.active}),children:G.active?oe.leaveFullScreen:oe.fullScreen}),y,null!=R&&!Te&&/* @__PURE__ */p("div",{"data-map-card":"",className:"absolute bottom-3 left-3 right-3 z-10 max-h-[calc(100%-1.5rem)] max-w-md overflow-y-auto overscroll-contain",children:R}),Te&&Oe?u(R,Oe):null,be&&/* @__PURE__ */p(ae,{pins:t,hosts:fe.current})]})}function ae({pins:e,hosts:t}){/* @__PURE__ */
2
+ import{Button_default as e}from"../chunk-4UCRT4ST.js";import{rootIsDark as t,ROOT_THEME_ATTRIBUTES as n}from"../chunk-MAIHBBWT.js";import{useShellStrings as r}from"../chunk-YS57MJFM.js";import{useRef as o,useState as a,useEffect as l,useCallback as i,useMemo as s,useSyncExternalStore as c}from"react";import{createPortal as u}from"react-dom";import{jsxs as d,jsx as p,Fragment as m}from"react/jsx-runtime";import{useQuery as h}from"@tanstack/react-query";var g="maplibregl-compact-show";function f(e){if(!e)return()=>{};const t=()=>!!e.classList.contains(g)&&(e.classList.remove(g),!0);if(t())return()=>{};const n=new MutationObserver(()=>{t()&&n.disconnect()});return n.observe(e,{attributes:!0,attributeFilter:["class"]}),()=>n.disconnect()}var y=20,b=12,x=480,v={center:[0,0],left:[y,0],right:[-20,0],top:[0,y],"top-left":[0,y],"top-right":[0,y],bottom:[0,-20],"bottom-left":[0,-20],"bottom-right":[0,-20]},w=(e,t=12)=>Math.max(0,Math.floor(e-t-b-y-10-16));function k(e,t,n,r=12){const o=e.y-y-r,a=n.height-e.y-y-b,l=t.height<=o||t.height>a&&o>=a,i=l?Math.max(0,t.height-o):-Math.max(0,t.height-a);let s="",c=0;return e.x-t.width/2<b?(s="-left",c=Math.max(0,b-e.x)):e.x+t.width/2>n.width-b&&(s="-right",c=-Math.max(0,e.x-(n.width-b))),{anchor:`${l?"bottom":"top"}${s}`,move:{x:c,y:i}}}var M="maplibre-gl-worker.mjs",N=e=>`/maplibre-gl/${e}/${M}`,C=null;function L(){return C??=Promise.all([import("maplibre-gl"),import("maplibre-gl/dist/maplibre-gl.css")]).then(([e])=>(e.setWorkerUrl(N(e.getVersion())),e)).catch(e=>{throw C=null,e}),C}var S=24,$=28,E=29;function j(e){const t=[...e].sort((e,t)=>e-t),n=[];for(let e=0;e<t.length;){let r=e;for(;r+1<t.length&&t[r+1]===t[r]+1;)r++;n.push(r===e?String(t[e]):`${t[e]}–${t[r]}`),e=r+1}return n.join(", ")}function A(e){const t=Math.max($,12+8*e.length);return t+t%2}var z=(e,t,n,r)=>({left:e-n/2,top:t-r/2,right:e+n/2,bottom:t+r/2});function B(e,t){return e.left<t.right+1&&t.left<e.right+1&&e.top<t.bottom+1&&t.top<e.bottom+1}var T=e=>z(e.x,e.y,e.width,e.height);function R(e){for(let t=0;t<e.length;t++)for(let n=t+1;n<e.length;n++)if(B(T(e[t]),T(e[n])))return[e[t],e[n]];return null}function O(e,t=[]){const n=[],r=e=>t.some(t=>B(t,e));let o=e.filter(e=>null!==e.stop).sort((e,t)=>e.stop-t.stop).map(e=>({keys:[e.key],stops:[e.stop],x:e.x,y:e.y,width:$,height:$,under:0}));for(let e=R(o);e;e=R(o)){const[t,n]=e;t.keys.push(...n.keys),t.stops.push(...n.stops),t.stops.sort((e,t)=>e-t),t.width=A(j(t.stops)),o=o.filter(e=>e!==n)}o=o.filter(e=>!r(T(e))||(n.push(...e.keys),!1));const a=[];for(const t of e){if(null!==t.stop)continue;const e=z(t.x,t.y,S,S),l=o.find(t=>B(T(t),e));if(l||r(e)){n.push(t.key),l&&l.under++;continue}const i=a.find(t=>B(T(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 F(e){const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:n}),()=>t.disconnect()}var q=t;var K="routes",_=["routes-road","routes-estimate"];function H(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(),P(n)}function P(e){const t=document.createElement("canvas").getContext("2d");if(!t)return"#2563eb";t.fillStyle="#2563eb",t.fillStyle=e,t.fillRect(0,0,1,1);const[n,r,o]=t.getImageData(0,0,1,1).data;return`rgb(${n}, ${r}, ${o})`}var I={light:"https://tiles.openfreemap.org/styles/positron",dark:"https://tiles.openfreemap.org/styles/dark"},D={center:[30,20],zoom:1},Z="ring-2 ring-gray-900 ring-offset-2";var V="var(--color-gray-600, #4b5563)",G="http://www.w3.org/2000/svg",U=()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches,J=/^(?:\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-")&&!J.test(r.slice(7))})}var Q=(...e)=>e.filter(Boolean).join(" ");function X(e){const t=document.createElementNS(G,"svg");t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("fill","none"),t.setAttribute("stroke","currentColor"),t.setAttribute("stroke-width","2"),t.setAttribute("aria-hidden","true");for(const n of e){const e=document.createElementNS(G,"path");e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),e.setAttribute("d",n),t.appendChild(e)}return t}function ee(e,t){for(const[n,r]of Object.entries(t??{}))e.dataset[n]=r}var te=(e,t)=>Q("relative grid place-items-center rounded-full cursor-pointer",t&&(null!=e.stop?"h-7 w-7":"h-6 w-6"));function ne(e,t,n,r){const o=t&&!r&&null==e.stop&&!e.dot;return Q("grid place-items-center rounded-full border-2 font-semibold leading-none shadow-md transition-transform motion-reduce:transition-none",!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-[10px] [&_svg]:h-3.5 [&_svg]:w-3.5",t&&(o?"ring-2 ring-gray-900 ring-offset-1":Z),e.approximate&&"border-dashed opacity-80",e.faded&&!t&&"opacity-40",n&&"scale-125 opacity-100")}var re=e=>Q("grid place-items-center border-2 px-0.5 text-xs font-semibold leading-none shadow-sm",e.stop?"h-7 min-w-7":"h-6 min-w-6",!Y(e.tone??"")&&"border-white",e.tone??"bg-gray-900 text-white");function oe({pins:t,selectedKey:n,focus:s,onSelect:m,ariaLabel:h,className:g="",children:y,routes:b,fitTo:x,attribution:M,marks:N,groupCrowded:C=!1,noun:E,highlightKey:A=null,picking:z=!1,onPick:B,card:T,cardMinMapWidth:R=480,fullScreen:G,initialView:J=D,cooperativeGestures:Y=!1}){const oe=r().map,ie=o(null),se=o(null),ce=o(null),ue=o(null),de=o([]),pe=o(/* @__PURE__ */new Map),me=o(/* @__PURE__ */new Map),he=o(/* @__PURE__ */new Map),ge=o(null),fe=o(/* @__PURE__ */new Map),ye=o(""),[be,xe]=a(!1),[ve,we]=a(!1),ke=c(F,q,()=>!1)?"dark":"light",Me=o({onSelect:m,onPick:B,picking:z,pins:t,selectedKey:n,highlightKey:A,groupCrowded:C,strings:oe,noun:E});l(()=>{Me.current={onSelect:m,onPick:B,picking:z,pins:t,selectedKey:n,highlightKey:A,groupCrowded:C,strings:oe,noun:E}});const Ne=i(()=>{const e=ce.current,{pins:t,selectedKey:n}=Me.current,r=n?t.find(e=>e.key===n):void 0;e&&r&&!e.getBounds().contains([r.lng,r.lat])&&e.easeTo({center:[r.lng,r.lat],duration:U()?0:400})},[]),Ce=o(!1),Le=i((e,t)=>{const n=ce.current,r=ue.current;if(!n||!r)return;const o=n.getZoom();if(o>=17.5){const t=e.indexOf(Me.current.selectedKey??"");return void Me.current.onSelect(e[(t+1)%e.length])}const a=e.map(e=>pe.current.get(e).pin),l=new r.LngLatBounds([a[0].lng,a[0].lat],[a[0].lng,a[0].lat]);for(const e of a)l.extend([e.lng,e.lat]);const i=a.map(e=>n.project([e.lng,e.lat])),s=Math.max(...i.map((e,t)=>W(e,i.filter((e,n)=>n!==t),o))),{clientWidth:c,clientHeight:u}=n.getContainer(),d=n.cameraForBounds(l,{padding:Math.min(64,c/4,u/4)})?.zoom??18,p=document.activeElement===t;Ce.current=!0,n.once("moveend",()=>{if(Ce.current=!1,!p)return;const e=a[0].key,t=pe.current.get(e)?.button,n=t&&"none"!==t.style.display?t:[...me.current.values()].find(t=>t.keys.includes(e))?.button;n?.focus({preventScroll:!0})}),n.easeTo({center:l.getCenter(),zoom:Math.min(18,Math.max(o+1,Math.min(d,s))),duration:U()?0:600})},[]),Se=i(()=>{const e=ce.current,t=ue.current;if(!e||!t||!ie.current||Ce.current&&e.isMoving())return;const{selectedKey:n,highlightKey:r,groupCrowded:o,strings:a,noun:l}=Me.current;for(const[e,t]of pe.current){const a=ne(t.pin,e===n,e===r,o);t.mark.className!==a&&(t.mark.className=a);const l=e===n?"1":"";t.button.style.zIndex!==l&&(t.button.style.zIndex=l)}let i=null;if(o){const r=e.getContainer().getBoundingClientRect(),o=[...ie.current.querySelectorAll("a[href], button, input, select, textarea, summary, [role='button'], [tabindex]:not([tabindex='-1'])")].filter(e=>!e.closest("[data-pin], [data-pin-group], .maplibregl-canvas")).map(e=>{const t=e.getBoundingClientRect(),n=e.closest("[data-map-card]")?.getBoundingClientRect()??t;return{left:Math.max(t.left,n.left)-r.left,top:Math.max(t.top,n.top)-r.top,right:Math.min(t.right,n.right)-r.left,bottom:Math.min(t.bottom,n.bottom)-r.top}}).filter(e=>e.right>e.left&&e.bottom>e.top);i=O([...pe.current.values()].map(({pin:t})=>{const n=e.project([t.lng,t.lat]);return{key:t.key,x:n.x,y:n.y,stop:t.stop??null}}),o);const s=e=>(l??a.places)(e),c=e.getZoom()<17.5?a.spread:a.cycle,u=(e,t)=>{const n=t?"":"none";e.style.display!==n&&(e.style.display=n)},d=/* @__PURE__ */new Map;for(const r of i.groups){const o=r.under>0?a.closeBy(r.under,s(r.under)):null,l=1===r.keys.length?pe.current.get(r.keys[0]):null;if(l){u(l.button,!0),l.button.setAttribute("aria-label",o?`${l.name}; ${o}`:l.name),l.button.title=o?`${l.title}\n${o}`:l.title;continue}for(const e of r.keys)u(pe.current.get(e).button,!1);const i=r.keys.join(" ");let p=me.current.get(i);if(!p){const n=document.createElement("button");n.type="button",n.dataset.pinGroup="",n.className="grid place-items-center rounded-full cursor-pointer",n.append(document.createElement("span"));const o=pe.current.get(r.keys[0]).pin,a={button:n,keys:r.keys,marker:new t.Marker({element:n,anchor:"center"}).setLngLat([o.lng,o.lat]).addTo(e)};n.addEventListener("click",e=>{e.stopPropagation(),Le(a.keys,n)}),p=a}p.keys=r.keys;const m=r.keys.map(e=>pe.current.get(e)),h=r.stops.length>0?j(r.stops):String(m.length),g=r.stops.length>0?a.stops(h):a.group(m.length,s(m.length));p.button.style.width=`${r.width}px`,p.button.style.height=`${r.height}px`,p.button.setAttribute("aria-label",`${g}: ${m.map(e=>e.pin.label).join("; ")}. ${c}${o?`; ${o}`:""}.`),p.button.title=[`${g}:`,...m.map(e=>e.title),...o?[o]:[],c].join("\n");const f=p.button.firstElementChild;f.textContent=h;const y=Q("grid place-items-center rounded-full border-2 border-gray-700 bg-white font-semibold leading-none text-gray-900 shadow-sm",r.stops.length>0?"h-7 w-full px-1 text-xs ring-2 ring-gray-900":m.every(e=>e.pin.dot)?"h-5 w-5 text-[0.6rem]":"h-6 w-6 text-[0.7rem]",null!=n&&r.keys.includes(n)&&Z);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?$:S),height:t.button.offsetHeight||(null!=t.pin.stop?$:S)}:n?{at:n.mark,width:n.element.offsetWidth||$,height:n.element.offsetHeight||$}:null,a=ge.current.getElement();a.style.display=o?"":"none",o&&(ge.current.setLngLat([o.at.lng,o.at.lat]),a.style.width=`${o.width+22}px`,a.style.height=`${o.height+22}px`)}},[Le]);l(()=>{if(Se(),!ie.current)return;const e=new ResizeObserver(()=>Se());e.observe(ie.current);for(const t of ie.current.children)t.contains(se.current)||e.observe(t);return()=>e.disconnect()}),l(()=>{let e=!1,t=null,n=null,r=()=>{};return(async()=>{try{const o=await L();if(e||!se.current)return;ue.current=o,t=new o.Map({container:se.current,style:I[ke],center:J.center,zoom:J.zoom,attributionControl:M?{compact:!0,customAttribution:M}:{compact:!0},dragRotate:!1,pitchWithRotate:!1,touchPitch:!1,maxPitch:0,cooperativeGestures:"coarse"===Y?window.matchMedia("(pointer: coarse)").matches:Y}),t.touchZoomRotate.disableRotation(),t.keyboard.disableRotation(),t.addControl(new o.NavigationControl({showCompass:!1}),"top-right");const a=document.createElement("div");a.dataset.pinRing="",a.setAttribute("aria-hidden","true"),a.className="pointer-events-none rounded-full border-2 border-gray-900 bg-gray-900/15 shadow-[0_0_0_2px_var(--color-white,#fff)]",a.style.display="none",ge.current=new o.Marker({element:a,anchor:"center"}).setLngLat(J.center).addTo(t),t.on("click",e=>{Me.current.picking&&Me.current.onPick?.({lat:e.lngLat.lat,lng:e.lngLat.lng})}),t.on("move",Se),t.on("moveend",Se),t.on("resize",Se),t.on("error",e=>console.warn("[map]",e.error?.message)),r=f(se.current.querySelector(".maplibregl-ctrl-attrib"));const l=t;n=new ResizeObserver(()=>{l.resize(),Ne()}),n.observe(se.current),ce.current=t,xe(!0)}catch(t){console.error("[map] could not start",t),e||we(!0)}})(),()=>{e=!0,n?.disconnect(),r(),de.current.forEach(e=>e.remove()),de.current=[],me.current.forEach(e=>e.marker.remove()),me.current.clear(),ge.current?.remove(),ge.current=null,t?.remove(),ce.current=null}},[]);const $e=o(ke);l(()=>{be&&ce.current&&$e.current!==ke&&($e.current=ke,ce.current.setStyle(I[ke]))},[be,ke]),l(()=>{const e=ce.current,n=ue.current;if(!be||!e||!n)return;de.current.forEach(e=>e.remove()),de.current=[],me.current.forEach(e=>e.marker.remove()),me.current.clear(),pe.current.clear(),he.current.clear();for(const e of fe.current.keys())t.some(t=>t.key===e)||fe.current.delete(e);const r=Me.current.strings;for(const o of t){const t=document.createElement("button");t.type="button",t.dataset.pin=o.key,t.className=te(o,C);const a=o.approximate?r.approximate(o.label):o.label,l=o.title??(o.approximate?r.approximateTitle(o.label):o.label);t.setAttribute("aria-label",a),t.title=l;const i=document.createElement("span");if(ee(i,o.data),o.dot);else if(null!=o.iconNode){const e=fe.current.get(o.key);e&&i.append(e)}else o.icon?.length?i.append(X(o.icon)):i.textContent=null!=o.stop?String(o.stop):o.glyph;if(t.append(i),o.badge){const e=document.createElement("span");e.setAttribute("aria-hidden","true"),e.className=Q("absolute -right-2 -top-2 grid h-4 min-w-4 place-items-center rounded-full px-0.5 text-[9px] font-semibold leading-none shadow",o.badgeTone??"bg-white text-gray-900"),e.textContent=o.badge,t.appendChild(e)}t.addEventListener("click",e=>{e.stopPropagation(),Me.current.onSelect(o.key)}),de.current.push(new n.Marker({element:t,anchor:"center"}).setLngLat([o.lng,o.lat]).addTo(e)),pe.current.set(o.key,{pin:o,button:t,mark:i,name:a,title:l})}for(const t of N??[]){const r=document.createElement("div");r.dataset.mapMark=t.key,ee(r,t.data),r.className=re(t),r.textContent=t.text,r.title=t.title??t.label,r.setAttribute("role","img"),r.setAttribute("aria-label",t.label),de.current.push(new n.Marker({element:r,anchor:"center"}).setLngLat([t.lng,t.lat]).addTo(e)),he.current.set(t.key,{mark:t,element:r})}Se()},[be,t,N,C,Se]),l(()=>{be&&Se()},[be,n,A,Se]),l(()=>{if(!be||!n)return;const e=requestAnimationFrame(Ne);return()=>cancelAnimationFrame(e)},[be,n,Ne]),l(()=>{const e=ce.current,n=ue.current,r=x?[...t,...N??[]].filter(e=>x.includes(e.key)):t;if(!be||!e||!n||0===r.length)return;const o=r.map(e=>`${e.key}@${e.lat},${e.lng}`).sort().join("|");if(ye.current===o)return;const a=""===ye.current;if(ye.current=o,1===r.length)return void e.jumpTo({center:[r[0].lng,r[0].lat],zoom:13});const l=new n.LngLatBounds([r[0].lng,r[0].lat],[r[0].lng,r[0].lat]);for(const e of r)l.extend([e.lng,e.lat]);e.fitBounds(l,{padding:48,maxZoom:14,animate:!a})},[be,t,N,x]),l(()=>{const e=ce.current;if(!be||!e)return;const t=(b??[]).filter(e=>e.coordinates.length>=2),n=[...new Set(t.flatMap(e=>e.attribution?[e.attribution]:[]))].join(" · "),r=()=>{const r=function(){const e=document.createElement("span");e.className="text-blue-600",e.style.display="none",document.body.appendChild(e);const t=getComputedStyle(e).color||"#2563eb";return e.remove(),P(t)}(),o={type:"FeatureCollection",features:t.map(e=>({type:"Feature",properties:{key:e.key,estimate:e.estimate,faded:!!e.faded,color:e.color?H(e.color):r},geometry:{type:"LineString",coordinates:e.coordinates}}))},a=["case",["get","faded"],.25,.85],l=["get","color"],i=e.getSource(K);if(i&&(i.attribution||"")!==n){for(const t of _)e.getLayer(t)&&e.removeLayer(t);e.removeSource(K)}const s=e.getSource(K);s?s.setData(o):e.addSource(K,{type:"geojson",data:o,...n?{attribution:n}:{}}),e.getLayer("routes-road")||e.addLayer({id:"routes-road",type:"line",source:K,filter:["!",["get","estimate"]],layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":l,"line-width":4,"line-opacity":a}}),e.getLayer("routes-estimate")||e.addLayer({id:"routes-estimate",type:"line",source:K,filter:["get","estimate"],layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":l,"line-width":3,"line-dasharray":[1.5,1.5],"line-opacity":a}})},o=()=>{try{r()}catch(e){console.debug("[map] routes wait for the style",e)}};return o(),e.on("style.load",o),e.once("idle",o),()=>{e.off("style.load",o),e.off("idle",o)}},[be,b,ke]),l(()=>{const e=ce.current;if(!be||!e||!s)return;const n=t.find(e=>e.key===s.key);if(!n)return;const r=e.getZoom(),o=C?W(e.project([n.lng,n.lat]),t.filter(e=>e.key!==n.key).map(t=>e.project([t.lng,t.lat])),r):-1/0,a={center:[n.lng,n.lat],zoom:Math.min(18,Math.max(r,13,o))};U()?e.jumpTo(a):e.flyTo({...a,duration:600})},[be,s?.n]);const[Ee,je]=a(!1);l(()=>{const e=ie.current;if(!e)return;const t=()=>je(e.clientWidth<R);t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[R]);const Ae=n?t.find(e=>e.key===n)??null:null,ze=Ae?.key??null,Be=Ae?.lng??0,Te=Ae?.lat??0,Re=be&&!Ee&&null!=T&&!!Ae,[Oe,We]=a(null);l(()=>{const e=ce.current,t=ue.current;if(!(Re&&e&&t&&ze))return;const n=document.createElement("div");n.dataset.mapCard="",n.className="w-[26rem] overflow-y-auto overscroll-contain";const r=new t.Popup({anchor:"bottom",offset:v,className:"rosh-map-card",maxWidth:"none",closeButton:!1,closeOnClick:!1,closeOnMove:!1,focusAfterOpen:!1}).setLngLat([Be,Te]).setDOMContent(n).addTo(e),o=r.getElement(),a=o.querySelector(".maplibregl-popup-content");a&&Object.assign(a.style,{padding:"0",background:"transparent",borderRadius:"0",boxShadow:"none"});const l=o.querySelector(".maplibregl-popup-tip");l&&Object.assign(l.style,{borderTopColor:V,borderBottomColor:V}),We(n);let i=!1,s=!1;const c=(t=!0)=>{if(s)return;if(e.isMoving())return void(i||(i=!0,e.once("moveend",()=>{i=!1,c()})));const{clientWidth:o,clientHeight:a}=e.getContainer(),l=function(e,t){const n=e.getBoundingClientRect().top,r=[...e.querySelectorAll(".maplibregl-ctrl-top-left > *, .maplibregl-ctrl-top-right > *"),...t?.querySelectorAll(":scope > [data-map-control]")??[]];let o=0;for(const e of r){const t=e.getBoundingClientRect();t.height>0&&(o=Math.max(o,t.bottom-n))}return o}(e.getContainer(),ie.current)+8,u=`${w(a,l)}px`;n.style.maxHeight!==u&&(n.style.maxHeight=u);const d=r.getElement(),p=r.getLngLat(),{anchor:m,move:h}=k(e.project(p),{width:d.offsetWidth,height:d.offsetHeight},{width:o,height:a},l);r.options.anchor!==m&&(r.options.anchor=m,r.setLngLat(p)),!t||0===h.x&&0===h.y||e.panBy([-h.x,-h.y],{duration:U()?0:250}),Se()},u=new ResizeObserver(()=>c());u.observe(n);const d=()=>c(),p=()=>{i||c(!1)};e.on("resize",d),e.on("moveend",p);let m=!1;const h=pe.current,g=e=>{m=n.contains(e.target)};return document.addEventListener("focusin",g),()=>{if(s=!0,u.disconnect(),e.off("resize",d),e.off("moveend",p),document.removeEventListener("focusin",g),r.remove(),We(null),m&&(!document.activeElement||document.activeElement===document.body)){const e=h.get(ze)?.button;e&&"none"!==e.style.display&&e.focus({preventScroll:!0})}}},[Re,ze,Be,Te,Se]);const Fe=G?.active??!1,qe=o(G?.onChange);l(()=>{qe.current=G?.onChange}),l(()=>{if(!G)return;const e=document.documentElement;Fe&&!document.fullscreenElement&&e.requestFullscreen&&e.requestFullscreen().catch(()=>{}),!Fe&&document.fullscreenElement&&document.exitFullscreen().catch(()=>{})},[Fe]);const Ke=!!G;return l(()=>{if(!Ke)return;const e=()=>{document.fullscreenElement||qe.current?.(!1)};return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[Ke]),/* @__PURE__ */d("div",{ref:ie,className:Q("relative min-h-72 overflow-hidden rounded-lg border border-gray-200 bg-gray-100",z&&"[&_canvas]:cursor-crosshair",g),children:[
3
+ /* @__PURE__ */p("div",{className:"absolute inset-0",children:/* @__PURE__ */p("div",{ref:se,className:"h-full w-full",role:"region","aria-label":h})}),ve&&/* @__PURE__ */p("p",{className:"absolute inset-0 grid place-items-center p-6 text-center text-sm text-gray-500",children:oe.failed}),G&&/* @__PURE__ */p(e,{"data-map-control":"",variant:"secondary",size:"sm",className:"absolute left-3 top-3 z-10",onClick:()=>G.onChange(!G.active),leftIcon:/* @__PURE__ */p(le,{leave:G.active}),children:G.active?oe.leaveFullScreen:oe.fullScreen}),y,null!=T&&!Re&&/* @__PURE__ */p("div",{"data-map-card":"",className:"absolute bottom-3 left-3 right-3 z-10 max-h-[calc(100%-1.5rem)] max-w-md overflow-y-auto overscroll-contain",children:T}),Re&&Oe?u(T,Oe):null,be&&/* @__PURE__ */p(ae,{pins:t,hosts:fe.current})]})}function ae({pins:e,hosts:t}){/* @__PURE__ */
4
4
  return p(m,{children:e.map(e=>{if(null==e.iconNode||e.dot)return null;let n=t.get(e.key);return n||(n=document.createElement("span"),n.className="contents",t.set(e.key,n)),u(e.iconNode,n,e.key)})})}function le({leave:e}){/* @__PURE__ */
5
5
  return p("svg",{"aria-hidden":"true",className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */p("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e?"M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25":"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"})})}function ie(){const[e,t]=a(null);return{highlightKey:e,pointAt:i(e=>{const n=()=>t(e),r=()=>t(t=>t===e?null:t);return{onMouseEnter:n,onMouseLeave:r,onFocus:n,onBlur:r}},[])}}var se=3e3,ce=e=>!!e?.pending&&3e3,ue=e=>`${e.kind}:${e.id}`,de=e=>("located"===e.placement||"approximate"===e.placement)&&null!=e.lat&&null!=e.lng;function pe(e){switch(e){case"located":return null;case"approximate":return"Approximate: only the suburb or postcode matched";case"pending":return"Locating…";case"not_found":return"Not on the map: address not found";case"failed":return"Not on the map: the map service could not be reached";case"no_address":return"Not on the map: no city or postcode"}}var me={importer:{label:"Importer",tone:"bg-sky-600 text-white"},dealer:{label:"Dealer",tone:"bg-purple-600 text-white"},retail:{label:"Retail",tone:"bg-green-600 text-white"},supplier:{label:"Supplier",tone:"bg-sky-600 text-white"},delivery_location:{label:"Delivery location",tone:"bg-amber-600 text-white"},warehouse:{label:"Warehouse",tone:"bg-amber-600 text-white"}},he=["importer","dealer","retail","supplier","delivery_location","warehouse"];function ge(e){return"supplier"===e.kind?"supplier":"customer"===e.kind?e.category||"importer":e.kind}var fe=(e,t=me)=>t[e]?.tone??"bg-gray-700 text-white",ye=(e,t=me)=>t[e]?.label??e,be=(e,t)=>fe(ge(e),t);function xe(e,t,n=me){return null!=t?String(t):(n[ge(e)]?.label??"").charAt(0).toUpperCase()}var ve=["delivery_location","warehouse"];function we(e,t=ve){const n=/* @__PURE__ */new Map;let r=0;for(const o of e)t.includes(o.kind)&&n.set(ue(o),++r);return n}function ke(e){const t={onMap:0,approximate:0,pending:0,off:0};for(const n of e)de(n)?(t.onMap+=1,"approximate"===n.placement&&(t.approximate+=1)):"pending"===n.placement?t.pending+=1:t.off+=1;return t}function Me(e){const t=[`${e.onMap} on the map`];return e.approximate&&t.push(`${e.approximate} approximate`),e.pending&&t.push(`${e.pending} locating`),e.off&&t.push(`${e.off} not on the map`),t.join(" · ")}function Ne(e){const t=[...new Set(e.filter(de).map(ge))];return[...he.filter(e=>t.includes(e)),...t.filter(e=>!he.includes(e))]}function Ce(e,t){return e.filter(e=>!de(e)&&"pending"!==e.placement).map(e=>{const n=t?.get(ue(e)),r=pe(e.placement)?.replace(/^Not on the map: /,"")??"";return{key:ue(e),text:`${null!=n?`${n}. `:""}${e.label}: ${r}`}})}function Le({categories:e,palette:t=me,floating:n=!0}){return e.length<2?null:/* @__PURE__ */p("div",{className:(n?"absolute left-3 top-3 z-10 ":"")+"flex flex-wrap gap-x-3 gap-y-1 rounded-lg border border-gray-200 bg-white px-2.5 py-1.5 text-xs text-gray-600 shadow-sm",children:e.map(e=>/* @__PURE__ */d("span",{className:"inline-flex items-center gap-1.5",children:[
6
- /* @__PURE__ */p("span",{"aria-hidden":!0,className:`h-2.5 w-2.5 rounded-full ${fe(e,t)}`}),ye(e,t)]},e))})}function $e({point:t,number:n,onOpen:o,onClose:a,palette:l=me}){const i=pe(t.placement),s=ge(t),c=r().map;/* @__PURE__ */
6
+ /* @__PURE__ */p("span",{"aria-hidden":!0,className:`h-2.5 w-2.5 rounded-full ${fe(e,t)}`}),ye(e,t)]},e))})}function Se({point:t,number:n,onOpen:o,onClose:a,palette:l=me}){const i=pe(t.placement),s=ge(t),c=r().map;/* @__PURE__ */
7
7
  return d("section",{"aria-label":c.chosen(t.label),className:"absolute bottom-3 left-3 right-3 z-10 max-w-md space-y-1.5 rounded-lg border border-gray-200 bg-white p-3 shadow-md",children:[
8
8
  /* @__PURE__ */d("div",{className:"flex items-start justify-between gap-2",children:[
9
9
  /* @__PURE__ */d("div",{className:"min-w-0",children:[
10
10
  /* @__PURE__ */d("h3",{className:"text-sm font-semibold text-gray-900 [overflow-wrap:anywhere]",children:[null!=n&&/* @__PURE__ */d("span",{className:"mr-1 text-gray-400",children:[n,"."]}),t.label,t.code&&/* @__PURE__ */p("span",{className:"ml-1.5 text-xs font-normal text-gray-400",children:t.code})]}),
11
11
  /* @__PURE__ */p("p",{className:"text-xs text-gray-500",children:l[s]?ye(s,l):t.category})]}),
12
12
  /* @__PURE__ */p("button",{type:"button",onClick:a,"aria-label":c.closeCard,className:"rounded p-0.5 text-gray-400 hover:text-gray-600",children:/* @__PURE__ */p("svg",{"aria-hidden":!0,className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */p("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),
13
- /* @__PURE__ */p("p",{className:"text-sm text-gray-700 [overflow-wrap:anywhere]",children:t.address||"—"}),i&&/* @__PURE__ */p("p",{className:"text-xs text-gray-500",children:i}),t.matched&&"approximate"===t.placement&&/* @__PURE__ */d("p",{className:"text-xs text-gray-400 [overflow-wrap:anywhere]",children:["Placed at: ",t.matched]}),o&&/* @__PURE__ */p("div",{className:"flex justify-end",children:/* @__PURE__ */p(e,{variant:"secondary",size:"sm",onClick:o,children:c.openRecord})})]})}function Ee(e,t,{staleTime:n}={}){return h({queryKey:e,queryFn:t,staleTime:n,refetchInterval:e=>ce(e.state.data)})}function Se({queryKey:e,queryFn:t,refreshSignal:n,onOpen:r,ariaLabel:i,title:c="Locations",palette:u=me,numbers:m,className:h="",mapClassName:g="min-h-[240px] flex-1"}){const{data:f,isError:y,refetch:b}=Ee(e,t,{staleTime:0}),x=o(!1);l(()=>{x.current?b():x.current=!0},[n]);const[v,w]=a(null),k=s(()=>f?.points??[],[f]),M=s(()=>m??we(k),[m,k]),N=s(()=>k.filter(de).map(e=>({key:ue(e),label:e.label,lat:e.lat,lng:e.lng,glyph:xe(e,M.get(ue(e))??null,u),tone:be(e,u),approximate:"approximate"===e.placement})),[k,M,u]),C=s(()=>Ce(k,M),[k,M]),L=s(()=>Ne(k),[k]),$=f?.pending??0,E=k.find(e=>ue(e)===v)??null,S=E&&r?r(E):null;/* @__PURE__ */
13
+ /* @__PURE__ */p("p",{className:"text-sm text-gray-700 [overflow-wrap:anywhere]",children:t.address||"—"}),i&&/* @__PURE__ */p("p",{className:"text-xs text-gray-500",children:i}),t.matched&&"approximate"===t.placement&&/* @__PURE__ */d("p",{className:"text-xs text-gray-400 [overflow-wrap:anywhere]",children:["Placed at: ",t.matched]}),o&&/* @__PURE__ */p("div",{className:"flex justify-end",children:/* @__PURE__ */p(e,{variant:"secondary",size:"sm",onClick:o,children:c.openRecord})})]})}function $e(e,t,{staleTime:n}={}){return h({queryKey:e,queryFn:t,staleTime:n,refetchInterval:e=>ce(e.state.data)})}function Ee({queryKey:e,queryFn:t,refreshSignal:n,onOpen:r,ariaLabel:i,title:c="Locations",palette:u=me,numbers:m,className:h="",mapClassName:g="min-h-[240px] flex-1"}){const{data:f,isError:y,refetch:b}=$e(e,t,{staleTime:0}),x=o(!1);l(()=>{x.current?b():x.current=!0},[n]);const[v,w]=a(null),k=s(()=>f?.points??[],[f]),M=s(()=>m??we(k),[m,k]),N=s(()=>k.filter(de).map(e=>({key:ue(e),label:e.label,lat:e.lat,lng:e.lng,glyph:xe(e,M.get(ue(e))??null,u),tone:be(e,u),approximate:"approximate"===e.placement})),[k,M,u]),C=s(()=>Ce(k,M),[k,M]),L=s(()=>Ne(k),[k]),S=f?.pending??0,$=k.find(e=>ue(e)===v)??null,E=$&&r?r($):null;/* @__PURE__ */
14
14
  return d("section",{"aria-label":c,className:`flex min-w-0 flex-col ${h}`,children:[
15
15
  /* @__PURE__ */d("div",{className:"flex min-h-[30px] items-center justify-between mb-2",children:[
16
16
  /* @__PURE__ */p("h3",{className:"text-sm font-semibold text-gray-900",children:c}),f&&/* @__PURE__ */p("span",{className:"text-xs text-gray-500",children:Me(ke(k))})]}),
17
17
  /* @__PURE__ */d(oe,{pins:N,selectedKey:v,focus:null,onSelect:w,ariaLabel:i,className:g,children:[
18
18
  /* @__PURE__ */d("div",{className:"absolute left-3 top-3 z-10 flex max-w-[70%] flex-col items-start gap-1.5",children:[
19
19
  /* @__PURE__ */p(Le,{categories:L,palette:u,floating:!1}),y&&/* @__PURE__ */d("div",{className:"flex items-center gap-2 rounded-lg border border-gray-200 bg-white px-2.5 py-1.5 text-xs text-gray-600 shadow-sm",children:["Couldn’t load the locations.",
20
- /* @__PURE__ */p("button",{type:"button",onClick:()=>{b()},className:"font-medium text-blue-600 hover:text-blue-800 hover:underline",children:"Try again"})]}),!y&&($>0||C.length>0)&&/* @__PURE__ */d("div",{className:"max-w-full space-y-0.5 rounded-lg border border-gray-200 bg-white px-2.5 py-1.5 text-xs shadow-sm","aria-live":"polite",children:[$>0&&/* @__PURE__ */d("p",{className:"flex items-center gap-1.5 text-gray-500",children:[
20
+ /* @__PURE__ */p("button",{type:"button",onClick:()=>{b()},className:"font-medium text-blue-600 hover:text-blue-800 hover:underline",children:"Try again"})]}),!y&&(S>0||C.length>0)&&/* @__PURE__ */d("div",{className:"max-w-full space-y-0.5 rounded-lg border border-gray-200 bg-white px-2.5 py-1.5 text-xs shadow-sm","aria-live":"polite",children:[S>0&&/* @__PURE__ */d("p",{className:"flex items-center gap-1.5 text-gray-500",children:[
21
21
  /* @__PURE__ */d("svg",{className:"h-3 w-3 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[
22
22
  /* @__PURE__ */p("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),
23
- /* @__PURE__ */p("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}),"Locating ",$," address",1===$?"":"es","…"]}),C.slice(0,3).map(e=>/* @__PURE__ */p("p",{className:"truncate text-amber-700",title:e.text,children:e.text},e.key)),C.length>3&&/* @__PURE__ */d("p",{className:"text-gray-500",children:["+",C.length-3," more not on the map"]})]})]}),E&&/* @__PURE__ */p($e,{point:E,number:M.get(ue(E))??null,onOpen:S,onClose:()=>w(null),palette:u})]})]})}export{x as CARD_MIN_MAP_WIDTH,g as COMPACT_SHOW,oe as EntityMap,Se as LocationsMap,M as MAPLIBRE_WORKER_FILE,S as MAP_APART_PX,me as MAP_CATEGORIES,E as MAP_STOP_PX,$ as MAP_TARGET_PX,Le as MapLegend,se as PENDING_POLL_MS,ve as SECONDARY_KINDS,$e as SelectedCard,w as cardMaxHeight,ye as categoryLabel,fe as categoryTone,f as foldAttributionOnce,de as isOnMap,O as layoutPins,Ne as legendCategories,L as loadMapLibre,we as locationNumbers,N as mapLibreWorkerUrl,ce as mapPointsRefetchInterval,Ce as offMapNotes,ge as pinCategory,xe as pinGlyph,be as pinTone,k as placeCard,pe as placementNote,ue as pointKey,j as stopsLabel,ke as summarize,Me as summaryText,ie as useMapHighlight,Ee as useMapPoints,W as zoomApart};
23
+ /* @__PURE__ */p("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}),"Locating ",S," address",1===S?"":"es","…"]}),C.slice(0,3).map(e=>/* @__PURE__ */p("p",{className:"truncate text-amber-700",title:e.text,children:e.text},e.key)),C.length>3&&/* @__PURE__ */d("p",{className:"text-gray-500",children:["+",C.length-3," more not on the map"]})]})]}),$&&/* @__PURE__ */p(Se,{point:$,number:M.get(ue($))??null,onOpen:E,onClose:()=>w(null),palette:u})]})]})}export{x as CARD_MIN_MAP_WIDTH,g as COMPACT_SHOW,oe as EntityMap,Ee as LocationsMap,M as MAPLIBRE_WORKER_FILE,E as MAP_APART_PX,me as MAP_CATEGORIES,$ as MAP_STOP_PX,S as MAP_TARGET_PX,Le as MapLegend,se as PENDING_POLL_MS,ve as SECONDARY_KINDS,Se as SelectedCard,w as cardMaxHeight,ye as categoryLabel,fe as categoryTone,f as foldAttributionOnce,de as isOnMap,O as layoutPins,Ne as legendCategories,L as loadMapLibre,we as locationNumbers,N as mapLibreWorkerUrl,ce as mapPointsRefetchInterval,Ce as offMapNotes,ge as pinCategory,xe as pinGlyph,be as pinTone,k as placeCard,pe as placementNote,ue as pointKey,j as stopsLabel,ke as summarize,Me as summaryText,ie as useMapHighlight,$e as useMapPoints,W as zoomApart};
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import{TabStrip as e}from"../chunk-2FZGALCU.js";import"../chunk-6KO2U66R.js";import{confirm as t}from"../chunk-E4JWTNG5.js";import"../chunk-L7ZMDZAB.js";import"../chunk-OSJ3ADF2.js";import"../chunk-MAIHBBWT.js";import{useShellStrings as n}from"../chunk-YJX2IWHB.js";import{useBrowserLayoutEffect as r}from"../chunk-D65T4H6J.js";import*as i from"react";import{createContext as l,memo as c,useRef as a,useEffect as s,useMemo as o,useId as u,useCallback as y,useReducer as d,useState as f,useContext as p}from"react";import{useLocation as k,useNavigate as m}from"react-router-dom";import{jsx as b,Fragment as v,jsxs as h}from"react/jsx-runtime";var g=l(null),K=l(null),F=12;var T=(e,t)=>e.filter(e=>e!==t);function A(e,t){return[...t.map(t=>e.find(e=>e.key===t)).filter(e=>Boolean(e)),...e.filter(e=>!t.includes(e.key))]}function N(e,t,n=12){const r=e.clock+1;let i;i=e.tabs.find(e=>e.key===t.key)?e.tabs.map(e=>e.key===t.key?{...e,path:t.path,title:"page"===e.titleFrom?e.title:t.title||e.title,lastActive:r}:e):[...e.tabs,{key:t.key,path:t.path,title:t.title,titleFrom:"route",pinned:!1,lastActive:r}];let l={...e,tabs:i,activeKey:t.key,mounted:(c=e.mounted,a=t.key,c.includes(a)?c:[...c,a]),clock:r};var c,a;return l.closing&&l.closing!==t.key?l=w(l,l.closing):l.closing===t.key&&(l={...l,closing:null}),function(e,t){let n=e;for(;n.tabs.length>t;){const e=n.tabs.filter(e=>!e.pinned&&e.key!==n.activeKey&&!n.dirty.includes(e.key)&&e.key!==n.closing).sort((e,t)=>e.lastActive-t.lastActive);if(0===e.length)break;n=w(n,e[0].key)}return n}(l,n)}function I(e){let t={...e,activeKey:null};return t.closing&&(t=w(t,t.closing)),t}function w(e,t){return{...e,tabs:e.tabs.filter(e=>e.key!==t),mounted:T(e.mounted,t),dirty:T(e.dirty,t),activeKey:e.activeKey===t?null:e.activeKey,closing:e.closing===t?null:e.closing}}function M(e,t){switch(t.type){case"visit":return N(e,t.entry,t.maxTabs);case"transient":return I(e);case"close":{let n=e;for(const e of t.keys)n=w(n,e);return t.closing?function(e,t){return{...e,closing:t}}(n,t.closing):n}case"title":return function(e,t,n){const r=e.tabs.find(e=>e.key===t);return!r||!n||r.title===n&&"page"===r.titleFrom?e:{...e,tabs:e.tabs.map(e=>e.key===t?{...e,title:n,titleFrom:"page"}:e)}}(e,t.key,t.title);case"dirty":return function(e,t,n){return n===e.dirty.includes(t)?e:{...e,dirty:n?[...e.dirty,t]:T(e.dirty,t)}}(e,t.key,t.dirty)}}var C=e=>`${e.pathname}${e.search}`;function 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 L({children:e,resolve:i,pinned:l=[],storageKey:c,maxTabs:p=12,enabled:v=!0,confirmDiscard:h}){const K=k(),F=m(),T=n().pageTabs,w=u(),L=a(i);L.current=i;const O=y(e=>{const t=L.current(e);return t?{key:t.key??e.pathname,path:C(e),title:t.title}:null},[]),[j,B]=d(M,void 0,()=>{const e=function(e,t){if(!e)return[];let n;try{n=JSON.parse(e)}catch{return[]}const r=n;if(!r||1!==r.v||!Array.isArray(r.tabs))return[];const i=[];for(const e of r.tabs){if(!e||"string"!=typeof e.path||!e.path.startsWith("/")||e.path.startsWith("//"))continue;const n=e.path.indexOf("#"),r=n>=0?e.path.slice(0,n):e.path,l=t(r);if(!l||i.some(e=>e.key===l.key))continue;const c="page"===e.titleFrom&&"string"==typeof e.title&&e.title;i.push({key:l.key,path:r,title:c||l.title,titleFrom:c?"page":"route",pinned:!1,lastActive:0})}return i}(function(e){if(!e)return null;try{return localStorage.getItem(e)}catch{return null}}(c),e=>O(x(e)));let t=function(e,t){const n=t.map(e=>e.key);let r=e.tabs.map(e=>({...e,pinned:n.includes(e.key)}));for(const e of t)r.some(t=>t.key===e.key)||(r=[...r,{key:e.key,path:e.path,title:e.title,titleFrom:"route",pinned:!0,lastActive:0}]);return{...e,tabs:A(r,n)}}({tabs:[],activeKey:null,mounted:[],dirty:[],closing:null,clock:0,tabs:e},l.map(e=>O(x(e))).filter(e=>Boolean(e)));const n=v?O(K):null;return t=n?N(t,n,p):I(t),t}),D=a(j);D.current=j;const S=a(/* @__PURE__ */new Map),$=v?O(K):null,E=$?.key??null;r(()=>{if(!v)return;const e=O(K);e?(S.current.set(e.key,K),B({type:"visit",entry:e,maxTabs:p})):B({type:"transient"})},[K,v,p,O]),s(()=>{const e=new Set(j.tabs.map(e=>e.key));for(const t of S.current.keys())e.has(t)||S.current.delete(t)},[j.tabs]);const J=o(()=>function(e){const t={v:1,tabs:e.tabs.filter(t=>t.key!==e.closing).map(({key:e,path:t,title:n,titleFrom:r})=>({key:e,path:t,title:n,titleFrom:r}))};return JSON.stringify(t)}(j),[j]);s(()=>{if(c)try{localStorage.setItem(c,J)}catch{}},[J,c]);const R=j.dirty.length>0;s(()=>{if(!R)return;const e=e=>{e.preventDefault(),e.returnValue=""};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[R]);const W=a(/* @__PURE__ */new Map),H=y((e,t)=>{let n=W.current.get(e);return void 0===n&&(n=W.current.size,W.current.set(e,n)),`${w}-page-${t}-${n}`},[w]),Z=y(e=>h?h(e):t({title:T.discardTitle,message:1===e.length?T.discardOne:T.discardCount?.(e.length)??`${e.length} ${T.discardMany}`,confirmLabel:T.discardConfirm,cancelLabel:T.keepEditing,variant:"warning"}),[h,T]),G=y(()=>{const e=D.current;return e.tabs.find(e=>e.pinned)?.path??"/"},[]),P=y((e,t,n)=>{const r=D.current,i=r.activeKey;if(!i||!e.includes(i))return void B({type:"close",keys:e,closing:null});let l=t;if(!l){const t={...r,tabs:r.tabs.filter(t=>t.key===i||!e.includes(t.key))},c=n?r.tabs.find(t=>t.key===n&&!e.includes(t.key)):void 0;l=(c??function(e,t){const n=e.tabs.filter(n=>n.key!==e.closing||n.key===t),r=n.findIndex(e=>e.key===t);return r<0?null:n[r+1]??n[r-1]??null}(t,i))?.path??G()}B({type:"close",keys:e.filter(e=>e!==i),closing:i}),F(l)},[F,G]),U=y(async(e,t={})=>{const n=D.current.tabs.find(t=>t.key===e);return!n||n.pinned?(t.to&&F(t.to),!1):!(!t.force&&D.current.dirty.includes(e)&&!await Z([n]))&&(!!D.current.tabs.some(t=>t.key===e)&&(P([e],t.to),!0))},[Z,P,F]),z=y(async(e,t)=>{let n=function(e,t,n){const r=e.tabs.filter(e=>!e.pinned);if("all"===t)return r.map(e=>e.key);if("others"===t)return r.filter(e=>e.key!==n).map(e=>e.key);const i=e.tabs.findIndex(e=>e.key===n);return i<0?[]:e.tabs.slice(i+1).filter(e=>!e.pinned).map(e=>e.key)}(D.current,e,t);const r=D.current.tabs.filter(e=>n.includes(e.key)&&D.current.dirty.includes(e.key));r.length&&!await Z(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&&P(n,void 0,"all"===e?null:t)},[Z,P]),V=y(e=>{const t=D.current.tabs.find(t=>t.key===e);t&&e!==D.current.activeKey&&F(t.path)},[F]),X=y((e,t)=>B({type:"title",key:e,title:t}),[]),Y=y((e,t)=>B({type:"dirty",key:e,dirty:t}),[]),[q,Q]=f({}),_=y((e,t)=>{Q(n=>{if((n[e]??null)===t)return n;const r={...n};return t?r[e]=t:delete r[e],r})},[]),ee=y(e=>O(e)?.key??null,[O]),te=y(e=>S.current.get(e),[]),ne=o(()=>v?j.tabs.filter(e=>e.key!==j.closing):[],[v,j.tabs,j.closing]),re=o(()=>({enabled:v,state:j,currentKey:E,resolve:i,keyFor:ee,locationFor:te,idFor:H,activate:V,close:U,closeMany:z,setTitle:X,setDirty:Y,copies:q,setCopy:_,visibleTabs:ne}),[v,j,E,i,ee,te,H,V,U,z,X,Y,q,_,ne]);/* @__PURE__ */
3
- return b(g.Provider,{value:re,children:e})}var O=i.Activity,j=Boolean(O);function B({active:e,children:t}){return O?/* @__PURE__ */b(O,{mode:e?"visible":"hidden",children:t}):/* @__PURE__ */b(v,{children:t})}var D=c(function({tabKey:e,active:t,location:n,render:i,className:l,panelId:c,tabId:u}){const y=a(null),d=a(t),f=a(/* @__PURE__ */new Map);r(()=>{const e=d.current;if(d.current=t,t&&!e)for(const[e,[t,n]]of f.current)e.isConnected?(e.scrollTop=t,e.scrollLeft=n):f.current.delete(e)},[t]),s(()=>{const e=y.current;if(!e)return;const t=e=>{if(!d.current)return;const t=e.target;t&&"number"==typeof t.scrollTop&&f.current.set(t,[t.scrollTop,t.scrollLeft])};return e.addEventListener("scroll",t,!0),()=>e.removeEventListener("scroll",t,!0)},[]);const p=o(()=>({key:e,activeRef:d}),[e]);/* @__PURE__ */
4
- return b("div",{ref:y,role:c?"tabpanel":void 0,id:c,"aria-labelledby":u,hidden:!t,style:t?void 0:{display:"none"},className:l,"data-page-tab":e,children:/* @__PURE__ */b(K.Provider,{value:p,children:/* @__PURE__ */b(B,{active:t,children:i(n)})})})},(e,t)=>e.active===t.active&&e.location===t.location&&e.className===t.className&&e.panelId===t.panelId&&e.tabId===t.tabId&&(!t.active||e.render===t.render)),S="\0transient";function $({children:e,frameClassName:t}){const n=p(g),r=k();if(!n||!n.enabled)/* @__PURE__ */
5
- return b("div",{className:t,children:e(r)},S);const{state:i,currentKey:l,locationFor:c,idFor:a}=n,s=i.tabs.filter(e=>i.mounted.includes(e.key)).map(e=>e.key);return l&&!s.includes(l)&&s.push(l),/* @__PURE__ */h(v,{children:[s.map(n=>{const i=n===l,s=i?r:c(n);return s?/* @__PURE__ */b(D,{tabKey:n,active:i,location:s,render:e,className:t,panelId:a(n,"panel"),tabId:a(n,"tab")},n):null}),!l&&/* @__PURE__ */b(D,{tabKey:S,active:!0,location:r,render:e,className:t},S)]})}function E({className:t,activeClassName:r,end:i}){const l=p(g),c=n().pageTabs;if(!l||!l.enabled)return null;const{visibleTabs:a,state:s,idFor:o,activate:u,close:y,closeMany:d,resolve:f}=l;/* @__PURE__ */
6
- return b(e,{tabs:a.map(e=>({key:e.key,title:e.title,pinned:e.pinned,dirty:s.dirty.includes(e.key),copy:l.copies[e.key],icon:f(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:r,end:i})}var J={enabled:!1,tabs:[],activeKey:null,activate:()=>{},close:async()=>!1,closeOthers:async()=>{},closeRight:async()=>{},closeAll:async()=>{}};function R(){const e=p(g);return e&&e.enabled?{enabled:!0,tabs:e.visibleTabs,activeKey:e.currentKey,activate:e.activate,close:e.close,closeOthers:t=>e.closeMany("others",t),closeRight:t=>e.closeMany("right",t),closeAll:()=>e.closeMany("all",null)}:J}function W(){const e=p(g),t=p(K),n=m();return{key:e?.enabled&&t?t.key:null,close:y(async(r={})=>e?.enabled&&t&&e.state.tabs.some(e=>e.key===t.key)?e.close(t.key,r):(r.to&&n(r.to),!1),[e,t,n])}}function H(e){const t=p(g),n=p(K),r=t?.enabled?t.setTitle:void 0,i=n?.key;s(()=>{r&&i&&e&&r(i,e)},[r,i,e])}function Z(e){const t=p(g),n=p(K),r=t?.enabled?t.setCopy:void 0,i=n?.key;s(()=>{if(r&&i)return r(i,e||null),()=>r(i,null)},[r,i,e])}function G(e){const t=p(g),n=p(K),r=t?.enabled?t.setDirty:void 0;s(()=>{if(r&&n)return r(n.key,e),()=>{n.activeRef.current&&r(n.key,!1)}},[r,n,e])}export{F as DEFAULT_MAX_TABS,j as PAGE_TABS_PAUSE_HIDDEN,E as PageTabBar,$ as PageTabsOutlet,L as PageTabsProvider,x as parseTabPath,W as usePageTab,Z as usePageTabCopy,G as usePageTabDirty,H as usePageTabTitle,R as usePageTabs};
2
+ import{TabStrip as e}from"../chunk-DGWWPVEQ.js";import"../chunk-6KO2U66R.js";import{confirm as t}from"../chunk-NNUE7M5G.js";import"../chunk-HQREOTKI.js";import"../chunk-ELSUXC3N.js";import"../chunk-MAIHBBWT.js";import{useShellStrings as n}from"../chunk-YS57MJFM.js";import{useBrowserLayoutEffect as r}from"../chunk-D65T4H6J.js";import*as i from"react";import{createContext as l,memo as c,useRef as a,useEffect as s,useMemo as o,useId as u,useCallback as y,useReducer as d,useState as f,useContext as p}from"react";import{useLocation as k,useNavigate as m}from"react-router-dom";import{jsx as b,Fragment as v,jsxs as h}from"react/jsx-runtime";var g=l(null),K=l(null),F=12;var 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 M(e,t,n=12){const r=e.clock+1;let i;i=e.tabs.find(e=>e.key===t.key)?e.tabs.map(e=>e.key===t.key?{...e,path:t.path,title:"page"===e.titleFrom?e.title:t.title||e.title,lastActive:r}:e):[...e.tabs,{key:t.key,path:t.path,title:t.title,titleFrom:"route",pinned:!1,lastActive:r}];let l={...e,tabs:i,activeKey:t.key,mounted:(c=e.mounted,a=t.key,c.includes(a)?c:[...c,a]),clock:r};var c,a;return l.closing&&l.closing!==t.key?l=w(l,l.closing):l.closing===t.key&&(l={...l,closing:null}),function(e,t){let n=e;for(;n.tabs.length>t;){const e=n.tabs.filter(e=>!e.pinned&&e.key!==n.activeKey&&!n.dirty.includes(e.key)&&e.key!==n.closing).sort((e,t)=>e.lastActive-t.lastActive);if(0===e.length)break;n=w(n,e[0].key)}return n}(l,n)}function I(e){let t={...e,activeKey:null};return t.closing&&(t=w(t,t.closing)),t}function w(e,t){return{...e,tabs:e.tabs.filter(e=>e.key!==t),mounted:N(e.mounted,t),dirty:N(e.dirty,t),activeKey:e.activeKey===t?null:e.activeKey,closing:e.closing===t?null:e.closing}}function A(e,t){switch(t.type){case"visit":return M(e,t.entry,t.maxTabs);case"transient":return I(e);case"close":{let n=e;for(const e of t.keys)n=w(n,e);return t.closing?function(e,t){return{...e,closing:t}}(n,t.closing):n}case"title":return function(e,t,n){const r=e.tabs.find(e=>e.key===t);return!r||!n||r.title===n&&"page"===r.titleFrom?e:{...e,tabs:e.tabs.map(e=>e.key===t?{...e,title:n,titleFrom:"page"}:e)}}(e,t.key,t.title);case"dirty":return function(e,t,n){return n===e.dirty.includes(t)?e:{...e,dirty:n?[...e.dirty,t]:N(e.dirty,t)}}(e,t.key,t.dirty)}}var C=e=>`${e.pathname}${e.search}`;function x(e){const t=e.indexOf("#"),n=t>=0?e.slice(t):"",r=t>=0?e.slice(0,t):e,i=r.indexOf("?");return{pathname:i>=0?r.slice(0,i):r,search:i>=0?r.slice(i):"",hash:n}}function O({children:e,resolve:i,pinned:l=[],storageKey:c,maxTabs:p=12,enabled:v=!0,confirmDiscard:h}){const K=k(),F=m(),N=n().pageTabs,w=u(),O=a(i);O.current=i;const j=y(e=>{const t=O.current(e);return t?{key:t.key??e.pathname,path:C(e),title:t.title}:null},[]),[E,L]=d(A,void 0,()=>{const e=function(e,t){if(!e)return[];let n;try{n=JSON.parse(e)}catch{return[]}const r=n;if(!r||1!==r.v||!Array.isArray(r.tabs))return[];const i=[];for(const e of r.tabs){if(!e||"string"!=typeof e.path||!e.path.startsWith("/")||e.path.startsWith("//"))continue;const n=e.path.indexOf("#"),r=n>=0?e.path.slice(0,n):e.path,l=t(r);if(!l||i.some(e=>e.key===l.key))continue;const c="page"===e.titleFrom&&"string"==typeof e.title&&e.title;i.push({key:l.key,path:r,title:c||l.title,titleFrom:c?"page":"route",pinned:!1,lastActive:0})}return i}(function(e){if(!e)return null;try{return localStorage.getItem(e)}catch{return null}}(c),e=>j(x(e)));let t=function(e,t){const n=t.map(e=>e.key);let r=e.tabs.map(e=>({...e,pinned:n.includes(e.key)}));for(const e of t)r.some(t=>t.key===e.key)||(r=[...r,{key:e.key,path:e.path,title:e.title,titleFrom:"route",pinned:!0,lastActive:0}]);return{...e,tabs:T(r,n)}}({tabs:[],activeKey:null,mounted:[],dirty:[],closing:null,clock:0,tabs:e},l.map(e=>j(x(e))).filter(e=>Boolean(e)));const n=v?j(K):null;return t=n?M(t,n,p):I(t),t}),S=a(E);S.current=E;const $=a(/* @__PURE__ */new Map),D=v?j(K):null,R=D?.key??null;r(()=>{if(!v)return;const e=j(K);e?($.current.set(e.key,K),L({type:"visit",entry:e,maxTabs:p})):L({type:"transient"})},[K,v,p,j]),s(()=>{const e=new Set(E.tabs.map(e=>e.key));for(const t of $.current.keys())e.has(t)||$.current.delete(t)},[E.tabs]);const B=o(()=>function(e){const t={v:1,tabs:e.tabs.filter(t=>t.key!==e.closing).map(({key:e,path:t,title:n,titleFrom:r})=>({key:e,path:t,title:n,titleFrom:r}))};return JSON.stringify(t)}(E),[E]);s(()=>{if(c)try{localStorage.setItem(c,B)}catch{}},[B,c]);const W=E.dirty.length>0;s(()=>{if(!W)return;const e=e=>{e.preventDefault(),e.returnValue=""};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[W]);const J=a(/* @__PURE__ */new Map),H=y((e,t)=>{let n=J.current.get(e);return void 0===n&&(n=J.current.size,J.current.set(e,n)),`${w}-page-${t}-${n}`},[w]),P=y(e=>h?h(e):t({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"}),[h,N]),U=y(()=>{const e=S.current;return e.tabs.find(e=>e.pinned)?.path??"/"},[]),G=y((e,t,n)=>{const r=S.current,i=r.activeKey;if(!i||!e.includes(i))return void L({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()}L({type:"close",keys:e.filter(e=>e!==i),closing:i}),F(l)},[F,U]),Q=y(async(e,t={})=>{const n=S.current.tabs.find(t=>t.key===e);return!n||n.pinned?(t.to&&F(t.to),!1):!(!t.force&&S.current.dirty.includes(e)&&!await P([n]))&&(!!S.current.tabs.some(t=>t.key===e)&&(G([e],t.to),!0))},[P,G,F]),V=y(async(e,t)=>{let n=function(e,t,n){const r=e.tabs.filter(e=>!e.pinned);if("all"===t)return r.map(e=>e.key);if("others"===t)return r.filter(e=>e.key!==n).map(e=>e.key);const i=e.tabs.findIndex(e=>e.key===n);return i<0?[]:e.tabs.slice(i+1).filter(e=>!e.pinned).map(e=>e.key)}(S.current,e,t);const r=S.current.tabs.filter(e=>n.includes(e.key)&&S.current.dirty.includes(e.key));r.length&&!await P(r)&&(n=n.filter(e=>!r.some(t=>t.key===e)));const i=new Set(S.current.tabs.map(e=>e.key));n=n.filter(e=>i.has(e)),n.length&&G(n,void 0,"all"===e?null:t)},[P,G]),z=y(e=>{const t=S.current.tabs.find(t=>t.key===e);t&&e!==S.current.activeKey&&F(t.path)},[F]),X=y((e,t)=>L({type:"title",key:e,title:t}),[]),Y=y((e,t)=>L({type:"dirty",key:e,dirty:t}),[]),[q,Z]=f({}),_=y((e,t)=>{Z(n=>{if((n[e]??null)===t)return n;const r={...n};return t?r[e]=t:delete r[e],r})},[]),ee=y(e=>j(e)?.key??null,[j]),te=y(e=>$.current.get(e),[]),ne=o(()=>v?E.tabs.filter(e=>e.key!==E.closing):[],[v,E.tabs,E.closing]),re=o(()=>({enabled:v,state:E,currentKey:R,resolve:i,keyFor:ee,locationFor:te,idFor:H,activate:z,close:Q,closeMany:V,setTitle:X,setDirty:Y,copies:q,setCopy:_,visibleTabs:ne}),[v,E,R,i,ee,te,H,z,Q,V,X,Y,q,_,ne]);/* @__PURE__ */
3
+ return b(g.Provider,{value:re,children:e})}var j=i.Activity,E=Boolean(j);function L({active:e,children:t}){return j?/* @__PURE__ */b(j,{mode:e?"visible":"hidden",children:t}):/* @__PURE__ */b(v,{children:t})}var S=c(function({tabKey:e,active:t,location:n,render:i,className:l,panelId:c,tabId:u}){const y=a(null),d=a(t),f=a(/* @__PURE__ */new Map);r(()=>{const e=d.current;if(d.current=t,t&&!e)for(const[e,[t,n]]of f.current)e.isConnected?(e.scrollTop=t,e.scrollLeft=n):f.current.delete(e)},[t]),s(()=>{const e=y.current;if(!e)return;const t=e=>{if(!d.current)return;const t=e.target;t&&"number"==typeof t.scrollTop&&f.current.set(t,[t.scrollTop,t.scrollLeft])};return e.addEventListener("scroll",t,!0),()=>e.removeEventListener("scroll",t,!0)},[]);const p=o(()=>({key:e,activeRef:d}),[e]);/* @__PURE__ */
4
+ return b("div",{ref:y,role:c?"tabpanel":void 0,id:c,"aria-labelledby":u,hidden:!t,style:t?void 0:{display:"none"},className:l,"data-page-tab":e,children:/* @__PURE__ */b(K.Provider,{value:p,children:/* @__PURE__ */b(L,{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)),$="\0transient";function D({children:e,frameClassName:t}){const n=p(g),r=k();if(!n||!n.enabled)/* @__PURE__ */
5
+ return b("div",{className:t,children:e(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__ */h(v,{children:[s.map(n=>{const i=n===l,s=i?r:c(n);return s?/* @__PURE__ */b(S,{tabKey:n,active:i,location:s,render:e,className:t,panelId:a(n,"panel"),tabId:a(n,"tab")},n):null}),!l&&/* @__PURE__ */b(S,{tabKey:$,active:!0,location:r,render:e,className:t},$)]})}function R({className:t,activeClassName:r,end:i}){const l=p(g),c=n().pageTabs;if(!l||!l.enabled)return null;const{visibleTabs:a,state:s,idFor:o,activate:u,close:y,closeMany:d,resolve:f}=l;/* @__PURE__ */
6
+ return b(e,{tabs:a.map(e=>({key:e.key,title:e.title,pinned:e.pinned,dirty:s.dirty.includes(e.key),copy:l.copies[e.key],icon:f(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:r,end:i})}var B={enabled:!1,tabs:[],activeKey:null,activate:()=>{},close:async()=>!1,closeOthers:async()=>{},closeRight:async()=>{},closeAll:async()=>{}};function W(){const e=p(g);return e&&e.enabled?{enabled:!0,tabs:e.visibleTabs,activeKey:e.currentKey,activate:e.activate,close:e.close,closeOthers:t=>e.closeMany("others",t),closeRight:t=>e.closeMany("right",t),closeAll:()=>e.closeMany("all",null)}:B}function J(){const e=p(g),t=p(K),n=m();return{key:e?.enabled&&t?t.key:null,close:y(async(r={})=>e?.enabled&&t&&e.state.tabs.some(e=>e.key===t.key)?e.close(t.key,r):(r.to&&n(r.to),!1),[e,t,n])}}function H(e){const t=p(g),n=p(K),r=t?.enabled?t.setTitle:void 0,i=n?.key;s(()=>{r&&i&&e&&r(i,e)},[r,i,e])}function P(e){const t=p(g),n=p(K),r=t?.enabled?t.setCopy:void 0,i=n?.key;s(()=>{if(r&&i)return r(i,e||null),()=>r(i,null)},[r,i,e])}function U(e){const t=p(g),n=p(K),r=t?.enabled?t.setDirty:void 0;s(()=>{if(r&&n)return r(n.key,e),()=>{n.activeRef.current&&r(n.key,!1)}},[r,n,e])}export{F as DEFAULT_MAX_TABS,E as PAGE_TABS_PAUSE_HIDDEN,R as PageTabBar,D as PageTabsOutlet,O as PageTabsProvider,x as parseTabPath,J as usePageTab,P as usePageTabCopy,U as usePageTabDirty,H as usePageTabTitle,W 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-5VBKCPCM.js"));export{e as PdfViewer};
2
+ import{lazy as r}from"react";var e=r(()=>import("../PdfViewer-3NWOBXPP.js"));export{e as PdfViewer};
@@ -1,4 +1,4 @@
1
- export { A as ALT, b as ALT_SHIFT_D, c as ALT_SHIFT_E, d as ALT_SHIFT_N, e as APP_UPDATE_POLL_MS, f as Accordion, g as AccordionItem, h as AccordionProps, i as Align, j as AngleScale, k as AppUpdateBanner, l as AppUpdateBannerProps, m as AttachButton, n as AttachButtonProps, o as AttachmentDropZone, p as AttachmentDropZoneProps, q as AttachmentList, r as AttachmentListProps, s as AuthScreen, t as AuthScreenProps, u as Avatar, v as AvatarGroup, w as AvatarGroupProps, x as AvatarProps, y as AvatarSize, z as AvatarStatus, B as BackgroundVariant, D as BandScale, E as Banner, F as BannerEmphasis, G as BannerProps, H as BannerTone, I as BarChart, J as BarChartProps, K as BoxPlotBox, L as BoxPlotChart, M as BoxPlotChartProps, N as BrandAssetEditor, O as BrandAssetEditorProps, Q as BrandAssetPreview, R as BrandMark, T as BrandMarkProps, U as BrandMarkSlot, V as BrandMarkSurface, W as BrandMarkTreatment, X as BreadcrumbItem, Y as Breadcrumbs, Z as BreadcrumbsProps, _ as BudgetBar, $ as BudgetBarProps, a0 as BudgetState, a1 as Button, a2 as ButtonClassesOptions, a3 as ButtonProps, a4 as ButtonSize, a5 as ButtonVariant, a6 as CHART_INK, a7 as CMD_A, a8 as CMD_DOT, a9 as CMD_ENTER, aa as CMD_K, ab as CMD_S, ac as Calendar, ad as CalendarMode, ae as CalendarProps, af as Candle, ag as CandlestickChart, ah as CandlestickChartProps, ai as Card, aj as CardPadding, ak as CardProps, al as CartesianPlot, am as CartesianPlotProps, an as CellStyle, ao as ChartBackgroundVariant, ap as ChartBrush, aq as ChartBrushProps, ar as ChartCurve, as as ChartDefs, at as ChartDefsProps, au as ChartDot, av as ChartDotProps, aw as ChartDotVariant, ax as ChartFillVariant, ay as ChartFrame, az as ChartFrameProps, aA as ChartHighlightProvider, aB as ChartLegendEntry, aC as ChartLegendSwatch, aD as ChartRange, aE as ChartReferenceLine, aF as ChartRevealDirection, aG as ChartSkeleton, aH as ChartSkeletonProps, aI as ChartStatusTone, aJ as ChartStrokeVariant, aK as ChartTooltip, aL as ChartTooltipProps, aM as ChartTooltipRow, aN as ChatTemplate, aO as Checkbox, aP as CheckboxProps, aQ as CheckoutTemplate, aR as ChordChart, aS as ChordChartProps, aT as ColorPicker, aU as ColorPickerPanel, aV as ColorPickerPanelProps, aW as ColorPickerProps, aX as ColorPreset, aY as ColorSwatch, aZ as ColorSwatchProps, a_ as ColorSwatchSize, a$ as ColoredBadge, b0 as ColoredBadgeProps, b1 as ColumnChart, b2 as ColumnChartProps, C as ColumnDef, b3 as ColumnSeries, b4 as ComposerAttachments, b5 as ComposerAttachmentsProps, b6 as ConfirmProvider, b7 as ContainerFillChart, b8 as ContainerFillChartProps, b9 as ContainerFillItem, ba as ContextMenu, bb as ContextMenuPoint, bc as ContextMenuProps, bd as ContextMenuState, be as CountBadge, bf as CountBadgeProps, bg as CountBadgeTone, bh as Curve, bi as DAY_MS, bj as DEFAULT_SHELL_STRINGS, bk as DashboardTemplate, bl as DataTable, bm as DataTableColumn, bn as DataTableColumnGroup, bo as DataTableHeader, bp as DataTablePage, bq as DataTableProps, br as DataTableRowLink, bs as DataTableRowProps, bt as DatePicker, bu as DatePickerProps, bv as DateRangePicker, bw as DateRangePickerProps, bx as DateTimePicker, by as DateTimePickerProps, bz as DescriptionColumns, bA as DescriptionItem, bB as DescriptionList, bC as DescriptionListProps, bD as Dialog, bE as DialogProps, bF as DialogSize, bG as Divider, bH as DividerProps, bI as DividerSpacing, bJ as DonutChart, bK as DonutChartProps, bL as DonutSegment, bM as Drawer, bN as DrawerProps, bO as DrawerSide, bP as DrawerSize, bQ as DropdownMenu, bR as DropdownMenuAlign, bS as DropdownMenuCheckboxItem, bT as DropdownMenuDividerItem, bU as DropdownMenuEntry, bV as DropdownMenuItem, bW as DropdownMenuLabelItem, bX as DropdownMenuLinkItem, bY as DropdownMenuProps, bZ as DropdownMenuRadioItem, b_ as DropdownMenuSide, b$ as DropdownPositionOptions, c0 as ENTER, c1 as EditableGrid, c2 as EditableGridProps, c3 as EmailTemplate, c4 as EmptyState, c5 as EmptyStateProps, c6 as EmptyValue, c7 as EmptyValueProps, c8 as ErrorBoundary, c9 as ErrorBoundaryProps, ca as ErrorPage, cb as ErrorPageProps, cc as FileIntake, cd as FilePicker, ce as FilePickerProps, cf as FillVariant, cg as FormError, ch as FormErrorSummary, ci as FormErrorSummaryProps, cj as FormField, ck as FormFieldProps, cl as FormLayoutPage, cm as FunnelChart, cn as FunnelChartProps, co as FunnelStage, cp as GLASS_DIVIDER, cr as GROUP_COLORS, cs as GROUP_COLORS_SOLID, ct as GalleryTemplate, cu as Gap, cv as GlassOptions, cw as GlobalSearch, cx as GlobalSearchProps, cy as Grid, cz as GridCols, cA as GridColumn, cB as GridProps, cC as HeatmapChart, cD as HeatmapChartProps, cE as HelpCenter, cF as HelpCenterDoc, cG as HelpCenterProps, cH as HexInput, cI as HistogramBin, cJ as HistogramChart, cK as HistogramChartProps, cL as Hsv, cM as INPUT_BASE, cN as INPUT_SIZES, cO as IconButton, cP as IconButtonClassesOptions, cQ as IconButtonProps, cR as IconRail, cS as IconRailButton, cT as IconRailButtonProps, cU as IconRailOrientation, cV as IconRailProps, cW as Inline, cX as InlineProps, cY as Input, cZ as InputNumber, c_ as InputNumberProps, c$ as InputProps, d0 as InputSize, d1 as Justify, d2 as Kanban, d3 as KanbanColumn, d4 as KanbanProps, d5 as Kbd, d6 as KbdProps, d7 as KbdSize, d8 as Label, d9 as LabelClassesOptions, da as LabelProps, db as LadderScale, dc as LineChart, dd as LineChartProps, de as LineChartSeries, df as LinearScale, dg as ListFooter, dh as ListLoadError, di as ListLoadErrorProps, dj as LoadingSpinner, dk as LoadingSpinnerProps, dl as MAX_FRACTION_DIGITS, dm as MENU_MAX_HEIGHT, dn as MOD, dp as MOTION, dq as Markdown, dq as MarkdownLite, dr as MarkdownLiteProps, dr as MarkdownProps, ds as MediaUploadField, dt as MediaUploadFieldProps, du as MediaUploadGrid, dv as MediaUploadGridItem, dw as MediaUploadGridProps, dx as MenuPos, dy as Meter, dz as MeterProps, dA as MetricBar, dB as MetricBarProps, dC as Milestone, dD as MilestoneKind, dE as MilestoneTimeline, dF as MilestoneTimelineProps, dH as NEXT_CHUNK_PATH_PREFIX, dI as NativeSelect, dJ as NumericKeypad, dK as NumericKeypadProps, dL as OVERLAY_OPEN_EVENT, dM as POPUP_MAX_WIDTH, dN as POST_PRODUCTION_STATUSES, dO as PageHeader, dP as PageHeaderProps, P as PaginatedResponse, dQ as Pagination, dR as PaginationProps, dS as PaperclipGlyph, dT as Paragraph, dU as ParagraphProps, dV as PieChart, dW as PieChartProps, dX as PieSegment, dY as PlotGeometry, dZ as Point, d_ as Popover, d$ as PopoverAlign, e0 as PopoverProps, e1 as PopoverRenderProps, e2 as PopoverSide, e3 as PopupMenu, e4 as PopupMenuDivider, e5 as PopupMenuItem, e6 as PopupMenuItemProps, e7 as PopupMenuLabel, e8 as PopupMenuProps, e9 as PopupSubmenu, ea as PopupSubmenuProps, eb as PortalBrandingContextValue, ec as PortalBrandingProvider, ed as PortalBrandingProviderProps, ee as ProductionTimeline, ef as ProductionTimelineProps, eg as ProductionTimelineSnapshot, eh as ProgressItem, ei as PublicPortal, ej as PublicPortalBranding, ek as RADAR_SERIES_CAP, el as RadarAxis, em as RadarChart, en as RadarChartProps, eo as RadarSeries, ep as RadialBarChart, eq as RadialBarChartProps, er as RadialBarRow, es as Radio, et as RadioGroup, eu as RadioGroupOption, ev as RadioGroupOrientation, ew as RadioGroupProps, ex as RadioProps, ey as Range, ez as RangeChart, eA as RangeChartProps, eB as RangeRow, eC as RankedBars, eD as RankedBarsProps, eE as RankedBarsRow, eF as ResizeHandle, eG as ResizeHandleProps, eH as ResizeHandleSide, eI as ResolvedPortalBrandAsset, eJ as Result, eK as ResultProps, eL as ResultStatus, eM as RevealDirection, eN as SCATTER_SERIES_CAP, eO as SERIES_SLOT_COUNT, eP as SERIES_VARS, eQ as SHIFT, eR as STAGES, eS as STALE_CHUNK_RELOAD_COOLDOWN_MS, eT as STALE_CHUNK_RELOAD_KEY, eU as STATUS_VARS, eV as SankeyChart, eW as SankeyChartProps, eX as SankeyLink, eY as SankeyNode, eZ as ScatterChart, e_ as ScatterChartProps, e$ as ScatterPoint, f0 as ScatterSeries, S as SearchConfig, f1 as SearchListRoute, f2 as SearchProvider, f3 as SearchQuickAction, f4 as SearchResponse, f5 as SearchResult, f6 as SearchableOption, f7 as SearchableSelect, f8 as SearchableSelectProps, f9 as Segmented, fa as SegmentedOption, fb as SegmentedProps, fc as SegmentedSize, fd as Select, fe as SelectOption, ff as SelectProps, fg as SemanticGroup, fh as SettingRow, fi as SettingRowProps, fj as SeverityTone, fm as ShellPrefsAdapter, fn as ShellPrefsProvider, fo as ShellStrings, fp as ShellStringsOverride, fq as ShellStringsProvider, fr as SidebarActionButton, fs as SidebarActionButtonProps, ft as SidebarGroupLabel, fu as SidebarGroupLabelProps, fv as SidebarLayout, fw as SidebarLayoutProps, fx as SidebarNavGroup, fy as SidebarNavGroupProps, fz as SidebarNavItem, fA as SidebarNavItemProps, fB as Skeleton, fC as SkeletonProps, fD as SkeletonVariant, fE as Slider, fF as SliderProps, fG as SliderSize, fH as Snippet, fI as SnippetProps, fJ as SnippetSize, fK as SnippetVariant, a as SortState, fL as Sparkline, fM as SparklineProps, fN as Stack, fO as StackProps, fP as StaleChunkReloadOptions, fQ as StatCard, fR as StatCardProps, fS as StatTile, fT as StatTileProps, fU as Statistic, fV as StatisticProps, fW as StatisticSize, fX as StatisticTone, fY as StatusBadge, fZ as StatusBadgeProvider, f_ as StatusEmphasis, f$ as StepItem, g0 as Stepper, g1 as StepperProps, g2 as StrokeVariant, g3 as SunburstChart, g4 as SunburstChartProps, g5 as SunburstNode, g6 as Switch, g7 as SwitchProps, g8 as SwitchSize, g9 as TabItem, ga as Tabs, gb as TabsProps, gc as TagInput, gd as TagInputOption, ge as TagInputProps, gf as Text, gg as TextProps, gh as TextSize, gi as TextTone, gj as TextWeight, gk as Textarea, gl as TextareaProps, gm as Theme, gn as TileButton, go as TileButtonProps, gp as TileSize, gq as TimeAgo, gr as TimeAgoProps, gs as TimePicker, gt as TimePickerProps, gu as TimeSeriesChart, gv as TimeSeriesChartProps, gw as TimeSeriesSeries, gx as TimelineMarker, gy as TimelineMarkerKind, gz as TimelineReport, gA as TimelineScrubProgress, gB as TimelineTrack, gC as TimelineTrackItem, gD as TimelineTrackKind, gE as TimelineTrackPending, gF as TimelineTrackPhase, gG as TimelineTrackPlayback, gH as TimelineTrackProps, gI as TimelineTrackThumb, gJ as Title, gK as TitleLevel, gL as TitleProps, gM as ToastOptions, gN as ToastPlacement, gO as Tooltip, gP as TooltipProps, gQ as TopNav, gR as TopNavItem, gS as TopNavProps, gT as Tree, gU as TreeDrop, gV as TreeEmptySlot, gW as TreeEmptySlotProps, gX as TreeGroup, gY as TreeGroupLabel, gZ as TreeGroupProps, g_ as TreeProps, g$ as TreeRow, h0 as TreeRowProps, h1 as TreemapChart, h2 as TreemapChartProps, h3 as TreemapItem, h4 as TreemapTile, h5 as UseAppUpdateOptions, h6 as UseContextMenu, h7 as UseProductionTimelineOpts, h8 as VERSION, h9 as VITE_PRELOAD_ERROR_EVENT, ha as WaterfallChart, hb as WaterfallChartProps, hc as WaterfallStep, hd as ZLayer, he as Z_LAYERS, hf as angleScale, hg as appendKey, hh as applyThemePrefs, hi as arcPath, hj as areaBetween, hk as areaFrom, hl as autoHighlightIndex, hm as backspace, hn as bandScale, ho as binValues, hp as budgetState, hq as bumpPath, hr as buttonClasses, hs as calcOverall, ht as calcReportOverall, hu as colorFill, hv as colorSwatchClasses, hw as confirm, hx as confirmDestructive, hy as curvePath, hz as dashFor, hB as dismissPopups, hC as fillFor, hD as fillId, hE as fmtSliderDate, hF as fromDateKey, hG as glassStyle, hH as glowId, hI as groundId, hJ as groupColors, hK as hexToHsv, hL as highlightOpacity, hM as hsvToHex, hN as iconButtonClasses, hO as inputClasses, hP as installStaleChunkReload, hQ as isMac, hR as isSeverityTone, hS as isStaleChunkError, hU as labelClasses, hV as ladderScale, hW as leavesContextMenuAlone, hX as linearPath, hY as linearScale, hZ as logScale, h_ as maskId, h$ as mediaFileName, i0 as monotonePath, i1 as niceMax, i2 as openGlobalSearch, i3 as parseHexColor, i4 as polygonPoints, i5 as popupBounds, i6 as prompt, i7 as pushRecentSearch, i8 as radiusScale, i9 as resolveBrandMarkTreatment, ia as resolvePortalBrandAsset, ib as resolveSeriesColor, ic as resolveTheme, id as sanitizeRecentSearches, ie as seriesColor, ig as severityOf, ih as splinePath, ii as squarify, ij as stagger, ik as stepPath, il as tabButtonId, im as tabPanelId, io as toDateKey, ip as toDayMs, iq as toISODate, ir as toast, is as useAppUpdate, it as useClickOutside, iu as useConfirm, iv as useContextMenu, iw as useDebouncedValue, ix as useDropdownPosition, iy as useFocusTrap, iz as useHighlight, iA as useIsMobile, iB as useLocalStoragePrefs, iC as usePlotWidth, iD as usePortalBranding, iE as useProductionTimeline, iF as useScrollLock, iG as useShellLocale, iH as useShellPrefs, iI as useShellStrings, iJ as useTheme } from '../index-JQXMH_km.js';
1
+ export { A as ALT, b as ALT_SHIFT_D, c as ALT_SHIFT_E, d as ALT_SHIFT_N, e as APP_UPDATE_POLL_MS, f as Accordion, g as AccordionItem, h as AccordionProps, i as Align, j as AngleScale, k as AppUpdateBanner, l as AppUpdateBannerProps, m as AttachButton, n as AttachButtonProps, o as AttachmentDropZone, p as AttachmentDropZoneProps, q as AttachmentList, r as AttachmentListProps, s as AuthScreen, t as AuthScreenProps, u as Avatar, v as AvatarGroup, w as AvatarGroupProps, x as AvatarProps, y as AvatarSize, z as AvatarStatus, B as BackgroundVariant, D as BandScale, E as Banner, F as BannerEmphasis, G as BannerProps, H as BannerTone, I as BarChart, J as BarChartProps, K as BoxPlotBox, L as BoxPlotChart, M as BoxPlotChartProps, N as BrandAssetEditor, O as BrandAssetEditorProps, Q as BrandAssetPreview, R as BrandMark, T as BrandMarkProps, U as BrandMarkSlot, V as BrandMarkSurface, W as BrandMarkTreatment, X as BreadcrumbItem, Y as Breadcrumbs, Z as BreadcrumbsProps, _ as BudgetBar, $ as BudgetBarProps, a0 as BudgetState, a1 as Button, a2 as ButtonClassesOptions, a3 as ButtonProps, a4 as ButtonSize, a5 as ButtonVariant, a6 as CHART_INK, a7 as CMD_A, a8 as CMD_DOT, a9 as CMD_ENTER, aa as CMD_K, ab as CMD_S, ac as Calendar, ad as CalendarMode, ae as CalendarProps, af as Candle, ag as CandlestickChart, ah as CandlestickChartProps, ai as Card, aj as CardPadding, ak as CardProps, al as CartesianPlot, am as CartesianPlotProps, an as CellStyle, ao as ChartBackgroundVariant, ap as ChartBrush, aq as ChartBrushProps, ar as ChartCurve, as as ChartDefs, at as ChartDefsProps, au as ChartDot, av as ChartDotProps, aw as ChartDotVariant, ax as ChartFillVariant, ay as ChartFrame, az as ChartFrameProps, aA as ChartHighlightProvider, aB as ChartLegendEntry, aC as ChartLegendSwatch, aD as ChartRange, aE as ChartReferenceLine, aF as ChartRevealDirection, aG as ChartSkeleton, aH as ChartSkeletonProps, aI as ChartStatusTone, aJ as ChartStrokeVariant, aK as ChartTooltip, aL as ChartTooltipProps, aM as ChartTooltipRow, aN as ChatTemplate, aO as Checkbox, aP as CheckboxProps, aQ as CheckoutTemplate, aR as ChordChart, aS as ChordChartProps, aT as ColorPicker, aU as ColorPickerPanel, aV as ColorPickerPanelProps, aW as ColorPickerProps, aX as ColorPreset, aY as ColorSwatch, aZ as ColorSwatchProps, a_ as ColorSwatchSize, a$ as ColoredBadge, b0 as ColoredBadgeProps, b1 as ColumnChart, b2 as ColumnChartProps, C as ColumnDef, b3 as ColumnSeries, b4 as ComposerAttachments, b5 as ComposerAttachmentsProps, b6 as ConfirmProvider, b7 as ContainerFillChart, b8 as ContainerFillChartProps, b9 as ContainerFillItem, ba as ContextMenu, bb as ContextMenuPoint, bc as ContextMenuProps, bd as ContextMenuState, be as CountBadge, bf as CountBadgeProps, bg as CountBadgeTone, bh as Curve, bi as DAY_MS, bj as DEFAULT_SHELL_STRINGS, bk as DashboardTemplate, bl as DataTable, bm as DataTableColumn, bn as DataTableColumnGroup, bo as DataTableHeader, bp as DataTablePage, bq as DataTableProps, br as DataTableRowLink, bs as DataTableRowProps, bt as DatePicker, bu as DatePickerProps, bv as DateRangePicker, bw as DateRangePickerProps, bx as DateTimePicker, by as DateTimePickerProps, bz as DescriptionColumns, bA as DescriptionItem, bB as DescriptionList, bC as DescriptionListProps, bD as Dialog, bE as DialogProps, bF as DialogSize, bG as Divider, bH as DividerProps, bI as DividerSpacing, bJ as DonutChart, bK as DonutChartProps, bL as DonutSegment, bM as Drawer, bN as DrawerProps, bO as DrawerSide, bP as DrawerSize, bQ as DropdownMenu, bR as DropdownMenuAlign, bS as DropdownMenuCheckboxItem, bT as DropdownMenuDividerItem, bU as DropdownMenuEntry, bV as DropdownMenuItem, bW as DropdownMenuLabelItem, bX as DropdownMenuLinkItem, bY as DropdownMenuProps, bZ as DropdownMenuRadioItem, b_ as DropdownMenuSide, b$ as DropdownPositionOptions, c0 as ENTER, c1 as EditableGrid, c2 as EditableGridProps, c3 as EmailTemplate, c4 as EmptyState, c5 as EmptyStateProps, c6 as EmptyValue, c7 as EmptyValueProps, c8 as ErrorBoundary, c9 as ErrorBoundaryProps, ca as ErrorPage, cb as ErrorPageProps, cc as FileIntake, cd as FilePicker, ce as FilePickerProps, cf as FillVariant, cg as FormError, ch as FormErrorSummary, ci as FormErrorSummaryProps, cj as FormField, ck as FormFieldProps, cl as FormLayoutPage, cm as FunnelChart, cn as FunnelChartProps, co as FunnelStage, cp as GLASS_DIVIDER, cr as GROUP_COLORS, cs as GROUP_COLORS_SOLID, ct as GalleryTemplate, cu as Gap, cv as GlassOptions, cw as GlobalSearch, cx as GlobalSearchProps, cy as Grid, cz as GridCols, cA as GridColumn, cB as GridProps, cC as HeatmapChart, cD as HeatmapChartProps, cE as HelpCenter, cF as HelpCenterDoc, cG as HelpCenterProps, cH as HexInput, cI as HistogramBin, cJ as HistogramChart, cK as HistogramChartProps, cL as Hsv, cM as INPUT_BASE, cN as INPUT_SIZES, cO as IconButton, cP as IconButtonClassesOptions, cQ as IconButtonProps, cR as IconRail, cS as IconRailButton, cT as IconRailButtonProps, cU as IconRailOrientation, cV as IconRailProps, cW as Inline, cX as InlineProps, cY as Input, cZ as InputNumber, c_ as InputNumberProps, c$ as InputProps, d0 as InputSize, d1 as Justify, d2 as Kanban, d3 as KanbanColumn, d4 as KanbanProps, d5 as Kbd, d6 as KbdProps, d7 as KbdSize, d8 as Label, d9 as LabelClassesOptions, da as LabelProps, db as LadderScale, dc as LineChart, dd as LineChartProps, de as LineChartSeries, df as LinearScale, dg as ListFooter, dh as ListLoadError, di as ListLoadErrorProps, dj as LoadingSpinner, dk as LoadingSpinnerProps, dl as MAX_FRACTION_DIGITS, dm as MENU_MAX_HEIGHT, dn as MOD, dp as MOTION, dq as Markdown, dq as MarkdownLite, dr as MarkdownLiteProps, dr as MarkdownProps, ds as MediaUploadField, dt as MediaUploadFieldProps, du as MediaUploadGrid, dv as MediaUploadGridItem, dw as MediaUploadGridProps, dx as MenuPos, dy as Meter, dz as MeterProps, dA as MetricBar, dB as MetricBarProps, dC as Milestone, dD as MilestoneKind, dE as MilestoneTimeline, dF as MilestoneTimelineProps, dH as NEXT_CHUNK_PATH_PREFIX, dI as NativeSelect, dJ as NumericKeypad, dK as NumericKeypadProps, dL as OVERLAY_OPEN_EVENT, dM as POPUP_MAX_WIDTH, dN as POST_PRODUCTION_STATUSES, dO as PageHeader, dP as PageHeaderProps, P as PaginatedResponse, dQ as Pagination, dR as PaginationProps, dS as PaperclipGlyph, dT as Paragraph, dU as ParagraphProps, dV as PieChart, dW as PieChartProps, dX as PieSegment, dY as PlotGeometry, dZ as Point, d_ as Popover, d$ as PopoverAlign, e0 as PopoverProps, e1 as PopoverRenderProps, e2 as PopoverSide, e3 as PopupMenu, e4 as PopupMenuDivider, e5 as PopupMenuItem, e6 as PopupMenuItemProps, e7 as PopupMenuLabel, e8 as PopupMenuProps, e9 as PopupSubmenu, ea as PopupSubmenuProps, eb as PortalBrandingContextValue, ec as PortalBrandingProvider, ed as PortalBrandingProviderProps, ee as ProductionTimeline, ef as ProductionTimelineProps, eg as ProductionTimelineSnapshot, eh as ProgressItem, ei as PublicPortal, ej as PublicPortalBranding, ek as RADAR_SERIES_CAP, el as RadarAxis, em as RadarChart, en as RadarChartProps, eo as RadarSeries, ep as RadialBarChart, eq as RadialBarChartProps, er as RadialBarRow, es as Radio, et as RadioGroup, eu as RadioGroupOption, ev as RadioGroupOrientation, ew as RadioGroupProps, ex as RadioProps, ey as Range, ez as RangeChart, eA as RangeChartProps, eB as RangeRow, eC as RankedBars, eD as RankedBarsProps, eE as RankedBarsRow, eF as ResizeHandle, eG as ResizeHandleProps, eH as ResizeHandleSide, eI as ResolvedPortalBrandAsset, eJ as Result, eK as ResultProps, eL as ResultStatus, eM as RevealDirection, eN as SCATTER_SERIES_CAP, eO as SERIES_SLOT_COUNT, eP as SERIES_VARS, eQ as SHIFT, eR as STAGES, eS as STALE_CHUNK_RELOAD_COOLDOWN_MS, eT as STALE_CHUNK_RELOAD_KEY, eU as STATUS_VARS, eV as SankeyChart, eW as SankeyChartProps, eX as SankeyLink, eY as SankeyNode, eZ as ScatterChart, e_ as ScatterChartProps, e$ as ScatterPoint, f0 as ScatterSeries, S as SearchConfig, f1 as SearchListRoute, f2 as SearchProvider, f3 as SearchQuickAction, f4 as SearchResponse, f5 as SearchResult, f6 as SearchableOption, f7 as SearchableSelect, f8 as SearchableSelectProps, f9 as Segmented, fa as SegmentedOption, fb as SegmentedProps, fc as SegmentedSize, fd as Select, fe as SelectBaseProps, ff as SelectItem, fg as SelectMultipleProps, fh as SelectOption, fi as SelectOptionGroup, fj as SelectProps, fk as SemanticGroup, fl as SettingRow, fm as SettingRowProps, fn as SeverityTone, fq as ShellPrefsAdapter, fr as ShellPrefsProvider, fs as ShellStrings, ft as ShellStringsOverride, fu as ShellStringsProvider, fv as SidebarActionButton, fw as SidebarActionButtonProps, fx as SidebarGroupLabel, fy as SidebarGroupLabelProps, fz as SidebarLayout, fA as SidebarLayoutProps, fB as SidebarNavGroup, fC as SidebarNavGroupProps, fD as SidebarNavItem, fE as SidebarNavItemProps, fF as Skeleton, fG as SkeletonProps, fH as SkeletonVariant, fI as Slider, fJ as SliderProps, fK as SliderSize, fL as Snippet, fM as SnippetProps, fN as SnippetSize, fO as SnippetVariant, a as SortState, fP as Sparkline, fQ as SparklineProps, fR as Stack, fS as StackProps, fT as StaleChunkReloadOptions, fU as StatCard, fV as StatCardProps, fW as StatTile, fX as StatTileProps, fY as Statistic, fZ as StatisticProps, f_ as StatisticSize, f$ as StatisticTone, g0 as StatusBadge, g1 as StatusBadgeProvider, g2 as StatusEmphasis, g3 as StepItem, g4 as Stepper, g5 as StepperProps, g6 as StrokeVariant, g7 as SunburstChart, g8 as SunburstChartProps, g9 as SunburstNode, ga as Switch, gb as SwitchProps, gc as SwitchSize, gd as TabItem, ge as Tabs, gf as TabsProps, gg as TagInput, gh as TagInputOption, gi as TagInputProps, gj as Text, gk as TextProps, gl as TextSize, gm as TextTone, gn as TextWeight, go as Textarea, gp as TextareaProps, gq as Theme, gr as TileButton, gs as TileButtonProps, gt as TileSize, gu as TimeAgo, gv as TimeAgoProps, gw as TimePicker, gx as TimePickerProps, gy as TimeSeriesChart, gz as TimeSeriesChartProps, gA as TimeSeriesSeries, gB as TimelineMarker, gC as TimelineMarkerKind, gD as TimelineReport, gE as TimelineScrubProgress, gF as TimelineTrack, gG as TimelineTrackItem, gH as TimelineTrackKind, gI as TimelineTrackPending, gJ as TimelineTrackPhase, gK as TimelineTrackPlayback, gL as TimelineTrackProps, gM as TimelineTrackThumb, gN as Title, gO as TitleLevel, gP as TitleProps, gQ as ToastOptions, gR as ToastPlacement, gS as Tooltip, gT as TooltipProps, gU as TopNav, gV as TopNavItem, gW as TopNavProps, gX as Tree, gY as TreeDrop, gZ as TreeEmptySlot, g_ as TreeEmptySlotProps, g$ as TreeGroup, h0 as TreeGroupLabel, h1 as TreeGroupProps, h2 as TreeProps, h3 as TreeRow, h4 as TreeRowProps, h5 as TreemapChart, h6 as TreemapChartProps, h7 as TreemapItem, h8 as TreemapTile, h9 as UseAppUpdateOptions, ha as UseContextMenu, hb as UseProductionTimelineOpts, hc as VERSION, hd as VITE_PRELOAD_ERROR_EVENT, he as WaterfallChart, hf as WaterfallChartProps, hg as WaterfallStep, hh as ZLayer, hi as Z_LAYERS, hj as angleScale, hk as appendKey, hl as applyThemePrefs, hm as arcPath, hn as areaBetween, ho as areaFrom, hp as autoHighlightIndex, hq as backspace, hr as bandScale, hs as binValues, ht as budgetState, hu as bumpPath, hv as buttonClasses, hw as calcOverall, hx as calcReportOverall, hy as colorFill, hz as colorSwatchClasses, hA as confirm, hB as confirmDestructive, hC as curvePath, hD as dashFor, hF as dismissPopups, hG as fillFor, hH as fillId, hI as fmtSliderDate, hJ as fromDateKey, hK as glassStyle, hL as glowId, hM as groundId, hN as groupColors, hO as hexToHsv, hP as highlightOpacity, hQ as hsvToHex, hR as iconButtonClasses, hS as inputClasses, hT as installStaleChunkReload, hU as isMac, hV as isSeverityTone, hW as isStaleChunkError, hY as labelClasses, hZ as ladderScale, h_ as leavesContextMenuAlone, h$ as linearPath, i0 as linearScale, i1 as logScale, i2 as maskId, i3 as mediaFileName, i4 as monotonePath, i5 as niceMax, i6 as openGlobalSearch, i7 as parseHexColor, i8 as polygonPoints, i9 as popupBounds, ia as prompt, ib as pushRecentSearch, ic as radiusScale, id as resolveBrandMarkTreatment, ie as resolvePortalBrandAsset, ig as resolveSeriesColor, ih as resolveTheme, ii as sanitizeRecentSearches, ij as seriesColor, ik as severityOf, il as splinePath, im as squarify, io as stagger, ip as stepPath, iq as tabButtonId, ir as tabPanelId, is as toDateKey, it as toDayMs, iu as toISODate, iv as toast, iw as useAppUpdate, ix as useClickOutside, iy as useConfirm, iz as useContextMenu, iA as useDebouncedValue, iB as useDropdownPosition, iC as useFocusTrap, iD as useHighlight, iE as useIsMobile, iF as useLocalStoragePrefs, iG as usePlotWidth, iH as usePortalBranding, iI as useProductionTimeline, iJ as useScrollLock, iK as useShellLocale, iL as useShellPrefs, iM as useShellStrings, iN as useTheme } from '../index-CFLEu3eh.js';
2
2
  export { FileIntakeAlert, FileIntakeLimits, FileIntakeOptions, FileRejection, FileRejectionReason, acceptsFile, useFileIntake } from '../file-intake/index.js';
3
3
  export { C as CurrencyFormat, D as DATE_FORMAT_OPTIONS, a as DateFormatKey, E as EMPTY_VALUE, F as FormatDateOptions, b as FormatMoneyOptions, T as TZ_AUTO, c as TimeAgoOptions, d as currencyDecimals, e as currencySymbol, f as firstDayOfWeek, g as formatBytes, h as formatDate, i as formatDateTime, j as formatMoney, k as formatTime, l as getUserDateFormat, m as getUserTimezone, s as setCurrencyFormats, n as setUserDateFormat, o as setUserTimezone, p as syncTimezoneFromProfile, t as timeAgo } from '../index-DCUzlKPZ.js';
4
4
  import 'react';
package/dist/ui/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{APP_UPDATE_POLL_MS,Accordion,AppUpdateBanner,AttachButton,AttachmentDropZone,AttachmentList,AuthScreen,Avatar,AvatarGroup,Banner,BarChart,BoxPlotChart,BrandAssetEditor,BudgetBar,CHART_INK,Calendar,CandlestickChart,Card,CartesianPlot,ChartBrush,ChartDefs,ChartDot,ChartFrame,ChartHighlightProvider,ChartSkeleton,ChartTooltip,ChatTemplate,Checkbox_default as Checkbox,CheckoutTemplate,ChordChart,ColorPicker,ColorPickerPanel,ColorSwatch,ColoredBadge,ColumnChart,ComposerAttachments,ContainerFillChart,ContextMenu,CountBadge,DAY_MS,DashboardTemplate,DataTable,DataTablePage,DatePicker_default as DatePicker,DateRangePicker,DateTimePicker_default as DateTimePicker,DescriptionList,Divider,DonutChart,Drawer,DropdownMenu,EmailTemplate,EmptyState,EmptyValue,ErrorBoundary,ErrorPage,FilePicker_default as FilePicker,FormErrorSummary,FormField,FormLayoutPage,FunnelChart,GROUP_COLORS,GROUP_COLORS_SOLID,GalleryTemplate,Grid,HeatmapChart,HelpCenter,HexInput,HistogramChart,INPUT_BASE,INPUT_SIZES,IconButton_default as IconButton,IconRail,IconRailButton,Inline,Input_default as Input,InputNumber_default as InputNumber,Kanban,Label,LineChart,ListFooter,ListLoadError,MAX_FRACTION_DIGITS,MOTION,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,RadarChart,RadialBarChart,Radio_default as Radio,RadioGroup,RangeChart,RankedBars,SCATTER_SERIES_CAP,SERIES_SLOT_COUNT,SERIES_VARS,STAGES,STATUS_VARS,SankeyChart,ScatterChart,SearchableSelect,Segmented,Select_default as Select,SettingRow,SidebarActionButton,SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,Skeleton,Slider,Snippet,Sparkline,Stack,StatCard,StatTile,Statistic,StatusBadge,StatusBadgeProvider,Stepper,SunburstChart,Switch_default as Switch,Tabs,TagInput,Text,Textarea_default as Textarea,TileButton_default as TileButton,TimeAgo,TimePicker_default as TimePicker,TimeSeriesChart,TimelineTrack,Title,TopNav,Tree,TreeEmptySlot,TreeGroup,TreeGroupLabel,TreeRow,TreemapChart,WaterfallChart,angleScale,appendKey,applyThemePrefs,arcPath,areaBetween,areaFrom,autoHighlightIndex,backspace,bandScale,binValues,budgetState,bumpPath,calcOverall,calcReportOverall,colorFill,colorSwatchClasses,curvePath,dashFor,fillFor,fillId,fmtSliderDate,fromKey as fromDateKey,glowId,groundId,groupColors,hexToHsv,highlightOpacity,hsvToHex,inputClasses,isSeverityTone,labelClasses,ladderScale,linearPath,linearScale,logScale,maskId,mediaFileName,monotonePath,niceMax,parseHexColor,polygonPoints,radiusScale,resolvePortalBrandAsset,resolveSeriesColor,resolveTheme,seriesColor,severityOf,splinePath,squarify,stagger,stepPath,tabButtonId,tabPanelId,toKey as toDateKey,toDayMs,toISODate,useAppUpdate,useClickOutside,useContextMenu,useDebouncedValue,useHighlight,usePlotWidth,usePortalBranding,useProductionTimeline,useTheme}from"../chunk-VWTYRICQ.js";export{Breadcrumbs}from"../chunk-UMOVLVTC.js";export{MENU_MAX_HEIGHT,POPUP_MAX_WIDTH,ResizeHandle,SidebarLayout,Tooltip,popupBounds,useDropdownPosition}from"../chunk-QRJ2ERKR.js";export{BrandMark,GlobalSearch,openGlobalSearch,pushRecent as pushRecentSearch,resolveBrandMarkTreatment,sanitizeRecent as sanitizeRecentSearches}from"../chunk-TZ2EFTST.js";export{EditableGrid}from"../chunk-IJ3V2YOS.js";import"../chunk-BR22X7E5.js";export{toast_default as toast}from"../chunk-NLASNJNY.js";export{VERSION}from"../chunk-A6O4Y63A.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,LoadingSpinner,MOD,NEXT_CHUNK_PATH_PREFIX,Result,SHIFT,STALE_CHUNK_RELOAD_COOLDOWN_MS,STALE_CHUNK_RELOAD_KEY,ShellPrefsProvider,VITE_PRELOAD_ERROR_EVENT,installStaleChunkReload,isMac,isStaleChunkError,useIsMobile,useLocalStoragePrefs,useShellPrefs}from"../chunk-6A7BN7EN.js";import"../chunk-5A7MWTXX.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-WURTAA2S.js";export{DATE_FORMAT_OPTIONS,EMPTY_VALUE,TZ_AUTO,currencyDecimals,currencySymbol,firstDayOfWeek,formatBytes,formatDate,formatDateTime,formatMoney,formatTime,getUserDateFormat,getUserTimezone,setCurrencyFormats,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile,timeAgo}from"../chunk-S2AZZGFF.js";export{Button_default as Button,buttonClasses,iconButtonClasses}from"../chunk-PH3PRIFP.js";export{ConfirmProvider,Dialog,confirm,confirmDestructive,prompt,useConfirm,useFocusTrap,useScrollLock}from"../chunk-E4JWTNG5.js";export{GLASS_DIVIDER,PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu,glassStyle,leavesContextMenuAlone}from"../chunk-L7ZMDZAB.js";export{OVERLAY_OPEN_EVENT,Z_LAYERS,dismissPopups}from"../chunk-OSJ3ADF2.js";import"../chunk-MAIHBBWT.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-YJX2IWHB.js";import"../chunk-D65T4H6J.js";
2
+ export{APP_UPDATE_POLL_MS,Accordion,AppUpdateBanner,AttachButton,AttachmentDropZone,AttachmentList,AuthScreen,Avatar,AvatarGroup,Banner,BarChart,BoxPlotChart,BrandAssetEditor,BudgetBar,CHART_INK,Calendar,CandlestickChart,Card,CartesianPlot,ChartBrush,ChartDefs,ChartDot,ChartFrame,ChartHighlightProvider,ChartSkeleton,ChartTooltip,ChatTemplate,Checkbox_default as Checkbox,CheckoutTemplate,ChordChart,ColorPicker,ColorPickerPanel,ColorSwatch,ColoredBadge,ColumnChart,ComposerAttachments,ContainerFillChart,ContextMenu,CountBadge,DAY_MS,DashboardTemplate,DataTable,DataTablePage,DatePicker_default as DatePicker,DateRangePicker,DateTimePicker_default as DateTimePicker,DescriptionList,Divider,DonutChart,Drawer,DropdownMenu,EmailTemplate,EmptyState,EmptyValue,ErrorBoundary,ErrorPage,FilePicker_default as FilePicker,FormErrorSummary,FormField,FormLayoutPage,FunnelChart,GROUP_COLORS,GROUP_COLORS_SOLID,GalleryTemplate,Grid,HeatmapChart,HelpCenter,HexInput,HistogramChart,INPUT_BASE,INPUT_SIZES,IconButton_default as IconButton,IconRail,IconRailButton,Inline,Input_default as Input,InputNumber_default as InputNumber,Kanban,Label,LineChart,ListFooter,ListLoadError,MAX_FRACTION_DIGITS,MOTION,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,RadarChart,RadialBarChart,Radio_default as Radio,RadioGroup,RangeChart,RankedBars,SCATTER_SERIES_CAP,SERIES_SLOT_COUNT,SERIES_VARS,STAGES,STATUS_VARS,SankeyChart,ScatterChart,SearchableSelect,Segmented,Select_default as Select,SettingRow,SidebarActionButton,SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,Skeleton,Slider,Snippet,Sparkline,Stack,StatCard,StatTile,Statistic,StatusBadge,StatusBadgeProvider,Stepper,SunburstChart,Switch_default as Switch,Tabs,TagInput,Text,Textarea_default as Textarea,TileButton_default as TileButton,TimeAgo,TimePicker_default as TimePicker,TimeSeriesChart,TimelineTrack,Title,TopNav,Tree,TreeEmptySlot,TreeGroup,TreeGroupLabel,TreeRow,TreemapChart,WaterfallChart,angleScale,appendKey,applyThemePrefs,arcPath,areaBetween,areaFrom,autoHighlightIndex,backspace,bandScale,binValues,budgetState,bumpPath,calcOverall,calcReportOverall,colorFill,colorSwatchClasses,curvePath,dashFor,fillFor,fillId,fmtSliderDate,fromKey as fromDateKey,glowId,groundId,groupColors,hexToHsv,highlightOpacity,hsvToHex,inputClasses,isSeverityTone,labelClasses,ladderScale,linearPath,linearScale,logScale,maskId,mediaFileName,monotonePath,niceMax,parseHexColor,polygonPoints,radiusScale,resolvePortalBrandAsset,resolveSeriesColor,resolveTheme,seriesColor,severityOf,splinePath,squarify,stagger,stepPath,tabButtonId,tabPanelId,toKey as toDateKey,toDayMs,toISODate,useAppUpdate,useClickOutside,useContextMenu,useDebouncedValue,useHighlight,usePlotWidth,usePortalBranding,useProductionTimeline,useTheme}from"../chunk-MHGFTCEA.js";export{Breadcrumbs}from"../chunk-J5E4VMLJ.js";export{MENU_MAX_HEIGHT,POPUP_MAX_WIDTH,ResizeHandle,SidebarLayout,Tooltip,popupBounds,useDropdownPosition}from"../chunk-LZIS72CF.js";export{BrandMark,GlobalSearch,openGlobalSearch,pushRecent as pushRecentSearch,resolveBrandMarkTreatment,sanitizeRecent as sanitizeRecentSearches}from"../chunk-SVJN7WWF.js";export{EditableGrid}from"../chunk-YLJ7AZON.js";import"../chunk-BR22X7E5.js";export{toast_default as toast}from"../chunk-IY4CP2HO.js";export{VERSION}from"../chunk-L2W5XPZ3.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,LoadingSpinner,MOD,NEXT_CHUNK_PATH_PREFIX,Result,SHIFT,STALE_CHUNK_RELOAD_COOLDOWN_MS,STALE_CHUNK_RELOAD_KEY,ShellPrefsProvider,VITE_PRELOAD_ERROR_EVENT,installStaleChunkReload,isMac,isStaleChunkError,useIsMobile,useLocalStoragePrefs,useShellPrefs}from"../chunk-T7DDT2Z6.js";import"../chunk-5A7MWTXX.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-Z43BI2JI.js";export{DATE_FORMAT_OPTIONS,EMPTY_VALUE,TZ_AUTO,currencyDecimals,currencySymbol,firstDayOfWeek,formatBytes,formatDate,formatDateTime,formatMoney,formatTime,getUserDateFormat,getUserTimezone,setCurrencyFormats,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile,timeAgo}from"../chunk-S2AZZGFF.js";export{Button_default as Button,buttonClasses,iconButtonClasses}from"../chunk-4UCRT4ST.js";export{ConfirmProvider,Dialog,confirm,confirmDestructive,prompt,useConfirm,useFocusTrap,useScrollLock}from"../chunk-NNUE7M5G.js";export{GLASS_DIVIDER,PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu,glassStyle,leavesContextMenuAlone}from"../chunk-HQREOTKI.js";export{OVERLAY_OPEN_EVENT,Z_LAYERS,dismissPopups}from"../chunk-ELSUXC3N.js";import"../chunk-MAIHBBWT.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-YS57MJFM.js";import"../chunk-D65T4H6J.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-shell",
3
- "version": "4.163.0",
3
+ "version": "4.164.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-PX435JG4.js";import{useWidgetSettings as n}from"./chunk-TBM3ZIAN.js";import"./chunk-6A7BN7EN.js";import"./chunk-DSSLOQDW.js";import"./chunk-5A7MWTXX.js";import"./chunk-PH3PRIFP.js";import"./chunk-6KO2U66R.js";import"./chunk-E4JWTNG5.js";import"./chunk-L7ZMDZAB.js";import"./chunk-OSJ3ADF2.js";import"./chunk-MAIHBBWT.js";import"./chunk-YJX2IWHB.js";import"./chunk-D65T4H6J.js";import{useState as r,useRef as l,useCallback as o,useEffect as i}from"react";import{jsxs as a,Fragment as c,jsx as s}from"react/jsx-runtime";var u="calc_appearance";function d(){const[d,h]=r("0"),[m,b]=r(null),[k,g]=r(null),[p,N]=r(!1),[v,x]=r(""),[y,f]=r([]),[C,$]=r(!1),[j,w]=r(()=>e(u)),[E,B]=r(!1),[S,T]=r(j),A=l(null);n(o(()=>{T({...j}),B(!0)},[j]));const L=o(e=>{x(""),h(t=>p||"0"===t?(N(!1),"."===e?"0.":e):"."===e&&t.includes(".")?t:t+e)},[p]),W=o(()=>{h("0"),b(null),g(null),N(!1)},[]),D=o((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}},[]),F=o(e=>{const t=parseFloat(d);if(null!==m&&k&&!p){const e=D(m,t,k);h(String(e)),b(e),f(n=>[`${m} ${k} ${t} = ${e}`,...n].slice(0,20))}else b(t);g(e),N(!0)},[d,m,k,p,D]),M=o(()=>{if(null===m||!k)return;const e=parseFloat(d),t=D(m,e,k),n=`${m} ${k} ${e} =`;f(e=>[`${n} ${t}`,...e].slice(0,20)),x(n),h(String(t)),b(null),g(null),N(!0)},[d,m,k,D]),I=o(()=>{h(e=>String(parseFloat(e)/100))},[]),J=o(()=>{h(e=>e.startsWith("-")?e.slice(1):"0"===e?e:"-"+e)},[]);i(()=>{const e=e=>{const t=e.target.tagName;"INPUT"!==t&&"TEXTAREA"!==t&&"SELECT"!==t&&(e.key>="0"&&e.key<="9"?L(e.key):"."===e.key?L("."):"+"===e.key?F("+"):"-"===e.key?F("-"):"*"===e.key?F("×"):"/"===e.key?(e.preventDefault(),F("÷")):"Enter"===e.key||"="===e.key?("Enter"===e.key&&e.target instanceof Node&&A.current?.contains(e.target)&&e.preventDefault(),M()):"Escape"===e.key?W():"Backspace"===e.key?h(e=>e.length>1?e.slice(0,-1):"0"):"%"===e.key&&I())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[L,F,M,W,I]);const H="flex items-center justify-center rounded-lg text-sm font-medium transition-colors",O=`${H} bg-white border border-gray-200 text-gray-900 hover:bg-gray-50 active:bg-gray-100`,P=`${H} bg-blue-50 border border-blue-200 text-blue-700 hover:bg-blue-100 active:bg-blue-200`,X=`${H} bg-gray-100 border border-gray-200 text-gray-600 hover:bg-gray-200 active:bg-gray-300`,R=`${H} bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800`;/* @__PURE__ */
2
- return a(c,{children:[
3
- /* @__PURE__ */a("div",{ref:A,className:"flex flex-col h-full",style:{opacity:j.activeOpacity/100,backdropFilter:j.activeBlur>0?`blur(${j.activeBlur}px)`:void 0},children:[
4
- /* @__PURE__ */a("div",{className:"bg-slate-200 rounded-t-lg px-4 py-2 group/display relative flex flex-col justify-end min-h-[120px] border-b border-slate-300",children:[
5
- /* @__PURE__ */s("div",{className:"flex flex-col justify-end flex-1 overflow-hidden",children:y.slice(0,3).reverse().map((e,t)=>/* @__PURE__ */s("div",{className:"text-[11px] text-slate-400 text-right font-mono truncate",children:e},t))}),(v||k&&null!==m)&&/* @__PURE__ */s("div",{className:"text-base text-slate-600 text-right font-mono",children:v||`${m} ${k} ${p?"":d}`}),
6
- /* @__PURE__ */a("div",{className:"flex items-center gap-2",children:[
7
- /* @__PURE__ */s("button",{onClick:()=>{navigator.clipboard.writeText(d),$(!0),setTimeout(()=>$(!1),1200)},title:"Copy result",className:"shrink-0 text-slate-300 hover:text-slate-500 transition-colors opacity-0 group-hover/display:opacity-100",children:/* @__PURE__ */s("svg",C?{className:"h-5 w-5 text-green-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */s("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}:{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */s("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})}),
8
- /* @__PURE__ */s("div",{className:"text-right text-4xl font-mono font-bold text-slate-800 truncate flex-1",children:(e=>{const t=parseFloat(e);return isNaN(t)||e.endsWith(".")||e.endsWith(".0")||Math.abs(t)<1e15&&e.length<16?e:t.toExponential(6)})(d)})]})]}),
9
- /* @__PURE__ */a("div",{className:"grid grid-cols-4 grid-rows-5 gap-1.5 flex-1 min-h-0 p-2",children:[
10
- /* @__PURE__ */s("button",{onClick:W,className:X,children:"AC"}),
11
- /* @__PURE__ */s("button",{onClick:J,className:X,children:"+/−"}),
12
- /* @__PURE__ */s("button",{onClick:I,className:X,children:"%"}),
13
- /* @__PURE__ */s("button",{onClick:()=>F("÷"),className:`${P} ${"÷"===k?"ring-2 ring-blue-400":""}`,children:"÷"}),
14
- /* @__PURE__ */s("button",{onClick:()=>L("7"),className:O,children:"7"}),
15
- /* @__PURE__ */s("button",{onClick:()=>L("8"),className:O,children:"8"}),
16
- /* @__PURE__ */s("button",{onClick:()=>L("9"),className:O,children:"9"}),
17
- /* @__PURE__ */s("button",{onClick:()=>F("×"),className:`${P} ${"×"===k?"ring-2 ring-blue-400":""}`,children:"×"}),
18
- /* @__PURE__ */s("button",{onClick:()=>L("4"),className:O,children:"4"}),
19
- /* @__PURE__ */s("button",{onClick:()=>L("5"),className:O,children:"5"}),
20
- /* @__PURE__ */s("button",{onClick:()=>L("6"),className:O,children:"6"}),
21
- /* @__PURE__ */s("button",{onClick:()=>F("-"),className:`${P} ${"-"===k?"ring-2 ring-blue-400":""}`,children:"−"}),
22
- /* @__PURE__ */s("button",{onClick:()=>L("1"),className:O,children:"1"}),
23
- /* @__PURE__ */s("button",{onClick:()=>L("2"),className:O,children:"2"}),
24
- /* @__PURE__ */s("button",{onClick:()=>L("3"),className:O,children:"3"}),
25
- /* @__PURE__ */s("button",{onClick:()=>F("+"),className:`${P} ${"+"===k?"ring-2 ring-blue-400":""}`,children:"+"}),
26
- /* @__PURE__ */s("button",{onClick:()=>L("0"),className:`${O} col-span-2`,children:"0"}),
27
- /* @__PURE__ */s("button",{onClick:()=>L("."),className:O,children:"."}),
28
- /* @__PURE__ */s("button",{onClick:M,className:R,children:"="})]})]}),
29
- /* @__PURE__ */s(t,{open:E,onClose:()=>B(!1),title:"Calculator Settings",appearance:S,onAppearanceChange:T,onSave:()=>{w(S),localStorage.setItem(u,JSON.stringify(S)),B(!1)}})]})}export{d as default};
@@ -1 +0,0 @@
1
- export{ConfirmProvider,confirm,confirmDestructive,prompt,useConfirm}from"./chunk-E4JWTNG5.js";import"./chunk-OSJ3ADF2.js";import"./chunk-YJX2IWHB.js";
@@ -1 +0,0 @@
1
- export{PdfViewer as default,fitScale,pdfWasmParams}from"./chunk-J5HNLMGZ.js";import"./chunk-NLASNJNY.js";import"./chunk-YJX2IWHB.js";
@@ -1,44 +0,0 @@
1
- import{useAuth as e,parseOpenSections as t,readStored as r,RAIL_OPEN_SECTIONS_KEY as a,toggleOpenSection as n,writeStored as i}from"./chunk-S2PS4IOT.js";import{partitionNav as l,BrandMark as o,openGlobalSearch as s,visibleNavChildren as c,visibleSectionItems as d,rowsContainRoute as m}from"./chunk-TZ2EFTST.js";import{navSections as h,startMenuCategories as u,TAB_STRIP_H as p,navIcons as b,sectionIcons as g}from"./chunk-DSSLOQDW.js";import"./chunk-5A7MWTXX.js";import{PopupMenu as x,PopupMenuItem as f,PopupMenuDivider as y}from"./chunk-L7ZMDZAB.js";import"./chunk-OSJ3ADF2.js";import"./chunk-MAIHBBWT.js";import{useShellStrings as v}from"./chunk-YJX2IWHB.js";import"./chunk-D65T4H6J.js";import{useMemo as k,useState as N,useRef as w,useEffect as C,isValidElement as L,cloneElement as j}from"react";import{jsx as A,jsxs as S}from"react/jsx-runtime";var z="undefined"!=typeof navigator&&/Mac|iPhone|iPad/.test(navigator.platform),M=(e,t)=>["flex h-9 w-full items-center gap-2.5 rounded-md px-3 text-left text-[13.5px] font-medium transition-colors",t?"justify-center px-0":"",e?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-100 hover:text-gray-900"].join(" "),B="flex size-[18px] shrink-0 items-center justify-center [&>svg]:size-[18px]";function $({open:e}){/* @__PURE__ */
2
- return A("svg",{className:"size-4 shrink-0 text-gray-400 transition-transform "+(e?"rotate-180":""),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:/* @__PURE__ */A("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})}function W({dir:e}){/* @__PURE__ */
3
- return A("svg",{className:"size-[18px]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:/* @__PURE__ */A("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"left"===e?"M18.75 19.5l-7.5-7.5 7.5-7.5m-6 15L5.25 12l7.5-7.5":"M5.25 4.5l7.5 7.5-7.5 7.5m6-15l7.5 7.5-7.5 7.5"})})}function T({className:e}){/* @__PURE__ */
4
- return A("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:/* @__PURE__ */A("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"})})}function H({width:H,collapsed:I,onToggleCollapsed:D,onOpen:V,activeRoute:K,profile:O,user:_,onLogout:R,onSwitchToDesktop:J,onReportBug:P,navSections:X=h,navIcons:Z=b,sectionIcons:F=g,categories:E=u,productName:Q,productIcon:U,tagline:Y,adaptiveLogo:q=!1,logoHasAlpha:G=null,logoIsLight:ee=null}){const te=v().layout,{hasAnyPerm:re}=e(),ae=k(()=>l(X,E,re),[X,E,re]),[ne,ie]=N(()=>t(r(a))),le=e=>ie(t=>{const r=n(t,e);return i(a,JSON.stringify([...r])),r}),[oe,se]=N(null),[ce,de]=N(!1),me=w(null);C(()=>{I||se(null)},[I]);const he=(e,t)=>{se(null),e.onSelect?e.onSelect():V(e.to,!!t&&(e=>e.metaKey||e.ctrlKey||1===e.button)(t))},ue=(e,t)=>{const r=t[e];/* @__PURE__ */
5
- return A("span",{className:B,"aria-hidden":"true",children:r&&L(r)?j(r,{className:"size-[18px]"}):r})},pe=(e,t)=>{const r=c(e,re),a=e.menuLabel??e.label;if(r.length>0){const n=`child:${e.to}`,i=ne.has(n),l=!i&&m(r,K,re);/* @__PURE__ */
6
- return S("div",{children:[
7
- /* @__PURE__ */S("button",{type:"button",onClick:()=>le(n),"aria-expanded":i,className:M(l,!1),style:t>0?{paddingLeft:.75+1.75*t+"rem"}:void 0,children:[0===t&&ue(e.to,Z),
8
- /* @__PURE__ */A("span",{className:"min-w-0 flex-1 truncate",children:a}),
9
- /* @__PURE__ */A($,{open:i})]}),i&&/* @__PURE__ */A("div",{className:"space-y-0.5 pt-0.5",children:r.map(e=>pe(e,t+1))}),e.dividerAfter&&/* @__PURE__ */A("div",{className:"mx-2 my-1.5 border-t border-gray-200","aria-hidden":"true"})]},e.to)}const n=e.to===K;/* @__PURE__ */
10
- return S("div",{children:[
11
- /* @__PURE__ */S("button",{type:"button",onClick:t=>he(e,t),onAuxClick:t=>{1===t.button&&he(e,t)},"aria-current":n?"page":void 0,className:M(n,!1),style:t>0?{paddingLeft:.75+1.75*t+"rem"}:void 0,children:[0===t&&ue(e.to,Z),
12
- /* @__PURE__ */A("span",{className:"min-w-0 flex-1 truncate",children:a})]}),e.dividerAfter&&/* @__PURE__ */A("div",{className:"mx-2 my-1.5 border-t border-gray-200","aria-hidden":"true"})]},e.to)},be=(e,t)=>{const r=t?e.items:d(e,re);if(0===r.length)return null;const a="icon"in e&&e.icon?/* @__PURE__ */A("span",{className:B,"aria-hidden":"true",children:e.icon}):ue(e.label,F),n=e.menuLabel??e.label,i=m(r,K,re),l="dividerAfter"in e&&e.dividerAfter;if(I)/* @__PURE__ */
13
- return S("div",{children:[
14
- /* @__PURE__ */A("button",{type:"button",title:n,"aria-label":n,"aria-haspopup":"menu","aria-expanded":oe?.label===e.label,onClick:t=>{const a=t.currentTarget.getBoundingClientRect();se(t=>t?.label===e.label?null:{label:e.label,items:r,top:a.top})},className:M(i||oe?.label===e.label,!0),children:a}),l&&/* @__PURE__ */A("div",{className:"mx-2 my-1.5 border-t border-gray-200","aria-hidden":"true"})]},e.label);const o=ne.has(e.label),s=`rosh-rail-${e.label.replace(/[^a-z0-9]+/gi,"-").toLowerCase()}`;/* @__PURE__ */
15
- return S("div",{children:[
16
- /* @__PURE__ */S("button",{type:"button",onClick:()=>le(e.label),"aria-expanded":o,"aria-controls":s,className:M(!o&&i,!1),children:[a,
17
- /* @__PURE__ */A("span",{className:"min-w-0 flex-1 truncate",children:n}),
18
- /* @__PURE__ */A($,{open:o})]}),
19
- /* @__PURE__ */A("div",{id:s,role:"group","aria-label":n,hidden:!o,className:"space-y-0.5 pt-0.5",children:o&&r.map(e=>pe(e,1))}),l&&/* @__PURE__ */A("div",{className:"mx-2 my-1.5 border-t border-gray-200","aria-hidden":"true"})]},e.label)},ge=O?.first_name?`${O.first_name} ${O.last_name||""}`.trim():_?.email||"",xe=(O?.first_name?.charAt(0)||_?.email?.charAt(0)||"?").toUpperCase(),fe=O?.avatar_url?/* @__PURE__ */A("img",{src:O.avatar_url,alt:"",className:"size-8 shrink-0 rounded-full object-cover"}):/* @__PURE__ */A("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full bg-blue-600 text-xs font-semibold text-white",children:xe}),ye=ce?me.current?.getBoundingClientRect():void 0,ve=I?"px-2.5":"px-3",ke=ae.erpSections.length>0||ae.systemSections.length>0||ae.virtualSections.length>0;/* @__PURE__ */
20
- return S("aside",{"aria-label":te.navLabel,className:"fixed left-0 top-0 z-[260] flex h-dvh flex-col border-r border-gray-200 bg-white text-gray-800",style:{width:H},children:[
21
- /* @__PURE__ */S("div",{className:"flex shrink-0 items-center border-b border-gray-200 "+(I?"justify-center":"justify-between gap-2 pl-4 pr-2"),style:{height:p},children:[
22
- /* @__PURE__ */S("span",{className:"flex min-w-0 items-center gap-2",children:[U&&/* @__PURE__ */A(o,{src:U,alt:"",slot:"compact",surface:"light",adaptive:q,hasAlpha:G,isLight:ee,size:28,decorative:!0}),!I&&/* @__PURE__ */S("span",{className:"min-w-0 leading-tight",children:[
23
- /* @__PURE__ */A("span",{className:"block truncate text-[15px] font-bold tracking-wide text-gray-900",children:Q??"Apps"}),Y&&/* @__PURE__ */A("span",{className:"block truncate text-[11px] font-medium text-gray-500",children:Y})]})]}),!I&&/* @__PURE__ */A("button",{type:"button",onClick:D,"aria-label":te.collapseSidebar,title:`${te.collapseSidebar} (${z?"⌘":"Ctrl"} .)`,className:"flex size-8 shrink-0 items-center justify-center rounded-md text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900",children:/* @__PURE__ */A(W,{dir:"left"})})]}),
24
- /* @__PURE__ */A("div",{className:`shrink-0 pt-3 ${ve}`,children:I?/* @__PURE__ */A("button",{type:"button",onClick:s,"aria-label":te.search,title:`${te.search} (${z?"⌘K":"Ctrl K"})`,className:M(!1,!0),children:/* @__PURE__ */A(T,{className:"size-[18px]"})}):/* @__PURE__ */S("button",{type:"button",onClick:s,className:"flex h-[34px] w-full items-center gap-2 rounded-md border border-gray-200 bg-white px-2.5 text-left transition-colors hover:bg-gray-100",children:[
25
- /* @__PURE__ */A(T,{className:"size-3.5 text-gray-500"}),
26
- /* @__PURE__ */A("span",{className:"min-w-0 flex-1 truncate text-[13px] text-gray-500",children:te.search}),
27
- /* @__PURE__ */A("kbd",{className:"rounded border border-gray-200 bg-gray-100 px-1.5 py-0.5 font-mono text-[11px] font-semibold text-gray-500",children:z?"⌘K":"Ctrl K"})]})}),
28
- /* @__PURE__ */S("nav",{"aria-label":te.navLabel,className:`min-h-0 flex-1 overflow-y-auto pb-4 pt-3 ${ve} ${I?"space-y-1":"space-y-0.5"}`,children:[I&&/* @__PURE__ */A("button",{type:"button",onClick:D,"aria-label":te.expandSidebar,title:`${te.expandSidebar} (${z?"⌘":"Ctrl"} .)`,className:`${M(!1,!0)} mb-3`,children:/* @__PURE__ */A(W,{dir:"right"})}),ae.topItems.map(e=>{if(!I)return pe(e,0);const t=c(e,re),r=e.to===K||m(t,K,re),a=e.menuLabel??e.label;/* @__PURE__ */
29
- return S("div",{children:[
30
- /* @__PURE__ */A("button",{type:"button",title:a,"aria-label":a,onClick:r=>{if(0===t.length)return void he(e,r);const a=r.currentTarget.getBoundingClientRect();se(r=>r?.label===e.to?null:{label:e.to,items:t,top:a.top})},className:M(r,!0),children:ue(e.to,Z)}),e.dividerAfter&&/* @__PURE__ */A("div",{className:"mx-2 my-1.5 border-t border-gray-200","aria-hidden":"true"})]},e.to)}),ae.topItems.length>0&&ke&&/* @__PURE__ */A("div",{className:"mx-2 my-1.5 border-t border-gray-200","aria-hidden":"true"}),ae.erpSections.map(e=>be(e,!1)),ae.systemSections.map(e=>be(e,!1)),ae.virtualSections.map(e=>be(e,!0)),ae.footerSections.length>0&&/* @__PURE__ */A("div",{className:"mx-2 my-1.5 border-t border-gray-200","aria-hidden":"true"}),ae.footerSections.map(e=>be(e,!1))]}),
31
- /* @__PURE__ */A("div",{className:`shrink-0 border-t border-gray-200 py-2 ${ve}`,children:/* @__PURE__ */S("button",{ref:me,type:"button",onClick:()=>de(e=>!e),"aria-haspopup":"menu","aria-expanded":ce,"aria-label":I?te.accountMenu(ge):void 0,className:"flex w-full items-center gap-2.5 rounded-md hover:bg-gray-100 "+(I?"justify-center py-2":"px-2 py-2"),children:[fe,!I&&/* @__PURE__ */S("span",{className:"min-w-0 flex-1 text-left",children:[
32
- /* @__PURE__ */A("span",{className:"block truncate text-[13px] font-semibold text-gray-800",children:ge}),_?.email&&ge!==_.email&&/* @__PURE__ */A("span",{className:"block truncate text-[11px] text-gray-500",children:_.email})]})]})}),ce&&ye&&/* @__PURE__ */S(x,{portal:!0,minWidth:224,onClose:()=>de(!1),style:{left:ye.left,bottom:window.innerHeight-ye.top+8},children:[I&&/* @__PURE__ */S("div",{className:"border-b border-gray-200 px-3 py-2.5",children:[
33
- /* @__PURE__ */A("p",{className:"truncate text-sm font-semibold text-gray-800",children:ge}),_?.email&&/* @__PURE__ */A("p",{className:"truncate text-xs text-gray-500",children:_.email})]}),
34
- /* @__PURE__ */S(f,{onClick:()=>{de(!1),V("/profile",!1)},children:[
35
- /* @__PURE__ */A("svg",{className:"h-4 w-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:/* @__PURE__ */A("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})}),te.profile]}),ae.footerItems.map(e=>/* @__PURE__ */S(f,{onClick:()=>{de(!1),he(e)},children:[
36
- /* @__PURE__ */A("span",{className:"h-4 w-4 text-gray-400 [&>svg]:size-4","aria-hidden":"true",children:Z[e.to]}),e.menuLabel??e.label]},e.to)),P&&/* @__PURE__ */S(f,{onClick:()=>{de(!1),P()},children:[
37
- /* @__PURE__ */A("svg",{className:"h-4 w-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:/* @__PURE__ */A("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"})}),te.reportIssue]}),
38
- /* @__PURE__ */A(y,{}),
39
- /* @__PURE__ */S(f,{onClick:()=>{de(!1),J()},children:[
40
- /* @__PURE__ */A("svg",{className:"h-4 w-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:/* @__PURE__ */A("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 17.25v1.007a3 3 0 01-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0115 18.257V17.25m6-12V15a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 15V5.25m18 0A2.25 2.25 0 0018.75 3H5.25A2.25 2.25 0 003 5.25m18 0V12a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 12V5.25"})}),te.switchToDesktop]}),
41
- /* @__PURE__ */A(y,{}),
42
- /* @__PURE__ */S(f,{danger:!0,onClick:()=>{de(!1),R()},children:[
43
- /* @__PURE__ */A("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:/* @__PURE__ */A("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15m3 0l3-3m0 0l-3-3m3 3H9"})}),te.signOut]})]}),oe&&I&&/* @__PURE__ */A(x,{portal:!0,minWidth:220,onClose:()=>se(null),style:{left:H+6,top:Math.min(oe.top,window.innerHeight-48*Math.min(oe.items.length,10)-16)},children:oe.items.flatMap(e=>{const t=c(e,re);return(t.length>0?t:[e]).map(e=>/* @__PURE__ */S(f,{onClick:()=>he(e),children:[ue(e.to,Z),
44
- /* @__PURE__ */A("span",{className:e.to===K?"font-semibold":"",children:e.menuLabel??e.label})]},e.to))})})]})}export{H as default};
@@ -1 +0,0 @@
1
- var r="4.163.0",a=r;export{a as APP_VERSION,r as VERSION};
@@ -1,9 +0,0 @@
1
- import{onOverlayOpen as e,Z_LAYERS as t,registerModalEscapeInterceptor as n}from"./chunk-OSJ3ADF2.js";import{rootIsDark as r}from"./chunk-MAIHBBWT.js";import{useHydrated as o,useBrowserLayoutEffect as i}from"./chunk-D65T4H6J.js";import{createContext as a,forwardRef as s,useContext as l,useRef as u,useId as c,useState as d,useEffect as p,useMemo as m,useCallback as h}from"react";import{createPortal as f}from"react-dom";import{jsx as g,jsxs as y,Fragment as b}from"react/jsx-runtime";function x(){try{const e=getComputedStyle(document.documentElement).getPropertyValue("--menu-opacity")?.trim();if(e)return parseFloat(e)}catch{}return.95}var w=r;function v(){try{return document.documentElement.classList.contains("rosh-reduce-transparency")}catch{return!1}}function k(e,t){return`color-mix(in srgb, ${e} ${+(Math.round(255*Math.min(1,Math.max(0,t)))/255*100).toFixed(4)}%, transparent)`}function C(e,t={}){const n=e??x();if(v()&&"light"===t.ink)return{background:"var(--rosh-glass-light-ink-surface)",border:"1px solid var(--rosh-glass-light-ink-solid-border)",boxShadow:"var(--rosh-glass-solid-shadow)"};if(v())return{background:"var(--rosh-glass-surface)",border:"1px solid var(--rosh-glass-solid-border)",boxShadow:"var(--rosh-glass-solid-shadow)"};const r="var(--rosh-glass-surface)",o="var(--rosh-glass-surface-mid)";return w()?{background:`linear-gradient(135deg in srgb, ${k(r,.85*n)} 0%, ${k(o,.75*n)} 50%, ${k(r,.85*n)} 100%)`,backdropFilter:"blur(40px) saturate(1.6)",WebkitBackdropFilter:"blur(40px) saturate(1.6)",border:"1px solid var(--rosh-glass-border)",boxShadow:"var(--rosh-glass-shadow)"}:{background:`linear-gradient(135deg in srgb, ${k(r,.85*n)} 0%, ${k(o,.65*n)} 50%, ${k(r,.75*n)} 100%)`,backdropFilter:"blur(40px) saturate(1.8)",WebkitBackdropFilter:"blur(40px) saturate(1.8)",border:"1px solid var(--rosh-glass-border)",boxShadow:"var(--rosh-glass-shadow)"}}function $(e){return v()?"var(--rosh-glass-surface)":k("var(--rosh-glass-surface)",.85*(e??x()))}var M="border-white/20",N="glass-input-bg",L=/* @__PURE__ */new Set(["text","search","url","tel","email","password","number","date","datetime-local","month","week","time"]),T="data-native-context-menu";function B(e,t){return e&&"function"==typeof e.closest?e.closest(t):null}function E(e){const t=e;if(!t||"function"!=typeof t.closest)return!1;if(B(t,`[${T}]`))return!0;if(B(t,"textarea"))return!0;if(B(t,"img, picture, canvas, video, audio"))return!0;const n=B(t,"input");if(n){const e=(n.type||"text").toLowerCase();if(L.has(e))return!0}const r=B(t,"[contenteditable]");if(r){const e=(r.getAttribute("contenteditable")||"").toLowerCase();if(""===e||"true"===e||"plaintext-only"===e)return!0}return!1}var W=/* @__PURE__ */new Set(["http:","https:","mailto:","tel:","blob:"]);function A(e,t,n){const r=B(e,"a[href]"),o=(t||"").trim(),i=function(e,t){if(e&&"#"!==e)try{const n=new URL(e,t??("undefined"!=typeof document?document.baseURI:void 0));return W.has(n.protocol)?n.href:void 0}catch{return}}(r?.getAttribute("href"),n);return{kind:o?"selection":i?"link":"default",...o?{selectionText:o}:{},...i?{linkUrl:i}:{}}}function F(e){if(e.defaultPrevented)return!0;if(e.shiftKey)return!0;if("touch"===e.pointerType)return!0;return E(("function"==typeof e.composedPath?e.composedPath()[0]:void 0)??e.target)}function S(e,t,n){return e.length===t+1&&e[t].key===n.key?e:[...e.slice(0,t),n]}function P(e,t){const n=Math.max(0,t);return e.length>n?e.slice(0,n):e}function R(e,t,n){if(0===t.length||0===e.length)return[];const r=[e];for(let e=1;e<t.length;e++){const o=r[e-1].find(n=>n.to===t[e].key),i=o?n(o):[];if(0===i.length)break;r.push(i)}return r}function D(e,t,n,r){const o=Math.max(0,r-n),i=Math.min(t,o),a=e-i/2;return a<n?n:a+i>r?Math.max(n,r-i):a}function H(e,t,n,r,o,i=!1,a=8){const s=t+o,l=e-o-n,u=l>=a;return i&&u?{left:l,flipped:!0}:s+n<=r-a?{left:s,flipped:!1}:u?{left:l,flipped:!0}:i?{left:a,flipped:!0}:{left:Math.max(a,r-a-n),flipped:!1}}function I(){try{return getComputedStyle(document.documentElement).getPropertyValue("--menu-density")?.trim()||"normal"}catch{return"normal"}}var j=a(null),z=a(!1);function q({children:n,style:r,className:i="",onClose:a,minWidth:s=180,portal:l=!1}){const h=u(null),y=c(),[b,x]=d([]),w=u();p(()=>()=>clearTimeout(w.current),[]);const v=o(),k=m(()=>{const e=()=>clearTimeout(w.current);return{id:y,depth:0,path:b,open:(t,n)=>{e(),x(e=>S(e,t,n))},scheduleClose:t=>{e(),w.current=setTimeout(()=>x(e=>P(e,t)),200)},closeBelow:t=>{e(),x(e=>P(e,t))},cancelClose:e,closeTree:()=>{e(),x([]),a?.()},root:h}},[y,b,a]);p(()=>{if(!a)return;const t=e=>{e.target.closest("[data-menu-toggle]")||e.target.closest?.(`[data-popup-menu-tree="${y}"]`)||h.current&&!h.current.contains(e.target)&&a()},n=e=>{"Escape"===e.key&&a()};window.addEventListener("pointerdown",t),window.addEventListener("keydown",n);const r=e(a);return()=>{window.removeEventListener("pointerdown",t),window.removeEventListener("keydown",n),r()}},[a,y]),p(()=>{const e=h.current;e&&requestAnimationFrame(()=>{const t=e.getBoundingClientRect();if(t.right>window.innerWidth-8){const n=t.right-window.innerWidth+8;e.style.left?e.style.left=parseFloat(e.style.left)-n+"px":e.style.right||(e.style.left=t.left-n+"px")}if(t.left<8&&(e.style.left?e.style.left="8px":e.style.right&&(e.style.right=window.innerWidth-t.width-8+"px")),t.bottom>window.innerHeight-8){const n=t.bottom-window.innerHeight+8;e.style.top?e.style.top=parseFloat(e.style.top)-n+"px":e.style.bottom?e.style.bottom="8px":e.style.top=t.top-n+"px"}t.top<8&&(e.style.top?e.style.top="8px":e.style.bottom&&(e.style.bottom=window.innerHeight-t.height-8+"px"))})});const $=I(),M=/(^|[\s:])!?z-/.test(i),N=/* @__PURE__ */g("div",{ref:h,"data-popup-menu-tree":y,className:`fixed rounded-2xl ${"tight"===$?"py-1":"large"===$?"py-2":"py-1.5"} ${i}`,onContextMenu:e=>{E(e.target)||e.preventDefault()},style:{...M?{}:{zIndex:t.menu},minWidth:s,animation:"popup-in 0.12s ease-out",...C(),...r},children:/* @__PURE__ */g(j.Provider,{value:k,children:n})});return l?v?f(N,document.body):null:N}function U(e,t,n,r=!1){const o=I(),i="tight"===o?"0.25rem":"large"===o?"0.6rem":"max(0.25rem, calc(var(--menu-padding-y, 0.5rem) - 0.1rem))";return{className:`w-full flex items-center gap-2 text-left transition-colors rounded-lg mx-auto\n ${e?"text-red-600 hover:bg-red-50":r?"bg-blue-50 text-blue-700":"text-gray-700 hover:bg-blue-50 hover:text-blue-700"}\n ${t?"opacity-40 cursor-not-allowed":""}\n ${n}`,style:{width:"calc(100% - 8px)",marginLeft:4,marginRight:4,fontSize:"var(--menu-font-size, 14px)",paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:i,paddingBottom:i}}}var K=s(function({onClick:e,children:t,className:n="",danger:r,disabled:o,role:i,tabIndex:a,id:s,onMouseEnter:u},c){const d=l(j),p=l(z),m=U(r,o,n);/* @__PURE__ */
2
- return g("button",{ref:c,id:s,role:i??(p?"menuitem":void 0),tabIndex:a,onClick:()=>{e?.(),d&&d.depth>0&&d.closeTree()},onMouseEnter:()=>{d?.scheduleClose(d.depth),u?.()},disabled:o,className:m.className,style:m.style,children:t})}),J=/* @__PURE__ */g("svg",{"aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0 ml-auto text-gray-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */g("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})});function O(e){let n=t.menu;for(let t=e;t&&t!==document.body;t=t.parentElement){const e=parseInt(getComputedStyle(t).zIndex,10);Number.isNaN(e)||(n=e)}return n}function V(e){return e?[...e.querySelectorAll("button:not([disabled])")].filter(t=>t.closest("[data-popup-submenu-panel]")===e):[]}function G({label:e,icon:t,children:r,disabled:o,className:a="",minWidth:s=180,maxHeight:d}){const x=l(j),w=c(),v=u(null),k=u(null),$=u(),M=u(!1),N=`${w}-menu`;p(()=>()=>clearTimeout($.current),[]);const L=x?.depth??0,T=x?.path[L],B=!!T&&T.key===w&&!o,W=h(e=>{if(!x||o||!v.current)return;clearTimeout($.current),M.current=e;const t=v.current.getBoundingClientRect(),n=v.current.closest("[data-popup-submenu-panel]")??v.current.closest("[data-popup-menu-tree]"),r=n?.getBoundingClientRect()??t,i=L>0&&(x.path[L-1]?.flipped??!1),a=H(r.left,r.right,s,window.innerWidth,4,i);x.open(L,{key:w,y:t.top,...a})},[x,o,L,w,s]),A=e=>{x?.closeBelow(L),v.current?.focus()};p(()=>{if(B)return n(e=>"Escape"===e.key&&(!(x&&x.path.length>L+1)&&(A(),!0)))}),i(()=>{if(!B||!T)return;const e=()=>{const e=k.current;if(!e||!v.current)return;const t=v.current.closest("[data-popup-submenu-panel]")??v.current.closest("[data-popup-menu-tree]"),n=t?.getBoundingClientRect()??v.current.getBoundingClientRect(),r=L>0&&(x?.path[L-1]?.flipped??!1),o=e.offsetWidth||s,i=H(n.left,n.right,o,window.innerWidth,4,r,8),a=e.offsetHeight,l=D(v.current.getBoundingClientRect().top+a/2,a,8,window.innerHeight-8);e.style.left=`${i.left}px`,e.style.top=`${l}px`,e.dataset.flipped=String(i.flipped)};e();let t=0;const n=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>{cancelAnimationFrame(n),cancelAnimationFrame(t)}}),p(()=>{B&&M.current&&(M.current=!1,V(k.current)[0]?.focus())},[B]);const F=m(()=>x&&{...x,depth:L+1},[x,L]);if(!x)throw new Error("PopupSubmenu must be rendered inside a PopupMenu");const S=U(!1,o,a,B),P=I();/* @__PURE__ */
3
- return y(b,{children:[
4
- /* @__PURE__ */y("button",{ref:v,type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":B,"aria-controls":B?N:void 0,disabled:o,"data-popup-submenu-row":!0,className:S.className,style:S.style,onClick:e=>{const t=0===e.detail;B?t&&V(k.current)[0]?.focus():W(t)},onKeyDown:e=>{"ArrowRight"===e.key&&(e.preventDefault(),e.stopPropagation(),W(!0))},onMouseEnter:()=>{o||(x.cancelClose(),B?x.closeBelow(L+1):(clearTimeout($.current),$.current=setTimeout(()=>W(!1),120)))},onMouseLeave:()=>{clearTimeout($.current),x.scheduleClose(L)},children:[t,
5
- /* @__PURE__ */g("span",{className:"min-w-0 flex-1 truncate",children:e}),J]}),B&&f(
6
- /* @__PURE__ */g("div",{ref:k,id:N,role:"menu","data-popup-menu-tree":x.id,"data-popup-submenu-panel":!0,className:"fixed rounded-2xl overflow-x-hidden overflow-y-auto overscroll-contain "+("tight"===P?"py-1":"large"===P?"py-2":"py-1.5"),style:{left:T.left,top:T.y,minWidth:s,maxHeight:void 0===d?"calc(100vh - 16px)":`min(${"number"==typeof d?`${d}px`:d}, calc(100vh - 16px))`,zIndex:O(x.root.current)+L+1,animation:(T.flipped?"popup-submenu-in-left":"popup-submenu-in")+" 0.1s ease-out",...C()},onKeyDown:e=>{if(e.target.closest("[data-popup-submenu-panel]")!==e.currentTarget)return;const t=V(k.current),n=t.indexOf(document.activeElement),r=n=>{e.preventDefault(),e.stopPropagation(),t[(n+t.length)%t.length]?.focus()};"ArrowDown"===e.key?r(n+1):"ArrowUp"===e.key?r(n<0?t.length-1:n-1):"Home"===e.key?r(0):"End"===e.key?r(t.length-1):"ArrowLeft"===e.key&&(e.preventDefault(),e.stopPropagation(),A())},onMouseEnter:()=>{x.cancelClose(),clearTimeout($.current)},onMouseLeave:()=>x.scheduleClose(L+1),onContextMenu:e=>{E(e.target)||e.preventDefault()},children:/* @__PURE__ */g(j.Provider,{value:F,children:r})}),document.body)]})}function Q(){const e=I();/* @__PURE__ */
7
- return g("div",{className:`border-t ${M} ${"tight"===e?"my-0.5":"large"===e?"my-1.5":"my-1"} mx-3`})}function X({children:e}){const t=I(),n="tight"===t?"0.125rem":"large"===t?"0.375rem":"0.25rem";/* @__PURE__ */
8
- return g("div",{className:"text-xs font-medium uppercase tracking-wide",style:{color:"var(--ink-muted)",paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:n,paddingBottom:n},children:e})}function Y({d:e,className:t="h-4 w-4 text-gray-400"}){/* @__PURE__ */
9
- return g("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */g("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})})}export{M as GLASS_DIVIDER,N as GLASS_INPUT_BG,Y as MenuIcon,z as MenuSemanticsContext,T as NATIVE_MENU_ATTR,q as PopupMenu,Q as PopupMenuDivider,K as PopupMenuItem,X as PopupMenuLabel,G as PopupSubmenu,D as clampMenuTop,P as closeMenuBelow,A as describeContextTarget,$ as glassFill,C as glassStyle,U as itemLook,E as keepsNativeMenu,F as leavesContextMenuAlone,H as menuPanelLeft,S as openMenuLevel,R as resolveMenuLevels};
@@ -1 +0,0 @@
1
- import{useEffect as e,useLayoutEffect as n}from"react";var t=/* @__PURE__ */new Set,o=null;function r(e){return t.add(e),function(){if(o||"undefined"==typeof document)return;const e=e=>{"Escape"===e.key&&d(e)&&(e.preventDefault(),e.stopPropagation())};document.addEventListener("keydown",e,!0),o=()=>document.removeEventListener("keydown",e,!0)}(),()=>{t.delete(e),0===t.size&&o&&(o(),o=null)}}function d(e){const n=Array.from(t);for(let t=n.length-1;t>=0;t--)try{if(n[t](e))return!0}catch{}return!1}var i="react-os-shell:overlay-open";function u(){"undefined"!=typeof window&&window.dispatchEvent(new Event(i))}function f(e){return"undefined"==typeof window?()=>{}:(window.addEventListener(i,e),()=>window.removeEventListener(i,e))}var w={window:50,windowStep:10,menu:400,pinnedWindow:999,overlay:9999,popup:1e4},c="undefined"==typeof document?e:n;function a(e){c(()=>{e&&u()},[e])}export{i as OVERLAY_OPEN_EVENT,w as Z_LAYERS,u as dismissPopups,f as onOverlayOpen,r as registerModalEscapeInterceptor,d as runEscapeInterceptors,a as useDismissPopupsOnOpen};
@@ -1,9 +0,0 @@
1
- import{glassStyle as t,glassFill as e}from"./chunk-L7ZMDZAB.js";import{registerModalEscapeInterceptor as o,Z_LAYERS as r}from"./chunk-OSJ3ADF2.js";import{useShellStrings as i}from"./chunk-YJX2IWHB.js";import{useBrowserLayoutEffect as n,useBrowserState as a}from"./chunk-D65T4H6J.js";import{useState as l,useRef as h,useId as s,useEffect as d,isValidElement as c,cloneElement as m,useCallback as u}from"react";import{createPortal as f}from"react-dom";import{jsxs as g,jsx as p,Fragment as b}from"react/jsx-runtime";var x=448,w=240,v=8,y=()=>({left:0,right:window.innerWidth,top:0,bottom:window.innerHeight});function M(t){const e=y(),o=t?.closest?.("[data-modal-panel]");if(!o)return e;const r=o.getBoundingClientRect();return r.width<=0||r.height<=0?e:{left:Math.max(e.left,r.left),right:Math.min(e.right,r.right),top:Math.max(e.top,r.top),bottom:Math.min(e.bottom,r.bottom)}}var N=/* @__PURE__ */new Set(["hidden","clip","auto","scroll"]);var W={top:"bottom",bottom:"top",left:"right",right:"left"},z={top:["right","left"],bottom:["right","left"],left:["top","bottom"],right:["top","bottom"]};function k(t,e,o){return{top:t.top-o-(e.top+8),bottom:e.bottom-8-(t.bottom+o),left:t.left-o-(e.left+8),right:e.right-8-(t.right+o)}}var C=(t,e,o)=>Math.max(e,Math.min(t,o));function H(t,e,o){let r=NaN,i=NaN,n=NaN,a=NaN,l=NaN;const h=()=>{const e=t()?.getBoundingClientRect();if(!e)return!1;const h=o?o():NaN,s=e.left!==r||e.top!==i||e.right!==n||e.bottom!==a||h!==l&&!(Number.isNaN(h)&&Number.isNaN(l));return r=e.left,i=e.top,n=e.right,a=e.bottom,l=h,s};h();const s=()=>{h(),e()};let d=requestAnimationFrame(function t(){h()&&e(),d=requestAnimationFrame(t)});return window.addEventListener("scroll",s,!0),window.addEventListener("resize",s),()=>{cancelAnimationFrame(d),window.removeEventListener("scroll",s,!0),window.removeEventListener("resize",s)}}function R({trigger:t,menu:e,bounds:o,align:r,side:i}){const n=k(t,o,4),a="bottom"===i?"top":"bottom",l=e.height>n[i]&&(e.height<=n[a]||n[a]>n[i])?a:i,h=Math.max(Math.min(e.height,96),n[l]),s=Math.min(e.height,h),d=C("bottom"===l?t.bottom+4:t.top-4-s,o.top+8,o.bottom-8-s),c=Math.max(0,o.right-o.left-16),m=Math.min(e.width,c);return{left:C("start"===r?t.left:t.right-m,o.left+8,o.right-8-m),top:d,side:l,maxHeight:h,maxWidth:c}}function B(t,e,o={}){const{matchTriggerWidth:r=!1,preferredMaxWidth:i=x,preferredMaxHeight:a=w,popupRef:h}=o,[s,d]=l(null);return n(()=>{if(!e)return void d(null);const o=()=>{const e=t.current,o=e?.getBoundingClientRect();if(!o)return;const n=M(e),l=n.bottom-o.bottom-4-8,s=o.top-n.top-4-8,c=l<Math.min(a,160)&&s>l,m=Math.max(96,Math.min(a,c?s:l)),u=Math.max(0,n.right-n.left-16),f={minWidth:o.width,maxWidth:Math.min(i,u),maxHeight:m};if(r){const t=Math.min(o.width,u);f.width=t,f.maxWidth=t,f.left=Math.min(Math.max(n.left+8,o.left),n.right-8-t)}else if(h&&n.right-8-o.left<f.maxWidth&&Math.min(o.right,n.right-8)-n.left-8<f.maxWidth){const t=h.current?.offsetWidth??0,e=t>0?Math.min(t,f.maxWidth):f.maxWidth;f.left=Math.max(n.left+8,Math.min(o.left,n.right-8-e))}else if(n.right-8-o.left<f.maxWidth){const t=Math.min(o.right,n.right-8);f.right=window.innerWidth-t,f.maxWidth=Math.min(f.maxWidth,Math.max(0,t-n.left-8))}else f.left=Math.max(n.left+8,o.left);c?f.bottom=window.innerHeight-o.top+4:f.top=o.bottom+4,d(f)};return o(),H(()=>t.current,o,h?()=>h.current?.offsetWidth??NaN:void 0)},[e,t,r,i,a,h]),s}function E({point:t,menu:e,bounds:o}){const r={left:t.x,right:t.x,top:t.y,bottom:t.y},i=o.right-8-t.x,n=t.x-(o.left+8);return R({trigger:r,menu:e,bounds:o,align:e.width<=i||i>=n?"start":"end",side:"bottom"})}var T={top:"bottom-full left-1/2 -translate-x-1/2 mb-3",bottom:"top-full left-1/2 -translate-x-1/2 mt-3",left:"right-full top-1/2 -translate-y-1/2 mr-3",right:"left-full top-1/2 -translate-y-1/2 ml-3"};function P({content:i,side:a="top",delay:u=200,children:b,className:x="relative inline-flex"}){const[w,v]=l(!1),[R,B]=l(null),E=h(void 0),P=h(null),$=h(null),D=s(),I=()=>{E.current=window.setTimeout(()=>v(!0),u)},L=()=>{window.clearTimeout(E.current),v(!1)};d(()=>()=>window.clearTimeout(E.current),[]),n(()=>{if(!w)return void B(null);const t=()=>{const t=P.current,e=$.current;if(!t||!e)return;const o=M(t),r=Math.max(0,o.right-o.left-16),i=Math.max(0,o.bottom-o.top-16);e.style.maxWidth=`${r}px`,e.style.maxHeight=`${i}px`;const n=e.getBoundingClientRect();if(n.width<=0||n.height<=0)return;const l=t.getBoundingClientRect();if(!function(t){const e=t.getBoundingClientRect();if(e.width<=0&&e.height<=0&&0===e.left&&0===e.top)return null;const o=y(),r={left:Math.max(o.left,e.left),right:Math.min(o.right,e.right),top:Math.max(o.top,e.top),bottom:Math.min(o.bottom,e.bottom)};let i=getComputedStyle(t).position;for(let e=t.parentElement;e&&e!==document.documentElement&&"fixed"!==i;e=e.parentElement){const t=getComputedStyle(e);if("absolute"===i&&"static"===t.position)continue;i=t.position;const o=N.has(t.overflowX),n=N.has(t.overflowY);if(!o&&!n)continue;const a=e.getBoundingClientRect();a.width<=0&&a.height<=0||(o&&(r.left=Math.max(r.left,a.left),r.right=Math.min(r.right,a.right)),n&&(r.top=Math.max(r.top,a.top),r.bottom=Math.min(r.bottom,a.bottom)))}return r.right>=r.left&&r.bottom>=r.top?r:null}(t))return void L();const h=function(t,e,o,r,i){const n=k(t,r,i),a=t=>n[t]-("top"===t||"bottom"===t?e.height:e.width),l=[o,W[o],...z[o]],h=l.find(t=>a(t)>=0)??l.reduce((t,e)=>a(e)>a(t)?e:t),s=(t.left+t.right)/2,d=(t.top+t.bottom)/2;let c,m;switch(h){case"top":c=s-e.width/2,m=t.top-i-e.height;break;case"bottom":c=s-e.width/2,m=t.bottom+i;break;case"left":c=t.left-i-e.width,m=d-e.height/2;break;case"right":c=t.right+i,m=d-e.height/2}return{side:h,left:C(c,r.left+8,r.right-8-e.width),top:C(m,r.top+8,r.bottom-8-e.height)}}(l,n,a,o,12),s=function(t,e,o,r,i){const{side:n,left:a,top:l}=e,h=a+o.width,s=l+o.height;if({top:t.top-s,bottom:l-t.bottom,left:t.left-h,right:a-t.right}[n]<i)return null;const d=(t,e,o)=>o<2*r?e+o/2:Math.max(e+r,Math.min(t,e+o-r)),c=(t.left+t.right)/2,m=(t.top+t.bottom)/2;switch(n){case"top":return{side:n,x:d(c,a,o.width),y:s};case"bottom":return{side:n,x:d(c,a,o.width),y:l};case"left":return{side:n,x:h,y:d(m,l,o.height)};case"right":return{side:n,x:a,y:d(m,l,o.height)}}}(l,h,n,16,6),d={anchor:{left:l.left,top:l.top,width:l.width,height:l.height},left:h.left-l.left,top:h.top-l.top,maxWidth:r,maxHeight:i,side:h.side,arrow:s&&{left:s.x-l.left,top:s.y-l.top}};B(t=>{return t&&(o=d,(e=t).anchor.left===o.anchor.left&&e.anchor.top===o.anchor.top&&e.anchor.width===o.anchor.width&&e.anchor.height===o.anchor.height&&e.left===o.left&&e.top===o.top&&e.maxWidth===o.maxWidth&&e.maxHeight===o.maxHeight&&e.side===o.side&&e.arrow?.left===o.arrow?.left&&e.arrow?.top===o.arrow?.top)?t:d;var e,o})};return t(),H(()=>P.current,t)},[w,a,i]),d(()=>{if(w)return o(t=>"Escape"===t.key&&(L(),!0))},[w]);const S=w?D:void 0,A=c(b)?m(b,{"aria-describedby":[b.props["aria-describedby"],S].filter(Boolean).join(" ")||void 0}):b,j=w?t():void 0,F=w?e():void 0;/* @__PURE__ */
2
- return g("span",{ref:P,className:x,"aria-describedby":c(b)?void 0:S,onMouseEnter:I,onMouseLeave:L,onFocus:I,onBlur:L,children:[A,w&&f(
3
- /* @__PURE__ */g("span",{className:"pointer-events-none fixed left-0 top-0",style:{zIndex:r.popup,...R?.anchor},children:[
4
- /* @__PURE__ */p("span",{ref:$,id:D,role:"tooltip",className:`pointer-events-none absolute z-[300] box-border w-max overflow-hidden whitespace-normal break-words text-start rounded-md px-2 py-1 text-xs text-gray-800 ${R?"":T[a]}`,style:{...j,...R&&{left:R.left,top:R.top,maxWidth:R.maxWidth,maxHeight:R.maxHeight}},children:i}),(!R||R.arrow)&&
5
- /* @__PURE__ */p("span",{"aria-hidden":"true",className:"rosh-tooltip-arrow","data-side":R?.side??a,style:{background:F,"--rosh-tooltip-edge":j?.border,...R?.arrow&&{left:R.arrow.left,top:R.arrow.top}}})]}),document.body)]})}var $=(t,e,o)=>Math.min(o,Math.max(e,t));function D(t,e,o,r,i){return Math.round($("left"===o?t+e:t-e,r,i))}function I(t,e,o){let r=null;try{r=window.localStorage.getItem(t)}catch{return null}const i=r?parseInt(r,10):NaN;return Number.isNaN(i)?null:$(i,e,o)}function L({width:t,onResize:e,side:o,min:r,max:a,defaultWidth:l=r,step:s=16,storageKey:c,label:m,hint:f,controls:g,className:b=""}){const x=i().resizeHandle,w=h(null),v=h({onResize:e,min:r,max:a,side:o});v.current={onResize:e,min:r,max:a,side:o},n(()=>{if(!c)return;const o=I(c,r,a);null!==o&&o!==t&&e(o)},[c]),d(()=>{if(!c)return;const e=window.setTimeout(()=>{try{window.localStorage.setItem(c,String(Math.round(t)))}catch{}},200);return()=>window.clearTimeout(e)},[t,c]);const y=u(()=>{w.current=null,document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")},[]);d(()=>y,[y]);const M=t=>{w.current&&(t.currentTarget.hasPointerCapture?.(w.current.pointer)&&t.currentTarget.releasePointerCapture(w.current.pointer),y())},N="left"===o?"right-0":"left-0";/* @__PURE__ */
6
- return p(P,{content:f??x.hint,side:"left"===o?"right":"left",delay:600,className:`absolute inset-y-0 ${N} z-10 flex w-2 ${b}`.trim(),children:/* @__PURE__ */p("div",{role:"separator",tabIndex:0,"aria-orientation":"vertical","aria-label":m??x.label,"aria-valuenow":Math.round(t),"aria-valuemin":r,"aria-valuemax":a,"aria-controls":g,"data-resize-handle":o,onPointerDown:e=>{0===e.button&&(e.preventDefault(),w.current={x:e.clientX,width:t,moved:!1,pointer:e.pointerId},e.currentTarget.setPointerCapture?.(e.pointerId),document.body.style.cursor="col-resize",document.body.style.userSelect="none")},onPointerMove:t=>{const e=w.current;if(!e)return;if(0===t.buttons)return void y();const o=t.clientX-e.x;if(!e.moved){if(Math.abs(o)<3)return;e.moved=!0}const{onResize:r,min:i,max:n,side:a}=v.current;r(D(e.width,o,a,i,n))},onPointerUp:M,onPointerCancel:M,onLostPointerCapture:()=>{w.current&&y()},onDoubleClick:()=>e($(l,r,a)),onKeyDown:i=>{const n="ArrowRight"===i.key?s:"ArrowLeft"===i.key?-s:null,h=null!==n?D(t,n,o,r,a):"Home"===i.key?r:"End"===i.key?a:"Enter"===i.key?$(l,r,a):null;null!==h&&(i.preventDefault(),h!==t&&e(h))},className:"group/resize relative h-full w-full cursor-col-resize touch-none rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */p("div",{"aria-hidden":"true",className:`absolute inset-y-0 ${N} w-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,var(--rosh-resize-handle))] group-focus-visible/resize:w-0.5 group-focus-visible/resize:bg-[var(--accent-500,var(--rosh-resize-handle))]`})})})}var S=(t,e,o)=>Math.min(Math.max(t,e),o);function A({sidebar:t,sidebarTop:e,sidebarBottom:o,children:r,side:n="left",storageKey:l,defaultWidth:h=256,minWidth:s=180,maxWidth:d=480,className:c="",sidebarClassName:m=("right"===n?"border-l border-gray-200 bg-gray-50":"border-r border-gray-200 bg-gray-50"),contentClassName:u="bg-white"}){const f="right"===n,x=i().sidebar,[w,v]=a(()=>(l?I(l,s,d):null)??S(h,s,d),S(h,s,d)),y=null!=e||null!=o,M=/* @__PURE__ */g("div",{className:"relative flex h-full shrink-0 flex-col",style:{width:w},children:[
7
- /* @__PURE__ */g("div",{className:`flex h-full flex-col ${y?"overflow-hidden":"overflow-y-auto"} ${m}`,children:[null!=e&&/* @__PURE__ */p("div",{className:"flex shrink-0 flex-col gap-2 px-2 pt-3 pb-2",children:e}),y?/* @__PURE__ */p("div",{className:"min-h-0 flex-1 overflow-y-auto",children:t}):t,null!=o&&/* @__PURE__ */p("div",{className:"mt-auto flex shrink-0 flex-col gap-2 border-t border-gray-200 px-2 py-3",children:o})]}),
8
- /* @__PURE__ */p(L,{side:n,width:w,onResize:v,min:s,max:d,defaultWidth:S(h,s,d),storageKey:l,hint:x.resize})]}),N=/* @__PURE__ */p("div",{className:`flex min-w-0 flex-1 flex-col ${u}`,children:r});/* @__PURE__ */
9
- return p("div",{className:`flex h-full w-full overflow-hidden ${c}`,children:/* @__PURE__ */g(b,f?{children:[N,M]}:{children:[M,N]})})}export{w as MENU_MAX_HEIGHT,x as POPUP_MAX_WIDTH,L as ResizeHandle,A as SidebarLayout,P as Tooltip,v as VIEWPORT_MARGIN,H as followAnchor,E as placeAtPoint,R as placeMenu,M as popupBounds,B as useDropdownPosition};