PageSourceSearch

https://viskits.ai/_next/static/chunks/2428-13a9973d9e1bdf02.js

js viskits.ai collected 2026-10-05 13:36:29 UTC 6,336 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2428],{89188:function(e,t,r){r.d(t,{iE:function(){return o},DK:function(){return l},w2:function(){return m},RC:function(){return y}});var n=r(73667),i=r(40821),a=r(51693);let l=()=>{var e;let{isLoggedIn:t,user:r}=(0,i.a)(),l=null!==(e=null==r?void 0:r.current_organization_id)&&void 0!==e?e:null;return(0,n.useQuery)({queryKey:["shorts-studio","enterprise-cards",l],queryFn:()=>(async()=>(await (0,a.L)().get("/shortform/enterprise-cards")).data)(),enabled:t})};var u=r(92673);let s=e=>null!=e?e:void 0,o=(e,t,r)=>{var n,i,a,l,o;let d=null!==(n=e.translations[t])&&void 0!==n?n:e.translations[u.gk],c=null!==(i=e.minPlanType)&&void 0!==i?i:null,v=(null==r?void 0:r.anonymousViewer)?!!c&&"free"!==c:null!==(a=e.isLocked)&&void 0!==a&&a;return{id:e.cardKey,title:null!==(l=null==d?void 0:d.title)&&void 0!==l?l:"",description:null!==(o=null==d?void 0:d.description)&&void 0!==o?o:"",fileUploadDescription:s(null==d?void 0:d.fileUploadDescription),previewImageSrc:e.previewImageSrc,previewVideoUrl:s(e.previewVideoUrl),route:s(e.route),inputType:s(e.inputType),fileType:s(e.fileType),creditCost:s(e.creditCost),comingSoon:e.comingSoon,maintenance:e.maintenance,category:s(e.category),minPlanType:s(c),isLocked:v,surface:s(e.surface)}};var d=r(39116),c=r(4096);let v=async e=>{let{locale:t,surface:r}=e;return(await (0,a.L)().get("/studio-cards",{params:{locale:t,surface:r}})).data},f=(0,c.r)(["studio-cards"],v),y=e=>{let{locale:t,surface:r=d.XV,enabled:i}=e;return(0,n.useQuery)({...f({locale:t,surface:r}),enabled:null==i||i,staleTime:3e5})},p=async e=>{let{locale:t,previewCategory:r,surface:n}=e;return(await (0,a.L)().get("/studio-cards/me",{params:{locale:t,surface:n,...void 0===r?{}:{preview_category:null!=r?r:""}}})).data},g=(0,c.r)(["studio-cards","me"],p),m=e=>{let{locale:t,previewCategory:r,surface:i=d.XV,enabled:a}=e;return(0,n.useQuery)({...g({locale:t,previewCategory:r,surface:i}),enabled:a,staleTime:0})};r(50306)},72428:function(e,t,r){r.d(t,{dR:function(){return o},nW:function(){return y},oV:function(){return J},IE:function(){return h},H$:function(){return S},yi:function(){return q}});var n=r(2265),i=r(12535),a=r(71463);let l={ko:"Korean",en:"English",ja:"Japanese",zh:"Chinese",vi:"Vietnamese",es:"Spanish"},u=l[a.gk],s=e=>{let t=(0,a.G7)(e);return t?l[t]:u},o=e=>{let{value:t,isTouched:r,onApply:a,enabled:l=!0}=e,{i18n:u}=(0,i.$G)(),o=s(u.language),d=(0,n.useRef)(a);(0,n.useEffect)(()=>{d.current=a}),(0,n.useEffect)(()=>{l&&!r&&t!==o&&d.current(o)},[l,r,o,t])};var d=r(95679),c=r(23804);let v="viskit:analytics:card_impressions",f=(e,t)=>{let r=JSON.stringify([e,t]);try{let e=window.sessionStorage.getItem(v),t=e?JSON.parse(e):[],n=Array.isArray(t)?t.filter(e=>"string"==typeof e):[];if(n.includes(r))return!1;return window.sessionStorage.setItem(v,JSON.stringify([...n.slice(-499),r])),!0}catch(e){return!0}},y=e=>{let t=(0,n.useRef)([]),r=(0,n.useRef)(new Set),i=(0,n.useCallback)((e,r)=>{t.current[e]=r},[]);return(0,n.useEffect)(()=>{let n=r.current,i=[];return t.current.forEach((t,r)=>{var a;if(!t)return;let l=null===(a=e[r])||void 0===a?void 0:a.id;if(!l||n.has(l))return;let u=new IntersectionObserver(e=>{let t=e[0];if((null==t?void 0:t.isIntersecting)&&!n.has(l)){n.add(l);let e=(0,c.lJ)();f(l,e)&&((0,c.et)(l,{card_index:r}),(0,d.n4)("creation.card_impression",{card_key:l,entry_surface:e,card_index:r})),u.disconnect()}},{threshold:.5});u.observe(t),i.push(u)}),()=>i.forEach(e=>e.disconnect())},[e]),{setCardRef:i}};var p=r(89188),g=r(39116),m=r(39281),k=r(92673);let h=function(){var e;let{previewCategory:t,surface:r=g.XV}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{i18n:a}=(0,i.$G)("shorts-studio"),l=null!==(e=(0,k.G7)(a.language))&&void 0!==e?e:k.gk,{isLoggedIn:u}=(0,m.aC)(),s=(0,p.RC)({locale:l,surface:r,enabled:!u}),o=(0,p.w2)({locale:l,previewCategory:t,surface:r,enabled:u}),d=u?o.data:s.data,c=u?o.isLoading:s.isLoading,v=(0,n.useMemo)(()=>{var e;return(null!==(e=null==d?void 0:d.data)&&void 0!==e?e:[]).map(e=>(0,p.iE)(e,l,{anonymousViewer:!u}))},[d,l,u]),f=(0,n.useCallback)(e=>{var t;return null!==(t=v.find(t=>
1t.id===e))&&void 0!==t?t:null},[v]);return{all:v,visible:v,getById:f,isLoading:c}};var w=r(7599),_=r(11267);let b=e=>{let{totalCreditCost:t,currentBalance:r,insufficientFallback:n=!1,isSufficient:i}=e;return void 0!==i?!i:void 0!==r&&void 0!==t?r<t:n},S=e=>{let{totalCreditCost:t,currentBalance:r,insufficientFallback:n=!1,isSufficient:i,requiredCredits:a,usageLabel:l,usageEventLabel:u}=e,{isOwner:s}=(0,_.$_)(),{openUpgradePlanModal:o}=(0,w.wA)();return{isOwner:s,isNotEnoughCredit:b({totalCreditCost:t,currentBalance:r,insufficientFallback:n,isSufficient:i}),handleUpgradePlan:()=>{var e;(0,d.n4)("billing.credit_gate_blocked",{required_credits:null!=a?a:t,current_balance:r,usage_label:null!=u?u:l}),o({mode:"insufficient_credits",requiredCredits:null!==(e=null!=a?a:t)&&void 0!==e?e:0,usageLabel:l})}}};var C=r(47082),E=r(47907),I=r(85876),K=r(90231),T=r(38246);let V=(e,t)=>{let r="tasks"in e?e.tasks.map(e=>e.task_id):[e.task_id];return(0,T.Ak)(r,{source:"generation",sourceLabel:t.title,title:t.title,cardKey:t.cardKey})},q=()=>{let e=(0,E.useRouter)(),t=(0,C.useQueryClient)(),r=(0,K.cG)(e=>e.trackHistoryTasks),[i,a]=(0,n.useState)(null);return{submitError:i,submitAndRoute:async(n,i,l)=>{a(null);try{let i=await n(),a="tasks"in i?i.tasks.map(e=>e.task_id):[i.task_id];r("generation",a),t.invalidateQueries({queryKey:I.en}),t.invalidateQueries({queryKey:I.oM}),t.invalidateQueries({queryKey:I.CC}),e.push(V(i,{title:"webtoon"===l?"웹소설 숏폼":"상품상세 숏폼",cardKey:l}))}catch(e){(0,d.n4)("creation.request_failed",{card_key:l,error_code:(0,d.jp)(e)}),a(i)}}}},N="viskit:shorts-studio:card-preferences:v1",R=()=>{try{let e=window.localStorage.getItem(N);if(!e)return{};let t=JSON.parse(e);return t&&"object"==typeof t&&!Array.isArray(t)?t:{}}catch(e){return{}}},A=e=>{try{window.localStorage.setItem(N,JSON.stringify(e))}catch(e){}},J=function(e,t,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e=>
1void 0!==e,[a,l]=(0,n.useState)(()=>{var n;let a=null===(n=R()[e])||void 0===n?void 0:n[t];return i(a)?a:r});return[a,(0,n.useCallback)(r=>{l(n=>{let i="function"==typeof r?r(n):r,a=R();return A({...a,[e]:{...a[e],[t]:i}}),i})},[e,t])]}}}]);

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.