1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,22706,e=>{"use strict";var t=e.i(43476),r=e.i(75157);e.s(["PageHeader",0,function({title:e,description:i,className:s,children:l}){return(0,t.jsxs)("div",{className:(0,r.cn)("flex items-start justify-between gap-4 mb-6",s),children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-bold text-white",children:e}),i&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:i})]}),l&&(0,t.jsx)("div",{className:"flex items-center gap-2 shrink-0",children:l})]})}])},76248,e=>{"use strict";let t=(0,e.i(56420).default)("circle-question-mark",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["HelpCircle",0,t],76248)},16327,e=>{"use strict";let t=(0,e.i(56420).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",0,t],16327)},90470,e=>{"use strict";var t=e.i(43476),r=e.i(71645),i=e.i(46932),s=e.i(88653),l=e.i(76248),n=e.i(16327),a=e.i(63676),o=e.i(75157),d=e.i(46227);e.s(["HelpCard",0,function({storageKey:e,title:c,body:u}){let{t:f}=(0,d.useT)(),[h,m]=(0,r.useState)(()=>!localStorage.getItem(`pl_help_${e}`)),[x,p]=(0,r.useState)(!0);function g(){try{localStorage.setItem(`pl_help_${e}`,"1")}catch{}m(!1)}return h?(0,t.jsxs)("div",{className:"rounded-xl border border-primary/20 bg-primary/5 overflow-hidden",children:[(0,t.jsxs)("button",{onClick:()=>p(e=>!e),className:"w-full flex items-center gap-2.5 px-4 py-3 text-left",children:[(0,t.jsx)(l.HelpCircle,{className:"w-4 h-4 text-primary/60 shrink-0"}),(0,t.jsx)("span",{className:"flex-1 text-sm font-medium text-white/75",children:c}),(0,t.jsx)(n.ChevronDown,{className:(0,o.cn)("w-4 h-4 text-white/35 transition-transform duration-200",x&&"rotate-180")}),(0,t.jsx)("span",{role:"button",tabIndex:0,onClick:e=>{e.stopPropagation(),g()},onKeyDown:e=>"Enter"===e.key&&(e.stopPropagation(),g()),className:"ml-1 text-white/25 hover:text-white/60 transition-colors","aria-label":f.help.dismiss,children:(0,t.jsx)(a.X,{className:"w-3.5 h-3.5"})})]}),(0,t.jsx)(s.AnimatePresence,{initial:!1,children:x&&(0,t.jsx)(i.motion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,t.jsx)("p",{className:"px-4 pb-4 text-xs text-white/50 leading-relaxed border-t border-primary/10 pt-3",children:u})})})]}):(0,t.jsxs)("button",{onClick:()=>{m(!0),p(!0)},className:"flex items-center gap-1.5 text-xs text-white/30 hover:text-white/55 transition-colors",children:[(0,t.jsx)(l.HelpCircle,{className:"w-3.5 h-3.5"}),(0,t.jsx)("span",{children:f.help.howToUse})]})}])},15288,e=>{"use strict";var t=e.i(43476),r=e.i(71645),i=e.i(75157);let s=r.forwardRef(({className:e,glass:r=!1,...s},l)=>(0,t.jsx)("div",{ref:l,className:(0,i.cn)("rounded-xl border border-border bg-card text-card-foreground",r&&"backdrop-blur-xl",e),...s}));s.displayName="Card";let l=r.forwardRef(({className:e,...r},s)=>(0,t.jsx)("div",{ref:s,className:(0,i.cn)("flex flex-col gap-1.5 p-4 pb-0",e),...r}));l.displayName="CardHeader";let n=r.forwardRef(({className:e,...r},s)=>(0,t.jsx)("h3",{ref:s,className:(0,i.cn)("font-semibold leading-snug tracking-tight",e),...r}));n.displayName="CardTitle",r.forwardRef(({className:e,...r},s)=>(0,t.jsx)("p",{ref:s,className:(0,i.cn)("text-xs text-muted-foreground",e),...r})).displayName="CardDescription";let a=r.forwardRef(({className:e,...r},s)=>(0,t.jsx)("div",{ref:s,className:(0,i.cn)("p-4",e),...r}));a.displayName="CardContent",r.forwardRef(({className:e,...r},s)=>(0,t.jsx)("div",{ref:s,className:(0,i.cn)("flex items-center p-4 pt-0",e),...r})).displayName="CardFooter",e.s(["Card",0,s,"CardContent",0,a,"CardHeader",0,l,"CardTitle",0,n])},73474,e=>{"use strict";let t=(0,e.i(56420).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",0,t],73474)},86318,e=>{"use strict";var t=e.i(71645);e.i(43476);var r=t.createContext(void 0);e.s(["useDirection",0,function(e){let i=t.useContext(r);return e||i||"ltr"}])},75830,e=>{"use strict";var t=e.i(71645),r=e.i(30030),i=e.i(20783),s=e.i(91918),l=e.i(43476),n=new WeakMap;function a(e,t){var r,i;let s,l,n;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let a=(r=e,i=t,s=r.length,(n=(l=o(i))>=0?l:s+l)<0||n>=s?-1:n);return -1===a?void 0:e[a]}function o(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],n.set(this,!0)}set(e,t){return n.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,r){let i,s=this.has(t),l=this.#e.length,n=o(e),a=n>=0?n:l+n,d=a<0||a>=l?-1:a;if(d===this.size||s&&d===this.size-1||-1===d)return this.set(t,r),this;let c=this.size+ +!s;n<0&&a++;let u=[...this.#e],f=!1;for(let e=a;
1e<c;e++)if(a===e){let l=u[e];u[e]===t&&(l=u[e+1]),s&&this.delete(t),i=this.get(l),this.set(t,r)}else{f||u[e-1]!==t||(f=!0);let r=u[f?e:e-1],s=i;i=this.get(r),this.delete(r),this.set(r,s)}return this}with(t,r,i){let s=new e(this);return s.insert(t,r,i),s}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let i=this.#e.indexOf(e);return -1===i?this:this.insert(i,t,r)}after(e){let t=this.#e.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,r){let i=this.#e.indexOf(e);return -1===i?this:this.insert(i+1,t,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=a(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=a(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return a(this.#e,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let i=r+t;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.at(i)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let i=r+t;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.keyAt(i)}find(e,t){let r=0;for(let i of this){if(Reflect.apply(e,t,[i,r,this]))return i;r++}}findIndex(e,t){let r=0;for(let i of this){if(Reflect.apply(e,t,[i,r,this]))return r;r++}return -1}filter(t,r){let i=[],s=0;for(let e of this)Reflect.apply(t,r,[e,s,this])&&i.push(e),s++;return new e(i)}map(t,r){let i=[],s=0;for(let e of this)i.push([e[0],Reflect.apply(t,r,[e,s,this])]),s++;return new e(i)}reduce(...e){let[t,r]=e,i=0,s=r??this.at(0);for(let r of this)s=0===i&&1===e.length?r:Reflect.apply(t,this,[s,r,i,this]),i++;return s}reduceRight(...e){let[t,r]=e,i=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let s=this.at(r);i=r===this.size-1&&1===e.length?s:Reflect.apply(t,this,[i,s,r,this])}return i}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),i=this.get(r);t.set(r,i)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let i=new e,s=this.size-1;if(void 0===t)return i;t<0&&(t+=this.size),void 0!==r&&r>0&&(s=r-1);for(let e=t;e<=s;e++){let t=this.keyAt(e),r=this.get(t);i.set(t,r)}return i}every(e,t){let r=0;for(let i of this){if(!Reflect.apply(e,t,[i,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let i of this){if(Reflect.apply(e,t,[i,r,this]))return!0;r++}return!1}}),e.s(["createCollection",0,function(e){let n=e+"CollectionProvider",[a,o]=(0,r.createContextScope)(n),[d,c]=a(n,{collectionRef:{current:null},itemMap:new Map}),u=e=>{let{scope:r,children:i}=e,s=t.default.useRef(null),n=t.default.useRef(new Map).current;return(0,l.jsx)(d,{scope:r,itemMap:n,collectionRef:s,children:i})};u.displayName=n;let f=e+"CollectionSlot",h=(0,s.createSlot)(f),m=t.default.forwardRef((e,t)=>{let{scope:r,children:s}=e,n=c(f,r),a=(0,i.useComposedRefs)(t,n.collectionRef);return(0,l.jsx)(h,{ref:a,children:s})});m.displayName=f;let x=e+"CollectionItemSlot",p="data-radix-collection-item",g=(0,s.createSlot)(x),v=t.default.forwardRef((e,r)=>{let{scope:s,children:n,...a}=e,o=t.default.useRef(null),d=(0,i.useComposedRefs)(r,o),u=c(x,s);return t.default.useEffect(()=>(u.itemMap.set(o,{ref:o,...a}),()=>void u.itemMap.delete(o))),(0,l.jsx)(g,{...{[p]:""},ref:d,children:n})});return v.displayName=x,[{Provider:u,Slot:m,ItemSlot:v},function(r){let i=c(e+"CollectionConsumer",r);return t.default.useCallback(()=>{let e=i.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${p}]`));return Array.from(i.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[i.collectionRef,i.itemMap])},o]}])},41192,e=>{"use strict";e.s(["LEAN_COLORS",0,{"far-left":"#dc2626",left:"#f97316","center-left":"#eab308",center:"#a3a3a3","center-right":"#3b82f6",right:"#6366f1","far-right":"#7c3aed"},"LEAN_LABELS",0,{"far-left":"Far Left",left:"Left","center-left":"Center-Left",center:"Center","center-right":"Center-Right",right:"Right","far-right":"Far Right"},"LEAN_ORDER",0,["far-left","left","center-left","center","center-right","right","far-right"],"POLITICAL_SPECTRUM",0,[{label:"Far Left",color:"#dc2626"},{label:"Left",color:"#f97316"},{label:"Center-Left",color:"#eab308"},{label:"Center",color:"#a3a3a3"},{label:"Center-Right",color:"#3b82f6"},{label:"Right",color:"#6366f1"},{label:"Far Right",color:"#7c3aed"}],"REGIONS",0,[{id:"north-america",label:"Americas",emoji:"ð"},{id:"europe",label:"Europe",emoji:"ð"},{id:"asia-pacific",label:"Asia",emoji:"ð"},{id:"middle-east",label:"Mid East",emoji:"ð"},{id:"africa",label:"Africa",emoji:"ð"},{id:"latin-america",label:"Latam",emoji:"ð"}]])},35804,e=>{"use strict";var t=e.i(71645),r=e.i(34620);e.s(["useSize",0,function(e){let[i,s]=t.useState(void 0);return(0,r.useLayoutEffect)(()=>
1{if(e){s({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,i;if(!Array.isArray(t)||!t.length)return;let l=t[0];if("borderBoxSize"in l){let e=l.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,i=t.blockSize}else r=e.offsetWidth,i=e.offsetHeight;s({width:r,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}s(void 0)},[e]),i}])},53046,e=>{"use strict";e.s(["DIVERGENCE_CONFIG",0,{high:{label:"High",textClass:"text-red-400",bgClass:"bg-red-500",barColor:"#ef4444"},moderate:{label:"Moderate",textClass:"text-yellow-400",bgClass:"bg-yellow-500",barColor:"#eab308"},low:{label:"Low",textClass:"text-green-400",bgClass:"bg-green-500",barColor:"#22c55e"}},"HIGH_DIVERGENCE",0,70,"getDivergenceLevel",0,function(e){return e>=70?"high":e>=40?"moderate":"low"}])},70152,e=>{"use strict";e.s(["clamp",0,function(e,[t,r]){return Math.min(r,Math.max(t,e))}])},99682,e=>{"use strict";var t=e.i(71645);e.s(["usePrevious",0,function(e){let r=t.useRef({value:e,previous:e});return t.useMemo(()=>(r.current.value!==e&&(r.current.previous=r.current.value,r.current.value=e),r.current.previous),[e])}])},82761,e=>{"use strict";var t=e.i(43476),r=e.i(71645),i=e.i(70152),s=e.i(81140),l=e.i(20783),n=e.i(30030),a=e.i(69340),o=e.i(86318),d=e.i(99682),c=e.i(35804),u=e.i(48425),f=e.i(75830),h=["PageUp","PageDown"],m=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],x={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},p="Slider",[g,v,b]=(0,f.createCollection)(p),[y,w]=(0,n.createContextScope)(p,[b]),[j,N]=y(p),C=r.forwardRef((e,l)=>{let{name:n,min:o=0,max:d=100,step:c=1,orientation:u="horizontal",disabled:f=!1,minStepsBetweenThumbs:x=0,defaultValue:p=[o],value:v,onValueChange:b=()=>{},onValueCommit:y=()=>{},inverted:w=!1,form:N,...C}=e,R=r.useRef(new Set),S=r.useRef(0),E="horizontal"===u,[D=[],M]=(0,a.useControllableState)({prop:v,defaultProp:p,onChange:e=>{let t=[...R.current];t[S.current]?.focus(),b(e)}}),P=r.useRef(D);function L(e,t,{commit:r}={commit:!1}){let s,l=(String(c).split(".")[1]||"").length,n=Math.round((Math.round((e-o)/c)*c+o)*(s=Math.pow(10,l)))/s,a=(0,i.clamp)(n,[o,d]);M((e=[])=>{let i=function(e=[],t,r){let i=[...e];return i[r]=t,i.sort((e,t)=>e-t)}(e,a,t);if(!function(e,t){if(t>0)return Math.min(...e.slice(0,-1).map((t,r)=>e[r+1]-t))>=t;return!0}(i,x*c))return e;{S.current=i.indexOf(a);let t=String(i)!==String(e);return t&&r&&y(i),t?i:e}})}return(0,t.jsx)(j,{scope:e.__scopeSlider,name:n,disabled:f,min:o,max:d,valueIndexToChangeRef:S,thumbs:R.current,values:D,orientation:u,form:N,children:(0,t.jsx)(g.Provider,{scope:e.__scopeSlider,children:(0,t.jsx)(g.Slot,{scope:e.__scopeSlider,children:(0,t.jsx)(E?k:A,{"aria-disabled":f,"data-disabled":f?"":void 0,...C,ref:l,onPointerDown:(0,s.composeEventHandlers)(C.onPointerDown,()=>{f||(P.current=D)}),min:o,max:d,inverted:w,onSlideStart:f?void 0:function(e){let t=function(e,t){if(1===e.length)return 0;let r=e.map(e=>Math.abs(e-t)),i=Math.min(...r);return r.indexOf(i)}(D,e);L(e,t)},onSlideMove:f?void 0:function(e){L(e,S.current)},onSlideEnd:f?void 0:function(){let e=P.current[S.current];D[S.current]!==e&&y(D)},onHomeKeyDown:()=>!f&&L(o,0,{commit:!0}),onEndKeyDown:()=>!f&&L(d,D.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!f){let r=h.includes(e.key)||e.shiftKey&&m.includes(e.key),i=S.current;L(D[i]+c*(r?10:1)*t,i,{commit:!0})}}})})})})});C.displayName=p;var[R,S]=y(p,{startEdge:"left",endEdge:"right",size:"width",direction:1}),k=r.forwardRef((e,i)=>{let{min:s,max:n,dir:a,inverted:d,onSlideStart:c,onSlideMove:u,onSlideEnd:f,onStepKeyDown:h,...m}=e,[p,g]=r.useState(null),v=(0,l.useComposedRefs)(i,e=>g(e)),b=r.useRef(void 0),y=(0,o.useDirection)(a),w="ltr"===y,j=w&&!d||!w&&d;function N(e){let t=b.current||p.getBoundingClientRect(),r=T([0,t.width],j?[s,n]:[n,s]);return b.current=t,r(e-t.left)}return(0,t.jsx)(R,{scope:e.__scopeSlider,startEdge:j?"left":"right",endEdge:j?"right":"left",direction:j?1:-1,size:"width",children:(0,t.jsx)(E,{dir:y,"data-orientation":"horizontal",...m,ref:v,style:{...m.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{let t=N(e.clientX);c?.(t)},onSlideMove:e=>{let t=N(e.clientX);u?.(t)},onSlideEnd:()=>{b.current=void 0,f?.()},onStepKeyDown:e=>
1{let t=x[j?"from-left":"from-right"].includes(e.key);h?.({event:e,direction:t?-1:1})}})})}),A=r.forwardRef((e,i)=>{let{min:s,max:n,inverted:a,onSlideStart:o,onSlideMove:d,onSlideEnd:c,onStepKeyDown:u,...f}=e,h=r.useRef(null),m=(0,l.useComposedRefs)(i,h),p=r.useRef(void 0),g=!a;function v(e){let t=p.current||h.current.getBoundingClientRect(),r=T([0,t.height],g?[n,s]:[s,n]);return p.current=t,r(e-t.top)}return(0,t.jsx)(R,{scope:e.__scopeSlider,startEdge:g?"bottom":"top",endEdge:g?"top":"bottom",size:"height",direction:g?1:-1,children:(0,t.jsx)(E,{"data-orientation":"vertical",...f,ref:m,style:{...f.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{let t=v(e.clientY);o?.(t)},onSlideMove:e=>{let t=v(e.clientY);d?.(t)},onSlideEnd:()=>{p.current=void 0,c?.()},onStepKeyDown:e=>{let t=x[g?"from-bottom":"from-top"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})}),E=r.forwardRef((e,r)=>{let{__scopeSlider:i,onSlideStart:l,onSlideMove:n,onSlideEnd:a,onHomeKeyDown:o,onEndKeyDown:d,onStepKeyDown:c,...f}=e,x=N(p,i);return(0,t.jsx)(u.Primitive.span,{...f,ref:r,onKeyDown:(0,s.composeEventHandlers)(e.onKeyDown,e=>{"Home"===e.key?(o(e),e.preventDefault()):"End"===e.key?(d(e),e.preventDefault()):h.concat(m).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:(0,s.composeEventHandlers)(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),x.thumbs.has(t)?t.focus():l(e)}
1),onPointerMove:(0,s.composeEventHandlers)(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&n(e)}),onPointerUp:(0,s.composeEventHandlers)(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})}),D="SliderTrack",M=r.forwardRef((e,r)=>{let{__scopeSlider:i,...s}=e,l=N(D,i);return(0,t.jsx)(u.Primitive.span,{"data-disabled":l.disabled?"":void 0,"data-orientation":l.orientation,...s,ref:r})});M.displayName=D;var P="SliderRange",L=r.forwardRef((e,i)=>{let{__scopeSlider:s,...n}=e,a=N(P,s),o=S(P,s),d=r.useRef(null),c=(0,l.useComposedRefs)(i,d),f=a.values.length,h=a.values.map(e=>I(e,a.min,a.max)),m=f>1?Math.min(...h):0,x=100-Math.max(...h);return(0,t.jsx)(u.Primitive.span,{"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,...n,ref:c,style:{...e.style,[o.startEdge]:m+"%",[o.endEdge]:x+"%"}})});L.displayName=P;var H="SliderThumb",O=r.forwardRef((e,i)=>{let s=v(e.__scopeSlider),[n,a]=r.useState(null),o=(0,l.useComposedRefs)(i,e=>a(e)),d=r.useMemo(()=>n?s().findIndex(e=>e.ref.current===n):-1,[s,n]);return(0,t.jsx)(_,{...e,ref:o,index:d})}),_=r.forwardRef((e,i)=>{var n,a,o,d,f;let h,m,{__scopeSlider:x,index:p,name:v,...b}=e,y=N(H,x),w=S(H,x),[j,C]=r.useState(null),R=(0,l.useComposedRefs)(i,e=>C(e)),k=!j||y.form||!!j.closest("form"),A=(0,c.useSize)(j),E=y.values[p],D=void 0===E?0:I(E,y.min,y.max),M=(n=p,(a=y.values.length)>2?`Value ${n+1} of ${a}`:2===a?["Minimum","Maximum"][n]:void 0),P=A?.[w.size],L=P?(o=P,d=D,f=w.direction,m=T([0,50],[0,h=o/2]),(h-m(d)*f)*f):0;return r.useEffect(()=>{if(j)return y.thumbs.add(j),()=>{y.thumbs.delete(j)}},[j,y.thumbs]),(0,t.jsxs)("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[w.startEdge]:`calc(${D}% + ${L}px)`},children:[(0,t.jsx)(g.ItemSlot,{scope:e.__scopeSlider,children:(0,t.jsx)(u.Primitive.span,{role:"slider","aria-label":e["aria-label"]||M,"aria-valuemin":y.min,"aria-valuenow":E,"aria-valuemax":y.max,"aria-orientation":y.orientation,"data-orientation":y.orientation,"data-disabled":y.disabled?"":void 0,tabIndex:y.disabled?void 0:0,...b,ref:R,style:void 0===E?{display:"none"}:e.style,onFocus:(0,s.composeEventHandlers)(e.onFocus,()=>{y.valueIndexToChangeRef.current=p})})}),k&&(0,t.jsx)(z,{name:v??(y.name?y.name+(y.values.length>1?"[]":""):void 0),form:y.form,value:E},p)]})});O.displayName=H;var z=r.forwardRef(({__scopeSlider:e,value:i,...s},n)=>{let a=r.useRef(null),o=(0,l.useComposedRefs)(a,n),c=(0,d.usePrevious)(i);return r.useEffect(()=>{let e=a.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value").set;if(c!==i&&t){let r=new Event("input",{bubbles:!0});t.call(e,i),e.dispatchEvent(r)}},[c,i]),(0,t.jsx)(u.Primitive.input,{style:{display:"none"},...s,ref:o,defaultValue:i})});function I(e,t,r){return(0,i.clamp)(100/(r-t)*(e-t),[0,100])}function T(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let i=(t[1]-t[0])/(e[1]-e[0]);return t[0]+i*(r-e[0])}}z.displayName="RadioBubbleInput";var B=e.i(75157),F=e.i(46227);e.s(["DivergenceSlider",0,function({value:e,onChange:r,className:i}){let{t:s}=(0,F.useT)();return(0,t.jsxs)("div",{className:(0,B.cn)("flex items-center gap-3 min-w-[160px]",i),children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:s.filters.divergence}),(0,t.jsxs)(C,{value:[e],onValueChange:([e])=>r(e),min:0,max:100,step:5,className:"relative flex items-center select-none touch-none flex-1 h-4",children:[(0,t.jsx)(M,{className:"relative h-1 flex-1 rounded-full bg-white/10",children:(0,t.jsx)(L,{className:"absolute h-full rounded-full bg-primary"})}),(0,t.jsx)(O,{className:"block w-3.5 h-3.5 rounded-full border border-primary bg-background shadow focus:outline-none focus:ring-2 focus:ring-ring cursor-grab"})]}),(0,t.jsx)("span",{className:"text-xs font-mono text-primary w-6 text-right",children:e})]})}],82761)},43599,e=>{"use strict";var t=e.i(43476),r=e.i(75157),i=e.i(41192);e.s(["LeanFilter",0,function({selected:e,onChange:s}){return(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:i.LEAN_ORDER.map(l
1=>{let n=e.includes(l);return(0,t.jsx)("button",{onClick:()=>{e.includes(l)?s(e.filter(e=>e!==l)):s([...e,l])},className:(0,r.cn)("px-2.5 py-1 rounded-full text-xs font-medium border transition-all",n?"border-transparent text-white":"border-border text-muted-foreground hover:border-white/20 hover:text-white"),style:n?{background:i.LEAN_COLORS[l]}:void 0,children:i.LEAN_LABELS[l]},l)})})}])},61197,e=>{"use strict";var t=e.i(43476),r=e.i(71645),i=e.i(22706),s=e.i(46932),l=e.i(88653),n=e.i(63676),a=e.i(46944),o=e.i(32902);function d(){return(0,o.useNewsStore)((0,a.useShallow)(e=>({alertRules:e.alertRules,dismissedBreaking:e.dismissedBreaking,addAlertRule:e.addAlertRule,removeAlertRule:e.removeAlertRule,toggleAlert:e.toggleAlert,dismissBreaking:e.dismissBreaking})))}var c=e.i(53046),u=e.i(22016);function f(){let e=(0,o.useNewsStore)(e=>e.clusters),{dismissedBreaking:r,dismissBreaking:i}=d(),a=e.reduce((e,t)=>!e||t.divergenceScore>e.divergenceScore?t:e,null),f=a&&a.divergenceScore>=c.HIGH_DIVERGENCE&&!r.includes(a.id);return(0,t.jsx)(l.AnimatePresence,{children:f&&a&&(0,t.jsxs)(s.motion.div,{initial:{y:-48,opacity:0}
1,animate:{y:0,opacity:1},exit:{y:-48,opacity:0},className:"sticky top-0 z-40 flex items-center gap-3 px-4 py-2 bg-red-950/90 border-b border-red-800/50 backdrop-blur text-sm",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5 shrink-0 font-semibold text-red-400",children:[(0,t.jsx)("span",{className:"w-2 h-2 rounded-full bg-red-400 animate-pulse"}),"High Divergence"]}),(0,t.jsx)("p",{className:"flex-1 text-white/90 truncate",children:a.topic}),(0,t.jsxs)("span",{className:"shrink-0 text-xs font-mono text-red-400 font-bold",children:[a.divergenceScore.toFixed(0),"/100"]}),(0,t.jsx)(u.default,{href:`/story/${a.id}`,className:"shrink-0 text-xs text-red-300 hover:text-white underline",children:"View"}),(0,t.jsx)("button",{onClick:()=>i(a.id),className:"shrink-0 text-white/40 hover:text-white",children:(0,t.jsx)(n.X,{className:"w-4 h-4"})})]})})}var h=e.i(90470);let m=(0,e.i(56420).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);var x=e.i(73474),p=e.i(41192);function g({rule:e}){let{removeAlertRule:r,toggleAlert:i}=d();return(0,t.jsxs)("div",{className:"flex items-start gap-3 p-4 bg-card border border-border rounded-xl",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0 space-y-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[e.minDivergence>0&&(0,t.jsxs)("span",{className:"px-2 py-0.5 rounded-full text-xs bg-primary/20 text-primary",children:["Divergence ⥠",e.minDivergence]}),e.keywords.map(e=>(0,t.jsxs)("span",{className:"px-2 py-0.5 rounded-full text-xs bg-white/5 text-white/70",children:["â",e,"â"]},e)),e.lean.map(e=>(0,t.jsx)("span",{className:"px-2 py-0.5 rounded-full text-xs bg-white/5 text-white/70",children:p.LEAN_LABELS[e]},e))]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:e.enabled?"Active":"Paused"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("button",{onClick:()=>i(e.id),className:`w-8 h-4 rounded-full transition-colors relative ${e.enabled?"bg-primary":"bg-white/10"}`,children:(0,t.jsx)("span",{className:`absolute top-0.5 w-3 h-3 bg-white rounded-full transition-all ${e.enabled?"left-4.5":"left-0.5"}`})}),(0,t.jsx)("button",{onClick:()=>r(e.id),className:"text-muted-foreground hover:text-red-400 transition-colors",children:(0,t.jsx)(x.Trash2,{className:"w-4 h-4"})})]})]})}var v=e.i(82761),b=e.i(43599),y=e.i(46227);function w(){let{t:e}=(0,y.useT)(),{alertRules:i,addAlertRule:s}=d(),[l,n]=(0,r.useState)(60),[a,o]=(0,r.useState)(""),[c,u]=(0,r.useState)([]);return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"p-4 bg-card border border-border rounded-xl space-y-4",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-white",children:e.alerts.newRule}),(0,t.jsx)(v.DivergenceSlider,{value:l,onChange:n}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground mb-1.5 block",children:e.alerts.keywords}),(0,t.jsx)("input",{value:a,onChange:e=>o(e.target.value),placeholder:e.alerts.keywordsPlaceholder,className:"w-full px-3 py-1.5 text-sm bg-background border border-border rounded-lg text-white placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground mb-1.5 block",children:e.alerts.leanFilter}),(0,t.jsx)(b.LeanFilter,{selected:c,onChange:u})]}),(0,t.jsxs)("button",{onClick:()=>{s({id:`rule-${Date.now()}`,minDivergence:l,keywords:a.split(",").map(e=>e.trim()).filter(Boolean),lean:c,enabled:!0}),o(""),u([])},className:"flex items-center gap-2 px-3 py-2 bg-primary text-white rounded-lg text-sm font-medium hover:bg-primary/90 transition-colors",children:[(0,t.jsx)(m,{className:"w-4 h-4"}),e.alerts.addRule]})]}),i.length>0&&(0,t.jsx)("div",{className:"space-y-2",children:i.map(e=>(0,t.jsx)(g,{rule:e},e.id))})]})}var j=e.i(70812);function N(){let{t:e}=(0,y.useT)(),r=(0,o.useNewsStore)(e=>e.clusters),{alertRules:i}=d(),s=r.filter(e=>i.some(t=>!!t.enabled&&(!(t.minDivergence>0)||!(e.divergenceScore<t.minDivergence))&&(!(t.keywords.length>0)||!!t.keywords.some(t=>e.topic.toLowerCase().includes(t.toLowerCase())))&&(!(t.lean.length>0)||!!e.articles.some(e=>t.lean.includes(e.lean))))).sort((e,t)=>
1t.divergenceScore-e.divergenceScore);return 0===s.length?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,t.jsx)(j.Bell,{className:"w-10 h-10 text-muted-foreground mb-3"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e.alerts.noTriggered}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:e.alerts.noTriggeredHint})]}):(0,t.jsx)("div",{className:"space-y-2",children:s.map(r=>{let i=(0,c.getDivergenceLevel)(r.divergenceScore),s=c.DIVERGENCE_CONFIG[i];return(0,t.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-card border border-border rounded-xl",children:[(0,t.jsx)("div",{className:`shrink-0 w-2 h-2 mt-1.5 rounded-full ${s.bgClass}`}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("p",{className:"text-sm text-white font-medium line-clamp-1",children:r.topic}),(0,t.jsxs)("p",{className:`text-xs font-mono ${s.textClass}`,children:[r.divergenceScore.toFixed(0),e.alerts.divergenceUnit]})]})]},r.id)})})}var C=e.i(15288);e.s(["default",0,function(){let{fetchNews:e,clusters:s}=(0,o.useNewsStore)(),{t:l}=(0,y.useT)();return(0,r.useEffect)(()=>{0===s.length&&e()},[s.length,e]),(0,t.jsxs)("div",{className:"flex flex-col h-full",children:[(0,t.jsx)(f,{}),(0,t.jsxs)("div",{className:"flex-1 overflow-auto p-6 space-y-6",children:[(0,t.jsx)(i.PageHeader,{title:l.alerts.title,de
1scription:l.alerts.description}),(0,t.jsx)(h.HelpCard,{storageKey:"alerts",title:l.help.alertsTitle,body:l.help.alertsBody}),(0,t.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(0,t.jsxs)(C.Card,{children:[(0,t.jsx)(C.CardHeader,{className:"pb-2",children:(0,t.jsx)(C.CardTitle,{className:"text-sm",children:l.ui.activeAlerts})}),(0,t.jsx)(C.CardContent,{children:(0,t.jsx)(N,{})})]}),(0,t.jsxs)(C.Card,{children:[(0,t.jsx)(C.CardHeader,{className:"pb-2",children:(0,t.jsx)(C.CardTitle,{className:"text-sm",children:l.ui.alertRules})}),(0,t.jsx)(C.CardContent,{children:(0,t.jsx)(w,{})})]})]})]})]})}],61197)}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.