1import{u as ka,r as n,b as $,a as Me,A as _a,j as e,H as Na,L as yt}from"./app-DP13319Q.js";import{M as we}from"./index-WruS1vxz.js";import{a as Ca}from"./index-CMiBza1W.js";import{D as Sa,E as za}from"./DraggableMenu-Bk7Spryo.js";import{M as Ma}from"./react-tooltip.min-DW3XhwOj.js";/* empty css */import{F as ve,x as ks,E as _s,y as Ns,q as Cs,h as La,S as gs,b7 as Aa}from"./index-CtyZ6W6U.js";import{m as xe,c as Ea,e as Ia,s as fs,a as Ba,b as bs,g as qt,S as Ss,N as zs,E as Ms,d as Ls}from"./effect-fade-CFAMJYaO.js";import{S as Ta}from"./SocialMediaComposer-BYx7f4su.js";/* empty css */import"./index-DQkUn08L.js";function rt(c){return c===void 0&&(c=""),`.${c.trim().replace(/([\.:!+\/()[\]])/g,"\\$1").replace(/ /g,".")}`}function As(c){let{swiper:t,extendParams:g,on:y,emit:S}=c;const L="swiper-pagination";g({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:o=>o,formatFractionTotal:o=>o,bulletClass:`${L}-bullet`,bulletActiveClass:`${L}-bullet-active`,modifierClass:`${L}-`,currentClass:`${L}-current`,totalClass:`${L}-total`,hiddenClass:`${L}-hidden`,progressbarFillClass:`${L}-progressbar-fill`,progressbarOppositeClass:`${L}-progressbar-opposite`,clickableClass:`${L}-clickable`,lockClass:`${L}-lock`,horizontalClass:`${L}-horizontal`,verticalClass:`${L}-vertical`,paginationDisabledClass:`${L}-disabled`}}),t.pagination={el:null,bullets:[]};let ee,O=0;function r(){return!t.params.pagination.el||!t.pagination.el||Array.isArray(t.pagination.el)&&t.pagination.el.length===0}function C(o,l){const{bulletActiveClass:d}=t.params.pagination;o&&(o=o[`${l==="prev"?"previous":"next"}ElementSibling`],o&&(o.classList.add(`${d}-${l}`),o=o[`${l==="prev"?"previous":"next"}ElementSibling`],o&&o.classList.add(`${d}-${l}-${l}`)))}function h(o,l,d){if(o=o%d,l=l%d,l===o+1)return"next";if(l===o-1)return"previous"}function b(o){const l=o.target.closest(rt(t.params.pagination.bulletClass));if(!l)return;o.preventDefault();const d=bs(l)*t.params.slidesPerGroup;if(t.params.loop){if(t.realIndex===d)return;const u=h(t.realIndex,d,t.slides.length);u==="next"?t.slideNext():u==="previous"?t.slidePrev():t.slideToLoop(d)}else t.slideTo(d)}function f(){const o=t.rtl,l=t.params.pagination;if(r())return;let d=t.pagination.el;d=xe(d);let u,z;const K=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length,F=t.params.loop?Math.ceil(K/t.params.slidesPerGroup):t.snapGrid.length;if(t.params.loop?(z=t.previousRealIndex||0,u=t.params.slidesPerGroup>1?Math.floor(t.realIndex/t.params.slidesPerGroup):t.realIndex):typeof t.snapIndex<"u"?(u=t.snapIndex,z=t.previousSnapIndex):(z=t.previousIndex||0,u=t.activeIndex||0),l.type==="bullets"&&t.pagination.bullets&&t.pagination.bullets.length>0){const k=t.pagination.bullets;let M,x,q;if(l.dynamicBullets&&(ee=Ba(k[0],t.isHorizontal()?"width":"height"),d.forEach(N=>{N.style[t.isHorizontal()?"width":"height"]=`${ee*(l.dynamicMainBullets+4)}px`}),l.dynamicMainBullets>1&&z!==void 0&&(O+=u-(z||0),O>l.dynamicMainBullets-1?O=l.dynamicMainBullets-1:O<0&&(O=0)),M=Math.max(u-O,0),x=M+(Math.min(k.length,l.dynamicMainBullets)-1),q=(x+M)/2),k.forEach(N=>{const B=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(T=>`${l.bulletActiveClass}${T}`)].map(T=>typeof T=="string"&&T.includes(" ")?T.split(" "):T).flat();N.classList.remove(...B)}),d.length>1)k.forEach(N=>{const B=bs(N);B===u?N.classList.add(...l.bulletActiveClass.split(" ")):t.isElement&&N.setAttribute("part","bullet"),l.dynamicBullets&&(B>=M&&B<=x&&N.classList.add(...`${l.bulletActiveClass}-main`.split(" ")),B===M&&C(N,"prev"),B===x&&C(N,"next"))});else{const N=k[u];if(N&&N.classList.add(...l.bulletActiveClass.split(" ")),t.isElement&&k.forEach((B,T)=>{B.setAttribute("part",T===u?"bullet-active":"bullet")}),l.dynamicBullets){const B=k[M],T=k[x];for(let ae=M;ae<=x;ae+=1)k[ae]&&k[ae].classList.add(...`${l.bulletActiveClass}-main`.split(" "));C(B,"prev"),C(T,"next")}}if(l.dynamicBullets){const N=Math.min(k.length,l.dynamicMainBullets+4),B=(ee*N-ee)/2-q*ee,T=o?"right":"left";
vendor: 5,792 bytes, line 1
1k.forEach(ae=>{ae.style[t.isHorizontal()?T:"top"]=`${B}px`})}}d.forEach((k,M)=>{if(l.type==="fraction"&&(k.querySelectorAll(rt(l.currentClass)).forEach(x=>{x.textContent=l.formatFractionCurrent(u+1)}),k.querySelectorAll(rt(l.totalClass)).forEach(x=>{x.textContent=l.formatFractionTotal(F)})),l.type==="progressbar"){let x;l.progressbarOpposite?x=t.isHorizontal()?"vertical":"horizontal":x=t.isHorizontal()?"horizontal":"vertical";const q=(u+1)/F;let N=1,B=1;x==="horizontal"?N=q:B=q,k.querySelectorAll(rt(l.progressbarFillClass)).forEach(T=>{T.style.transform=`translate3d(0,0,0) scaleX(${N}) scaleY(${B})`,T.style.transitionDuration=`${t.params.speed}ms`})}l.type==="custom"&&l.renderCustom?(fs(k,l.renderCustom(t,u+1,F)),M===0&&S("paginationRender",k)):(M===0&&S("paginationRender",k),S("paginationUpdate",k)),t.params.watchOverflow&&t.enabled&&k.classList[t.isLocked?"add":"remove"](l.lockClass)})}function X(){const o=t.params.pagination;if(r())return;const l=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.grid&&t.params.grid.rows>1?t.slides.length/Math.ceil(t.params.grid.rows):t.slides.length;let d=t.pagination.el;d=xe(d);let u="";if(o.type==="bullets"){let z=t.params.loop?Math.ceil(l/t.params.slidesPerGroup):t.snapGrid.length;t.params.freeMode&&t.params.freeMode.enabled&&z>l&&(z=l);for(let K=0;K<z;K+=1)o.renderBullet?u+=o.renderBullet.call(t,K,o.bulletClass):u+=`<${o.bulletElement} ${t.isElement?'part="bullet"':""} class="${o.bulletClass}"></${o.bulletElement}>`}o.type==="fraction"&&(o.renderFraction?u=o.renderFraction.call(t,o.currentClass,o.totalClass):u=`<span class="${o.currentClass}"></span> / <span class="${o.totalClass}"></span>`),o.type==="progressbar"&&(o.renderProgressbar?u=o.renderProgressbar.call(t,o.progressbarFillClass):u=`<span class="${o.progressbarFillClass}"></span>`),t.pagination.bullets=[],d.forEach(z=>{o.type!=="custom"&&fs(z,u||""),o.type==="bullets"&&t.pagination.bullets.push(...z.querySelectorAll(rt(o.bulletClass)))}),o.type!=="custom"&&S("paginationRender",d[0])}function V(){t.params.pagination=Ea(t,t.originalParams.pagination,t.params.pagination,{el:"swiper-pagination"});const o=t.params.pagination;if(!o.el)return;let l;typeof o.el=="string"&&t.isElement&&(l=t.el.querySelector(o.el)),!l&&typeof o.el=="string"&&(l=[...document.querySelectorAll(o.el)]),l||(l=o.el),!(!l||l.length===0)&&(t.params.uniqueNavElements&&typeof o.el=="string"&&Array.isArray(l)&&l.length>1&&(l=[...t.el.querySelectorAll(o.el)],l.length>1&&(l=l.find(d=>Ia(d,".swiper")[0]===t.el))),Array.isArray(l)&&l.length===1&&(l=l[0]),Object.assign(t.pagination,{el:l}),l=xe(l),l.forEach(d=>{o.type==="bullets"&&o.clickable&&d.classList.add(...(o.clickableClass||"").split(" ")),d.classList.add(o.modifierClass+o.type),d.classList.add(t.isHorizontal()?o.horizontalClass:o.verticalClass),o.type==="bullets"&&o.dynamicBullets&&(d.classList.add(`${o.modifierClass}${o.type}-dynamic`),O=0,o.dynamicMainBullets<1&&(o.dynamicMainBullets=1)),o.type==="progressbar"&&o.progressbarOpposite&&d.classList.add(o.progressbarOppositeClass),o.clickable&&d.addEventListener("click",b),t.enabled||d.classList.add(o.lockClass)}))}function p(){const o=t.params.pagination;if(r())return;let l=t.pagination.el;l&&(l=xe(l),l.forEach(d=>{d.classList.remove(o.hiddenClass),d.classList.remove(o.modifierClass+o.type),d.classList.remove(t.isHorizontal()?o.horizontalClass:o.verticalClass),o.clickable&&(d.classList.remove(...(o.clickableClass||"").split(" ")),d.removeEventListener("click",b))})),t.pagination.bullets&&t.pagination.bullets.forEach(d=>d.classList.remove(...o.bulletActiveClass.split(" ")))}y("changeDirection",()=>{if(!t.pagination||!t.pagination.el)return;const o=t.params.pagination;let{el:l}=t.pagination;l=xe(l),l.forEach(d=>{d.classList.remove(o.horizontalClass,o.verticalClass),d.classList.add(t.isHorizontal()?o.horizontalClass:o.verticalClass)})}),y("init",()=>{t.params.pagination.enabled===!1?A():(V(),X(),f())}),y("activeIndexChange",()=>{typeof t.snapIndex>"u"&&f()}),y("snapIndexChange",()=>{f()}),y("snapGridLengthChange",()=>{X(),f()}),y("destroy",()=>{p()}),y("enable disable",()=>{let{el:o}=t.pagination;o&&(o=xe(o),o.forEach(l=>l.classList[t.enabled?"remove":"add"](t.params.pagination.lockClass)))}),y("lock unlock",()=>{f()}),y("click",(o,l)=>{const d=l.target,u=xe(t.pagination.el);if(t.params.pagination.el&&t.params.pagination.hideOnClick&&u&&u.length>0&&!d.classList.contains(t.params.pagination.bulletClass)){if(t.navigation&&(t.navigation.nextEl&&d===t.navigation.nextEl||t.navigation.prevEl&&d===t.navigation.prevEl))return;const z=u[0].classList.contains(t.params.pagination.hiddenClass);S(z===!0?"paginationShow":"paginationHide"),u.forEach(K=>K.classList.toggle(t.params.pagination.hiddenClass))}});const he=()=>{t.el.classList.remove(t.params.pagination.paginationDisabledClass);let{el:o}=t.pagination;o&&(o=xe(o),o.forEach(l=>l.classList.remove(t.params.pagination.paginationDisabledClass))),V(),X(),f()},A=()=>{t.el.classList.add(t.params.pagination.paginationDisabledClass);let{el:o}=t.pagination;o&&(o=xe(o),o.forEach(l=>l.classList.add(t.params.pagination.paginationDisabledClass))),p()};Object.assign(t.pagination,{enable:he,disable:A,render:X,update:f,init:V,destroy:p})}function Es(c){let{swiper:t,extendParams:g,on:y,emit:S,params:L}=c;t.autoplay={running:!1,paused:!1,timeLeft:0},g({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let ee,O,r=L&&L.autoplay?L.autoplay.delay:3e3,C=L&&L.autoplay?L.autoplay.delay:3e3,h,b=new Date().getTime(),f,X,V,p,he,A,o;function l(_){!t||t.destroyed||!t.wrapperEl||_.target===t.wrapperEl&&(t.wrapperEl.removeEventListener("transitionend",l),!(o||_.detail&&_.detail.bySwiperTouchMove)&&M())}const d=()=>
vendor: 1,873 bytes, line 1
1{if(t.destroyed||!t.autoplay.running)return;t.autoplay.paused?f=!0:f&&(C=h,f=!1);const _=t.autoplay.paused?h:b+C-new Date().getTime();t.autoplay.timeLeft=_,S("autoplayTimeLeft",_,_/r),O=requestAnimationFrame(()=>{d()})},u=()=>{let _;return t.virtual&&t.params.virtual.enabled?_=t.slides.find(P=>P.classList.contains("swiper-slide-active")):_=t.slides[t.activeIndex],_?parseInt(_.getAttribute("data-swiper-autoplay"),10):void 0},z=_=>{if(t.destroyed||!t.autoplay.running)return;cancelAnimationFrame(O),d();let Y=typeof _>"u"?t.params.autoplay.delay:_;r=t.params.autoplay.delay,C=t.params.autoplay.delay;const P=u();!Number.isNaN(P)&&P>0&&typeof _>"u"&&(Y=P,r=P,C=P),h=Y;const D=t.params.speed,re=()=>{!t||t.destroyed||(t.params.autoplay.reverseDirection?!t.isBeginning||t.params.loop||t.params.rewind?(t.slidePrev(D,!0,!0),S("autoplay")):t.params.autoplay.stopOnLastSlide||(t.slideTo(t.slides.length-1,D,!0,!0),S("autoplay")):!t.isEnd||t.params.loop||t.params.rewind?(t.slideNext(D,!0,!0),S("autoplay")):t.params.autoplay.stopOnLastSlide||(t.slideTo(0,D,!0,!0),S("autoplay")),t.params.cssMode&&(b=new Date().getTime(),requestAnimationFrame(()=>{z()})))};return Y>0?(clearTimeout(ee),ee=setTimeout(()=>{re()},Y)):requestAnimationFrame(()=>{re()}),Y},K=()=>{b=new Date().getTime(),t.autoplay.running=!0,z(),S("autoplayStart")},F=()=>{t.autoplay.running=!1,clearTimeout(ee),cancelAnimationFrame(O),S("autoplayStop")},k=(_,Y)=>{if(t.destroyed||!t.autoplay.running)return;clearTimeout(ee),_||(A=!0);const P=()=>{S("autoplayPause"),t.params.autoplay.waitForTransition?t.wrapperEl.addEventListener("transitionend",l):M()};if(t.autoplay.paused=!0,Y){he&&(h=t.params.autoplay.delay),he=!1,P();return}h=(h||t.params.autoplay.delay)-(new Date().getTime()-b),!(t.isEnd&&h<0&&!t.params.loop)&&(h<0&&(h=0),P())},M=()=>{t.isEnd&&h<0&&!t.params.loop||t.destroyed||!t.autoplay.running||(b=ne
1w Date().getTime(),A?(A=!1,z(h)):z(),t.autoplay.paused=!1,S("autoplayResume"))},x=()=>{if(t.destroyed||!t.autoplay.running)return;const _=qt();_.visibilityState==="hidden"&&(A=!0,k(!0)),_.visibilityState==="visible"&&M()},q=_=>{_.pointerType==="mouse"&&(A=!0,o=!0,!(t.animating||t.autoplay.paused)&&k(!0))},N=_=>{_.pointerType==="mouse"&&(o=!1,t.autoplay.paused&&M())},B=()=>{t.params.autoplay.pauseOnMouseEnter&&(t.el.addEventListener("pointerenter",q),t.el.addEventListener("pointerleave",N))},T=()=>{t.el&&typeof t.el!="string"&&(t.el.removeEventListener("pointerenter",q),t.el.removeEventListener("pointerleave",N))},ae=()=>{qt().addEventListener("visibilitychange",x)},Ut=()=>{qt().removeEventListener("visibilitychange",x)};y("init",()=>{t.params.autoplay.enabled&&(B(),ae(),K())}),y("destroy",()=>{T(),Ut(),t.autoplay.running&&F()}),y("_freeModeStaticRelease",()=>{(V||A)&&M()}),y("_freeModeNoMomentumRelease",()=>{t.params.autoplay.disableOnInteraction?F():k(!0,!0)}),y("beforeTransitionStart",(_,Y,P)=>{t.destroyed||!t.autoplay.running||(P||!t.params.autoplay.disableOnInteraction?k(!0,!0):F())}),y("sliderFirstMove",()=>{if(!(t.destroyed||!t.autoplay.running)){if(t.params.autoplay.disableOnInteraction){F();return}X=!0,V=!1,A=!1,p=setTimeout(()=>{A=!0,V=!0,k(!0)},200)}}),y("touchEnd",()=>{if(!(t.destroyed||!t.autoplay.running||!X)){if(clearTimeout(p),clearTimeout(ee),t.params.autoplay.disableOnInteraction){V=!1,X=!1;return}V&&t.params.cssMode&&M(),V=!1,X=!1}}),y("slideChange",()=>{t.destroyed||!t.autoplay.running||(he=!0)}),Object.assign(t.autoplay,{start:K,stop:F,pause:k,resume:M})}const Ra=800,Fa=500,Wa=300,$a=2,Pa=800,vs=100*1024*1024,Da=300,Ha=2e3,Oa=["image/jpeg","image/png","image/gif","image/webp","image/bmp","image/svg+xml","application/pdf","video/mp4","video/webm","video/ogg","video/quicktime","video/x-msvideo","audio/mpeg","audio/wav","audio/ogg","audio/mp3","audio/webm","audio/x-wav","text/html","application/xhtml+xml"],qa=[".jpg",".jpeg",".png",".gif",".webm",".bmp",".svg",".pdf",".mp4",".webm",".ogg",".mov",".avi",".mp3",".wav",".ogg",".m4a",".html",".htm"],wt=c=>[/^#+\s/,/\*\*.+\*\*/,/_{2}.+_{2}/,/\*.+\*/,/\[.+\]\(.+\)/,/^- /,/^\d+\. /,/```/,/`[^`]+`/,/>\s/,/!\[.*\]\(.*\)/,/^\|/].some(g=>g.test(c)),Gt=c=>{if(c===0)return"0 Bytes";const t=1024,g=["Bytes","KB","MB","GB"],y=Math.floor(Math.log(c)/Math.log(t));return parseFloat((c/Math.pow(t,y)).toFixed(2))+" "+g[y]},Ga=(c,t)=>c.startsWith("image/")?Aa:c==="application/pdf"?ks:c.includes("word")||t.match(/doc|docx/)?Ns:c==="text/html"||t.match(/html|htm/)?_s:Cs,ys=({icon:c,label:t,count:g,locked:y,active:S})=>e.jsxs("div",{className:"flex items-center justify-center space-x-1.5",children:[c,e.jsxs("span",{className:"whitespace-nowrap",children:[t,g!==void 0&&g>0&&` (${g})`]}),y&&e.jsx("span",{className:"text-[9px] ml-0.5",children:"ð"})]}),Is=n.memo(({content:c})=>{if(!c||Array.isArray(c)&&c.length===0)return e.jsx("div",{className:"flex justify-center items-center mb-6 md:mb-8 lg:mb-10 max-h-[400px] overflow-y-auto",children:e.jsx("p",{className:"font-medium tracking-tight text-[#1E3033] text-center max-w-3xl",children:"Caution: We are in the pre-alpha test, all answers are open to the general public."})});if(typeof c=="string")return wt(c)?e.jsx("div",{className:"flex justify-center items-center mb-6 md:mb-8 lg:mb-10 max-h-[400px] overflow-y-auto",children:e.jsx("div",{className:"w-full max-w-4xl top-markdown-content",children:e.jsx(we,{source:c,style:{backgroundColor:"transparent",color:"#1E3033",fontFamily:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontSize:"14px",lineHeight:"1.6"},wrapperElement:{"data-color-mode":"light"}})})}):e.jsx("div",{className:"flex justify-center items-center mb-6 md:mb-8 lg:mb-10 max-h-[400px] overflow-y-auto",children:e.jsx("div",{className:"font-medium tracking-tight text-[#1E3033] text-center max-w-4xl",dangerouslySetInnerHTML:{__html:c}})});if(Array.isArray(c)&&c.length>0){const t=c.length>1;return e.jsxs("div",{className:"w-full mb-6 md:mb-8 lg:mb-10 max-h-[400px] overflow-y-auto",children:[e.jsx(Ss,{modules:[Es,As,zs,Ms],spaceBetween:30,slidesPerView:1,effect:"fade",fadeEffect:{crossFade:!0},navigation:t,loop:t,className:"top-content-swiper",style:{borderRadius:"1rem",overflow:"hidden",maxHeight:"400px"},children:c.map((g,y)=>{const S=wt(g.content);return e.jsx(Ls,{children:S?e.jsx("div",{className:"text-center mx-auto w-full top-markdown-slide",children:e.jsx(we,{source:g.content,style:{backgroundColor:"transparent",color:"#1E3033",fontFamily:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontSize:"14px",lineHeight:"1.6"},wrapperElement:{"data-color-mode":"light"}})}):e.jsx("div",{className:"text-center mx-auto w-full",dangerouslySetInnerHTML:{__html:g.content}})},g.id||y)})}),e.jsx("style",{children:` 2 .top-content-swiper .swiper-slide { 3 display: flex; 4 align-items: center; 5 justify-content: center; 6 } 7 .top-content-swiper .swiper-button-next, 8 .top-content-swiper .swiper-button-prev { 9 color: #22c55e; 10 background: rgba(255, 255, 255, 0.95); 11 width: 40px; 12 height: 40px; 13 border-radius: 50%; 14 box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); 15 transition: all 0.3s ease; 16 } 17 .top-content-swiper .swiper-button-next:after, 18 .top-content-swiper .swiper-button-prev:after { 19 font-size: 18px; 20 font-weight: bold; 21 } 22 .top-content-swiper .swiper-button-next:hover, 23 .top-content-swiper .swiper-button-prev:hover { 24 background: #22c55e; 25 color: white; 26 transform: scale(1.05); 27 } 28 .top-content-swiper .swiper-pagination-bullet { 29 background: #cbd5e0; 30 opacity: 0.7; 31 width: 8px; 32 height: 8px; 33 transition: all 0.3s ease; 34 } 35 .top-content-swiper .swiper-pagination-bullet-active { 36 background: #22c55e; 37 width: 24px; 38 border-radius: 4px; 39 } 40 .top-content-swiper .swiper-pagination { 41 bottom: 15px; 42 } 43 44 .top-markdown-content .wmde-markdown, 45 .top-markdown-slide .wmde-markdown { 46 background-color: transparent !important; 47 color: #1E3033 !important; 48 text-align: center !important; 49 } 50 .top-markdown-content .wmde-markdown table, 51 .top-markdown-slide .wmde-markdown table { 52 border: 1px solid #e2e8f0 !important; 53 background-color: #ffffff !important; 54 border-collapse: collapse !important; 55 width: 100% !important; 56 margin: 1rem 0 !important; 57 } 58 .top-markdown-content .wmde-markdown th, 59 .top-markdown-slide .wmde-markdown th { 60 background-color: #f7fafc !important; 61 border: 1px solid #e2e8f0 !important; 62 padding: 8px 12px !important; 63 font-weight: bold !important; 64 } 65 .top-markdown-content .wmde-markdown td, 66 .top-markdown-slide .wmde-markdown td { 67 border: 1px solid #e2e8f0 !important; 68 padding: 8px 12px !important; 69 } 70 .top-markdown-content .wmde-markdown code, 71 .top-markdown-slide .wmde-markdown code { 72 background-color: #f7fafc !important; 73 color: #22c55e !important; 74 border-radius: 4px !important; 75 padding: 2px 6px !important; 76 } 77 .top-markdown-content .wmde-markdown pre, 78 .top-markdown-slide .wmde-markdown pre { 79 background-color: #f7fafc !important; 80 border: 1px solid #e2e8f0 !important; 81 border-radius: 6px !important; 82 padding: 1rem !important; 83 overflow: auto !important; 84 text-align: left !important; 85 } 86 .top-markdown-content .wmde-markdown blockquote, 87 .top-markdown-slide .wmde-markdown blockquote { 88 border-left: 4px solid #22c55e !important; 89 background-color: #f7fafc !important; 90 padding: 0.5rem 1rem !important; 91 margin: 1rem 0 !important; 92 } 93 .top-markdown-content .wmde-markdown a, 94 .top-markdown-slide .wmde-markdown a { 95 color: #22c55e !important; 96 text-decoration: none !important; 97 } 98 .top-markdown-content .wmde-markdown a:hover, 99 .top-markdown-slide .wmde-markdown a:hover { 100 text-decoration: underline !important; 101 } 102 .top-markdown-content .wmde-markdown h1, 103 .top-markdown-content .wmde-markdown h2, 104 .top-markdown-content .wmde-markdown h3, 105 .top-markdown-content .wmde-markdown h4, 106 .top-markdown-slide .wmde-markdown h1, 107 .top-markdown-slide .wmde-markdown h2, 108 .top-markdown-slide .wmde-markdown h3, 109 .top-markdown-slide .wmde-markdown h4 { 110 color: #1E3033 !important; 111 border-bottom: 1px solid #e2e8f0 !important; 112 padding-bottom: 0.3rem !important; 113 text-align: center !important; 114 } 115 .top-markdown-content .wmde-markdown ul, 116 .top-markdown-content .wmde-markdown ol, 117 .top-markdown-slide .wmde-markdown ul, 118 .top-markdown-slide .wmde-markdown ol { 119 text-align: left !important; 120 display: inline-block !important; 121 } 122 .top-markdown-content .wmde-markdown li, 123 .top-markdown-slide .wmde-markdown li { 124 text-align: left !important; 125 } 126 127 @media (max-width: 768px) { 128 .top-content-swiper .swiper-button-next, 129 .top-content-swiper .swiper-button-prev { 130 width: 30px; 131 height: 30px; 132 } 133 .top-content-swiper .swiper-button-next:after, 134 .top-content-swiper .swiper-button-prev:after { 135 font-size: 14px; 136 } 137 .top-content-swiper .swiper-pagination-bullet { 138 width: 6px; 139 height: 6px; 140 } 141 .top-content-swiper .swiper-pagination-bullet-active { 142 width: 18px; 143 } 144 } 145 `})]})}return e.jsx("div",{className:"flex justify-center items-center mb-6 md:mb-8 lg:mb-10 max-h-[400px] overflow-y-auto",children:e.jsx("p",{className:"font-medium tracking-tight text-[#1E3033] text-center max-w-3xl",children:"Caution: We are in the pre-alpha test, all answers are open to the general public."})})});Is.displayName="TopContent";const Bs=n.memo(({content:c})=>{if(!c||Array.isArray(c)&&c.length===0)return e.jsx("div",{className:"flex justify-center items-center mt-6 md:mt-8 lg:mt-10 mb-6 md:mb-8 lg:mb-10 max-h-[400px] overflow-y-auto",children:e.jsx("p",{className:"font-medium tracking-tight text-[#1E3033] text-center max-w-3xl",children:"Caution: We are in the pre-alpha test, all answers are open to the general public."})});if(typeof c=="string")return wt(c)?e.jsx("div",{className:"flex justify-center items-center mt-6 md:mt-8 lg:mt-10 mb-6 md:mb-8 lg:mb-10 max-h-[400px] overflow-y-auto",children:e.jsx("div",{className:"w-full max-w-4xl bottom-markdown-content",children:e.jsx(we,{source:c,style:{backgroundColor:"transparent",color:"#1E3033",fontFamily:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontSize:"14px",lineHeight:"1.6"},wrapperElement:{"data-color-mode":"light"}})})}):e.jsx("div",{className:"flex justify-center items-center mt-6 md:mt-8 lg:mt-10 mb-6 md:mb-8 lg:mb-10 max-h-[400px] overflow-y-auto",children:e.jsx("div",{className:"font-medium tracking-tight text-[#1E3033] text-center max-w-4xl",dangerouslySetInnerHTML:{__html:c}})});if(Array.isArray(c)&&c.length>0){const t=c.length>1;return e.jsxs("div",{className:"w-full mt-8 md:mt-12 lg:mt-16 max-h-[400px] overflow-y-auto",children:[e.jsx(Ss,{modules:[Es,As,zs,Ms],spaceBetween:30,slidesPerView:1,effect:"fade",fadeEffect:{crossFade:!0},navigation:t,loop:t,className:"bottom-content-swiper",style:{borderRadius:"1rem",overflow:"hidden",maxHeight:"400px"},children:c.map((g,y)=>{const S=wt(g.content);return e.jsx(Ls,{children:S?e.jsx("div",{className:"text-center mx-auto w-full bottom-markdown-slide",children:e.jsx(we,{source:g.content,style:{backgroundColor:"transparent",color:"#1E3033",fontFamily:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontSize:"14px",lineHeight:"1.6"},wrapperElement:{"data-color-mode":"light"}})}):e.jsx("div",{className:"text-center mx-auto w-full",dangerouslySetInnerHTML:{__html:g.content}})},g.id||y)})}),e.jsx("style",{children:` 146 .bottom-content-swiper .swiper-slide { 147 display: flex; 148 align-items: center; 149 justify-content: center; 150 } 151 .bottom-content-swiper .swiper-button-next, 152 .bottom-content-swiper .swiper-button-prev { 153 color: #22c55e; 154 background: rgba(255, 255, 255, 0.95); 155 width: 40px; 156 height: 40px; 157 border-radius: 50%; 158 box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); 159 transition: all 0.3s ease; 160 } 161 .bottom-content-swiper .swiper-button-next:after, 162 .bottom-content-swiper .swiper-button-prev:after { 163 font-size: 18px; 164 font-weight: bold; 165 } 166 .bottom-content-swiper .swiper-button-next:hover, 167 .bottom-content-swiper .swiper-button-prev:hover { 168 background: #22c55e; 169 color: white; 170 transform: scale(1.05); 171 } 172 .bottom-content-swiper .swiper-pagination-bullet { 173 background: #cbd5e0; 174 opacity: 0.7; 175 width: 8px; 176 height: 8px; 177 transition: all 0.3s ease; 178 } 179 .bottom-content-swiper .swiper-pagination-bullet-active { 180 background: #22c55e; 181 width: 24px; 182 border-radius: 4px; 183 } 184 .bottom-content-swiper .swiper-pagination { 185 bottom: 15px; 186 } 187 188 .bottom-
188markdown-content .wmde-markdown, 189 .bottom-markdown-slide .wmde-markdown { 190 background-color: transparent !important; 191 color: #1E3033 !important; 192 text-align: center !important; 193 } 194 .bottom-markdown-content .wmde-markdown table, 195 .bottom-markdown-slide .wmde-markdown table { 196 border: 1px solid #e2e8f0 !important; 197 background-color: #ffffff !important; 198 border-collapse: collapse !important; 199 width: 100% !important; 200 margin: 1rem 0 !important; 201 } 202 .bottom-markdown-content .wmde-markdown th, 203 .bottom-markdown-slide .wmde-markdown th { 204 background-color: #f7fafc !important; 205 border: 1px solid #e2e8f0 !important; 206 padding: 8px 12px !important; 207 font-weight: bold !important; 208 } 209 .bottom-markdown-content .wmde-markdown td, 210 .bottom-markdown-slide .wmde-markdown td { 211 border: 1px solid #e2e8f0 !important; 212 padding: 8px 12px !important; 213 } 214 .bottom-markdown-content .wmde-markdown code, 215 .bottom-markdown-slide .wmde-markdown code { 216 background-color: #f7fafc !important; 217 color: #22c55e !important; 218 border-radius: 4px !important; 219 padding: 2px 6px !important; 220 } 221 .bottom-markdown-content .wmde-markdown pre, 222 .bottom-markdown-slide .wmde-markdown pre { 223 background-color: #f7fafc !important; 224 border: 1px solid #e2e8f0 !important; 225 border-radius: 6px !important; 226 padding: 1rem !important; 227 overflow: auto !important; 228 text-align: left !important; 229 } 230 .bottom-markdown-content .wmde-markdown blockquote, 231 .bottom-markdown-slide .wmde-markdown blockquote { 232 border-left: 4px solid #22c55e !important; 233 background-color: #f7fafc !important; 234 padding: 0.5rem 1rem !important; 235 margin: 1rem 0 !important; 236 } 237 .bottom-markdown-content .wmde-markdown a, 238 .bottom-markdown-slide .wmde-markdown a { 239 color: #22c55e !important; 240 text-decoration: none !important; 241 } 242 .bottom-markdown-content .wmde-markdown a:hover, 243 .bottom-markdown-slide .wmde-markdown a:hover { 244 text-decoration: underline !important; 245 } 246 .bottom-markdown-content .wmde-markdown h1, 247 .bottom-markdown-content .wmde-markdown h2, 248 .bottom-markdown-content .wmde-markdown h3, 249 .bottom-markdown-content .wmde-markdown h4, 250 .bottom-markdown-slide .wmde-markdown h1, 251 .bottom-markdown-slide .wmde-markdown h2, 252 .bottom-markdown-slide .wmde-markdown h3, 253 .bottom-markdown-slide .wmde-markdown h4 { 254 color: #1E3033 !important; 255 border-bottom: 1px solid #e2e8f0 !important; 256 padding-bottom: 0.3rem !important; 257 text-align: center !important; 258 } 259 .bottom-markdown-content .wmde-markdown ul, 260 .bottom-markdown-content .wmde-markdown ol, 261 .bottom-markdown-slide .wmde-markdown ul, 262 .bottom-markdown-slide .wmde-markdown ol { 263 text-align: left !important; 264 display: inline-block !important; 265 } 266 .bottom-markdown-content .wmde-markdown li, 267 .bottom-markdown-slide .wmde-markdown li { 268 text-align: left !important; 269 } 270 271 @media (max-width: 768px) { 272 .bottom-content-swiper .swiper-button-next, 273 .bottom-content-swiper .swiper-button-prev { 274 width: 30px; 275 height: 30px; 276 } 277 .bottom-content-swiper .swiper-button-next:after, 278 .bottom-content-swiper .swiper-button-prev:after { 279 font-size: 14px; 280 } 281 .bottom-content-swiper .swiper-pagination-bullet { 282 width: 6px; 283 height: 6px; 284 } 285 .bottom-content-swiper .swiper-pagination-bullet-active { 286 width: 18px; 287 } 288 } 289 `})]})}return e.jsx("div",{className:"flex justify-center items-center mt-6 md:mt-8 lg:mt-10 mb-6 md:mb-8 lg:mb-10 max-h-[400px] overflow-y-auto",children:e.jsx("p",{className:"font-medium tracking-tight text-[#1E3033] text-center max-w-3xl",children:"Caution: We are in the pre-alpha test, all answers are open to the general public."})})});Bs.displayName="BottomContent";function nt(c,t){const[g,y]=n.useState(c);return n.useEffect(()=>{const S=setTimeout(()=>{y(c)},t);return()=>{clearTimeout(S)}},[c,t]),g}function Ua(c=Wa){const t=n.useRef(!1),g=n.useRef(null),y=n.useCallback(()=>{t.current=!0,g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{t.current=!1},c)},[c]),S=n.useCallback(()=>{g.current&&clearTimeout(g.current),t.current=!1},[]);return n.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]),{isTypingRef:t,startTyping:y,stopTyping:S}}const ye=()=>{const c=document.querySelector('meta[name="csrf-token"]');return(c==null?void 0:c.getAttribute("content"))||""},Va=c=>({custom_domain:{bg:"bg-green-100",text:"text-green-600"},domain:{bg:"bg-green-100",text:"text-green-600"},funnel:{bg:"bg-blue-100",text:"text-blue-600"},field:{bg:"bg-purple-100",text:"text-purple-600"},theme:{bg:"bg-yellow-100",text:"text-yellow-600"},ai_conversation:{bg:"bg-indigo-100",text:"text-indigo-600"}})[c]||{bg:"bg-gray-100",text:"text-gray-600"},ws=c=>encodeURIComponent(c),js=c=>{var g;if(Oa.includes(c.type))return{valid:!0,message:""};const t="."+((g=c.name.split(".").pop())==null?void 0:g.toLowerCase());return t&&qa.includes(t)?{valid:!0,message:""}:{valid:!1,message:"File type not allowed. Only images, PDF, video, audio, and HTML files are permitted."}};function mr({canRegister:c=!0}){const{auth:t,topcontent:g,bottomcontent:y,aiSettings:S,tooltips:L={},domains:ee=[],autoSearchKeyword:O}=ka().props,r=n.useCallback((s,a,i)=>{let m=(L==null?void 0:L[s])||a;if(i)for(const[v,I]of Object.entries(i))m=m.replace(new RegExp(`{${v}}`,"g"),String(I));return m},[L]),C=n.useMemo(()=>S||{guest_ai_enabled:!0,guest_char_limit:Da,user_ai_enabled:!0,user_char_limit:Ha},[S]),h=!!t.user,b=n.useMemo(()=>h,[h]),f=n.useMemo(()=>h?C.user_ai_enabled?C.user_char_limit:0:C.guest_ai_enabled?C.guest_char_limit:0,[h,C]),X=n.useMemo(()=>f===0?0:Math.floor(h?C.user_char_limit*.9:C.guest_char_limit*.9),[h,C,f]),V=n.useMemo(()=>h?!C.user_ai_enabled:!C.guest_ai_enabled,[h,C]),[p,he]=n.useState("ez"),[A,o]=n.useState(""),[l,d]=n.useState(!1),[u,z]=n.useState([]),[K,F]=n.useState(!1),[k,M]=n.useState([]),[x,q]=n.useState(1),[N,B]=n.useState(1),[T,ae]=n.useState(10),[Ut,_]=n.useState(!1),[Y,P]=n.useState(0),[D,re]=n.useState(""),[ot,Vt]=n.useState(!1),[it,We]=n.useState(null),[jt,le]=n.useState(null),[ue,lt]=n.useState(null),[Qa,ct]=n.useState(!1),[dt,$e]=n.useState(null),[Qt,Pe]=n.useState(null),[Xt,De]=n.useState(null),[mt,He]=n.useState([]),[je,Oe]=n.useState(0),[kt,qe]=n.useState(0),[Le,Ge]=n.useState(null),[Xa,Ue]=n.useState(null),[Ts,Ve]=n.useState(!1),[Qe,Xe]=n.useState(!1),[_t,ce]=n.useState([]),[Nt,Ke]=n.useState([]),[Rs,Ye]=n.useState([]),[Kt,Yt]=n.useState(!1),[Ka,Zt]=n.useState(!1),[W,de]=n.useState(null),[R,Fs]=n.useState(0),[Ae,Jt]=n.useState({isOpen:!1,url:"",title:""}),[Z,es]=n.useState({isOpen:!1,feature:"",description:"",iconColor:"",icon:null}),[ke,Ct]=n.useState("content"),[_e,Ze]=n.useState("composer"),[Ee,pt]=n.useState(""),[H,xt]=n.useState([]),[St,ge]=n.useState(!1),[ts,te]=n.useState(null),[Ws,G]=n.useState(!1),[zt,$s]=n.useState(""),[Ne,Ps]=n.useState(""),[Ce,Ds]=n.useState(""),[ss,Hs]=n.useState(0),[as,Ie]=n.useState({checking:!1,available:null,message:""}),[Ya,rs]=n.useState(!1),[Za,fe]=n.useState(""),[Ja,ns]=n.useState(""),[w,ne]=n.useState(""),[ht,os]=n.useState(!1),[E,Q]=n.useState(null),[Mt,Se]=n.useState(""),[is,Os]=n.useState(null),[Je,et]=n.useState(!1),[ls,Be]=n.useState(null),[cs,ds]=n.useState(null),[Te,
289Lt]=n.useState(!1),[Re,qs]=n.useState("markdown"),[Gs,At]=n.useState(!1),ms=[{id:"kimi-k3",name:"Kimi K3",description:"2.8T params, 1M context, native multimodal, frontier intelligence",isNew:!0,type:"flagship",provider:"moonshot"},{id:"gpt-4o",name:"GPT-4o",description:"OpenAI's most advanced multimodal model",isNew:!0,type:"flagship",provider:"openai"},{id:"deepseek-chat",name:"DeepSeek Chat",description:"Advanced conversational AI with 128K context",isNew:!0,type:"flagship",provider:"deepseek"},{id:"sonar-pro",name:"Sonar Pro",description:"Enhanced search capabilities with better accuracy",isNew:!0,type:"flagship",provider:"perplexity"},{id:"gemini-3-flash-preview",name:"Gemini 3 Flash Preview",description:"Latest preview version of Gemini 3 Flash with enhanced capabilities",isNew:!0,type:"flagship",provider:"gemini"}],[oe,Us]=n.useState(ms[0]),[Et,It]=n.useState(!1),Bt=n.useRef(null),tt=n.useRef(null),Tt=n.useRef(null),Rt=n.useRef(null),Ft=n.useRef(null),ze=n.useRef(null),st=nt(A,Ra);nt(D,Fa);const ut=nt(Ce,500),Wt=nt(Ne,500),gt=nt(w,500),{isTypingRef:ps,startTyping:xs,stopTyping:ie}=Ua();n.useEffect(()=>{function s(a){Bt.current&&!Bt.current.contains(a.target)&&It(!1)}return document.addEventListener("mousedown",s),()=>{document.removeEventListener("mousedown",s)}},[]),n.useEffect(()=>{Fs(D.length)},[D]),n.useEffect(()=>(A.trim()&&xs(),()=>ie()),[A,xs,ie]),n.useEffect(()=>{const s=st.trim();s&&!l&&!ps.current&&x===1&&at(s,1)},[st]),n.useEffect(()=>{const s=A.trim();x>1&&s&&!l&&!ps.current&&at(s,x)},[x]),n.useEffect(()=>{p==="ez"&&st.trim().length>$a?ta(st):M([])},[st,p]),n.useEffect(()=>{K&&u.length>0&&tt.current&&x===1&&tt.current.scrollIntoView({behavior:"smooth",block:"nearest"})},[K,u,x]),n.useEffect(()=>{Ft.current&&Ft.current.scrollIntoView({behavior:"smooth"})},[_t]),n.useEffect(()=>{ut&&Wt&&ut.length>=2?ra():(ut||Wt)&&Ie({checking:!1,available:null,message:""})},[ut,Wt]);const $t=n.useCallback(async s=>{if(!s||s.length<2){Q(null),Se("");return}os(!0),Q(null),Se("");try{const a=await $.get("/ai/conversation/check-slug-availability-home",{params:{slug:s},headers:{Accept:"application/json","X-Requested-With":"XMLHttpRequest"}});a.data.available?(Q(!0),Se(r("ezbar_slug_available","â Slug is available!"))):(Q(!1),Se(a.data.message||r("ezbar_slug_taken","â This slug is already taken")))}catch(a){console.error("Error checking slug:",a),Q(!1),Se(r("ezbar_slug_check_error","Error checking availability"))}finally{os(!1)}},[r]);n.useEffect(()=>{gt&>.length>=2?$t(gt):(Q(null),Se(""))},[gt,$t]),n.useCallback(()=>ht?{color:"text-yellow-500",icon:"spinner",message:r("ezbar_checking_slug","Checking availability...")}:E===!0?{color:"text-green-500",icon:"check",message:Mt}:E===!1?{color:"text-red-500",icon:"close",message:Mt}:{color:"text-gray-400",icon:"info",message:r("ezbar_slug_hint","Custom slug (optional) - any characters allowed, spaces become hyphens")},[ht,E,Mt,r]);const Vs=n.useCallback(async()=>{var s,a;if(!b){G(!0);return}if(!w||E!==!0){Be(r("ezbar_slug_not_available","Please enter a unique slug first."));return}if(!(Je||Te)){et(!0),Be(null),ds(null);try{let i;if(W?i=await $.patch(`/ai/conversation/${W}/slug`,{slug:w},{headers:{"Content-Type":"application/json",Accept:"application/json","X-CSRF-TOKEN":ye()}}):i=await $.post("/content/geoslug",{slug:w,conversation_id:W},{headers:{"Content-Type":"application/json",Accept:"application/json","X-CSRF-TOKEN":ye()}}),(s=i==null?void 0:i.data)!=null&&s.success){const m=i.data.slug||w,v=i.data.conversation_id||W;v&&de(v),ds(`â
GEO slug "${m}" saved successfully! Redirecting to your page...`),Lt(!0),setTimeout(()=>{Me.visit(`/X/${encodeURIComponent(m)}`,{preserveScroll:!1,preserveState:!1,onSuccess:()=>{Lt(!1),et(!1),console.log("Redirected to GEO slug page successfully")},onError:I=>{console.error("Error redirecting:",I),Lt(!1),et(!1),Be("Error redirecting to page. Please try clicking the link manually.")}})},1500)}else Be(((a=i==null?void 0:i.data)==null?void 0:a.message)||r("ezbar_slug_save_failed","Failed to save GEO slug. Please try again.")),et(!1)}catch(i){console.error("Error saving GEO slug:",i),$.isAxiosError(i)&&i.response?Be(i.response.data.message||r("ezbar_slug_save_failed","Failed to save GEO slug. Please try again.")):Be(r("ezbar_slug_save_failed","Failed to save GEO slug. Please try again.")),et(!1)}}},[w,E,W,b,r,Je,Te]),Qs=()=>b?e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"m-0 mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Custom Slug (Optional)"}),e.jsx("span",{className:"text-xs text-gray-400",children:"any characters allowed, spaces become hyphens"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-y-0 left-0 flex items-center pl-4 pointer-events-none",children:e.jsx("span",{className:"text-sm text-gray-400 font-mono font-medium",children:"ez.wiki/X/"})}),e.jsx("input",{type:"text",value:w,onChange:s=>{const a=s.target.value.replace(/ /g,"-");ne(a),is&&clearTimeout(is);const i=setTimeout(()=>{a.length>=2&&$t(a)},500);Os(i)},placeholder:"enter-custom-slug",className:`w-full pl-32 pr-12 py-3 border rounded-xl focus:outline-none focus:ring-2 transition-all text-sm ${E===!0?"border-green-400 focus:ring-green-500/30 focus:border-green-500 bg-green-50/30":E===!1?"border-red-400 focus:ring-red-500/30 focus:border-red-500 bg-red-50/30":"border-gray-200 focus:ring-[#22c55e]/30 focus:border-[#22c55e] hover:border-gray-300"}`,maxLength:50,disabled:!b||Te}),e.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-4",children:ht?e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"animate-spin text-yellow-500",children:e.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}):E===!0?e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"text-green-500",children:e.jsx("path",{d:"M20 6 9 17l-5-5"})}):E===!1?e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"text-red-500",children:[e.jsx("path",{d:"M18 6 6 18"}),e.jsx("path",{d:"m6 6 12 12"})]}):null})]}),w&&e.jsx("div",{className:`mt-2 flex items-center gap-2 text-xs ${E===!0?"text-green-600":E===!1?"text-red-600":"text-gray-400"}`,children:ht?e.jsxs(e.Fragment,{children:[e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"animate-spin",children:e.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),e.jsx("span",{children:"Checking availability..."})]}):E===!0?e.jsxs(e.Fragment,{children:[e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:e.jsx("path",{d:"M20 6 9 17l-5-5"})}),e.jsx("span",{children:"â Slug is available!"})]}):E===!1?e.jsxs(e.Fragment,{children:[e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[e.jsx("path",{d:"M18 6 6 18"}),e.jsx("path",{d:"m6 6 12 12"})]}),e.jsx("span",{children:"â This slug is already taken"})]}):e.jsxs(e.Fragment,{children:[e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"M12 16v-4"}),e.jsx("path",{d:"M12 8h.01"})]}),e.jsx("span",{children:"Enter a unique slug for your GEO content"})]})}),w&&e.jsxs("div",{className:"mt-2 flex items-center justify-between text-xs",children:[e.jsxs("span",{className:"text-gray-400",children:["Slug length: ",e.jsx("strong",{className:"text-gray-600",children:w.length})," characters"]}),e.jsx("span",{className:`flex items-center gap-1.5 ${w.length>=50&&w.length<=60?"text-green-600":w.length>0?"text-yellow-600":"text-gray-400"}`,children:w.length>=50&&w.length<=60?e.jsxs(e.Fragment,{children:[e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:e.jsx("path",{d:"M20 6 9 17l-5-5"})}),e.jsx("span",{children:"Optimal length â"})]}):w.length>0?e.jsxs(e.Fragment,{children:[e.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"M12 8v4"}),e.jsx("path",{d:"M12 16h.01"})]}),e.jsx("span",{children:"Recommended: 50-60 characters"})]}):null})]})]}),e.jsxs("div",{className:"bg-gradient-to-br from-blue-50 m-0 mb-3 via-green-50 to-purple-50 border border-gray-200 rounded-2xl p-4 hover:shadow-md transition-all duration-200 divide-y divide-gray-200/50",children:[e.jsxs("div",{className:"pb-3 mb-3",children:[e.jsx("h4",{className:"text-xs font-bold text-blue-700 uppercase tracking-wider mb-1",children:"What is a slug?"}),e.jsxs("p",{className:"text-xs text-gray-600 leading-relaxed",children:["A slug is a URL-friendly version of a string, typically used to identify a resource in a web address. It's a human-readable, lowercase string with spaces replaced by hyphens and special characters removed.",e.jsx("br",{}),e.jsx("span",{className:"font-mono text-gray-500 text-[11px]",children:'Example: "What Is a Slug?!" â what-is-a-slug'})]})]}),e.jsxs("div",{className:"pb-3 mb-3",children:[e.jsx("h4",{className:"text-xs font-bold text-green-700 uppercase tracking-wider mb-1",children:"How is it used in GEO?"}),e.jsxs("p",{className:"text-xs text-gray-600 leading-relaxed",children:["Slugs are relevant to ",e.jsx("strong",{children:"Generative Engine Optimization (GEO)"})," in several key ways:"]}),e.jsxs("ul",{className:"text-xs text-gray-600 leading-relaxed list-disc pl-4 mt-1 space-y-0.5",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"URL Structure:"})," Clean slugs help search engines and AI crawlers understand page content."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"AI Training Data:"})," Large language models use URLs; descriptive slugs provide semantic signals."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"AI Overview Citations:"}
289)," When AI search engines cite sources, a clear slug reinforces topical relevance."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Retrieval-Augmented Generation (RAG):"})," Slugs aid in document chunking and retrieval matching."]})]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-bold text-purple-700 uppercase tracking-wider mb-1",children:"Recommended Length"}),e.jsxs("p",{className:"text-xs text-gray-600 leading-relaxed",children:["The optimal slug length is ",e.jsx("strong",{className:"text-purple-700 font-semibold",children:"50â60 characters"}),". This balance ensures readability, includes primary keywords, fits in search result displays, and provides strong semantic signals for AI crawlers. Avoid slugs over 75 characters as they can be truncated and lose focus."]})]})]}),ls&&e.jsx("div",{className:"p-3 bg-red-50 border border-red-200 rounded-lg",children:e.jsxs("p",{className:"text-sm text-red-600 flex items-center gap-2",children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"m15 9-6 6"}),e.jsx("path",{d:"m9 9 6 6"})]}),ls]})}),cs&&e.jsx("div",{className:"p-3 bg-green-50 border border-green-200 rounded-lg",children:e.jsxs("p",{className:"text-sm text-green-600 flex items-center gap-2",children:[e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:e.jsx("path",{d:"M20 6 9 17l-5-5"})}),cs]})}),e.jsx("button",{onClick:Vs,disabled:!w||E!==!0||!b||Je||Te,className:`w-full px-4 py-3.5 bg-gradient-to-r from-[#22c55e] to-[#16a34a] hover:from-[#16a34a] hover:to-[#15803d] text-white font-semibold rounded-xl transition-all duration-200 flex items-center justify-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed shadow-sm hover:shadow-md active:scale-[0.98] ${Je||Te?"opacity-75":""}`,children:Je?e.jsxs(e.Fragment,{children:[e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"animate-spin",children:e.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),e.jsx("span",{children:"Saving GEO Slug..."})]}):Te?e.jsxs(e.Fragment,{children:[e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"animate-spin",children:e.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),e.jsx("span",{children:"Redirecting to your page..."})]}):e.jsxs(e.Fragment,{children:[e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"}),e.jsx("polyline",{points:"17 21 17 13 7 13 7 21"}),e.jsx("polyline",{points:"7 3 7 8 15 8"})]}),e.jsx("span",{children:"Save GEO Slug"})]})}),e.jsxs("p",{className:"text-xs text-gray-400 text-center flex items-center justify-center gap-1",children:[e.jsx("span",{children:"ð¡"}),e.jsx("span",{children:"A well-crafted GEO slug improves your content's discoverability in AI search results"})]})]}):e.jsxs("div",{className:"bg-gray-50 border border-gray-200 rounded-xl p-8 text-center",children:[e.jsx("div",{className:"w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mx-auto mb-4",children:e.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"#9ca3af",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"M12 2a15 15 0 0 1 10 10"}),e.jsx("path",{d:"M12 22a15 15 0 0 1-10-10"}),e.jsx("path",{d:"M2 12h20"}),e.jsx("path",{d:"M12 2v20"})]})}),e.jsx("p",{className:"text-gray-600 mb-2",children:"Login required to manage GEO slugs"}),e.jsx("button",{onClick:()=>G(!0),className:"inline-block px-6 py-2 bg-[#22c55e] text-white rounded-lg hover:bg-[#16a34a] transition-colors text-sm font-medium",children:"Login to Access"})]}),Xs=()=>{const s=a=>{qs(a),Ze("composer")};return e.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-3 mt-3 border-b border-gray-200 pb-3",children:[e.jsxs("div",{className:"flex items-center gap-1 bg-gray-100 rounded-lg p-1",children:[e.jsx("button",{onClick:()=>s("markdown"),className:`px-3 py-1.5 text-xs font-medium rounded-md transition-colors ${Re==="markdown"?"bg-white text-gray-800 shadow-sm":"text-gray-500 hover:text-gray-700"}`,children:"Markdown"}),e.jsx("button",{onClick:()=>s("html"),className:`px-3 py-1.5 text-xs font-medium rounded-md transition-colors ${Re==="html"?"bg-white text-gray-800 shadow-sm":"text-gray-500 hover:text-gray-700"}`,children:"HTML"}),e.jsxs("button",{onClick:()=>s("ezsheet"),className:`px-3 py-1.5 text-xs font-medium rounded-md transition-colors flex items-center gap-1.5 ${Re==="ezsheet"?"bg-white text-gray-800 shadow-sm":"text-gray-500 hover:text-gray-700"}`,children:[e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),e.jsx("line",{x1:"3",y1:"9",x2:"21",y2:"9"}),e.jsx("line",{x1:"9",y1:"21",x2:"9",y2:"9"})]}),"EzSheet"]})]}),e.jsx("div",{className:"h-6 w-px bg-gray-200"}),e.jsxs("button",{onClick:()=>Ze("upload"),className:`px-3 py-1.5 text-xs font-medium rounded-md transition-colors flex items-center gap-1.5 ${_e==="upload"?"bg-[#22c55e] text-white":"text-gray-600 hover:bg-gray-100"}`,children:[e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),e.jsx("polyline",{points:"17 8 12 3 7 8"}),e.jsx("line",{x1:"12",y1:"3",x2:"12",y2:"15"})]}),"Upload Media"]}),e.jsxs("button",{onClick:()=>Ze("embed"),className:`px-3 py-1.5 text-xs font-medium rounded-md transition-colors flex items-center gap-1.5 ${_e==="embed"?"bg-[#22c55e] text-white":"text-gray-600 hover:bg-gray-100"}`,children:[e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}),"Embed Content"]}),e.jsxs("button",{onClick:()=>Ze("geoslug"),className:`px-3 py-1.5 text-xs font-medium rounded-md transition-colors flex items-center gap-1.5 ${_e==="geoslug"?"bg-[#22c55e] text-white":"text-gray-600 hover:bg-gray-100"}`,children:[e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"M12 2a15 15 0 0 1 10 10"}),e.jsx("path",{d:"M12 22a15 15 0 0 1-10-10"}),e.jsx("path",{d:"M2 12h20"}),e.jsx("path",{d:"M12 2v20"})]}),"Slug For GEO"]})]})},Ks=()=>
289{if(!b)return e.jsxs("div",{className:"bg-gray-50 border-2 border-dashed border-gray-300 rounded-xl p-8 text-center",children:[e.jsx("div",{className:"w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mx-auto mb-4",children:e.jsx("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"#9ca3af",strokeWidth:"2",children:e.jsx("path",{d:"M4 16l4.586-4.586a2 2 0 0 1 2.828 0L16 16m-2-2l1.586-1.586a2 2 0 0 1 2.828 0L20 14m-6-6h.01M6 20h12a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2z"})})}),e.jsx("p",{className:"text-gray-600 mb-2",children:"Login required to upload files"}),e.jsx("button",{onClick:()=>G(!0),className:"inline-block px-6 py-2 bg-[#22c55e] text-white rounded-lg hover:bg-[#16a34a] transition-colors text-sm font-medium",children:"Login to Access"})]});const s=H.reduce((a,i)=>a+i.size,0);return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"text-[#22c55e]",children:e.jsx("path",{d:"M4 16l4.586-4.586a2 2 0 0 1 2.828 0L16 16m-2-2l1.586-1.586a2 2 0 0 1 2.828 0L20 14m-6-6h.01M6 20h12a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2z"})}),e.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Upload Multiple Files"})]}),e.jsx("span",{className:"text-xs text-gray-400",children:"Images, PDF, Video, Audio, HTML up to 100MB"})]}),ts&&e.jsx("div",{className:"p-3 bg-red-50 border border-red-200 rounded-lg",children:e.jsxs("p",{className:"text-sm text-red-600 flex items-center gap-2",children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"flex-shrink-0",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"m15 9-6 6"}),e.jsx("path",{d:"m9 9 6 6"})]}),e.jsx("span",{children:ts})]})}),H.length===0?e.jsx("div",{className:`relative border-2 border-dashed rounded-xl p-8 text-center transition-all cursor-pointer ${St?"border-[#22c55e] bg-green-50/50 scale-[0.99]":"border-gray-300 hover:border-[#22c55e] bg-gray-50 hover:bg-gray-100"}`,onClick:()=>{var a;return(a=ze.current)==null?void 0:a.click()},onDragOver:a=>{a.preventDefault(),a.stopPropagation(),ge(!0)},onDragEnter:a=>{a.preventDefault(),a.stopPropagation(),ge(!0)},onDragLeave:a=>{a.preventDefault(),a.stopPropagation(),ge(!1)},onDrop:a=>{var i;a.preventDefault(),a.stopPropagation(),ge(!1),(i=a.dataTransfer.files)!=null&&i.length&&bt(a.dataTransfer.files)},children:e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("svg",{className:`w-12 h-12 mb-3 transition-colors ${St?"text-[#22c55e]":"text-gray-400"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),e.jsxs("p",{className:"text-sm text-gray-600",children:[e.jsx("span",{className:"font-semibold text-[#22c55e]",children:"Click to upload multiple files"})," or drag & drop"]}),e.jsx("p",{className:"text-xs text-gray-400 mt-1",children:"â
Images (JPG, PNG, GIF, WEBP) ⢠PDF ⢠Video (MP4, WEBM) ⢠Audio (MP3, WAV) ⢠HTML"}),e.jsx("p",{className:"text-xs text-gray-400 mt-0.5",children:"Select one or multiple files at once (up to 100MB each)"})]})}):e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between px-1",children:[e.jsxs("div",{className:"text-xs font-medium text-gray-600",children:[e.jsx("span",{className:"text-[#22c55e] font-semibold",children:H.length})," ",H.length===1?"file":"files"," selected (",Gt(s),")"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{type:"button",onClick:()=>{var a;return(a=ze.current)==null?void 0:a.click()},className:"text-xs font-medium text-[#22c55e] hover:text-[#16a34a] flex items-center gap-1 transition-colors px-2 py-1 rounded-md hover:bg-green-50",children:[e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[e.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),e.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),"Add More"]}),e.jsx("button",{type:"button",onClick:()=>{xt([]),te(null),ze.current&&(ze.current.value="")},className:"text-xs font-medium text-red-500 hover:text-red-700 transition-colors px-2 py-1 rounded-md hover:bg-red-50",children:"Clear All"})]})]}),e.jsx("div",{className:`max-h-64 overflow-y-auto space-y-2 p-2 bg-gray-50/80 rounded-xl border ${St?"border-[#22c55e] bg-green-50/30":"border-gray-200"}`,onDragOver:a=>{a.preventDefault(),a.stopPropagation(),ge(!0)},onDragEnter:a=>{a.preventDefault(),a.stopPropagation(),ge(!0)},onDragLeave:a=>{a.preventDefault(),a.stopPropagation(),ge(!1)},onDrop:a=>{var i;a.preventDefault(),a.stopPropagation(),ge(!1),(i=a.dataTransfer.files)!=null&&i.length&&bt(a.dataTransfer.files)},children:H.map((a,i)=>e.jsxs("div",{className:"relative flex items-center justify-between p-2.5 bg-white rounded-lg border border-gray-200 hover:border-gray-300 shadow-sm transition-all",children:[e.jsxs("div",{className:"flex items-center space-x-3 min-w-0 flex-1 mr-2",children:[e.jsx("div",{className:"w-10 h-10 rounded-lg flex items-center justify-center bg-gradient-to-br from-[#22c55e] to-[#16a34a] flex-shrink-0 overflow-hidden",children:a.type.startsWith("image/")&&a.data?e.jsx("img",{src:a.data,alt:a.name,className:"w-10 h-10 object-cover rounded-lg"}):e.jsx(ve,{icon:Ga(a.type,a.name),className:"text-white text-lg"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"text-xs font-medium text-gray-900 truncate",title:a.name,children:a.name}),e.jsx("p",{className:"text-[11px] text-gray-400",children:Gt(a.size)})]})]}),e.jsx("button",{type:"button",onClick:()=>{xt(m=>m.filter((v,I)=>I!==i))},className:"w-6 h-6 rounded-full bg-gray-100 hover:bg-red-50 text-gray-400 hover:text-red-500 flex items-center justify-center transition-colors flex-shrink-0",title:"Remove file",children:e.jsx(ve,{icon:La,className:"text-xs"})})]},`${a.name}-${i}`))}),e.jsx("input",{type:"text",value:Ee,onChange:a=>pt(a.target.value),placeholder:"Add an optional description for these files...",className:"w-full px-4 py-2 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-[#22c55e]"}),e.jsx("button",{onClick:sa,disabled:Kt||H.length===0,className:"w-full px-4 py-3 bg-[#22c55e] hover:bg-[#16a34a] text-white font-medium rounded-xl transition-colors flex items-center justify-center space-x-2 disabled:opacity-50 disabled:cursor-not-allowed shadow-sm",children:Kt?e.jsxs(e.Fragment,{children:[e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"animate-spin",children:e.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),e.jsxs("span",{children:["Uploading ",H.length," ",H.length===1?"file":"files","..."]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[e.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),e.jsx("polyline",{points:"17 8 12 3 7 8"}),e.jsx("line",{x1:"12",y1:"3",x2:"12",y2:"15"})]}),e.jsxs("span",{children:["Upload ",H.length," ",H.length===1?"File":"Files"]})]})})]}),e.jsx("input",{ref:ze,type:"file",multiple:!0,className:"hidden",accept:"image/*,.pdf,video/*,audio/*,.mp4,.webm,.ogg,.mp3,.wav,.mov,.avi,.m4a,.html,.htm",onCh
289ange:ma})]})},Ys=()=>b?e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"text-[#22c55e]",children:e.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}),e.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Comments & Embed Builder"}),Nt.length>0&&e.jsx("span",{className:"text-xs bg-[#22c55e] text-white px-2 py-0.5 rounded-full",children:Nt.length})]}),e.jsxs("div",{className:"flex flex-col items-center justify-center p-8 border-2 border-dashed border-gray-200 rounded-xl bg-gray-50",children:[e.jsx("div",{className:"w-16 h-16 bg-white rounded-full flex items-center justify-center shadow-sm mb-4",children:e.jsx(ve,{icon:gs,className:"text-2xl text-[#22c55e]"})}),e.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-2",children:"Embed Row & Masonry Builder"}),e.jsx("p",{className:"text-sm text-gray-500 mb-6 text-center max-w-md",children:"Create beautiful rows, carousels, or masonry layouts with your embed snippets."}),e.jsxs("button",{onClick:()=>At(!0),className:"px-6 py-3 bg-[#22c55e] hover:bg-[#16a34a] text-white font-medium rounded-xl transition-colors shadow-sm flex items-center gap-2",children:[e.jsx(ve,{icon:gs}),"Open Embed Builder"]})]})]}):e.jsxs("div",{className:"bg-gray-50 border border-gray-200 rounded-xl p-8 text-center",children:[e.jsx("div",{className:"w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mx-auto mb-4",children:e.jsx("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"#9ca3af",strokeWidth:"2",children:e.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})}),e.jsx("p",{className:"text-gray-600 mb-2",children:"Login required to add comments"}),e.jsx("button",{onClick:()=>G(!0),className:"inline-block px-6 py-2 bg-[#22c55e] text-white rounded-lg hover:bg-[#16a34a] transition-colors text-sm font-medium",children:"Login to Access"})]}),Zs=()=>b?e.jsx("div",{className:"space-y-4",children:e.jsx(Ta,{onPost:aa,className:"w-full",conversationId:W,contentFormat:Re})}):e.jsxs("div",{className:"bg-gray-50 border border-gray-200 rounded-xl p-8 text-center",children:[e.jsx("div",{className:"w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mx-auto mb-4",children:e.jsx("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"#9ca3af",strokeWidth:"2",children:e.jsx("path",{d:"M4 4v16h16V4H4z M8 9h8 M8 13h6 M8 17h4"})})}),e.jsx("p",{className:"text-gray-600 mb-2",children:r("ezbar_login_required_for_social","Login required to create content")}),e.jsx("button",{onClick:()=>G(!0),className:"inline-block px-6 py-2 bg-[#22c55e] text-white rounded-lg hover:bg-[#16a34a] transition-colors text-sm font-medium",children:"Login to Access"})]}),Js=()=>e.jsx("div",{className:"space-y-4",children:e.jsxs("div",{className:"border border-gray-200 rounded-xl p-4 bg-white",children:[Xs(),e.jsxs("div",{className:"mt-3",children:[_e==="composer"&&Zs(),_e==="upload"&&Ks(),_e==="embed"&&Ys(),_e==="geoslug"&&Qs()]})]})}),ea=n.useCallback(()=>{he(s=>s==="ez"?"ai":"ez"),z([]),F(!1),o(""),M([]),q(1),P(0),B(1)},[]),ta=n.useCallback(async s=>{try{const a=await $.get("/searchai/suggestions",{params:{query:s},headers:{Accept:"application/json","X-Requested-With":"XMLHttpRequest"}});a.data.suggestions&&M(a.data.suggestions)}catch(a){console.error("Failed to fetch suggestions:",a)}},[]),at=n.useCallback(async(s,a=1)=>{var i,m,v,I,se,be,J;if(s.trim()){d(!0),a===1&&(F(!1),M([]));try{let U;p==="ai"?U=await $.get("/searchai/ai-slugs",{params:{query:s,page:a,per_page:T},headers:{Accept:"application/json","X-Requested-With":"XMLHttpRequest"}}):U=await $.get("/searchai/links",{params:{query:s,page:a,per_page:T},headers:{Accept:"application/json","X-Requested-With":"XMLHttpRequest"}});let Fe=[];Array.isArray((i=U.data)==null?void 0:i.results)?Fe=U.data.results:(m=U.data)!=null&&m.results&&typeof U.data.results=="object"&&(Fe=Object.values(U.data.results));const j=((v=U.data)==null?void 0:v.total)||0,vt=((I=U.data)==null?void 0:I.all_results_count)||j;z(a===1?Fe:pe=>[...pe,...Fe]),P(vt),q(a),B(((se=U.data)==null?void 0:se.total_pages)||1),ae(((be=U.data)==null?void 0:be.per_page)||10),_(((J=U.data)==null?void 0:J.has_more)||!1),(Fe.length>0||a===1)&&setTimeout(()=>{F(!0)},0),a===1&&p==="ez"&&D!==s&&re(s)}catch(U){console.error("Auto-search error:",U),a===1&&(z([]),P(0),F(!0)),a===1&&p==="ez"&&D!==s&&re(s)}finally{d(!1)}}},[D,T,p]),me=n.useCallback(async(s,a=1)=>{s&&s.preventDefault();const i=A.trim();i&&(ie(),await at(i,a))},[A,at,ie]),ft=n.useCallback(async s=>{var i,m,v;if(s&&s.preventDefault(),!b){G(!0);return}const a=D.trim();if(a){if(V){le(h?r("ezbar_ai_disabled_user","Ask AI is currently disabled for logged-in users."):r("ezbar_ai_disabled_guest","Ask AI is currently disabled for guests. Login to access Ask AI."));return}if(R>f){le(r("ezbar_character_limit_exceeded","Character limit exceeded ({current}/{max}). {login_message}Please shorten your message.",{current:R,max:f,login_message:h?"":r("ezbar_login_for_higher_limit","Login for higher character limit. ")}));return}Vt(!0),We(null),le(null),lt(null),ct(!1),Ve(!1);try{const I=/@(\w+)/g,be=(a.match(I)||[]).map(vt=>vt.substring(1)),J=a.includes("#think"),U=a.replace(I,"").replace("#think","").trim(),j=(await $.post("/searchai/ai",{query:U,sources:be,enable_thinking:J,model:oe.id,temperature:.6,max_tokens:2e3,conversation_id:dt,thread_id:Qt,parent_slug:Le,custom_slug:w&&E===!0&&!dt?w:void 0},{headers:{"Content-Type":"application/json",Accept:"application/json","X-CSRF-TOKEN":ye()}})).data;if(j.success&&j.answer){if(We(j.answer),ct(j.thinking_enabled||!1),j.usage&<(j.usage),j.conversation_id){$e(j.conversation_id),de(j.conversation_id),Pe(j.thread_id||null),De(j.conversation_title||null),Ge(j.slug||null),Ue(j.parent_slug||null);let pe=0;j.conversation_cost!==void 0&&j.conversation_cost!==null?pe=j.conversation_cost:j.conversation_tokens?pe=j.conversation_tokens/1e3*.01:(i=j.usage)!=null&&i.total_tokens&&(pe=j.usage.total_tokens/1e3*.01),qe(pe),j.conversation_messages&&(He(j.conversation_messages),ce(j.conversation_messages)),j.message_count!==void 0&&Oe(j.message_count)}
289!dt&&j.conversation_id&&j.slug&&(ne(""),Q(null),Ve(!0),Xe(!0),setTimeout(()=>{const pe=j.conversation_slug||j.slug;if(pe){const ja=encodeURIComponent(pe);Me.visit(`/X/${ja}`,{preserveScroll:!0,preserveState:!0,onSuccess:()=>{Xe(!1)},onError:()=>{Xe(!1),Ve(!1)}})}},Pa))}else le(j.message||"Failed to get AI response")}catch(I){console.error("Ask AI error:",I);const se=I instanceof _a?((v=(m=I.response)==null?void 0:m.data)==null?void 0:v.message)||"Network error occurred":"An error occurred while processing your request. Please try again.";le(se)}finally{Vt(!1)}}},[D,dt,Qt,Le,R,f,h,V,oe,w,E,r,b]),sa=n.useCallback(async()=>{var a;if(!b){G(!0);return}if(!H||H.length===0)return;te(null);for(const i of H){if(i.size>vs){te(r("ezbar_file_size_limit",`File "${i.name}" exceeds 100MB limit.`));return}if(i.file){const m=js(i.file);if(!m.valid){te(m.message);return}}}Yt(!0);const s=new FormData;H.forEach(i=>{i.file&&s.append("files[]",i.file)}),(a=H[0])!=null&&a.file&&s.append("file",H[0].file),s.append("description",Ee),W&&s.append("conversation_id",W),w&&E===!0&&!W&&s.append("custom_slug",w);try{const i=await $.post("/content/upload",s,{headers:{"Content-Type":"multipart/form-data","X-CSRF-TOKEN":ye()}});i.data.success?(i.data.conversation_messages&&ce(i.data.conversation_messages),de(i.data.conversation_id),i.data.files&&Array.isArray(i.data.files)?Ye(m=>[...m,...i.data.files]):i.data.file&&Ye(m=>[...m,i.data.file]),xt([]),pt(""),te(null),Ct("content"),Ze("composer"),ne(""),Q(null),ze.current&&(ze.current.value=""),i.data.slug&&Me.visit(`/X/${encodeURIComponent(i.data.slug)}`,{preserveScroll:!1,preserveState:!1,onSuccess:()=>{console.log("Redirected to upload page successfully")},onError:m=>{console.error("Error redirecting:",m)}})):te(i.data.message||r("ezbar_upload_failed","Failed to upload file. Please try again."))}catch(i){console.error("Upload error:",i),$.isAxiosError(i)&&i.response?te(i.response.data.message||r("ezbar_upload_failed","Failed to upload file. Please try again.")):te(r("ezbar_upload_failed","Failed to upload file. Please try again."))}finally{Yt(!1)}},[H,Ee,W,w,E,r,b]);n.useCallback(async()=>{if(!b){G(!0);return}if(Ee.trim()){Zt(!0);try{const s=await $.post("/content/comment",{content:Ee,conversation_id:W,custom_slug:w&&E===!0&&!W?w:void 0,content_type:"conversationcomment"},{headers:{"X-CSRF-TOKEN":ye()}});s.data.success?(s.data.conversation_messages&&ce(s.data.conversation_messages),de(s.data.conversation_id),s.data.comment&&Ke(a=>[...a,s.data.comment]),pt(""),ne(""),Q(null),s.data.slug&&Me.visit(`/X/${encodeURIComponent(s.data.slug)}`,{preserveScroll:!1,preserveState:!1})):alert(s.data.message||r("ezbar_comment_failed","Failed to post comment. Please try again."))}catch(s){console.error("Comment error:",s),$.isAxiosError(s)&&s.response?alert(s.response.data.message||r("ezbar_comment_failed","Failed to post comment. Please try again.")):alert(r("ezbar_comment_failed","Failed to post comment. Please try again."))}finally{Zt(!1)}}},[Ee,W,w,E,r,b]);const aa=n.useCallback(async(s,a,i)=>{if(!b){G(!0);return}try{const m=await $.post("/content/social",{content:s,media:a,content_warning:i,conversation_id:W,custom_slug:w&&E===!0&&!W?w:void 0,format:Re},{headers:{"X-CSRF-TOKEN":ye()}});m.data.success?(m.data.conversation_messages&&ce(m.data.conversation_messages),de(m.data.conversation_id),ne(""),Q(null),m.data.slug&&Me.visit(`/X/${encodeURIComponent(m.data.slug)}`,{preserveScroll:!1,preserveState:!1,onSuccess:()=>{console.log("Redirected to social post page successfully")},onError:v=>{console.error("Error redirecting:",v)}})):alert(m.data.message||"Failed to post to social media")}catch(m){console.error("Social media post error:",m),$.isAxiosError(m)&&m.response?alert(m.response.data.message||"Failed to post to social media"):alert("Failed to post to social media. Please try again.")}},[W,w,E,Re,b]),ra=n.useCallback(async()=>{if(!Ce||!Ne){Ie({checking:!1,available:null,message:"Please enter a slug and select a domain"});return}Ie(s=>({...s,checking:!0,available:null,message:""}));try{const s=await $.post("/ezai/check-ezpressstandard-custom",{handle:Ce,domain:Ne});Ie({checking:!1,available:s.data.available,message:s.data.message||(s.data.available?"Slug is available":"Slug is already taken")})}catch(s){console.error("Error checking slug availability:",s),Ie({checking:!1,available:!1,message:"Failed to check availability. Please try again."})}},[Ce,Ne]);n.useCallback(async()=>
289{if(!b){G(!0);return}if(!zt.trim()){fe(r("ezbar_enter_url_first","Enter a landing page URL first"));return}let s=zt.trim();!s.startsWith("http://")&&!s.startsWith("https://")&&(s="https://"+s);try{new URL(s)}catch{fe("Please enter a valid URL");return}if(w&&E!==!0){fe(r("ezbar_check_slug_first","Please check custom slug availability first"));return}if(Ce&&Ne&&as.available!==!0){fe(r("ezbar_check_slug_first","Please check slug availability first"));return}rs(!0),fe(""),ns("");try{const a=await $.post("/content/landing-page",{landing_page_url:s,slug_domain:Ne||null,short_slug:Ce||null,nyp_price:ss,custom_slug:w&&E===!0?w:void 0},{headers:{"X-CSRF-TOKEN":ye()}});a.data.success?(ns(`Landing page created successfully! Conversation URL: ${a.data.conversation_url}`),$s(""),Ps(""),Ds(""),Hs(0),ne(""),Q(null),Ie({checking:!1,available:null,message:""}),setTimeout(()=>{Me.visit(a.data.conversation_url,{preserveScroll:!1,preserveState:!1})},2e3)):fe(a.data.message||"Failed to create landing page")}catch(a){console.error("Error creating landing page:",a),$.isAxiosError(a)&&a.response?fe(a.response.data.message||"Failed to create landing page"):fe("An unexpected error occurred")}finally{rs(!1)}},[zt,Ne,Ce,as.available,ss,w,E,r,b]);const na=n.useCallback(s=>{s.key==="Enter"?(ie(),me()):s.key==="Escape"&&(M([]),F(!1))},[me,ie]),oa=n.useCallback(s=>{s.key==="Enter"&&!s.shiftKey?(s.preventDefault(),ft()):s.key==="Escape"&&(We(null),le(null))},[ft]),ia=n.useCallback(s=>{o(s),re(s),ie(),q(1),$e(null),Pe(null),De(null),He([]),Oe(0),qe(0),Ge(null),Ue(null),de(null),ce([]),Ke([]),Ye([]),ne(""),Q(null),setTimeout(()=>{me()},50)},[me,ie]),Pt=n.useCallback(()=>{F(!1),z([]),P(0),q(1),B(1),o(""),re(""),M([])},[]),Dt=n.useCallback(()=>{We(null),le(null),lt(null),ct(!1),$e(null),Pe(null),De(null),He([]),Oe(0),qe(0),Ge(null),Ue(null),Ve(!1),Xe(!1),ne(""),Q(null)},[]);n.useCallback(()=>{o(""),z([]),M([]),F(!1),re(""),We(null),le(null),lt(null),ct(!1),$e(null),Pe(null),De(null),He([]),Oe(0),qe(0),Ge(null),Ue(null),de(null),ce([]),Ke([]),Ye([]),q(1),B(1),P(0),_(!1),Ve(!1),Xe(!1),setSelectedFile(null),pt(""),te(null),ne(""),Q(null),Se(""),he("ez"),setTimeout(()=>{Tt.current&&Tt.current.focus()},100)},[]);const Ht=n.useCallback(s=>{s===x||l||(q(s),me(void 0,s))},[x,l,me]),la=n.useCallback((s,a)=>{Jt({isOpen:!0,url:s,title:a})},[]),hs=n.useCallback(()=>{Jt(s=>({...s,isOpen:!1}))},[]),ca=n.useCallback(()=>{if(Ae.url&&Rt.current){const s=Rt.current,a=document.createElement("a");a.download=`ezbar-qr-${Date.now()}.png`,a.href=s.toDataURL("image/png"),a.click()}},[Ae.url]),da=n.useCallback((s,a,i,m)=>{es({isOpen:!0,feature:s,description:a,iconColor:i,icon:m})},[]),Ot=n.useCallback(()=>{es(s=>({...s,isOpen:!1}))},[]),bt=n.useCallback(s=>{const a=Array.from(s);if(a.length===0)return;te(null);const i=[],m=[];a.forEach(v=>{if(v.size>vs){m.push(`"${v.name}" exceeds 100MB limit.`);return}const I=js(v);if(!I.valid){m.push(`"${v.name}": ${I.message}`);return}i.push(v)}),m.length>
2890&&te(m.join(" ")),i.length!==0&&Promise.all(i.map(v=>new Promise(I=>{const se=new FileReader;se.onload=be=>{var J;I({name:v.name,size:v.size,type:v.type,data:((J=be.target)==null?void 0:J.result)||"",file:v})},se.onerror=()=>{I({name:v.name,size:v.size,type:v.type,data:"",file:v})},se.readAsDataURL(v)}))).then(v=>{xt(I=>{const se=new Set(I.map(J=>`${J.name}_${J.size}`)),be=v.filter(J=>!se.has(`${J.name}_${J.size}`));return[...I,...be]})})},[r]),ma=n.useCallback(s=>{s.target.files&&s.target.files.length>0&&(bt(s.target.files),s.target.value="")},[bt]),pa=n.useCallback(()=>f===0||R===0?"text-gray-400":R>f?"text-red-500":R>X?"text-orange-500":"text-[#22c55e]",[R,f,X]),us=n.useCallback(()=>{if(f===0)return{width:"0%",color:"bg-gray-500"};const s=Math.min(R/f*100,100);let a="bg-[#22c55e]";return R>f?a="bg-red-500":R>X&&(a="bg-orange-500"),{width:`${s}%`,color:a}},[R,f,X]),xa=({model:s,selectedModel:a,onSelect:i})=>e.jsx("button",{onClick:i,className:`w-full px-4 py-3 text-left hover:bg-gray-50 transition-colors ${a.id===s.id?"bg-[#22c55e]/5":""}`,children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("span",{className:`text-sm font-medium ${a.id===s.id?"text-[#22c55e]":"text-gray-900"}`,children:s.name}),s.isNew&&e.jsx("span",{className:"text-[10px] font-semibold text-white bg-[#22c55e] px-1.5 py-0.5 rounded-full",children:"NEW"}),s.isPrevious&&e.jsx("span",{className:"text-[10px] font-semibold text-gray-500 bg-gray-100 px-1.5 py-0.5 rounded-full",children:"PREVIOUS"})]}),s.description&&e.jsx("p",{className:"text-xs text-gray-500 mt-0.5 max-w-[200px]",children:s.description})]}),a.id===s.id&&e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#22c55e",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0 mt-1",children:e.jsx("path",{d:"M20 6 9 17l-5-5"})})]})}),ha=()=>e.jsxs("div",{className:"relative",ref:Bt,children:[e.jsxs("button",{onClick:()=>It(!Et),className:"flex items-center space-x-2 px-3 py-1.5 bg-white border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors focus:outline-none focus:ring-2 focus:ring-[#22c55e]/30","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_model_selector","Select AI model for your conversation"),children:[e.jsx("span",{className:"text-sm font-medium text-gray-700",children:oe.name}),oe.isNew&&e.jsx("span",{className:"text-[10px] font-semibold text-white bg-[#22c55e] px-1.5 py-0.5 rounded-full",children:"NEW"}),e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:`text-gray-500 transition-transform duration-200 ${Et?"rotate-180":""}`,children:e.jsx("path",{d:"m6 9 6 6 6-6"})})]}),Et&&e.jsxs("div",{className:"absolute left-0 mt-1 w-80 bg-white border border-gray-200 rounded-xl shadow-xl z-50 overflow-hidden",children:[e.jsx("div",{className:"px-4 py-2 bg-gray-50 border-b border-gray-200",children:e.jsx("span",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider",children:"Select Model"})}),e.jsxs("div",{className:"max-h-96 overflow-y-auto",children:[e.jsx("div",{className:"px-4 py-2 bg-gray-50/50 border-b border-gray-100",children:e.jsx("div",{className:"flex items-center justify-between",children:e.jsx("span",{className:"text-xs font-semibold text-gray-400 uppercase tracking-wider",children:"⨠AI Models"})})}),ms.filter(s=>s.type==="flagship").map(s=>e.jsx(xa,{model:s,selectedModel:oe,onSelect:()=>{Us(s),It(!1)}},s.id))]}),e.jsx("div",{className:"px-4 py-2 bg-gray-50 border-t border-gray-200",children:e.jsx("p",{className:"text-xs text-gray-500 text-center",children:"Powered by Moonshot AI, OpenAI, DeepSeek, Perplexity & Google Gemini"})})]})]}),ua=n.useMemo(()=>[{id:"parenting",label:r("ezbar_topic_parenting","Parenting"),icon:e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M12 2a2 2 0 0 1 2 2c0 .74-.4 1.39-1 1.73V7h1a7 7 0 0 1 7 7v8H3v-8a7 7 0 0 1 7-7h1V5.73c-.6-.34-1-1.01-1-1.73a2 2 0 0 1 2-2Z"})})}
289,{id:"latest-news",label:r("ezbar_topic_news","Latest News"),icon:e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"11",cy:"11",r:"8"}),e.jsx("path",{d:"m21 21-4.3-4.3"})]})},{id:"travel",label:r("ezbar_topic_travel","Travel"),icon:e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.1-.9.1-1.1.5l-.3.5c-.2.5-.1 1 .3 1.3L9 12l-2 3H4l-1 1 3 2 2 3 1-1v-3l3-2 3.5 5.3c.3.4.8.5 1.3.3l.5-.2c.4-.3.6-.7.5-1.2z"})})},{id:"technology",label:r("ezbar_topic_technology","Technology"),icon:e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M20 7h-9"}),e.jsx("path",{d:"M14 17H5"}),e.jsx("circle",{cx:"17",cy:"17",r:"3"}),e.jsx("circle",{cx:"7",cy:"7",r:"3"})]})},{id:"health",label:r("ezbar_topic_health","Health"),icon:e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"m22 12-4-4v3H3v2h15v3z"}),e.jsx("path",{d:"M2 9v1c0 1.1.9 2 2 2h6v5l4-4-4-4v5H4a2 2 0 0 1-2-2V9Z"})]})},{id:"finance",label:r("ezbar_topic_finance","Finance"),icon:e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M12 2v20M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"})})}],[r]),ga=n.useCallback(s=>{o(s),re(s),ie(),q(1),$e(null),Pe(null),De(null),He([]),Oe(0),qe(0),Ge(null),Ue(null),de(null),ce([]),Ke([]),Ye([]),ne(""),Q(null),setTimeout(()=>{me()},50)},[me,ie]),fa=()=>_t.length===0?null:e.jsxs("div",{className:"mb-8 space-y-4 max-h-[500px] overflow-y-auto border rounded-xl p-4 bg-gray-50",children:[e.jsx("h3",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Conversation"}),_t.map(s=>e.jsx("div",{className:`flex ${s.message_role==="user"?"justify-end":"justify-start"}`,children:e.jsxs("div",{className:`max-w-[80%] rounded-lg p-3 ${s.message_role==="user"?s.content_type==="upload"?"bg-blue-500 text-white":s.content_type==="social"||s.content_type==="social_media"?"bg-purple-500 text-white":s.content_type==="landing_page"?"bg-indigo-500 text-white":s.content_type==="embed"?"bg-orange-500 text-white":s.content_type==="conversationcomment"?"bg-teal-500 text-white":"bg-[#22c55e] text-white":"bg-white border border-gray-200"}`,children:[s.content_type==="ai"&&e.jsx(e.Fragment,{children:s.message_role==="user"?e.jsx("p",{className:"text-sm",children:s.query}):e.jsx("div",{children:e.jsx(we,{source:s.response||"",style:{backgroundColor:"transparent",fontSize:"14px",color:s.message_role==="user"?"white":"#1f2937"}})})}),s.content_type==="landing_page"&&e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium mb-2",children:"Landing Page Created"}),e.jsx("p",{className:"text-sm",children:s.query}),s.response&&e.jsx("div",{className:"mt-2 text-sm opacity-90",children:e.jsx(we,{source:s.response,style:{backgroundColor:"transparent",fontSize:"13px",color:s.message_role==="user"?"white":"#1f2937"}})})]}),s.content_type==="comment"&&e.jsxs("div",{children:[e.jsx("p",{className:"text-sm",children:s.query}),s.user&&e.jsx("p",{className:"text-xs opacity-75 mt-1",children:s.user.name||"Guest"}),e.jsx("span",{className:"text-xs opacity-75 block mt-1",children:s.formatted_created_at})]}),s.content_type==="conversationcomment"&&e.jsxs("div",{children:[e.jsx("p",{className:"text-sm",children:s.query}),s.user&&e.jsx("p",{className:"text-xs opacity-75 mt-1",children:s.user.name||"Guest"}),e.jsx("span",{className:"text-xs opacity-75 block mt-1",children:s.formatted_created_at})]}),s.content_type==="embed"&&e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium mb-1 opacity-90",children:"Embed Layout"}),e.jsx("div",{className:"text-sm",dangerouslySetInnerHTML:{__html:s.query}}),s.user&&e.jsx("p",{className:"text-xs opacity-75 mt-1",children:s.user.n
289ame||"Guest"}),e.jsx("span",{className:"text-xs opacity-75 block mt-1",children:s.formatted_created_at})]}),(s.content_type==="social"||s.content_type==="social_media")&&e.jsxs("div",{children:[e.jsx("div",{className:"text-sm",dangerouslySetInnerHTML:{__html:s.query}}),s.user&&e.jsx("p",{className:"text-xs opacity-75 mt-1",children:s.user.name||"Guest"}),e.jsx("span",{className:"text-xs opacity-75 block mt-1",children:s.formatted_created_at})]}),s.content_type==="upload"&&s.file_data&&e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:"w-12 h-12 bg-white/20 rounded flex items-center justify-center",children:s.file_data.mime_type.startsWith("image/")?e.jsx("img",{src:s.file_data.url,alt:s.file_data.original_name,className:"w-12 h-12 object-cover rounded"}):s.file_data.mime_type==="application/pdf"?e.jsx(ve,{icon:ks,className:"text-white text-xl"}):s.file_data.mime_type==="text/html"||s.file_data.extension==="html"||s.file_data.extension==="htm"?e.jsx(ve,{icon:_s,className:"text-white text-xl"}):s.file_data.mime_type.includes("word")?e.jsx(ve,{icon:Ns,className:"text-white text-xl"}):e.jsx(ve,{icon:Cs,className:"text-white text-xl"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium truncate",children:s.file_data.original_name}),e.jsx("p",{className:"text-xs opacity-75",children:Gt(s.file_data.size)}),s.query&&e.jsx("p",{className:"text-xs mt-1 italic opacity-90",children:s.query})]}),e.jsx("a",{href:s.file_data.url,target:"_blank",rel:"noopener noreferrer",className:"text-white hover:underline text-xs px-2 py-1 bg-white/20 rounded",children:"Open"})]}),e.jsxs("div",{className:`flex items-center justify-between mt-2 text-xs ${s.message_role==="user"?"text-white/80":"text-gray-500"}`,children:[e.jsx("span",{children:s.formatted_created_at}),e.jsx("a",{href:s.share_url,target:"_blank",rel:"noopener noreferrer",className:`hover:underline ${s.message_role==="user"?"text-white":"text-[#22c55e]"}`,children:r("ezbar_permalink","Permalink")})]})]})},s.id)),e.jsx("div",{ref:Ft})]}),ba=()=>Y<=T?null:e.jsxs("div",{className:"flex items-center justify-center space-x-2 px-4 py-3 bg-gray-50 border-t border-gray-100",children:[e.jsxs("button",{onClick:()=>Ht(x-1),disabled:x===1||l,className:`px-3 py-1.5 rounded-lg text-sm font-medium flex items-center space-x-1 transition-colors ${x===1||l?"text-gray-400 cursor-not-allowed":"text-gray-600 hover:bg-gray-200 hover:text-gray-800"}`,"data-tooltip-id":"main-tooltip","data-tooltip-content":x===1?r("ezbar_first_page","You're on the first page"):r("ezbar_previous_page","Go to previous page"),children:[e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"m15 18-6-6 6-6"})}),e.jsx("span",{children:"Previous"})]}),e.jsx("div",{className:"flex items-center space-x-1",children:Array.from({length:Math.min(5,N)},(s,a)=>{let i;return N<=5||x<=3?i=a+1:x>=N-2?i=N-4+a:i=x-2+a,e.jsx("button",{onClick:()=>Ht(i),disabled:l,className:`w-8 h-8 rounded-lg text-sm font-medium transition-colors ${x===i?"bg-[#22c55e] text-white":l?"text-gray-400 cursor-not-allowed":"text-gray-600 hover:bg-gray-200 hover:text-gray-800"}`,"data-tooltip-id":"main-tooltip","data-tooltip-content":x===i?r("ezbar_current_page","You're on page {number}",{number:i}):r("ezbar_page_number","Go to page {number}",{number:i}),children:i},i)})}),e.jsxs("button",{onClick:()=>Ht(x+1),disabled:x===N||l,className:`px-3 py-1.5 rounded-lg text-sm font-medium flex items-center space-x-1 transition-colors ${x===N||l?"text-gray-400 cursor-not-allowed":"text-gray-600 hover:bg-gray-200 hover:text-gray-800"}`,"data-tooltip-id":"main-tooltip","data-tooltip-content":x===N?r("ezbar_last_page","You're on the last page"):r("ezbar_next_page","Go to next page"),children:[e.jsx("span",{children:"Next"}),e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"m9 18 6-6-6-6"})})]})]}),va=()=>
289{if(!K)return null;if(l&&(!Array.isArray(u)||u.length===0))return e.jsx("div",{ref:tt,className:"absolute top-full mt-2 w-full bg-white border border-gray-200 rounded-xl shadow-xl z-50",children:e.jsxs("div",{className:"px-4 py-8 text-center",children:[e.jsx("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"#22c55e",strokeWidth:"1.5",className:"mx-auto mb-3 animate-spin",children:e.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),e.jsxs("p",{className:"text-gray-600",children:[r("ezbar_searching_links","Searching for"),' "',e.jsx("span",{className:"font-semibold",children:A}),'"']})]})});const s=Array.isArray(u)?u:[];return s.length===0&&!l?e.jsx("div",{ref:tt,className:"absolute top-full mt-2 w-full bg-white border border-gray-200 rounded-xl shadow-xl z-50",children:e.jsxs("div",{className:"px-4 py-6 text-center",children:[e.jsxs("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"#9ca3af",strokeWidth:"1.5",className:"mx-auto mb-3",children:[e.jsx("circle",{cx:"11",cy:"11",r:"8"}),e.jsx("path",{d:"m21 21-4.3-4.3"})]}),e.jsxs("p",{className:"text-gray-600",children:[r("ezbar_no_results","No results found for"),' "',e.jsx("span",{className:"font-semibold",children:A}),'"']}),e.jsx("p",{className:"text-sm text-gray-400 mt-1",children:r("ezbar_try_keywords","Try different keywords or check your spelling")}),e.jsx("button",{onClick:Pt,className:"mt-3 px-4 py-2 text-sm bg-gray-100 hover:bg-gray-200 rounded-lg transition-colors","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_clear_results","Clear search results"),children:r("ezbar_close","Close")})]})}):e.jsxs("div",{ref:tt,className:"absolute top-full mt-2 w-full bg-white border border-gray-200 rounded-xl shadow-xl z-50 max-h-[500px] overflow-y-auto",children:[e.jsx("div",{className:`sticky top-0 px-4 py-3 border-b rounded-t-xl z-10 ${p==="ai"?"bg-gradient-to-r from-purple-500 to-purple-600 border-purple-100":"bg-gray-50 border-gray-100"}`,children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:`text-xs font-semibold uppercase tracking-wider ${p==="ai"?"text-white":"text-gray-600"}`,children:p==="ai"?r("ezbar_label_ai_conversation","AI Conversation Results"):r("ezbar_label_search_results","Search Results")}),e.jsxs("span",{className:`text-xs px-2 py-0.5 rounded-full ${p==="ai"?"bg-white/20 text-white":"bg-[#22c55e] text-white"}`,children:[Y," ",r("ezbar_label_total","total")," ⢠",r("ezbar_label_page","Page")," ",x," ",r("ezbar_label_of","of")," ",N]})]}),e.jsx("button",{onClick:Pt,className:`transition-colors p-1 rounded ${p==="ai"?"text-white/80 hover:text-white hover:bg-white/10":"text-gray-400 hover:text-gray-600 hover:bg-gray-100"}`,"aria-label":"Close results","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_clear_results","Clear search results"),children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M18 6 6 18"}),e.jsx("path",{d:"m6 6 12 12"})]})})]})}),e.jsx("div",{className:"overflow-y-auto max-h-[400px]",children:s.map((a,i)=>{const m=Va(a.type),v=(x-1)*T+i+1;return e.jsxs("div",{className:"px-4 py-3 border-b border-gray-100 last:border-b-0 hover:bg-gray-50 transition-colors group",children:[e.jsxs("div",{className:"flex items-start justify-between mb-2",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:`text-xs font-semibold px-2 py-0.5 rounded-full ${m.bg} ${m.text}`,"data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_result_type","Result type: {type}",{type:a.type.replace("_"," ")}),children:a.type==="ai_conversation"?"AI Conversation":a.type.replace("_"," ")}),e.jsxs("span",{className:"text-xs text-gray-400","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_result_position","Result position in search results"),children:["#",v]}),a.score&&e.jsxs("span",{className:"text-xs text-gray-500","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_result_score","Relevance score: {score}% match",{score:a.score.toFixed(0)}),children:[a.score.toFixed(0),"% match"]}),a.type==="ai_conversation"&&a.message_count&&e.jsxs("span",{className:"text-xs bg-indigo-100 text-indigo-600 px-2 py-0.5 rounded-full","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_messages_count","{count} messages in this conversation",{count:a.message_count}),children:[a.message_count," msgs"]})]}),e.jsxs("a",{href:a.url,target:"_blank",rel:"noopener noreferrer",className:"block no-underline",children:[e.jsx("h4",{className:`text-sm font-medium truncate transition-colors ${p==="ai"?"text-purple-600 hover:text-purple-800":"text-gray-900 hover:text-[#22c55e]"}`,"data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_result_title","{title}",{title:a.type==="ai_conversation"&&a.conversation_title?a.conversation_title:a.title}),children:a.type==="ai_conversation"&&a.conversation_title?a.conversation_title:a.title}),a.subtitle&&e.jsx("p",{className:"text-xs text-gray-600 mt-1 line-clamp-2","data-tooltip-id":"main-tooltip","data-tooltip-content":a.subtitle,children:a.subtitle}),a.type==="ai_conversation"&&a.query_preview&&e.jsxs("p",{className:"text-xs text-gray-500 mt-1 italic line-clamp-1","data-tooltip-id":"main-tooltip","data-tooltip-content":`Original query: ${a.query_preview}`,children:["ð¬ ",a.query_preview]})]}),e.jsxs("div",{className:"flex items-center justify-between mt-2",children:[e.jsxs("span",{className:"text-xs text-gray-500 truncate flex items-center gap-1","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_result_url","URL: {url}",{url:a.type==="ai_conversation"?"/X/"+a.slug:a.url}),children:[e.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),e.jsx("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})]}),a.type==="ai_conversation"?"/X/"+a.slug:a.url]}),a.created_at&&e.jsx("span",{className:"text-xs text-gray-400","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_result_created","Created: {date}",{date:a.created_at}),children:a.created_at})]})]}),e.jsx("div",{className:"ml-3 flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:e.jsx("a",{href:a.url,target:"_blank",rel:"noopener noreferrer",className:`transition-colors ${p==="ai"?"text-purple-400 hover:text-purple-600":"text-gray-400 hover:text-[#22c55e]"}`,"aria-label":"Open link","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_open_link","Open link in new tab"),children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2 2V8a2 2 0 0 1 2 2h6"}),e.jsx("polyline",{points:"15 3 21 3 21 9"}),e.jsx("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})})})]}),e.jsxs("div",{className:"flex items-center space-x-2 mt-3",children:[e.jsxs("a",{href:a.url,target:"_blank",rel:"noopener noreferrer",className:`px-3 py-1.5 text-white text-xs font-medium rounded-lg transition-colors flex items-center space-x-1 ${p==="ai"?"bg-purple-500 hover:bg-purple-600":"bg-[#22c55e] hover:bg-[#16a34a]"}`,"data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_visit_link","Visit this link"),children:[e.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2 2V8a2 2 0 0 1 2 2h6"}),e.jsx("polyline",{points:"15 3 21 3 21 9"}),e.jsx("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),e.jsx("span",{children:"Visit"})]}),e.jsxs("button",{onClick:()=>la(a.url,a.title),className:"px-3 py-1.5 bg-gray-100 hover:bg-gray-200 text-gray-700 text-xs font-medium rounded-lg transition-colors flex items-center space-x-1","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_generate_qr","Generate QR code for this link"),children:[e.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{width:"7",height:"7",x:"3",y:"3",rx:"1"}),e.jsx("rect",{width:"7",height:"7",x:"14",y:"3",rx:"1"}),e.jsx("rect",{width:"7",height:"7",x:"14",y:"14",rx:"1"}),e.jsx("rect",{width:"7",height:"7",x:"3",y:"14",rx:"1"})]}),e.jsx("span",{children:"QR Code"})]})]})]},`${a.id}-${a.type}-${v}`)})}),ba(),e.jsx("div",{className:`px-4 py-3 border-t rounded-b-xl ${p==="ai"?"bg-purple-50 border-purple-100":"bg-gray-50 border-gray-100"}`,children:e.jsxs("p",{className:"text-xs text-gray-500 text-center",children:["Showing ",s.length," of ",Y," results â¢",e.jsx("button",{onClick:Pt,className:"text-gray-600 hover:text-gray-900 font-medium underline ml-1","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_clear_results","Clear all search results"),children:"Clear results"})]})})]},`results-${x}-${Y}`)},ya=()=>mt.length===0?null:e.jsx("div",{className:"mb-4 space-y-4",children:mt.map(s=>{if(s.message_role==="system")return null;const a=s.message_role==="user";return e.jsx("div",{className:`flex ${a?"justify-end":"justify-start"}`,children:e.jsxs("div",{className:`max-w-[80%] ${a?"text-right":"text-left"}`,children:[e.jsx("div",{className:`rounded-2xl px-4 py-3 ${a?"bg-[#22c55e] text-white":"bg-gray-100"}`,"data-tooltip-id":"main-tooltip","data-tooltip-content":a?r("ezbar_user_message","Your message"):r("ezbar_assistant_message","AI response"),children:a?e.jsx("p",{className:"font-medium",children:s.query}):e.jsx("div",{children:e.jsx(we,{source:s.response||"",style:{backgroundColor:"transparent",fontSize:"14px",color:a?"white":"#1f2937"}})})}),e.jsx("div",{className:`text-xs text-gray-500 mt-1 ${a?"text-right":"text-left"}`,"data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_message_sent","Message sent at {time}",{time:s.formatted_created_at}),children:s.formatted_created_at})]})},s.id)})}),wa=()=>!it&&!jt&&mt.length===0?null:jt?e.jsxs("div",{className:"absolute top-full mt-2 w-full bg-white border border-gray-200 rounded-xl shadow-xl z-50",children:[e.jsx("div",{className:"px-4 py-3 border-b border-red-100 bg-red-50 rounded-t-xl",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#dc2626",strokeWidth:"2.5",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"m15 9-6 6"}),e.jsx("path",{d:"m9 9 6 6"})]}),e.jsx("span",{className:"text-xs font-semibold text-red-600 uppercase tracking-wider",children:"AI Error"})]}),e.jsx("button",{onClick:()=>le(null),className:"text-red-400 hover:text-red-600 transition-colors p-1 hover:bg-red-100 rounded","aria-label":"Close error","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_close_error","Close error message"),children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M18 6 6 18"}),e.jsx("path",{d:"m6 6 12 12"})]})})]})}),e.jsx("div",{className:"p-4",children:e.jsx("div",{className:"text-sm text-red-600",children:jt})}),e.jsx("div",{className:"px-4 py-3 bg-red-50 border-t border-red-100 rounded-b-xl",children:e.jsxs("p",{className:"text-xs text-red-500 text-center",children:[e.jsx("button",{onClick:ft,className:"text-red-600 hover:text-red-800 font-medium underline","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_try_again","Try sending your query again"),children:"Try again"}),"â¢",e.jsx("button",{onClick:Dt,className:"text-red-600 hover:text-red-800 font-medium underline ml-1","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_clear_error","Clear error and start over"),children:"Clear"})]})})]}):V?e.jsxs("div",{className:"absolute top-full mt-2 w-full bg-white border border-gray-200 rounded-xl shadow-xl z-50",children:[e.jsx("div",{className:"px-4 py-3 border-b border-yellow-100 bg-yellow-50 rounded-t-xl",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#eab308",strokeWidth:"2.5",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"M12 8v4"}),e.jsx("path",{d:"M12 16h.01"})]}),e.jsx("span",{className:"text-xs font-semibold text-yellow-600 uppercase tracking-wider",children:"AI Disabled"})]}),e.jsx("button",{onClick:Dt,className:"text-yellow-400 hover:text-yellow-600 transition-colors p-1 hover:bg-yellow-100 rounded","aria-label":"Close","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_close","Close"),children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M18 6 6 18"}),e.jsx("path",{d:"m6 6 12 12"})]})})]})}),e.jsxs("div",{className:"p-6 text-center",children:[e.jsx("p",{className:"text-gray-600 mb-2",children:h?r("ezbar_ai_disabled_user","Ask AI is currently disabled for logged-in users."):r("ezbar_ai_disabled_guest","Ask AI is currently disabled for guests. Login to access Ask AI.")}),!h&&e.jsx("button",{onClick:()=>G(!0),className:"inline-block px-4 py-2 bg-[#22c55e] text-white rounded-lg hover:bg-[#16a34a] transition-colors text-sm font-medium","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_login_to_access","Login to access Ask AI"),children:"Login to Access"})]})]}):e.jsxs("div",{className:"absolute top-full mt-2 w-full bg-white border border-gray-200 rounded-xl shadow-xl z-50 max-h-[500px] overflow-y-auto",children:[e.jsxs("div",{className:"sticky top-0 px-4 py-3 border-b border-gray-200 bg-gradient-to-r from-purple-500 to-purple-600 rounded-t-xl z-10",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2.5",children:e.jsx("path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1-1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z"})}),e.jsx("span",{className:"text-xs font-semibold text-white uppercase tracking-wider",children:r("ezbar_ai_conversation","AI Conversation {title}",{title:Xt?`- ${Xt}`:""})}),oe&&e.jsx("span",{className:"text-xs bg-white/20 text-white px-2 py-0.5 rounded-full",children:oe.name})]}),e.jsx("button",{onClick:Dt,className:"text-white/80 hover:text-white transition-colors p-1 hover:bg-white/10 rounded","aria-label":"Close AI response","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_close_modal","Close this modal"),children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M18 6 6 18"}),e.jsx("path",{d:"m6 6 12 12"})]})})]}),je>0&&e.jsxs("div",{className:"mt-2 text-xs text-purple-200 flex items-center space-x-4",children:[e.jsxs("span",{"data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_messages_count","{count} messages in this conversation",{count:je}),children:[je," messages in this conversation"]}),e.jsxs("span",{className:"flex items-center space-x-1","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_conversation_cost","Total conversation cost"),children:[e.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M12 2v20M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"})}),e.jsx("span",{children:r("ezbar_total_cost","Total cost of this conversation: ${cost}",{cos
289t:kt.toFixed(5)})})]})]})]}),e.jsxs("div",{className:"p-4",children:[ya(),it&&e.jsxs("div",{className:"mt-4",children:[e.jsx(we,{source:it,style:{backgroundColor:"transparent",color:"#1f2937",fontFamily:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontSize:"14px",lineHeight:"1.6"},wrapperElement:{"data-color-mode":"light"}}),(ue||kt>0)&&e.jsx("div",{className:"mt-4 pt-3 border-t border-gray-100 text-xs text-gray-500",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-4",children:[ue&&e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"flex items-center gap-1","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_token_usage","Total tokens used in this response"),children:[e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M2 12h5l2-4 3 8 3-8 2 4h5"})}),"Tokens: ",ue.total_tokens]}),e.jsxs("span",{"data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_prompt_tokens","Prompt tokens"),children:["Prompt: ",ue.prompt_tokens]}),e.jsxs("span",{"data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_completion_tokens","Completion tokens"),children:["Completion: ",ue.completion_tokens]})]}),e.jsxs("span",{className:"flex items-center gap-1","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_response_cost","Estimated cost for this response"),children:[e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M12 2v20M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"})}),r("ezbar_this_response_cost","This response cost: ${cost}",{cost:(((ue==null?void 0:ue.total_tokens)||0)/1e3*.01).toFixed(5)})]}),e.jsxs("span",{className:"flex items-center gap-1","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_conversation_cost","Total conversation cost"),children:[e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M12 2v20M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"})}),r("ezbar_total_cost","Total cost of this conversation: ${cost}",{cost:kt.toFixed(5)})]}),e.jsxs("span",{className:"flex items-center gap-1","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_model_used","Model used"),children:["Model: ",oe.name]})]}),Le&&e.jsx(yt,{href:`/X/${ws(Le)}`,className:"text-[#22c55e] hover:text-[#16a34a] text-xs","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_view_conversation","View full conversation"),children:r("ezbar_conversation_permalink","View full conversation")})]})})]}),Ts&&e.jsx("div",{className:"mt-4 p-4 bg-gradient-to-r from-green-50 to-emerald-50 border border-green-200 rounded-lg",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center ${Qe?"bg-green-100":"bg-green-500"}`,children:Qe?e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#22c55e",strokeWidth:"2.5",className:"animate-spin",children:e.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}):e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2.5",children:e.jsx("path",{d:"m9 18 6-6-6-6"})})}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-semibold text-green-800",children:Qe?r("ezbar_redirecting","Redirecting to conversation page..."):r("ezbar_new_conversation_created","New conversation created!")}),e.jsx("p",{className:"text-xs text-green-600 mt-1",children:Qe?r("ezbar_redirect_message","You'll be redirected to the conversation page in a moment..."):r("ezbar_continue_conversation","You can continue this conversation in the dedicated conversation page.")})]})]}),!Qe&&Le&&e.jsxs(yt,{href:`/X/${ws(Le)}`,className:"px-3 py-1.5 bg-green-500 hover:bg-green-600 text-white text-xs rounded-lg transition-colors flex items-center space-x-1","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_go_now","Go to conversation page now"),children:[e.jsx("span",{children:r("ezbar_go_now","Go to conversation page now")}),e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:e.jsx("path",{d:"m9 18 6-6-6-6"})})]})]})})]})]});return n.useEffect(()=>{if(O&&!l&&!A&&p==="ez"){o(O);const s=setTimeout(()=>{at(O,1)},100);return()=>clearTimeout(s)}},[O]),e.jsxs(e.Fragment,{children:[e.jsx(Na,{title:"ezbar.ai"}),e.jsx(Ma,{id:"main-tooltip",place:"top",className:"!bg-gray-900 !text-white !text-xs !px-3 !py-2 !rounded-lg !z-[100] !shadow-xl",effect:"solid"}),(t==null?void 0:t.user)&&e.jsx(Sa,{auth:t}),e.jsx("div",{className:"flex min-h-screen bg-[#FCFCFC] text-slate-800",children:e.jsx("main",{className:"flex-1 min-h-screen overflow-y-auto",children:e.jsxs("div",{className:"flex flex-col items-center px-4 pt-1 pb-1",children:[e.jsxs("div",{className:"w-full max-w-[1200px] mb-6 flex flex-col sm:flex-row items-center justify-between gap-3",children:[e.jsx(ha,{}),t.user?e.jsx("div",{className:"flex items-center gap-3",children:e.jsxs("div",{className:"flex flex-col items-end leading-tight",children:[e.jsxs("span",{className:"text-sm font-semibold text-gray-700 truncate max-w-[120px]",children:["Hi, I'm ",t.user.name]}),e.jsx("span",{className:"text-[10px] text-gray-400 hidden sm:inline-block",children:"and explore the boundless creative world"})]})}):e.jsx("div",{className:"flex items-center gap-3",children:e.jsxs("div",{className:"flex flex-col items-end leading-tight",children:[e.jsx("span",{className:"text-sm font-semibold text-gray-700",children:"Hi, I'm ez.wiki"}),e.jsx("span",{className:"text-[10px] text-gray-400 hidden sm:inline-block",children:"and explore the boundless creative world"})]})})]}),e.jsx(Is,{content:g}),e.jsxs("div",{className:"w-full max-w-[1200px] grid grid-cols-1 lg:grid-cols-3 gap-8 mb-8",children:[e.jsxs("div",{className:"lg:col-span-1 w-full",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3 px-1",children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:p==="ai"?"text-purple-600":"text-gray-600",children:[p==="ai"?e.jsx("path",{d:"M12 2a2 2 0 0 1 2 2c0 .74-.4 1.39-1 1.73V7h1a7 7 0 0 1 7 7v8H3v-8a7 7 0 0 1 7-7h1V5.73c-.6-.34-1-1.01-1-1.73a2 2 0 0 1 2-2Z"}):e.jsx("circle",{cx:"11",cy:"11",r:"8"}),p==="ez"&&e.jsx("path",{d:"m21 21-4.3-4.3"})]}),e.jsx("span",{className:`text-[11px] font-bold uppercase tracking-widest ${p==="ai"?"text-purple-600":"text-gray-600"}`,children:p==="ai"?r("ezbar_search_mode_ai","AI Conversation Search"):r("ezbar_search_mode_ez","Link Search")}),e.jsxs("span",{className:"text-xs text-gray-400 ml-2 hidden sm:inline",children:["⢠",r("ezbar_switch_mode","Click to toggle between link search and AI conversation search")]})]}),e.jsxs("div",{className:"relative group",children:[e.jsxs("button",{onClick:ea,className:"absolute inset-y-0 left-0 flex items-center pl-3 md:pl-4 z-10 group/toggle focus:outline-none","data-tooltip-id":"main-tooltip","data-tooltip-content":p==="ez"?r("ezbar_switch_to_ai","Switch to AI conversation search"):r("ezbar_switch_to_ez","Switch to regular link search"),children:[e.jsx("span",{className:`font-mono text-[10px] md:text-sm font-semibold tracking-tight bg-gradient-to-r px-2 py-0.5 rounded-md transition-all duration-200 cursor-pointer hover:scale-105 ${p==="ez"?"text-[#22c55e] from-[#22c55e]/10 to-transparent":"text-purple-500 from-purple-500/10 to-transparent"}`,children:p==="ez"?"EZ://":"AI://"}),e.jsx("span",{className:`ml-1 w-1.5 h-1.5 rounded-full ${p==="ez"?"bg-[#22c55e]":"bg-purple-500"}`})]}),p==="ez"&&e.jsx("button",{type:"button",onClick:()=>
289{da("QR Scanner",r("ezbar_qr_scanner_soon","Scan QR codes from your browser (Coming Soon)"),"green",e.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"text-green-500",children:[e.jsx("path",{d:"M3 7V5a2 2 0 0 1 2-2h2"}),e.jsx("path",{d:"M17 3h2a2 2 0 0 1 2 2v2"}),e.jsx("path",{d:"M21 17v2a2 2 0 0 1-2 2h-2"}),e.jsx("path",{d:"M7 21H5a2 2 0 0 1-2-2v-2"}),e.jsx("rect",{width:"6",height:"6",x:"9",y:"9",rx:"1"}),e.jsx("path",{d:"M3 16v-3"}),e.jsx("path",{d:"M21 16v-3"}),e.jsx("path",{d:"M16 3h-3"}),e.jsx("path",{d:"M16 21h-3"}),e.jsx("path",{d:"M16 16l-3-3"}),e.jsx("path",{d:"M16 8l-3 3"}),e.jsx("path",{d:"M8 16l3-3"}),e.jsx("path",{d:"M8 8l3 3"})]}))},className:"absolute right-32 md:right-40 top-1/2 transform -translate-y-1/2 p-2 text-gray-400 hover:text-[#22c55e] transition-colors","aria-label":"Scan QR code","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_qr_scanner_soon","Scan QR codes from your browser (Coming Soon)"),children:e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M3 7V5a2 2 0 0 1 2-2h2"}),e.jsx("path",{d:"M17 3h2a2 2 0 0 1 2 2v2"}),e.jsx("path",{d:"M21 17v2a2 2 0 0 1-2 2h-2"}),e.jsx("path",{d:"M7 21H5a2 2 0 0 1-2-2v-2"}),e.jsx("rect",{width:"6",height:"6",x:"9",y:"9",rx:"1"}),e.jsx("path",{d:"M3 16v-3"}),e.jsx("path",{d:"M21 16v-3"}),e.jsx("path",{d:"M16 3h-3"}),e.jsx("path",{d:"M16 21h-3"}),e.jsx("path",{d:"M16 16l-3-3"}),e.jsx("path",{d:"M16 8l-3 3"}),e.jsx("path",{d:"M8 16l3-3"}),e.jsx("path",{d:"M8 8l3 3"})]})}),p==="ai"&&e.jsxs("div",{className:"absolute right-32 md:right-40 top-1/2 transform -translate-y-1/2 px-2 py-1 bg-purple-100 text-purple-600 rounded-lg text-xs font-medium flex items-center space-x-1",children:[e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e.jsx("path",{d:"M12 2a2 2 0 0 1 2 2c0 .74-.4 1.39-1 1.73V7h1a7 7 0 0 1 7 7v8H3v-8a7 7 0 0 1 7-7h1V5.73c-.6-.34-1-1.01-1-1.73a2 2 0 0 1 2-2Z"})}),e.jsx("span",{children:"AI Conversations"})]}),e.jsx("input",{ref:Tt,type:"text",value:A,onChange:s=>o(s.target.value),onKeyDown:na,onBlur:()=>{setTimeout(()=>{A.trim()||F(!1)},200)},onFocus:()=>{Array.isArray(u)&&u.length>0&&F(!0)},placeholder:p==="ez"?r("ezbar_search_placeholder_ez","Search links, URLs, and domains..."):r("ezbar_search_placeholder_ai","Search AI conversations by slug or title..."),className:"w-full bg-white border border-gray-200 rounded-xl py-3.5 md:py-4 pl-16 md:pl-20 pr-32 md:pr-48 text-sm md:text-base focus:outline-none focus:ring-2 focus:ring-[#22c55e]/30 focus:border-[#22c55e] focus:bg-white transition-all duration-200 placeholder:text-gray-400 hover:border-gray-300 shadow-sm hover:shadow-md backdrop-blur-sm resize-y min-h-[56px]","aria-label":p==="ez"?"Search links, URLs, and domains":"Search AI conversations","data-tooltip-id":"main-tooltip","data-tooltip-content":p==="ez"?r("ezbar_search_links_desc","Search for links, URLs, and domains"):r("ezbar_search_ai_desc","Search for AI conversation slugs and titles")}),e.jsxs("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 space-x-2",children:[l&&e.jsxs("div",{className:"flex items-center text-xs text-gray-500 px-2 md:px-3 py-1.5 border border-gray-200 rounded-lg bg-white/80 shadow-sm","data-tooltip-id":"main-tooltip","data-tooltip-content":p==="ez"?r("ezbar_searching_links_status","Searching for links..."):r("ezbar_searching_ai_status","Searching for AI conversations..."),children:[e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"animate-spin flex-shrink-0",children:e.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),e.jsx("span",{className:"truncate ml-1.5 hidden md:inline",children:p==="ez"?"Searching...":"Searching AI..."})]}),e.jsx("button",{onClick:()=>me(void 0,1),disabled:l||!A.trim(),className:`p-3 text-white rounded-xl hover:shadow-lg transition-all duration-200 active:scale-95 active:shadow-inner disabled:opacity-50 disabled:cursor-not-allowed flex-shrink-0 focus:outline-none focus:ring-2 ${p==="ez"?"bg-gradient-to-br from-[#22c55e] to-[#16a34a] hover:shadow-[#22c55e]/20 focus:ring-[#22c55e]/50":"bg-gradient-to-br from-purple-500 to-purple-600 hover:shadow-
289purple-500/20 focus:ring-purple-500/50"}`,"aria-label":p==="ez"?"Search links":"Search AI conversations","data-tooltip-id":"main-tooltip","data-tooltip-content":A.trim()?p==="ez"?"Search for links":"Search for AI conversations":p==="ez"?"Type something to search":"Type a slug or title to search",children:l?e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:"animate-spin",children:e.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}):e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:"group-hover:scale-105 transition-transform duration-200",children:[e.jsx("circle",{cx:"11",cy:"11",r:"8"}),e.jsx("path",{d:"m21 21-4.3-4.3"})]})})]}),p==="ez"&&k.length>0&&e.jsxs("div",{className:"absolute top-full mt-1 w-full bg-white border border-gray-200 rounded-xl shadow-lg z-50 max-h-60 overflow-y-auto",children:[e.jsx("div",{className:"px-3 py-2 border-b border-gray-100 bg-gray-50",children:e.jsx("span",{className:"text-xs font-medium text-gray-600",children:r("ezbar_suggestions","Suggestions")})}),k.map((s,a)=>e.jsxs("button",{onClick:()=>ia(s),className:"w-full px-4 py-3 text-left hover:bg-gray-50 transition-colors border-b border-gray-100 last:border-b-0 flex items-center space-x-3 focus:outline-none focus:bg-gray-50","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_search_for_suggestion",'Search for "{suggestion}"',{suggestion:s}),children:[e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-400",children:[e.jsx("circle",{cx:"11",cy:"11",r:"8"}),e.jsx("path",{d:"m21 21-4.3-4.3"})]}),e.jsx("span",{className:"text-sm text-gray-700",children:s})]},a))]}),va()]})]}),e.jsxs("div",{className:"lg:col-span-2 w-full",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4 px-1 border-b border-gray-200 pb-3",children:[e.jsx("button",{onClick:()=>{if(!b){G(!0);return}Ct("content")},className:`flex-1 min-w-[100px] sm:flex-none px-3 py-2 text-xs sm:text-sm font-semibold rounded-md transition-colors duration-200 focus:outline-none ${ke==="content"?"bg-[#22c55e] text-white":"text-gray-600 hover:bg-gray-100 border border-transparent hover:border-gray-200"}`,children:e.jsx(ys,{icon:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),e.jsx("line",{x1:"9",y1:"9",x2:"15",y2:"15"}),e.jsx("line",{x1:"15",y1:"9",x2:"9",y2:"15"})]}),label:"Social & Upload",count:Rs.length+Nt.length,locked:!b,active:ke==="content"})}),e.jsx("button",{onClick:()=>{if(!b){G(!0);return}Ct("text")},className:`flex-1 min-w-[100px] sm:flex-none px-3 py-2 text-xs sm:text-sm font-semibold rounded-md transition-colors duration-200 focus:outline-none ${ke==="text"?"bg-[#22c55e] text-white":"text-gray-600 hover:bg-gray-100 border border-transparent hover:border-gray-200"}`,children:e.jsx(ys,{icon:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M12 2a2 2 0 0 1 2 2c0 .74-.4 1.39-1 1.73V7h1a7 7 0 0 1 7 7v8H3v-8a7 7 0 0 1 7-7h1V5.73c-.6-.34-1-1.01-1-1.73a2 2 0 0 1 2-2Z"}),e.jsx("path",{d:"M9 12h6"}),e.jsx("path",{d:"M12 9v6"})]}),label:"Ask AI",locked:!b,active:ke==="text"})})]}),fa(),ke==="content"&&Js(),ke==="text"&&(V?e.jsxs("div",{className:"bg-gray-50 border border-gray-200 rounded-xl p-8 text-center",children:[e.jsx("div",{className:"w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center mx-auto mb-4",children:e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"#9ca3af",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"M12 8v4"}),e.jsx("path",{d:"M12 16h.01"})]})}),e.jsx("p",{className:"text-gray-600 mb-2",children:h?r("ezbar_ai_disabled_user","Ask AI is currently disabled for logged-in users."):r("ezbar_ai_disabled_guest","Ask AI is currently disabled for guests.")}),!h&&e.jsx("button",{onClick:()=>G(!0),className:"inline-block px-6 py-2 bg-[#22c55e] text-white rounded-lg hover:bg-[#16a34a] transition-colors text-sm font-medium","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_login_to_access","Login to access Ask AI"),children:"Login to Access"})]}):e.jsxs("div",{className:"w-full",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3 px-1",children:[e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"text-[#22c55e]",children:e.jsx("path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1-1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z"})}),e.jsx("span",{className:"text-[11px] font-bold text-[#22c55e] uppercase tracking-widest",children:r("ezbar_ask_ai","Ask AI")}),e.jsxs("span",{className:"text-xs text-gray-400 ml-2 hidden sm:inline",children:["⢠",r("ezbar_source_tag","Use @source for sources"),", ",r("ezbar_thinking_mode","#think for thinking mode")," ⢠",h?C.user_char_limit:C.guest_char_limit," char limit ",!h&&`(Login for ${C.user_char_limit})`]})]}),e.jsxs("div",{className:"relative group",children:[e.jsx("div",{className:"absolute top-4 left-0 flex items-start pl-3 md:pl-4 pointer-events-none z-10",children:e.jsx("span",{className:"font-mono text-[10px] md:text-sm font-semibold text-[#22c55e] tracking-tight bg-gradient-to-r from-[#22c55e]/10 to-transparent px-2 py-0.5 rounded-md",children:"AI://"})}),e.jsx("div",{className:"absolute top-4 right-0 flex items-center pr-3 space-x-2 z-20",children:e.jsxs("div",{className:"flex items-center space-x-2 bg-white/90 backdrop-blur-sm px-3 py-1 rounded-lg border border-gray-200 shadow-sm",children:[e.jsx("span",{className:"text-xs font-medium text-gray-700",children:oe.name}),oe.isNew&&e.jsx("span",{className:"text-[9px] font-semibold text-white bg-[#22c55e] px-1.5 py-0.5 rounded-full",children:"NEW"})]})}),e.jsx("textarea",{value:D,onChange:s=>re(s.target.value),onKeyDown:oa,placeholder:r("ezbar_ai_placeholder","Ask AI anything... ({limit} char limit, use @source for sources, #think for thinking mode)",{limit:(h?C.user_char_limit:C.guest_char_limit).toString()}),className:`w-full bg-white border ${R>f?"border-red-300 focus:ring-red-500/30 focus:border-red-500":"border-gray-200 focus:ring-[#22c55e]/30 focus:border-[#22c55e]"} rounded-xl py-3.5 md:py-4 pl-12 md:pl-16 pr-12 md:pr-48 pb-14 md:pb-4 text-sm md:text-base focus:outline-none focus:ring-2 transition-all duration-200 placeholder:text-gray-400 hover:border-gray-300 shadow-sm hover:shadow-md backdrop-blur-sm resize-y min-h-[120px] md:min-
289h-[140px] max-h-[300px] overflow-y-auto`,"aria-label":"Ask AI anything... (Use @source for sources, #think for thinking mode)",rows:4,style:{resize:"vertical"},maxLength:f+100,"data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_ai_placeholder","Ask AI anything... ({limit} char limit, use @source for sources, #think for thinking mode)",{limit:(h?C.user_char_limit:C.guest_char_limit).toString()}),disabled:!b}),e.jsx("div",{className:"absolute bottom-3 left-3 md:left-16 flex items-center space-x-2",children:e.jsxs("div",{className:"flex items-center space-x-2 bg-white/90 backdrop-blur-sm px-2 md:px-3 py-1 md:py-1.5 rounded-lg border border-gray-100 shadow-sm","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_char_count","{current} of {max} characters used",{current:R,max:f}),children:[e.jsx("div",{className:"hidden sm:block w-12 md:w-16 h-1.5 bg-gray-200 rounded-full overflow-hidden",children:e.jsx("div",{className:`h-full ${us().color} transition-all duration-300`,style:{width:us().width}})}),e.jsxs("span",{className:`text-[10px] md:text-xs font-medium ${pa()}`,children:[R.toLocaleString(),"/",f.toLocaleString(),!h&&` (Login for ${C.user_char_limit})`]}),R>f&&e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#ef4444",strokeWidth:"2.5",className:"animate-pulse","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_character_limit_exceeded","Character limit exceeded. {login_message}Maximum is {max}",{max:f,login_message:h?"":r("ezbar_login_for_higher_limit","Login for higher limits. ")}),children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"M12 8v4"}),e.jsx("path",{d:"M12 16h.01"})]})]})}),e.jsxs("div",{className:"absolute bottom-3 right-0 flex items-center pr-3 space-x-1 md:space-x-2",children:[ot&&e.jsxs("div",{className:"flex items-center text-xs text-gray-500 px-2 md:px-3 py-1.5 border border-gray-200 rounded-lg bg-white/80 shadow-sm","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_ai_thinking","AI is processing your request..."),children:[e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"animate-spin flex-shrink-0",children:e.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),e.jsx("span",{className:"ml-1.5 hidden md:inline",children:r("ezbar_ai_thinking_dots","Thinking...")})]}),(it||mt.length>0)&&!ot&&e.jsxs("div",{className:"flex items-center text-xs font-medium text-[#22c55e] px-2 md:px-3 py-1.5 border border-[#22c55e]/20 rounded-lg bg-[#22c55e]/5 shadow-sm","data-tooltip-id":"main-tooltip","data-tooltip-content":je>0?r("ezbar_messages_count","{count} messages in this conversation",{count:je}):r("ezbar_ai_responded","AI has responded"),children:[e.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"flex-shrink-0",children:[e.jsx("path",{d:"m9 12 2 2 4-4"}),e.jsx("path",{d:"M21 12c0 4.97-4.03 9-9 9s-9-4.03-9-9 4.03-9 9-9 9 4.03 9 9Z"})]}),e.jsx("span",{className:"ml-1.5 hidden md:inline",children:je>0?`${je} msgs`:"AI Responded"})]}),e.jsx("button",{onClick:ft,disabled:ot||!D.trim()||R>f||!b,className:"p-3 bg-gradient-to-br from-[#22c55e] to-[#16a34a] text-white rounded-xl hover:shadow-lg hover:shadow-[#22c55e]/20 transition-all duration-200 active:scale-95 active:shadow-inner disabled:opacity-50 disabled:cursor-not-allowed flex-shrink-0 focus:outline-none focus:ring-2 focus:ring-[#22c55e]/50","aria-label":"Ask AI","data-tooltip-id":"main-tooltip","data-tooltip-content":b?R>f?r("ezbar_character_limit_exceeded","Character limit exceeded ({current}/{max}){login_message}",{current:R,max:f,login_message:h?"":r("ezbar_login_for_higher_limit",". Login for higher limits.")}):D.trim()?r("ezbar_ask_ai","Ask AI"):r("ezbar_type_question","Type a question first"):r("ezbar_login_required","Login required to use Ask AI"),children:ot?e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:"animate-spin",children:e.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}):e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:"group-hover:scale-105 transition-transform duration-200",children:[e.jsx("path",{d:"M5 12h14"}),e.jsx("path",{d:"m12 5 7 7-7 7"})]})})]}),R>f&&e.jsx("div",{className:"absolute -bottom-6 left-0 text-xs text-red-500 animate-fadeIn","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_character_limit_exceeded","Character limit is {max}{login_message}",{max:f,login_message:h?"":r("ezbar_login_for_higher_limit",". Login for higher limits.")}),children:r("ezbar_character_limit_exceeded","Character limit exceeded ({current}/{max}){login_message}",{current:R,max:f,login_message:h?"":r("ezbar_login_for_higher_limit",". Login for higher limits.")})}),wa()]}),e.jsx("style",{children:` 290 @keyframes fadeIn { 291 from { opacity: 0; transform: translateY(-5px); } 292 to { opacity: 1; transform: translateY(0); } 293 } 294 .animate-fadeIn { 295 animation: fadeIn 0.2s ease-out; 296 } 297 `})]})),ke==="text"&&e.jsx("div",{className:"flex flex-wrap justify-center gap-3 mt-8 md:mt-10 w-full",children:ua.map(s=>e.jsxs("button",{onClick:()=>ga(s.label),className:"flex items-center space-x-2 px-4 py-2.5 border border-gray-200 rounded-full hover:bg-gray-50 hover:border-gray-300 transition-all duration-200 active:scale-95 text-[13.5px] text-gray-700 shadow-sm hover:shadow focus:outline-none focus:ring-2 focus:ring-gray-200","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_search_for_suggestion",'Search for "{suggestion}"',{suggestion:s.label}),children:[s.icon,e.jsx("span",{className:"font-medium",children:s.label})]},s.id))})]})]}),e.jsx(Bs,{content:y})]})})}),Ae.isOpen&&e.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/50 p-4",children:e.jsxs("div",{className:"bg-white rounded-2xl shadow-2xl max-w-md w-full",children:[e.jsx("div",{className:"px-6 py-4 border-b border-gray-200",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-full bg-[#22c55e]/10 flex items-center justify-center",children:e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#22c55e",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{width:"7",height:"7",x:"3",y:"3",rx:"1"}),e.jsx("rect",{width:"7",height:"7",x:"14",y:"3",rx:"1"}),e.jsx("rect",{width:"7",height:"7",x:"14",y:"14",rx:"1"}),e.jsx("rect",{width:"7",height:"7",x:"3",y:"14",rx:"1"})]})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:r("ezbar_qr_code_title","QR Code")}),e.jsx("p",{className:"text-sm text-gray-500 truncate max-w-[300px]",children:Ae.title})]})]}),e.jsx("button",{onClick:hs,className:"text-gray-400 hover:text-gray-600 transition-colors p-2 hover:bg-gray-100 rounded-lg","aria-label":"Close QR modal","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_close_qr_modal","Close QR modal"),children:e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M18 6 6 18"}),e.jsx("path",{d:"m6 6 12 12"})]})})]})}),e.jsx("div",{className:"p-6",children:e.jsxs("div",{className:"flex flex-col items-center justify-center",children:[e.jsx("div",{className:"mb-4 p-4 bg-white border border-gray-200 rounded-xl shadow-sm",children:e.jsx(Ca,{ref:Rt,value:Ae.url,size:200,level:"H",fgColor:"#22c55e",bgColor:"#ffffff",includeMargin:!0})}),e.jsxs("div",{className:"text-center mb-6",children:[e.jsx("p",{className:"text-sm font-medium text-gray-700 mb-1",children:r("ezbar_scan_to_visit","Scan to visit:")}),e.jsx("p",{className:"text-xs text-gray-500 break-all px-4",children:Ae.url})]}),e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsxs("button",{onClick:ca,className:"px-4 py-2.5 bg-[#22c55e] hover:bg-[#16a34a] text-white font-medium rounded-lg transition-colors flex items-center space-x-2","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_download_qr","Download QR code as PNG"),children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),e.jsx("polyline",{points:"7 10 12 15 17 10"}),e.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}),e.jsx("span",{children:"Download QR"})]}),e.jsx("button",{onClick:hs,className:"px-4 py-2.5 bg-gray-100 hover:bg-gray-200 text-gray-700 font-medium rounded-lg transition-colors","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_close_modal","Close modal"),children:"Close"})]})]})}),e.jsx("div",{className:"px-6 py-3 bg-gray-50 border-t border-gray-200 rounded-b-2xl",children:e.jsx("p",{className:"text-xs text-gray-500 text-center",children:r("ezbar_qr_powered_by","Powered by ezbar.ai ⢠QR codes work with any scanner")})})]})}),Ws&&e.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/50 p-4",children:e.jsxs("div",{className:"bg-white rounded-2xl shadow-2xl max-w-md w-full transform transition-all duration-300 scale-100 opacity-100",children:[e.jsx("div",{className:"px-6 py-5 rounded-t-2xl bg-gradient-to-r from-[#22c55e] to-[#16a34a]",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:"w-14 h-14 roun
297ded-xl bg-white/20 backdrop-blur-sm flex items-center justify-center",children:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2",children:[e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z"}),e.jsx("path",{d:"M12 6v6l4 2"})]})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-xl font-bold text-white",children:r("ezbar_login_required","Login Required")}),e.jsx("div",{className:"flex items-center space-x-2 mt-1",children:e.jsx("span",{className:"px-2 py-0.5 bg-white/30 rounded-full text-xs font-semibold text-white",children:r("ezbar_authentication_needed","Authentication Needed")})})]})]}),e.jsx("button",{onClick:()=>G(!1),className:"text-white/80 hover:text-white transition-colors p-2 hover:bg-white/10 rounded-lg","aria-label":"Close modal","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_close_modal","Close this modal"),children:e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[e.jsx("path",{d:"M18 6 6 18"}),e.jsx("path",{d:"m6 6 12 12"})]})})]})}),e.jsxs("div",{className:"p-6",children:[e.jsxs("div",{className:"mb-6 text-center",children:[e.jsx("div",{className:"w-20 h-20 mx-auto mb-4 bg-yellow-50 rounded-full flex items-center justify-center",children:e.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"#eab308",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"M12 8v4"}),e.jsx("path",{d:"M12 16h.01"})]})}),e.jsx("p",{className:"text-gray-600 mb-2",children:r("ezbar_login_required_message","You need to be logged in to use this feature.")}),e.jsx("p",{className:"text-sm text-gray-500",children:r("ezbar_login_benefits","Login to create content, ask AI, upload files, add comments, and create landing pages.")})]}),e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsxs(yt,{href:"/login",className:"flex-1 px-4 py-3 bg-[#22c55e] hover:bg-[#16a34a] text-white font-medium rounded-xl transition-colors flex items-center justify-center space-x-2","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_login","Log in to your account"),children:[e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[e.jsx("path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"}),e.jsx("polyline",{points:"10 17 15 12 10 7"}),e.jsx("line",{x1:"15",y1:"12",x2:"3",y2:"12"})]}),e.jsx("span",{children:r("ezbar_login","Login")})]}),e.jsxs(yt,{href:"/register",className:"flex-1 px-4 py-3 bg-gray-100 hover:bg-gray-200 text-gray-700 font-medium rounded-xl transition-colors flex items-center justify-center space-x-2","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_create_account","Create a new account"),children:[e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[e.jsx("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),e.jsx("circle",{cx:"12",cy:"7",r:"4"})]}),e.jsx("span",{children:r("ezbar_register","Register")})]})]}),e.jsx("button",{onClick:()=>G(!1),className:"w-full mt-3 px-4 py-2 text-gray-500 hover:text-gray-700 text-sm font-medium transition-colors","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_maybe_later","Maybe Later"),children:r("ezbar_maybe_later","Maybe Later")})]}),e.jsx("div",{className:"px-6 py-3 bg-gray-50 border-t border-gray-200 rounded-b-2xl",children:e.jsxs("p",{className:"text-xs text-gray-500 text-center flex items-center justify-center space-x-1",children:[e.jsx("span",{children:"ð"}),e.jsx("span",{children:r("ezbar_secure_access","Secure access to all features requires authentication")})]})})]})}),Z.isOpen&&e.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/50 p-4",children:e.jsxs("div",{className:"bg-white rounded-2xl shadow-2xl max-w-md w-full transform transition-all duration-300 scale-100 opacity-100",children:[e.jsx("div",{className:`px-6 py-5 rounded-t-2xl bg-gradient-to-r ${Z.iconColor==="purple"?"from-purple-500 to-purple-600":Z.iconColor==="blue"?"from-blue-500 to-blue-600":Z.iconColor==="green"?"from-green-500 to-green-600":"from-orange-500 to-orange-600"}`,children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:"w-14 h-14 roun
297ded-xl bg-white/20 backdrop-blur-sm flex items-center justify-center",children:Z.icon}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-xl font-bold text-white",children:Z.feature}),e.jsxs("div",{className:"flex items-center space-x-2 mt-1",children:[e.jsx("span",{className:"px-2 py-0.5 bg-white/30 rounded-full text-xs font-semibold text-white",children:r("ezbar_coming_soon","Coming Soon")}),e.jsx("span",{className:"text-white/80 text-xs",children:"⢠Pre-alpha"})]})]})]}),e.jsx("button",{onClick:Ot,className:"text-white/80 hover:text-white transition-colors p-2 hover:bg-white/10 rounded-lg","aria-label":"Close modal","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_close_modal","Close this modal"),children:e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M18 6 6 18"}),e.jsx("path",{d:"m6 6 12 12"})]})})]})}),e.jsxs("div",{className:"p-6",children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h4",{className:"text-sm font-semibold text-gray-700 mb-2",children:r("ezbar_whats_coming","⨠What's coming?")}),e.jsx("p",{className:"text-gray-600 leading-relaxed",children:Z.description})]}),e.jsxs("div",{className:"bg-gray-50 rounded-xl p-4 mb-6",children:[e.jsx("h4",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider mb-3",children:r("ezbar_early_preview","Early Preview")}),e.jsxs("div",{className:"space-y-2",children:[Z.feature==="Analytics"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center space-x-2 text-sm text-gray-600","data-tooltip-id":"main-tooltip","data-tooltip-content":"Track clicks and engagement in real-time",children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#22c55e",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"m9 12 2 2 4-4"})]}),e.jsx("span",{children:"Real-time click tracking and analytics"})]}),e.jsxs("div",{className:"flex items-center space-x-2 text-sm text-gray-600","data-tooltip-id":"main-tooltip","data-tooltip-content":"See where your users are coming from",children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#22c55e",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"m9 12 2 2 4-4"})]}),e.jsx("span",{children:"Geographic heatmaps and device insights"})]}),e.jsxs("div",{className:"flex items-center space-x-2 text-sm text-gray-600","data-tooltip-id":"main-tooltip","data-tooltip-content":"Generate and export custom reports",children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#22c55e",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"m9 12 2 2 4-4"})]}),e.jsx("span",{children:"Custom reports and exportable data"})]})]}),Z.feature==="Collections"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center space-x-2 text-sm text-gray-600","data-tooltip-id":"main-tooltip","data-tooltip-content":"Group related conversations together",children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#22c55e",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"m9 12 2 2 4-4"})]}),e.jsx("span",{children:"Create and organize custom collections"})]}),e.jsxs("div",{className:"flex items-center space-x-2 text-sm text-gray-600","data-tooltip-id":"main-tooltip","data-tooltip-content":"Add context to your collections",children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#22c55e",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"m9 12 2 2 4-4"})]}),e.jsx("span",{children:"Add notes, tags, and custom metadata"})]}),e.jsxs("div",{className:"flex items-center space-x-2 text-sm text-gray-600","data-tooltip-id":"main-tooltip","data-tooltip-content":"Collaborate with your team",children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#22c55e",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"m9 12 2 2 4-4"})]}),e.jsx("span",{children:"Share collections with team members"})]})]}),Z.feature==="Bookmarks"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center space-x-2 text-sm text-gray-600","data-tooltip-id":"main-tooltip","data-tooltip-content":"Save your favorite conversations",children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#22c55e",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"m9 12 2 2 4-4"})]}),e.jsx("span",{children:"Save and organize favorite links"})]}),e.jsxs("div",{className:"flex items-center space-x-2 text-sm text-gray-600","data-tooltip-id":"main-tooltip","data-tooltip-content":"Access your bookmarks anyw
297here",children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#22c55e",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"m9 12 2 2 4-4"})]}),e.jsx("span",{children:"Cross-device synchronization"})]}),e.jsxs("div",{className:"flex items-center space-x-2 text-sm text-gray-600","data-tooltip-id":"main-tooltip","data-tooltip-content":"Keep your bookmarks organized",children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#22c55e",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"m9 12 2 2 4-4"})]}),e.jsx("span",{children:"Folder organization and search"})]})]}),Z.feature==="QR Scanner"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center space-x-2 text-sm text-gray-600","data-tooltip-id":"main-tooltip","data-tooltip-content":"Scan QR codes without additional apps",children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#22c55e",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"m9 12 2 2 4-4"})]}),e.jsx("span",{children:"Scan QR codes directly from your browser"})]}),e.jsxs("div",{className:"flex items-center space-x-2 text-sm text-gray-600","data-tooltip-id":"main-tooltip","data-tooltip-content":"Create QR codes for any link",children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#22c55e",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"m9 12 2 2 4-4"})]}),e.jsx("span",{children:"Generate and share QR codes instantly"})]}),e.jsxs("div",{className:"flex items-center space-x-2 text-sm text-gray-600","data-tooltip-id":"main-tooltip","data-tooltip-content":"Keep track of your scanned QR codes",children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#22c55e",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"m9 12 2 2 4-4"})]}),e.jsx("span",{children:"Scan history and quick access"})]})]})]})]}),e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsxs("button",{onClick:()=>{Ot()},className:`flex-1 px-4 py-3 ${Z.iconColor==="purple"?"bg-purple-500 hover:bg-purple-600":Z.iconColor==="blue"?"bg-blue-500 hover:bg-blue-600":Z.iconColor==="green"?"bg-green-500 hover:bg-green-600":"bg-orange-500 hover:bg-orange-600"} text-white font-medium rounded-xl transition-colors flex items-center justify-center space-x-2`,"data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_notify_me","Get notified when this feature launches"),children:[e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:e.jsx("path",{d:"M22 2 11 13M22 2l-7 20-4-9-9-4 20-7z"})}),e.jsx("span",{children:r("ezbar_notify_me","Notify Me")})]}),e.jsx("button",{onClick:Ot,className:"flex-1 px-4 py-3 bg-gray-100 hover:bg-gray-200 text-gray-700 font-medium rounded-xl transition-colors","data-tooltip-id":"main-tooltip","data-tooltip-content":r("ezbar_maybe_later","Maybe Later"),children:r("ezbar_maybe_later","Maybe Later")})]})]}),e.jsx("div",{className:"px-6 py-3 bg-gray-50 border-t border-gray-200 rounded-b-2xl",children:e.jsxs("p",{className:"text-xs text-gray-500 text-center flex items-center justify-center space-x-1",children:[e.jsx("span",{children:"ð§"}),e.jsx("span",{children:r("ezbar_coming_soon_description","We're working hard to bring you this feature. Stay tuned for updates!")})]})})]})}),e.jsx(za,{isOpen:Gs,onClose:()=>At(!1),parentSlug:W||void 0,conversationId:W||void 0,onChildConvoCreated:async(s,a)=>{try{const i=await $.post("/content/comment",{content:s,conversation_id:W,content_type:a||"embed"},{headers:{"X-CSRF-TOKEN":ye()}});i.data.success?(i.data.conversation_messages&&ce(i.data.conversation_messages),i.data.conversation_id&&de(i.data.conversation_id),i.data.comment&&Ke(m=>[...m,i.data.comment]),At(!1),i.data.slug&&Me.visit(`/X/${encodeURIComponent(i.data.slug)}`,{preserveScroll:!1,preserveState:!1})):alert(i.data.message||"Failed to post embed. Please try again.")}catch(i){console.error("Embed comment error:",i),$.isAxiosError(i)&&i.response?alert(i.response.data.message||"Failed to post embed. Please try again."):alert("Failed to post embed. Please try again.")}},onCommentCreated:s=>{Array.isArray(s)&&ce(s)}})]})}export{mr as default};
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.