PageSourceSearch

https://app.sundancetv.com/code/js/chunks/tvLogin.897233cf3716f6d82ccf.js

js sundancetv.com collected 2026-09-24 20:31:15 UTC 7,458 bytes, 3 lines download raw bytes

1(()=>{(function(){try{var _=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:{},c=new _.Error().stack;c&&(_._sentryDebugIds=_._sentryDebugIds||{},_._sentryDebugIds[c]="7991ef17-45aa-4b8c-9268-63b9d01e7687",_._sentryDebugIdIdentifier="sentry-dbid-7991ef17-45aa-4b8c-9268-63b9d01e7687")}catch(e){}})();(self.webpackChunkdice_web=self.webpackChunkdice_web||[]).push([[8956],{2398:((_,c,e)=>{e.d(c,{f:()=>i});var t=e(96540),u=e(15149);const i=()=>(0,t.useContext)(u.u)}),22033:((_,c,e)=>{e.d(c,{K:()=>v});var t=e(38261),u=e(16505),i=e(7846);const v=async g=>{g({type:i.x$}),await u.LV.storageProvider.remove(t.fl),await u.LV.storageProvider.remove(t.SS)}}),27416:((_,c,e)=>{e.d(c,{h:()=>u});var t=e(86364);const u=()=>(0,t.d4)(i=>i.services.session.user.isGuest)}),40164:((_,c,e)=>{e.r(c),e.d(c,{default:()=>H});var t=e(96540),u=e(86364),i=e(56347),v=e(59530),g=e(55474),M=e(45128),m=e(95789),l=e(38261);const y=({from:r,isMandatorySignup:a,onDeviceSubscription:s,hideSignupAndPurchaseSubscriptionFlow:P})=>{const E=new URLSearchParams;E.set(m.O5.from,r);const D=s==="true";return(a||D)&&((D||a&&s===void 0)&&E.set("showPurchase",M.Yo.DISABLED),E.set(l.JK,"true")),P==="true"&&E.set(m.O5.loginOnly,"true"),E.toString()};var U=e(57320),h=e(21975),V=Object.defineProperty,$=Object.defineProperties,p=Object.getOwnPropertyDescriptors,f=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable,A=(r,a,s)=>a in r?V(r,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[a]=s,O=(r,a)=>{for(var s in a||(a={}))b.call(a,s)&&A(r,s,a[s]);if(f)for(var s of f(a))j.call(a,s)&&A(r,s,a[s]);return r},Y=(r,a)=>$(r,p(a));const B=r=>{const{routes:a}=t.useContext(v.P),{tvAuthType:s}=(0,i.g)(),[P,E]=t.useState(void 0),[D,w]=t.useState(void 0),C=s==="signup"&&D!=="true";if(!r.pinSession||r.isAuthenticated)return t.createElement(g.A,Y(O({},r),{setOnDeviceSubscription:E,setHideSignupAndPurchaseSubscriptionFlow:w}));const G=(0,i.tW)(a[h.xW.TV_LOGIN],{}),x=C?`${G}/signup`:G,K=y({from:x,isMandatorySignup:C,onDeviceSubscription:P,hideSignupAndPurchaseSubscriptionFlow:D});return t.createElement(i.rd,{to:{pathname:C?a[h.xW.SIGNUP]:a[h.xW.LOGIN],search:K}})},W=({services:{session:{user:{isGuest:r},pinSession:a}},views:{altAuth:s}})=>({altAuth:s,isAuthenticated:!r&&!!localStorage.getItem(U.US),pinSession:a}),H=(0,u.Ng)(W)(B)}),47625:((_,c,e)=>{e.d(c,{HU:()=>v,K7:()=>M,jZ:()=>m});var t=e(16505),u=e(57320),i=(l=>(l.PIN="/api/v3/token/alt/pin",l))(i||{}),v=(l=>(l.SIGN_IN="SIGN_IN",l.SIGN_UP="SIGN_UP",l))(v||{});const{ENV_CONF:{httpapi:g}}=window,M=l=>t.LV.post(`${g}/api/v3/token/alt/pin/${l}/session`,null),m=(l,y="SIGN_IN")=>{const U=localStorage.getItem(u.US);return t.LV.post(`${g}/api/v3/token/alt/pin/session/${l}`,{refreshToken:U,journey:y})}}),55474:((_,c,e)=>{e.d(c,{A:()=>a,o:()=>W});var t=e(96540),u=e(86364),i=e(56347),v=e(54625),g=e(58562),M=e(90953),m=e(92675),l=e(91645),y=e(59530),U=e(2398),h=e(63492),V=e(84454),$=e(27416),p=e(47625),f=e(16505),b=e(7846),j=e(97407),A=e(22033),O=e(38261),Y=e(21865),B=e(96763),W=(s=>(s[s.BIND=0]="BIND",s[s.LOGIN=1]="LOGIN",s[s.CONFIRM=2]="CONFIRM",s[s.DONE=3]="DONE",s))(W||{});const H=()=>{const[s,P]=t.useState(!1);return t.useEffect(()=>{setTimeout(()=>{P(!0)},1)},[]),t.createElement("div",{className:"alt-auth--success__loader"},t.createElement(h.A,{success:s}))},r=s=>{const{wasAccountRecentlyChecked:P,hasMissingDetails:E,hasOutstandingConsents:D,isLoadingMissingDetails:w}=(0,U.f)(),{setCanSignUp:C}=(0,l.A)(),[G,x]=(0,t.useState)(""),[K,R]=(0,t.useState)(!1),[ot,Z]=(0,t.useState)(!1),[N,S]=(0,t.useState)(s.pinSession?2:0),[Q,z]=(0,t.useState)(""),{pin:rt,altAuthIncorrectPin:ct,enterCodeTv:it,pinLoginEntryTitle:lt,altAuthSuccess:ut,altAuthSuccessSignup:_t,altAuthSuccessLink:dt,continue:Et,anErrorOccured:J}=(0,g.b0)(["pin","signIn","altAuthIncorrectPin","enterCodeTv","pinLoginEntryTitle","altAuthSuccess","altAuthSuccessLink","altAuthSuccessSignup","continue","anErrorOccured"]),F=(0,u.wA)(),T=(0,i.zy)(),vt=(0,$.h)(),{defaultMenuParams:X}=t.useContext(y.P),k=new URLSearchParams(T.search).get(O.JK),gt=k?_t:ut,{LOGO:Pt}=(0,M.U)().settings,q=P&&!w&&!E&&!D;(0,t.useEffect)(()=>{var n;((n=T==null?void 0:T.state)==null?void 0:n.pinStep)===3&&S(3);const o=st();o&&(z(o),et(o))},[T]),(0,t.useEffect)(()=>{const n=async()=>{const o=await f.LV.storageProvider.get(O.fl);if(vt&&o){await(0,A.K)(F);return}o&&N===0&&(S(2),P||R(!0))};N===1&&s.isAuthenticated&&S(2),q&&N===2&&mt(),n()},[N,q,s.isAuthenticated]);const tt=async n=>{n==null||n.preventDefault(),et(Q)},et=async n=>{R(!0),Z(!1);try{const{id:o,meta:{referrer:d,onDeviceRegistration:I,tvProviderRedirectUrl:L,onDeviceSubscription:nt,hideSignupAndPurchaseSubscriptionFlow:at}}=await(0,p.K7)(n);if(L){window.location.href=L;return}C(I!=="true"&&at!=="true"),s.setHideSignupAndPurchaseSubscriptionFlow(at),await f.LV.storageProvider.set(O.fl,o),await f.LV.storageProvider.set(O.SS,d),s.setOnDeviceSubscription(nt),F({type:b.Ul,pinSession:o,referrer:d}),S(1)}catch(o){const d=o.status===404;x(d?ct.value:J.value),B.warn("Failed to create pin session:",o)}finally{R(!1),Z(!0)}},st=()=>new URLSearchParams(T.search).get("pin"),mt=async()=>{R(!0);const n=await f.LV.storageProvider.get(O.fl);try{await(0,p.jZ)(s.pinSession||n,k?p.HU.SIGN_UP:p.HU.SIGN_IN),await(0,A.K)(F),S(3)}catch(o){await(0,A.K)(F),x(J.value),S(0),B.warn("Failed to confirm pin session:",o)}finally{R(!1)}},ft=n=>{const o=n.clipboardData.getData("text");/^\d+$/.test(o)||n.preventDefault()},Ot=n=>{const{key:o}=n;o==="Enter"&&tt(n);const d=(n.ctrlKey||n.metaKey)&&o==="v",I=(n.ctrlKey||n.metaKey)&&o==="a";d||I||/[0-9]|Backspace|Delete|ArrowLeft|ArrowRight/.test(o)||n.preventDefault()},Dt=n=>{var o;switch(n){case 0:return t.createElement(t.Fragment,null,t.createElement(j.LoginHeader,{title:lt.value,logoUrl:Pt}),t.createElement("div",{className:"login-form__form--content login-page__form"},t.createElement("div",{className:"alt-auth login-form"},t.createElement("p",{className:"message"},it.value),t.createElement("form",null,t.createElement("div",{className:"login-form-form--field login-form__field"},t.createElement("label",null,rt.value),t.createElement("input",{autoFocus:!0,className:"alt-auth--input",n
1ame:"pin",type:"text",inputMode:"numeric",pattern:"[0-9]*",value:Q,onChange:d=>z(d.target.value),onPaste:ft,onKeyDown:Ot}),t.createElement(m.$n,{onClick:tt,className:m.k9.PRIMARY,isLoading:K,disabled:K||!Q},t.createElement("span",{className:"btn__label"},Et.value))),t.createElement("div",{className:"input--error"},G)))));case 2:case 3:return t.createElement("div",{className:"login-form__form--content"},t.createElement("div",{className:"alt-auth"},t.createElement("div",{className:"alt-auth--success"},n===2?t.createElement(t.Fragment,null,K&&t.createElement(h.A,null)):t.createElement(t.Fragment,null,t.createElement(H,null),t.createElement("p",null,(o=gt.raw)==null?void 0:o.split("{{link}}").map((d,I,L)=>t.createElement(t.Fragment,{key:I},d,L.length>1&&I!==L.length-1&&t.createElement(v.N_,{to:X==null?void 0:X.to},dt.value))))))));default:return null}};return st()&&!ot?null:t.createElement("div",{className:"fullscreen-login-wrapper login-form tv-login login-page"},t.createElement(V.A,null,t.createElement("div",{className:"login-page__wrapper"},Dt(N))))},a=(0,i.y)(r)})}]);})();
2
3//# sourceMappingURL=tvLogin.897233cf3716f6d82ccf.js.map

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.