@sirsluginston/sharedui 2.0.5 → 2.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/sharedui.js CHANGED
@@ -9,10 +9,10 @@ var de = { exports: {} }, $ = {};
9
9
  * This source code is licensed under the MIT license found in the
10
10
  * LICENSE file in the root directory of this source tree.
11
11
  */
12
- var Le;
12
+ var Be;
13
13
  function Rr() {
14
- if (Le) return $;
15
- Le = 1;
14
+ if (Be) return $;
15
+ Be = 1;
16
16
  var o = ue, t = Symbol.for("react.element"), s = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, n = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
17
17
  function c(u, f, j) {
18
18
  var p, y = {}, b = null, I = null;
@@ -33,9 +33,9 @@ var Y = {};
33
33
  * This source code is licensed under the MIT license found in the
34
34
  * LICENSE file in the root directory of this source tree.
35
35
  */
36
- var Be;
36
+ var Le;
37
37
  function Tr() {
38
- return Be || (Be = 1, process.env.NODE_ENV !== "production" && function() {
38
+ return Le || (Le = 1, process.env.NODE_ENV !== "production" && function() {
39
39
  var o = ue, t = Symbol.for("react.element"), s = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), u = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), j = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), b = Symbol.for("react.lazy"), I = Symbol.for("react.offscreen"), C = Symbol.iterator, _ = "@@iterator";
40
40
  function Ne(r) {
41
41
  if (r === null || typeof r != "object")
@@ -125,13 +125,13 @@ function Tr() {
125
125
  }
126
126
  return null;
127
127
  }
128
- var D = Object.assign, B = 0, pe, ge, me, xe, he, ye, be;
128
+ var D = Object.assign, L = 0, pe, ge, me, xe, he, ye, be;
129
129
  function je() {
130
130
  }
131
131
  je.__reactDisabledLog = !0;
132
132
  function Qe() {
133
133
  {
134
- if (B === 0) {
134
+ if (L === 0) {
135
135
  pe = console.log, ge = console.info, me = console.warn, xe = console.error, he = console.group, ye = console.groupCollapsed, be = console.groupEnd;
136
136
  var r = {
137
137
  configurable: !0,
@@ -149,12 +149,12 @@ function Tr() {
149
149
  groupEnd: r
150
150
  });
151
151
  }
152
- B++;
152
+ L++;
153
153
  }
154
154
  }
155
155
  function Ze() {
156
156
  {
157
- if (B--, B === 0) {
157
+ if (L--, L === 0) {
158
158
  var r = {
159
159
  configurable: !0,
160
160
  enumerable: !0,
@@ -184,7 +184,7 @@ function Tr() {
184
184
  })
185
185
  });
186
186
  }
187
- B < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
187
+ L < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
188
188
  }
189
189
  }
190
190
  var oe = W.ReactCurrentDispatcher, te;
@@ -274,7 +274,7 @@ function Tr() {
274
274
  } finally {
275
275
  ae = !1, oe.current = h, Ze(), Error.prepareStackTrace = x;
276
276
  }
277
- var L = r ? r.displayName || r.name : "", z = L ? J(L) : "";
277
+ var B = r ? r.displayName || r.name : "", z = B ? J(B) : "";
278
278
  return typeof r == "function" && K.set(r, z), z;
279
279
  }
280
280
  function rr(r, a, d) {
@@ -588,8 +588,8 @@ Check the top-level render call using <` + d + ">.");
588
588
  if (E !== void 0)
589
589
  if (v)
590
590
  if (ne(E)) {
591
- for (var L = 0; L < E.length; L++)
592
- ze(E[L], r);
591
+ for (var B = 0; B < E.length; B++)
592
+ ze(E[B], r);
593
593
  Object.freeze && Object.freeze(E);
594
594
  } else
595
595
  S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
@@ -1534,7 +1534,7 @@ const Qr = ({
1534
1534
  gap: "var(--space-xs)",
1535
1535
  flexShrink: 0
1536
1536
  }, children: [
1537
- l && /* @__PURE__ */ e.jsx(Z, { onClick: () => f(!u), label: "Menu", size: 36, children: /* @__PURE__ */ e.jsx(Lr, {}) }),
1537
+ l && /* @__PURE__ */ e.jsx(Z, { onClick: () => f(!u), label: "Menu", size: 36, children: /* @__PURE__ */ e.jsx(Br, {}) }),
1538
1538
  /* @__PURE__ */ e.jsx(Z, { onClick: s, label: "Toggle theme", size: 36, children: t ? /* @__PURE__ */ e.jsx(Pr, {}) : /* @__PURE__ */ e.jsx(zr, {}) }),
1539
1539
  !l && n && /* @__PURE__ */ e.jsx(Z, { onClick: n, label: "Notifications", size: 36, children: /* @__PURE__ */ e.jsx(Wr, {}) }),
1540
1540
  /* @__PURE__ */ e.jsx(Z, { onClick: i, label: "Account", size: 40, children: /* @__PURE__ */ e.jsx(Ar, {}) })
@@ -1666,7 +1666,7 @@ const Qr = ({
1666
1666
  ] }), Pr = () => /* @__PURE__ */ e.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ e.jsx("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) }), Wr = () => /* @__PURE__ */ e.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ e.jsx("path", { d: "M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9M13.73 21a2 2 0 0 1-3.46 0" }) }), Ar = () => /* @__PURE__ */ e.jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
1667
1667
  /* @__PURE__ */ e.jsx("path", { d: "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" }),
1668
1668
  /* @__PURE__ */ e.jsx("circle", { cx: "12", cy: "7", r: "4" })
1669
- ] }), Lr = () => /* @__PURE__ */ e.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ e.jsx("path", { d: "M3 12h18M3 6h18M3 18h18" }) }), Br = ({
1669
+ ] }), Br = () => /* @__PURE__ */ e.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ e.jsx("path", { d: "M3 12h18M3 6h18M3 18h18" }) }), Lr = ({
1670
1670
  copyrightBrand: o,
1671
1671
  yearCreated: t,
1672
1672
  poweredBy: s
@@ -1799,7 +1799,7 @@ const U = ({
1799
1799
  /* @__PURE__ */ e.jsx(Or, {})
1800
1800
  ] }),
1801
1801
  /* @__PURE__ */ e.jsx(
1802
- Br,
1802
+ Lr,
1803
1803
  {
1804
1804
  copyrightBrand: o.footer.copyrightBrand,
1805
1805
  yearCreated: o.footer.yearCreated,
@@ -2596,7 +2596,7 @@ const Ye = ({
2596
2596
  {
2597
2597
  title: "Cities",
2598
2598
  items: t.directory,
2599
- basePath: `/${t.slug.toLowerCase()}`
2599
+ basePath: "/city"
2600
2600
  }
2601
2601
  ),
2602
2602
  c.map((u) => /* @__PURE__ */ e.jsx(
@@ -2848,7 +2848,7 @@ export {
2848
2848
  io as CompanyPage,
2849
2849
  ee as Directory,
2850
2850
  q as FilterSidebar,
2851
- Br as Footer,
2851
+ Lr as Footer,
2852
2852
  Ir as Header,
2853
2853
  H as Hero,
2854
2854
  X as InfoSidebar,
@@ -18,7 +18,7 @@
18
18
  `+se+r}}var ie=!1,q;{var Pr=typeof WeakMap=="function"?WeakMap:Map;q=new Pr}function De(r,a){if(!r||ie)return"";{var d=q.get(r);if(d!==void 0)return d}var v;ie=!0;var y=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var x;x=ne.current,ne.current=null,Mr();try{if(a){var h=function(){throw Error()};if(Object.defineProperty(h.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(h,[])}catch(F){v=F}Reflect.construct(r,[],h)}else{try{h.call()}catch(F){v=F}r.call(h.prototype)}}else{try{throw Error()}catch(F){v=F}r()}}catch(F){if(F&&v&&typeof F.stack=="string"){for(var m=F.stack.split(`
19
19
  `),E=v.stack.split(`
20
20
  `),S=m.length-1,C=E.length-1;S>=1&&C>=0&&m[S]!==E[C];)C--;for(;S>=1&&C>=0;S--,C--)if(m[S]!==E[C]){if(S!==1||C!==1)do if(S--,C--,C<0||m[S]!==E[C]){var I=`
21
- `+m[S].replace(" at new "," at ");return r.displayName&&I.includes("<anonymous>")&&(I=I.replace("<anonymous>",r.displayName)),typeof r=="function"&&q.set(r,I),I}while(S>=1&&C>=0);break}}}finally{ie=!1,ne.current=x,Dr(),Error.prepareStackTrace=y}var $=r?r.displayName||r.name:"",A=$?Z($):"";return typeof r=="function"&&q.set(r,A),A}function zr(r,a,d){return De(r,!1)}function Ar(r){var a=r.prototype;return!!(a&&a.isReactComponent)}function ee(r,a,d){if(r==null)return"";if(typeof r=="function")return De(r,Ar(r));if(typeof r=="string")return Z(r);switch(r){case w:return Z("Suspense");case g:return Z("SuspenseList")}if(typeof r=="object")switch(r.$$typeof){case f:return zr(r.render);case b:return ee(r.type,a,d);case k:{var v=r,y=v._payload,x=v._init;try{return ee(x(y),a,d)}catch{}}}return""}var G=Object.prototype.hasOwnProperty,Pe={},ze=N.ReactDebugCurrentFrame;function re(r){if(r){var a=r._owner,d=ee(r.type,r._source,a?a.type:null);ze.setExtraStackFrame(d)}else ze.setExtraStackFrame(null)}function Wr(r,a,d,v,y){{var x=Function.call.bind(G);for(var h in r)if(x(r,h)){var m=void 0;try{if(typeof r[h]!="function"){var E=Error((v||"React class")+": "+d+" type `"+h+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[h]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw E.name="Invariant Violation",E}m=r[h](a,h,v,d,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(S){m=S}m&&!(m instanceof Error)&&(re(y),R("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",v||"React class",d,h,typeof m),re(null)),m instanceof Error&&!(m.message in Pe)&&(Pe[m.message]=!0,re(y),R("Failed %s type: %s",d,m.message),re(null))}}}var Br=Array.isArray;function le(r){return Br(r)}function Lr(r){{var a=typeof Symbol=="function"&&Symbol.toStringTag,d=a&&r[Symbol.toStringTag]||r.constructor.name||"Object";return d}}function Or(r){try{return Ae(r),!1}catch{return!0}}function Ae(r){return""+r}function We(r){if(Or(r))return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Lr(r)),Ae(r)}var Be=N.ReactCurrentOwner,Yr={key:!0,ref:!0,__self:!0,__source:!0},Le,Oe;function Nr(r){if(G.call(r,"ref")){var a=Object.getOwnPropertyDescriptor(r,"ref").get;if(a&&a.isReactWarning)return!1}return r.ref!==void 0}function Ur(r){if(G.call(r,"key")){var a=Object.getOwnPropertyDescriptor(r,"key").get;if(a&&a.isReactWarning)return!1}return r.key!==void 0}function $r(r,a){typeof r.ref=="string"&&Be.current}function Hr(r,a){{var d=function(){Le||(Le=!0,R("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",a))};d.isReactWarning=!0,Object.defineProperty(r,"key",{get:d,configurable:!0})}}function Vr(r,a){{var d=function(){Oe||(Oe=!0,R("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",a))};d.isReactWarning=!0,Object.defineProperty(r,"ref",{get:d,configurable:!0})}}var Xr=function(r,a,d,v,y,x,h){var m={$$typeof:t,type:r,key:a,ref:d,props:h,_owner:x};return m._store={},Object.defineProperty(m._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(m,"_self",{configurable:!1,enumerable:!1,writable:!1,value:v}),Object.defineProperty(m,"_source",{configurable:!1,enumerable:!1,writable:!1,value:y}),Object.freeze&&(Object.freeze(m.props),Object.freeze(m)),m};function Jr(r,a,d,v,y){{var x,h={},m=null,E=null;d!==void 0&&(We(d),m=""+d),Ur(a)&&(We(a.key),m=""+a.key),Nr(a)&&(E=a.ref,$r(a,y));for(x in a)G.call(a,x)&&!Yr.hasOwnProperty(x)&&(h[x]=a[x]);if(r&&r.defaultProps){var S=r.defaultProps;for(x in S)h[x]===void 0&&(h[x]=S[x])}if(m||E){var C=typeof r=="function"?r.displayName||r.name||"Unknown":r;m&&Hr(h,C),E&&Vr(h,C)}return Xr(r,m,E,y,v,Be.current,h)}}var ce=N.ReactCurrentOwner,Ye=N.ReactDebugCurrentFrame;function U(r){if(r){var a=r._owner,d=ee(r.type,r._source,a?a.type:null);Ye.setExtraStackFrame(d)}else Ye.setExtraStackFrame(null)}var de;de=!1;function ue(r){return typeof r=="object"&&r!==null&&r.$$typeof===t}function Ne(){{if(ce.current){var r=P(ce.current.type);if(r)return`
21
+ `+m[S].replace(" at new "," at ");return r.displayName&&I.includes("<anonymous>")&&(I=I.replace("<anonymous>",r.displayName)),typeof r=="function"&&q.set(r,I),I}while(S>=1&&C>=0);break}}}finally{ie=!1,ne.current=x,Dr(),Error.prepareStackTrace=y}var $=r?r.displayName||r.name:"",A=$?Z($):"";return typeof r=="function"&&q.set(r,A),A}function zr(r,a,d){return De(r,!1)}function Ar(r){var a=r.prototype;return!!(a&&a.isReactComponent)}function ee(r,a,d){if(r==null)return"";if(typeof r=="function")return De(r,Ar(r));if(typeof r=="string")return Z(r);switch(r){case w:return Z("Suspense");case g:return Z("SuspenseList")}if(typeof r=="object")switch(r.$$typeof){case f:return zr(r.render);case b:return ee(r.type,a,d);case k:{var v=r,y=v._payload,x=v._init;try{return ee(x(y),a,d)}catch{}}}return""}var G=Object.prototype.hasOwnProperty,Pe={},ze=N.ReactDebugCurrentFrame;function re(r){if(r){var a=r._owner,d=ee(r.type,r._source,a?a.type:null);ze.setExtraStackFrame(d)}else ze.setExtraStackFrame(null)}function Wr(r,a,d,v,y){{var x=Function.call.bind(G);for(var h in r)if(x(r,h)){var m=void 0;try{if(typeof r[h]!="function"){var E=Error((v||"React class")+": "+d+" type `"+h+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[h]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw E.name="Invariant Violation",E}m=r[h](a,h,v,d,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(S){m=S}m&&!(m instanceof Error)&&(re(y),R("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",v||"React class",d,h,typeof m),re(null)),m instanceof Error&&!(m.message in Pe)&&(Pe[m.message]=!0,re(y),R("Failed %s type: %s",d,m.message),re(null))}}}var Br=Array.isArray;function le(r){return Br(r)}function Or(r){{var a=typeof Symbol=="function"&&Symbol.toStringTag,d=a&&r[Symbol.toStringTag]||r.constructor.name||"Object";return d}}function Lr(r){try{return Ae(r),!1}catch{return!0}}function Ae(r){return""+r}function We(r){if(Lr(r))return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Or(r)),Ae(r)}var Be=N.ReactCurrentOwner,Yr={key:!0,ref:!0,__self:!0,__source:!0},Oe,Le;function Nr(r){if(G.call(r,"ref")){var a=Object.getOwnPropertyDescriptor(r,"ref").get;if(a&&a.isReactWarning)return!1}return r.ref!==void 0}function Ur(r){if(G.call(r,"key")){var a=Object.getOwnPropertyDescriptor(r,"key").get;if(a&&a.isReactWarning)return!1}return r.key!==void 0}function $r(r,a){typeof r.ref=="string"&&Be.current}function Hr(r,a){{var d=function(){Oe||(Oe=!0,R("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",a))};d.isReactWarning=!0,Object.defineProperty(r,"key",{get:d,configurable:!0})}}function Vr(r,a){{var d=function(){Le||(Le=!0,R("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",a))};d.isReactWarning=!0,Object.defineProperty(r,"ref",{get:d,configurable:!0})}}var Xr=function(r,a,d,v,y,x,h){var m={$$typeof:t,type:r,key:a,ref:d,props:h,_owner:x};return m._store={},Object.defineProperty(m._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(m,"_self",{configurable:!1,enumerable:!1,writable:!1,value:v}),Object.defineProperty(m,"_source",{configurable:!1,enumerable:!1,writable:!1,value:y}),Object.freeze&&(Object.freeze(m.props),Object.freeze(m)),m};function Jr(r,a,d,v,y){{var x,h={},m=null,E=null;d!==void 0&&(We(d),m=""+d),Ur(a)&&(We(a.key),m=""+a.key),Nr(a)&&(E=a.ref,$r(a,y));for(x in a)G.call(a,x)&&!Yr.hasOwnProperty(x)&&(h[x]=a[x]);if(r&&r.defaultProps){var S=r.defaultProps;for(x in S)h[x]===void 0&&(h[x]=S[x])}if(m||E){var C=typeof r=="function"?r.displayName||r.name||"Unknown":r;m&&Hr(h,C),E&&Vr(h,C)}return Xr(r,m,E,y,v,Be.current,h)}}var ce=N.ReactCurrentOwner,Ye=N.ReactDebugCurrentFrame;function U(r){if(r){var a=r._owner,d=ee(r.type,r._source,a?a.type:null);Ye.setExtraStackFrame(d)}else Ye.setExtraStackFrame(null)}var de;de=!1;function ue(r){return typeof r=="object"&&r!==null&&r.$$typeof===t}function Ne(){{if(ce.current){var r=P(ce.current.type);if(r)return`
22
22
 
23
23
  Check the render method of \``+r+"`."}return""}}function Kr(r){return""}var Ue={};function Gr(r){{var a=Ne();if(!a){var d=typeof r=="string"?r:r.displayName||r.name;d&&(a=`
24
24
 
@@ -73,4 +73,4 @@ React keys must be passed directly to JSX without using spread:
73
73
  margin-top: auto;
74
74
  }
75
75
  }
76
- `}),e.jsx("div",{className:"mobile-ad-banner",children:e.jsx("div",{"data-ad-slot":"mobile-banner",style:{width:"100%",maxWidth:468,height:60,margin:"0 auto",backgroundColor:"var(--secondary-color)",border:"2px dashed var(--border-color)",borderRadius:"4px",display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"var(--font-sans)",fontSize:"0.8rem",color:"var(--text-color)",opacity:.6},children:"Ad (468×60)"})})]});function be(o){const[t,s]=j.useState(()=>{if(typeof window>"u")return!1;const n=localStorage.getItem("theme-mode");return n?n==="dark":o.theme.defaultTheme==="dark"?!0:o.theme.defaultTheme==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches:!1});j.useEffect(()=>{je(o.theme)},[o.theme]),j.useEffect(()=>{document.body.classList.toggle("dark-mode",t),localStorage.setItem("theme-mode",t?"dark":"light")},[t]);const i=j.useCallback(()=>{s(n=>!n)},[]);return{darkMode:t,toggleDarkMode:i}}function je(o){const t=document.documentElement;t.style.setProperty("--primary-color",o.primaryColor),t.style.setProperty("--secondary-color",o.secondaryColor),t.style.setProperty("--accent-color",o.accentColor),o.surfaceLight&&t.style.setProperty("--surface-light",o.surfaceLight),o.surfaceDark&&t.style.setProperty("--surface-dark",o.surfaceDark),o.textLight&&t.style.setProperty("--text-light",o.textLight),o.textDark&&t.style.setProperty("--text-dark",o.textDark)}const W=({brand:o,children:t,onAccountClick:s,onNotificationClick:i})=>{const{darkMode:n,toggleDarkMode:l}=be(o);return e.jsxs("div",{className:"shell",style:{display:"flex",flexDirection:"column",minHeight:"100vh"},children:[e.jsx(he,{brand:o,darkMode:n,onThemeToggle:l,onAccountClick:s,onNotificationClick:i}),e.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:[e.jsx("main",{style:{flex:1,backgroundColor:"var(--bg-color)"},children:t}),e.jsx(xe,{})]}),e.jsx(ye,{copyrightBrand:o.footer.copyrightBrand,yearCreated:o.footer.yearCreated,poweredBy:o.footer.poweredBy})]})},B=({title:o,subtitle:t,breadcrumbs:s,score:i})=>e.jsxs("section",{style:{backgroundColor:"var(--secondary-color)",padding:"var(--space-lg) var(--space-lg)",textAlign:"center",borderBottom:"4px solid var(--accent-color)"},children:[s&&s.length>0&&e.jsx("nav",{style:{marginBottom:"var(--space-md)",display:"flex",justifyContent:"center",gap:"var(--space-sm)",fontFamily:"var(--font-sans)",fontSize:"0.9rem",fontWeight:600},children:s.map((n,l)=>e.jsxs(j.Fragment,{children:[l>0&&e.jsx("span",{style:{color:"var(--surface-light)",opacity:.4},children:"/"}),n.path?e.jsx("a",{href:n.path,style:{color:"var(--accent-color)",textDecoration:"none"},children:n.label}):e.jsx("span",{style:{color:"var(--surface-light)",opacity:.8},children:n.label})]},n.label))}),e.jsx("h1",{style:{margin:0,fontFamily:"var(--font-serif)",fontSize:"clamp(2rem, 5vw, 3.5rem)",fontWeight:700,color:"var(--text-dark)",letterSpacing:"0.02em"},children:o}),t&&e.jsx("p",{style:{margin:"var(--space-sm) 0 0",fontFamily:"var(--font-sans)",fontSize:"1.1rem",color:"var(--text-dark)",opacity:.8},children:t}),i&&e.jsxs("div",{style:{marginTop:"var(--space-md)",display:"inline-flex",flexDirection:"column",alignItems:"center",gap:"var(--space-xs)"},children:[e.jsxs("div",{style:{backgroundColor:"var(--accent-color)",color:"white",padding:"var(--space-sm) var(--space-lg)",borderRadius:"var(--radius-full)",fontFamily:"var(--font-sans)",fontWeight:700,fontSize:"1.5rem",display:"flex",alignItems:"center",gap:"var(--space-sm)",boxShadow:"var(--shadow-md)"},children:[e.jsx("span",{children:i.value}),e.jsx("span",{style:{fontSize:"0.9rem",fontWeight:500},children:i.label})]}),i.betaDisclaimer&&e.jsx("span",{style:{fontFamily:"var(--font-sans)",fontSize:"0.75rem",color:"var(--text-dark)",opacity:.6,fontStyle:"italic"},children:"Score algorithm is a work in progress"})]})]}),_={violations:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--warning-color)",strokeWidth:"2",children:[e.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),e.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),e.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),injuries:e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--info-color)",strokeWidth:"2",children:e.jsx("path",{d:"M22 12h-4l-3 9L9 3l-3 9H2"})}),fatalities:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--danger-color)",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),e.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),fines:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--success-color)",strokeWidth:"2",children:[e.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"23"}),e.jsx("path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"})]}),avgFine:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--secondary-color)",strokeWidth:"2",children:[e.jsx("line",{x1:"18",y1:"20",x2:"18",y2:"10"}),e.jsx("line",{x1:"12",y1:"20",x2:"12",y2:"4"}),e.jsx("line",{x1:"6",y1:"20",x2:"6",y2:"14"})]}),trendUp:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--danger-color)",strokeWidth:"2",children:[e.jsx("polyline",{points:"23 6 13.5 15.5 8.5 10.5 1 18"}),e.jsx("polyline",{points:"17 6 23 6 23 12"})]}),trendDown:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--success-color)",strokeWidth:"2",children:[e.jsx("polyline",{points:"23 18 13.5 8.5 8.5 13.5 1 6"}),e.jsx("polyline",{points:"17 18 23 18 23 12"})]})},L=({stats:o,columns:t=4})=>{const s=[{label:"Total Events",value:o.totalEvents,icon:_.violations},o.totalCompanies!==void 0&&{label:"Companies",value:o.totalCompanies,icon:_.avgFine},o.totalCities!==void 0&&{label:"Cities",value:o.totalCities,icon:_.avgFine},o.totalStates!==void 0&&{label:"States",value:o.totalStates,icon:_.avgFine},o.totalInjuries!==void 0&&{label:"Injuries",value:o.totalInjuries,icon:_.injuries},o.totalFatalities!==void 0&&{label:"Fatalities",value:o.totalFatalities,icon:_.fatalities},o.totalFines!==void 0&&{label:"Total Fines",value:ke(o.totalFines),icon:_.fines},o.avgFines!==void 0&&{label:"Avg Fine",value:ke(o.avgFines),icon:_.avgFine},o.trend&&{label:"YoY Change",value:`${o.trend.direction==="up"?"↑":o.trend.direction==="down"?"↓":"→"} ${o.trend.percentage}%`,icon:o.trend.direction==="down"?_.trendDown:_.trendUp}].filter(Boolean);return e.jsx("section",{style:{marginBottom:"var(--space-lg)"},children:e.jsx("div",{className:"stat-grid",style:{display:"grid",gridTemplateColumns:`repeat(${t}, 1fr)`,gap:"var(--space-md)"},children:s.map(i=>e.jsx(gr,{...i},i.label))})})},gr=({label:o,value:t,icon:s})=>e.jsxs("div",{style:{padding:"var(--space-lg)",borderRadius:"var(--radius-md)",backgroundColor:"var(--bg-color)",border:"2px solid var(--border-color)",display:"flex",alignItems:"center",gap:"var(--space-md)",transition:"transform var(--transition-fast), box-shadow var(--transition-fast)",cursor:"default"},onMouseEnter:i=>{i.currentTarget.style.transform="translateY(-2px)",i.currentTarget.style.boxShadow="var(--shadow-md)"},onMouseLeave:i=>{i.currentTarget.style.transform="translateY(0)",i.currentTarget.style.boxShadow="none"},children:[e.jsx("span",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:s}),e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--font-sans)",fontWeight:700,fontSize:"1.5rem",color:"var(--primary-color)"},children:typeof t=="number"?t.toLocaleString():t}),e.jsx("div",{style:{fontFamily:"var(--font-sans)",fontSize:"0.9rem",color:"var(--text-color)",opacity:.8},children:o})]})]});function ke(o){return o>=1e6?`$${(o/1e6).toFixed(1)}M`:o>=1e3?`$${(o/1e3).toFixed(0)}K`:`$${o.toLocaleString()}`}const X=({title:o,items:t,basePath:s,emptyMessage:i="No items found",showSearch:n=!0,initialLimit:l=30})=>{const[c,u]=j.useState(""),[f,w]=j.useState(!1),g=t.filter(T=>T.name.toLowerCase().includes(c.toLowerCase())),b=f||c.length>0,k=b?g:g.slice(0,l),D=g.length>l&&!b;return e.jsx("section",{style:{marginBottom:"var(--space-lg)"},children:e.jsxs("div",{children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"var(--space-md)",flexWrap:"wrap",gap:"var(--space-sm)"},children:[e.jsxs("h2",{style:{margin:0,fontFamily:"var(--font-serif)",fontSize:"1.5rem",color:"var(--text-color)"},children:[o,e.jsxs("span",{style:{marginLeft:"var(--space-sm)",fontSize:"1rem",opacity:.6},children:["(",t.length,")"]})]}),n&&t.length>10&&e.jsx("input",{type:"text",placeholder:"Search...",value:c,onChange:T=>u(T.target.value),style:{padding:"var(--space-sm) var(--space-md)",borderRadius:"var(--radius-md)",border:"2px solid var(--border-color)",fontFamily:"var(--font-sans)",fontSize:"0.9rem",backgroundColor:"var(--bg-color)",color:"var(--text-color)",width:200}})]}),e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"var(--space-sm)",padding:"var(--space-md)",border:"2px solid var(--border-color)",borderRadius:"var(--radius-md)"},children:g.length===0?e.jsx("p",{style:{width:"100%",textAlign:"center",color:"var(--text-color)",opacity:.6,margin:0,padding:"var(--space-lg)"},children:i}):e.jsxs(e.Fragment,{children:[k.map(T=>e.jsxs("a",{href:`${s}/${T.slug}`,style:{display:"inline-flex",alignItems:"center",gap:"var(--space-xs)",padding:"var(--space-xs) var(--space-sm)",backgroundColor:"var(--bg-color)",border:"1px solid var(--border-color)",borderRadius:"var(--radius-sm)",textDecoration:"none",color:"var(--text-color)",fontFamily:"var(--font-sans)",fontSize:"0.85rem",transition:"all var(--transition-fast)",whiteSpace:"nowrap"},onMouseEnter:M=>{M.currentTarget.style.backgroundColor="var(--primary-color)",M.currentTarget.style.color="var(--surface-light)",M.currentTarget.style.borderColor="var(--primary-color)"},onMouseLeave:M=>{M.currentTarget.style.backgroundColor="var(--bg-color)",M.currentTarget.style.color="var(--text-color)",M.currentTarget.style.borderColor="var(--border-color)"},children:[e.jsx("span",{style:{fontWeight:500},children:T.name}),e.jsx("span",{title:`${T.count.toLocaleString()} incidents`,style:{backgroundColor:"var(--secondary-color)",color:"var(--surface-light)",padding:"2px 6px",borderRadius:"var(--radius-full)",fontSize:"0.75rem",fontWeight:600},children:T.count.toLocaleString()})]},T.slug)),(D||f)&&e.jsx("button",{onClick:()=>w(!f),style:{display:"inline-flex",alignItems:"center",gap:"var(--space-xs)",padding:"var(--space-xs) var(--space-sm)",backgroundColor:"var(--accent-color)",border:"none",borderRadius:"var(--radius-sm)",color:"var(--surface-light)",fontFamily:"var(--font-sans)",fontSize:"0.85rem",fontWeight:500,cursor:"pointer",transition:"all var(--transition-fast)"},onMouseEnter:T=>{T.currentTarget.style.opacity="0.8"},onMouseLeave:T=>{T.currentTarget.style.opacity="1"},children:f?"Show less":`+${g.length-l} more`})]})})]})})},J=({title:o,events:t,viewMorePath:s,showAgencyBadge:i=!1})=>t.length===0?null:e.jsx("section",{style:{marginBottom:"var(--space-lg)"},children:e.jsxs("div",{children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"var(--space-md)"},children:[e.jsx("h2",{style:{margin:0,fontFamily:"var(--font-serif)",fontSize:"1.5rem",color:"var(--text-color)"},children:o}),s&&e.jsx("a",{href:s,style:{color:"var(--accent-color)",textDecoration:"none",fontFamily:"var(--font-sans)",fontWeight:600,fontSize:"0.9rem"},children:"View More →"})]}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"var(--space-sm)"},children:t.map(n=>e.jsx(mr,{event:n,showAgencyBadge:i},n.eventId))})]})}),mr=({event:o,showAgencyBadge:t})=>e.jsx("div",{style:{padding:"var(--space-md) var(--space-lg)",border:"2px solid var(--border-color)",borderRadius:"var(--radius-md)",backgroundColor:"var(--bg-color)"},children:e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:"var(--space-md)",flexWrap:"wrap"},children:[e.jsxs("div",{style:{flex:1,minWidth:200},children:[e.jsx("h3",{style:{margin:0,fontFamily:"var(--font-sans)",fontWeight:600,fontSize:"1rem",color:"var(--text-color)"},children:o.eventTitle}),o.eventDescription&&e.jsx("p",{style:{margin:"var(--space-xs) 0 0",fontFamily:"var(--font-sans)",fontSize:"0.9rem",color:"var(--text-color)",opacity:.7,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:o.eventDescription})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:"var(--space-xs)"},children:[t&&e.jsx("span",{style:{backgroundColor:"var(--primary-color)",color:"var(--bg-color)",padding:"var(--space-xs) var(--space-sm)",borderRadius:"var(--radius-sm)",fontFamily:"var(--font-sans)",fontWeight:600,fontSize:"0.75rem",textTransform:"uppercase"},children:o.agency}),o.eventDate&&e.jsx("span",{style:{fontFamily:"var(--font-sans)",fontSize:"0.85rem",color:"var(--text-color)",opacity:.6},children:hr(o.eventDate)}),(o.city||o.state)&&e.jsx("span",{style:{fontFamily:"var(--font-sans)",fontSize:"0.85rem",color:"var(--text-color)",opacity:.6},children:[o.city,o.state].filter(Boolean).join(", ")}),o.companyName&&e.jsxs("a",{href:`/company/${o.companySlug}`,style:{fontFamily:"var(--font-sans)",fontSize:"0.85rem",color:"var(--primary-color)",textDecoration:"none",fontWeight:600,transition:"color var(--transition-fast)"},onMouseEnter:s=>s.currentTarget.style.color="var(--accent-color)",onMouseLeave:s=>s.currentTarget.style.color="var(--primary-color)",children:[o.companyName," →"]})]})]})});function hr(o){try{return new Date(o).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return o}}const ae=({position:o,width:t,height:s})=>{const i={sidebar:{width:t??280,height:s??250},"left-sidebar":{width:t??"100%",height:s??200},banner:{width:t??"100%",height:s??90},inline:{width:t??"100%",height:s??120}},{width:n,height:l}=i[o];return e.jsxs("div",{"data-ad-slot":o,style:{width:n,height:l,backgroundColor:"var(--secondary-color)",border:"2px dashed var(--border-color)",borderRadius:"var(--radius-md)",display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"var(--font-sans)",fontSize:"0.85rem",color:"var(--text-color)",opacity:.5},children:["Ad Placeholder (",o,")"]})},O=({meta:o,showAd:t=!0})=>{if(!o&&!t)return null;const s=o?[o.population&&{label:"Population",value:o.population.toLocaleString()},o.industry&&{label:"Industry",value:o.industry},o.founded&&{label:"Founded",value:o.founded},o.headquarters&&{label:"HQ",value:o.headquarters}].filter(Boolean):[];return e.jsxs("aside",{className:"page-sidebar",style:{display:"flex",flexDirection:"column",gap:"var(--space-md)"},children:[s.length>0&&e.jsxs("div",{style:{padding:"var(--space-lg)",backgroundColor:"var(--bg-color)",border:"2px solid var(--border-color)",borderRadius:"var(--radius-md)"},children:[(o==null?void 0:o.logoUrl)&&e.jsx("div",{style:{width:80,height:80,margin:"0 auto var(--space-md)",borderRadius:"var(--radius-md)",overflow:"hidden",backgroundColor:"white",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx("img",{src:o.logoUrl,alt:"",style:{maxWidth:"100%",maxHeight:"100%"}})}),(o==null?void 0:o.flagUrl)&&e.jsx("div",{style:{width:"100%",margin:"0 auto var(--space-md)",borderRadius:"var(--radius-sm)",overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid var(--border-color)"},children:e.jsx("img",{src:o.flagUrl,alt:"",style:{width:"100%",height:"auto",display:"block"}})}),e.jsx("dl",{style:{margin:0},children:s.map(({label:i,value:n})=>e.jsxs("div",{style:{padding:"var(--space-sm) 0",borderBottom:"1px solid var(--border-color)"},children:[e.jsx("dt",{style:{fontFamily:"var(--font-sans)",fontSize:"0.75rem",color:"var(--text-color)",opacity:.6,textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:"2px"},children:i}),e.jsx("dd",{style:{margin:0,fontFamily:"var(--font-sans)",fontSize:"0.9rem",fontWeight:600,color:"var(--text-color)"},children:n})]},i))})]}),t&&e.jsx(ae,{position:"sidebar"})]})},Y=({showAd:o=!0})=>e.jsxs("aside",{className:"page-filters",style:{display:"flex",flexDirection:"column",gap:"var(--space-md)"},children:[e.jsxs("div",{style:{padding:"var(--space-md)",backgroundColor:"var(--bg-color)",border:"2px solid var(--border-color)",borderRadius:"var(--radius-md)"},children:[e.jsx("h3",{style:{margin:"0 0 var(--space-md)",fontFamily:"var(--font-serif)",fontSize:"1.1rem",color:"var(--text-color)"},children:"Filters"}),e.jsxs("div",{style:{marginBottom:"var(--space-md)"},children:[e.jsx("label",{style:{display:"block",fontSize:"0.85rem",fontWeight:500,marginBottom:"var(--space-xs)",color:"var(--text-color)"},children:"Date Range"}),e.jsxs("select",{style:{width:"100%",padding:"var(--space-sm)",borderRadius:"var(--radius-sm)",border:"1px solid var(--border-color)",backgroundColor:"var(--bg-color)",color:"var(--text-color)",fontSize:"0.9rem"},children:[e.jsx("option",{children:"All Time"}),e.jsx("option",{children:"Last Year"}),e.jsx("option",{children:"Last 5 Years"}),e.jsx("option",{children:"Last 10 Years"})]})]}),e.jsxs("div",{style:{marginBottom:"var(--space-md)"},children:[e.jsx("label",{style:{display:"block",fontSize:"0.85rem",fontWeight:500,marginBottom:"var(--space-xs)",color:"var(--text-color)"},children:"Severity"}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"var(--space-xs)"},children:["All","Fatalities","Hospitalizations","Amputations"].map(t=>e.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"var(--space-xs)",fontSize:"0.85rem",cursor:"pointer"},children:[e.jsx("input",{type:"checkbox",defaultChecked:t==="All",style:{accentColor:"var(--primary-color)"}}),t]},t))})]}),e.jsxs("div",{children:[e.jsx("label",{style:{display:"block",fontSize:"0.85rem",fontWeight:500,marginBottom:"var(--space-xs)",color:"var(--text-color)"},children:"Sort By"}),e.jsxs("select",{style:{width:"100%",padding:"var(--space-sm)",borderRadius:"var(--radius-sm)",border:"1px solid var(--border-color)",backgroundColor:"var(--bg-color)",color:"var(--text-color)",fontSize:"0.9rem"},children:[e.jsx("option",{children:"Most Incidents"}),e.jsx("option",{children:"Most Recent"}),e.jsx("option",{children:"Highest Fines"}),e.jsx("option",{children:"Alphabetical"})]})]})]}),o&&e.jsx(ae,{position:"left-sidebar"})]}),yr=({brand:o,data:t,onAccountClick:s,onNotificationClick:i})=>{const n=[{label:"Explore",path:"/explore"},{label:t.name}],l=o.scoreConfig&&t.stats.score!==void 0?{value:t.stats.score,label:o.scoreConfig.name,betaDisclaimer:o.scoreConfig.betaDisclaimer}:void 0;return e.jsxs(W,{brand:o,onAccountClick:s,onNotificationClick:i,children:[e.jsx(B,{title:t.name,subtitle:o.tagline||"Explore worker safety data across the nation",breadcrumbs:n,score:l}),e.jsxs("div",{className:"page-layout",children:[e.jsx(Y,{showAd:!0}),e.jsxs("main",{className:"page-main",children:[e.jsx(L,{stats:t.stats,columns:4}),e.jsx(X,{title:"States & Territories",items:t.directory,basePath:"",initialLimit:60})]}),e.jsx(O,{meta:t.meta,showAd:!0})]})]})},xr=({brand:o,data:t,onAccountClick:s,onNotificationClick:i})=>{const n=[{label:"USA",path:"/explore"},{label:t.name}],l=o.scoreConfig&&t.stats.score!==void 0?{value:t.stats.score,label:o.scoreConfig.name,betaDisclaimer:o.scoreConfig.betaDisclaimer}:void 0,c=Object.keys(t.recentByAgency);return e.jsxs(W,{brand:o,onAccountClick:s,onNotificationClick:i,children:[e.jsx(B,{title:t.name,subtitle:`Worker safety data for ${t.name}`,breadcrumbs:n,score:l}),e.jsxs("div",{className:"page-layout",children:[e.jsx(Y,{showAd:!0}),e.jsxs("main",{className:"page-main",children:[e.jsx(L,{stats:t.stats}),e.jsx(X,{title:"Cities",items:t.directory,basePath:`/${t.slug.toLowerCase()}`}),c.map(u=>e.jsx(J,{title:`Recent ${u} Incidents`,events:t.recentByAgency[u],viewMorePath:`/${t.slug.toLowerCase()}/events/${u.toLowerCase()}`,showAgencyBadge:!1},u))]}),e.jsx(O,{meta:t.meta,showAd:!0})]})]})},br=({brand:o,data:t,onAccountClick:s,onNotificationClick:i})=>{const n=[{label:"USA",path:"/explore"},{label:t.stateName,path:`/${t.state.toLowerCase()}`},{label:t.name}],l=o.scoreConfig&&t.stats.score!==void 0?{value:t.stats.score,label:o.scoreConfig.name,betaDisclaimer:o.scoreConfig.betaDisclaimer}:void 0,c=Object.keys(t.recentByAgency),u=`/${t.state.toLowerCase()}/${t.slug}`;return e.jsxs(W,{brand:o,onAccountClick:s,onNotificationClick:i,children:[e.jsx(B,{title:`${t.name}, ${t.state}`,subtitle:`Worker safety data for ${t.name}`,breadcrumbs:n,score:l}),e.jsxs("div",{className:"page-layout",children:[e.jsx(Y,{showAd:!0}),e.jsxs("main",{className:"page-main",children:[e.jsx(L,{stats:t.stats}),e.jsx(X,{title:"Companies",items:t.directory,basePath:"/company"}),c.map(f=>e.jsx(J,{title:`Recent ${f} Incidents`,events:t.recentByAgency[f],viewMorePath:`${u}/events/${f.toLowerCase()}`,showAgencyBadge:!1},f))]}),e.jsx(O,{meta:t.meta,showAd:!0})]})]})},jr=({brand:o,data:t,onAccountClick:s,onNotificationClick:i})=>{var u;const n=[{label:"USA",path:"/explore"},{label:"Companies",path:"/companies"},{label:t.name}],l=o.scoreConfig&&t.stats.score!==void 0?{value:t.stats.score,label:o.scoreConfig.name,betaDisclaimer:o.scoreConfig.betaDisclaimer}:void 0,c=t.sites&&t.sites.length>0;return e.jsxs(W,{brand:o,onAccountClick:s,onNotificationClick:i,children:[e.jsx(B,{title:t.name,subtitle:(u=t.meta)!=null&&u.industry?`${t.meta.industry}`:void 0,breadcrumbs:n,score:l}),e.jsxs("div",{className:"page-layout",children:[e.jsx(Y,{showAd:!0}),e.jsxs("main",{className:"page-main",children:[e.jsx(L,{stats:t.stats}),c&&e.jsx(X,{title:"Locations",items:t.sites,basePath:`/company/${t.slug}/site`}),e.jsx(J,{title:"Recent Incidents",events:t.recentEvents.slice(0,c?5:10),viewMorePath:`/company/${t.slug}/events`,showAgencyBadge:!0})]}),e.jsx(O,{meta:t.meta,showAd:!0})]})]})},kr=({brand:o,data:t,onAccountClick:s,onNotificationClick:i})=>{const n=[{label:"USA",path:"/explore"},{label:"Companies",path:"/companies"},{label:t.companyName,path:`/company/${t.companySlug}`},{label:`#${t.siteId}`}],l=o.scoreConfig&&t.stats.score!==void 0?{value:t.stats.score,label:o.scoreConfig.name,betaDisclaimer:o.scoreConfig.betaDisclaimer}:void 0;return e.jsxs(W,{brand:o,onAccountClick:s,onNotificationClick:i,children:[e.jsx(B,{title:t.name,subtitle:`Location #${t.siteId} of ${t.companyName}`,breadcrumbs:n,score:l}),e.jsxs("div",{className:"page-layout",children:[e.jsx(Y,{showAd:!0}),e.jsxs("main",{className:"page-main",children:[e.jsx(L,{stats:t.stats}),t.siblings&&t.siblings.length>0&&e.jsxs("section",{style:{padding:"var(--space-lg)",backgroundColor:"var(--bg-color)",marginBottom:"var(--space-lg)",borderRadius:"var(--radius-md)",border:"1px solid var(--border-color)"},children:[e.jsx("h2",{style:{margin:"0 0 var(--space-md)",fontFamily:"var(--font-serif)",fontSize:"1.5rem",color:"var(--text-color)"},children:"Compare to Other Locations"}),e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"var(--space-sm)"},children:t.siblings.slice(0,10).map(c=>e.jsxs("a",{href:`/company/${t.companySlug}/site/${c.slug}`,style:{padding:"var(--space-sm) var(--space-md)",backgroundColor:"var(--secondary-color)",borderRadius:"var(--radius-md)",textDecoration:"none",color:"var(--text-dark)",fontFamily:"var(--font-sans)",fontSize:"0.9rem",display:"flex",alignItems:"center",gap:"var(--space-xs)",transition:"background var(--transition-fast)"},onMouseEnter:u=>u.currentTarget.style.backgroundColor="var(--accent-color)",onMouseLeave:u=>u.currentTarget.style.backgroundColor="var(--secondary-color)",children:[e.jsxs("span",{children:["#",c.name]}),e.jsx("span",{style:{backgroundColor:"var(--primary-color)",color:"var(--text-dark)",padding:"2px 6px",borderRadius:"var(--radius-sm)",fontSize:"0.75rem"},children:c.count})]},c.slug))})]}),e.jsx(J,{title:"Recent Incidents",events:t.recentEvents,viewMorePath:`/company/${t.companySlug}/site/${t.siteId}/events`,showAgencyBadge:!0})]}),e.jsx(O,{meta:t.meta,showAd:!0})]})]})};p.AdSlot=ae,p.Alert=tr,p.Badge=qe,p.Button=Ge,p.Card=Ze,p.CityPage=br,p.CompanyPage=jr,p.Directory=X,p.FilterSidebar=Y,p.Footer=ye,p.Header=he,p.Hero=B,p.InfoSidebar=O,p.Input=er,p.LoadingOverlay=sr,p.MobileAdBanner=xe,p.Modal=or,p.NationPage=yr,p.RecentEvents=J,p.Shell=W,p.SitePage=kr,p.Skeleton=te,p.SkeletonCard=ir,p.SkeletonText=me,p.Spinner=ge,p.StatGrid=L,p.StatePage=xr,p.Table=rr,p.Tabs=ar,p.Tooltip=nr,p.applyTheme=je,p.useTheme=be,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
76
+ `}),e.jsx("div",{className:"mobile-ad-banner",children:e.jsx("div",{"data-ad-slot":"mobile-banner",style:{width:"100%",maxWidth:468,height:60,margin:"0 auto",backgroundColor:"var(--secondary-color)",border:"2px dashed var(--border-color)",borderRadius:"4px",display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"var(--font-sans)",fontSize:"0.8rem",color:"var(--text-color)",opacity:.6},children:"Ad (468×60)"})})]});function be(o){const[t,s]=j.useState(()=>{if(typeof window>"u")return!1;const n=localStorage.getItem("theme-mode");return n?n==="dark":o.theme.defaultTheme==="dark"?!0:o.theme.defaultTheme==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches:!1});j.useEffect(()=>{je(o.theme)},[o.theme]),j.useEffect(()=>{document.body.classList.toggle("dark-mode",t),localStorage.setItem("theme-mode",t?"dark":"light")},[t]);const i=j.useCallback(()=>{s(n=>!n)},[]);return{darkMode:t,toggleDarkMode:i}}function je(o){const t=document.documentElement;t.style.setProperty("--primary-color",o.primaryColor),t.style.setProperty("--secondary-color",o.secondaryColor),t.style.setProperty("--accent-color",o.accentColor),o.surfaceLight&&t.style.setProperty("--surface-light",o.surfaceLight),o.surfaceDark&&t.style.setProperty("--surface-dark",o.surfaceDark),o.textLight&&t.style.setProperty("--text-light",o.textLight),o.textDark&&t.style.setProperty("--text-dark",o.textDark)}const W=({brand:o,children:t,onAccountClick:s,onNotificationClick:i})=>{const{darkMode:n,toggleDarkMode:l}=be(o);return e.jsxs("div",{className:"shell",style:{display:"flex",flexDirection:"column",minHeight:"100vh"},children:[e.jsx(he,{brand:o,darkMode:n,onThemeToggle:l,onAccountClick:s,onNotificationClick:i}),e.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:[e.jsx("main",{style:{flex:1,backgroundColor:"var(--bg-color)"},children:t}),e.jsx(xe,{})]}),e.jsx(ye,{copyrightBrand:o.footer.copyrightBrand,yearCreated:o.footer.yearCreated,poweredBy:o.footer.poweredBy})]})},B=({title:o,subtitle:t,breadcrumbs:s,score:i})=>e.jsxs("section",{style:{backgroundColor:"var(--secondary-color)",padding:"var(--space-lg) var(--space-lg)",textAlign:"center",borderBottom:"4px solid var(--accent-color)"},children:[s&&s.length>0&&e.jsx("nav",{style:{marginBottom:"var(--space-md)",display:"flex",justifyContent:"center",gap:"var(--space-sm)",fontFamily:"var(--font-sans)",fontSize:"0.9rem",fontWeight:600},children:s.map((n,l)=>e.jsxs(j.Fragment,{children:[l>0&&e.jsx("span",{style:{color:"var(--surface-light)",opacity:.4},children:"/"}),n.path?e.jsx("a",{href:n.path,style:{color:"var(--accent-color)",textDecoration:"none"},children:n.label}):e.jsx("span",{style:{color:"var(--surface-light)",opacity:.8},children:n.label})]},n.label))}),e.jsx("h1",{style:{margin:0,fontFamily:"var(--font-serif)",fontSize:"clamp(2rem, 5vw, 3.5rem)",fontWeight:700,color:"var(--text-dark)",letterSpacing:"0.02em"},children:o}),t&&e.jsx("p",{style:{margin:"var(--space-sm) 0 0",fontFamily:"var(--font-sans)",fontSize:"1.1rem",color:"var(--text-dark)",opacity:.8},children:t}),i&&e.jsxs("div",{style:{marginTop:"var(--space-md)",display:"inline-flex",flexDirection:"column",alignItems:"center",gap:"var(--space-xs)"},children:[e.jsxs("div",{style:{backgroundColor:"var(--accent-color)",color:"white",padding:"var(--space-sm) var(--space-lg)",borderRadius:"var(--radius-full)",fontFamily:"var(--font-sans)",fontWeight:700,fontSize:"1.5rem",display:"flex",alignItems:"center",gap:"var(--space-sm)",boxShadow:"var(--shadow-md)"},children:[e.jsx("span",{children:i.value}),e.jsx("span",{style:{fontSize:"0.9rem",fontWeight:500},children:i.label})]}),i.betaDisclaimer&&e.jsx("span",{style:{fontFamily:"var(--font-sans)",fontSize:"0.75rem",color:"var(--text-dark)",opacity:.6,fontStyle:"italic"},children:"Score algorithm is a work in progress"})]})]}),_={violations:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--warning-color)",strokeWidth:"2",children:[e.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),e.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),e.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),injuries:e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--info-color)",strokeWidth:"2",children:e.jsx("path",{d:"M22 12h-4l-3 9L9 3l-3 9H2"})}),fatalities:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--danger-color)",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),e.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),fines:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--success-color)",strokeWidth:"2",children:[e.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"23"}),e.jsx("path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"})]}),avgFine:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--secondary-color)",strokeWidth:"2",children:[e.jsx("line",{x1:"18",y1:"20",x2:"18",y2:"10"}),e.jsx("line",{x1:"12",y1:"20",x2:"12",y2:"4"}),e.jsx("line",{x1:"6",y1:"20",x2:"6",y2:"14"})]}),trendUp:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--danger-color)",strokeWidth:"2",children:[e.jsx("polyline",{points:"23 6 13.5 15.5 8.5 10.5 1 18"}),e.jsx("polyline",{points:"17 6 23 6 23 12"})]}),trendDown:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--success-color)",strokeWidth:"2",children:[e.jsx("polyline",{points:"23 18 13.5 8.5 8.5 13.5 1 6"}),e.jsx("polyline",{points:"17 18 23 18 23 12"})]})},O=({stats:o,columns:t=4})=>{const s=[{label:"Total Events",value:o.totalEvents,icon:_.violations},o.totalCompanies!==void 0&&{label:"Companies",value:o.totalCompanies,icon:_.avgFine},o.totalCities!==void 0&&{label:"Cities",value:o.totalCities,icon:_.avgFine},o.totalStates!==void 0&&{label:"States",value:o.totalStates,icon:_.avgFine},o.totalInjuries!==void 0&&{label:"Injuries",value:o.totalInjuries,icon:_.injuries},o.totalFatalities!==void 0&&{label:"Fatalities",value:o.totalFatalities,icon:_.fatalities},o.totalFines!==void 0&&{label:"Total Fines",value:ke(o.totalFines),icon:_.fines},o.avgFines!==void 0&&{label:"Avg Fine",value:ke(o.avgFines),icon:_.avgFine},o.trend&&{label:"YoY Change",value:`${o.trend.direction==="up"?"↑":o.trend.direction==="down"?"↓":"→"} ${o.trend.percentage}%`,icon:o.trend.direction==="down"?_.trendDown:_.trendUp}].filter(Boolean);return e.jsx("section",{style:{marginBottom:"var(--space-lg)"},children:e.jsx("div",{className:"stat-grid",style:{display:"grid",gridTemplateColumns:`repeat(${t}, 1fr)`,gap:"var(--space-md)"},children:s.map(i=>e.jsx(gr,{...i},i.label))})})},gr=({label:o,value:t,icon:s})=>e.jsxs("div",{style:{padding:"var(--space-lg)",borderRadius:"var(--radius-md)",backgroundColor:"var(--bg-color)",border:"2px solid var(--border-color)",display:"flex",alignItems:"center",gap:"var(--space-md)",transition:"transform var(--transition-fast), box-shadow var(--transition-fast)",cursor:"default"},onMouseEnter:i=>{i.currentTarget.style.transform="translateY(-2px)",i.currentTarget.style.boxShadow="var(--shadow-md)"},onMouseLeave:i=>{i.currentTarget.style.transform="translateY(0)",i.currentTarget.style.boxShadow="none"},children:[e.jsx("span",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:s}),e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--font-sans)",fontWeight:700,fontSize:"1.5rem",color:"var(--primary-color)"},children:typeof t=="number"?t.toLocaleString():t}),e.jsx("div",{style:{fontFamily:"var(--font-sans)",fontSize:"0.9rem",color:"var(--text-color)",opacity:.8},children:o})]})]});function ke(o){return o>=1e6?`$${(o/1e6).toFixed(1)}M`:o>=1e3?`$${(o/1e3).toFixed(0)}K`:`$${o.toLocaleString()}`}const X=({title:o,items:t,basePath:s,emptyMessage:i="No items found",showSearch:n=!0,initialLimit:l=30})=>{const[c,u]=j.useState(""),[f,w]=j.useState(!1),g=t.filter(T=>T.name.toLowerCase().includes(c.toLowerCase())),b=f||c.length>0,k=b?g:g.slice(0,l),D=g.length>l&&!b;return e.jsx("section",{style:{marginBottom:"var(--space-lg)"},children:e.jsxs("div",{children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"var(--space-md)",flexWrap:"wrap",gap:"var(--space-sm)"},children:[e.jsxs("h2",{style:{margin:0,fontFamily:"var(--font-serif)",fontSize:"1.5rem",color:"var(--text-color)"},children:[o,e.jsxs("span",{style:{marginLeft:"var(--space-sm)",fontSize:"1rem",opacity:.6},children:["(",t.length,")"]})]}),n&&t.length>10&&e.jsx("input",{type:"text",placeholder:"Search...",value:c,onChange:T=>u(T.target.value),style:{padding:"var(--space-sm) var(--space-md)",borderRadius:"var(--radius-md)",border:"2px solid var(--border-color)",fontFamily:"var(--font-sans)",fontSize:"0.9rem",backgroundColor:"var(--bg-color)",color:"var(--text-color)",width:200}})]}),e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"var(--space-sm)",padding:"var(--space-md)",border:"2px solid var(--border-color)",borderRadius:"var(--radius-md)"},children:g.length===0?e.jsx("p",{style:{width:"100%",textAlign:"center",color:"var(--text-color)",opacity:.6,margin:0,padding:"var(--space-lg)"},children:i}):e.jsxs(e.Fragment,{children:[k.map(T=>e.jsxs("a",{href:`${s}/${T.slug}`,style:{display:"inline-flex",alignItems:"center",gap:"var(--space-xs)",padding:"var(--space-xs) var(--space-sm)",backgroundColor:"var(--bg-color)",border:"1px solid var(--border-color)",borderRadius:"var(--radius-sm)",textDecoration:"none",color:"var(--text-color)",fontFamily:"var(--font-sans)",fontSize:"0.85rem",transition:"all var(--transition-fast)",whiteSpace:"nowrap"},onMouseEnter:M=>{M.currentTarget.style.backgroundColor="var(--primary-color)",M.currentTarget.style.color="var(--surface-light)",M.currentTarget.style.borderColor="var(--primary-color)"},onMouseLeave:M=>{M.currentTarget.style.backgroundColor="var(--bg-color)",M.currentTarget.style.color="var(--text-color)",M.currentTarget.style.borderColor="var(--border-color)"},children:[e.jsx("span",{style:{fontWeight:500},children:T.name}),e.jsx("span",{title:`${T.count.toLocaleString()} incidents`,style:{backgroundColor:"var(--secondary-color)",color:"var(--surface-light)",padding:"2px 6px",borderRadius:"var(--radius-full)",fontSize:"0.75rem",fontWeight:600},children:T.count.toLocaleString()})]},T.slug)),(D||f)&&e.jsx("button",{onClick:()=>w(!f),style:{display:"inline-flex",alignItems:"center",gap:"var(--space-xs)",padding:"var(--space-xs) var(--space-sm)",backgroundColor:"var(--accent-color)",border:"none",borderRadius:"var(--radius-sm)",color:"var(--surface-light)",fontFamily:"var(--font-sans)",fontSize:"0.85rem",fontWeight:500,cursor:"pointer",transition:"all var(--transition-fast)"},onMouseEnter:T=>{T.currentTarget.style.opacity="0.8"},onMouseLeave:T=>{T.currentTarget.style.opacity="1"},children:f?"Show less":`+${g.length-l} more`})]})})]})})},J=({title:o,events:t,viewMorePath:s,showAgencyBadge:i=!1})=>t.length===0?null:e.jsx("section",{style:{marginBottom:"var(--space-lg)"},children:e.jsxs("div",{children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"var(--space-md)"},children:[e.jsx("h2",{style:{margin:0,fontFamily:"var(--font-serif)",fontSize:"1.5rem",color:"var(--text-color)"},children:o}),s&&e.jsx("a",{href:s,style:{color:"var(--accent-color)",textDecoration:"none",fontFamily:"var(--font-sans)",fontWeight:600,fontSize:"0.9rem"},children:"View More →"})]}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"var(--space-sm)"},children:t.map(n=>e.jsx(mr,{event:n,showAgencyBadge:i},n.eventId))})]})}),mr=({event:o,showAgencyBadge:t})=>e.jsx("div",{style:{padding:"var(--space-md) var(--space-lg)",border:"2px solid var(--border-color)",borderRadius:"var(--radius-md)",backgroundColor:"var(--bg-color)"},children:e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:"var(--space-md)",flexWrap:"wrap"},children:[e.jsxs("div",{style:{flex:1,minWidth:200},children:[e.jsx("h3",{style:{margin:0,fontFamily:"var(--font-sans)",fontWeight:600,fontSize:"1rem",color:"var(--text-color)"},children:o.eventTitle}),o.eventDescription&&e.jsx("p",{style:{margin:"var(--space-xs) 0 0",fontFamily:"var(--font-sans)",fontSize:"0.9rem",color:"var(--text-color)",opacity:.7,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:o.eventDescription})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:"var(--space-xs)"},children:[t&&e.jsx("span",{style:{backgroundColor:"var(--primary-color)",color:"var(--bg-color)",padding:"var(--space-xs) var(--space-sm)",borderRadius:"var(--radius-sm)",fontFamily:"var(--font-sans)",fontWeight:600,fontSize:"0.75rem",textTransform:"uppercase"},children:o.agency}),o.eventDate&&e.jsx("span",{style:{fontFamily:"var(--font-sans)",fontSize:"0.85rem",color:"var(--text-color)",opacity:.6},children:hr(o.eventDate)}),(o.city||o.state)&&e.jsx("span",{style:{fontFamily:"var(--font-sans)",fontSize:"0.85rem",color:"var(--text-color)",opacity:.6},children:[o.city,o.state].filter(Boolean).join(", ")}),o.companyName&&e.jsxs("a",{href:`/company/${o.companySlug}`,style:{fontFamily:"var(--font-sans)",fontSize:"0.85rem",color:"var(--primary-color)",textDecoration:"none",fontWeight:600,transition:"color var(--transition-fast)"},onMouseEnter:s=>s.currentTarget.style.color="var(--accent-color)",onMouseLeave:s=>s.currentTarget.style.color="var(--primary-color)",children:[o.companyName," →"]})]})]})});function hr(o){try{return new Date(o).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return o}}const ae=({position:o,width:t,height:s})=>{const i={sidebar:{width:t??280,height:s??250},"left-sidebar":{width:t??"100%",height:s??200},banner:{width:t??"100%",height:s??90},inline:{width:t??"100%",height:s??120}},{width:n,height:l}=i[o];return e.jsxs("div",{"data-ad-slot":o,style:{width:n,height:l,backgroundColor:"var(--secondary-color)",border:"2px dashed var(--border-color)",borderRadius:"var(--radius-md)",display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"var(--font-sans)",fontSize:"0.85rem",color:"var(--text-color)",opacity:.5},children:["Ad Placeholder (",o,")"]})},L=({meta:o,showAd:t=!0})=>{if(!o&&!t)return null;const s=o?[o.population&&{label:"Population",value:o.population.toLocaleString()},o.industry&&{label:"Industry",value:o.industry},o.founded&&{label:"Founded",value:o.founded},o.headquarters&&{label:"HQ",value:o.headquarters}].filter(Boolean):[];return e.jsxs("aside",{className:"page-sidebar",style:{display:"flex",flexDirection:"column",gap:"var(--space-md)"},children:[s.length>0&&e.jsxs("div",{style:{padding:"var(--space-lg)",backgroundColor:"var(--bg-color)",border:"2px solid var(--border-color)",borderRadius:"var(--radius-md)"},children:[(o==null?void 0:o.logoUrl)&&e.jsx("div",{style:{width:80,height:80,margin:"0 auto var(--space-md)",borderRadius:"var(--radius-md)",overflow:"hidden",backgroundColor:"white",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx("img",{src:o.logoUrl,alt:"",style:{maxWidth:"100%",maxHeight:"100%"}})}),(o==null?void 0:o.flagUrl)&&e.jsx("div",{style:{width:"100%",margin:"0 auto var(--space-md)",borderRadius:"var(--radius-sm)",overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid var(--border-color)"},children:e.jsx("img",{src:o.flagUrl,alt:"",style:{width:"100%",height:"auto",display:"block"}})}),e.jsx("dl",{style:{margin:0},children:s.map(({label:i,value:n})=>e.jsxs("div",{style:{padding:"var(--space-sm) 0",borderBottom:"1px solid var(--border-color)"},children:[e.jsx("dt",{style:{fontFamily:"var(--font-sans)",fontSize:"0.75rem",color:"var(--text-color)",opacity:.6,textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:"2px"},children:i}),e.jsx("dd",{style:{margin:0,fontFamily:"var(--font-sans)",fontSize:"0.9rem",fontWeight:600,color:"var(--text-color)"},children:n})]},i))})]}),t&&e.jsx(ae,{position:"sidebar"})]})},Y=({showAd:o=!0})=>e.jsxs("aside",{className:"page-filters",style:{display:"flex",flexDirection:"column",gap:"var(--space-md)"},children:[e.jsxs("div",{style:{padding:"var(--space-md)",backgroundColor:"var(--bg-color)",border:"2px solid var(--border-color)",borderRadius:"var(--radius-md)"},children:[e.jsx("h3",{style:{margin:"0 0 var(--space-md)",fontFamily:"var(--font-serif)",fontSize:"1.1rem",color:"var(--text-color)"},children:"Filters"}),e.jsxs("div",{style:{marginBottom:"var(--space-md)"},children:[e.jsx("label",{style:{display:"block",fontSize:"0.85rem",fontWeight:500,marginBottom:"var(--space-xs)",color:"var(--text-color)"},children:"Date Range"}),e.jsxs("select",{style:{width:"100%",padding:"var(--space-sm)",borderRadius:"var(--radius-sm)",border:"1px solid var(--border-color)",backgroundColor:"var(--bg-color)",color:"var(--text-color)",fontSize:"0.9rem"},children:[e.jsx("option",{children:"All Time"}),e.jsx("option",{children:"Last Year"}),e.jsx("option",{children:"Last 5 Years"}),e.jsx("option",{children:"Last 10 Years"})]})]}),e.jsxs("div",{style:{marginBottom:"var(--space-md)"},children:[e.jsx("label",{style:{display:"block",fontSize:"0.85rem",fontWeight:500,marginBottom:"var(--space-xs)",color:"var(--text-color)"},children:"Severity"}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"var(--space-xs)"},children:["All","Fatalities","Hospitalizations","Amputations"].map(t=>e.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"var(--space-xs)",fontSize:"0.85rem",cursor:"pointer"},children:[e.jsx("input",{type:"checkbox",defaultChecked:t==="All",style:{accentColor:"var(--primary-color)"}}),t]},t))})]}),e.jsxs("div",{children:[e.jsx("label",{style:{display:"block",fontSize:"0.85rem",fontWeight:500,marginBottom:"var(--space-xs)",color:"var(--text-color)"},children:"Sort By"}),e.jsxs("select",{style:{width:"100%",padding:"var(--space-sm)",borderRadius:"var(--radius-sm)",border:"1px solid var(--border-color)",backgroundColor:"var(--bg-color)",color:"var(--text-color)",fontSize:"0.9rem"},children:[e.jsx("option",{children:"Most Incidents"}),e.jsx("option",{children:"Most Recent"}),e.jsx("option",{children:"Highest Fines"}),e.jsx("option",{children:"Alphabetical"})]})]})]}),o&&e.jsx(ae,{position:"left-sidebar"})]}),yr=({brand:o,data:t,onAccountClick:s,onNotificationClick:i})=>{const n=[{label:"Explore",path:"/explore"},{label:t.name}],l=o.scoreConfig&&t.stats.score!==void 0?{value:t.stats.score,label:o.scoreConfig.name,betaDisclaimer:o.scoreConfig.betaDisclaimer}:void 0;return e.jsxs(W,{brand:o,onAccountClick:s,onNotificationClick:i,children:[e.jsx(B,{title:t.name,subtitle:o.tagline||"Explore worker safety data across the nation",breadcrumbs:n,score:l}),e.jsxs("div",{className:"page-layout",children:[e.jsx(Y,{showAd:!0}),e.jsxs("main",{className:"page-main",children:[e.jsx(O,{stats:t.stats,columns:4}),e.jsx(X,{title:"States & Territories",items:t.directory,basePath:"",initialLimit:60})]}),e.jsx(L,{meta:t.meta,showAd:!0})]})]})},xr=({brand:o,data:t,onAccountClick:s,onNotificationClick:i})=>{const n=[{label:"USA",path:"/explore"},{label:t.name}],l=o.scoreConfig&&t.stats.score!==void 0?{value:t.stats.score,label:o.scoreConfig.name,betaDisclaimer:o.scoreConfig.betaDisclaimer}:void 0,c=Object.keys(t.recentByAgency);return e.jsxs(W,{brand:o,onAccountClick:s,onNotificationClick:i,children:[e.jsx(B,{title:t.name,subtitle:`Worker safety data for ${t.name}`,breadcrumbs:n,score:l}),e.jsxs("div",{className:"page-layout",children:[e.jsx(Y,{showAd:!0}),e.jsxs("main",{className:"page-main",children:[e.jsx(O,{stats:t.stats}),e.jsx(X,{title:"Cities",items:t.directory,basePath:"/city"}),c.map(u=>e.jsx(J,{title:`Recent ${u} Incidents`,events:t.recentByAgency[u],viewMorePath:`/${t.slug.toLowerCase()}/events/${u.toLowerCase()}`,showAgencyBadge:!1},u))]}),e.jsx(L,{meta:t.meta,showAd:!0})]})]})},br=({brand:o,data:t,onAccountClick:s,onNotificationClick:i})=>{const n=[{label:"USA",path:"/explore"},{label:t.stateName,path:`/${t.state.toLowerCase()}`},{label:t.name}],l=o.scoreConfig&&t.stats.score!==void 0?{value:t.stats.score,label:o.scoreConfig.name,betaDisclaimer:o.scoreConfig.betaDisclaimer}:void 0,c=Object.keys(t.recentByAgency),u=`/${t.state.toLowerCase()}/${t.slug}`;return e.jsxs(W,{brand:o,onAccountClick:s,onNotificationClick:i,children:[e.jsx(B,{title:`${t.name}, ${t.state}`,subtitle:`Worker safety data for ${t.name}`,breadcrumbs:n,score:l}),e.jsxs("div",{className:"page-layout",children:[e.jsx(Y,{showAd:!0}),e.jsxs("main",{className:"page-main",children:[e.jsx(O,{stats:t.stats}),e.jsx(X,{title:"Companies",items:t.directory,basePath:"/company"}),c.map(f=>e.jsx(J,{title:`Recent ${f} Incidents`,events:t.recentByAgency[f],viewMorePath:`${u}/events/${f.toLowerCase()}`,showAgencyBadge:!1},f))]}),e.jsx(L,{meta:t.meta,showAd:!0})]})]})},jr=({brand:o,data:t,onAccountClick:s,onNotificationClick:i})=>{var u;const n=[{label:"USA",path:"/explore"},{label:"Companies",path:"/companies"},{label:t.name}],l=o.scoreConfig&&t.stats.score!==void 0?{value:t.stats.score,label:o.scoreConfig.name,betaDisclaimer:o.scoreConfig.betaDisclaimer}:void 0,c=t.sites&&t.sites.length>0;return e.jsxs(W,{brand:o,onAccountClick:s,onNotificationClick:i,children:[e.jsx(B,{title:t.name,subtitle:(u=t.meta)!=null&&u.industry?`${t.meta.industry}`:void 0,breadcrumbs:n,score:l}),e.jsxs("div",{className:"page-layout",children:[e.jsx(Y,{showAd:!0}),e.jsxs("main",{className:"page-main",children:[e.jsx(O,{stats:t.stats}),c&&e.jsx(X,{title:"Locations",items:t.sites,basePath:`/company/${t.slug}/site`}),e.jsx(J,{title:"Recent Incidents",events:t.recentEvents.slice(0,c?5:10),viewMorePath:`/company/${t.slug}/events`,showAgencyBadge:!0})]}),e.jsx(L,{meta:t.meta,showAd:!0})]})]})},kr=({brand:o,data:t,onAccountClick:s,onNotificationClick:i})=>{const n=[{label:"USA",path:"/explore"},{label:"Companies",path:"/companies"},{label:t.companyName,path:`/company/${t.companySlug}`},{label:`#${t.siteId}`}],l=o.scoreConfig&&t.stats.score!==void 0?{value:t.stats.score,label:o.scoreConfig.name,betaDisclaimer:o.scoreConfig.betaDisclaimer}:void 0;return e.jsxs(W,{brand:o,onAccountClick:s,onNotificationClick:i,children:[e.jsx(B,{title:t.name,subtitle:`Location #${t.siteId} of ${t.companyName}`,breadcrumbs:n,score:l}),e.jsxs("div",{className:"page-layout",children:[e.jsx(Y,{showAd:!0}),e.jsxs("main",{className:"page-main",children:[e.jsx(O,{stats:t.stats}),t.siblings&&t.siblings.length>0&&e.jsxs("section",{style:{padding:"var(--space-lg)",backgroundColor:"var(--bg-color)",marginBottom:"var(--space-lg)",borderRadius:"var(--radius-md)",border:"1px solid var(--border-color)"},children:[e.jsx("h2",{style:{margin:"0 0 var(--space-md)",fontFamily:"var(--font-serif)",fontSize:"1.5rem",color:"var(--text-color)"},children:"Compare to Other Locations"}),e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"var(--space-sm)"},children:t.siblings.slice(0,10).map(c=>e.jsxs("a",{href:`/company/${t.companySlug}/site/${c.slug}`,style:{padding:"var(--space-sm) var(--space-md)",backgroundColor:"var(--secondary-color)",borderRadius:"var(--radius-md)",textDecoration:"none",color:"var(--text-dark)",fontFamily:"var(--font-sans)",fontSize:"0.9rem",display:"flex",alignItems:"center",gap:"var(--space-xs)",transition:"background var(--transition-fast)"},onMouseEnter:u=>u.currentTarget.style.backgroundColor="var(--accent-color)",onMouseLeave:u=>u.currentTarget.style.backgroundColor="var(--secondary-color)",children:[e.jsxs("span",{children:["#",c.name]}),e.jsx("span",{style:{backgroundColor:"var(--primary-color)",color:"var(--text-dark)",padding:"2px 6px",borderRadius:"var(--radius-sm)",fontSize:"0.75rem"},children:c.count})]},c.slug))})]}),e.jsx(J,{title:"Recent Incidents",events:t.recentEvents,viewMorePath:`/company/${t.companySlug}/site/${t.siteId}/events`,showAgencyBadge:!0})]}),e.jsx(L,{meta:t.meta,showAd:!0})]})]})};p.AdSlot=ae,p.Alert=tr,p.Badge=qe,p.Button=Ge,p.Card=Ze,p.CityPage=br,p.CompanyPage=jr,p.Directory=X,p.FilterSidebar=Y,p.Footer=ye,p.Header=he,p.Hero=B,p.InfoSidebar=L,p.Input=er,p.LoadingOverlay=sr,p.MobileAdBanner=xe,p.Modal=or,p.NationPage=yr,p.RecentEvents=J,p.Shell=W,p.SitePage=kr,p.Skeleton=te,p.SkeletonCard=ir,p.SkeletonText=me,p.Spinner=ge,p.StatGrid=O,p.StatePage=xr,p.Table=rr,p.Tabs=ar,p.Tooltip=nr,p.applyTheme=je,p.useTheme=be,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sirsluginston/sharedui",
3
- "version": "2.0.5",
3
+ "version": "2.0.6",
4
4
  "description": "Server-Driven UI component library for SirSluginston Co projects",
5
5
  "type": "module",
6
6
  "main": "dist/sharedui.js",