PageSourceSearch

https://www.castmenow.co/_next/static/chunks/pages/talent/easy-link-31798fc5580b9003.js

js castmenow.co collected 2026-09-30 09:22:12 UTC 13,548 bytes, 11 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6088],{15480:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});/**
2 * @license lucide-react v0.438.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */let l=(0,s(13289).Z)("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},89019:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});/**
7 * @license lucide-react v0.438.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */let l=(0,s(13289).Z)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},76419:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/talent/easy-link",function(){return s(32287)}])},61214:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});var l=s(52322);function a(e){let{existingFiles:t,showAllFiles:s,setShowAllFiles:a}=e;return(0,l.jsxs)("div",{className:"mb-8",children:[(0,l.jsx)("div",{className:"flex items-center justify-between mb-2",children:(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)("h3",{className:"text-xl font-semibold mr-2",children:"Already Uploaded"}),(0,l.jsx)("button",{className:"focus:outline-none",onClick:()=>a(!s),children:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 text-gray-500 transition-transform ".concat(s?"transform rotate-180":""),viewBox:"0 0 20 20",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})})})]})}),s&&(0,l.jsx)("div",{className:"bg-gray-100 rounded-lg p-4 max-w-lg",children:(0,l.jsx)("ul",{className:"space-y-2",children:t.map((e,t)=>(0,l.jsxs)("li",{className:"flex items-center",children:[(0,l.jsx)("span",{className:"bg-green-500 text-white rounded-full w-4 h-4 flex items-center justify-center mr-2",children:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-3 w-3",viewBox:"0 0 20 20",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}),e]},t))})})]})}s(2784)},67236:function(e,t,s){"use strict";s.d(t,{Z:function(){return r}});var l=s(52322),a=s(2784),n=s(14804);function r(e){let{snippet:t,snippetName:s,onSnippetChange:r,onSnippetNameChange:i}=e,[o,c]=(0,a.useState)(!1);return(0,l.jsxs)("div",{className:"mb-8",children:[(0,l.jsxs)("div",{className:"flex items-center mb-2",children:[(0,l.jsx)(n.esY,{className:"text-2xl mr-2"}),(0,l.jsx)("h2",{className:"text-xl mr-2",children:"Copy & Paste"}),(0,l.jsx)("button",{className:"focus:outline-none",onClick:()=>c(!o),children:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 text-gray-500 transition-transform ".concat(o?"transform rotate-180":""),viewBox:"0 0 20 20",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),o&&(0,l.jsxs)("div",{className:"mb-4 max-w-lg",children:[(0,l.jsx)("label",{htmlFor:"snippetName",className:"block mb-2",children:"Title"}),(0,l.jsx)("input",{type:"text",id:"snippetName",value:s,onChange:i,className:"w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 mb-2"}),(0,l.jsx)("label",{htmlFor:"snippet",className:"block mb-2",children:"Paste raw data"}),(0,l.jsx)("textarea",{id:"snippet",rows:5,value:t,onChange:r,className:"w-full border border-gray-300 rounded"})]})]})}},98327:function(e,t,s){"use strict";s.d(t,{Z:function(){return n}});var l=s(52322);s(2784);var a=s(14804);function n(e){let{onFileChange:t}=e;return(0,l.jsxs)("div",{className:"mb-8",children:[(0,l.jsxs)("div",{className:"flex items-center mb-4",children:[(0,l.jsx)(a.GzT,{className:"text-2xl mr-2"}),(0,l.jsx)("h2",{className:"text-xl",children:"Spreadsheets"})]}),(0,l.jsx)("div",{className:"mb-4 max-w-lg",children:(0,l.jsx)("input",{type:"file",id:"file",onChange:t,multiple:!0})})]})}},68741:function(e,t,s){"use strict";var l=s(52322),a=s(2784),n=s(5632),r=s(35374);t.Z=function(){let e=(0,n.useRouter)(),t=(0,r.W)(),[s,i]=(0,a.useState)(""),[o,c]=(0,a.useState)(""),[d,u]=(0,a.useState)(!1),[m,x]=(0,a.useState)(""),[h,p]=(0,a.useState)(e.pathname.includes("/talent")?"talent":"agent");async function f(){let{data:e,error:l}=await t.auth.signInWithPassword({email:s,password:o});!l&&(null==e?void 0:e.user)||(console.error(l),x(l?l.message:"An unexpected error occurred."))}async function g(){var e,l;let{data:a,error:n}=await t.auth.signUp({email:s,password:o});if(n)console.error(n),x(n.message);else if((null==a?void 0:null===(l=a.user)||void 0===l?void 0:null===(e=l.identities)||void 0===e?void 0:e.length)===0)x("You already have an account. Please log in instead.");else if(null==a?void 0:a.user){let{error:e}=await t.auth.updateUser({data:{user_type:h}});if(e){console.error(e),x(e.message);return}console.log("Signup successful: ".concat(JSON.stringify(a.user)))}}let v=e=>{p(e)};return(0,l.jsx)("div",{className:"fixed bottom-0 left-0 right-0 bg-white/80 backdrop-blur-md border-t-2 border-blue-600 py-6 flex flex-col items-center justify-center z-10",style:{height:"45vh"},children:(0,l.jsxs)("div",{className:"w-full max-w-sm mx-auto",children:[(0,l.jsxs)("h2",{className:"text-lg font-semibold mb-4 text-center",children:[d?"Log In":"Sign Up"," for Complete Access"]}),m&&(0,l.jsx)("div",{className:"text-red-500 text-center mb-2",children:m}),(0,l.jsx)("input",{type:"email",placeholder:"Email",value:s,onChange:e=>i(e.target.value),className:"w-full p-2 border-2 rounded-md mb-2 text-sm text-black",required:!0}),(0,l.jsx)("input",{type:"password",placeholder:"Password",value:o,onChange:e=>c(e.target.value),className:"w-full p-2 border-2 rounded-lg mb-4 text-sm text-black",required:!0}),!d&&(0,l.jsx)("div",{className:"mb-4 w-full",children:(0,l.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,l.jsxs)("label",{className:"flex items-center p-2 border-2 rounded-md cursor-pointer ".concat("agent"===h?"bg-blue-900 text-white":"bg-white text-black"),onClick:()=>v("agent"),children:[(0,l.jsx)("input",{type:"radio",value:"agent",checked:"agent"===h,onChange:e=>p(e.target.value),className:"form-radio hidden"}),(0,l.jsx)("span",{children:"Agent"})]}),(0,l.jsxs)("label",{className:"flex items-center p-2 border-2 rounded-md cursor-pointer ".concat("talent"===h?"bg-blue-900 text-white":"bg-white text-black"),onClick:()=>v("talent"),children:[(0,l.jsx)("input",{type:"radio",value:"talent",checked:"talent"===h,onChange:e=>p(e.target.value),className:"form-radio hidden"}),(0,l.jsx)("span",{children:"Unrepped Talent"})]})]})}),(0,l.jsx)("button",{onClick:()=>
11{if(d)f();else{if(!h){x("Please select whether you are an agent or talent.");return}g()}},className:"w-full py-2 text-white rounded-lg bg-blue-900 hover:bg-blue-700 transition-colors text-sm",children:d?"Log In":"Sign Up"}),(0,l.jsx)("div",{onClick:()=>{u(!d),x("")},className:"mt-4 text-center text-sm cursor-pointer hover:underline",children:d?"Not a user? Sign up":"Already a user? Log in"})]})})}},32287:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return g}});var l=s(52322),a=s(2784),n=s(41982),r=s(5632),i=s(68741),o=s(236),c=s(14804),d=s(78417),u=s(80854);s(12176);var m=s(98327),x=s(67236),h=s(61214),p=s(53666),f=s(35374);function g(){let[e,t]=(0,a.useState)(null),[s,g]=(0,a.useState)(""),[v,j]=(0,a.useState)(""),[b,w]=(0,a.useState)(!1),[N,y]=(0,a.useState)([]),[k,C]=(0,a.useState)(!0),[S,_]=(0,a.useState)(null),{userId:P}=(0,n.a)(),Z=(0,r.useRouter)(),E=(0,f.W)();(0,a.useEffect)(()=>{let e=async()=>{if(P)try{let e=await fetch("/api/uploaded-data?userId=".concat(P));if(!e.ok){console.error("Error fetching existing files:",e.status);return}let t=await e.json(),s=[];t.spreadsheets_data&&s.push(...Object.values(t.spreadsheets_data).map(e=>e.name.split("/").pop())),t.copypaste_data&&s.push(...Object.values(t.copypaste_data).map(e=>(null==e?void 0:e.name)||"")),y(s)}catch(e){console.error("Error fetching existing files:",JSON.stringify(e))}},t=async()=>{if(P)try{let e=await fetch("/api/linked-accounts?userId=".concat(P));if(!e.ok){console.error("Error fetching linked platforms:",e.status);return}let t=await e.json();_(t.externalPlatforms)}catch(e){console.error("Error fetching linked platforms:",e)}};void 0!==P&&(e(),t())},[P]);let A=async()=>{if((!e||0===e.length)&&!v){alert("No files selected or snippet provided");return}if(console.log("Uploading:",e),s&&!v||!s&&v){alert("Please provide title and content for the snippet");return}let l=[".xls",".xlsx",".csv"],a=e?e.filter(e=>{let t=e.name.split(".").pop().toLowerCase();return!l.includes(".".concat(t))}):[];if(a.length>0){let e=a.map(e=>e.name.split(".").pop().toLowerCase());console.log("Invalid files:",a.map(e=>e.name)),alert("Invalid file type. Please upload only spreadsheet files (.xls, .xlsx, .csv). Your files have these extensions: ".concat(e.join(", ")));return}let n=e?e.filter(e=>!N.some(t=>t.includes(e.name))):[];if(0===n.length){if(e){alert("All selected files have already been uploaded."),t(null);return}if(!s||""===v){alert("No new files selected or snippet provided");return}}w(!0);try{let e=[];n.length>0&&(e=await Promise.all(n.map(async e=>{let{data:t,error:s}=await E.storage.from("spreadsheets").upload("".concat(P,"/").concat(e.name),e);if(s)throw console.error("Error uploading file:",s),s;return t.path})),console.log("Files uploaded:",e));let l={spreadsheets:e,gdrive_data:null,dropbox_data:null,copypaste_data:null};s&&""!=v&&(l.copypaste_data={name:v,content:s});let a=await fetch("/api/uploaded-data?userId=".concat(P),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});if(!a.ok)throw Error("Error calling importdata API");let r=await a.json();console.log("Import successful:",r),w(!1),t(null),g(""),j(""),y([...N,...e]),alert("Data imported successfully"),Z.reload()}catch(e){console.error("Error importing data:",e),w(!1),alert("An error occurred while importing data. Please try again.")}};return P?(0,l.jsxs)("div",{className:"pt-4 bg-white overflow-hidden",children:[(0,l.jsxs)("div",{className:"max-w-7xl mx-auto",children:[(0,l.jsx)(o.Z,{specific:["castingnetworks","actorsaccess"]}),(0,l.jsxs)("div",{className:"mb-8",children:[(0,l.jsx)("h2",{className:"text-2xl font-semibold mb-4",children:"Email and Calendar"}),(0,l.jsxs)("div",{className:"flex space-x-4",children:[(0,l.jsx)(u.ZP,{content:"Coming soon",children:(0,l.jsxs)("div",{className:"flex items-center px-6 py-3 bg-gray-200 rounded-lg text-xl text-gray-400 cursor-not-allowed",children:[(0,l.jsx)(d.IeF,{className:"text-xl mr-2"}),"Gmail"]})}),(0,l.jsx)(u.ZP,{content:"Coming soon",children:(0,l.jsx)("div",{className:"flex items-center px-6 py-3 bg-gray-200 rounded-lg text-xl text-gray-400 cursor-not-allowed",children:"Outlook"})})]})]}),(0,l.jsxs)("div",{className:"mb-8",children:[(0,l.jsx)("h2",{className:"text-2xl font-semibold mb-4",children:"File Store"}),(0,l.jsxs)("div",{className:"flex space-x-4",children:[(0,l.jsx)(u.ZP,{content:"Coming soon",children:(0,l.jsxs)("div",{className:"flex items-center text-gray-400 cursor-not-allowed",children:[(0,l.jsx)(c.dv9,{className:"text-2xl mr-2"}),(0,l.jsx)("h2",{className:"text-xl",children:"Google Drive"})]})}),(0,l.jsx)(u.ZP,{content:"Coming soon",children:(0,l.jsxs)("div",{className:"flex items-center text-gray-400 cursor-not-allowed",children:[(0,l.jsx)(c.$_M,{className:"text-2xl mr-2"}),(0,l.jsx)("h2",{className:"text-xl",children:"Dropbox"})]})})]})]}),(0,l.jsxs)("div",{className:"mb-8",children:[(0,l.jsx)("h2",{className:"text-2xl font-semibold mb-4",children:"Documents"}),(0,l.jsx)(m.Z,{onFileChange:e=>{t(Array.from(e.target.files))}}),(0,l.jsx)(x.Z,{snippet:s,onSnippetChange:e=>{g(e.target.value)},snippetName:v,onSnippetNameChange:e=>{j(e.target.value)}})]}),(0,l.jsx)("button",{onClick:A,className:"flex justify-center items-center px-5 py-2 text-lg font-semibold text-white bg-blue-800 hover:bg-blue-700 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50 transition duration-150 ease-in-out mb-12 w-full sm:w-auto",disabled:b,children:b?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("svg",{className:"animate-spin h-5 w-5 mr-3",viewBox:"0 0 24 24",children:[(0,l.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,l.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4,12a8,8,0,1,1,16,0A8,8,0,1,1,4,12"})]}),"Importing..."]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6 mr-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})}),"Upload"]})}),N.length>0&&(0,l.jsx)(h.Z,{existingFiles:N,showAllFiles:k,setShowAllFiles:C})]}),!P&&(0,l.jsx)(i.Z,{})]}):(0,l.jsx)(p.Z,{})}}}
11,function(e){e.O(0,[5647,3610,9140,9644,6555,5815,6696,4224,2888,9774,179],function(){return e(e.s=76419)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.