PageSourceSearch

https://www.finkup.com/chunk-YZZDGPEO.js

js finkup.com collected 2026-10-01 16:24:09 UTC 29,389 bytes, 1 lines download raw bytes

1import{a as V}from"./chunk-K7I3NUTS.js";import{b as Z,c as T,d as tt,e as et,g as it,h as nt,j as ot,k as at,l as rt,m as lt,n as st,o as dt,p as ct,q as _t,r as mt,t as pt}from"./chunk-OLPMHHQL.js";import{a as ft}from"./chunk-LT5Y5W4S.js";import{a as Ct}from"./chunk-LWI2T52I.js";import{a as ut}from"./chunk-464LDXFN.js";import{a as Y}from"./chunk-6GU522YJ.js";import{a as X}from"./chunk-Z43V3MNR.js";import"./chunk-GQPFO575.js";import{a as K}from"./chunk-4UKK7RHX.js";import{e as Q,g as J}from"./chunk-U2UE3HJQ.js";import{f as G,h as z,i as U,m as j,s as W}from"./chunk-CTEVSRK4.js";import{Ab as a,Bb as C,Ca as L,Cb as D,Db as S,Fb as k,Jb as h,Kb as o,Sa as N,Ta as M,Ub as c,Vb as w,Wb as v,Xa as $,_a as s,ba as b,da as P,fc as q,hc as R,kc as H,lc as B,na as g,nb as m,oa as y,qb as d,ub as F,vb as I,xb as A,yb as O,zb as l}from"./chunk-XNPI5QDC.js";import{a as E}from"./chunk-EQDQRRRY.js";var xt=e=>({active:e});function gt(e,i){e&1&&(l(0,"div",1),C(1,"div",2),a())}function yt(e,i){e&1&&C(0,"span",15)}function vt(e,i){e&1&&(l(0,"div",17),c(1,"Please enter pin code."),a())}function bt(e,i){e&1&&(l(0,"div",17),c(1,"Please enter valid pin code."),a())}function Dt(e,i){if(e&1&&(l(0,"div"),m(1,vt,2,0,"div",16)(2,bt,2,0,"div",16),a()),e&2){let t=o(3);s(),d("ngIf",t.a.pinCode.errors.required),s(),d("ngIf",!t.a.pinCode.errors.required&&t.a.pinCode.errors.invalidZip)}}function St(e,i){if(e&1&&(l(0,"div",17),c(1),a()),e&2){let t=o(4);s(),w(t.pinError)}}function kt(e,i){if(e&1&&(l(0,"div",19),c(1),a()),e&2){let t=o(4);s(),w(t.pinMessage)}}function Ft(e,i){if(e&1&&(l(0,"div"),m(1,St,2,1,"div",16)(2,kt,2,1,"div",18),a()),e&2){let t=o(3);s(),d("ngIf",t.pinError),s(),d("ngIf",t.pinMessage)}}function Tt(e,i){e&1&&(l(0,"span",17),c(1,"Enter Address Line 1"),a())}function Et(e,i){e&1&&(l(0,"span",17),c(1,"Minimum 5 characters required.No special character allowed."),a())}function wt(e,i){if(e&1&&(l(0,"div"),m(1,Tt,2,0,"span",16)(2,Et,2,0,"span",16),a()),e&2){let t=o(5);s(),d("ngIf",t.a.address1.errors.required),s(),d("ngIf",!t.a.address1.errors.required&&t.a.address1.errors.invalidAddress)}}function It(e,i){e&1&&(l(0,"span",17),c(1,"Enter Address"),a())}function At(e,i){if(e&1&&(l(0,"div"),m(1,It,2,0,"span",16),a()),e&2){let t=o(5);s(),d("ngIf",t.a.address2.errors.required)}}function Ot(e,i){e&1&&(l(0,"span",17),c(1,"Enter landmark"),a())}function Nt(e,i){if(e&1&&(l(0,"div"),m(1,Ot,2,0,"span",16),a()),e&2){let t=o(5);s(),d("ngIf",t.a.landmark.errors.required)}}function Vt(e,i){e&1&&(D(0),l(1,"span",17),c(2,"Please select country"),a(),S())}function Pt(e,i){if(e&1&&(D(0),m(1,Vt,3,0,"ng-container",14),S()),e&2){let t=o(5);s(),d("ngIf",t.a.country.errors.required)}}function Lt(e,i){e&1&&(D(0),l(1,"span",17),c(2,"Please select state"),a(),S())}function Mt(e,i){if(e&1&&(D(0),m(1,Lt,3,0,"ng-container",14),S()),e&2){let t=o(5);s(),d("ngIf",t.a.state.errors.required)}}function $t(e,i){e&1&&(D(0),l(1,"span",17),c(2,"Please select city"),a(),S())}function qt(e,i){if(e&1&&(D(0),m(1,$t,3,0,"ng-container",14),S()),e&2){let t=o(5);s(),d("ngIf",t.a.city.errors.required)}}function Rt(e,i){e&1&&C(0,"span",15)}function Ht(e,i){if(e&1){let t=k();l(0,"div",20)(1,"input",21),h("change",function(){g(t);let r=o(4);return y(r.selectedAddressType="HOME")}),a(),l(2,"label",22),c(3," Home "),a(),l(4,"input",23),h("change",function(){g(t);let r=o(4);return y(r.selectedAddressType="WORK")}),a(),l(5,"label",24),c(6," Work "),a()(),l(7,"div",7)(8,"label",8),c(9,"Address Line 1 "),l(10,"span",9),c(11," *"),a()(),C(12,"input",25),m(13,wt,3,2,"div",14),a(),l(14,"div",7)(15,"label",8),c(16,"Address Line 2"),a(),C(17,"input",26),m(18,At,2,1,"div",14),a(),l(19,"div",7)(20,"label",8),c(21,"Enter Landmark"),a(),C(22,"input",27),m(23,Nt,2,1,"div",14),a(),l(24,"div",7)(25,"label",8),c(26,"Country "),l(27,"span",9),c(28,"*"),a()(),C(29,"input",28),m(30,Pt,2,1,"ng-container",14),a(),l(31,"div",7)(32,"label",8),c(33,"State "),l(34,"span",9),c(35,"*"),a()(),C(36,"input",29),m(37,Mt,2,1,"ng-container",14),a(),l(38,"div",7)(39,"label",8),c(40,"City "),l(41,"span",9),c(42,"*"),a()(),C(43,"input",30),m(44,qt,2,1,"ng-container",14),a(),l(45,"div",31)(46,"button",32),m(47,Rt,1,0,"span",13),c(48," Save Address "),a()()}if(e&2){let t=o(4);s(),d("checked",t.selectedAddressType=="HOME"),s(3),d("checked",t.selectedAddressType=="WORK"),s(9),d("ngIf",t.a.address1.errors&&(t.a.address1.dirty||t.a.address1.touched)),s(5),d("ngIf",t.a.address2.errors&&(t.a.address2.dirty||t.a.address2.touched)),s(5),d("ngIf",t.a.landmark.errors&&(t.a.landmark.dirty||t.a.landmark.touched)),s(7),d("ngIf",t.a.country.errors&&(t.a.country.dirty||t.a.country.touched)),s(7),d("ngIf",t.a.state.errors&&(t.a.state.dirty||t.a.state.touched)),s(7),d("ngIf",t.a.city.errors&&(t.a.city.dirty||t.a.city.touched)),s(2),d("disabled",t.isSubmitLoading),s(),d("ngIf",t.isSubmitLoading)}}function Bt(e,i){if(e&1){let t=k();l(0,"div",20)(1,"input",21),h("change",function(){g(t);let r=o(4);return y(r.selectedAddressType="BOX_OFFICE")}),a(),l(2,"label",22),c(3," Pickup from Box-Office "),a()(),l(4,"div",31)(5,"button",33),h("click",function(){g(t);let r=o(4);return y(r.submitWithotAddress())}),c(6," Continue without address "),a()()}if(e&2){let t=o(4);s(),d("checked",t.selectedAddressType=="BOX_OFFICE")}}function Gt(e,i){if(e&1&&m(0,Ht,49,10)(1,Bt,7,1),e&2){let t=o(3);F(t.isPincodeDeliverable?0:1)}}
1function zt(e,i){if(e&1){let t=k();l(0,"form",5),h("ngSubmit",function(){g(t);let r=o(2);return y(r.submitAddress())}),l(1,"div",6),c(2," Ticket Address "),a(),l(3,"div",7)(4,"label",8),c(5,"Enter Pin Code "),l(6,"span",9),c(7,"*"),a()(),l(8,"div",10)(9,"input",11),h("keypress",function(r){g(t);let _=o(2);return y(_.numberOnly(r))}),a(),l(10,"button",12),h("click",function(){g(t);let r=o(2);return y(r.checkCode())}),m(11,yt,1,0,"span",13),c(12," Check "),a()(),m(13,Dt,3,2,"div",14)(14,Ft,3,2,"div",14),a(),m(15,Gt,2,1),a()}if(e&2){let t=o(2);d("formGroup",t.addressForm),s(9),d("maxlength",6),s(),d("disabled",t.checkPincodeLoading),s(),d("ngIf",t.checkPincodeLoading),s(2),d("ngIf",t.a.pinCode.errors&&(t.a.pinCode.dirty||t.a.pinCode.touched)),s(),d("ngIf",t.isPinChecked),s(),F(t.isPinChecked?15:-1)}}function Ut(e,i){if(e&1){let t=k();l(0,"div",39),h("click",function(){g(t);let r=o().index,_=o(3);return y(_.showCustomFormIndex=r)}),l(1,"div",40)(2,"div",41)(3,"div",42),c(4),a(),l(5,"div",43),c(6),a()(),C(7,"div",44),a()()}if(e&2){let t=o().index,n=o(3);s(4),v(" Attendee ",t+1," Details "),s(2),v(" ",n.ticketClassData[t]==null?null:n.ticketClassData[t].className," "),s(),d("innerHTML",n.icons.edit,N)}}function jt(e,i){e&1&&(l(0,"span",9),c(1,"*"),a())}function Wt(e,i){if(e&1&&C(0,"input",49),e&2){let t=o().$implicit;d("placeholder","Enter "+(t==null?null:t.displayName))("formControlName",t==null?null:t.displayName)}}function Qt(e,i){if(e&1&&C(0,"textarea",50),e&2){let t=o().$implicit;d("placeholder","Enter "+t.displayName)("formControlName",t==null?null:t.displayName)}}function Jt(e,i){if(e&1&&C(0,"input",51),e&2){let t=o().$implicit;d("placeholder","Enter "+(t==null?null:t.displayName))("formControlName",t==null?null:t.displayName)}}function Xt(e,i){if(e&1&&C(0,"input",52),e&2){let t=o().$implicit;d("placeholder","Enter "+(t==null?null:t.displayName))("formControlName",t==null?null:t.displayName)}}function Kt(e,i){if(e&1&&(C(0,"div",60),l(1,"div",61),c(2),a(),l(3,"div",62),c(4," (.PNG,.JPEG) "),a()),e&2){let t=o(2).$implicit,n=o(5);d("innerHTML",n.icons.image,N),s(2),v(" Upload ",t==null?null:t.displayName," ")}}function Yt(e,i){if(e&1&&C(0,"img",59),e&2){let t,n=o(2).$implicit,r=o(2).index,_=o(3);d("src",(t=_.getTicketControl(r,n.displayName))==null?null:t.value,M)}}function Zt(e,i){if(e&1){let t=k();l(0,"label",53)(1,"input",58,0),h("change",function(r){g(t);let _=o().$implicit,p=o(2).index,u=o(3);return y(u.onFileSelected(r,u.getTicketControl(p,_.displayName)))}),a(),m(3,Kt,5,2)(4,Yt,1,1,"img",59),a()}if(e&2){let t,n,r=o().$implicit,_=o(2).index,p=o(3);d("ngClass",R(3,xt,((t=p.getTicketControl(_,r.displayName))==null?null:t.value)!==null)),s(),d("placeholder","Enter "+r.displayName),s(2),F(((n=p.getTicketControl(_,r.displayName))==null?null:n.value)==null?3:4)}}function te(e,i){if(e&1&&(l(0,"option",65),c(1),a()),e&2){let t=i.$implicit;d("value",t),s(),w(t)}}function ee(e,i){if(e&1&&(l(0,"select",54)(1,"option",63),c(2),a(),m(3,te,2,2,"option",64),a()),e&2){let t=o().$implicit;d("formControlName",t==null?null:t.displayName),s(),d("value",null),s(),v("Select ",t.displayName,""),s(),d("ngForOf",t.fieldOptionData)}}function ie(e,i){if(e&1){let t=k();l(0,"div",66)(1,"input",67),h("change",function(){let r=g(t).$implicit,_=o(2).$implicit,p=o(2).index,u=o(3);return y(u.onRadioChange(p,_.displayName,r))}),a(),l(2,"label",68),c(3),a()()}if(e&2){let t,n=i.$implicit,r=i.$index,_=o(2),p=_.$implicit,u=_.$index,f=o(2).index,x=o(3);s(),d("id",x.getFieldOptionId(f,u,r))("checked",((t=x.getTicketControl(f,p.displayName))==null?null:t.value)===x.getFieldOptionValue(n)),s(),d("for",x.getFieldOptionId(f,u,r)),s(),v(" ",x.getFieldOptionLabel(n)," ")}}function ne(e,i){if(e&1&&(l(0,"div",55),A(1,ie,4,4,"div",66,I),a()),e&2){let t=o().$implicit;s(),O(t.fieldOptionData)}}function oe(e,i){if(e&1){let t=k();l(0,"div",20)(1,"input",69),h("change",function(r){let _=g(t).$implicit,p=o(2).$implicit,u=o(2).index,f=o(3);return y(f.onCheckboxChange(p==null?null:p.displayName,_,r,u))}),a(),l(2,"label",70),c(3),a()()}if(e&2){let t,n=i.$implicit,r=i.$index,_=o(2),p=_.$implicit,u=_.$index,f=o(2).index,x=o(3);s(),d("id",x.getFieldOptionId(f,u,r))("name",x.getFieldOptionId(f,u,r))("checked",(t=x.getTicketControl(f,p.displayName))==null||t.value==null?null:t.value.includes(x.getFieldOptionValue(n))),s(),d("for",x.getFieldOptionId(f,u,r)),s(),w(x.getFieldOptionLabel(n))}}function ae(e,i){if(e&1&&(l(0,"div",56),A(1,oe,4,5,"div",20,I),a()),e&2){let t=o().$implicit;s(),O(t.fieldOptionData)}}function re(e,i){if(e&1&&C(0,"input",57),e&2){let t=o().$implicit;d("placeholder","Enter "+(t==null?null:t.displayName))("formControlName",t==null?null:t.displayName)}}function le(e,i){if(e&1&&(l(0,"span",17),c(1),a()),e&2){let t=o(2).$implicit;s(),v(" Please enter ",t.displayName," ")}}function se(e,i){if(e&1&&(l(0,"span",17),c(1),a()),e&2){let t=o(2).$implicit;s(),v(" Invalid ",t.displayName," format ")}}
1function de(e,i){if(e&1&&(D(0),m(1,le,2,1,"span",16)(2,se,2,1,"span",16),S()),e&2){let t,n,r=o().$implicit,_=o(2).index,p=o(3);s(),d("ngIf",(t=p.getTicketControl(_,r.displayName))==null||t.errors==null?null:t.errors.required),s(),d("ngIf",(n=p.getTicketControl(_,r.displayName))==null||n.errors==null?null:n.errors.pattern)}}function ce(e,i){if(e&1&&(l(0,"div",7)(1,"label",47),c(2),H(3,"titlecase"),m(4,jt,2,0,"span",48),a(),m(5,Wt,1,2,"input",49)(6,Qt,1,2,"textarea",50)(7,Jt,1,2,"input",51)(8,Xt,1,2,"input",52)(9,Zt,5,5,"label",53)(10,ee,4,4,"select",54)(11,ne,3,0,"div",55)(12,ae,3,0,"div",56)(13,re,1,2,"input",57)(14,de,3,2,"ng-container",14),a()),e&2){let t,n=i.$implicit,r=o(2).index,_=o(3);s(2),v("",B(3,4,n==null?null:n.displayName)," "),s(2),d("ngIf",(n==null?null:n.required)=="true"||(n==null?null:n.required)===!0),s(),F((n==null?null:n.type)=="CHAR"?5:(n==null?null:n.type)=="TEXT"?6:(n==null?null:n.type)=="NUMBER"?7:(n==null?null:n.type)=="EMAIL"?8:(n==null?null:n.type)=="FILE"?9:(n==null?null:n.type)=="DROPDOWN"?10:(n==null?null:n.type)=="RADIO"?11:(n==null?null:n.type)=="MULTI_CHOICE"?12:(n==null?null:n.type)=="DATE"?13:-1),s(9),d("ngIf",((t=_.getTicketControl(r,n.displayName))==null?null:t.errors)&&((t=_.getTicketControl(r,n.displayName))==null?null:t.touched))}}function _e(e,i){if(e&1){let t=k();l(0,"div",38)(1,"div",40)(2,"div",41)(3,"div",42),c(4),a(),l(5,"div",43),c(6),a()()(),l(7,"div",45),A(8,ce,15,6,"div",7,I),l(10,"div",46),h("click",function(){g(t);let r=o().index,_=o(3);return y(_.addCustomFormDetail(r))}),c(11," Next "),a()()()}if(e&2){let t=o().index,n=o(3);s(4),v(" Attendee ",t+1," Details "),s(2),v(" ",n.ticketClassData[t]==null?null:n.ticketClassData[t].className," "),s(2),O(n.formSettingData)}}function me(e,i){if(e&1&&(l(0,"div",38)(1,"div",40)(2,"div",41)(3,"div",42),c(4),a(),l(5,"div",43),c(6),a()()()()),e&2){let t=o().index,n=o(3);s(4),v(" Attendee ",t+1," Details "),s(2),v(" ",n.ticketClassData[t]==null?null:n.ticketClassData[t].className," ")}}function pe(e,i){if(e&1&&(D(0,37),m(1,Ut,8,3,"div",38)(2,_e,12,2,"div",38)(3,me,7,2,"div",38),S()),e&2){let t=i.$implicit,n=i.index,r=o(3);d("formGroupName",n),s(),F(t.valid&&r.showCustomFormIndex!=n?1:r.showCustomFormIndex==n?2:3)}}function ue(e,i){e&1&&C(0,"div",15)}function Ce(e,i){if(e&1){let t=k();l(0,"div",31)(1,"button",71),h("click",function(){g(t);let r=o(3);return y(r.submitCustomForm())}),m(2,ue,1,0,"div",13),c(3," Continue "),a()()}if(e&2){let t=o(3);s(),d("disabled",t.isSubmitLoading),s(),d("ngIf",t.isSubmitLoading)}}function fe(e,i){if(e&1&&(D(0,4),l(1,"div",34),m(2,pe,4,2,"ng-container",35)(3,Ce,4,2,"div",36),a(),S()),e&2){let t=o(2);d("formGroup",t.customForm),s(2),d("ngForOf",t.tickets.controls),s(),d("ngIf",t.customFormData.length==t.totalTicketQuantity)}}function he(e,i){if(e&1&&m(0,zt,16,7,"form",3)(1,fe,4,3,"ng-container",4),e&2){let t=o();F(t.showAddress?0:t.showCustomForm?1:-1)}}var ht=class e{httpService=b(X);authService=b(ft);icons=b(Y).icons;router=b(J);__actRoute=b(Q);fb=b(mt);commonDataPassService=b(ut);cookieService=b(K);platformId=b(L);checkoutService=b(Ct);isBrowser=W(this.platformId);isSubmitLoading=!1;isDataLoading=!1;isMobileMode=!1;showAddress=!1;checkPincodeLoading=!1;isPincodeDeliverable=!1;isPinChecked=!1;isFormRequired=!1;showCustomForm=!1;formDataLoaded=!1;cartDataLoaded=!1;addressForm;customForm;localCartDetails=null;eventSlug=null;selectedAddressType="HOME";addressData={};pinError=null;pinMessage=null;formSettingData=[];totalTicketQuantity=0;customFormData=[];showCustomFormIndex=0;ticketClassData=[];submitDataSub;userAddressDataSub;submitAddressSub;pinCheckSub;formDataSub;customFormDetailSub;cartDetailSub;ngOnInit(){this.isBrowser&&(this.isMobileMode=this.isMaxTab()),this.localCartDetails=this.cookieService.get("cartDetails")&&JSON.parse(this.cookieService.get("cartDetails")),this.eventSlug=this.__actRoute.snapshot.paramMap.get("eventSlug"),this.addressForm=this.fb.group({pinCode:["",[T.required,V.zipCodeValidator]],address1:["",[T.required,V.customAddressValidator]],address2:[""],landmark:[""],city:[{value:"",disabled:!0},[T.required]],state:[{value:"",disabled:!0},[T.required]],country:[{value:"",disabled:!0},T.required]}),this.customForm=this.fb.group({tickets:this.fb.array([])}),this.authService.isLoggedIn()?(this.getTicketFormData(),this.localCartDetails?.physicalAddress=="required"&&this.getAddressData()):this.router.navigate(["",this.authService.currentCity]),this.cartDetailSub=this.commonDataPassService.cartDetails$.subscribe(i=>{if(!i||Array.isArray(i)||!i?.cart_data)return;this.totalTicketQuantity=i?.cart_totals?.totalQuantity,this.ticketClassData=[],(i?.cart_data??[]).forEac
1h(n=>{for(let r=0;r<n?.seats;r++)this.ticketClassData.push({id:n?.ticketClass?.id,className:n?.ticketClass?.class_name})}),this.cartDataLoaded=!0,this.resolveDetailsStep()})}get a(){return this.addressForm.controls}isMaxTab(){return window&&window.matchMedia("(max-width: 1080px)").matches}onResize(i){this.isBrowser&&(i.srcElement.screen.width<1080||i.srcElement.innerWidth<1080?this.isMobileMode=!0:this.isMobileMode=!1)}numberOnly(i){let t=/[0-9\+\-\ ]/,n=i.which?i.which:i.keyCode,r=String.fromCharCode(i.charCode);return n>31&&(n<48||n>57)?i.preventDefault():t.test(r)||i.preventDefault(),!0}getTicketFormData(){this.isDataLoading=!0,this.formDataSub=this.httpService.get(`ticketApp/v2/ticket-user-form/?event__event_slug=${this.localCartDetails?.eventSlug}`).subscribe(i=>{this.isDataLoading=!1,this.isFormRequired=i[0]?.isFormRequired;let t=i[0]?.formSettingData?JSON.parse(i[0]?.formSettingData):[];if(this.formSettingData=this.normalizeFormSettingData(t),this.formDataLoaded=!0,this.checkoutService.updateCookieCartData({isFormRequired:this.isFormRequired,formSettingData:this.formSettingData}),!this.isFormRequired&&this.localCartDetails?.physicalAddress!=="required"){this.router.navigate(["/checkout/payment"]);return}this.resolveDetailsStep()},i=>{this.isDataLoading=!1,this.formDataLoaded=!0,this.resolveDetailsStep()})}resolveDetailsStep(){!this.formDataLoaded||!this.cartDataLoaded||(this.localCartDetails=this.cookieService.get("cartDetails")&&JSON.parse(this.cookieService.get("cartDetails")),this.localCartDetails?.physicalAddress=="required"?(this.showAddress=!0,this.showCustomForm=!1):this.isFormRequired&&(this.buildForms(),this.getCustomFormDetail(),this.showCustomForm=!0,this.showAddress=!1))}buildForms(){this.tickets.clear();for(let i=0;i<this.totalTicketQuantity;i++)this.tickets.push(this.buildTicketForm())}buildTicketForm(){let i={};return this.formSettingData.forEach(t=>{let n=[];if((t?.required==="true"||t?.required===!0)&&n.push(T.required),t?.regex&&t.regex.length>0){let r=t.regex.replace(/^\/|\/$/g,"");n.push(T.pattern(r))}t.type==="MULTI_CHOICE"?i[t.displayName]=this.fb.control([],n):t.type==="RADIO"?i[t.displayName]=this.fb.control(t?.defaultValue??null,n):i[t.displayName]=this.fb.control(t?.defaultValue||null,n)}),this.fb.group(i)}get c(){return this.customForm.controls}get tickets(){return this.customForm.get("tickets")}getTicketControl(i,t){return this.tickets.at(i)?.get([t])}getFieldOptionId(i,t,n){return`attendee-${i}-field-${t}-opt-${n}`}getFieldOptionValue(i){if(i==null)return"";if(typeof i=="object"){let t=i;if(t.value!==void 0&&t.value!==null)return String(t.value);if(t.label!==void 0&&t.label!==null)return String(t.label)}return String(i)}getFieldOptionLabel(i){if(i==null)return"";if(typeof i=="object"){let t=i;if(t.label!==void 0&&t.label!==null)return String(t.label);if(t.value!==void 0&&t.value!==null)return String(t.value)}return String(i)}normalizeFormSettingData(i){return Array.isArray(i)?i.map(t=>{let n=E({},t);if(typeof n.type=="string"&&(n.type=n.type.trim().toUpperCase()),typeof n.fieldOptionData=="string")try{n.fieldOptionData=JSON.parse(n.fieldOptionData)}catch{n.fieldOptionData=[]}return Array.isArray(n.fieldOptionData)||(n.fieldOptionData=n.fieldOptionData??[]),n}):[]}onRadioChange(i,t,n){let r=this.getTicketControl(i,t);r&&r.setValue(this.getFieldOptionValue(n))}onCheckboxChange(i,t,n,r){let _=this.getTicketControl(r,i);if(!_)return;let p=this.getFieldOptionValue(t),u=n.target.checked,f=_.value||[];u?f=[...f,p]:f=f.filter(x=>x!==p),_.setValue(f)}addCustomFormDetail(i){this.tickets.at(i).valid?(this.showCustomFormIndex=i+1,this.customFormData[i]?this.customFormData[i]={[`Attendee ${i+1}`]:E({ticketClass:this.ticketClassData[i]?.id},this.tickets.at(i)?.value)}:this.customFormData.push({[`Attendee ${this.customFormData.length+1}`]:E({ticketClass:this.ticketClassData[i]?.id,className:this.ticketClassData[i]?.className},this.tickets.at(i)?.value)})):this.customForm.markAllAsTouched()}submitCustomForm(){if(this.customFormData.length!==this.totalTicketQuantity){this.commonDataPassService.openCustomToastr({isOpen:!0,message:"Please add data for all attendees",type:"danger",timeout:3e3});return}this.isSubmitLoading=!0;let i={cartId:this.localCartDetails.cartId,formRequestedData:this.customFormData,userDataType:"FORM_DATA"};this.submitDataSub=this.httpService.post("ticketApp/v2/ticket-customForm-submit/",i).subscribe(t=>{this.isSubmitLoading=!1,this.router.navigate(["/checkout/payment"]),this.commonDataPassService.onChangeInCartItems.emit({changeInCart:!0})},t=>{this.isSubmitLoading=!1})}getCustomFormDetail(){this.isDataLoading=!0,this.customFormDetailSub=this.httpService.get(`ticketApp/v2/ticket-customForm-submit/?cartId=${this.localCartDetails.cartId}`).subscribe(i=>{this.isSubmitLoading=!1,this.customFormData=i||[],this.setFormArrayValues(),this.isDataLoading=!1},i=>{this.isDataLoading=!1})}setFormArrayValues(){let i=new Set(this.formSettingData.filter(t=>t.type==="RADIO").map(t=>t.displayName));this.customFormData.forEach((t,n)=>{let r=this.tickets.at(n);if(r){let _=E({},Object.values(t)[0]);
1i.forEach(p=>{let u=_[p];Array.isArray(u)&&(_[p]=u.length?u[0]:null)}),r.patchValue(_),this.showCustomFormIndex=-1}})}onFileSelected(i,t){let n=i.target;if(n.files&&n.files.length>0){let r=n.files[0],_=new FileReader;_.onloadend=p=>{this.handleDocUpload(r,p,t)},_.readAsDataURL(r),n.value=""}}handleDocUpload(i,t,n){let r=n;if(!["image/png","image/jpg","image/jpeg"].includes(i.type)){r.setErrors({fileError:!0});return}if(i.size>20*1024*1024){r.setErrors({fileSizeError:!0});return}let _=t.target.result;r.setValue(_),r.setErrors(null)}getAddressData(){this.isDataLoading=!0,this.userAddressDataSub=this.httpService.get("ticketApp/v2/ticket-address/?cartId="+this.localCartDetails.cartId).subscribe(i=>{this.isDataLoading=!1,this.addressData=i[0],this.addressData&&(this.isPincodeDeliverable=!0,this.selectedAddressType=this.addressData?.addressType,this.addressForm.patchValue({pinCode:this.addressData?.pinCode,address1:this.addressData?.address1,address2:this.addressData?.address2,landmark:this.addressData?.landmark,city:this.addressData?.city?.id,state:this.addressData?.state?.id,country:this.addressData?.country?.id}))},i=>{this.isDataLoading=!1})}checkCode(){if(this.addressForm.controls.pinCode.invalid)this.addressForm.markAllAsTouched();else{this.checkPincodeLoading=!0;let i={pin:this.a.pinCode.value};this.pinCheckSub=this.httpService.post("ticketApp/v2/pin-check/",i).subscribe(t=>{this.selectedAddressType="HOME",this.checkPincodeLoading=!1,this.isPinChecked=!0,this.isPincodeDeliverable=!0,this.pinError=null,this.addressForm.patchValue({city:t?.city,state:t?.state,country:t?.country}),this.pinMessage="Home Delivery is available for your address. Please enter the correct address below. You cannot change address once booking is done."},t=>{this.isPinChecked=!0,this.selectedAddressType="BOX_OFFICE",this.isPincodeDeliverable=!1,this.pinError="Home Delivery is not available for your address.Pickup has been selected.",this.pinMessage=null,this.checkPincodeLoading=!1})}}submitAddress(){if(this.addressForm.invalid)this.addressForm.markAllAsTouched();else{this.isSubmitLoading=!0;let i={addressType:this.selectedAddressType,city:this.a.city.value,state:this.a.state.value,country:this.a.country.value,cartId:this.localCartDetails.cartId,address1:this.a.address1.value,address2:this.a.address2.value,landmark:this.a.landmark.value,pinCode:this.a.pinCode.value};this.submitAddressSub=this.httpService.post("ticketApp/v2/ticket-address/",i).subscribe(t=>{this.isSubmitLoading=!1,this.isFormRequired?(this.buildForms(),this.getCustomFormDetail(),this.showCustomForm=!0,this.showAddress=!1):this.router.navigate(["/checkout/payment"]),this.commonDataPassService.onChangeInCartItems.emit({changeInCart:!0})},t=>{this.isSubmitLoading=!1})}}submitWithotAddress(){this.isFormRequired?(this.buildForms(),this.getCustomFormDetail(),this.showCustomForm=!0,this.showAddress=!1):(this.router.navigate(["/checkout/payment"]),this.commonDataPassService.onChangeInCartItems.emit({changeInCart:!0}))}ngOnDestroy(){this.submitDataSub?.unsubscribe(),this.userAddressDataSub?.unsubscribe(),this.submitAddressSub?.unsubscribe(),this.pinCheckSub?.unsubscribe(),this.formDataSub?.unsubscribe(),this.customFormDetailSub?.unsubscribe(),this.cartDetailSub?.unsubscribe()}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=P({type:e,selectors:[["app-details"]],hostBindings:function(t,n){t&1&&h("resize",function(_){return n.onResize(_)},!1,$)},standalone:!0,features:[q],decls:2,vars:1,consts:[["fileUpload",""],[1,"flex","items-center","justify-center","min-h-64"],[1,"loader"],[1,"loginForm",3,"formGroup"],[3,"formGroup"],[1,"loginForm",3,"ngSubmit","formGroup"],[1,"loginForm-title"],[1,"form-group"],["for","",1,"form-label"],[1,"text-red"],[1,"input-group","input-button"],["type","text","placeholder","Enter Pin Code *","formControlName","pinCode",1,"form-control",3,"keypress","maxlength"],["type","button",1,"btn","btn-primary","btn-sm",3,"click","disabled"],["class","spinner",4,"ngIf"],[4,"ngIf"],[1,"spinner"],["class","error",4,"ngIf"],[1,"error"],["class","!text-green error",4,"ngIf"],[1,"!text-green","error"],[1,"form-check"],["type","radio","name","addressType","id","addressType1",1,"form-check-input",3,"change","checked"],["for","addressType1",1,"form-check-label"],["type","radio","name","addressType","id","addressType2",1,"form-check-input",3,"change","checked"],["for","addressType2",1,"form-check-label"],["type","text","placeholder","Flat no., House no., Building","formControlName","address1",1,"form-control"],["type","text","placeholder","Area, Colony, Street, Sector","formControlName","address2",1,"form-control"],["type","text","placeholder","Enter Landmark","formControlName","landmark",1,"form-control"],["type","text","placeholder","Country*","formControlName","country",1,"form-control"],["type","text","placeholder","State*","formControlName","state",1,"form-control"],["type","text","placeholder","City *","formControlName","city",1,"form-control"],[1,"fixedBottom"],["type","submit",1,"btn","btn-primary","w-full",3,"disabled"],["type","button",1,"btn","btn-primary","w-full",3,"click"],["formArrayName","tickets",1,"attendeeCard-list"],[3,"formGroupName",4,"ngFor","ngForOf"],["class","fixedBottom",4,"ngIf"],[3,"formGroupName"],[1,"attendeeCard"],[1,"attendeeCard",3,"click"],[1,"attendeeCard-header"],[1,"attendeeCard-info"],[1,"attendeeCard-title"],[1,"attendeeCard-ticket"],[1,"btn-icon",3,"innerHTML"],[1,"attendeeCard-body"],[1,"btn","btn-primary",3,"click"],[1,"form-label"],["class","text-red",4,"ngIf"],["type","text",1,"form-control",3,"placeholder","formControlName"],["rows","4",1,"form-control","h-auto",3,"placeholder","formControlName"],["type","number",1,"form-control",3,"placeholder","formControlName"],["type","email",1,"form-control",3,"placeholder","formControlName"],[1,"uploadFile",3,"ngClass"],[1,"form-select",3,"formControlName"],[1,"flex","gap-4","item-center","flex-wrap"],[1,"flex","gap-4","items-center","flex-wrap"],["type","date",1,"form-control",3,"placeholder","formControlName"],["type","file","accept","image/*",1,"uploadFile-input",3,"change","placeholder"],[1,"w-full","h-full",3,"src"],[1,"uploadFile-icon",3,"innerHTML"],[1,"uploadFile-title"],[1,"uploadFile-text"],["selected","","disabled","",3,"value"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"form-radio"],["type","radio",1,"form-radio-input",3,"change","id","checked"],[1,"form-radio-label",3,"for"],["type","checkbox",1,"form-check-input",3,"change","id","name","checked"],[1,"form-check-label",3,"for"],["type","button",1,"btn","btn-primary","w-full",3,"click","disabled"]],template:function(t,n){t&1&&m(0,gt,2,0,"div",1)(1,he,2,1),t&2&&F(n.isDataLoading?0:1)},dependencies:[pt,it,dt,ct,Z,nt,st,tt,et,_t,ot,lt,at,rt,G,U,j,z],styles:[".loginForm[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto;display:flex;width:100%;max-width:420px;flex:1 1 auto;flex-direction:column;gap:1.5rem;padding:2.5rem 1rem}@media (min-width: 1024px){.loginForm[_ngcontent-%COMP%]{padding-left:2rem;padding-right:2rem}}.loginForm-title[_ngcontent-%COMP%]{flex:1 1 auto;font-family:Inter,sans-serif;font-size:1rem;font-weight:600;line-height:1.5rem;--tw-text-opacity: 1;color:rgb(var(--theme-dark) / var(--tw-text-opacity))}  .checkoutArticle:has(.attendeeCard-list) .checkoutCard{border-style:none;background-color:transparent;padding:0}.attendeeCard-list[_ngcontent-%COMP%]{overflow:hidden;border-radius:1rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(var(--theme-secondary) / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(var(--theme-light) / var(--tw-bg-opacity))}.attendeeCard[_ngcontent-%COMP%]{display:flex;flex-direction:column;border-top-width:1px;--tw-border-opacity: 1;border-color:rgb(var(--theme-secondary) / var(--tw-border-opacity))}.attendeeCard[_ngcontent-%COMP%]:first-child{border-top-width:0px}.attendeeCard-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem}.attendeeCard-info[_ngcontent-%COMP%]{display:flex;flex:1 1 auto;flex-direction:column;gap:.5rem}.attendeeCard[_ngcontent-%COMP%]   .attendeeCard-header[_ngcontent-%COMP%]   .btn-icon[_ngcontent-%COMP%]{--tw-text-opacity: 1;color:rgb(var(--theme-gray) / var(--tw-text-opacity))}.attendeeCard-title[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-size:.875rem;font-weight:500;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(var(--theme-black) / var(--tw-text-opacity))}.attendeeCard-ticket[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-size:.75rem;font-weight:500;line-height:1rem;--tw-text-opacity: 1;color:rgb(var(--theme-sky-blue) / var(--tw-text-opacity))}.attendeeCard-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;border-top-width:1px;border-style:dashed;--tw-border-opacity: 1;border-color:rgb(var(--theme-secondary) / var(--tw-border-opacity));padding:1rem}.attendeeCard[_ngcontent-%COMP%]   .attendeeCard-body[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]{align-self:flex-end}.fixedBottom[_ngcontent-%COMP%]{--tw-border-opacity: 1;border-color:rgb(var(--theme-secondary) / var(--tw-border-opacity))}@media (min-width: 1280px){.fixedBottom[_ngcontent-%COMP%]{border-top-width:1px;padding:1rem}}"]})};export{ht as DetailsComponent};

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.