@infinilabs/search-results 0.0.8 → 0.0.10

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/README.md CHANGED
@@ -198,7 +198,7 @@ import SearchResults, {
198
198
  type SearchResultsProps
199
199
  } from "@infinilabs/search-results";
200
200
 
201
- export default function Demo({ data }: { data: Array<SearchResultsProps[\"section\"]> }) {
201
+ export default function Demo({ data }: { data: Array<SearchResultsProps["section"]> }) {
202
202
  return (
203
203
  <div className="space-y-10">
204
204
  {data.map((section, index) => {
@@ -255,11 +255,43 @@ import type { SearchResultsProps } from "@infinilabs/search-results";
255
255
  | 参数 | 类型 | 说明 |
256
256
  |---|---|---|
257
257
  | `section` | `SearchResultsProps["section"]` | 输入数据(section / item / record / 数组) |
258
- | `className` | `string` | 根容器 class |
258
+ | `className` | `string` | 根容器 `className` |
259
+ | `theme` | `"light" \| "dark" \| "auto"` | 组件主题(可选) |
259
260
  | `footerAction` | `SearchResultsAction` | 底部“查看全部”动作(可选) |
260
261
  | `onRecordClick` | `(record: SearchResultsRecord, index: number) => void` | record 输入时的点击回调 |
261
262
  | `onItemClick` | `(item: SearchResultsItem) => void` | 统一点击回调 |
262
263
 
264
+ ## 主题适配(light / dark)
265
+
266
+ 组件随包产出样式(业务侧无需安装 Tailwind)。暗色样式基于 `.dark` class 驱动(语义等同于 Tailwind `dark:` 变体)。
267
+
268
+ 你有两种接入方式:
269
+
270
+ ### 方式 1:跟随业务侧主题(推荐)
271
+
272
+ 业务侧在外层容器挂载/移除 `dark` class(例如放在页面根节点或局部容器),组件会自动跟随:
273
+
274
+ ```tsx
275
+ <div className={isDark ? "dark" : ""}>
276
+ <SearchResults section={data} />
277
+ </div>
278
+ ```
279
+
280
+ ### 方式 2:组件级主题开关
281
+
282
+ 通过 `theme` 让组件在自身根节点挂载 `dark` class(不依赖外层):
283
+
284
+ ```tsx
285
+ <SearchResults section={data} theme="light" />
286
+ <SearchResults section={data} theme="dark" />
287
+ <SearchResults section={data} theme="auto" />
288
+ ```
289
+
290
+ 说明:
291
+
292
+ - `theme="auto"` 会根据 `prefers-color-scheme` 自动选择 light/dark
293
+ - 如果业务侧把 `dark` 挂在 `html` 上,组件无法在局部“强制 light”;想局部控制请把 `dark` 放到局部容器
294
+
263
295
  ## 工具函数
264
296
 
265
297
  ```ts
@@ -271,6 +303,7 @@ import { itemsToSections, recordsToItems } from "@infinilabs/search-results";
271
303
  ```ts
272
304
  import type {
273
305
  SearchResultsAction,
306
+ SearchResultsTheme,
274
307
  SearchResultsItem,
275
308
  SearchResultsSection,
276
309
  SearchResultsRecord,
package/dist/index.d.ts CHANGED
@@ -30,6 +30,7 @@ export declare type SearchResultImageItem = SearchResultCommon & {
30
30
  imageUrl: string;
31
31
  imageAlt?: string;
32
32
  subtitle?: string;
33
+ breadcrumbs?: string[];
33
34
  onClick?: () => void;
34
35
  };
35
36
 
@@ -62,7 +63,7 @@ export declare type SearchResultMediaItem = SearchResultCommon & {
62
63
  onClick?: () => void;
63
64
  };
64
65
 
65
- declare function SearchResults({ section, className, footerAction, onRecordClick, onItemClick }: SearchResultsProps): JSX_2.Element;
66
+ declare function SearchResults({ section, className, theme, footerAction, onRecordClick, onItemClick }: SearchResultsProps): JSX_2.Element;
66
67
  export default SearchResults;
67
68
 
68
69
  export declare type SearchResultsAction = {
@@ -84,6 +85,7 @@ export declare type SearchResultsItem = SearchResultListItem | SearchResultImage
84
85
  export declare type SearchResultsProps = {
85
86
  section: SearchResultsSection | SearchResultsItem | SearchResultsRecord | Array<SearchResultsItem | SearchResultsRecord>;
86
87
  className?: string;
88
+ theme?: SearchResultsTheme;
87
89
  footerAction?: SearchResultsAction;
88
90
  onRecordClick?: (record: SearchResultsRecord, index: number) => void;
89
91
  onItemClick?: (item: SearchResultsItem) => void;
@@ -173,6 +175,8 @@ export declare type SearchResultsSection = {
173
175
  className?: string;
174
176
  };
175
177
 
178
+ export declare type SearchResultsTheme = "light" | "dark" | "auto";
179
+
176
180
  export declare function SearchResultsVideoGroup(props: SearchResultsVideoGroupProps): JSX_2.Element;
177
181
 
178
182
  export declare type SearchResultsVideoGroupProps = Omit<SearchResultsProps, "section"> & {
@@ -1,2 +1,2 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-700:oklch(37.2% .044 257.287);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--font-weight-medium:500;--font-weight-semibold:600;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--aspect-video:16/9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentColor}::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::-moz-placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.absolute{position:absolute}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-auto{margin-inline:auto}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mb-0{margin-bottom:calc(var(--spacing)*0)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.inline-flex{display:inline-flex}.aspect-4\\/3{aspect-ratio:4/3}.aspect-video{aspect-ratio:var(--aspect-video)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-\\[90px\\]{height:90px}.h-full{height:100%}.h-px{height:1px}.min-h-screen{min-height:100vh}.w-3{width:calc(var(--spacing)*3)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-10{width:calc(var(--spacing)*10)}.w-\\[160px\\]{width:160px}.w-full{width:100%}.w-px{width:1px}.max-w-3xl{max-width:var(--container-3xl)}.min-w-0{min-width:calc(var(--spacing)*0)}.flex-1{flex:1}.flex-none{flex:none}.translate-x-px{--tw-translate-x:1px;translate:var(--tw-translate-x)var(--tw-translate-y)}.cursor-pointer{cursor:pointer}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-10>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*10)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*10)*calc(1 - var(--tw-space-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-\\[\\#E8E8E8\\]{border-color:#e8e8e8}.border-slate-200{border-color:var(--color-slate-200)}.bg-\\[\\#027FFE\\]{background-color:#027ffe}.bg-\\[\\#666\\]{background-color:#666}.bg-\\[\\#E02E2E\\]{background-color:#e02e2e}.bg-\\[\\#E8E8E8\\]{background-color:#e8e8e8}.bg-black\\/55{background-color:#0000008c}@supports (color:color-mix(in lab,red,red)){.bg-black\\/55{background-color:color-mix(in oklab,var(--color-black)55%,transparent)}}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-100{background-color:var(--color-slate-100)}.bg-white{background-color:var(--color-white)}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-6{padding:calc(var(--spacing)*6)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-12{padding-inline:calc(var(--spacing)*12)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.text-left{text-align:left}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-\\[\\#1A0CAB\\]{color:#1a0cab}.text-\\[\\#007EFF\\]{color:#007eff}.text-\\[\\#333\\]{color:#333}.text-\\[\\#666\\]{color:#666}.text-slate-700{color:var(--color-slate-700)}.text-white{color:var(--color-white)}.no-underline{text-decoration-line:none}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-slate-200{--tw-ring-color:var(--color-slate-200)}.ring-white\\/30{--tw-ring-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.ring-white\\/30{--tw-ring-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}@media(hover:hover){.group-hover\\:underline:is(:where(.group):hover *){text-decoration-line:underline}.group-hover\\:underline-offset-2:is(:where(.group):hover *){text-underline-offset:2px}.hover\\:border-\\[\\#E8E8E8\\]:hover{border-color:#e8e8e8}.hover\\:border-slate-300:hover{border-color:var(--color-slate-300)}.hover\\:bg-\\[\\#F5F5F5\\]:hover{background-color:#f5f5f5}.hover\\:bg-slate-50:hover{background-color:var(--color-slate-50)}.hover\\:no-underline:hover{text-decoration-line:none}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:underline-offset-2:hover{text-underline-offset:2px}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-slate-300:focus-visible{--tw-ring-color:var(--color-slate-300)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),o=require("clsx"),u=require("lucide-react");function w(e,t){const i=t==="_blank"?"noreferrer noopener":"";return e?i?[...new Set([...e.split(" "),...i.split(" ")].filter(Boolean))].join(" "):e:i||void 0}function h({href:e,target:t,rel:i,onClick:r,className:n,children:l}){const a=n?`${n} cursor-pointer`:"cursor-pointer";return e?s.jsx("a",{href:e,target:t,rel:w(i,t),className:a,onClick:()=>r?.(),children:l}):s.jsx("button",{type:"button",className:a,onClick:r,children:l})}function G({item:e,onItemClick:t}){const i=e.onClick?void 0:e.href;return s.jsxs(h,{href:i,target:e.target,rel:e.rel,onClick:()=>{e.onClick?.(),t?.(e)},className:o("group w-full rounded-xl text-left transition","hover:border-slate-300 hover:bg-slate-50 focus:outline-none focus-visible:ring-2 focus-visible:ring-slate-300"),children:[s.jsx("div",{className:"overflow-hidden rounded-lg ring-1 ring-slate-200",children:s.jsx("div",{className:"relative aspect-video bg-slate-100",children:s.jsx("img",{src:e.imageUrl,alt:e.imageAlt??e.title,className:"absolute inset-0 h-full w-full object-cover",loading:"lazy"})})}),s.jsxs("div",{className:"mt-2",children:[s.jsx("div",{className:"truncate text-sm font-semibold text-[#333]",children:e.title}),e.subtitle?s.jsx("div",{className:"mt-1 truncate text-sm text-[#666]",children:e.subtitle}):null]})]})}function T({author:e,date:t}){return!e&&!t?null:s.jsxs("div",{className:"flex-none truncate text-xs",children:[e?s.jsx("span",{className:"",children:e}):null,e&&t?s.jsx("span",{className:"mx-1",children:"·"}):null,t?s.jsx("span",{className:"",children:t}):null]})}function A({breadcrumbs:e}){return e?.length?s.jsx("div",{className:"min-w-0 truncate text-xs",children:e.map((t,i)=>s.jsxs("span",{children:[i>0?s.jsx("span",{className:"mx-1",children:">"}):null,s.jsx("span",{className:"",children:t})]},`${t}-${i}`))}):null}function F({meta:e}){return e?.length?s.jsx("div",{className:"mt-2 flex flex-wrap gap-2 text-xs text-[#333]",children:e.map((t,i)=>s.jsx("span",{className:"inline-flex items-center rounded border border-slate-200 bg-white px-3 py-1",children:t},`${t}-${i}`))}):null}function k(e){const t=e.trim().toLowerCase();return t?t==="google"?"G":e.trim().slice(0,1).toUpperCase():""}function p({title:e,titleIcon:t,titleIconBgColor:i,source:r,className:n,titleClassName:l}){return!e&&!t&&!r?null:s.jsxs("div",{className:o("mb-2 flex min-w-0 items-center gap-2",n),children:[t?i?s.jsx("span",{className:"inline-flex h-6 w-6 flex-none items-center justify-center rounded-md text-white",style:{backgroundColor:i},children:t}):s.jsx("span",{className:"flex-none",children:t}):null,e?s.jsx("div",{className:o("min-w-0 text-xl font-semibold cursor-pointer hover:underline hover:underline-offset-2 group-hover:underline group-hover:underline-offset-2",l),children:e}):null,r?s.jsx("span",{className:"inline-flex h-6 w-6 flex-none items-center justify-center rounded-md",title:r,children:k(r)}):null]})}function B(e){switch(e){case"doc":case"word":return"bg-[#027FFE] text-white";case"pdf":return"bg-[#E02E2E] text-white";default:return"bg-slate-100 text-slate-700"}}function S(e){switch(e){case"xls":return s.jsx(u.FileSpreadsheet,{className:"h-5 w-5"});case"ppt":return s.jsx(u.Presentation,{className:"h-5 w-5"});case"pdf":case"doc":case"word":case"text":return s.jsx(u.FileText,{className:"h-5 w-5"});default:return s.jsx(u.File,{className:"h-5 w-5"})}}function b({fileType:e,typeIcon:t}){return t?s.jsx("span",{className:"inline-flex h-6 w-6 items-center justify-center",children:t}):e?s.jsx("span",{className:o("inline-flex h-6 w-6 items-center justify-center rounded-md",B(e)),children:S(e)}):null}function E({item:e,onItemClick:t}){const i=e.typeIcon?s.jsx(b,{typeIcon:e.typeIcon}):e.fileType?s.jsx(b,{fileType:e.fileType}):null,r=e.onClick||t?()=>{e.onClick?.(),t?.(e)}:void 0,n=e.onClick?void 0:e.href,l=s.jsxs("div",{className:"w-full py-2",children:[s.jsx("div",{className:"flex min-w-0 items-center gap-2",children:s.jsx(p,{className:"mb-0 w-full",title:e.title,titleIcon:i,source:e.source,titleClassName:"truncate text-[#1A0CAB]"})}),s.jsxs("div",{className:"mt-2 flex gap-3",children:[e.thumbnailUrl?s.jsx("img",{src:e.thumbnailUrl,alt:e.thumbnailAlt??e.title,className:"h-[90px] w-[160px] flex-none rounded-lg object-cover ring-1 ring-slate-200",loading:"lazy"}):s.jsx("div",{className:"h-[90px] w-[160px] flex-none rounded-lg bg-slate-100 ring-1 ring-slate-200"}),s.jsxs("div",{className:"min-w-0 flex-1 flex flex-col justify-between",children:[e.description?s.jsx("div",{className:"line-clamp-2 text-sm text-[#666]",children:e.description}):null,e.breadcrumbs?.length||e.author||e.date?s.jsxs("div",{className:"mt-2 flex min-w-0 items-center gap-3 text-[#666]",children:[s.jsx(A,{breadcrumbs:e.breadcrumbs}),s.jsx("span",{className:"h-3 w-px flex-none bg-[#666]","aria-hidden":"true"}),s.jsxs("div",{className:"flex flex-none items-center gap-2",children:[s.jsx(T,{author:e.author,date:e.date}),e.href?s.jsx("span",{className:"flex-none text-[#007EFF]",children:s.jsx(u.ExternalLink,{className:"h-3 w-3"})}):null]})]}):s.jsx(F,{meta:e.meta})]})]})]});return!n&&!r?l:s.jsx(h,{href:n,target:e.target,rel:e.rel,onClick:r,className:"group block w-full rounded-xl px-3 text-left no-underline transition hover:bg-slate-50 focus:outline-none focus-visible:ring-2 focus-visible:ring-slate-300",children:l})}function L({item:e,onItemClick:t}){const i=e.breadcrumbs??[e.sourceLabel,e.categoryLabel].filter(Boolean),r=e.onClick?void 0:e.href;return s.jsxs(h,{href:r,target:e.target,rel:e.rel,onClick:()=>{e.onClick?.(),t?.(e)},className:o("group w-full rounded-xl text-left transition","hover:border-slate-300 hover:bg-slate-50 focus:outline-none focus-visible:ring-2 focus-visible:ring-slate-300"),children:[s.jsx("div",{className:"overflow-hidden rounded-lg ring-1 ring-slate-200",children:s.jsxs("div",{className:"relative aspect-4/3 bg-slate-100",children:[s.jsx("img",{src:e.thumbnailUrl,alt:e.thumbnailAlt??e.title,className:"absolute inset-0 h-full w-full object-cover",loading:"lazy"}),e.mediaType==="video"?s.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:s.jsx("span",{className:"inline-flex h-10 w-10 items-center justify-center rounded-full bg-black/55 text-white ring-1 ring-white/30",children:s.jsx(u.Play,{className:"h-5 w-5 translate-x-px"})})}):null]})}),s.jsxs("div",{className:"mt-2",children:[s.jsx("div",{className:"truncate text-sm font-medium",children:e.title}),e.matchCountText?s.jsx("div",{className:"mt-1 truncate text-xs text-[#666]",children:e.matchCountText}):null,i.length?s.jsx("div",{className:"mt-2 text-[#666]",children:s.jsx(A,{breadcrumbs:i})}):null]})]})}function U({action:e,className:t}){const i=o("flex-none inline-flex items-center justify-center rounded-full border border-slate-200 bg-white","h-9 px-12 text-sm font-medium text-slate-700 no-underline transition","cursor-pointer hover:border-slate-300 hover:bg-slate-50 hover:no-underline","focus:outline-none focus-visible:ring-2 focus-visible:ring-slate-300",t);return e.href?s.jsx("a",{className:i,href:e.href,target:e.target,rel:w(e.rel,e.target),onClick:()=>e.onClick?.(),children:e.label}):s.jsx("button",{className:i,type:"button",onClick:e.onClick,children:e.label})}function g({action:e}){return e?s.jsxs("div",{className:"mt-3 flex w-full items-center",children:[s.jsx("span",{className:"h-px flex-1 bg-[#E8E8E8]","aria-hidden":"true"}),s.jsx(U,{action:e,className:o("rounded-full border border-[#E8E8E8] bg-white px-4 py-2 text-sm font-medium text-[#333] transition","hover:border-[#E8E8E8] hover:bg-[#F5F5F5]")}),s.jsx("span",{className:"h-px flex-1 bg-[#E8E8E8]","aria-hidden":"true"})]}):null}function _(e,t){if(e.layout==="list")return s.jsxs("div",{className:o("space-y-6",e.className),children:[s.jsx(p,{title:e.title,titleIcon:e.titleIcon,titleIconBgColor:e.titleIconBgColor,titleClassName:e.titleClassName}),e.items.map(n=>s.jsx(E,{item:n,onItemClick:t},n.id)),s.jsx(g,{action:e.footerAction})]});if(e.layout==="mediaGrid"){const n=e.columns??3,l=n===2?"grid-cols-2":n===4?"grid-cols-4":"grid-cols-3";return s.jsxs("div",{className:o(e.className),children:[s.jsx(p,{title:e.title,titleIcon:e.titleIcon,titleIconBgColor:e.titleIconBgColor,titleClassName:e.titleClassName}),s.jsx("div",{className:o("grid gap-3",l),children:e.items.map(a=>s.jsx(L,{item:a,onItemClick:t},a.id))}),s.jsx(g,{action:e.footerAction})]})}const i=e.columns??3,r=i===2?"grid-cols-2":i===4?"grid-cols-4":"grid-cols-3";return s.jsxs("div",{className:o(e.className),children:[s.jsx(p,{title:e.title,titleIcon:e.titleIcon,titleIconBgColor:e.titleIconBgColor,titleClassName:e.titleClassName}),s.jsx("div",{className:o("grid gap-3",r),children:e.items.map(n=>s.jsx(G,{item:n,onItemClick:t},n.id))}),s.jsx(g,{action:e.footerAction})]})}function $(e){if(!e)return;const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toISOString().slice(0,10)}function z(e){const t=e?.trim().toLowerCase();if(t)return t==="pdf"?"pdf":t==="doc"||t==="docx"||t==="word"?"doc":t==="ppt"||t==="pptx"?"ppt":t==="xls"||t==="xlsx"||t==="excel"?"xls":t==="link"||t==="url"||t==="html"?"link":t==="txt"||t==="text"?"text":"unknown"}function v(e,t,i){const r=e.thumbnail??e.cover??e.metadata?.thumbnail_link,n=e.summary??e.content,l=z(e.metadata?.file_extension??e.type),a=e.source?.name,c=e.category??e.categories?.join(" / ")??"Categories",d=[a,c].filter(Boolean),m=e.last_updated_by?.user?.username??e.owner?.username,x=$(e.last_updated_by?.timestamp??e.metadata?.last_reviewed),f=e.metadata?.icon_link??e.icon,y=f?s.jsx("img",{src:f,alt:"",className:"h-5 w-5 rounded-sm object-contain"}):void 0;return{type:"result",id:`${e.source?.id??e.url??e.title}-${t}`,title:e.title,href:e.url,description:n,thumbnailUrl:r,fileType:l,typeIcon:y,breadcrumbs:d.length?d:void 0,author:m,date:x,onClick:i}}function j({section:e,className:t,footerAction:i,onRecordClick:r,onItemClick:n}){const l=M(C(e,r),i);return s.jsx("div",{className:o(t),children:_(l,n)})}function M(e,t){return!t||e.footerAction?e:e.layout==="list"?{...e,footerAction:t}:e.layout==="mediaGrid"?{...e,footerAction:t}:{...e,footerAction:t}}function H(e){return s.jsx(j,{...e})}function V(e){return s.jsx(j,{...e})}function C(e,t){if(Array.isArray(e))return q(e,t);if(P(e))return e;const i=e;if(i.type==="imageGroup"&&Array.isArray(i.items)){const n=i;return n.items[0]?.type==="media"?{type:"section",title:n.title,layout:"mediaGrid",items:n.items.filter(a=>typeof a=="object"&&!!a&&a.type==="media"),columns:n.columns,footerAction:n.footerAction,className:n.className}:{type:"section",title:n.title,layout:"imageGrid",items:n.items.filter(a=>typeof a=="object"&&!!a&&a.type==="image"),columns:n.columns,footerAction:n.footerAction,className:n.className}}if(i.type==="videoGroup"&&Array.isArray(i.items)){const n=i;return{type:"section",title:n.title,layout:"mediaGrid",items:n.items,columns:n.columns,footerAction:n.footerAction,className:n.className}}if(i.type==="result")return{type:"section",layout:"list",items:[e]};if(i.type==="media")return{type:"section",layout:"mediaGrid",items:[e]};if(i.type==="image"&&typeof i.imageUrl=="string")return{type:"section",layout:"imageGrid",items:[e]};const r=typeof i.type=="string"?i.type.trim().toLowerCase():void 0;if(r==="image"||r==="video"){const n=typeof i.id=="string"?i.id:void 0,l=typeof i.thumbnail=="string"?i.thumbnail:typeof i.cover=="string"?i.cover:typeof i.metadata=="object"&&i.metadata&&typeof i.metadata.thumbnail_link=="string"?i.metadata.thumbnail_link:void 0;if(l){const a=typeof i.category=="string"?i.category:Array.isArray(i.categories)?i.categories.filter(f=>typeof f=="string").join(" / "):void 0,c=typeof i.title=="string"?i.title:"Untitled",d=typeof i.url=="string"?i.url:void 0,m=typeof i.source=="object"&&i.source&&typeof i.source.name=="string"?i.source.name:void 0;return{type:"section",layout:"mediaGrid",items:[{type:"media",id:n??`${d??c}-0`,mediaType:r==="video"?"video":"image",title:c,href:t?void 0:d,thumbnailUrl:l,sourceLabel:m,categoryLabel:a,breadcrumbs:[m,a].filter(Boolean),...t?{onClick:()=>t(e,0)}:{}}]}}}return{type:"section",layout:"list",items:[v(e,0,t?()=>t(e,0):void 0)]}}function q(e,t){if(!e.length)return{type:"section",layout:"list",items:[]};if(e.every(I)){if(e.every(l=>l.type==="result"))return{type:"section",layout:"list",items:e};if(e.every(l=>l.type==="media"))return{type:"section",layout:"mediaGrid",items:e};if(e.every(l=>l.type==="image"&&"imageUrl"in l))return{type:"section",layout:"imageGrid",items:e};if(e.length===1)return C(e[0],t)}const i=[],r=[];for(const[l,a]of e.entries()){const c=D(a,l,t);c?i.push(c):r.push(v(a,l,t?()=>t(a,l):void 0))}return i.length&&!r.length?{type:"section",title:N(e,a=>a.category??a.source?.name),layout:"mediaGrid",items:i}:{type:"section",title:N(e,l=>l.category??l.source?.name),layout:"list",items:r}}function I(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="result"||t.type==="media"||t.type==="imageGroup"||t.type==="videoGroup"||t.type==="image"&&typeof e.imageUrl=="string"}function D(e,t,i){const r=e,n=typeof r.type=="string"?r.type.trim().toLowerCase():void 0;if(n!=="image"&&n!=="video")return;const l=typeof r.id=="string"?r.id:void 0,a=typeof r.thumbnail=="string"?r.thumbnail:typeof r.cover=="string"?r.cover:typeof r.metadata=="object"&&r.metadata&&typeof r.metadata.thumbnail_link=="string"?r.metadata.thumbnail_link:void 0;if(!a)return;const c=typeof r.category=="string"?r.category:Array.isArray(r.categories)?r.categories.filter(y=>typeof y=="string").join(" / "):void 0,d=typeof r.title=="string"?r.title:"Untitled",m=typeof r.url=="string"?r.url:void 0,x=typeof r.source=="object"&&r.source&&typeof r.source.name=="string"?r.source.name:void 0,f=!!i&&!I(e);return{type:"media",id:l??`${m??d}-0`,mediaType:n==="video"?"video":"image",title:d,href:f?void 0:m,thumbnailUrl:a,sourceLabel:x,categoryLabel:c,breadcrumbs:[x,c].filter(Boolean),...f?{onClick:()=>i(e,t)}:{}}}function N(e,t){const i=e[0],r=t(i);if(r){for(const n of e)if(t(n)!==r)return;return r}}function P(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="section"&&(t.layout==="list"||t.layout==="imageGrid"||t.layout==="mediaGrid")&&Array.isArray(t.items)}function O(e,t){const i=[];for(const r of e){const n=i.length?i[i.length-1]:void 0;if(r.type==="imageGroup"){r.items[0]?.type==="media"?i.push({type:"section",title:r.title,titleIcon:s.jsx(u.Image,{className:"h-4 w-4"}),titleIconBgColor:"#FFAF36",titleClassName:"text-[#1A0CAB]",layout:"mediaGrid",items:r.items.filter(a=>a.type==="media"),columns:r.columns??t,footerAction:r.footerAction,className:r.className}):i.push({type:"section",title:r.title,titleIcon:s.jsx(u.Image,{className:"h-4 w-4"}),titleIconBgColor:"#FFAF36",titleClassName:"text-[#1A0CAB]",layout:"imageGrid",items:r.items.filter(a=>a.type==="image"),columns:r.columns??t,footerAction:r.footerAction,className:r.className});continue}if(r.type==="videoGroup"){i.push({type:"section",title:r.title,titleIcon:s.jsx(u.Video,{className:"h-4 w-4"}),titleIconBgColor:"#1784FC",titleClassName:"text-[#1A0CAB]",layout:"mediaGrid",items:r.items,columns:r.columns??t,footerAction:r.footerAction,className:r.className});continue}if(r.type==="result"){if(n?.layout==="list"){n.items.push(r);continue}i.push({type:"section",layout:"list",items:[r]});continue}if(r.type==="media"){if(n?.layout==="mediaGrid"){n.items.push(r);continue}i.push({type:"section",layout:"mediaGrid",...t?{columns:t}:{},items:[r]});continue}if(n?.layout==="imageGrid"){n.items.push(r);continue}i.push({type:"section",layout:"imageGrid",...t?{columns:t}:{},items:[r]})}return i}function R(e){return e.map((t,i)=>v(t,i))}exports.SearchResultsImageGroup=H;exports.SearchResultsVideoGroup=V;exports.default=j;exports.itemsToSections=O;exports.recordsToItems=R;
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--font-weight-medium:500;--font-weight-semibold:600;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-out:cubic-bezier(0,0,.2,1);--aspect-video:16/9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentColor}::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::-moz-placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.absolute{position:absolute}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-auto{margin-inline:auto}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mb-0{margin-bottom:calc(var(--spacing)*0)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.inline-flex{display:inline-flex}.aspect-4\\/3{aspect-ratio:4/3}.aspect-video{aspect-ratio:var(--aspect-video)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-10{height:calc(var(--spacing)*10)}.h-\\[90px\\]{height:90px}.h-full{height:100%}.h-px{height:1px}.min-h-screen{min-height:100vh}.w-3{width:calc(var(--spacing)*3)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-10{width:calc(var(--spacing)*10)}.w-\\[160px\\]{width:160px}.w-full{width:100%}.w-px{width:1px}.max-w-3xl{max-width:var(--container-3xl)}.min-w-0{min-width:calc(var(--spacing)*0)}.flex-1{flex:1}.flex-none{flex:none}.translate-x-px{--tw-translate-x:1px;translate:var(--tw-translate-x)var(--tw-translate-y)}.transform-gpu{transform:translateZ(0)var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.cursor-pointer{cursor:pointer}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-10>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*10)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*10)*calc(1 - var(--tw-space-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-\\[\\#e8e8e8\\]{border-color:#e8e8e8}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-700{border-color:var(--color-slate-700)}.border-transparent{border-color:#0000}.bg-\\[\\#027FFE\\]{background-color:#027ffe}.bg-\\[\\#666\\]{background-color:#666}.bg-\\[\\#E02E2E\\]{background-color:#e02e2e}.bg-\\[\\#e8e8e8\\]{background-color:#e8e8e8}.bg-black\\/55{background-color:#0000008c}@supports (color:color-mix(in lab,red,red)){.bg-black\\/55{background-color:color-mix(in oklab,var(--color-black)55%,transparent)}}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-950{background-color:var(--color-slate-950)}.bg-white{background-color:var(--color-white)}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-6{padding:calc(var(--spacing)*6)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-12{padding-inline:calc(var(--spacing)*12)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.text-left{text-align:left}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-\\[\\#1A0CAB\\]{color:#1a0cab}.text-\\[\\#007EFF\\]{color:#007eff}.text-\\[\\#666\\]{color:#666}.text-slate-100{color:var(--color-slate-100)}.text-slate-200{color:var(--color-slate-200)}.text-slate-700{color:var(--color-slate-700)}.text-slate-900{color:var(--color-slate-900)}.text-white{color:var(--color-white)}.no-underline{text-decoration-line:none}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-slate-200{--tw-ring-color:var(--color-slate-200)}.ring-white\\/30{--tw-ring-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.ring-white\\/30{--tw-ring-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}@media(hover:hover){.group-hover\\:scale-\\[1\\.1\\]:is(:where(.group):hover *){scale:1.1}.group-hover\\:scale-\\[1\\.03\\]:is(:where(.group):hover *){scale:1.03}.group-hover\\:underline:is(:where(.group):hover *){text-decoration-line:underline}.group-hover\\:underline-offset-2:is(:where(.group):hover *){text-underline-offset:2px}.hover\\:border-slate-200:hover{border-color:var(--color-slate-200)}.hover\\:border-slate-300:hover{border-color:var(--color-slate-300)}.hover\\:bg-slate-50:hover{background-color:var(--color-slate-50)}.hover\\:bg-slate-100\\/70:hover{background-color:#f1f5f9b3}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-slate-100\\/70:hover{background-color:color-mix(in oklab,var(--color-slate-100)70%,transparent)}}.hover\\:bg-slate-800:hover{background-color:var(--color-slate-800)}.hover\\:no-underline:hover{text-decoration-line:none}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:underline-offset-2:hover{text-underline-offset:2px}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-slate-300:focus-visible{--tw-ring-color:var(--color-slate-300)}.focus-visible\\:ring-slate-600:focus-visible{--tw-ring-color:var(--color-slate-600)}.dark\\:border-slate-700:where(.dark,.dark *){border-color:var(--color-slate-700)}.dark\\:bg-slate-700:where(.dark,.dark *){background-color:var(--color-slate-700)}.dark\\:bg-slate-800:where(.dark,.dark *){background-color:var(--color-slate-800)}.dark\\:bg-slate-900:where(.dark,.dark *){background-color:var(--color-slate-900)}.dark\\:text-\\[\\#8AB4F8\\]:where(.dark,.dark *){color:#8ab4f8}.dark\\:text-slate-200:where(.dark,.dark *){color:var(--color-slate-200)}.dark\\:ring-slate-700:where(.dark,.dark *){--tw-ring-color:var(--color-slate-700)}@media(hover:hover){.dark\\:hover\\:border-slate-600:where(.dark,.dark *):hover{border-color:var(--color-slate-600)}.dark\\:hover\\:border-slate-700:where(.dark,.dark *):hover{border-color:var(--color-slate-700)}.dark\\:hover\\:bg-slate-800:where(.dark,.dark *):hover{background-color:var(--color-slate-800)}.dark\\:hover\\:bg-slate-800\\/60:where(.dark,.dark *):hover{background-color:#1d293d99}@supports (color:color-mix(in lab,red,red)){.dark\\:hover\\:bg-slate-800\\/60:where(.dark,.dark *):hover{background-color:color-mix(in oklab,var(--color-slate-800)60%,transparent)}}}.dark\\:focus-visible\\:ring-slate-600:where(.dark,.dark *):focus-visible{--tw-ring-color:var(--color-slate-600)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),o=require("clsx"),u=require("lucide-react");function h({breadcrumbs:e}){return e?.length?r.jsx("div",{className:"min-w-0 truncate text-xs",children:e.map((t,s)=>r.jsxs("span",{children:[s>0?r.jsx("span",{className:"mx-1",children:">"}):null,r.jsx("span",{className:"",children:t})]},`${t}-${s}`))}):null}function k(e,t){const s=t==="_blank"?"noreferrer noopener":"";return e?s?[...new Set([...e.split(" "),...s.split(" ")].filter(Boolean))].join(" "):e:s||void 0}function b({href:e,target:t,rel:s,onClick:i,className:n,children:l}){const a=n?`${n} cursor-pointer`:"cursor-pointer";return e?r.jsx("a",{href:e,target:t,rel:k(s,t),className:a,onClick:()=>i?.(),children:l}):r.jsx("button",{type:"button",className:a,onClick:i,children:l})}function I({item:e,onItemClick:t}){const s=e.onClick?void 0:e.href,i=e.breadcrumbs??[];return r.jsxs(b,{href:s,target:e.target,rel:e.rel,onClick:()=>{e.onClick?.(),t?.(e)},className:o("group block w-full rounded-xl border border-transparent text-left no-underline transition-colors"),children:[r.jsx("div",{className:"overflow-hidden rounded-lg ring-1 ring-slate-200 dark:ring-slate-700",children:r.jsx("div",{className:"relative aspect-video bg-slate-100 dark:bg-slate-800",children:r.jsx("img",{src:e.imageUrl,alt:e.imageAlt??e.title,className:"absolute inset-0 h-full w-full object-cover transform-gpu transition-transform duration-300 ease-out group-hover:scale-[1.03]",loading:"lazy"})})}),r.jsxs("div",{className:"mt-2",children:[r.jsx("div",{className:"mb-1 truncate text-sm text-[#1A0CAB] dark:text-[#8AB4F8]",children:e.title}),e.subtitle?r.jsx("div",{className:"mb-1 truncate text-sm text-[#666]",children:e.subtitle}):null,i.length?r.jsx("div",{className:"text-[#666]",children:r.jsx(h,{breadcrumbs:i})}):null]})]})}function B({author:e,date:t}){return!e&&!t?null:r.jsxs("div",{className:"flex-none truncate text-xs",children:[e?r.jsx("span",{className:"",children:e}):null,e&&t?r.jsx("span",{className:"mx-1",children:"·"}):null,t?r.jsx("span",{className:"",children:t}):null]})}function T({meta:e}){return e?.length?r.jsx("div",{className:"mt-2 flex flex-wrap gap-2 text-xs text-slate-700 dark:text-slate-200",children:e.map((t,s)=>r.jsx("span",{className:"inline-flex items-center rounded border border-slate-200 bg-white px-3 py-1 dark:border-slate-700 dark:bg-slate-900",children:t},`${t}-${s}`))}):null}function F(e){const t=e.trim().toLowerCase();return t?t==="google"?"G":e.trim().slice(0,1).toUpperCase():""}function p({title:e,titleIcon:t,titleIconBgColor:s,source:i,className:n,titleClassName:l}){return!e&&!t&&!i?null:r.jsxs("div",{className:o("mb-2 flex min-w-0 items-center gap-2",n),children:[t?r.jsx("span",{className:o("inline-flex h-6 w-6 flex-none items-center justify-center",s&&"rounded-md text-white"),style:s?{backgroundColor:s}:void 0,children:t}):null,e?r.jsx("div",{className:o("min-w-0 cursor-pointer text-xl hover:underline hover:underline-offset-2 group-hover:underline group-hover:underline-offset-2",l),children:e}):null,i?r.jsx("span",{className:"inline-flex h-6 w-6 flex-none items-center justify-center rounded-md bg-slate-100 text-xs font-semibold text-slate-700 dark:bg-slate-800 dark:text-slate-200",title:i,children:F(i)}):null]})}function G(e){switch(e){case"doc":case"word":return"bg-[#027FFE] text-white";case"pdf":return"bg-[#E02E2E] text-white";default:return"bg-slate-100 text-slate-700 dark:bg-slate-800 dark:text-slate-200"}}function S(e){switch(e){case"xls":return r.jsx(u.FileSpreadsheet,{className:"h-5 w-5"});case"ppt":return r.jsx(u.Presentation,{className:"h-5 w-5"});case"pdf":case"doc":case"word":case"text":return r.jsx(u.FileText,{className:"h-5 w-5"});default:return r.jsx(u.File,{className:"h-5 w-5"})}}function N({fileType:e,typeIcon:t}){return t?r.jsx("span",{className:"inline-flex h-6 w-6 items-center justify-center",children:t}):e?r.jsx("span",{className:o("inline-flex h-6 w-6 items-center justify-center rounded-md",G(e)),children:S(e)}):null}function L({item:e,onItemClick:t}){const s=e.typeIcon?r.jsx(N,{typeIcon:e.typeIcon}):e.fileType?r.jsx(N,{fileType:e.fileType}):null,i=e.onClick||t?()=>{e.onClick?.(),t?.(e)}:void 0,n=e.onClick?void 0:e.href,l=r.jsxs("div",{className:"w-full py-2",children:[r.jsx("div",{className:"flex min-w-0 items-center gap-2",children:r.jsx(p,{className:"mb-0 w-full",title:e.title,titleIcon:s,source:e.source,titleClassName:"truncate text-[#1A0CAB] dark:text-[#8AB4F8]"})}),r.jsxs("div",{className:"flex gap-3",children:[e.thumbnailUrl?r.jsx("img",{src:e.thumbnailUrl,alt:e.thumbnailAlt??e.title,className:"h-[90px] w-[160px] flex-none rounded-lg object-cover ring-1 ring-slate-200 dark:ring-slate-700",loading:"lazy"}):null,r.jsxs("div",{className:"min-w-0 flex-1 flex flex-col justify-between",children:[e.description?r.jsx("div",{className:"line-clamp-2 text-sm text-[#666]",children:e.description}):null,e.breadcrumbs?.length||e.author||e.date?r.jsxs("div",{className:"mt-2 flex min-w-0 items-center gap-3 text-[#666]",children:[r.jsx(h,{breadcrumbs:e.breadcrumbs}),r.jsx("span",{className:"h-3 w-px flex-none bg-[#666]","aria-hidden":"true"}),r.jsxs("div",{className:"flex flex-none items-center gap-2",children:[r.jsx(B,{author:e.author,date:e.date}),e.href?r.jsx("span",{className:"flex-none text-[#007EFF]",children:r.jsx(u.ExternalLink,{className:"h-3 w-3"})}):null]})]}):r.jsx(T,{meta:e.meta})]})]})]});return!n&&!i?l:r.jsx(b,{href:n,target:e.target,rel:e.rel,onClick:i,className:o("group block w-full rounded-xl border border-transparent px-6 py-3 text-left no-underline transition-colors","hover:border-slate-200 hover:bg-slate-100/70 focus:outline-none focus-visible:ring-2 focus-visible:ring-slate-300","dark:hover:border-slate-700 dark:hover:bg-slate-800/60 dark:focus-visible:ring-slate-600"),children:l})}function U({item:e,onItemClick:t}){const s=e.breadcrumbs??[e.sourceLabel,e.categoryLabel].filter(Boolean),i=e.onClick?void 0:e.href;return r.jsxs(b,{href:i,target:e.target,rel:e.rel,onClick:()=>{e.onClick?.(),t?.(e)},className:o("group block w-full rounded-xl border border-transparent text-left no-underline transition-colors"),children:[r.jsx("div",{className:"overflow-hidden rounded-lg ring-1 ring-slate-200 dark:ring-slate-700",children:r.jsxs("div",{className:"relative aspect-4/3 bg-slate-100 dark:bg-slate-800",children:[r.jsx("img",{src:e.thumbnailUrl,alt:e.thumbnailAlt??e.title,className:"absolute inset-0 h-full w-full object-cover transform-gpu transition-transform duration-300 ease-out group-hover:scale-[1.1]",loading:"lazy"}),e.mediaType==="video"?r.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:r.jsx("span",{className:"inline-flex h-10 w-10 items-center justify-center rounded-full bg-black/55 text-white ring-1 ring-white/30",children:r.jsx(u.Play,{className:"h-5 w-5 translate-x-px"})})}):null]})}),r.jsxs("div",{className:"mt-2",children:[r.jsx("div",{className:"mb-1 truncate text-sm text-[#1A0CAB] dark:text-[#8AB4F8]",children:e.title}),e.matchCountText?r.jsx("div",{className:"mb-1 truncate text-xs text-[#666]",children:e.matchCountText}):null,s.length?r.jsxs("div",{className:"text-[#666]",children:[r.jsx(h,{breadcrumbs:s})," "]}):null]})]})}function _({action:e,className:t}){const s=o("flex-none inline-flex items-center justify-center rounded-full border border-[#e8e8e8] bg-white","h-7 px-12 text-sm text-[#666] no-underline transition","cursor-pointer hover:border-slate-300 hover:bg-slate-50 hover:no-underline","focus:outline-none focus-visible:ring-2 focus-visible:ring-slate-300","dark:border-slate-700 dark:bg-slate-900 dark:text-slate-200 dark:hover:border-slate-600 dark:hover:bg-slate-800 dark:focus-visible:ring-slate-600",t);return e.href?r.jsx("a",{className:s,href:e.href,target:e.target,rel:k(e.rel,e.target),onClick:()=>e.onClick?.(),children:e.label}):r.jsx("button",{className:s,type:"button",onClick:e.onClick,children:e.label})}function y({action:e}){return e?r.jsxs("div",{className:"mt-3 flex w-full items-center",children:[r.jsx("span",{className:"h-px flex-1 bg-[#e8e8e8] dark:bg-slate-700","aria-hidden":"true"}),r.jsx(_,{action:e,className:o("px-4")}),r.jsx("span",{className:"h-px flex-1 bg-[#e8e8e8] dark:bg-slate-700","aria-hidden":"true"})]}):null}function $(e,t){if(e.layout==="list")return r.jsxs("div",{className:o("space-y-6",e.className),children:[r.jsx(p,{title:e.title,titleIcon:e.titleIcon,titleIconBgColor:e.titleIconBgColor,titleClassName:e.titleClassName}),e.items.map(n=>r.jsx(L,{item:n,onItemClick:t},n.id)),r.jsx(y,{action:e.footerAction})]});if(e.layout==="mediaGrid"){const n=e.columns??3,l=n===2?"grid-cols-2":n===4?"grid-cols-4":"grid-cols-3";return r.jsxs("div",{className:o("px-6 py-3",e.className),children:[r.jsx(p,{title:e.title,titleIcon:e.titleIcon,titleIconBgColor:e.titleIconBgColor,titleClassName:e.titleClassName}),r.jsx("div",{className:o("grid gap-3",l),children:e.items.map(a=>r.jsx(U,{item:a,onItemClick:t},a.id))}),r.jsx(y,{action:e.footerAction})]})}const s=e.columns??3,i=s===2?"grid-cols-2":s===4?"grid-cols-4":"grid-cols-3";return r.jsxs("div",{className:o("px-6 py-3",e.className),children:[r.jsx(p,{title:e.title,titleIcon:e.titleIcon,titleIconBgColor:e.titleIconBgColor,titleClassName:e.titleClassName}),r.jsx("div",{className:o("grid gap-3",i),children:e.items.map(n=>r.jsx(I,{item:n,onItemClick:t},n.id))}),r.jsx(y,{action:e.footerAction})]})}function M(e){if(!e)return;const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toISOString().slice(0,10)}function z(e){const t=e?.trim().toLowerCase();if(t)return t==="pdf"?"pdf":t==="doc"||t==="docx"||t==="word"?"doc":t==="ppt"||t==="pptx"?"ppt":t==="xls"||t==="xlsx"||t==="excel"?"xls":t==="link"||t==="url"||t==="html"?"link":t==="txt"||t==="text"?"text":"unknown"}function v(e,t,s){const i=e.thumbnail??e.cover??e.metadata?.thumbnail_link,n=e.summary??e.content,l=z(e.metadata?.file_extension??e.type),a=e.source?.name,c=e.category??e.categories?.join(" / ")??"Categories",d=[a,c].filter(Boolean),m=e.last_updated_by?.user?.username??e.owner?.username,x=M(e.last_updated_by?.timestamp??e.metadata?.last_reviewed),f=e.metadata?.icon_link??e.icon,g=f?r.jsx("img",{src:f,alt:"",className:"h-5 w-5 rounded-sm object-contain"}):void 0;return{type:"result",id:`${e.source?.id??e.url??e.title}-${t}`,title:e.title,href:e.url,description:n,thumbnailUrl:i,fileType:l,typeIcon:g,breadcrumbs:d.length?d:void 0,author:m,date:x,onClick:s}}function j({section:e,className:t,theme:s,footerAction:i,onRecordClick:n,onItemClick:l}){const a=H(A(e,n),i),c=E(s);return r.jsx("div",{className:o(c==="dark"&&"dark",t),children:$(a,l)})}function E(e){if(e)return e==="light"?"light":e==="dark"||typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function H(e,t){return!t||e.footerAction?e:e.layout==="list"?{...e,footerAction:t}:e.layout==="mediaGrid"?{...e,footerAction:t}:{...e,footerAction:t}}function V(e){return r.jsx(j,{...e})}function q(e){return r.jsx(j,{...e})}function A(e,t){if(Array.isArray(e))return D(e,t);if(O(e))return e;const s=e;if(s.type==="imageGroup"&&Array.isArray(s.items)){const n=s;return n.items[0]?.type==="media"?{type:"section",title:n.title,layout:"mediaGrid",items:n.items.filter(a=>typeof a=="object"&&!!a&&a.type==="media"),columns:n.columns,footerAction:n.footerAction,className:n.className}:{type:"section",title:n.title,layout:"imageGrid",items:n.items.filter(a=>typeof a=="object"&&!!a&&a.type==="image"),columns:n.columns,footerAction:n.footerAction,className:n.className}}if(s.type==="videoGroup"&&Array.isArray(s.items)){const n=s;return{type:"section",title:n.title,layout:"mediaGrid",items:n.items,columns:n.columns,footerAction:n.footerAction,className:n.className}}if(s.type==="result")return{type:"section",layout:"list",items:[e]};if(s.type==="media")return{type:"section",layout:"mediaGrid",items:[e]};if(s.type==="image"&&typeof s.imageUrl=="string")return{type:"section",layout:"imageGrid",items:[e]};const i=typeof s.type=="string"?s.type.trim().toLowerCase():void 0;if(i==="image"||i==="video"){const n=typeof s.id=="string"?s.id:void 0,l=typeof s.thumbnail=="string"?s.thumbnail:typeof s.cover=="string"?s.cover:typeof s.metadata=="object"&&s.metadata&&typeof s.metadata.thumbnail_link=="string"?s.metadata.thumbnail_link:void 0;if(l){const a=typeof s.category=="string"?s.category:Array.isArray(s.categories)?s.categories.filter(f=>typeof f=="string").join(" / "):void 0,c=typeof s.title=="string"?s.title:"Untitled",d=typeof s.url=="string"?s.url:void 0,m=typeof s.source=="object"&&s.source&&typeof s.source.name=="string"?s.source.name:void 0;return{type:"section",layout:"mediaGrid",items:[{type:"media",id:n??`${d??c}-0`,mediaType:i==="video"?"video":"image",title:c,href:t?void 0:d,thumbnailUrl:l,sourceLabel:m,categoryLabel:a,breadcrumbs:[m,a].filter(Boolean),...t?{onClick:()=>t(e,0)}:{}}]}}}return{type:"section",layout:"list",items:[v(e,0,t?()=>t(e,0):void 0)]}}function D(e,t){if(!e.length)return{type:"section",layout:"list",items:[]};if(e.every(C)){if(e.every(l=>l.type==="result"))return{type:"section",layout:"list",items:e};if(e.every(l=>l.type==="media"))return{type:"section",layout:"mediaGrid",items:e};if(e.every(l=>l.type==="image"&&"imageUrl"in l))return{type:"section",layout:"imageGrid",items:e};if(e.length===1)return A(e[0],t)}const s=[],i=[];for(const[l,a]of e.entries()){const c=P(a,l,t);c?s.push(c):i.push(v(a,l,t?()=>t(a,l):void 0))}return s.length&&!i.length?{type:"section",title:w(e,a=>a.category??a.source?.name),layout:"mediaGrid",items:s}:{type:"section",title:w(e,l=>l.category??l.source?.name),layout:"list",items:i}}function C(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="result"||t.type==="media"||t.type==="imageGroup"||t.type==="videoGroup"||t.type==="image"&&typeof e.imageUrl=="string"}function P(e,t,s){const i=e,n=typeof i.type=="string"?i.type.trim().toLowerCase():void 0;if(n!=="image"&&n!=="video")return;const l=typeof i.id=="string"?i.id:void 0,a=typeof i.thumbnail=="string"?i.thumbnail:typeof i.cover=="string"?i.cover:typeof i.metadata=="object"&&i.metadata&&typeof i.metadata.thumbnail_link=="string"?i.metadata.thumbnail_link:void 0;if(!a)return;const c=typeof i.category=="string"?i.category:Array.isArray(i.categories)?i.categories.filter(g=>typeof g=="string").join(" / "):void 0,d=typeof i.title=="string"?i.title:"Untitled",m=typeof i.url=="string"?i.url:void 0,x=typeof i.source=="object"&&i.source&&typeof i.source.name=="string"?i.source.name:void 0,f=!!s&&!C(e);return{type:"media",id:l??`${m??d}-0`,mediaType:n==="video"?"video":"image",title:d,href:f?void 0:m,thumbnailUrl:a,sourceLabel:x,categoryLabel:c,breadcrumbs:[x,c].filter(Boolean),...f?{onClick:()=>s(e,t)}:{}}}function w(e,t){const s=e[0],i=t(s);if(i){for(const n of e)if(t(n)!==i)return;return i}}function O(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="section"&&(t.layout==="list"||t.layout==="imageGrid"||t.layout==="mediaGrid")&&Array.isArray(t.items)}function R(e,t){const s=[];for(const i of e){const n=s.length?s[s.length-1]:void 0;if(i.type==="imageGroup"){i.items[0]?.type==="media"?s.push({type:"section",title:i.title,titleIcon:r.jsx(u.Image,{className:"h-4 w-4"}),titleIconBgColor:"#FFAF36",titleClassName:"text-[#1A0CAB] dark:text-[#8AB4F8]",layout:"mediaGrid",items:i.items.filter(a=>a.type==="media"),columns:i.columns??t,footerAction:i.footerAction,className:i.className}):s.push({type:"section",title:i.title,titleIcon:r.jsx(u.Image,{className:"h-4 w-4"}),titleIconBgColor:"#FFAF36",titleClassName:"text-[#1A0CAB] dark:text-[#8AB4F8]",layout:"imageGrid",items:i.items.filter(a=>a.type==="image"),columns:i.columns??t,footerAction:i.footerAction,className:i.className});continue}if(i.type==="videoGroup"){s.push({type:"section",title:i.title,titleIcon:r.jsx(u.Video,{className:"h-4 w-4"}),titleIconBgColor:"#1784FC",titleClassName:"text-[#1A0CAB] dark:text-[#8AB4F8]",layout:"mediaGrid",items:i.items,columns:i.columns??t,footerAction:i.footerAction,className:i.className});continue}if(i.type==="result"){if(n?.layout==="list"){n.items.push(i);continue}s.push({type:"section",layout:"list",items:[i]});continue}if(i.type==="media"){if(n?.layout==="mediaGrid"){n.items.push(i);continue}s.push({type:"section",layout:"mediaGrid",...t?{columns:t}:{},items:[i]});continue}if(n?.layout==="imageGrid"){n.items.push(i);continue}s.push({type:"section",layout:"imageGrid",...t?{columns:t}:{},items:[i]})}return s}function J(e){return e.map((t,s)=>v(t,s))}exports.SearchResultsImageGroup=V;exports.SearchResultsVideoGroup=q;exports.default=j;exports.itemsToSections=R;exports.recordsToItems=J;
@@ -1,133 +1,136 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-700:oklch(37.2% .044 257.287);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--font-weight-medium:500;--font-weight-semibold:600;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--aspect-video:16/9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentColor}::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::-moz-placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.absolute{position:absolute}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-auto{margin-inline:auto}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mb-0{margin-bottom:calc(var(--spacing)*0)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.inline-flex{display:inline-flex}.aspect-4\\/3{aspect-ratio:4/3}.aspect-video{aspect-ratio:var(--aspect-video)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-\\[90px\\]{height:90px}.h-full{height:100%}.h-px{height:1px}.min-h-screen{min-height:100vh}.w-3{width:calc(var(--spacing)*3)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-10{width:calc(var(--spacing)*10)}.w-\\[160px\\]{width:160px}.w-full{width:100%}.w-px{width:1px}.max-w-3xl{max-width:var(--container-3xl)}.min-w-0{min-width:calc(var(--spacing)*0)}.flex-1{flex:1}.flex-none{flex:none}.translate-x-px{--tw-translate-x:1px;translate:var(--tw-translate-x)var(--tw-translate-y)}.cursor-pointer{cursor:pointer}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-10>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*10)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*10)*calc(1 - var(--tw-space-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-\\[\\#E8E8E8\\]{border-color:#e8e8e8}.border-slate-200{border-color:var(--color-slate-200)}.bg-\\[\\#027FFE\\]{background-color:#027ffe}.bg-\\[\\#666\\]{background-color:#666}.bg-\\[\\#E02E2E\\]{background-color:#e02e2e}.bg-\\[\\#E8E8E8\\]{background-color:#e8e8e8}.bg-black\\/55{background-color:#0000008c}@supports (color:color-mix(in lab,red,red)){.bg-black\\/55{background-color:color-mix(in oklab,var(--color-black)55%,transparent)}}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-100{background-color:var(--color-slate-100)}.bg-white{background-color:var(--color-white)}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-6{padding:calc(var(--spacing)*6)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-12{padding-inline:calc(var(--spacing)*12)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.text-left{text-align:left}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-\\[\\#1A0CAB\\]{color:#1a0cab}.text-\\[\\#007EFF\\]{color:#007eff}.text-\\[\\#333\\]{color:#333}.text-\\[\\#666\\]{color:#666}.text-slate-700{color:var(--color-slate-700)}.text-white{color:var(--color-white)}.no-underline{text-decoration-line:none}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-slate-200{--tw-ring-color:var(--color-slate-200)}.ring-white\\/30{--tw-ring-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.ring-white\\/30{--tw-ring-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}@media(hover:hover){.group-hover\\:underline:is(:where(.group):hover *){text-decoration-line:underline}.group-hover\\:underline-offset-2:is(:where(.group):hover *){text-underline-offset:2px}.hover\\:border-\\[\\#E8E8E8\\]:hover{border-color:#e8e8e8}.hover\\:border-slate-300:hover{border-color:var(--color-slate-300)}.hover\\:bg-\\[\\#F5F5F5\\]:hover{background-color:#f5f5f5}.hover\\:bg-slate-50:hover{background-color:var(--color-slate-50)}.hover\\:no-underline:hover{text-decoration-line:none}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:underline-offset-2:hover{text-underline-offset:2px}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-slate-300:focus-visible{--tw-ring-color:var(--color-slate-300)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
- import { jsx as n, jsxs as o } from "react/jsx-runtime";
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--font-weight-medium:500;--font-weight-semibold:600;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-out:cubic-bezier(0,0,.2,1);--aspect-video:16/9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentColor}::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::-moz-placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.absolute{position:absolute}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-auto{margin-inline:auto}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mb-0{margin-bottom:calc(var(--spacing)*0)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.inline-flex{display:inline-flex}.aspect-4\\/3{aspect-ratio:4/3}.aspect-video{aspect-ratio:var(--aspect-video)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-10{height:calc(var(--spacing)*10)}.h-\\[90px\\]{height:90px}.h-full{height:100%}.h-px{height:1px}.min-h-screen{min-height:100vh}.w-3{width:calc(var(--spacing)*3)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-10{width:calc(var(--spacing)*10)}.w-\\[160px\\]{width:160px}.w-full{width:100%}.w-px{width:1px}.max-w-3xl{max-width:var(--container-3xl)}.min-w-0{min-width:calc(var(--spacing)*0)}.flex-1{flex:1}.flex-none{flex:none}.translate-x-px{--tw-translate-x:1px;translate:var(--tw-translate-x)var(--tw-translate-y)}.transform-gpu{transform:translateZ(0)var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.cursor-pointer{cursor:pointer}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-10>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*10)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*10)*calc(1 - var(--tw-space-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-\\[\\#e8e8e8\\]{border-color:#e8e8e8}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-700{border-color:var(--color-slate-700)}.border-transparent{border-color:#0000}.bg-\\[\\#027FFE\\]{background-color:#027ffe}.bg-\\[\\#666\\]{background-color:#666}.bg-\\[\\#E02E2E\\]{background-color:#e02e2e}.bg-\\[\\#e8e8e8\\]{background-color:#e8e8e8}.bg-black\\/55{background-color:#0000008c}@supports (color:color-mix(in lab,red,red)){.bg-black\\/55{background-color:color-mix(in oklab,var(--color-black)55%,transparent)}}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-950{background-color:var(--color-slate-950)}.bg-white{background-color:var(--color-white)}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-6{padding:calc(var(--spacing)*6)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-12{padding-inline:calc(var(--spacing)*12)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.text-left{text-align:left}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-\\[\\#1A0CAB\\]{color:#1a0cab}.text-\\[\\#007EFF\\]{color:#007eff}.text-\\[\\#666\\]{color:#666}.text-slate-100{color:var(--color-slate-100)}.text-slate-200{color:var(--color-slate-200)}.text-slate-700{color:var(--color-slate-700)}.text-slate-900{color:var(--color-slate-900)}.text-white{color:var(--color-white)}.no-underline{text-decoration-line:none}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-slate-200{--tw-ring-color:var(--color-slate-200)}.ring-white\\/30{--tw-ring-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.ring-white\\/30{--tw-ring-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}@media(hover:hover){.group-hover\\:scale-\\[1\\.1\\]:is(:where(.group):hover *){scale:1.1}.group-hover\\:scale-\\[1\\.03\\]:is(:where(.group):hover *){scale:1.03}.group-hover\\:underline:is(:where(.group):hover *){text-decoration-line:underline}.group-hover\\:underline-offset-2:is(:where(.group):hover *){text-underline-offset:2px}.hover\\:border-slate-200:hover{border-color:var(--color-slate-200)}.hover\\:border-slate-300:hover{border-color:var(--color-slate-300)}.hover\\:bg-slate-50:hover{background-color:var(--color-slate-50)}.hover\\:bg-slate-100\\/70:hover{background-color:#f1f5f9b3}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-slate-100\\/70:hover{background-color:color-mix(in oklab,var(--color-slate-100)70%,transparent)}}.hover\\:bg-slate-800:hover{background-color:var(--color-slate-800)}.hover\\:no-underline:hover{text-decoration-line:none}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:underline-offset-2:hover{text-underline-offset:2px}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-slate-300:focus-visible{--tw-ring-color:var(--color-slate-300)}.focus-visible\\:ring-slate-600:focus-visible{--tw-ring-color:var(--color-slate-600)}.dark\\:border-slate-700:where(.dark,.dark *){border-color:var(--color-slate-700)}.dark\\:bg-slate-700:where(.dark,.dark *){background-color:var(--color-slate-700)}.dark\\:bg-slate-800:where(.dark,.dark *){background-color:var(--color-slate-800)}.dark\\:bg-slate-900:where(.dark,.dark *){background-color:var(--color-slate-900)}.dark\\:text-\\[\\#8AB4F8\\]:where(.dark,.dark *){color:#8ab4f8}.dark\\:text-slate-200:where(.dark,.dark *){color:var(--color-slate-200)}.dark\\:ring-slate-700:where(.dark,.dark *){--tw-ring-color:var(--color-slate-700)}@media(hover:hover){.dark\\:hover\\:border-slate-600:where(.dark,.dark *):hover{border-color:var(--color-slate-600)}.dark\\:hover\\:border-slate-700:where(.dark,.dark *):hover{border-color:var(--color-slate-700)}.dark\\:hover\\:bg-slate-800:where(.dark,.dark *):hover{background-color:var(--color-slate-800)}.dark\\:hover\\:bg-slate-800\\/60:where(.dark,.dark *):hover{background-color:#1d293d99}@supports (color:color-mix(in lab,red,red)){.dark\\:hover\\:bg-slate-800\\/60:where(.dark,.dark *):hover{background-color:color-mix(in oklab,var(--color-slate-800)60%,transparent)}}}.dark\\:focus-visible\\:ring-slate-600:where(.dark,.dark *):focus-visible{--tw-ring-color:var(--color-slate-600)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
+ import { jsx as i, jsxs as o } from "react/jsx-runtime";
3
3
  import c from "clsx";
4
- import { File as F, FileText as k, Presentation as B, FileSpreadsheet as T, ExternalLink as E, Play as L, Image as x, Video as S } from "lucide-react";
4
+ import { File as j, FileText as F, Presentation as G, FileSpreadsheet as T, ExternalLink as L, Play as S, Image as N, Video as U } from "lucide-react";
5
+ function b({ breadcrumbs: e }) {
6
+ return e?.length ? /* @__PURE__ */ i("div", { className: "min-w-0 truncate text-xs", children: e.map((t, r) => /* @__PURE__ */ o("span", { children: [
7
+ r > 0 ? /* @__PURE__ */ i("span", { className: "mx-1", children: ">" }) : null,
8
+ /* @__PURE__ */ i("span", { className: "", children: t })
9
+ ] }, `${t}-${r}`)) }) : null;
10
+ }
5
11
  function A(e, t) {
6
- const i = t === "_blank" ? "noreferrer noopener" : "";
7
- return e ? i ? [...new Set([...e.split(" "), ...i.split(" ")].filter(Boolean))].join(" ") : e : i || void 0;
12
+ const r = t === "_blank" ? "noreferrer noopener" : "";
13
+ return e ? r ? [...new Set([...e.split(" "), ...r.split(" ")].filter(Boolean))].join(" ") : e : r || void 0;
8
14
  }
9
15
  function v({
10
16
  href: e,
11
17
  target: t,
12
- rel: i,
13
- onClick: r,
18
+ rel: r,
19
+ onClick: n,
14
20
  className: l,
15
- children: s
21
+ children: a
16
22
  }) {
17
- const a = l ? `${l} cursor-pointer` : "cursor-pointer";
18
- return e ? /* @__PURE__ */ n(
23
+ const s = l ? `${l} cursor-pointer` : "cursor-pointer";
24
+ return e ? /* @__PURE__ */ i(
19
25
  "a",
20
26
  {
21
27
  href: e,
22
28
  target: t,
23
- rel: A(i, t),
24
- className: a,
25
- onClick: () => r?.(),
26
- children: s
29
+ rel: A(r, t),
30
+ className: s,
31
+ onClick: () => n?.(),
32
+ children: a
27
33
  }
28
- ) : /* @__PURE__ */ n("button", { type: "button", className: a, onClick: r, children: s });
34
+ ) : /* @__PURE__ */ i("button", { type: "button", className: s, onClick: n, children: a });
29
35
  }
30
- function U({
36
+ function _({
31
37
  item: e,
32
38
  onItemClick: t
33
39
  }) {
34
- const i = e.onClick ? void 0 : e.href;
40
+ const r = e.onClick ? void 0 : e.href, n = e.breadcrumbs ?? [];
35
41
  return /* @__PURE__ */ o(
36
42
  v,
37
43
  {
38
- href: i,
44
+ href: r,
39
45
  target: e.target,
40
46
  rel: e.rel,
41
47
  onClick: () => {
42
48
  e.onClick?.(), t?.(e);
43
49
  },
44
50
  className: c(
45
- "group w-full rounded-xl text-left transition",
46
- "hover:border-slate-300 hover:bg-slate-50 focus:outline-none focus-visible:ring-2 focus-visible:ring-slate-300"
51
+ "group block w-full rounded-xl border border-transparent text-left no-underline transition-colors"
47
52
  ),
48
53
  children: [
49
- /* @__PURE__ */ n("div", { className: "overflow-hidden rounded-lg ring-1 ring-slate-200", children: /* @__PURE__ */ n("div", { className: "relative aspect-video bg-slate-100", children: /* @__PURE__ */ n(
54
+ /* @__PURE__ */ i("div", { className: "overflow-hidden rounded-lg ring-1 ring-slate-200 dark:ring-slate-700", children: /* @__PURE__ */ i("div", { className: "relative aspect-video bg-slate-100 dark:bg-slate-800", children: /* @__PURE__ */ i(
50
55
  "img",
51
56
  {
52
57
  src: e.imageUrl,
53
58
  alt: e.imageAlt ?? e.title,
54
- className: "absolute inset-0 h-full w-full object-cover",
59
+ className: "absolute inset-0 h-full w-full object-cover transform-gpu transition-transform duration-300 ease-out group-hover:scale-[1.03]",
55
60
  loading: "lazy"
56
61
  }
57
62
  ) }) }),
58
63
  /* @__PURE__ */ o("div", { className: "mt-2", children: [
59
- /* @__PURE__ */ n("div", { className: "truncate text-sm font-semibold text-[#333]", children: e.title }),
60
- e.subtitle ? /* @__PURE__ */ n("div", { className: "mt-1 truncate text-sm text-[#666]", children: e.subtitle }) : null
64
+ /* @__PURE__ */ i("div", { className: "mb-1 truncate text-sm text-[#1A0CAB] dark:text-[#8AB4F8]", children: e.title }),
65
+ e.subtitle ? /* @__PURE__ */ i("div", { className: "mb-1 truncate text-sm text-[#666]", children: e.subtitle }) : null,
66
+ n.length ? /* @__PURE__ */ i("div", { className: "text-[#666]", children: /* @__PURE__ */ i(b, { breadcrumbs: n }) }) : null
61
67
  ] })
62
68
  ]
63
69
  }
64
70
  );
65
71
  }
66
- function _({ author: e, date: t }) {
72
+ function $({ author: e, date: t }) {
67
73
  return !e && !t ? null : /* @__PURE__ */ o("div", { className: "flex-none truncate text-xs", children: [
68
- e ? /* @__PURE__ */ n("span", { className: "", children: e }) : null,
69
- e && t ? /* @__PURE__ */ n("span", { className: "mx-1", children: "·" }) : null,
70
- t ? /* @__PURE__ */ n("span", { className: "", children: t }) : null
74
+ e ? /* @__PURE__ */ i("span", { className: "", children: e }) : null,
75
+ e && t ? /* @__PURE__ */ i("span", { className: "mx-1", children: "·" }) : null,
76
+ t ? /* @__PURE__ */ i("span", { className: "", children: t }) : null
71
77
  ] });
72
78
  }
73
- function C({ breadcrumbs: e }) {
74
- return e?.length ? /* @__PURE__ */ n("div", { className: "min-w-0 truncate text-xs", children: e.map((t, i) => /* @__PURE__ */ o("span", { children: [
75
- i > 0 ? /* @__PURE__ */ n("span", { className: "mx-1", children: ">" }) : null,
76
- /* @__PURE__ */ n("span", { className: "", children: t })
77
- ] }, `${t}-${i}`)) }) : null;
78
- }
79
- function $({ meta: e }) {
80
- return e?.length ? /* @__PURE__ */ n("div", { className: "mt-2 flex flex-wrap gap-2 text-xs text-[#333]", children: e.map((t, i) => /* @__PURE__ */ n(
79
+ function z({ meta: e }) {
80
+ return e?.length ? /* @__PURE__ */ i("div", { className: "mt-2 flex flex-wrap gap-2 text-xs text-slate-700 dark:text-slate-200", children: e.map((t, r) => /* @__PURE__ */ i(
81
81
  "span",
82
82
  {
83
- className: "inline-flex items-center rounded border border-slate-200 bg-white px-3 py-1",
83
+ className: "inline-flex items-center rounded border border-slate-200 bg-white px-3 py-1 dark:border-slate-700 dark:bg-slate-900",
84
84
  children: t
85
85
  },
86
- `${t}-${i}`
86
+ `${t}-${r}`
87
87
  )) }) : null;
88
88
  }
89
- function z(e) {
89
+ function E(e) {
90
90
  const t = e.trim().toLowerCase();
91
91
  return t ? t === "google" ? "G" : e.trim().slice(0, 1).toUpperCase() : "";
92
92
  }
93
- function y({
93
+ function g({
94
94
  title: e,
95
95
  titleIcon: t,
96
- titleIconBgColor: i,
97
- source: r,
96
+ titleIconBgColor: r,
97
+ source: n,
98
98
  className: l,
99
- titleClassName: s
99
+ titleClassName: a
100
100
  }) {
101
- return !e && !t && !r ? null : /* @__PURE__ */ o("div", { className: c("mb-2 flex min-w-0 items-center gap-2", l), children: [
102
- t ? i ? /* @__PURE__ */ n(
101
+ return !e && !t && !n ? null : /* @__PURE__ */ o("div", { className: c("mb-2 flex min-w-0 items-center gap-2", l), children: [
102
+ t ? /* @__PURE__ */ i(
103
103
  "span",
104
104
  {
105
- className: "inline-flex h-6 w-6 flex-none items-center justify-center rounded-md text-white",
106
- style: { backgroundColor: i },
105
+ className: c(
106
+ "inline-flex h-6 w-6 flex-none items-center justify-center",
107
+ r && "rounded-md text-white"
108
+ ),
109
+ style: r ? { backgroundColor: r } : void 0,
107
110
  children: t
108
111
  }
109
- ) : /* @__PURE__ */ n("span", { className: "flex-none", children: t }) : null,
110
- e ? /* @__PURE__ */ n(
112
+ ) : null,
113
+ e ? /* @__PURE__ */ i(
111
114
  "div",
112
115
  {
113
116
  className: c(
114
- "min-w-0 text-xl font-semibold cursor-pointer hover:underline hover:underline-offset-2 group-hover:underline group-hover:underline-offset-2",
115
- s
117
+ "min-w-0 cursor-pointer text-xl hover:underline hover:underline-offset-2 group-hover:underline group-hover:underline-offset-2",
118
+ a
116
119
  ),
117
120
  children: e
118
121
  }
119
122
  ) : null,
120
- r ? /* @__PURE__ */ n(
123
+ n ? /* @__PURE__ */ i(
121
124
  "span",
122
125
  {
123
- className: "inline-flex h-6 w-6 flex-none items-center justify-center rounded-md",
124
- title: r,
125
- children: z(r)
126
+ className: "inline-flex h-6 w-6 flex-none items-center justify-center rounded-md bg-slate-100 text-xs font-semibold text-slate-700 dark:bg-slate-800 dark:text-slate-200",
127
+ title: n,
128
+ children: E(n)
126
129
  }
127
130
  ) : null
128
131
  ] });
129
132
  }
130
- function H(e) {
133
+ function M(e) {
131
134
  switch (e) {
132
135
  case "doc":
133
136
  case "word":
@@ -135,88 +138,92 @@ function H(e) {
135
138
  case "pdf":
136
139
  return "bg-[#E02E2E] text-white";
137
140
  default:
138
- return "bg-slate-100 text-slate-700";
141
+ return "bg-slate-100 text-slate-700 dark:bg-slate-800 dark:text-slate-200";
139
142
  }
140
143
  }
141
- function D(e) {
144
+ function H(e) {
142
145
  switch (e) {
143
146
  case "xls":
144
- return /* @__PURE__ */ n(T, { className: "h-5 w-5" });
147
+ return /* @__PURE__ */ i(T, { className: "h-5 w-5" });
145
148
  case "ppt":
146
- return /* @__PURE__ */ n(B, { className: "h-5 w-5" });
149
+ return /* @__PURE__ */ i(G, { className: "h-5 w-5" });
147
150
  case "pdf":
148
151
  case "doc":
149
152
  case "word":
150
153
  case "text":
151
- return /* @__PURE__ */ n(k, { className: "h-5 w-5" });
154
+ return /* @__PURE__ */ i(F, { className: "h-5 w-5" });
152
155
  default:
153
- return /* @__PURE__ */ n(F, { className: "h-5 w-5" });
156
+ return /* @__PURE__ */ i(j, { className: "h-5 w-5" });
154
157
  }
155
158
  }
156
- function N({
159
+ function w({
157
160
  fileType: e,
158
161
  typeIcon: t
159
162
  }) {
160
- return t ? /* @__PURE__ */ n("span", { className: "inline-flex h-6 w-6 items-center justify-center", children: t }) : e ? /* @__PURE__ */ n(
163
+ return t ? /* @__PURE__ */ i("span", { className: "inline-flex h-6 w-6 items-center justify-center", children: t }) : e ? /* @__PURE__ */ i(
161
164
  "span",
162
165
  {
163
166
  className: c(
164
167
  "inline-flex h-6 w-6 items-center justify-center rounded-md",
165
- H(e)
168
+ M(e)
166
169
  ),
167
- children: D(e)
170
+ children: H(e)
168
171
  }
169
172
  ) : null;
170
173
  }
171
- function M({
174
+ function D({
172
175
  item: e,
173
176
  onItemClick: t
174
177
  }) {
175
- const i = e.typeIcon ? /* @__PURE__ */ n(N, { typeIcon: e.typeIcon }) : e.fileType ? /* @__PURE__ */ n(N, { fileType: e.fileType }) : null, r = e.onClick || t ? () => {
178
+ const r = e.typeIcon ? /* @__PURE__ */ i(w, { typeIcon: e.typeIcon }) : e.fileType ? /* @__PURE__ */ i(w, { fileType: e.fileType }) : null, n = e.onClick || t ? () => {
176
179
  e.onClick?.(), t?.(e);
177
- } : void 0, l = e.onClick ? void 0 : e.href, s = /* @__PURE__ */ o("div", { className: "w-full py-2", children: [
178
- /* @__PURE__ */ n("div", { className: "flex min-w-0 items-center gap-2", children: /* @__PURE__ */ n(
179
- y,
180
+ } : void 0, l = e.onClick ? void 0 : e.href, a = /* @__PURE__ */ o("div", { className: "w-full py-2", children: [
181
+ /* @__PURE__ */ i("div", { className: "flex min-w-0 items-center gap-2", children: /* @__PURE__ */ i(
182
+ g,
180
183
  {
181
184
  className: "mb-0 w-full",
182
185
  title: e.title,
183
- titleIcon: i,
186
+ titleIcon: r,
184
187
  source: e.source,
185
- titleClassName: "truncate text-[#1A0CAB]"
188
+ titleClassName: "truncate text-[#1A0CAB] dark:text-[#8AB4F8]"
186
189
  }
187
190
  ) }),
188
- /* @__PURE__ */ o("div", { className: "mt-2 flex gap-3", children: [
189
- e.thumbnailUrl ? /* @__PURE__ */ n(
191
+ /* @__PURE__ */ o("div", { className: "flex gap-3", children: [
192
+ e.thumbnailUrl ? /* @__PURE__ */ i(
190
193
  "img",
191
194
  {
192
195
  src: e.thumbnailUrl,
193
196
  alt: e.thumbnailAlt ?? e.title,
194
- className: "h-[90px] w-[160px] flex-none rounded-lg object-cover ring-1 ring-slate-200",
197
+ className: "h-[90px] w-[160px] flex-none rounded-lg object-cover ring-1 ring-slate-200 dark:ring-slate-700",
195
198
  loading: "lazy"
196
199
  }
197
- ) : /* @__PURE__ */ n("div", { className: "h-[90px] w-[160px] flex-none rounded-lg bg-slate-100 ring-1 ring-slate-200" }),
200
+ ) : null,
198
201
  /* @__PURE__ */ o("div", { className: "min-w-0 flex-1 flex flex-col justify-between", children: [
199
- e.description ? /* @__PURE__ */ n("div", { className: "line-clamp-2 text-sm text-[#666]", children: e.description }) : null,
202
+ e.description ? /* @__PURE__ */ i("div", { className: "line-clamp-2 text-sm text-[#666]", children: e.description }) : null,
200
203
  e.breadcrumbs?.length || e.author || e.date ? /* @__PURE__ */ o("div", { className: "mt-2 flex min-w-0 items-center gap-3 text-[#666]", children: [
201
- /* @__PURE__ */ n(C, { breadcrumbs: e.breadcrumbs }),
202
- /* @__PURE__ */ n("span", { className: "h-3 w-px flex-none bg-[#666]", "aria-hidden": "true" }),
204
+ /* @__PURE__ */ i(b, { breadcrumbs: e.breadcrumbs }),
205
+ /* @__PURE__ */ i("span", { className: "h-3 w-px flex-none bg-[#666]", "aria-hidden": "true" }),
203
206
  /* @__PURE__ */ o("div", { className: "flex flex-none items-center gap-2", children: [
204
- /* @__PURE__ */ n(_, { author: e.author, date: e.date }),
205
- e.href ? /* @__PURE__ */ n("span", { className: "flex-none text-[#007EFF]", children: /* @__PURE__ */ n(E, { className: "h-3 w-3" }) }) : null
207
+ /* @__PURE__ */ i($, { author: e.author, date: e.date }),
208
+ e.href ? /* @__PURE__ */ i("span", { className: "flex-none text-[#007EFF]", children: /* @__PURE__ */ i(L, { className: "h-3 w-3" }) }) : null
206
209
  ] })
207
- ] }) : /* @__PURE__ */ n($, { meta: e.meta })
210
+ ] }) : /* @__PURE__ */ i(z, { meta: e.meta })
208
211
  ] })
209
212
  ] })
210
213
  ] });
211
- return !l && !r ? s : /* @__PURE__ */ n(
214
+ return !l && !n ? a : /* @__PURE__ */ i(
212
215
  v,
213
216
  {
214
217
  href: l,
215
218
  target: e.target,
216
219
  rel: e.rel,
217
- onClick: r,
218
- className: "group block w-full rounded-xl px-3 text-left no-underline transition hover:bg-slate-50 focus:outline-none focus-visible:ring-2 focus-visible:ring-slate-300",
219
- children: s
220
+ onClick: n,
221
+ className: c(
222
+ "group block w-full rounded-xl border border-transparent px-6 py-3 text-left no-underline transition-colors",
223
+ "hover:border-slate-200 hover:bg-slate-100/70 focus:outline-none focus-visible:ring-2 focus-visible:ring-slate-300",
224
+ "dark:hover:border-slate-700 dark:hover:bg-slate-800/60 dark:focus-visible:ring-slate-600"
225
+ ),
226
+ children: a
220
227
  }
221
228
  );
222
229
  }
@@ -224,37 +231,39 @@ function V({
224
231
  item: e,
225
232
  onItemClick: t
226
233
  }) {
227
- const i = e.breadcrumbs ?? [e.sourceLabel, e.categoryLabel].filter(Boolean), r = e.onClick ? void 0 : e.href;
234
+ const r = e.breadcrumbs ?? [e.sourceLabel, e.categoryLabel].filter(Boolean), n = e.onClick ? void 0 : e.href;
228
235
  return /* @__PURE__ */ o(
229
236
  v,
230
237
  {
231
- href: r,
238
+ href: n,
232
239
  target: e.target,
233
240
  rel: e.rel,
234
241
  onClick: () => {
235
242
  e.onClick?.(), t?.(e);
236
243
  },
237
244
  className: c(
238
- "group w-full rounded-xl text-left transition",
239
- "hover:border-slate-300 hover:bg-slate-50 focus:outline-none focus-visible:ring-2 focus-visible:ring-slate-300"
245
+ "group block w-full rounded-xl border border-transparent text-left no-underline transition-colors"
240
246
  ),
241
247
  children: [
242
- /* @__PURE__ */ n("div", { className: "overflow-hidden rounded-lg ring-1 ring-slate-200", children: /* @__PURE__ */ o("div", { className: "relative aspect-4/3 bg-slate-100", children: [
243
- /* @__PURE__ */ n(
248
+ /* @__PURE__ */ i("div", { className: "overflow-hidden rounded-lg ring-1 ring-slate-200 dark:ring-slate-700", children: /* @__PURE__ */ o("div", { className: "relative aspect-4/3 bg-slate-100 dark:bg-slate-800", children: [
249
+ /* @__PURE__ */ i(
244
250
  "img",
245
251
  {
246
252
  src: e.thumbnailUrl,
247
253
  alt: e.thumbnailAlt ?? e.title,
248
- className: "absolute inset-0 h-full w-full object-cover",
254
+ className: "absolute inset-0 h-full w-full object-cover transform-gpu transition-transform duration-300 ease-out group-hover:scale-[1.1]",
249
255
  loading: "lazy"
250
256
  }
251
257
  ),
252
- e.mediaType === "video" ? /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "inline-flex h-10 w-10 items-center justify-center rounded-full bg-black/55 text-white ring-1 ring-white/30", children: /* @__PURE__ */ n(L, { className: "h-5 w-5 translate-x-px" }) }) }) : null
258
+ e.mediaType === "video" ? /* @__PURE__ */ i("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ i("span", { className: "inline-flex h-10 w-10 items-center justify-center rounded-full bg-black/55 text-white ring-1 ring-white/30", children: /* @__PURE__ */ i(S, { className: "h-5 w-5 translate-x-px" }) }) }) : null
253
259
  ] }) }),
254
260
  /* @__PURE__ */ o("div", { className: "mt-2", children: [
255
- /* @__PURE__ */ n("div", { className: "truncate text-sm font-medium", children: e.title }),
256
- e.matchCountText ? /* @__PURE__ */ n("div", { className: "mt-1 truncate text-xs text-[#666]", children: e.matchCountText }) : null,
257
- i.length ? /* @__PURE__ */ n("div", { className: "mt-2 text-[#666]", children: /* @__PURE__ */ n(C, { breadcrumbs: i }) }) : null
261
+ /* @__PURE__ */ i("div", { className: "mb-1 truncate text-sm text-[#1A0CAB] dark:text-[#8AB4F8]", children: e.title }),
262
+ e.matchCountText ? /* @__PURE__ */ i("div", { className: "mb-1 truncate text-xs text-[#666]", children: e.matchCountText }) : null,
263
+ r.length ? /* @__PURE__ */ o("div", { className: "text-[#666]", children: [
264
+ /* @__PURE__ */ i(b, { breadcrumbs: r }),
265
+ " "
266
+ ] }) : null
258
267
  ] })
259
268
  ]
260
269
  }
@@ -264,46 +273,44 @@ function P({
264
273
  action: e,
265
274
  className: t
266
275
  }) {
267
- const i = c(
268
- "flex-none inline-flex items-center justify-center rounded-full border border-slate-200 bg-white",
269
- "h-9 px-12 text-sm font-medium text-slate-700 no-underline transition",
276
+ const r = c(
277
+ "flex-none inline-flex items-center justify-center rounded-full border border-[#e8e8e8] bg-white",
278
+ "h-7 px-12 text-sm text-[#666] no-underline transition",
270
279
  "cursor-pointer hover:border-slate-300 hover:bg-slate-50 hover:no-underline",
271
280
  "focus:outline-none focus-visible:ring-2 focus-visible:ring-slate-300",
281
+ "dark:border-slate-700 dark:bg-slate-900 dark:text-slate-200 dark:hover:border-slate-600 dark:hover:bg-slate-800 dark:focus-visible:ring-slate-600",
272
282
  t
273
283
  );
274
- return e.href ? /* @__PURE__ */ n(
284
+ return e.href ? /* @__PURE__ */ i(
275
285
  "a",
276
286
  {
277
- className: i,
287
+ className: r,
278
288
  href: e.href,
279
289
  target: e.target,
280
290
  rel: A(e.rel, e.target),
281
291
  onClick: () => e.onClick?.(),
282
292
  children: e.label
283
293
  }
284
- ) : /* @__PURE__ */ n("button", { className: i, type: "button", onClick: e.onClick, children: e.label });
294
+ ) : /* @__PURE__ */ i("button", { className: r, type: "button", onClick: e.onClick, children: e.label });
285
295
  }
286
296
  function h({ action: e }) {
287
297
  return e ? /* @__PURE__ */ o("div", { className: "mt-3 flex w-full items-center", children: [
288
- /* @__PURE__ */ n("span", { className: "h-px flex-1 bg-[#E8E8E8]", "aria-hidden": "true" }),
289
- /* @__PURE__ */ n(
298
+ /* @__PURE__ */ i("span", { className: "h-px flex-1 bg-[#e8e8e8] dark:bg-slate-700", "aria-hidden": "true" }),
299
+ /* @__PURE__ */ i(
290
300
  P,
291
301
  {
292
302
  action: e,
293
- className: c(
294
- "rounded-full border border-[#E8E8E8] bg-white px-4 py-2 text-sm font-medium text-[#333] transition",
295
- "hover:border-[#E8E8E8] hover:bg-[#F5F5F5]"
296
- )
303
+ className: c("px-4")
297
304
  }
298
305
  ),
299
- /* @__PURE__ */ n("span", { className: "h-px flex-1 bg-[#E8E8E8]", "aria-hidden": "true" })
306
+ /* @__PURE__ */ i("span", { className: "h-px flex-1 bg-[#e8e8e8] dark:bg-slate-700", "aria-hidden": "true" })
300
307
  ] }) : null;
301
308
  }
302
309
  function O(e, t) {
303
310
  if (e.layout === "list")
304
311
  return /* @__PURE__ */ o("div", { className: c("space-y-6", e.className), children: [
305
- /* @__PURE__ */ n(
306
- y,
312
+ /* @__PURE__ */ i(
313
+ g,
307
314
  {
308
315
  title: e.title,
309
316
  titleIcon: e.titleIcon,
@@ -311,14 +318,14 @@ function O(e, t) {
311
318
  titleClassName: e.titleClassName
312
319
  }
313
320
  ),
314
- e.items.map((l) => /* @__PURE__ */ n(M, { item: l, onItemClick: t }, l.id)),
315
- /* @__PURE__ */ n(h, { action: e.footerAction })
321
+ e.items.map((l) => /* @__PURE__ */ i(D, { item: l, onItemClick: t }, l.id)),
322
+ /* @__PURE__ */ i(h, { action: e.footerAction })
316
323
  ] });
317
324
  if (e.layout === "mediaGrid") {
318
- const l = e.columns ?? 3, s = l === 2 ? "grid-cols-2" : l === 4 ? "grid-cols-4" : "grid-cols-3";
319
- return /* @__PURE__ */ o("div", { className: c(e.className), children: [
320
- /* @__PURE__ */ n(
321
- y,
325
+ const l = e.columns ?? 3, a = l === 2 ? "grid-cols-2" : l === 4 ? "grid-cols-4" : "grid-cols-3";
326
+ return /* @__PURE__ */ o("div", { className: c("px-6 py-3", e.className), children: [
327
+ /* @__PURE__ */ i(
328
+ g,
322
329
  {
323
330
  title: e.title,
324
331
  titleIcon: e.titleIcon,
@@ -326,14 +333,14 @@ function O(e, t) {
326
333
  titleClassName: e.titleClassName
327
334
  }
328
335
  ),
329
- /* @__PURE__ */ n("div", { className: c("grid gap-3", s), children: e.items.map((a) => /* @__PURE__ */ n(V, { item: a, onItemClick: t }, a.id)) }),
330
- /* @__PURE__ */ n(h, { action: e.footerAction })
336
+ /* @__PURE__ */ i("div", { className: c("grid gap-3", a), children: e.items.map((s) => /* @__PURE__ */ i(V, { item: s, onItemClick: t }, s.id)) }),
337
+ /* @__PURE__ */ i(h, { action: e.footerAction })
331
338
  ] });
332
339
  }
333
- const i = e.columns ?? 3, r = i === 2 ? "grid-cols-2" : i === 4 ? "grid-cols-4" : "grid-cols-3";
334
- return /* @__PURE__ */ o("div", { className: c(e.className), children: [
335
- /* @__PURE__ */ n(
336
- y,
340
+ const r = e.columns ?? 3, n = r === 2 ? "grid-cols-2" : r === 4 ? "grid-cols-4" : "grid-cols-3";
341
+ return /* @__PURE__ */ o("div", { className: c("px-6 py-3", e.className), children: [
342
+ /* @__PURE__ */ i(
343
+ g,
337
344
  {
338
345
  title: e.title,
339
346
  titleIcon: e.titleIcon,
@@ -341,8 +348,8 @@ function O(e, t) {
341
348
  titleClassName: e.titleClassName
342
349
  }
343
350
  ),
344
- /* @__PURE__ */ n("div", { className: c("grid gap-3", r), children: e.items.map((l) => /* @__PURE__ */ n(U, { item: l, onItemClick: t }, l.id)) }),
345
- /* @__PURE__ */ n(h, { action: e.footerAction })
351
+ /* @__PURE__ */ i("div", { className: c("grid gap-3", n), children: e.items.map((l) => /* @__PURE__ */ i(_, { item: l, onItemClick: t }, l.id)) }),
352
+ /* @__PURE__ */ i(h, { action: e.footerAction })
346
353
  ] });
347
354
  }
348
355
  function q(e) {
@@ -355,54 +362,59 @@ function J(e) {
355
362
  if (t)
356
363
  return t === "pdf" ? "pdf" : t === "doc" || t === "docx" || t === "word" ? "doc" : t === "ppt" || t === "pptx" ? "ppt" : t === "xls" || t === "xlsx" || t === "excel" ? "xls" : t === "link" || t === "url" || t === "html" ? "link" : t === "txt" || t === "text" ? "text" : "unknown";
357
364
  }
358
- function b(e, t, i) {
359
- const r = e.thumbnail ?? e.cover ?? e.metadata?.thumbnail_link, l = e.summary ?? e.content, s = J(e.metadata?.file_extension ?? e.type), a = e.source?.name, u = e.category ?? e.categories?.join(" / ") ?? "Categories", d = [a, u].filter(Boolean), m = e.last_updated_by?.user?.username ?? e.owner?.username, p = q(e.last_updated_by?.timestamp ?? e.metadata?.last_reviewed), f = e.metadata?.icon_link ?? e.icon, g = f ? /* @__PURE__ */ n("img", { src: f, alt: "", className: "h-5 w-5 rounded-sm object-contain" }) : void 0;
365
+ function x(e, t, r) {
366
+ const n = e.thumbnail ?? e.cover ?? e.metadata?.thumbnail_link, l = e.summary ?? e.content, a = J(e.metadata?.file_extension ?? e.type), s = e.source?.name, u = e.category ?? e.categories?.join(" / ") ?? "Categories", d = [s, u].filter(Boolean), m = e.last_updated_by?.user?.username ?? e.owner?.username, p = q(e.last_updated_by?.timestamp ?? e.metadata?.last_reviewed), f = e.metadata?.icon_link ?? e.icon, y = f ? /* @__PURE__ */ i("img", { src: f, alt: "", className: "h-5 w-5 rounded-sm object-contain" }) : void 0;
360
367
  return {
361
368
  type: "result",
362
369
  id: `${e.source?.id ?? e.url ?? e.title}-${t}`,
363
370
  title: e.title,
364
371
  href: e.url,
365
372
  description: l,
366
- thumbnailUrl: r,
367
- fileType: s,
368
- typeIcon: g,
373
+ thumbnailUrl: n,
374
+ fileType: a,
375
+ typeIcon: y,
369
376
  breadcrumbs: d.length ? d : void 0,
370
377
  author: m,
371
378
  date: p,
372
- onClick: i
379
+ onClick: r
373
380
  };
374
381
  }
375
- function I({
382
+ function C({
376
383
  section: e,
377
384
  className: t,
378
- footerAction: i,
379
- onRecordClick: r,
380
- onItemClick: l
385
+ theme: r,
386
+ footerAction: n,
387
+ onRecordClick: l,
388
+ onItemClick: a
381
389
  }) {
382
- const s = K(j(e, r), i);
383
- return /* @__PURE__ */ n("div", { className: c(t), children: O(s, l) });
390
+ const s = Q(I(e, l), n), u = K(r);
391
+ return /* @__PURE__ */ i("div", { className: c(u === "dark" && "dark", t), children: O(s, a) });
384
392
  }
385
- function K(e, t) {
386
- return !t || e.footerAction ? e : e.layout === "list" ? { ...e, footerAction: t } : e.layout === "mediaGrid" ? { ...e, footerAction: t } : { ...e, footerAction: t };
393
+ function K(e) {
394
+ if (e)
395
+ return e === "light" ? "light" : e === "dark" || typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
387
396
  }
388
- function ee(e) {
389
- return /* @__PURE__ */ n(I, { ...e });
397
+ function Q(e, t) {
398
+ return !t || e.footerAction ? e : e.layout === "list" ? { ...e, footerAction: t } : e.layout === "mediaGrid" ? { ...e, footerAction: t } : { ...e, footerAction: t };
390
399
  }
391
400
  function te(e) {
392
- return /* @__PURE__ */ n(I, { ...e });
393
- }
394
- function j(e, t) {
395
- if (Array.isArray(e)) return Q(e, t);
396
- if (X(e)) return e;
397
- const i = e;
398
- if (i.type === "imageGroup" && Array.isArray(i.items)) {
399
- const l = i;
401
+ return /* @__PURE__ */ i(C, { ...e });
402
+ }
403
+ function re(e) {
404
+ return /* @__PURE__ */ i(C, { ...e });
405
+ }
406
+ function I(e, t) {
407
+ if (Array.isArray(e)) return W(e, t);
408
+ if (Y(e)) return e;
409
+ const r = e;
410
+ if (r.type === "imageGroup" && Array.isArray(r.items)) {
411
+ const l = r;
400
412
  return l.items[0]?.type === "media" ? {
401
413
  type: "section",
402
414
  title: l.title,
403
415
  layout: "mediaGrid",
404
416
  items: l.items.filter(
405
- (a) => typeof a == "object" && !!a && a.type === "media"
417
+ (s) => typeof s == "object" && !!s && s.type === "media"
406
418
  ),
407
419
  columns: l.columns,
408
420
  footerAction: l.footerAction,
@@ -412,15 +424,15 @@ function j(e, t) {
412
424
  title: l.title,
413
425
  layout: "imageGrid",
414
426
  items: l.items.filter(
415
- (a) => typeof a == "object" && !!a && a.type === "image"
427
+ (s) => typeof s == "object" && !!s && s.type === "image"
416
428
  ),
417
429
  columns: l.columns,
418
430
  footerAction: l.footerAction,
419
431
  className: l.className
420
432
  };
421
433
  }
422
- if (i.type === "videoGroup" && Array.isArray(i.items)) {
423
- const l = i;
434
+ if (r.type === "videoGroup" && Array.isArray(r.items)) {
435
+ const l = r;
424
436
  return {
425
437
  type: "section",
426
438
  title: l.title,
@@ -431,42 +443,42 @@ function j(e, t) {
431
443
  className: l.className
432
444
  };
433
445
  }
434
- if (i.type === "result")
446
+ if (r.type === "result")
435
447
  return {
436
448
  type: "section",
437
449
  layout: "list",
438
450
  items: [e]
439
451
  };
440
- if (i.type === "media")
452
+ if (r.type === "media")
441
453
  return {
442
454
  type: "section",
443
455
  layout: "mediaGrid",
444
456
  items: [e]
445
457
  };
446
- if (i.type === "image" && typeof i.imageUrl == "string")
458
+ if (r.type === "image" && typeof r.imageUrl == "string")
447
459
  return {
448
460
  type: "section",
449
461
  layout: "imageGrid",
450
462
  items: [e]
451
463
  };
452
- const r = typeof i.type == "string" ? i.type.trim().toLowerCase() : void 0;
453
- if (r === "image" || r === "video") {
454
- const l = typeof i.id == "string" ? i.id : void 0, s = typeof i.thumbnail == "string" ? i.thumbnail : typeof i.cover == "string" ? i.cover : typeof i.metadata == "object" && i.metadata && typeof i.metadata.thumbnail_link == "string" ? i.metadata.thumbnail_link : void 0;
455
- if (s) {
456
- const a = typeof i.category == "string" ? i.category : Array.isArray(i.categories) ? i.categories.filter((f) => typeof f == "string").join(" / ") : void 0, u = typeof i.title == "string" ? i.title : "Untitled", d = typeof i.url == "string" ? i.url : void 0, m = typeof i.source == "object" && i.source && typeof i.source.name == "string" ? i.source.name : void 0;
464
+ const n = typeof r.type == "string" ? r.type.trim().toLowerCase() : void 0;
465
+ if (n === "image" || n === "video") {
466
+ const l = typeof r.id == "string" ? r.id : void 0, a = typeof r.thumbnail == "string" ? r.thumbnail : typeof r.cover == "string" ? r.cover : typeof r.metadata == "object" && r.metadata && typeof r.metadata.thumbnail_link == "string" ? r.metadata.thumbnail_link : void 0;
467
+ if (a) {
468
+ const s = typeof r.category == "string" ? r.category : Array.isArray(r.categories) ? r.categories.filter((f) => typeof f == "string").join(" / ") : void 0, u = typeof r.title == "string" ? r.title : "Untitled", d = typeof r.url == "string" ? r.url : void 0, m = typeof r.source == "object" && r.source && typeof r.source.name == "string" ? r.source.name : void 0;
457
469
  return {
458
470
  type: "section",
459
471
  layout: "mediaGrid",
460
472
  items: [{
461
473
  type: "media",
462
474
  id: l ?? `${d ?? u}-0`,
463
- mediaType: r === "video" ? "video" : "image",
475
+ mediaType: n === "video" ? "video" : "image",
464
476
  title: u,
465
477
  href: t ? void 0 : d,
466
- thumbnailUrl: s,
478
+ thumbnailUrl: a,
467
479
  sourceLabel: m,
468
- categoryLabel: a,
469
- breadcrumbs: [m, a].filter(Boolean),
480
+ categoryLabel: s,
481
+ breadcrumbs: [m, s].filter(Boolean),
470
482
  ...t ? { onClick: () => t(e, 0) } : {}
471
483
  }]
472
484
  };
@@ -476,7 +488,7 @@ function j(e, t) {
476
488
  type: "section",
477
489
  layout: "list",
478
490
  items: [
479
- b(
491
+ x(
480
492
  e,
481
493
  0,
482
494
  t ? () => t(e, 0) : void 0
@@ -484,158 +496,158 @@ function j(e, t) {
484
496
  ]
485
497
  };
486
498
  }
487
- function Q(e, t) {
499
+ function W(e, t) {
488
500
  if (!e.length)
489
501
  return { type: "section", layout: "list", items: [] };
490
- if (e.every(G)) {
491
- if (e.every((s) => s.type === "result"))
502
+ if (e.every(B)) {
503
+ if (e.every((a) => a.type === "result"))
492
504
  return { type: "section", layout: "list", items: e };
493
- if (e.every((s) => s.type === "media"))
505
+ if (e.every((a) => a.type === "media"))
494
506
  return { type: "section", layout: "mediaGrid", items: e };
495
- if (e.every((s) => s.type === "image" && "imageUrl" in s))
507
+ if (e.every((a) => a.type === "image" && "imageUrl" in a))
496
508
  return { type: "section", layout: "imageGrid", items: e };
497
- if (e.length === 1) return j(e[0], t);
509
+ if (e.length === 1) return I(e[0], t);
498
510
  }
499
- const i = [], r = [];
500
- for (const [s, a] of e.entries()) {
501
- const u = W(a, s, t);
502
- u ? i.push(u) : r.push(
503
- b(
504
- a,
511
+ const r = [], n = [];
512
+ for (const [a, s] of e.entries()) {
513
+ const u = X(s, a, t);
514
+ u ? r.push(u) : n.push(
515
+ x(
505
516
  s,
506
- t ? () => t(a, s) : void 0
517
+ a,
518
+ t ? () => t(s, a) : void 0
507
519
  )
508
520
  );
509
521
  }
510
- return i.length && !r.length ? { type: "section", title: w(e, (a) => a.category ?? a.source?.name), layout: "mediaGrid", items: i } : { type: "section", title: w(e, (s) => s.category ?? s.source?.name), layout: "list", items: r };
522
+ return r.length && !n.length ? { type: "section", title: k(e, (s) => s.category ?? s.source?.name), layout: "mediaGrid", items: r } : { type: "section", title: k(e, (a) => a.category ?? a.source?.name), layout: "list", items: n };
511
523
  }
512
- function G(e) {
524
+ function B(e) {
513
525
  if (!e || typeof e != "object") return !1;
514
526
  const t = e;
515
527
  return t.type === "result" || t.type === "media" || t.type === "imageGroup" || t.type === "videoGroup" || t.type === "image" && typeof e.imageUrl == "string";
516
528
  }
517
- function W(e, t, i) {
518
- const r = e, l = typeof r.type == "string" ? r.type.trim().toLowerCase() : void 0;
529
+ function X(e, t, r) {
530
+ const n = e, l = typeof n.type == "string" ? n.type.trim().toLowerCase() : void 0;
519
531
  if (l !== "image" && l !== "video") return;
520
- const s = typeof r.id == "string" ? r.id : void 0, a = typeof r.thumbnail == "string" ? r.thumbnail : typeof r.cover == "string" ? r.cover : typeof r.metadata == "object" && r.metadata && typeof r.metadata.thumbnail_link == "string" ? r.metadata.thumbnail_link : void 0;
521
- if (!a) return;
522
- const u = typeof r.category == "string" ? r.category : Array.isArray(r.categories) ? r.categories.filter((g) => typeof g == "string").join(" / ") : void 0, d = typeof r.title == "string" ? r.title : "Untitled", m = typeof r.url == "string" ? r.url : void 0, p = typeof r.source == "object" && r.source && typeof r.source.name == "string" ? r.source.name : void 0, f = !!i && !G(e);
532
+ const a = typeof n.id == "string" ? n.id : void 0, s = typeof n.thumbnail == "string" ? n.thumbnail : typeof n.cover == "string" ? n.cover : typeof n.metadata == "object" && n.metadata && typeof n.metadata.thumbnail_link == "string" ? n.metadata.thumbnail_link : void 0;
533
+ if (!s) return;
534
+ const u = typeof n.category == "string" ? n.category : Array.isArray(n.categories) ? n.categories.filter((y) => typeof y == "string").join(" / ") : void 0, d = typeof n.title == "string" ? n.title : "Untitled", m = typeof n.url == "string" ? n.url : void 0, p = typeof n.source == "object" && n.source && typeof n.source.name == "string" ? n.source.name : void 0, f = !!r && !B(e);
523
535
  return {
524
536
  type: "media",
525
- id: s ?? `${m ?? d}-0`,
537
+ id: a ?? `${m ?? d}-0`,
526
538
  mediaType: l === "video" ? "video" : "image",
527
539
  title: d,
528
540
  href: f ? void 0 : m,
529
- thumbnailUrl: a,
541
+ thumbnailUrl: s,
530
542
  sourceLabel: p,
531
543
  categoryLabel: u,
532
544
  breadcrumbs: [p, u].filter(Boolean),
533
- ...f ? { onClick: () => i(e, t) } : {}
545
+ ...f ? { onClick: () => r(e, t) } : {}
534
546
  };
535
547
  }
536
- function w(e, t) {
537
- const i = e[0], r = t(i);
538
- if (r) {
548
+ function k(e, t) {
549
+ const r = e[0], n = t(r);
550
+ if (n) {
539
551
  for (const l of e)
540
- if (t(l) !== r) return;
541
- return r;
552
+ if (t(l) !== n) return;
553
+ return n;
542
554
  }
543
555
  }
544
- function X(e) {
556
+ function Y(e) {
545
557
  if (!e || typeof e != "object") return !1;
546
558
  const t = e;
547
559
  return t.type === "section" && (t.layout === "list" || t.layout === "imageGrid" || t.layout === "mediaGrid") && Array.isArray(t.items);
548
560
  }
549
- function ie(e, t) {
550
- const i = [];
551
- for (const r of e) {
552
- const l = i.length ? i[i.length - 1] : void 0;
553
- if (r.type === "imageGroup") {
554
- r.items[0]?.type === "media" ? i.push({
561
+ function ne(e, t) {
562
+ const r = [];
563
+ for (const n of e) {
564
+ const l = r.length ? r[r.length - 1] : void 0;
565
+ if (n.type === "imageGroup") {
566
+ n.items[0]?.type === "media" ? r.push({
555
567
  type: "section",
556
- title: r.title,
557
- titleIcon: /* @__PURE__ */ n(x, { className: "h-4 w-4" }),
568
+ title: n.title,
569
+ titleIcon: /* @__PURE__ */ i(N, { className: "h-4 w-4" }),
558
570
  titleIconBgColor: "#FFAF36",
559
- titleClassName: "text-[#1A0CAB]",
571
+ titleClassName: "text-[#1A0CAB] dark:text-[#8AB4F8]",
560
572
  layout: "mediaGrid",
561
- items: r.items.filter((a) => a.type === "media"),
562
- columns: r.columns ?? t,
563
- footerAction: r.footerAction,
564
- className: r.className
565
- }) : i.push({
573
+ items: n.items.filter((s) => s.type === "media"),
574
+ columns: n.columns ?? t,
575
+ footerAction: n.footerAction,
576
+ className: n.className
577
+ }) : r.push({
566
578
  type: "section",
567
- title: r.title,
568
- titleIcon: /* @__PURE__ */ n(x, { className: "h-4 w-4" }),
579
+ title: n.title,
580
+ titleIcon: /* @__PURE__ */ i(N, { className: "h-4 w-4" }),
569
581
  titleIconBgColor: "#FFAF36",
570
- titleClassName: "text-[#1A0CAB]",
582
+ titleClassName: "text-[#1A0CAB] dark:text-[#8AB4F8]",
571
583
  layout: "imageGrid",
572
- items: r.items.filter((a) => a.type === "image"),
573
- columns: r.columns ?? t,
574
- footerAction: r.footerAction,
575
- className: r.className
584
+ items: n.items.filter((s) => s.type === "image"),
585
+ columns: n.columns ?? t,
586
+ footerAction: n.footerAction,
587
+ className: n.className
576
588
  });
577
589
  continue;
578
590
  }
579
- if (r.type === "videoGroup") {
580
- i.push({
591
+ if (n.type === "videoGroup") {
592
+ r.push({
581
593
  type: "section",
582
- title: r.title,
583
- titleIcon: /* @__PURE__ */ n(S, { className: "h-4 w-4" }),
594
+ title: n.title,
595
+ titleIcon: /* @__PURE__ */ i(U, { className: "h-4 w-4" }),
584
596
  titleIconBgColor: "#1784FC",
585
- titleClassName: "text-[#1A0CAB]",
597
+ titleClassName: "text-[#1A0CAB] dark:text-[#8AB4F8]",
586
598
  layout: "mediaGrid",
587
- items: r.items,
588
- columns: r.columns ?? t,
589
- footerAction: r.footerAction,
590
- className: r.className
599
+ items: n.items,
600
+ columns: n.columns ?? t,
601
+ footerAction: n.footerAction,
602
+ className: n.className
591
603
  });
592
604
  continue;
593
605
  }
594
- if (r.type === "result") {
606
+ if (n.type === "result") {
595
607
  if (l?.layout === "list") {
596
- l.items.push(r);
608
+ l.items.push(n);
597
609
  continue;
598
610
  }
599
- i.push({
611
+ r.push({
600
612
  type: "section",
601
613
  layout: "list",
602
- items: [r]
614
+ items: [n]
603
615
  });
604
616
  continue;
605
617
  }
606
- if (r.type === "media") {
618
+ if (n.type === "media") {
607
619
  if (l?.layout === "mediaGrid") {
608
- l.items.push(r);
620
+ l.items.push(n);
609
621
  continue;
610
622
  }
611
- i.push({
623
+ r.push({
612
624
  type: "section",
613
625
  layout: "mediaGrid",
614
626
  ...t ? { columns: t } : {},
615
- items: [r]
627
+ items: [n]
616
628
  });
617
629
  continue;
618
630
  }
619
631
  if (l?.layout === "imageGrid") {
620
- l.items.push(r);
632
+ l.items.push(n);
621
633
  continue;
622
634
  }
623
- i.push({
635
+ r.push({
624
636
  type: "section",
625
637
  layout: "imageGrid",
626
638
  ...t ? { columns: t } : {},
627
- items: [r]
639
+ items: [n]
628
640
  });
629
641
  }
630
- return i;
642
+ return r;
631
643
  }
632
- function re(e) {
633
- return e.map((t, i) => b(t, i));
644
+ function ie(e) {
645
+ return e.map((t, r) => x(t, r));
634
646
  }
635
647
  export {
636
- ee as SearchResultsImageGroup,
637
- te as SearchResultsVideoGroup,
638
- I as default,
639
- ie as itemsToSections,
640
- re as recordsToItems
648
+ te as SearchResultsImageGroup,
649
+ re as SearchResultsVideoGroup,
650
+ C as default,
651
+ ne as itemsToSections,
652
+ ie as recordsToItems
641
653
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infinilabs/search-results",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },