PageSourceSearch

https://analizastiri.ro/_next/static/chunks/app/page-c49da42e50bbbdfa.js

js analizastiri.ro collected 2026-10-02 02:06:15 UTC 16,216 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{4978:function(e,t,r){Promise.resolve().then(r.bind(r,1657))},1657:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return U}});var s=r(7437),a=r(2265),l=r(8472),n=r(6463),i=r(311),c=r(8970),o=r(3043),d=r(9842),u=r(697),m=r(1907),x=r(2588);r(4193);var f=r(6938),p=r(6896),h=r(5625),b=r(1574),y=r(6379),g=r(6653),v=r(9401),j=r(552),w=r(2440),N=r(1391),Z=r(5462),k=r(4887);function C(e){let{title:t,children:r,className:l,okText:n,width:i,noActions:o,cancelText:d,isOpen:u,onSubmit:m,contentClassName:x,onClose:f,style:p}=e,h=(0,a.useRef)(null),b=(0,a.useRef)(null),[y,g]=(0,a.useState)(!1);(0,a.useEffect)(()=>{let e=document.querySelectorAll(".modal-container");u&&g(e[e.length-1]===h.current);let t=e=>{h.current&&!h.current.contains(e.target)&&y&&f()};return u?(document.addEventListener("mousedown",t),b.current&&(b.current.style.opacity="0"),h.current&&(h.current.style.transform="scale(0.5)",h.current.style.opacity="0"),setTimeout(()=>{b.current&&(b.current.style.transition="opacity 300ms",b.current.style.opacity="0.2"),h.current&&(h.current.style.transition="transform 300ms, opacity 300ms",h.current.style.transform="scale(1)",h.current.style.opacity="1")},0)):document.removeEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[u,y,f]);let v=u?(0,s.jsxs)("div",{className:"fixed inset-0 flex items-center justify-center z-50 modal-container",children:[(0,s.jsx)("div",{ref:b,className:"fixed inset-0 bg-black transition-opacity duration-300",style:{opacity:0}}),(0,s.jsxs)("div",{ref:h,className:"flex flex-col bg-white rounded-[32px] max-h-full shadow-xl ".concat(l),style:{transform:"scale(0.5)",opacity:0,width:i||350,style:p},children:[(0,s.jsxs)("div",{className:"flex items-center gap-6 py-4 px-6 h-20 border-b border-slate-200 ",children:[t&&(0,s.jsx)("h2",{className:"text-lg w-full font-bold",children:t}),(0,s.jsx)(c.Z,{type:"flat",onClick:f,className:"flex-none",children:d||"Close"})]}),(0,s.jsx)("div",{className:"h-full overflow-y-auto w-full p-6 ".concat(x),children:r}),!o&&(0,s.jsx)("div",{className:"flex items-center justify-end gap-2 py-4 px-6 border-t border-slate-200",children:(0,s.jsx)(c.Z,{type:"primary",onClick:m,children:n||"Ok"})})]})]}):null;return u?(0,k.createPortal)(v,document.getElementById("main")):null}var z=r(1024),_=r(9157),E=r(6453);function S(e){try{let t=new URL(e);return"http:"===t.protocol||"https:"===t.protocol}catch(e){return!1}}function L(){let[e,t]=(0,a.useState)(!1),r=(0,n.useRouter)(),{t:l}=(0,y.Z)();(0,a.useEffect)(()=>{if("undefined"!=typeof navigator&&/iPhone|iPad|iPod/.test(navigator.userAgent))t(!0);else{var e,r;null===(r=navigator.clipboard)||void 0===r||null===(e=r.readText)||void 0===e||e.call(r).then(e=>{S(e)&&t(!0)}).catch(()=>{})}},[]);let i=async()=>{try{let e=await navigator.clipboard.readText();if(S(e)){let t="/?search=".concat(encodeURIComponent(e));r.push(t),window.location.href=t}else alert("Clipboard does not contain a valid URL.")}catch(e){alert("Clipboard access not allowed. Please tap the page first or use a supported browser.")}};return e?(0,s.jsxs)(c.Z,{type:"primary",className:"sticky mb-6 bottom-8 left-0 right-0 m-auto py-4 w-[300px] justify-center text-center flex md:hidden z-50",onClick:i,children:[(0,s.jsx)(E.Z,{width:20}),(0,s.jsx)("span",{children:l.analyzeClipboard})]}):null}function U(){let[e,t]=(0,a.useState)(""),[r,k]=(0,a.useState)([]),[E,S]=(0,a.useState)(!1),[U,I]=(0,a.useState)(0),[R,P]=(0,a.useState)(0),[A,B]=(0,a.useState)(!1),[O,T]=(0,a.useState)(!1),[F,q]=(0,a.useState)(!1),K=(0,n.useRouter)(),{t:D}=(0,y.Z)(),M=()=>{q(!1),T(!1)},J=()=>{q(!0)},G=async t=>{let r=t||e;if(r){S(!0);try{let e=await l.Z.post("/api/analyze",{url:r});x.Am.success("Analiza a fost realizata cu succes!"),K.push("/result/".concat(e.data.id))}catch(e){var s,a;console.error(e),T((null==e?void 0:null===(a=e.response)||void 0===a?void 0:null===(s=a.data)||void 0===s?void 0:s.details)||(null==e?void 0:e.message)||"Eroare necunoscuta!"),J()}finally{S(!1)}}},H=e=>
1{"Enter"===e.key&&(A?x.Am.error("URL invalid!"):G())};return(0,a.useEffect)(()=>{let e=new URLSearchParams(window.location.search).get("search");e&&!E&&(t(e),setTimeout(()=>{G(e)},500))},[]),(0,a.useEffect)(()=>{let e=(0,d.IO)((0,d.hJ)(o.db,"history"),(0,d.Xo)("timestamp","desc"),(0,d.b9)(10));return(0,d.cf)(e,e=>{k(e.docs.map(e=>({id:e.id,url:e.data().url,full_result:e.data().full_result||null,timestamp:e.data().timestamp})))})},[]),(0,a.useEffect)(()=>{let e=document.createElement("script");return e.src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js",e.async=!0,e.crossOrigin="anonymous",document.body.appendChild(e),()=>{document.body.removeChild(e)}},[]),(0,a.useEffect)(()=>{let e=(0,d.JU)(o.db,"stats","requestCounter");return(0,d.cf)(e,e=>{e.exists()&&I(e.data().count||0)})},[]),(0,a.useEffect)(()=>{let e=(0,d.JU)(o.db,"stats","limitCounter");return(0,d.cf)(e,e=>{e.exists()&&P(e.data().limit||100)})},[]),(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center gap-6 w-full",children:[(0,s.jsx)(z.Z,{}),(0,s.jsx)(_.Z,{}),(0,s.jsxs)("div",{className:"flex flex-col items-center gap-2 text-center",children:[(0,s.jsx)(g.Z,{url:"https://buymeacoffee.com/vladracoare",className:"flex md:hidden"}),(0,s.jsxs)("div",{className:"flex items-center gap-2 text-center pt-20",children:[(0,s.jsx)("h1",{className:"text-3xl md:text-4xl font-bold ".concat(E?"ai-loading":"bg-gradient-to-r from-primary-700 to-primary-900"," text-transparent bg-clip-text"),style:{WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:D.analyzeTitle}),E?(0,s.jsx)(Z.Z,{size:"xs"}):(0,s.jsx)("div",{className:"w-4 h-4 md:w-6 md:h-6 rounded-full bg-primary-900 flex "})]}),(0,s.jsx)("div",{className:"text-sm mt-2 text-primary-900 font-semibold",children:(0,s.jsxs)(N.Z,{className:"flex items-center gap-1 text-left",text:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("p",{children:[D.currentLimit,": ",(0,s.jsx)("strong",{children:R})," / ",D.day]}),(0,s.jsxs)("p",{children:[D.currentUsage,": ",(0,s.jsx)("strong",{children:U})," /"," ",(0,s.jsx)("strong",{children:R})]}),(0,s.jsx)("p",{className:"mt-2",children:D.limitDisclaimer})]}),children:[(0,s.jsx)(f.Z,{className:"text-primary-700 hover:text-primary-900 transition duration-150 ease-in",width:16}),(0,s.jsx)("span",{children:D.dailyLimit})]})}),(0,s.jsx)(v.Z,{progress:U/R*100})]}),(0,s.jsx)("div",{className:"flex w-full justify-center items-center sticky top-4 z-40",children:(0,s.jsxs)("div",{className:"relative w-full md:max-w-[700px]",children:[(0,s.jsx)(i.Z,{error:A,wrapperClassName:"w-full",className:"py-5 transition-shadow ".concat(E?"ai-loading-faint":"shadow-md"," duration-150 ease-in focus:shadow-xl"),placeholder:D.enterArticleUrlHere,value:e,onKeyUp:e=>H(e),disabled:E,onChange:e=>{let r=e.target.value;t(r),r?B(function(e){try{return new URL(e),!1}catch(e){return!0}}(r)):B(!1)}}),!E&&(0,s.jsxs)(c.Z,{className:"absolute right-[6px] h-auto py-4 top-[6px] bottom-[6px] z-10",type:"primary",disabled:!e||A,loading:E,onClick:()=>G(),children:[(0,s.jsx)(p.Z,{width:20}),(0,s.jsx)("span",{className:"hidden md:block",children:D.analyzeButton})]})]})}),r.length>0&&(0,s.jsxs)("div",{className:"w-full flex flex-col gap-2 max-w-[700px] mt-6 text-left",children:[(0,s.jsxs)("h2",{className:"text-xl md:text-2xl font-semibold mb-4",children:[D.recentLinks,":"]}),r.map(e=>{var t,r,a,l,n,i,c,o,d,x,f,p;return(0,s.jsx)(u.Z,{extra:(0,s.jsx)(h.Z,{width:16,className:"text-primary-500 ml-2"}),title:(0,s.jsxs)("div",{className:"flex flex-col w-full",children:[(0,s.jsx)("span",{className:"w-full truncate text-base md:text-lg font-semibold",children:null==e?void 0:null===(r=e.full_result)||void 0===r?void 0:null===(t=r.source)||void 0===t?void 0:t.article_title}),(0,s.jsx)("span",{className:"w-full truncate text-xs md:text-sm text-slate-500",children:null==e?void 0:null===(l=e.full_result)||void 0===l?void 0:null===(a=l.source)||void 0===a?void 0:a.url})]}),contentClassName:"flex flex-nowrap gap-4 md:gap-0 md:flex-col",className:"hover:z-10 cursor-pointer hover:shadow-lg transition-shadow duration-150 ease-in",onClick:()=>K.push("/result/".concat(e.id)),children:(0,s.jsxs)("div",{className:"w-full grid grid-cols-2 gap-2 md:grid-cols-3 md:gap-4 items-center md:items-start",children:[(0,s.jsx)(w.Z,{label:D.bias,component:(0,s.jsx)("div",{className:"flex items-center w-full gap-1 py-2",children:(0,s.jsx)(v.Z,{className:"mt-2",progress:null==e?void 0:null===(i=e.full_result)||void 0===i?void 0:null===(n=i.source)||void 0===n?void 0:n.bias_score})})}),(0,s.jsx)(w.Z,{label:D.tone,component:(0,s.jsx)("div",{className:"py-2 text-left",children:(0,s.jsx)(j.Z,{state:(0,m.n)(null==e?void 0:null===(o=e.full_result)||void 0===o?void 0:null===(c=o.source)||void 0===c?void 0:c.article_tone),className:"uppercase inline-flex items-center",children:D.tones[null==e?void 0:null===(x=e.full_result)||void 0===x?void 0:null===(d=x.source)||void 0===d?void 0:d.article_tone]})})}),(0,s.jsx)(w.Z,{label:D.leaning,component:(0,s.jsx)("div",{className:"py-2 text-left",children:(0,s.jsx)(j.Z,{className:"uppercase inline-flex items-center",children:D.politicalLeanings[null==e?void 0:null===(p=e.full_result)||void 0===p?void 0:null===(f=p.source)||void 0===f?void 0:f.website_political_leaning]})})})]})},e.id)})]}),(0,s.jsx)(C,{isOpen:F,title:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(b.Z,{width:20,className:"text-red-600"}),(0,s.jsx)("spa",{children:D.analysisError})]}),onSubmit:M,onClose:M,children:(0,s.jsx)("div",{className:"flex flex-col gap-2",children:(0,s.jsx)("p",{children:O})})}),(0,s.jsx)(x.Ix,{}),(0,s.jsx)(L,{})]})}},8970:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});var s=r(7437),a=r(5462),l=r(7138);function n(e){let t,{type:r,onClick:n,nativeType:i,children:c,className:o,disabled:d,loading:u,href:m,noSpace:x,style:f}=e;switch(r){case"secondary":t="border bg-white border-primary-200 ease-in duration-100 text-primary-900 hover:bg-primary-50 active:bg-primary-100 disabled:cursor-not-allowed disabled:bg-gray-100 disabled:text-gray-400 ".concat(o);break;case"primary":t="border-none bg-primary-900 ease-in duration-100 text-white hover:bg-primary-800 active:bg-primary-700 disabled:cursor-not-allowed disabled:bg-gray-100 disabled:text-gray-400 ".concat(o);break;case"negative":t="bg-white ease-in duration-100 text-primary-900 hover:opacity-70 active:opacity-90 disabled:cursor-not-allowed disabled:opacity-70 disabled:text-gray-500 ".concat(o);break;
1case"flat":t="border border-transparent rounded-full ease-in duration-100 text-primary-900 hover:border hover:border-primary-200 active:bg-primary-50 disabled:cursor-not-allowed disabled:text-gray-400 ".concat(o," ").concat(x&&" px-0 py-1 rounded-sm");break;default:t="border border-primary-200 ease-in duration-100 text-primary-900 hover:bg-primary-50 active:bg-primary-100 disabled:cursor-not-allowed disabled:bg-gray-100 disabled:text-gray-400 ".concat(o)}return m?(0,s.jsx)(l.default,{style:f,href:m,children:(0,s.jsx)("a",{className:"py-2 px-4 rounded-full ".concat(t),children:c})}):(0,s.jsxs)("button",{style:f,type:i,onClick:n,disabled:d||u,className:"py-2 px-4 rounded-full ".concat(t),children:[u&&(0,s.jsx)(a.Z,{size:"xs"}),c]}),(0,s.jsx)("button",{style:f,type:i,onClick:m?null:n,disabled:d||u,className:"py-2 px-4 rounded-full ".concat(t),children:m?(0,s.jsxs)(l.default,{href:m,className:"flex items-center justify-center gap-2",children:[u&&(0,s.jsx)(a.Z,{size:"xs"}),c]}):(0,s.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[u&&(0,s.jsx)(a.Z,{size:"xs"}),c]})})}},2440:function(e,t,r){"use strict";var s=r(7437);r(2265),t.Z=e=>{let{label:t,component:r,className:a}=e;return(0,s.jsxs)("div",{className:"flex flex-col items-start justify-start w-full ".concat(a),children:[(0,s.jsx)("label",{className:"text-sm text-nowrap font-semibold w-full",children:t}),(0,s.jsx)("div",{className:"w-full",children:r})]})}},311:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});var s=r(7437);function a(e){let{type:t="texts",placeholder:r,errorMessage:a,wrapperClassName:l,value:n,onChange:i,onKeyUp:c,onKeyDown:o,onFocus:d,onBlur:u,extra:m,className:x,autoFocus:f,style:p,disabled:h=!1,error:b,required:y,min:g,max:v}=e;return(0,s.jsxs)("div",{className:"relative flex w-full ".concat(l),style:p,children:[(0,s.jsx)("input",{type:t,autoFocus:f,placeholder:r,value:n,min:g,max:v,required:y,disabled:h,onChange:i,onKeyUp:c,onKeyDown:o,onFocus:d,onBlur:u,className:"".concat(x," w-full px-4 py-3 ease-in transition-shadow duration-150 border border-slate-200 rounded-full focus:outline-none focus:ring focus:ring-primary-300 disabled:bg-gray-100 disabled:text-gray-600 ").concat(b?"!border-red-500 bg-red-50 text-red-500 focus:ring-red-300":"")}),m&&(0,s.jsx)("div",{className:"absolute right-2 top-1",children:m}),a&&(0,s.jsx)("div",{className:"absolute text-sm font-italic text-red-600 right-2 -bottom-8 left-2",children:a})]})}},9401:function(e,t,r){"use strict";var s=r(7437);r(2265),r(3427),t.Z=e=>{let{progress:t=0,className:r}=e,a=Math.round(t);return(0,s.jsxs)("div",{className:"flex items-center gap-2 w-full ".concat(r),children:[(0,s.jsx)("div",{className:"progress-bar-container bg-slate-200 rounded-full w-full flex items-center gap-1",children:(0,s.jsx)("div",{className:"progress-bar-indicator",style:{width:"".concat(a,"%")}})}),(0,s.jsxs)("span",{className:"text-xs text-primary-700",children:[a,"%"]})]})}},5462:function(e,t,r){"use strict";r.d(t,{Z:function(){return l}});var s=r(7437),a=r(6648);function l(e){let{size:t,className:r}=e,l=e=>{let t;switch(e){case"xs":t=24;break;case"sm":t=32;break;case"md":default:t=48;break;case"lg":t=56;break;case"xl":t=64;break;case"2xl":t=72}return t};return(0,s.jsx)(a.default,{className:"inline-flex animate-spin ".concat(r),width:l(t),height:l(t),src:"/assets/spinner.png",alt:"Spinner animation"})}},552:function(e,t,r){"use strict";var s=r(7437);t.Z=e=>{let{state:t="default",children:r,className:a}=e;return(0,s.jsx)("span",{className:"".concat("inline-flex items-center text-nowrap justify-center text-center px-3 py-1 rounded-full text-sm font-medium"," ").concat({default:"bg-primary-100 border border-primary-200 text-primary-600",info:"bg-blue-100 border border-blue-200 text-blue-600",success:"bg-green-100 border border-green-200 text-green-600",error:"bg-red-100 border border-red-200 text-red-600",warning:"bg-yellow-100 border border-yellow-200 text-yellow-600"}[t]," ").concat(a),children:r})}},1391:function(e,t,r){"use strict";var s=r(7437),a=r(2265);t.Z=e=>{let t,{position:r,text:l,children:n,className:i,width:c}=e,[o,d]=(0,a.useState)(!1),u=!c&&"min-w-[200px]",m=c&&c+"px";switch(r){case"right":t="right-0 bottom-full";break;case"top":t="bottom-full left-0";break;case"left":t="right-full top-0 bottom-0";case"bottom":t="top-full left-0";break;default:t="bottom-full left-0"}return(0,s.jsxs)("div",{className:"relative inline-block ".concat(i),onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),children:[n,o&&(0,s.jsx)("div",{style:{width:c&&m},className:"absolute ".concat(u," transform mb-2 px-3 py-2 bg-gray-800 text-white text-sm rounded-xl shadow-lg z-10 ").concat(t),children:l})]})}},3043:function(e,t,r){"use strict";r.d(t,{db:function(){return i}});var s=r(5236),a=r(7175),l=r(9842);let n=(0,s.ZF)({apiKey:"AIzaSyDqkexZ0q2uawbKw6hckOh1PG2Vz1Q5zTg",authDomain:"analiza-stiri.firebaseapp.com",projectId:"analiza-stiri",storageBucket:"analiza-stiri.firebasestorage.app",messagingSenderId:"158999652150",appId:"1:158999652150:web:b4e19f510bd7b51acdb597",measurementId:"G-YSYM91BBNS"});try{(0,a.IH)(n)}catch(e){console.warn("Firebase analytics not supported",e)}let i=(0,l.ad)(n)},1907:function(e,t,r){"use strict";function s(e){switch(e){case"neutral":case"neutru":return"success";case"investigative":case"investigativ":return"info";case"opinie":case"editorial":return"warning";case"emotional":case"propaganda":return"error";default:return"default"}}r.d(t,{n:function(){return s}})},3427:function(){}},function(e){e.O(0,[690,358,138,648,211,315,719,379,949,971,23,744],function(){return e(e.s=4978)}),_N_E=e.O()}]);

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.