@infinilabs/search-results 0.0.16 → 0.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -64,7 +64,7 @@ export declare type SearchResultMediaItem = SearchResultCommon & {
64
64
  onClick?: () => void;
65
65
  };
66
66
 
67
- declare function SearchResults({ section, className, theme, footerAction, onRecordClick, onItemClick, hideHeader }: SearchResultsProps): JSX_2.Element;
67
+ declare function SearchResults({ section, className, theme, footerAction, onRecordClick, onItemClick, hideHeader, requestHeaders }: SearchResultsProps): JSX_2.Element;
68
68
  export default SearchResults;
69
69
 
70
70
  export declare type SearchResultsAction = {
@@ -91,6 +91,7 @@ export declare type SearchResultsProps = {
91
91
  onRecordClick?: (record: SearchResultsRecord, index: number) => void;
92
92
  onItemClick?: (item: SearchResultsItem) => void;
93
93
  hideHeader?: boolean;
94
+ requestHeaders?: Record<string, string>;
94
95
  };
95
96
 
96
97
  export declare type SearchResultsRecord = {
@@ -1,2 +1 @@
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-500:oklch(55.4% .046 257.417);--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-4{margin-top:calc(var(--spacing)*4)}.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-3{-webkit-line-clamp:3;-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!important}.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!important}.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-100\\/70{background-color:#f1f5f9b3}@supports (color:color-mix(in lab,red,red)){.bg-slate-100\\/70{background-color:color-mix(in oklab,var(--color-slate-100)70%,transparent)}}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-950{background-color:var(--color-slate-950)}.bg-transparent{background-color:#0000}.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-0{padding:calc(var(--spacing)*0)}.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-6\\!{padding-inline:calc(var(--spacing)*6)!important}.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-3{padding-block:calc(var(--spacing)*3)}.py-4\\!{padding-block:calc(var(--spacing)*4)!important}.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-800\\/60:where(.dark,.dark *){background-color:#1d293d99}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-slate-800\\/60:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-slate-800)60%,transparent)}}.dark\\:bg-slate-900:where(.dark,.dark *){background-color:var(--color-slate-900)}.dark\\:bg-transparent:where(.dark,.dark *){background-color:#0000}.dark\\:text-\\[\\#8AB4F8\\]:where(.dark,.dark *){color:#8ab4f8}.dark\\:text-slate-200:where(.dark,.dark *){color:var(--color-slate-200)}.dark\\:text-slate-300:where(.dark,.dark *){color:var(--color-slate-300)}.dark\\:ring-slate-700:where(.dark,.dark *){--tw-ring-color:var(--color-slate-700)}@media(hover:hover){.dark\\:hover\\:border-slate-500:where(.dark,.dark *):hover{border-color:var(--color-slate-500)}.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,n)=>r.jsxs("span",{children:[n>0?r.jsx("span",{className:"mx-1",children:">"}):null,r.jsx("span",{className:"",children:t})]},`${t}-${n}`))}):null}function A(e,t){const n=t==="_blank"?"noreferrer noopener":"";return e?n?[...new Set([...e.split(" "),...n.split(" ")].filter(Boolean))].join(" "):e:n||void 0}function v({href:e,target:t,rel:n,onClick:s,className:i,children:l}){const a=i?`${i} cursor-pointer`:"cursor-pointer";return e?r.jsx("a",{href:e,target:t,rel:A(n,t),className:a,onClick:()=>s?.(),children:l}):r.jsx("button",{type:"button",className:a,onClick:s,children:l})}function F({item:e,onItemClick:t}){const n=e.onClick?void 0:e.href,s=e.breadcrumbs??[];return r.jsxs(v,{href:n,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,s.length?r.jsx("div",{className:"text-[#666]",children:r.jsx(h,{breadcrumbs:s})}):null]})]})}function T({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 G({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,n)=>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}-${n}`))}):null}function g({title:e,titleIcon:t,titleIconBgColor:n,source:s,className:i,titleClassName:l,titleAction:a}){return!e&&!t&&!s?null:r.jsxs("div",{className:o("mb-2 flex min-w-0 items-center gap-2",i),children:[t?r.jsx("span",{className:o("inline-flex h-6 w-6 flex-none items-center justify-center",n&&"rounded-md text-white"),style:n?{backgroundColor:n}:void 0,children:t}):null,e?a?.href?r.jsx("a",{className:o("min-w-0 cursor-pointer text-xl hover:underline hover:underline-offset-2 group-hover:underline group-hover:underline-offset-2",l),href:a.href,target:a.target,rel:a.rel,onClick:()=>a.onClick?.(),children:e}):r.jsx("button",{type:"button",className:o("min-w-0 cursor-pointer bg-transparent p-0 text-left text-xl hover:underline hover:underline-offset-2 group-hover:underline group-hover:underline-offset-2",l),onClick:a?.onClick,children:e}):null]})}function S(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 L(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 k({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",S(e)),children:L(e)}):null}const _=u.ExternalLink;function $({item:e,onItemClick:t}){const n=e.typeIcon?r.jsx(k,{typeIcon:e.typeIcon}):e.fileType?r.jsx(k,{fileType:e.fileType}):null,s=e.onClick||t?()=>{e.onClick?.(),t?.(e)}:void 0,i=e.onClick?void 0:e.href,l=r.jsxs("div",{className:"w-full",children:[r.jsx("div",{className:"flex min-w-0 items-center gap-2",children:r.jsx(g,{className:"mb-0 w-full",title:e.title,titleIcon:n,source:e.source,titleClassName:"truncate text-[#1A0CAB] dark:text-[#8AB4F8]"})}),r.jsxs("div",{className:"flex gap-3",children:[e.cover?r.jsx("img",{src:e.cover,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.summary?r.jsx("div",{className:"line-clamp-3 text-sm text-[#666]",children:e.summary}):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(T,{author:e.author,date:e.date}),e.href?r.jsx("span",{className:"flex-none text-[#007EFF]",children:r.jsx(_,{className:"h-3 w-3"})}):null]})]}):r.jsx(G,{meta:e.meta})]})]})]});return!i&&!s?l:r.jsx(v,{href:i,target:e.target,rel:e.rel,onClick:s,className:o("group block w-full rounded-xl border border-transparent px-6! py-4! 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",e.isActive?"border-slate-200 bg-slate-100/70 dark:border-slate-700 dark:bg-slate-800/60":""),children:l})}function E({item:e,onItemClick:t}){const n=e.breadcrumbs??[e.sourceLabel,e.categoryLabel].filter(Boolean),s=e.onClick?void 0:e.href;return r.jsxs(v,{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.jsxs("div",{className:"relative aspect-4/3 bg-slate-100 dark:bg-slate-800",children:[r.jsx("img",{src:e.cover,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,n.length?r.jsxs("div",{className:"text-[#666]",children:[r.jsx(h,{breadcrumbs:n})," "]}):null]})]})}function M({action:e,className:t}){const n=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-transparent dark:text-slate-300 dark:hover:border-slate-500 dark:hover:bg-slate-800 dark:focus-visible:ring-slate-600",t);return e.href?r.jsx("a",{className:n,href:e.href,target:e.target,rel:A(e.rel,e.target),onClick:()=>e.onClick?.(),children:e.label}):r.jsx("button",{className:n,type:"button",onClick:e.onClick,children:e.label})}function y({action:e}){return e?r.jsxs("div",{className:"mt-4 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(M,{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 U(e,t,n){if(e.layout==="list")return r.jsxs("div",{className:o("space-y-6",e.className),children:[!n&&r.jsx(g,{title:e.title,titleIcon:e.titleIcon,titleIconBgColor:e.titleIconBgColor,titleClassName:e.titleClassName}),e.items.map(l=>r.jsx($,{item:l,onItemClick:t},l.id)),r.jsx(y,{action:e.footerAction})]});if(e.layout==="mediaGrid"){const l=e.columns??3,a=l===2?"grid-cols-2":l===4?"grid-cols-4":"grid-cols-3";return r.jsxs("div",{className:o("px-6 py-3",e.className),children:[!n&&r.jsx(g,{title:e.title,titleIcon:e.titleIcon,titleIconBgColor:e.titleIconBgColor,titleClassName:e.titleClassName,titleAction:e.footerAction}),r.jsx("div",{className:o("grid gap-3",a),children:e.items.map(c=>r.jsx(E,{item:c,onItemClick:t},c.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:[!n&&r.jsx(g,{title:e.title,titleIcon:e.titleIcon,titleIconBgColor:e.titleIconBgColor,titleClassName:e.titleClassName,titleAction:e.footerAction}),r.jsx("div",{className:o("grid gap-3",i),children:e.items.map(l=>r.jsx(F,{item:l,onItemClick:t},l.id))}),r.jsx(y,{action:e.footerAction})]})}function z(e){if(!e)return;const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toISOString().slice(0,10)}function R(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 b(e,t,n){const s=e.thumbnail??e.cover??e.metadata?.thumbnail_link,i=e.summary??e.content,l=R(e.metadata?.file_extension??e.type),a=e.source?.name,c=e.category??e.categories?.join(" / ")??"Categories",d=[a,c].filter(Boolean),f=e.last_updated_by?.user?.username??e.owner?.username,x=z(e.last_updated_by?.timestamp??e.metadata?.last_reviewed),m=e.metadata?.icon_link??e.icon,p=m?r.jsx("img",{src:m,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,summary:i,cover:s,fileType:l,typeIcon:p,breadcrumbs:d.length?d:void 0,author:f,date:x,onClick:n,isActive:!!e.isActive}}function j({section:e,className:t,theme:n,footerAction:s,onRecordClick:i,onItemClick:l,hideHeader:a}){const c=q(C(e,i),s),d=V(n);return r.jsx("div",{className:o(d==="dark"&&"dark",t),children:U(c,l,a)})}function V(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 q(e,t){return!t||e.footerAction?e:e.layout==="list"?{...e,footerAction:t}:e.layout==="mediaGrid"?{...e,footerAction:t}:{...e,footerAction:t}}function D(e){return r.jsx(j,{...e})}function P(e){return r.jsx(j,{...e})}function C(e,t){if(Array.isArray(e))return H(e,t);if(J(e))return e;const n=e;if(n.type==="imageGroup"&&Array.isArray(n.items)){const s=n;return s.items[0]?.type==="media"?{type:"section",title:s.title,layout:"mediaGrid",items:s.items.filter(l=>typeof l=="object"&&!!l&&l.type==="media"),columns:s.columns,footerAction:s.footerAction,className:s.className}:{type:"section",title:s.title,layout:"imageGrid",items:s.items.filter(l=>typeof l=="object"&&!!l&&l.type==="image"),columns:s.columns,footerAction:s.footerAction,className:s.className}}if(n.type==="videoGroup"&&Array.isArray(n.items)){const s=n;return{type:"section",title:s.title,layout:"mediaGrid",items:s.items,columns:s.columns,footerAction:s.footerAction,className:s.className}}return n.type==="result"?{type:"section",layout:"list",items:[e]}:n.type==="media"?{type:"section",layout:"mediaGrid",items:[e]}:n.type==="image"&&typeof n.imageUrl=="string"?{type:"section",layout:"imageGrid",items:[e]}:{type:"section",layout:"list",items:[b(e,0,t?()=>t(e,0):void 0)]}}function H(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 n=[],s=[];for(const[l,a]of e.entries()){const c=O(a,l,t);c?n.push(c):s.push(b(a,l,t?()=>t(a,l):void 0))}return n.length&&!s.length?{type:"section",title:w(e,a=>a.category??a.source?.name),layout:"mediaGrid",items:n}:{type:"section",title:w(e,l=>l.category??l.source?.name),layout:"list",items:s}}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 O(e,t,n){const s=e,i=s.metadata,l=typeof i=="object"&&i?i.content_type:void 0,a=typeof l=="string"?l.trim().toLowerCase():typeof s.type=="string"?s.type.trim().toLowerCase():void 0;if(a!=="image"&&a!=="video")return;const c=typeof s.id=="string"?s.id:void 0,d=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(!d)return;const f=typeof s.category=="string"?s.category:Array.isArray(s.categories)?s.categories.filter(B=>typeof B=="string").join(" / "):void 0,x=typeof s.title=="string"?s.title:"Untitled",m=typeof s.url=="string"?s.url:void 0,p=typeof s.source=="object"&&s.source&&typeof s.source.name=="string"?s.source.name:void 0,N=!!n&&!I(e);return{type:"media",id:c??`${m??x}-0`,mediaType:a==="video"?"video":"image",title:x,href:N?void 0:m,cover:d,sourceLabel:p,categoryLabel:f,breadcrumbs:[p,f].filter(Boolean),...N?{onClick:()=>n(e,t)}:{}}}function w(e,t){const n=e[0],s=t(n);if(s){for(const i of e)if(t(i)!==s)return;return s}}function J(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 K(e,t){const n=[];for(const s of e){const i=n.length?n[n.length-1]:void 0;if(s.type==="imageGroup"){s.items[0]?.type==="media"?n.push({type:"section",title:s.title,titleIcon:r.jsx(u.Image,{className:"h-4 w-4"}),titleIconBgColor:"#FFAF36",titleClassName:"text-[#1A0CAB] dark:text-[#8AB4F8]",layout:"mediaGrid",items:s.items.filter(a=>a.type==="media"),columns:s.columns??t,footerAction:s.footerAction,className:s.className}):n.push({type:"section",title:s.title,titleIcon:r.jsx(u.Image,{className:"h-4 w-4"}),titleIconBgColor:"#FFAF36",titleClassName:"text-[#1A0CAB] dark:text-[#8AB4F8]",layout:"imageGrid",items:s.items.filter(a=>a.type==="image"),columns:s.columns??t,footerAction:s.footerAction,className:s.className});continue}if(s.type==="videoGroup"){n.push({type:"section",title:s.title,titleIcon:r.jsx(u.Video,{className:"h-4 w-4"}),titleIconBgColor:"#1784FC",titleClassName:"text-[#1A0CAB] dark:text-[#8AB4F8]",layout:"mediaGrid",items:s.items,columns:s.columns??t,footerAction:s.footerAction,className:s.className});continue}if(s.type==="result"){if(i?.layout==="list"){i.items.push(s);continue}n.push({type:"section",layout:"list",items:[s]});continue}if(s.type==="media"){if(i?.layout==="mediaGrid"){i.items.push(s);continue}n.push({type:"section",layout:"mediaGrid",...t?{columns:t}:{},items:[s]});continue}if(i?.layout==="imageGrid"){i.items.push(s);continue}n.push({type:"section",layout:"imageGrid",...t?{columns:t}:{},items:[s]})}return n}function Q(e){return e.map((t,n)=>b(t,n))}exports.SearchResultsImageGroup=D;exports.SearchResultsVideoGroup=P;exports.default=j;exports.itemsToSections=K;exports.recordsToItems=Q;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),o=require("clsx"),p=require("react"),f=require("lucide-react"),I=p.createContext(void 0);function S(e){try{return new URL(e).pathname.startsWith("/assets")}catch{return!1}}function y(e){const t=p.useContext(I),{src:n,...s}=e,i=!!(n&&t&&!S(n)),[l,a]=p.useState(void 0),c=p.useRef(void 0);return p.useEffect(()=>{if(!n||!i)return;let u=!1;return fetch(n,{headers:t}).then(d=>d.blob()).then(d=>{if(u)return;const m=URL.createObjectURL(d);c.current=m,a(m)}).catch(()=>{u||a(void 0)}),()=>{u=!0,c.current&&(URL.revokeObjectURL(c.current),c.current=void 0)}},[n,i,t]),i?r.jsx("img",{...s,src:l}):r.jsx("img",{...e})}function b({breadcrumbs:e}){return e?.length?r.jsx("div",{className:"min-w-0 truncate text-xs",children:e.map((t,n)=>r.jsxs("span",{children:[n>0?r.jsx("span",{className:"mx-1",children:">"}):null,r.jsx("span",{className:"",children:t})]},`${t}-${n}`))}):null}function B(e,t){const n=t==="_blank"?"noreferrer noopener":"";return e?n?[...new Set([...e.split(" "),...n.split(" ")].filter(Boolean))].join(" "):e:n||void 0}function j({href:e,target:t,rel:n,onClick:s,className:i,children:l}){const a=i?`${i} cursor-pointer`:"cursor-pointer";return e?r.jsx("a",{href:e,target:t,rel:B(n,t),className:a,onClick:()=>s?.(),children:l}):r.jsx("button",{type:"button",className:a,onClick:s,children:l})}function L({item:e,onItemClick:t}){const n=e.onClick?void 0:e.href,s=e.breadcrumbs??[];return r.jsxs(j,{href:n,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(y,{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,s.length?r.jsx("div",{className:"text-[#666]",children:r.jsx(b,{breadcrumbs:s})}):null]})]})}function U({author:e,date:t}){return!e&&!t?null:r.jsxs("div",{className:"min-w-0 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 _({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,n)=>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}-${n}`))}):null}function g({title:e,titleIcon:t,titleIconBgColor:n,source:s,className:i,titleClassName:l,titleAction:a}){return!e&&!t&&!s?null:r.jsxs("div",{className:o("mb-2 flex min-w-0 items-center gap-2",i),children:[t?r.jsx("span",{className:o("inline-flex h-6 w-6 flex-none items-center justify-center",n&&"rounded-md text-white"),style:n?{backgroundColor:n}:void 0,children:t}):null,e?a?.href?r.jsx("a",{className:o("min-w-0 cursor-pointer text-xl hover:underline hover:underline-offset-2 group-hover:underline group-hover:underline-offset-2",l),href:a.href,target:a.target,rel:a.rel,onClick:()=>a.onClick?.(),children:e}):a?.onClick?r.jsx("button",{type:"button",className:o("min-w-0 cursor-pointer bg-transparent p-0 text-left text-xl hover:underline hover:underline-offset-2 group-hover:underline group-hover:underline-offset-2",l),onClick:a.onClick,children:e}):r.jsx("span",{className:o("min-w-0 text-xl group-hover:underline group-hover:underline-offset-2",l),children:e}):null]})}function R(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 E(e){switch(e){case"xls":return r.jsx(f.FileSpreadsheet,{className:"h-5 w-5"});case"ppt":return r.jsx(f.Presentation,{className:"h-5 w-5"});case"pdf":case"doc":case"word":case"text":return r.jsx(f.FileText,{className:"h-5 w-5"});default:return r.jsx(f.File,{className:"h-5 w-5"})}}function A({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",R(e)),children:E(e)}):null}const $=f.ExternalLink;function M({item:e,onItemClick:t}){const n=e.typeIcon?r.jsx(A,{typeIcon:e.typeIcon}):e.fileType?r.jsx(A,{fileType:e.fileType}):null,s=e.onClick||t?()=>{e.onClick?.(),t?.(e)}:void 0,i=e.onClick?void 0:e.href,l=r.jsxs("div",{className:"min-w-0 w-full",children:[r.jsx("div",{className:"flex min-w-0 items-center gap-2",children:r.jsx(g,{className:"mb-0 w-full",title:e.title,titleIcon:n,source:e.source,titleClassName:"truncate text-[#1A0CAB] dark:text-[#8AB4F8]"})}),r.jsxs("div",{className:"flex min-w-0 gap-3",children:[e.cover?r.jsx(y,{src:e.cover,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 overflow-hidden",children:[e.summary?r.jsx("div",{className:"line-clamp-3 text-sm text-[#666]",children:e.summary}):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("div",{className:"min-w-0 shrink-0",children:r.jsx(b,{breadcrumbs:e.breadcrumbs})}),r.jsx("span",{className:"h-3 w-px flex-none bg-[#666]","aria-hidden":"true"}),r.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[r.jsx(U,{author:e.author,date:e.date}),e.href?r.jsx("span",{className:"flex-none text-[#007EFF]",children:r.jsx($,{className:"h-3 w-3"})}):null]})]}):r.jsx(_,{meta:e.meta})]})]})]});return!i&&!s?l:r.jsx(j,{href:i,target:e.target,rel:e.rel,onClick:s,className:o("group block w-full rounded-xl p-4! text-left no-underline transition-colors","hover:bg-slate-100/70 focus:outline-none focus-visible:ring-2 focus-visible:ring-slate-300","dark:hover:bg-slate-800/60 dark:focus-visible:ring-slate-600",e.isActive?"bg-slate-100/70 dark:bg-slate-800/60":""),children:l})}function q({item:e,onItemClick:t}){const n=e.breadcrumbs??[e.sourceLabel,e.categoryLabel].filter(Boolean),s=e.onClick?void 0:e.href;return r.jsxs(j,{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.jsxs("div",{className:"relative aspect-4/3 bg-slate-100 dark:bg-slate-800",children:[r.jsx(y,{src:e.cover,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(f.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,n.length?r.jsxs("div",{className:"text-[#666]",children:[r.jsx(b,{breadcrumbs:n})," "]}):null]})]})}function z({action:e,className:t}){const n=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-transparent dark:text-slate-300 dark:hover:border-slate-500 dark:hover:bg-slate-800 dark:focus-visible:ring-slate-600",t);return e.href?r.jsx("a",{className:n,href:e.href,target:e.target,rel:B(e.rel,e.target),onClick:()=>e.onClick?.(),children:e.label}):r.jsx("button",{className:n,type:"button",onClick:e.onClick,children:e.label})}function v({action:e}){return e?r.jsxs("div",{className:"mt-4 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(z,{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 H(e,t,n){if(e.layout==="list")return r.jsxs("div",{className:o("space-y-6",e.className),children:[!n&&r.jsx(g,{title:e.title,titleIcon:e.titleIcon,titleIconBgColor:e.titleIconBgColor,titleClassName:e.titleClassName}),e.items.map(l=>r.jsx(M,{item:l,onItemClick:t},l.id)),r.jsx(v,{action:e.footerAction})]});if(e.layout==="mediaGrid"){const l=e.columns??3,a=l===2?"grid-cols-2":l===4?"grid-cols-4":"grid-cols-3";return r.jsxs("div",{className:o("px-6 py-3",e.className),children:[!n&&r.jsx(g,{title:e.title,titleIcon:e.titleIcon,titleIconBgColor:e.titleIconBgColor,titleClassName:e.titleClassName,titleAction:e.footerAction}),r.jsx("div",{className:o("grid gap-3",a),children:e.items.map(c=>r.jsx(q,{item:c,onItemClick:t},c.id))}),r.jsx(v,{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:[!n&&r.jsx(g,{title:e.title,titleIcon:e.titleIcon,titleIconBgColor:e.titleIconBgColor,titleClassName:e.titleClassName,titleAction:e.footerAction}),r.jsx("div",{className:o("grid gap-3",i),children:e.items.map(l=>r.jsx(L,{item:l,onItemClick:t},l.id))}),r.jsx(v,{action:e.footerAction})]})}function O(e){if(!e)return;const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toISOString().slice(0,10)}function P(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 N(e,t,n){const s=e.thumbnail??e.cover??e.metadata?.thumbnail_link,i=e.summary??e.content,l=P(e.metadata?.file_extension??e.type),a=e.source?.name,c=e.category??e.categories?.join(" / ")??"Categories",u=[a,c].filter(Boolean),d=e.last_updated_by?.user?.username??e.owner?.username,m=O(e.last_updated_by?.timestamp??e.metadata?.last_reviewed),x=e.metadata?.icon_link??e.icon,h=x?r.jsx(y,{src:x,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,summary:i,cover:s,fileType:l,typeIcon:h,breadcrumbs:u.length?u:void 0,author:d,date:m,onClick:n,isActive:!!e.isActive}}function w({section:e,className:t,theme:n,footerAction:s,onRecordClick:i,onItemClick:l,hideHeader:a,requestHeaders:c}){const u=D(F(e,i),s),d=V(n);return r.jsx(I.Provider,{value:c,children:r.jsx("div",{className:o(d==="dark"&&"dark",t),children:H(u,l,a)})})}function V(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 D(e,t){return!t||e.footerAction?e:e.layout==="list"?{...e,footerAction:t}:e.layout==="mediaGrid"?{...e,footerAction:t}:{...e,footerAction:t}}function W(e){return r.jsx(w,{...e})}function J(e){return r.jsx(w,{...e})}function F(e,t){if(Array.isArray(e))return K(e,t);if(X(e))return e;const n=e;if(n.type==="imageGroup"&&Array.isArray(n.items)){const s=n;return s.items[0]?.type==="media"?{type:"section",title:s.title,layout:"mediaGrid",items:s.items.filter(l=>typeof l=="object"&&!!l&&l.type==="media"),columns:s.columns,footerAction:s.footerAction,className:s.className}:{type:"section",title:s.title,layout:"imageGrid",items:s.items.filter(l=>typeof l=="object"&&!!l&&l.type==="image"),columns:s.columns,footerAction:s.footerAction,className:s.className}}if(n.type==="videoGroup"&&Array.isArray(n.items)){const s=n;return{type:"section",title:s.title,layout:"mediaGrid",items:s.items,columns:s.columns,footerAction:s.footerAction,className:s.className}}return n.type==="result"?{type:"section",layout:"list",items:[e]}:n.type==="media"?{type:"section",layout:"mediaGrid",items:[e]}:n.type==="image"&&typeof n.imageUrl=="string"?{type:"section",layout:"imageGrid",items:[e]}:{type:"section",layout:"list",items:[N(e,0,t?()=>t(e,0):void 0)]}}function K(e,t){if(!e.length)return{type:"section",layout:"list",items:[]};if(e.every(T)){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 F(e[0],t)}const n=[],s=[];for(const[l,a]of e.entries()){const c=Q(a,l,t);c?n.push(c):s.push(N(a,l,t?()=>t(a,l):void 0))}return n.length&&!s.length?{type:"section",title:C(e,a=>a.category??a.source?.name),layout:"mediaGrid",items:n}:{type:"section",title:C(e,l=>l.category??l.source?.name),layout:"list",items:s}}function T(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 Q(e,t,n){const s=e,i=s.metadata,l=typeof i=="object"&&i?i.content_type:void 0,a=typeof l=="string"?l.trim().toLowerCase():typeof s.type=="string"?s.type.trim().toLowerCase():void 0;if(a!=="image"&&a!=="video")return;const c=typeof s.id=="string"?s.id:void 0,u=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(!u)return;const d=typeof s.category=="string"?s.category:Array.isArray(s.categories)?s.categories.filter(G=>typeof G=="string").join(" / "):void 0,m=typeof s.title=="string"?s.title:"Untitled",x=typeof s.url=="string"?s.url:void 0,h=typeof s.source=="object"&&s.source&&typeof s.source.name=="string"?s.source.name:void 0,k=!!n&&!T(e);return{type:"media",id:c??`${x??m}-0`,mediaType:a==="video"?"video":"image",title:m,href:k?void 0:x,cover:u,sourceLabel:h,categoryLabel:d,breadcrumbs:[h,d].filter(Boolean),...k?{onClick:()=>n(e,t)}:{}}}function C(e,t){const n=e[0],s=t(n);if(s){for(const i of e)if(t(i)!==s)return;return s}}function X(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 Y(e,t){const n=[];for(const s of e){const i=n.length?n[n.length-1]:void 0;if(s.type==="imageGroup"){s.items[0]?.type==="media"?n.push({type:"section",title:s.title,titleIcon:r.jsx(f.Image,{className:"h-4 w-4"}),titleIconBgColor:"#FFAF36",titleClassName:"text-[#1A0CAB] dark:text-[#8AB4F8]",layout:"mediaGrid",items:s.items.filter(a=>a.type==="media"),columns:s.columns??t,footerAction:s.footerAction,className:s.className}):n.push({type:"section",title:s.title,titleIcon:r.jsx(f.Image,{className:"h-4 w-4"}),titleIconBgColor:"#FFAF36",titleClassName:"text-[#1A0CAB] dark:text-[#8AB4F8]",layout:"imageGrid",items:s.items.filter(a=>a.type==="image"),columns:s.columns??t,footerAction:s.footerAction,className:s.className});continue}if(s.type==="videoGroup"){n.push({type:"section",title:s.title,titleIcon:r.jsx(f.Video,{className:"h-4 w-4"}),titleIconBgColor:"#1784FC",titleClassName:"text-[#1A0CAB] dark:text-[#8AB4F8]",layout:"mediaGrid",items:s.items,columns:s.columns??t,footerAction:s.footerAction,className:s.className});continue}if(s.type==="result"){if(i?.layout==="list"){i.items.push(s);continue}n.push({type:"section",layout:"list",items:[s]});continue}if(s.type==="media"){if(i?.layout==="mediaGrid"){i.items.push(s);continue}n.push({type:"section",layout:"mediaGrid",...t?{columns:t}:{},items:[s]});continue}if(i?.layout==="imageGrid"){i.items.push(s);continue}n.push({type:"section",layout:"imageGrid",...t?{columns:t}:{},items:[s]})}return n}function Z(e){return e.map((t,n)=>N(t,n))}exports.SearchResultsImageGroup=W;exports.SearchResultsVideoGroup=J;exports.default=w;exports.itemsToSections=Y;exports.recordsToItems=Z;
@@ -0,0 +1 @@
1
+ @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-500:oklch(55.4% .046 257.417);--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-4{margin-top:calc(var(--spacing)*4)}.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-3{-webkit-line-clamp:3;-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!important}.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!important}.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}.shrink-0{flex-shrink:0}.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-100\/70{background-color:#f1f5f9b3}@supports (color:color-mix(in lab,red,red)){.bg-slate-100\/70{background-color:color-mix(in oklab,var(--color-slate-100)70%,transparent)}}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-950{background-color:var(--color-slate-950)}.bg-transparent{background-color:#0000}.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-0{padding:calc(var(--spacing)*0)}.p-4\!{padding:calc(var(--spacing)*4)!important}.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-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-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-800\/60:where(.dark,.dark *){background-color:#1d293d99}@supports (color:color-mix(in lab,red,red)){.dark\:bg-slate-800\/60:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-slate-800)60%,transparent)}}.dark\:bg-slate-900:where(.dark,.dark *){background-color:var(--color-slate-900)}.dark\:bg-transparent:where(.dark,.dark *){background-color:#0000}.dark\:text-\[\#8AB4F8\]:where(.dark,.dark *){color:#8ab4f8}.dark\:text-slate-200:where(.dark,.dark *){color:var(--color-slate-200)}.dark\:text-slate-300:where(.dark,.dark *){color:var(--color-slate-300)}.dark\:ring-slate-700:where(.dark,.dark *){--tw-ring-color:var(--color-slate-700)}@media(hover:hover){.dark\:hover\:border-slate-500:where(.dark,.dark *):hover{border-color:var(--color-slate-500)}.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}
@@ -1,24 +1,48 @@
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-500:oklch(55.4% .046 257.417);--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-4{margin-top:calc(var(--spacing)*4)}.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-3{-webkit-line-clamp:3;-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!important}.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!important}.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-100\\/70{background-color:#f1f5f9b3}@supports (color:color-mix(in lab,red,red)){.bg-slate-100\\/70{background-color:color-mix(in oklab,var(--color-slate-100)70%,transparent)}}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-950{background-color:var(--color-slate-950)}.bg-transparent{background-color:#0000}.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-0{padding:calc(var(--spacing)*0)}.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-6\\!{padding-inline:calc(var(--spacing)*6)!important}.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-3{padding-block:calc(var(--spacing)*3)}.py-4\\!{padding-block:calc(var(--spacing)*4)!important}.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-800\\/60:where(.dark,.dark *){background-color:#1d293d99}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-slate-800\\/60:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-slate-800)60%,transparent)}}.dark\\:bg-slate-900:where(.dark,.dark *){background-color:var(--color-slate-900)}.dark\\:bg-transparent:where(.dark,.dark *){background-color:#0000}.dark\\:text-\\[\\#8AB4F8\\]:where(.dark,.dark *){color:#8ab4f8}.dark\\:text-slate-200:where(.dark,.dark *){color:var(--color-slate-200)}.dark\\:text-slate-300:where(.dark,.dark *){color:var(--color-slate-300)}.dark\\:ring-slate-700:where(.dark,.dark *){--tw-ring-color:var(--color-slate-700)}@media(hover:hover){.dark\\:hover\\:border-slate-500:where(.dark,.dark *):hover{border-color:var(--color-slate-500)}.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
1
  import { jsx as n, jsxs as o } from "react/jsx-runtime";
3
2
  import c from "clsx";
4
- import { File as G, FileText as T, Presentation as S, FileSpreadsheet as L, ExternalLink as _, Play as $, Image as k, Video as E } from "lucide-react";
5
- function v({ breadcrumbs: e }) {
6
- return e?.length ? /* @__PURE__ */ n("div", { className: "min-w-0 truncate text-xs", children: e.map((t, l) => /* @__PURE__ */ o("span", { children: [
7
- l > 0 ? /* @__PURE__ */ n("span", { className: "mx-1", children: ">" }) : null,
3
+ import { createContext as L, useContext as S, useState as U, useRef as _, useEffect as E } from "react";
4
+ import { File as R, FileText as $, Presentation as z, FileSpreadsheet as M, ExternalLink as H, Play as D, Image as k, Video as O } from "lucide-react";
5
+ const I = L(void 0);
6
+ function P(e) {
7
+ try {
8
+ return new URL(e).pathname.startsWith("/assets");
9
+ } catch {
10
+ return !1;
11
+ }
12
+ }
13
+ function y(e) {
14
+ const t = S(I), { src: s, ...r } = e, i = !!(s && t && !P(s)), [l, a] = U(void 0), u = _(void 0);
15
+ return E(() => {
16
+ if (!s || !i) return;
17
+ let d = !1;
18
+ return fetch(s, { headers: t }).then((f) => f.blob()).then((f) => {
19
+ if (d) return;
20
+ const m = URL.createObjectURL(f);
21
+ u.current = m, a(m);
22
+ }).catch(() => {
23
+ d || a(void 0);
24
+ }), () => {
25
+ d = !0, u.current && (URL.revokeObjectURL(u.current), u.current = void 0);
26
+ };
27
+ }, [s, i, t]), i ? /* @__PURE__ */ n("img", { ...r, src: l }) : /* @__PURE__ */ n("img", { ...e });
28
+ }
29
+ function b({ breadcrumbs: e }) {
30
+ return e?.length ? /* @__PURE__ */ n("div", { className: "min-w-0 truncate text-xs", children: e.map((t, s) => /* @__PURE__ */ o("span", { children: [
31
+ s > 0 ? /* @__PURE__ */ n("span", { className: "mx-1", children: ">" }) : null,
8
32
  /* @__PURE__ */ n("span", { className: "", children: t })
9
- ] }, `${t}-${l}`)) }) : null;
33
+ ] }, `${t}-${s}`)) }) : null;
10
34
  }
11
- function C(e, t) {
12
- const l = t === "_blank" ? "noreferrer noopener" : "";
13
- return e ? l ? [...new Set([...e.split(" "), ...l.split(" ")].filter(Boolean))].join(" ") : e : l || void 0;
35
+ function B(e, t) {
36
+ const s = t === "_blank" ? "noreferrer noopener" : "";
37
+ return e ? s ? [...new Set([...e.split(" "), ...s.split(" ")].filter(Boolean))].join(" ") : e : s || void 0;
14
38
  }
15
- function b({
39
+ function x({
16
40
  href: e,
17
41
  target: t,
18
- rel: l,
42
+ rel: s,
19
43
  onClick: r,
20
44
  className: i,
21
- children: s
45
+ children: l
22
46
  }) {
23
47
  const a = i ? `${i} cursor-pointer` : "cursor-pointer";
24
48
  return e ? /* @__PURE__ */ n(
@@ -26,22 +50,22 @@ function b({
26
50
  {
27
51
  href: e,
28
52
  target: t,
29
- rel: C(l, t),
53
+ rel: B(s, t),
30
54
  className: a,
31
55
  onClick: () => r?.(),
32
- children: s
56
+ children: l
33
57
  }
34
- ) : /* @__PURE__ */ n("button", { type: "button", className: a, onClick: r, children: s });
58
+ ) : /* @__PURE__ */ n("button", { type: "button", className: a, onClick: r, children: l });
35
59
  }
36
- function U({
60
+ function V({
37
61
  item: e,
38
62
  onItemClick: t
39
63
  }) {
40
- const l = e.onClick ? void 0 : e.href, r = e.breadcrumbs ?? [];
64
+ const s = e.onClick ? void 0 : e.href, r = e.breadcrumbs ?? [];
41
65
  return /* @__PURE__ */ o(
42
- b,
66
+ x,
43
67
  {
44
- href: l,
68
+ href: s,
45
69
  target: e.target,
46
70
  rel: e.rel,
47
71
  onClick: () => {
@@ -52,7 +76,7 @@ function U({
52
76
  ),
53
77
  children: [
54
78
  /* @__PURE__ */ n("div", { className: "overflow-hidden rounded-lg ring-1 ring-slate-200 dark:ring-slate-700", children: /* @__PURE__ */ n("div", { className: "relative aspect-video bg-slate-100 dark:bg-slate-800", children: /* @__PURE__ */ n(
55
- "img",
79
+ y,
56
80
  {
57
81
  src: e.imageUrl,
58
82
  alt: e.imageAlt ?? e.title,
@@ -63,36 +87,36 @@ function U({
63
87
  /* @__PURE__ */ o("div", { className: "mt-2", children: [
64
88
  /* @__PURE__ */ n("div", { className: "mb-1 truncate text-sm text-[#1A0CAB] dark:text-[#8AB4F8]", children: e.title }),
65
89
  e.subtitle ? /* @__PURE__ */ n("div", { className: "mb-1 truncate text-sm text-[#666]", children: e.subtitle }) : null,
66
- r.length ? /* @__PURE__ */ n("div", { className: "text-[#666]", children: /* @__PURE__ */ n(v, { breadcrumbs: r }) }) : null
90
+ r.length ? /* @__PURE__ */ n("div", { className: "text-[#666]", children: /* @__PURE__ */ n(b, { breadcrumbs: r }) }) : null
67
91
  ] })
68
92
  ]
69
93
  }
70
94
  );
71
95
  }
72
- function z({ author: e, date: t }) {
73
- return !e && !t ? null : /* @__PURE__ */ o("div", { className: "flex-none truncate text-xs", children: [
96
+ function q({ author: e, date: t }) {
97
+ return !e && !t ? null : /* @__PURE__ */ o("div", { className: "min-w-0 truncate text-xs", children: [
74
98
  e ? /* @__PURE__ */ n("span", { className: "", children: e }) : null,
75
99
  e && t ? /* @__PURE__ */ n("span", { className: "mx-1", children: "·" }) : null,
76
100
  t ? /* @__PURE__ */ n("span", { className: "", children: t }) : null
77
101
  ] });
78
102
  }
79
- function M({ meta: e }) {
80
- return e?.length ? /* @__PURE__ */ n("div", { className: "mt-2 flex flex-wrap gap-2 text-xs text-slate-700 dark:text-slate-200", children: e.map((t, l) => /* @__PURE__ */ n(
103
+ function W({ meta: e }) {
104
+ return e?.length ? /* @__PURE__ */ n("div", { className: "mt-2 flex flex-wrap gap-2 text-xs text-slate-700 dark:text-slate-200", children: e.map((t, s) => /* @__PURE__ */ n(
81
105
  "span",
82
106
  {
83
107
  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
108
  children: t
85
109
  },
86
- `${t}-${l}`
110
+ `${t}-${s}`
87
111
  )) }) : null;
88
112
  }
89
- function y({
113
+ function g({
90
114
  title: e,
91
115
  titleIcon: t,
92
- titleIconBgColor: l,
116
+ titleIconBgColor: s,
93
117
  source: r,
94
118
  className: i,
95
- titleClassName: s,
119
+ titleClassName: l,
96
120
  titleAction: a
97
121
  }) {
98
122
  return !e && !t && !r ? null : /* @__PURE__ */ o("div", { className: c("mb-2 flex min-w-0 items-center gap-2", i), children: [
@@ -101,9 +125,9 @@ function y({
101
125
  {
102
126
  className: c(
103
127
  "inline-flex h-6 w-6 flex-none items-center justify-center",
104
- l && "rounded-md text-white"
128
+ s && "rounded-md text-white"
105
129
  ),
106
- style: l ? { backgroundColor: l } : void 0,
130
+ style: s ? { backgroundColor: s } : void 0,
107
131
  children: t
108
132
  }
109
133
  ) : null,
@@ -112,7 +136,7 @@ function y({
112
136
  {
113
137
  className: c(
114
138
  "min-w-0 cursor-pointer text-xl hover:underline hover:underline-offset-2 group-hover:underline group-hover:underline-offset-2",
115
- s
139
+ l
116
140
  ),
117
141
  href: a.href,
118
142
  target: a.target,
@@ -120,21 +144,30 @@ function y({
120
144
  onClick: () => a.onClick?.(),
121
145
  children: e
122
146
  }
123
- ) : /* @__PURE__ */ n(
147
+ ) : a?.onClick ? /* @__PURE__ */ n(
124
148
  "button",
125
149
  {
126
150
  type: "button",
127
151
  className: c(
128
152
  "min-w-0 cursor-pointer bg-transparent p-0 text-left text-xl hover:underline hover:underline-offset-2 group-hover:underline group-hover:underline-offset-2",
129
- s
153
+ l
154
+ ),
155
+ onClick: a.onClick,
156
+ children: e
157
+ }
158
+ ) : /* @__PURE__ */ n(
159
+ "span",
160
+ {
161
+ className: c(
162
+ "min-w-0 text-xl group-hover:underline group-hover:underline-offset-2",
163
+ l
130
164
  ),
131
- onClick: a?.onClick,
132
165
  children: e
133
166
  }
134
167
  ) : null
135
168
  ] });
136
169
  }
137
- function D(e) {
170
+ function J(e) {
138
171
  switch (e) {
139
172
  case "doc":
140
173
  case "word":
@@ -145,22 +178,22 @@ function D(e) {
145
178
  return "bg-slate-100 text-slate-700 dark:bg-slate-800 dark:text-slate-200";
146
179
  }
147
180
  }
148
- function V(e) {
181
+ function K(e) {
149
182
  switch (e) {
150
183
  case "xls":
151
- return /* @__PURE__ */ n(L, { className: "h-5 w-5" });
184
+ return /* @__PURE__ */ n(M, { className: "h-5 w-5" });
152
185
  case "ppt":
153
- return /* @__PURE__ */ n(S, { className: "h-5 w-5" });
186
+ return /* @__PURE__ */ n(z, { className: "h-5 w-5" });
154
187
  case "pdf":
155
188
  case "doc":
156
189
  case "word":
157
190
  case "text":
158
- return /* @__PURE__ */ n(T, { className: "h-5 w-5" });
191
+ return /* @__PURE__ */ n($, { className: "h-5 w-5" });
159
192
  default:
160
- return /* @__PURE__ */ n(G, { className: "h-5 w-5" });
193
+ return /* @__PURE__ */ n(R, { className: "h-5 w-5" });
161
194
  }
162
195
  }
163
- function w({
196
+ function A({
164
197
  fileType: e,
165
198
  typeIcon: t
166
199
  }) {
@@ -169,33 +202,33 @@ function w({
169
202
  {
170
203
  className: c(
171
204
  "inline-flex h-6 w-6 items-center justify-center rounded-md",
172
- D(e)
205
+ J(e)
173
206
  ),
174
- children: V(e)
207
+ children: K(e)
175
208
  }
176
209
  ) : null;
177
210
  }
178
- const H = _;
179
- function P({
211
+ const Q = H;
212
+ function X({
180
213
  item: e,
181
214
  onItemClick: t
182
215
  }) {
183
- const l = e.typeIcon ? /* @__PURE__ */ n(w, { typeIcon: e.typeIcon }) : e.fileType ? /* @__PURE__ */ n(w, { fileType: e.fileType }) : null, r = e.onClick || t ? () => {
216
+ const s = e.typeIcon ? /* @__PURE__ */ n(A, { typeIcon: e.typeIcon }) : e.fileType ? /* @__PURE__ */ n(A, { fileType: e.fileType }) : null, r = e.onClick || t ? () => {
184
217
  e.onClick?.(), t?.(e);
185
- } : void 0, i = e.onClick ? void 0 : e.href, s = /* @__PURE__ */ o("div", { className: "w-full", children: [
218
+ } : void 0, i = e.onClick ? void 0 : e.href, l = /* @__PURE__ */ o("div", { className: "min-w-0 w-full", children: [
186
219
  /* @__PURE__ */ n("div", { className: "flex min-w-0 items-center gap-2", children: /* @__PURE__ */ n(
187
- y,
220
+ g,
188
221
  {
189
222
  className: "mb-0 w-full",
190
223
  title: e.title,
191
- titleIcon: l,
224
+ titleIcon: s,
192
225
  source: e.source,
193
226
  titleClassName: "truncate text-[#1A0CAB] dark:text-[#8AB4F8]"
194
227
  }
195
228
  ) }),
196
- /* @__PURE__ */ o("div", { className: "flex gap-3", children: [
229
+ /* @__PURE__ */ o("div", { className: "flex min-w-0 gap-3", children: [
197
230
  e.cover ? /* @__PURE__ */ n(
198
- "img",
231
+ y,
199
232
  {
200
233
  src: e.cover,
201
234
  alt: e.thumbnailAlt ?? e.title,
@@ -203,43 +236,43 @@ function P({
203
236
  loading: "lazy"
204
237
  }
205
238
  ) : null,
206
- /* @__PURE__ */ o("div", { className: "min-w-0 flex-1 flex flex-col justify-between", children: [
239
+ /* @__PURE__ */ o("div", { className: "min-w-0 flex-1 flex flex-col justify-between overflow-hidden", children: [
207
240
  e.summary ? /* @__PURE__ */ n("div", { className: "line-clamp-3 text-sm text-[#666]", children: e.summary }) : null,
208
241
  e.breadcrumbs?.length || e.author || e.date ? /* @__PURE__ */ o("div", { className: "mt-2 flex min-w-0 items-center gap-3 text-[#666]", children: [
209
- /* @__PURE__ */ n(v, { breadcrumbs: e.breadcrumbs }),
242
+ /* @__PURE__ */ n("div", { className: "min-w-0 shrink-0", children: /* @__PURE__ */ n(b, { breadcrumbs: e.breadcrumbs }) }),
210
243
  /* @__PURE__ */ n("span", { className: "h-3 w-px flex-none bg-[#666]", "aria-hidden": "true" }),
211
- /* @__PURE__ */ o("div", { className: "flex flex-none items-center gap-2", children: [
212
- /* @__PURE__ */ n(z, { author: e.author, date: e.date }),
213
- e.href ? /* @__PURE__ */ n("span", { className: "flex-none text-[#007EFF]", children: /* @__PURE__ */ n(H, { className: "h-3 w-3" }) }) : null
244
+ /* @__PURE__ */ o("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
245
+ /* @__PURE__ */ n(q, { author: e.author, date: e.date }),
246
+ e.href ? /* @__PURE__ */ n("span", { className: "flex-none text-[#007EFF]", children: /* @__PURE__ */ n(Q, { className: "h-3 w-3" }) }) : null
214
247
  ] })
215
- ] }) : /* @__PURE__ */ n(M, { meta: e.meta })
248
+ ] }) : /* @__PURE__ */ n(W, { meta: e.meta })
216
249
  ] })
217
250
  ] })
218
251
  ] });
219
- return !i && !r ? s : /* @__PURE__ */ n(
220
- b,
252
+ return !i && !r ? l : /* @__PURE__ */ n(
253
+ x,
221
254
  {
222
255
  href: i,
223
256
  target: e.target,
224
257
  rel: e.rel,
225
258
  onClick: r,
226
259
  className: c(
227
- "group block w-full rounded-xl border border-transparent px-6! py-4! text-left no-underline transition-colors",
228
- "hover:border-slate-200 hover:bg-slate-100/70 focus:outline-none focus-visible:ring-2 focus-visible:ring-slate-300",
229
- "dark:hover:border-slate-700 dark:hover:bg-slate-800/60 dark:focus-visible:ring-slate-600",
230
- e.isActive ? "border-slate-200 bg-slate-100/70 dark:border-slate-700 dark:bg-slate-800/60" : ""
260
+ "group block w-full rounded-xl p-4! text-left no-underline transition-colors",
261
+ "hover:bg-slate-100/70 focus:outline-none focus-visible:ring-2 focus-visible:ring-slate-300",
262
+ "dark:hover:bg-slate-800/60 dark:focus-visible:ring-slate-600",
263
+ e.isActive ? "bg-slate-100/70 dark:bg-slate-800/60" : ""
231
264
  ),
232
- children: s
265
+ children: l
233
266
  }
234
267
  );
235
268
  }
236
- function O({
269
+ function Y({
237
270
  item: e,
238
271
  onItemClick: t
239
272
  }) {
240
- const l = e.breadcrumbs ?? [e.sourceLabel, e.categoryLabel].filter(Boolean), r = e.onClick ? void 0 : e.href;
273
+ const s = e.breadcrumbs ?? [e.sourceLabel, e.categoryLabel].filter(Boolean), r = e.onClick ? void 0 : e.href;
241
274
  return /* @__PURE__ */ o(
242
- b,
275
+ x,
243
276
  {
244
277
  href: r,
245
278
  target: e.target,
@@ -253,7 +286,7 @@ function O({
253
286
  children: [
254
287
  /* @__PURE__ */ n("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: [
255
288
  /* @__PURE__ */ n(
256
- "img",
289
+ y,
257
290
  {
258
291
  src: e.cover,
259
292
  alt: e.thumbnailAlt ?? e.title,
@@ -261,13 +294,13 @@ function O({
261
294
  loading: "lazy"
262
295
  }
263
296
  ),
264
- 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($, { className: "h-5 w-5 translate-x-px" }) }) }) : null
297
+ 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(D, { className: "h-5 w-5 translate-x-px" }) }) }) : null
265
298
  ] }) }),
266
299
  /* @__PURE__ */ o("div", { className: "mt-2", children: [
267
300
  /* @__PURE__ */ n("div", { className: "mb-1 truncate text-sm text-[#1A0CAB] dark:text-[#8AB4F8]", children: e.title }),
268
301
  e.matchCountText ? /* @__PURE__ */ n("div", { className: "mb-1 truncate text-xs text-[#666]", children: e.matchCountText }) : null,
269
- l.length ? /* @__PURE__ */ o("div", { className: "text-[#666]", children: [
270
- /* @__PURE__ */ n(v, { breadcrumbs: l }),
302
+ s.length ? /* @__PURE__ */ o("div", { className: "text-[#666]", children: [
303
+ /* @__PURE__ */ n(b, { breadcrumbs: s }),
271
304
  " "
272
305
  ] }) : null
273
306
  ] })
@@ -275,11 +308,11 @@ function O({
275
308
  }
276
309
  );
277
310
  }
278
- function q({
311
+ function Z({
279
312
  action: e,
280
313
  className: t
281
314
  }) {
282
- const l = c(
315
+ const s = c(
283
316
  "flex-none inline-flex items-center justify-center rounded-full border border-[#e8e8e8] bg-white",
284
317
  "h-7 px-12 text-sm text-[#666] no-underline transition",
285
318
  "cursor-pointer hover:border-slate-300 hover:bg-slate-50 hover:no-underline",
@@ -290,20 +323,20 @@ function q({
290
323
  return e.href ? /* @__PURE__ */ n(
291
324
  "a",
292
325
  {
293
- className: l,
326
+ className: s,
294
327
  href: e.href,
295
328
  target: e.target,
296
- rel: C(e.rel, e.target),
329
+ rel: B(e.rel, e.target),
297
330
  onClick: () => e.onClick?.(),
298
331
  children: e.label
299
332
  }
300
- ) : /* @__PURE__ */ n("button", { className: l, type: "button", onClick: e.onClick, children: e.label });
333
+ ) : /* @__PURE__ */ n("button", { className: s, type: "button", onClick: e.onClick, children: e.label });
301
334
  }
302
- function h({ action: e }) {
335
+ function v({ action: e }) {
303
336
  return e ? /* @__PURE__ */ o("div", { className: "mt-4 flex w-full items-center", children: [
304
337
  /* @__PURE__ */ n("span", { className: "h-px flex-1 bg-[#e8e8e8] dark:bg-slate-700", "aria-hidden": "true" }),
305
338
  /* @__PURE__ */ n(
306
- q,
339
+ Z,
307
340
  {
308
341
  action: e,
309
342
  className: c("px-4")
@@ -312,11 +345,11 @@ function h({ action: e }) {
312
345
  /* @__PURE__ */ n("span", { className: "h-px flex-1 bg-[#e8e8e8] dark:bg-slate-700", "aria-hidden": "true" })
313
346
  ] }) : null;
314
347
  }
315
- function J(e, t, l) {
348
+ function ee(e, t, s) {
316
349
  if (e.layout === "list")
317
350
  return /* @__PURE__ */ o("div", { className: c("space-y-6", e.className), children: [
318
- !l && /* @__PURE__ */ n(
319
- y,
351
+ !s && /* @__PURE__ */ n(
352
+ g,
320
353
  {
321
354
  title: e.title,
322
355
  titleIcon: e.titleIcon,
@@ -324,14 +357,14 @@ function J(e, t, l) {
324
357
  titleClassName: e.titleClassName
325
358
  }
326
359
  ),
327
- e.items.map((s) => /* @__PURE__ */ n(P, { item: s, onItemClick: t }, s.id)),
328
- /* @__PURE__ */ n(h, { action: e.footerAction })
360
+ e.items.map((l) => /* @__PURE__ */ n(X, { item: l, onItemClick: t }, l.id)),
361
+ /* @__PURE__ */ n(v, { action: e.footerAction })
329
362
  ] });
330
363
  if (e.layout === "mediaGrid") {
331
- const s = e.columns ?? 3, a = s === 2 ? "grid-cols-2" : s === 4 ? "grid-cols-4" : "grid-cols-3";
364
+ const l = e.columns ?? 3, a = l === 2 ? "grid-cols-2" : l === 4 ? "grid-cols-4" : "grid-cols-3";
332
365
  return /* @__PURE__ */ o("div", { className: c("px-6 py-3", e.className), children: [
333
- !l && /* @__PURE__ */ n(
334
- y,
366
+ !s && /* @__PURE__ */ n(
367
+ g,
335
368
  {
336
369
  title: e.title,
337
370
  titleIcon: e.titleIcon,
@@ -340,14 +373,14 @@ function J(e, t, l) {
340
373
  titleAction: e.footerAction
341
374
  }
342
375
  ),
343
- /* @__PURE__ */ n("div", { className: c("grid gap-3", a), children: e.items.map((u) => /* @__PURE__ */ n(O, { item: u, onItemClick: t }, u.id)) }),
344
- /* @__PURE__ */ n(h, { action: e.footerAction })
376
+ /* @__PURE__ */ n("div", { className: c("grid gap-3", a), children: e.items.map((u) => /* @__PURE__ */ n(Y, { item: u, onItemClick: t }, u.id)) }),
377
+ /* @__PURE__ */ n(v, { action: e.footerAction })
345
378
  ] });
346
379
  }
347
380
  const r = e.columns ?? 3, i = r === 2 ? "grid-cols-2" : r === 4 ? "grid-cols-4" : "grid-cols-3";
348
381
  return /* @__PURE__ */ o("div", { className: c("px-6 py-3", e.className), children: [
349
- !l && /* @__PURE__ */ n(
350
- y,
382
+ !s && /* @__PURE__ */ n(
383
+ g,
351
384
  {
352
385
  title: e.title,
353
386
  titleIcon: e.titleIcon,
@@ -356,22 +389,22 @@ function J(e, t, l) {
356
389
  titleAction: e.footerAction
357
390
  }
358
391
  ),
359
- /* @__PURE__ */ n("div", { className: c("grid gap-3", i), children: e.items.map((s) => /* @__PURE__ */ n(U, { item: s, onItemClick: t }, s.id)) }),
360
- /* @__PURE__ */ n(h, { action: e.footerAction })
392
+ /* @__PURE__ */ n("div", { className: c("grid gap-3", i), children: e.items.map((l) => /* @__PURE__ */ n(V, { item: l, onItemClick: t }, l.id)) }),
393
+ /* @__PURE__ */ n(v, { action: e.footerAction })
361
394
  ] });
362
395
  }
363
- function K(e) {
396
+ function te(e) {
364
397
  if (!e) return;
365
398
  const t = new Date(e);
366
399
  return Number.isNaN(t.getTime()) ? e : t.toISOString().slice(0, 10);
367
400
  }
368
- function Q(e) {
401
+ function re(e) {
369
402
  const t = e?.trim().toLowerCase();
370
403
  if (t)
371
404
  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";
372
405
  }
373
- function x(e, t, l) {
374
- const r = e.thumbnail ?? e.cover ?? e.metadata?.thumbnail_link, i = e.summary ?? e.content, s = Q(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 = K(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;
406
+ function N(e, t, s) {
407
+ const r = e.thumbnail ?? e.cover ?? e.metadata?.thumbnail_link, i = e.summary ?? e.content, l = re(e.metadata?.file_extension ?? e.type), a = e.source?.name, u = e.category ?? e.categories?.join(" / ") ?? "Categories", d = [a, u].filter(Boolean), f = e.last_updated_by?.user?.username ?? e.owner?.username, m = te(e.last_updated_by?.timestamp ?? e.metadata?.last_reviewed), p = e.metadata?.icon_link ?? e.icon, h = p ? /* @__PURE__ */ n(y, { src: p, alt: "", className: "h-5 w-5 rounded-sm object-contain" }) : void 0;
375
408
  return {
376
409
  type: "result",
377
410
  id: `${e.source?.id ?? e.url ?? e.title}-${t}`,
@@ -379,52 +412,53 @@ function x(e, t, l) {
379
412
  href: e.url,
380
413
  summary: i,
381
414
  cover: r,
382
- fileType: s,
383
- typeIcon: g,
415
+ fileType: l,
416
+ typeIcon: h,
384
417
  breadcrumbs: d.length ? d : void 0,
385
- author: m,
386
- date: p,
387
- onClick: l,
418
+ author: f,
419
+ date: m,
420
+ onClick: s,
388
421
  isActive: !!e.isActive
389
422
  };
390
423
  }
391
- function I({
424
+ function j({
392
425
  section: e,
393
426
  className: t,
394
- theme: l,
427
+ theme: s,
395
428
  footerAction: r,
396
429
  onRecordClick: i,
397
- onItemClick: s,
398
- hideHeader: a
430
+ onItemClick: l,
431
+ hideHeader: a,
432
+ requestHeaders: u
399
433
  }) {
400
- const u = W(B(e, i), r), d = R(l);
401
- return /* @__PURE__ */ n("div", { className: c(d === "dark" && "dark", t), children: J(u, s, a) });
434
+ const d = se(F(e, i), r), f = ne(s);
435
+ return /* @__PURE__ */ n(I.Provider, { value: u, children: /* @__PURE__ */ n("div", { className: c(f === "dark" && "dark", t), children: ee(d, l, a) }) });
402
436
  }
403
- function R(e) {
437
+ function ne(e) {
404
438
  if (e)
405
439
  return e === "light" ? "light" : e === "dark" || typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
406
440
  }
407
- function W(e, t) {
441
+ function se(e, t) {
408
442
  return !t || e.footerAction ? e : e.layout === "list" ? { ...e, footerAction: t } : e.layout === "mediaGrid" ? { ...e, footerAction: t } : { ...e, footerAction: t };
409
443
  }
410
- function ne(e) {
411
- return /* @__PURE__ */ n(I, { ...e });
444
+ function fe(e) {
445
+ return /* @__PURE__ */ n(j, { ...e });
412
446
  }
413
- function le(e) {
414
- return /* @__PURE__ */ n(I, { ...e });
447
+ function me(e) {
448
+ return /* @__PURE__ */ n(j, { ...e });
415
449
  }
416
- function B(e, t) {
417
- if (Array.isArray(e)) return X(e, t);
418
- if (Z(e)) return e;
419
- const l = e;
420
- if (l.type === "imageGroup" && Array.isArray(l.items)) {
421
- const r = l;
450
+ function F(e, t) {
451
+ if (Array.isArray(e)) return le(e, t);
452
+ if (ie(e)) return e;
453
+ const s = e;
454
+ if (s.type === "imageGroup" && Array.isArray(s.items)) {
455
+ const r = s;
422
456
  return r.items[0]?.type === "media" ? {
423
457
  type: "section",
424
458
  title: r.title,
425
459
  layout: "mediaGrid",
426
460
  items: r.items.filter(
427
- (s) => typeof s == "object" && !!s && s.type === "media"
461
+ (l) => typeof l == "object" && !!l && l.type === "media"
428
462
  ),
429
463
  columns: r.columns,
430
464
  footerAction: r.footerAction,
@@ -434,15 +468,15 @@ function B(e, t) {
434
468
  title: r.title,
435
469
  layout: "imageGrid",
436
470
  items: r.items.filter(
437
- (s) => typeof s == "object" && !!s && s.type === "image"
471
+ (l) => typeof l == "object" && !!l && l.type === "image"
438
472
  ),
439
473
  columns: r.columns,
440
474
  footerAction: r.footerAction,
441
475
  className: r.className
442
476
  };
443
477
  }
444
- if (l.type === "videoGroup" && Array.isArray(l.items)) {
445
- const r = l;
478
+ if (s.type === "videoGroup" && Array.isArray(s.items)) {
479
+ const r = s;
446
480
  return {
447
481
  type: "section",
448
482
  title: r.title,
@@ -453,15 +487,15 @@ function B(e, t) {
453
487
  className: r.className
454
488
  };
455
489
  }
456
- return l.type === "result" ? {
490
+ return s.type === "result" ? {
457
491
  type: "section",
458
492
  layout: "list",
459
493
  items: [e]
460
- } : l.type === "media" ? {
494
+ } : s.type === "media" ? {
461
495
  type: "section",
462
496
  layout: "mediaGrid",
463
497
  items: [e]
464
- } : l.type === "image" && typeof l.imageUrl == "string" ? {
498
+ } : s.type === "image" && typeof s.imageUrl == "string" ? {
465
499
  type: "section",
466
500
  layout: "imageGrid",
467
501
  items: [e]
@@ -469,7 +503,7 @@ function B(e, t) {
469
503
  type: "section",
470
504
  layout: "list",
471
505
  items: [
472
- x(
506
+ N(
473
507
  e,
474
508
  0,
475
509
  t ? () => t(e, 0) : void 0
@@ -477,74 +511,74 @@ function B(e, t) {
477
511
  ]
478
512
  };
479
513
  }
480
- function X(e, t) {
514
+ function le(e, t) {
481
515
  if (!e.length)
482
516
  return { type: "section", layout: "list", items: [] };
483
- if (e.every(F)) {
484
- if (e.every((s) => s.type === "result"))
517
+ if (e.every(G)) {
518
+ if (e.every((l) => l.type === "result"))
485
519
  return { type: "section", layout: "list", items: e };
486
- if (e.every((s) => s.type === "media"))
520
+ if (e.every((l) => l.type === "media"))
487
521
  return { type: "section", layout: "mediaGrid", items: e };
488
- if (e.every((s) => s.type === "image" && "imageUrl" in s))
522
+ if (e.every((l) => l.type === "image" && "imageUrl" in l))
489
523
  return { type: "section", layout: "imageGrid", items: e };
490
- if (e.length === 1) return B(e[0], t);
524
+ if (e.length === 1) return F(e[0], t);
491
525
  }
492
- const l = [], r = [];
493
- for (const [s, a] of e.entries()) {
494
- const u = Y(a, s, t);
495
- u ? l.push(u) : r.push(
496
- x(
526
+ const s = [], r = [];
527
+ for (const [l, a] of e.entries()) {
528
+ const u = ae(a, l, t);
529
+ u ? s.push(u) : r.push(
530
+ N(
497
531
  a,
498
- s,
499
- t ? () => t(a, s) : void 0
532
+ l,
533
+ t ? () => t(a, l) : void 0
500
534
  )
501
535
  );
502
536
  }
503
- return l.length && !r.length ? { type: "section", title: A(e, (a) => a.category ?? a.source?.name), layout: "mediaGrid", items: l } : { type: "section", title: A(e, (s) => s.category ?? s.source?.name), layout: "list", items: r };
537
+ return s.length && !r.length ? { type: "section", title: C(e, (a) => a.category ?? a.source?.name), layout: "mediaGrid", items: s } : { type: "section", title: C(e, (l) => l.category ?? l.source?.name), layout: "list", items: r };
504
538
  }
505
- function F(e) {
539
+ function G(e) {
506
540
  if (!e || typeof e != "object") return !1;
507
541
  const t = e;
508
542
  return t.type === "result" || t.type === "media" || t.type === "imageGroup" || t.type === "videoGroup" || t.type === "image" && typeof e.imageUrl == "string";
509
543
  }
510
- function Y(e, t, l) {
511
- const r = e, i = r.metadata, s = typeof i == "object" && i ? i.content_type : void 0, a = typeof s == "string" ? s.trim().toLowerCase() : typeof r.type == "string" ? r.type.trim().toLowerCase() : void 0;
544
+ function ae(e, t, s) {
545
+ const r = e, i = r.metadata, l = typeof i == "object" && i ? i.content_type : void 0, a = typeof l == "string" ? l.trim().toLowerCase() : typeof r.type == "string" ? r.type.trim().toLowerCase() : void 0;
512
546
  if (a !== "image" && a !== "video") return;
513
547
  const u = typeof r.id == "string" ? r.id : void 0, d = 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;
514
548
  if (!d) return;
515
- const m = typeof r.category == "string" ? r.category : Array.isArray(r.categories) ? r.categories.filter((j) => typeof j == "string").join(" / ") : void 0, p = typeof r.title == "string" ? r.title : "Untitled", f = typeof r.url == "string" ? r.url : void 0, g = typeof r.source == "object" && r.source && typeof r.source.name == "string" ? r.source.name : void 0, N = !!l && !F(e);
549
+ const f = typeof r.category == "string" ? r.category : Array.isArray(r.categories) ? r.categories.filter((T) => typeof T == "string").join(" / ") : void 0, m = typeof r.title == "string" ? r.title : "Untitled", p = typeof r.url == "string" ? r.url : void 0, h = typeof r.source == "object" && r.source && typeof r.source.name == "string" ? r.source.name : void 0, w = !!s && !G(e);
516
550
  return {
517
551
  type: "media",
518
- id: u ?? `${f ?? p}-0`,
552
+ id: u ?? `${p ?? m}-0`,
519
553
  mediaType: a === "video" ? "video" : "image",
520
- title: p,
521
- href: N ? void 0 : f,
554
+ title: m,
555
+ href: w ? void 0 : p,
522
556
  cover: d,
523
- sourceLabel: g,
524
- categoryLabel: m,
525
- breadcrumbs: [g, m].filter(Boolean),
526
- ...N ? { onClick: () => l(e, t) } : {}
557
+ sourceLabel: h,
558
+ categoryLabel: f,
559
+ breadcrumbs: [h, f].filter(Boolean),
560
+ ...w ? { onClick: () => s(e, t) } : {}
527
561
  };
528
562
  }
529
- function A(e, t) {
530
- const l = e[0], r = t(l);
563
+ function C(e, t) {
564
+ const s = e[0], r = t(s);
531
565
  if (r) {
532
566
  for (const i of e)
533
567
  if (t(i) !== r) return;
534
568
  return r;
535
569
  }
536
570
  }
537
- function Z(e) {
571
+ function ie(e) {
538
572
  if (!e || typeof e != "object") return !1;
539
573
  const t = e;
540
574
  return t.type === "section" && (t.layout === "list" || t.layout === "imageGrid" || t.layout === "mediaGrid") && Array.isArray(t.items);
541
575
  }
542
- function se(e, t) {
543
- const l = [];
576
+ function pe(e, t) {
577
+ const s = [];
544
578
  for (const r of e) {
545
- const i = l.length ? l[l.length - 1] : void 0;
579
+ const i = s.length ? s[s.length - 1] : void 0;
546
580
  if (r.type === "imageGroup") {
547
- r.items[0]?.type === "media" ? l.push({
581
+ r.items[0]?.type === "media" ? s.push({
548
582
  type: "section",
549
583
  title: r.title,
550
584
  titleIcon: /* @__PURE__ */ n(k, { className: "h-4 w-4" }),
@@ -555,7 +589,7 @@ function se(e, t) {
555
589
  columns: r.columns ?? t,
556
590
  footerAction: r.footerAction,
557
591
  className: r.className
558
- }) : l.push({
592
+ }) : s.push({
559
593
  type: "section",
560
594
  title: r.title,
561
595
  titleIcon: /* @__PURE__ */ n(k, { className: "h-4 w-4" }),
@@ -570,10 +604,10 @@ function se(e, t) {
570
604
  continue;
571
605
  }
572
606
  if (r.type === "videoGroup") {
573
- l.push({
607
+ s.push({
574
608
  type: "section",
575
609
  title: r.title,
576
- titleIcon: /* @__PURE__ */ n(E, { className: "h-4 w-4" }),
610
+ titleIcon: /* @__PURE__ */ n(O, { className: "h-4 w-4" }),
577
611
  titleIconBgColor: "#1784FC",
578
612
  titleClassName: "text-[#1A0CAB] dark:text-[#8AB4F8]",
579
613
  layout: "mediaGrid",
@@ -589,7 +623,7 @@ function se(e, t) {
589
623
  i.items.push(r);
590
624
  continue;
591
625
  }
592
- l.push({
626
+ s.push({
593
627
  type: "section",
594
628
  layout: "list",
595
629
  items: [r]
@@ -601,7 +635,7 @@ function se(e, t) {
601
635
  i.items.push(r);
602
636
  continue;
603
637
  }
604
- l.push({
638
+ s.push({
605
639
  type: "section",
606
640
  layout: "mediaGrid",
607
641
  ...t ? { columns: t } : {},
@@ -613,22 +647,22 @@ function se(e, t) {
613
647
  i.items.push(r);
614
648
  continue;
615
649
  }
616
- l.push({
650
+ s.push({
617
651
  type: "section",
618
652
  layout: "imageGrid",
619
653
  ...t ? { columns: t } : {},
620
654
  items: [r]
621
655
  });
622
656
  }
623
- return l;
657
+ return s;
624
658
  }
625
- function ae(e) {
626
- return e.map((t, l) => x(t, l));
659
+ function he(e) {
660
+ return e.map((t, s) => N(t, s));
627
661
  }
628
662
  export {
629
- ne as SearchResultsImageGroup,
630
- le as SearchResultsVideoGroup,
631
- I as default,
632
- se as itemsToSections,
633
- ae as recordsToItems
663
+ fe as SearchResultsImageGroup,
664
+ me as SearchResultsVideoGroup,
665
+ j as default,
666
+ pe as itemsToSections,
667
+ he as recordsToItems
634
668
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infinilabs/search-results",
3
- "version": "0.0.16",
3
+ "version": "0.0.18",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -17,7 +17,8 @@
17
17
  "types": "./dist/index.d.ts",
18
18
  "import": "./dist/search-results.js",
19
19
  "require": "./dist/search-results.cjs"
20
- }
20
+ },
21
+ "./css": "./dist/search-results.css"
21
22
  },
22
23
  "scripts": {
23
24
  "dev": "vite",