PageSourceSearch

https://cling-ai.com/assets/WebViewLandingPage-DRFxulBt.js

js cling-ai.com collected 2026-10-07 03:30:29 UTC 9,428 bytes, 1 lines download raw bytes

1import{a as e}from"./rolldown-runtime-BEU_UCik.js";import{ht as t,j as i}from"./app-bootstrap-2kFCW_6Z.js";import{G as s,H as a,Y as n,s as r,u as o}from"./vendor-react-JhNq9muS.js";import{r as c}from"./vendor-toast-6w3iLsDb.js";import{t as l}from"./homepage-Bp7D-WYU.js";import{Kt as d,Tt as m,Ut as x,jt as p,n as b,x as u,z as g}from"./vendor-ui-CFmqwDoN.js";import{i as w,r as h}from"./vendor-motion-BXVc7PVk.js";import"./analytics-1nNoyuNO.js";import{a as f}from"./core-wGQuajia.js";var v=e(n(),1),y=o();function j(){const e=a(),[n]=s(),{t:o}=i(),j=n.get("source")||"unknown",[N,C]=(0,v.useState)(!1),[k,L]=(0,v.useState)(!1),[z,T]=(0,v.useState)(null),[_,B]=(0,v.useState)(!1),S=function(){const e=navigator.userAgent||navigator.vendor||"";return[/FBAN|FBAV/i,/Instagram/i,/musical_ly|Bytedance|TikTok/i,/Line\//i,/Snapchat/i,/Twitter/i,/MicroMessenger/i,/WebView/i,/\bwv\b/i].some(t=>t.test(e))}(),{data:F}=r({queryKey:t.homepage.content,queryFn:()=>l.getContent(),staleTime:6e5,refetchOnWindowFocus:!1}),O=F?.sections?.faceSwap?.items?.slice(0,6)||[];(0,v.useEffect)(()=>{f("webview_landing_view",{source:j,inWebView:S})},[j,S]);const A=async()=>{f("webview_landing_copy_link",{source:j});const e=window.location.origin;try{await navigator.clipboard.writeText(e),C(!0),c.success(o("webviewLanding.linkCopiedToast","Link copied! Paste in your browser")),setTimeout(()=>C(!1),3e3)}catch{c.error(o("webviewLanding.copyFailedToast","Failed to copy"))}},I=()=>{f("webview_landing_open_browser",{source:j});const e=`intent://${window.location.origin.replace(/^https?:\/\//,"")}#Intent;scheme=https;end`;window.location.href=e,setTimeout(()=>{c(o("webviewLanding.copyPasteBrowserToast",'Tap "Copy Link" and paste in Chrome/Safari'),{duration:5e3,icon:"📋"})},1e3)},U=`https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${encodeURIComponent(window.location.origin)}`;return(0,y.jsxs)("div",{className:"min-h-screen bg-gradient-to-br from-surface-base via-brand-dark/15 to-surface-base",children:[(0,y.jsxs)("div",{className:"relative px-4 pt-12 pb-8 text-center",children:[(0,y.jsx)("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:(0,y.jsx)("div",{className:"absolute top-20 left-1/2 -translate-x-1/2 w-96 h-96 bg-brand/20 rounded-full blur-3xl animate-pulse"})}),(0,y.jsxs)(h.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},className:"relative",children:[(0,y.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-2xl bg-gradient-to-br from-brand to-brand-rose flex items-center justify-center",children:(0,y.jsx)(u,{className:"w-8 h-8 text-white"})}),(0,y.jsx)("h1",{className:"text-3xl font-bold text-white mb-2",children:"Cling AI"}),(0,y.jsx)("p",{className:"text-text-secondary",children:o("webviewLanding.createAmazing","Create amazing AI content")})]})]}),(0,y.jsx)("div",{className:"px-4 pb-6",children:(0,y.jsx)(h.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:"grid grid-cols-2 gap-3",children:O.map((e,t)=>(0,y.jsxs)(h.button,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:.1*t},onClick:()=>(e=>{f("webview_landing_item_click",{source:j,itemId:e.id}),T(e),B(!0)})(e),className:"relative aspect-[3/4] rounded-2xl overflow-hidden group",children:[(0,y.jsx)("img",{src:e.coverUrl||e.videoUrl,alt:e.title||"",className:"absolute inset-0 w-full h-full object-cover transition-transform duration-500 group-hover:scale-110"}),(0,y.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-black/70 via-transparent to-transparent"}),(0,y.jsx)("div",{className:"absolute bottom-3 left-3 right-3",children:(0,y.jsxs)("div",{className:"flex items-center gap-1 text-text-primary text-xs font-medium",children:[(0,y.jsx)(u,{size:12}),(0,y.jsx)("span",{children:o("webviewLanding.createSimilar","Create similar")})]})}),e.videoUrl&&(0,y.jsx)("div",{className:"absolute top-3 right-3 w-8 h-8 rounded-full bg-black/50 flex items-center justify-center",children:(0,y.jsx)("div",{className:"w-0 h-0 border-t-4 border-b-4 border-l-6 border-transparent border-l-white ml-0.5"})})]},e.id||t))})}),(0,y.jsxs)("div",{className:"px-4 pb-8 space-y-4",children:[S&&(0,y.jsxs)(h.div,{initial:{opacity:0,y:20}
1,animate:{opacity:1,y:0},transition:{delay:.4},className:"p-5 bg-gradient-to-br from-brand/20 to-brand-rose/20 border border-brand/30 rounded-2xl space-y-4",children:[(0,y.jsxs)("div",{className:"text-center",children:[(0,y.jsx)("h3",{className:"text-white font-semibold text-lg mb-1",children:o("webviewLanding.getFullExperience","Get Full Experience")}),(0,y.jsx)("p",{className:"text-text-secondary text-sm",children:o("webviewLanding.openBrowserBest","Open in your browser for best results")})]}),(0,y.jsxs)("div",{className:"flex gap-2",children:[(0,y.jsxs)("button",{onClick:A,className:"flex-1 py-3.5 rounded-xl bg-gradient-to-r from-brand to-brand-rose hover:from-brand-light hover:to-brand-rose text-white font-semibold text-sm flex items-center justify-center gap-2 transition-all active:scale-[0.98]",children:[N?(0,y.jsx)(d,{size:16}):(0,y.jsx)(p,{size:16}),N?o("webviewLanding.copied","Copied!"):o("webviewLanding.copyLink","Copy Link")]}),(0,y.jsx)("button",{onClick:()=>L(!0),className:"py-3.5 px-4 rounded-xl bg-surface-card hover:bg-surface-strong text-white transition-colors",children:(0,y.jsx)(g,{size:18})})]}),(0,y.jsxs)("button",{onClick:I,className:"w-full py-3 rounded-xl bg-surface-card hover:bg-surface-strong text-text-secondary text-sm font-medium flex items-center justify-center gap-2 transition-colors",children:[(0,y.jsx)(m,{size:14}),o("webviewLanding.tryOpenBrowser","Try Open in Browser")]})]}),(0,y.jsxs)(h.button,{initial:{opacity:0}
1,animate:{opacity:1},transition:{delay:.5},onClick:()=>{f("webview_landing_continue_app",{source:j}),e("/")},className:"w-full py-4 rounded-xl bg-surface-card hover:bg-surface-strong text-text-secondary text-sm font-medium flex items-center justify-center gap-2 transition-colors",children:[o("webviewLanding.continueBrowsing","Continue Browsing"),(0,y.jsx)(x,{size:16})]})]}),(0,y.jsx)(w,{children:k&&(0,y.jsx)(h.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 bg-black/80 backdrop-blur-sm flex items-center justify-center p-4",onClick:()=>L(!1),children:(0,y.jsxs)(h.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},className:"bg-white rounded-2xl p-6 max-w-xs w-full text-center",onClick:e=>e.stopPropagation(),children:[(0,y.jsx)("h3",{className:"text-gray-900 font-semibold text-lg mb-2",children:o("webviewLanding.scanToOpen","Scan to Open")}),(0,y.jsx)("p",{className:"text-gray-500 text-sm mb-4",children:o("webviewLanding.scanPhoneCamera","Scan with your phone camera to open in browser")}),(0,y.jsx)("img",{src:U,alt:o("webviewLanding.qrCode","QR Code"),className:"w-48 h-48 mx-auto mb-4 rounded-lg"}),(0,y.jsx)("button",{onClick:()=>L(!1),className:"w-full py-3 rounded-xl bg-gray-100 hover:bg-gray-200 text-gray-700 font-medium transition-colors",children:o("common.close","Close")})]})})}),(0,y.jsx)(w,{children:_&&z&&(0,y.jsx)(h.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 bg-black/80 backdrop-blur-sm flex items-end justify-center p-4",onClick:()=>B(!1),children:(0,y.jsxs)(h.div,{initial:{y:100,opacity:0},animate:{y:0,opacity:1},exit:{y:100,opacity:0},className:"bg-gradient-to-br from-surface-strong to-surface-elevated rounded-t-3xl p-6 w-full max-w-lg",onClick:e=>e.stopPropagation(),children:[(0,y.jsx)("button",{onClick:()=>B(!1),className:"absolute top-4 right-4 w-8 h-8 rounded-full bg-surface-card flex items-center justify-center text-text-secondary hover:bg-surface-strong hover:text-white",children:(0,y.jsx)(b,{size:18})}),(0,y.jsxs)("div",{className:"flex gap-4 mb-6",children:[(0,y.jsx)("div",{className:"w-20 h-20 rounded-xl overflow-hidden flex-shrink-0",children:(0,y.jsx)("img",{src:z.coverUrl||z.videoUrl,alt:"",className:"w-full h-full object-cover"})}),(0,y.jsxs)("div",{children:[(0,y.jsx)("h3",{className:"text-white font-semibold mb-1",children:o("webviewLanding.createSimilarContent","Create Similar Content")}),(0,y.jsx)("p",{className:"text-text-secondary text-sm",children:o("webviewLanding.openBrowserFeatures","Open in browser to use AI generation features")})]})]}),(0,y.jsxs)("div",{className:"space-y-3",children:[(0,y.jsxs)("button",{onClick:A,className:"w-full py-4 rounded-xl bg-gradient-to-r from-brand to-brand-rose hover:from-brand-light hover:to-brand-rose text-white font-semibold flex items-center justify-center gap-2 transition-all active:scale-[0.98]",children:[N?(0,y.jsx)(d,{size:18}):(0,y.jsx)(p,{size:18}),N?o("webviewLanding.linkCopied","Link Copied!"):o("webviewLanding.copyLinkToBrowser","Copy Link to Browser")]}),(0,y.jsxs)("div",{className:"flex gap-2",children:[(0,y.jsxs)("button",{onClick:I,className:"flex-1 py-3 rounded-xl bg-surface-card hover:bg-surface-strong text-text-secondary text-sm flex items-center justify-center gap-2 transition-colors",children:[(0,y.jsx)(m,{size:14}),o("webviewLanding.tryOpen","Try Open")]}),(0,y.jsxs)("button",{onClick:()=>L(!0),className:"py-3 px-5 rounded-xl bg-surface-card hover:bg-surface-strong text-text-secondary text-sm flex items-center justify-center gap-2 transition-colors",children:[(0,y.jsx)(g,{size:14}),o("webviewLanding.qrCode","QR Code")]})]})]})]})})})]})}export{j 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.