1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d3ee24ee-7fe2-5bdb-9713-5acad6bdc8ff")}catch(e){}}(); 3import{a as v}from"./chunk-YPKLVTU3.js";import{a as j,b as W,c as z}from"./chunk-SV7L5NK2.js";import{a as q}from"./chunk-2J5ERXAY.js";import{U}from"./chunk-I3BS37QD.js";import{B as L,M as x,N as Q,a as V,l as k,q as A,r as N,s as B,w as G}from"./chunk-PIKLN56W.js";import{t as M}from"./chunk-WPHXQ7R6.js";import{Ab as f,Cb as p,Gb as y,Hb as D,Ib as E,Ka as d,Ob as c,Qb as O,Ub as R,Ya as P,ba as o,ga as m,ha as C,jb as h,kb as _,pb as g,qb as r,ra as w,rb as u,xb as F}from"./chunk-IUTWKA55.js";var H=["codeInputRef"];function J(n,a){if(n&1&&(r(0,"b"),c(1),u()),n&2){let s,i=p();d(),O(" ",(s=i.tokenService.userInfo())==null?null:s.mobile," ")}}function K(n,a){if(n&1){let s=F();r(0,"div",2)(1,"code-input",4,0),f("codeChanged",function(e){m(s);let t=p();return C(t.onCodeChanged(e))})("codeCompleted",function(e){m(s);let t=p();return C(t.onCodeCompleted(e))}),u(),r(3,"div",5)(4,"span"),c(5,"\u06A9\u062F \u0627\u0631\u0633\u0627\u0644 \u0634\u062F\u0647 \u0631\u0627 \u0648\u0627\u0631\u062F \u06A9\u0646\u06CC\u062F"),u(),r(6,"app-countdown-timer",6),f("RaiseExpiredTime",function(e){m(s);let t=p();return C(t.handleExpiredTime(e))}),u()()()}n&2&&(d(),g("isCharsCode",!0)("codeLength",5))}var de=(()=>{let a=class a{constructor(){this.tokenService=o(U),this.generalService=o(V),this.userService=o(v),this.dialogRef=o(A),this.toast=o(Q),this.authService=o(q),this.codeInput=new L("",[G.required]),this.expiredTime=w(!1),this.data=o(N),this.dialogConfig=o(B),this.dialogConfig.panelClass="confirm-parental-panel"}ngOnViewInit(){this.expiredTime()||this.codeInputRef.focusOnField(0)}onCodeChanged(i){this.codeInput.patchValue(i)}onCodeCompleted(i){this.codeInput.patchValue(i),this.submitCode()}handleExpiredTime(i){i&&this.expiredTime.set(!0)}resendCode(){this.userService.selectProfile(this.data.profileId).subscribe({next:i=>{var e,t;this.expiredTime.set(!1),this.toast.show((t=(e=i.data)==null?void 0:e.selectProfile)==null?void 0:t.message)}})}submitCode(){let i=this.authService.convertNumbers(this.codeInput.value);if(Number.isNaN(+i)){this.toast.show("\u06A9\u062F \u0648\u0627\u0631\u062F \u0634\u062F\u0647 \u0645\u0639\u062A\u0628\u0631 \u0646\u06CC\u0633\u062A",x.error),this.codeInputRef.reset(),this.codeInput.reset();return}this.userService.confirmParentalCode(this.data.profileId,this.codeInput.value).subscribe({next:e=>{var t,l,I,T,S,b;((l=(t=e.data)==null?void 0:t.selectProfile)==null?void 0:l.statusCode)===M.Ok?(this.generalService.router.navigateByUrl("/"),this.tokenService.setUserInfo((T=(I=e.data)==null?void 0:I.selectProfile.data)==null?void 0:T.atk,(b=(S=e.data)==null?void 0:S.selectProfile.data)==null?void 0:b.rtk),this.dialogRef.close(!0)):(this.codeInputRef.reset(),this.codeInput.reset())},error:e=>{this.dialogRef.close(!1),this.toast.show(e.cause.message,x.error)}})}};a.\u0275fac=function(e){return new(e||a)},a.\u0275cmp=P({type:a,selectors:[["app-confirm-parental-control-dialog"]],viewQuery:function(e,t){if(e&1&&y(H,5),e&2){let l;D(l=E())&&(t.codeInputRef=l.first)}},features:[R([v])],decls:10,vars:5,consts:[["codeInputRef",""],[1,"hint-description"],[1,"code-input-section"],["Type","button","Text","\u0627\u0631\u0633\u0627\u0644 \u0645\u062C\u062F\u062F",1,"resend-code",3,"Click","Disabled","IsButton","FullWidth"],["dir","ltr",3,"codeChanged","codeCompleted","isCharsCode","codeLength"],[1,"hint-box"],[3,"RaiseExpiredTime"]],template:function(e,t){e&1&&(r(0,"h2"),c(1,"\u062A\u0627\u06CC\u06CC\u062F"),u(),r(2,"div",1)(3,"span"),c(4,"\u0628\u0631\u0627\u06CC \u0648\u0631\u0648\u062F \u0628\u0647 \u067E\u0631\u0648\u0641\u0627\u06CC\u0644 \u0628\u0632\u0631\u06AF\u0633\u0627\u0644 \u060C \u06A9\u062F \u0627\u0631\u0633\u0627\u0644\u06CC \u0628\u0647 \u0634\u0645\u0627\u0631\u0647 "),u(),h(5,J,2,1,"b"),r(6,"span"),c(7,"\u0631\u0627 \u0648\u0627\u0631\u062F \u0646\u0645\u0627\u06CC\u06CC\u062F"),u()(),h(8,K,7,2,"div",2),r(9,"app-button",3),f("Click",function(){return t.resendCode()}
3),u()),e&2&&(d(5),_(t.tokenService.userInfo()?5:-1),d(3),_(t.expiredTime()?-1:8),d(),g("Disabled",!t.expiredTime())("IsButton",!0)("FullWidth",!0))},dependencies:[z,W,j,k],styles:[".confirm-parental-panel{max-width:400px!important}h2[_ngcontent-%COMP%]{font-family:var(--font-name);font-size:1.4rem;color:var(--primary-text-color)}.hint-description[_ngcontent-%COMP%]{margin-bottom:1rem;line-height:2rem}.code-input-section[_ngcontent-%COMP%] .hint-box[_ngcontent-%COMP%]{margin-top:8px;display:flex;justify-content:space-between}.code-input-section[_ngcontent-%COMP%] .hint-box[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--warning-text-color)}.resend-code[_ngcontent-%COMP%]{margin-top:32px}"]});let n=a;return n})();export{de as a}; 4 5//# debugId=d3ee24ee-7fe2-5bdb-9713-5acad6bdc8ff
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.