PageSourceSearch

https://daleelaqar.com/868.40352dfe158c80d2.js

js daleelaqar.com collected 2026-09-24 13:57:15 UTC 59,180 bytes, 63 lines download raw bytes

1"use strict";(self.webpackChunkaqar_web_client_ui=self.webpackChunkaqar_web_client_ui||[]).push([[868],{4324(O,M,l){l.d(M,{ReelsComponent:()=>Ie});var b=l(2973),C=l(1413),k=l(2906),g=l(6977),E=l(5964),p=l(9494),m=l(2758),u=l(467),h=l(9769),s=l(7266),v=l(9417),d=l(3044),f=l(283),x=l(4843),P=l(8527),S=l(9994),A=l(1197),L=l(221),V=l(177),U=l(5676),I=l(1879),e=l(5547),R=l(5157),D=l(4976);function j(o,a){if(1&o&&e.nrm(0,"video",5),2&o){const t=e.XpG();e.Y8G("src",t.videoUrl,e.B4B),e.BMQ("playsinline",!0)("webkit-playsinline",!0)}}function $(o,a){1&o&&(e.j41(0,"div",6)(1,"p",16),e.EFF(2,"\u0644\u0627 \u062a\u0648\u062c\u062f \u0645\u0639\u0627\u064a\u0646\u0629 \u0645\u062a\u0627\u062d\u0629"),e.k0s()())}function B(o,a){if(1&o&&(e.j41(0,"div",7)(1,"div",9),e.EFF(2,"\u062a\u0641\u0627\u0635\u064a\u0644 \u0627\u0644\u0631\u064a\u0644"),e.k0s(),e.j41(3,"div",17)(4,"p",18),e.EFF(5),e.k0s(),e.j41(6,"p",13),e.EFF(7),e.k0s()()()),2&o){const t=e.XpG();e.R7$(5),e.JRh(t.companyName),e.R7$(2),e.JRh(t.description)}}function N(o,a){if(1&o&&(e.j41(0,"p",27),e.EFF(1),e.nI1(2,"number"),e.k0s()),2&o){const t=e.XpG(4);e.R7$(),e.SpI(" ",e.bMT(2,1,t.getPropertyNotify())," \u062f\u0623 ")}}function X(o,a){if(1&o&&(e.j41(0,"div",23)(1,"p",26),e.EFF(2),e.nI1(3,"number"),e.k0s(),e.nVh(4,N,3,3,"p",27),e.k0s()),2&o){const t=e.XpG(3);e.R7$(2),e.SpI(" ",e.bMT(3,2,t.getPropertyPrice())," \u062f\u0623 "),e.R7$(2),e.vxM(t.getPropertyNotify()?4:-1)}}function G(o,a){if(1&o&&(e.j41(0,"p",24),e.EFF(1),e.k0s()),2&o){const t=e.XpG(3);e.R7$(),e.SpI(" ",t.getPropertyCardDescription()," ")}}function z(o,a){if(1&o&&(e.j41(0,"div",25),e.nrm(1,"ng-icon",28),e.j41(2,"span"),e.EFF(3),e.k0s()()),2&o){const t=e.XpG(3);e.R7$(3),e.JRh(t.getPropertyAddress())}}function Y(o,a){if(1&o&&(e.j41(0,"div",20),e.nVh(1,X,5,4,"div",23),e.nVh(2,G,2,1,"p",24),e.nVh(3,z,4,1,"div",25),e.k0s()),2&o){const t=e.XpG(2);e.R7$(),e.vxM(null!==t.getPropertyPrice()?1:-1),e.R7$(),e.vxM(t.getPropertyCardDescription()?2:-1),e.R7$(),e.vxM(t.getPropertyAddress()?3:-1)}}function H(o,a){1&o&&(e.j41(0,"p",21),e.EFF(1,"\u062c\u0627\u0631\u064a \u062a\u062d\u0645\u064a\u0644 \u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0627\u0644\u0639\u0642\u0627\u0631..."),e.k0s())}function J(o,a){if(1&o&&(e.j41(0,"p",22),e.EFF(1),e.k0s()),2&o){const t=e.XpG(2);e.R7$(),e.JRh(t.propertyDataError)}}function Q(o,a){if(1&o&&(e.j41(0,"div",7)(1,"div",9),e.EFF(2,"\u0646\u0648\u0639 \u0627\u0644\u0631\u064a\u0644"),e.k0s(),e.j41(3,"div",17)(4,"p",19),e.EFF(5,"\u0631\u064a\u0644 \u0639\u0642\u0627\u0631"),e.k0s(),e.nVh(6,Y,4,3,"div",20),e.nVh(7,H,2,0,"p",21),e.nVh(8,J,2,1,"p",22),e.k0s()()),2&o){const t=e.XpG();e.R7$(6),e.vxM(t.loadingPropertyData||t.propertyDataError||!t.propertyData?-1:6),e.R7$(),e.vxM(t.loadingPropertyData?7:-1),e.R7$(),e.vxM(t.propertyDataError?8:-1)}}let W=(()=>{class o{constructor(t,i,n,r){this.reelsService=t,this.apollo=i,this.cdr=n,this.platformId=r,this.data={videoPreview:null,videoMetadata:null},this.reelType="SERVICE",this.stepComplete=new s.bkB,this.stepBack=new s.bkB,this.videoUrl="",this.propertyData=null,this.loadingPropertyData=!1,this.propertyDataError=null,this.destroy$=new C.B,this.isBrowser=(0,V.UE)(this.platformId)}ngOnInit(){this.initializeVideoQuality(),"PROPERTY"===this.reelType&&this.selectedListing?.id&&this.fetchPropertyDescription(this.selectedListing.id)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}initializeVideoQuality(){this.data.originalVideoUrl?this.videoUrl=this.data.mobileVideoUrl&&this.isMobileDevice()&&"pending"!==this.data.mobileVideoUrl?this.data.mobileVideoUrl:this.data.originalVideoUrl:this.data.videoPreview&&(this.videoUrl=this.data.videoPreview),this.videoUrl&&!this.data.videoPreview&&(this.data.videoPreview=this.videoUrl)}isMobileDevice(){if(!this.isBrowser||typeof navigator>"u"||typeof window>"u")return!1;const t=navigator.userAgent.toLowerCase(),n=["mobile","android","iphone","ipad","ipod","blackberry","windows phone"].some(_=>t.includes(_)),r=window.innerWidth<=768,c="ontouchstart"in window||navigator.maxTouchPoints>0,y=/ipad|android(?!.*mobile)/i.test(t)&&c;return n||r&&c||y}onSubmit(){this.stepComplete.emit()}onBack(){this.stepBack.emit()}
1fetchPropertyDescription(t){this.loadingPropertyData=!0,this.propertyDataError=null,this.cdr.markForCheck(),this.apollo.query({query:P.GET_PROPERTY_DESCRIPTION_FOR_REEL,variables:{id:t},fetchPolicy:"cache-first"}).pipe((0,g.Q)(this.destroy$)).subscribe({next:i=>{const n=i.data?.getPropertyDescriptionForReel;n&&(this.propertyData={price:n.price??null,notify:n.notify??null,cardDescription:n.cardDescription??"",address:n.address??""}),this.loadingPropertyData=!1,this.cdr.markForCheck()},error:i=>{console.error("Error fetching property description:",i),this.propertyDataError="\u0641\u0634\u0644 \u062a\u062d\u0645\u064a\u0644 \u0628\u064a\u0627\u0646\u0627\u062a \u0627\u0644\u0639\u0642\u0627\u0631",this.loadingPropertyData=!1,this.cdr.markForCheck()}})}getPropertyPrice(){return this.propertyData?.price??null}getPropertyNotify(){return this.propertyData?.notify??null}getPropertyCardDescription(){return this.propertyData?.cardDescription??""}getPropertyAddress(){return this.propertyData?.address??""}static{this.\u0275fac=function(i){return new(i||o)(e.rXU(I.ReelsService),e.rXU(D.Ic),e.rXU(R.gRc),e.rXU(s.Agw))}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["app-reel-step-preview"]],inputs:{data:"data",description:"description",companyName:"companyName",reelType:"reelType",selectedListing:"selectedListing"},outputs:{stepComplete:"stepComplete",stepBack:"stepBack"},features:[e.Jv_([(0,d.EB)({heroMapPinSolid:U.jC})])],decls:32,vars:7,consts:[[1,"step-three-container"],[1,"text-title","font-medium","text-text","mb-5"],[1,"step-three-content","flex","gap-8"],[1,"video-preview-section","flex-1"],[1,"video-preview-container"],["controls","","preload","metadata","playsinline","","webkit-playsinline","",1,"video-preview","w-full","rounded-xl","bg-black",3,"src"],[1,"no-preview","bg-gray-100","rounded-xl","p-8","text-center"],[1,"reel-details-section","flex-1"],[1,"reel-info-section","flex-1"],[1,"text-xs","font-bold","text-text","mb-2"],[1,"info-content"],[1,"mb-1"],[1,"text-normal","font-bold","text-text"],[1,"text-normal","text-text"],[1,"w-full","flex","items-center","justify-center","mt-8","mb-10","finish-button-container"],["type","button",1,"next-btn","bg-primary","text-white","border-0","rounded-xl","px-8","py-4","text-lg","font-bold","cursor-pointer","transition-colors","w-60","mx-auto",3,"click"],[1,"text-text"],[1,"reel-info-content"],[1,"text-normal","text-text","mb-1"],[1,"text-normal","text-text","mb-3"],[1,"property-info"],[1,"text-normal","text-gray-500"],[1,"text-normal","text-red-600"],[1,"mb-2"],[1,"text-normal","text-text","mb-2"],[1,"flex","items-center","gap-1","text-sm","text-gray-600"],[1,"text-lg","font-bold","text-primary","mb-1"],[1,"text-sm","text-gray-600"],["name","heroMapPinSolid","size","10"]],template:function(i,n){1&i&&(e.j41(0,"div",0)(1,"div",1),e.EFF(2,"\u0631\u0627\u062c\u0639 \u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0627\u0644\u062a\u064a \u062a\u0645\u062a \u0625\u0636\u0627\u0641\u062a\u0647\u0627 \u0644\u0644\u0631\u064a\u0644 :"),e.k0s(),e.j41(3,"div",2)(4,"div",3)(5,"div",4),e.nVh(6,j,1,3,"video",5),e.nVh(7,$,3,0,"div",6),e.k0s()(),e.nVh(8,B,8,2,"div",7),e.nVh(9,Q,9,3,"div",7),e.j41(10,"div",8)(11,"div",9),e.EFF(12,"\u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0627\u0644\u0631\u064a\u0644"),e.k0s(),e.j41(13,"div",10)(14,"p",11)(15,"span",12),e.EFF(16,"\u0627\u0644\u0637\u0648\u0644 \u0627\u0644\u0623\u0642\u0635\u0649: "),e.k0s(),e.j41(17,"span",13),e.EFF(18),e.k0s()(),e.j41(19,"p",11)(20,"span",12),e.EFF(21,"\u062d\u062c\u0645 \u0627\u0644\u0645\u0644\u0641: "),e.k0s(),e.j41(22,"span",13),e.EFF(23),e.k0s()(),e.j41(24,"p")(25,"span",12),e.EFF(26,"\u062f\u0642\u0629 \u0627\u0644\u0645\u0644\u0641: "),e.k0s(),e.j41(27,"span",13),e.EFF(28),e.k0s()()()()(),e.j41(29,"div",14)(30,"button",15),e.bIt("click",function(){return n.onSubmit()}),e.EFF(31," \u0627\u0644\u0630\u0647\u0627\u0628 \u0625\u0644\u0649 \u0627\u0644\u062f\u0641\u0639 "),e.k0s()()()),2&i&&(e.R7$(6),e.vxM(n.videoUrl?6:-1),e.R7$(),e.vxM(n.videoUrl?-1:7),e.R7$(),e.vxM("SERVICE"===n.reelType?8:-1),e.R7$(),e.vxM("PROPERTY"===n.reelType?9:-1),e.R7$(9),e.JRh(n.data.videoMetadata?.duration||"N/A"),e.R7$(5),e.JRh(n.data.videoMetadata?.fileSize||"N/A"),e.R7$(5),e.JRh(n.data.videoMetadata?.resolution||"N/A"))},dependencies:[h.MD,d.Uq,h.QX],styles:[".step-three-container[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto;max-width:72rem;padding:1.5rem;max-height:calc(100vh - 200px);overflow-y:auto}.step-three-content[_ngcontent-%COMP%]{margin-bottom:1.5rem;display:flex;gap:2rem}.video-preview-section[_ngcontent-%COMP%]   .video-preview-container[_ngcontent-%COMP%]{width:100%}.video-preview-section[_ngcontent-%COMP%]   .video-preview[_ngcontent-%COMP%]{height:auto;width:100%;border-radius:.75rem;--tw-bg-opacity: 1;background-color:rgb(0 0 17 / var(--tw-bg-opacity, 1));max-height:60vh;object-fit:contain}.video-preview-section[_ngcontent-%COMP%]   .no-preview[_ngcontent-%COMP%]{display:flex;height:12rem;width:100%;align-items:center;justify-content:center;border-radius:.75rem;border-width:2px;border-style:dashed;--tw-border-opacity: 1;border-color:rgb(210 210 210 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(245 244 248 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(81 85 92 / var(--tw-text-opacity, 1))}.reel-details-section[_ngcontent-%COMP%]   .reel-info-content[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:not([hidden]) ~ [_ngcontent-%COMP%]:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.reel-info-section[_ngcontent-%COMP%]   .info-content[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:not([hidden]) ~ [_ngcontent-%COMP%]:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.next-btn[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto;width:15rem;cursor:pointer;border-radius:.75rem;border-width:0px;--tw-bg-opacity: 1;background-color:rgb(72 118 150 / var(--tw-bg-opacity, 1));padding:1rem 2rem;font-size:1.125rem;line-height:1.75rem;font-weight:700;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.next-btn[_ngcontent-%COMP%]:disabled{cursor:not-allowed;opacity:.5}.next-btn[_ngcontent-%COMP%]:hover:not(:disabled){--tw-bg-opacity: 1;background-color:rgb(72 118 150 / var(--tw-bg-opacity, 1));opacity:.9}.finish-button-container[_ngcontent-%COMP%]{margin-bottom:2.5rem}@media(max-width:1024px){.step-three-content[_ngcontent-%COMP%]{flex-direction:column;gap:1.5rem}}@media(max-width:768px){.step-three-container[_ngcontent-%COMP%]{padding:1rem 1rem 6rem}.step-three-content[_ngcontent-%COMP%]{gap:1rem}.next-btn[_ngcontent-%COMP%]{width:100%;padding:.75rem 1.5rem;font-size:1rem;line-height:1.5rem}.finish-button-container[_ngcontent-%COMP%]{margin-bottom:4rem}}"]})}}return o}
1)();var K=l(1230);const Z=()=>[],q=(o,a)=>({"opacity-100":o,"opacity-65":a});function ee(o,a){1&o&&(e.j41(0,"div",1),e.EFF(1," \u0625\u062e\u062a\u0631 \u0627\u0644\u0639\u0642\u0627\u0631 \u0627\u0644\u0645\u0631\u0627\u062f \u0627\u0644\u0625\u0639\u0644\u0627\u0646 \u0639\u0646\u0647: "),e.k0s())}function te(o,a){if(1&o&&e.nrm(0,"span",25),2&o){const t=a.$index,i=e.XpG(2).$implicit,n=e.XpG(2);e.Y8G("ngClass",e.l_i(1,q,n.getCurrentImageIndex(i.id)===t,n.getCurrentImageIndex(i.id)!==t))}}function ie(o,a){if(1&o){const t=e.RV6();e.j41(0,"button",20),e.bIt("click",function(n){s.eBV(t);const r=e.XpG().$implicit,c=e.XpG(2);return s.Njj(c.nextImg(n,r))}),e.nrm(1,"ng-icon",21),e.k0s(),e.j41(2,"button",22),e.bIt("click",function(n){s.eBV(t);const r=e.XpG().$implicit,c=e.XpG(2);return s.Njj(c.prevImg(n,r))}),e.nrm(3,"ng-icon",23),e.k0s(),e.j41(4,"div",24),e.Z7z(5,te,1,4,"span",25,e.fX1),e.k0s()}if(2&o){const t=e.XpG().$implicit;e.R7$(5),e.Dyx(e.lJ4(0,Z).constructor(t.media.length))}}function ne(o,a){1&o&&(e.j41(0,"p",15),e.EFF(1," \u0633\u0639\u0631 \u0627\u0642\u0644 \u0645\u0646 \u0627\u0644\u062a\u062e\u0645\u064a\u0646 "),e.k0s())}function oe(o,a){if(1&o){const t=e.RV6();e.j41(0,"div",4)(1,"div",5),e.bIt("click",function(){const n=s.eBV(t).$implicit,r=e.XpG(2);return s.Njj(r.selectListing(n.id))}),e.j41(2,"input",6),e.bIt("change",function(){const n=s.eBV(t).$implicit,r=e.XpG(2);return s.Njj(r.selectListing(n.id))}),e.k0s(),e.j41(3,"label",7),e.EFF(4," \u0625\u062e\u062a\u0631 \u0627\u0644\u0639\u0642\u0627\u0631 "),e.k0s()(),e.j41(5,"div",8),e.bIt("click",function(){const n=s.eBV(t).$implicit,r=e.XpG(2);return s.Njj(r.selectListing(n.id))}),e.j41(6,"button",9),e.nrm(7,"div",10),e.j41(8,"span",11),e.EFF(9),e.k0s(),e.nVh(10,ie,7,1),e.k0s(),e.j41(11,"div",12)(12,"div",13)(13,"p",14),e.EFF(14),e.nI1(15,"number"),e.k0s(),e.nVh(16,ne,2,0,"p",15),e.k0s(),e.j41(17,"div",16)(18,"p",17),e.EFF(19),e.k0s()(),e.j41(20,"div",18)(21,"p",19)(22,"span"),e.EFF(23,"\u{1f4cd}"),e.k0s(),e.j41(24,"span"),e.EFF(25),e.k0s()()()()()()}if(2&o){const t=a.$implicit,i=e.XpG(2);e.R7$(2),e.Y8G("checked",i.isSelected(t.id))("id","listing-"+t.id)("value",t.id),e.R7$(),e.AVh("text-primary",i.isSelected(t.id))("text-gray-700",!i.isSelected(t.id)),e.Y8G("for","listing-"+t.id),e.R7$(2),e.HbH("card-holder flex flex-col w-full h-[220px] bg-white text-text rounded-lg overflow-hidden shadow-xl border-2 transition-all duration-300 "+(i.isSelected(t.id)?"border-primary":"border-dark border-opacity-5")),e.R7$(2),e.xc7("background-image",i.getSafeBackgroun
1dImage(t)),e.R7$(2),e.SpI(" ",t.type.name," "),e.R7$(),e.vxM(t.media.length>1?10:-1),e.R7$(4),e.SpI("",e.bMT(15,18,t.price)," \u062f\u0623"),e.R7$(2),e.vxM(t.assessmentPrice&&t.price<t.assessmentPrice?16:-1),e.R7$(3),e.JRh(i.getPropertyDetails(t)),e.R7$(6),e.JRh(t.address)}}function re(o,a){if(1&o&&(e.j41(0,"div",2),e.Z7z(1,oe,26,20,"div",4,e.BUC().trackByListingId,!0),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.Dyx(t.listings)}}function se(o,a){1&o&&(e.j41(0,"div",3)(1,"div",26),e.EFF(2,"\u{1f3e0}"),e.k0s(),e.j41(3,"h3",27),e.EFF(4,"\u0644\u0627 \u062a\u0648\u062c\u062f \u0639\u0642\u0627\u0631\u0627\u062a \u0645\u062a\u0627\u062d\u0629"),e.k0s(),e.j41(5,"p",28),e.EFF(6,"\u0644\u064a\u0633 \u0644\u062f\u064a\u0643 \u0639\u0642\u0627\u0631\u0627\u062a \u0646\u0634\u0637\u0629 \u0648\u0645\u0639\u062a\u0645\u062f\u0629 \u062d\u0627\u0644\u064a\u0627\u064b"),e.k0s(),e.j41(7,"p",28),e.EFF(8,"\u064a\u0631\u062c\u0649 \u0625\u0636\u0627\u0641\u0629 \u0639\u0642\u0627\u0631 \u0623\u0648\u0644\u0627\u064b \u0644\u062a\u062a\u0645\u0643\u0646 \u0645\u0646 \u0625\u0646\u0634\u0627\u0621 \u0631\u064a\u0644 \u0644\u0647"),e.k0s()())}let ae=(()=>{class o{constructor(t){this.sanitizer=t,this.listings=[],this.selectedListingId=null,this.listingSelected=new s.bkB,this.currentImageMap=new Map}trackByListingId(t,i){return i.id}selectListing(t){console.log("\u{1f4e4} ReelPropertySelection: Emitting listingSelected event with ID:",t),this.listingSelected.emit(t)}isSelected(t){return this.selectedListingId===t}getCurrentImageIndex(t){return this.currentImageMap.get(t)||0}prevImg(t,i){t.stopPropagation();const n=this.getCurrentImageIndex(i.id);this.currentImageMap.set(i.id,n-1>=0?n-1:i.media.length-1)}nextImg(t,i){t.stopPropagation();const n=this.getCurrentImageIndex(i.id);this.currentImageMap.set(i.id,n<i.media.length-1?n+1:0)}
1getSafeBackgroundImage(t){const i=this.getCurrentImageIndex(t.id),r=(t.media[i]?.url||"").replace(/\(/g,"%28").replace(/\)/g,"%29");return this.sanitizer.bypassSecurityTrustStyle(`url('${r}')`)}formatPrice(t){return t.toLocaleString("ar-SA")}getPropertyDetails(t){const i=t.listingDetails,n=t.type?.name||"\u0639\u0642\u0627\u0631";return i?"bedrooms"in i&&i.bedrooms?`${i.bedrooms.name} \u063a\u0631\u0641 \u0646\u0648\u0645\u060c ${i.area} \u0645\u062a\u0631 \u0645\u0631\u0628\u0639\u060c ${n}`:"buildingArea"in i&&i.buildingArea?`${i.numOfRooms||0} \u063a\u0631\u0641\u060c ${i.buildingArea} \u0645\u062a\u0631 \u0645\u0631\u0628\u0639\u060c ${n}`:"floorNumber"in i&&i.floorNumber?`${i.floorNumber.name?`\u0627\u0644\u0637\u0627\u0628\u0642 ${i.floorNumber.name}\u060c `:""}${i.area} \u0645\u062a\u0631 \u0645\u0631\u0628\u0639\u060c ${n}`:"area"in i&&i.area?`${i.area} \u0645\u062a\u0631 \u0645\u0631\u0628\u0639\u060c ${n}`:n:n}static{this.\u0275fac=function(i){return new(i||o)(e.rXU(K.up))}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["app-reel-property-selection"]],inputs:{listings:"listings",selectedListingId:"selectedListingId"},outputs:{listingSelected:"listingSelected"},features:[e.Jv_([(0,d.EB)({heroCheckCircle:f.ppy,heroChevronRight:f.Sbs,heroChevronLeft:f.PT0})])],decls:4,vars:3,consts:[["dir","rtl",1,"w-full","px-8","py-4","overflow-y-auto","max-h-[60vh]"],[1,"text-title","font-medium","text-text","mb-6"],[1,"grid","grid-cols-1","md:grid-cols-2","lg:grid-cols-3","gap-4","mb-5"],[1,"text-center","py-15","px-5","text-gray-600"],[1,"cursor-pointer"],[1,"flex","items-center","gap-2","mb-1","bg-selection-bg","rounded-lg","py-2","px-3",3,"click"],["type","radio","name","listing-selection",1,"w-5","h-5","cursor-pointer","accent-primary",3,"change","checked","id","value"],[1,"text-sm","font-medium","cursor-pointer","select-none",3,"for"],[3,"click"],["type","button",1,"grayscal","flex","justify-center","h-36","bg-center","bg-no-repeat","rounded-t-lg","relative","cursor-pointer","image-slide"],[1,"absolute","inset-0","bg-center","bg-no-repeat","bg-cover","rounded-t-lg"],[1,"absolute","px-2","py-1","leading-7","text-center","bg-dark","bg-opacity-65","rounded-lg","text-xs","font-medium","right-2","top-2","text-white"],[1,"content-mobile"],[1,"flex","justify-between","px-4","gap-4","pt-2"],[1,"leading-5","text-sm","font-bold"],[1,"text-xs","font-semibold","pr-4","text-orange","leading-5"],[1,"px-4","gap-1","pt-2","leading-5","text-xs","font-normal"],[1,"text-xs"],[1,"px-4","pt-2","pb-3"],[1,"text-xs","text-gray-600","flex","items-center","gap-1"],["type","button",1,"absolute","right-2","top-1/2",3,"click"],["size","28","name","heroChevronRight",1,"icon","arrow-icon"],["type","button",1,"absolute","left-2","top-1/2",3,"click"],["size","28","name","heroChevronLeft",1,"icon","arrow-icon"],["dir","ltr",1,"absolute","bottom-2","flex","gap-1"],[1,"rounded-full","bg-white","w-2","h-2","shadow-lg",3,"ngClass"],[1,"text-6xl","mb-5"],[1,"text-gray-800","mb-3","text-xl","font-semibold"],[1,"my-2","text-gray-600","text-sm","leading-relaxed"]],template:function(i,n){1&i&&(e.j41(0,"div",0),e.nVh(1,ee,2,0,"div",1),e.nVh(2,re,3,0,"div",2),e.nVh(3,se,9,0,"div",3),e.k0s()),2&i&&(e.R7$(),e.vxM(n.listings&&n.listings.length>0?1:-1),e.R7$(),e.vxM(n.listings&&n.listings.length>0?2:-1),e.R7$(),e.vxM(n.listings&&0!==n.listings.length?-1:3))},dependencies:[h.MD,h.YU,d.Uq,h.QX],styles:[".arrow-icon[_ngcontent-%COMP%]{padding:0;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.icon[_ngcontent-%COMP%]{display:inline-block}"]})}}return o})();function le(o,a){1&o&&(e.j41(0,"div",1),e.nrm(1,"div",4),e.j41(2,"p",5),e.EFF(3,"\u062c\u0627\u0631\u064a \u062a\u062d\u0645\u064a\u0644 \u0627\u0644\u0639\u0642\u0627\u0631\u0627\u062a..."),e.k0s()())}function ce(o,a){if(1&o){const t=e.RV6();e.j41(0,"app-reel-property-selection",6),e.bIt("listingSelected",function(n){s.eBV(t);const r=e.XpG();return s.Njj(r.onListingSelected(n))}),e.k0s()}if(2&o){const t=e.XpG();e.Y8G("listings",t.listings)("selectedListingId",t.data.selectedListingId)}}function de(o,a){if(1&o){const t=e.RV6();e.j41(0,"div",3)(1,"button",7),e.bIt("click",function(){s.eBV(t);const n=e.XpG();return s.Njj(n.onNext())}),e.EFF(2," \u0627\u0644\u062a\u0627\u0644\u064a "),e.k0s()()}if(2&o){const t=e.XpG();e.R7$(),e.Y8G("disabled",t.isNextDisabled())}}const pe=D.J1`
2  query getUserActiveListingsForReel {
3    getUserActiveListingsForReel {
4      id
5      media {
6        id
7        mediaType {
8          id
9          name
10        }
11        url
12      }
13      price
14      assessmentPrice
15      paymentType {
16        id
17        name
18      }
19      type {
20        id
21        name
22      }
23      address
24      listingStatus {
25        id
26        statusName
27      }
28      listingDetails {
29        ... on Building {
30          buildingArea
31          numOfBathrooms
32          numOfRooms
33        }
34        ... on Land {
35          area
36          isSharedDeed
37        }
38        ... on Apartment {
39          area
40          bedrooms {
41            id
42            name
43          }
44          bathrooms {
45            id
46            name
47          }
48        }
49        ... on Office {
50          area
51          floorNumber {
52            id
53            name
54          }
55          condition {
56            id
57            name
58          }
59        }
60      }
61    }
62  }
63`;let ue=(()=>{class o{constructor(t,i){this.apollo=t,this.cdr=i,this.data={selectedListingId:null},this.stepComplete=new s.bkB,this.stepBack=new s.bkB,this.listings=[],this.isLoading=!1}ngOnInit(){this.fetchUserActiveListings()}fetchUserActiveListings(){this.isLoading=!0,this.cdr.detectChanges(),this.apollo.query({query:pe,fetchPolicy:"network-only"}).subscribe({next:t=>{console.log("\u2705 Listings fetched successfully:",t.data?.getUserActiveListingsForReel?.length||0),this.listings=t.data?.getUserActiveListingsForReel||[],this.isLoading=!1,this.cdr.detectChanges()},error:t=>{console.error("\u274c Error fetching active listings:",t),this.listings=[],this.isLoading=!1,this.cdr.detectChanges()}})}onListingSelected(t){console.log("\u2705 Listing selected:",t),this.data.selectedListingId=t,console.log("\u2705 data.selectedListingId is now:",this.data.selectedListingId),console.log("\u2705 isNextDisabled should be:",!this.data.selectedListingId),this.cdr.markForCheck(),this.cdr.detectChanges()}isNextDisabled(){const t=!this.data.selectedListingId;return console.log("\u{1f50d} isNextDisabled called, returning:",t,"selectedListingId:",this.data.selectedListingId),t}onNext(){if(console.log("\u{1f680} onNext called with selectedListingId:",this.data.selectedListingId),this.data.selectedListingId){const t=this.listings.find(i=>i.id===this.data.selectedListingId);console.log("\u2705 Selected listing found:",t),this.stepComplete.emit({...this.data,selectedListing:t})}}onBack(){this.stepBack.emit()}static{this.\u0275fac=function(i){return new(i||o)(e.rXU(D.Ic),e.rXU(R.gRc))}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["app-reel-step-three"]],inputs:{data:"data"},outputs:{stepComplete:"stepComplete",stepBack:"stepBack"},features:[e.Jv_([(0,d.EB)({heroMagnifyingGlass:f.e6n,heroXMark:f.QK7})])],decls:4,vars:3,consts:[["dir","rtl",1,"flex","flex-col","min-h-[400px]","p-0"],[1,"flex","flex-col","items-center","justify-center","py-15","px-5","min-h-[400px]"],[3,"listings","selectedListingId"],[1,"flex","justify-center","gap-4","p-5","bg-white","border-t","border-gray-300","sticky","bottom-0","z-10"],[1,"w-12","h-12","border-4","border-gray-300","border-t-primary","rounded-full","animate-spin","mb-5"],[1,"text-gray-600","text-base"],[3,"listingSelected","listings","selectedListingId"],["type","button",1,"next-btn",3,"click","disabled"]],template:function(i,n){1&i&&(e.j41(0,"div",0),e.nVh(1,le,4,0,"div",1),e.nVh(2,ce,1,2,"app-reel-property-selection",2),e.nVh(3,de,3,1,"div",3),e.k0s()),2&i&&(e.R7$(),e.vxM(n.isLoading?1:-1),e.R7$(),e.vxM(n.isLoading?-1:2),e.R7$(),e.vxM(n.isLoading?-1:3))},dependencies:[v.YN,ae],styles:["@keyframes _ngcontent-%COMP%_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}[_nghost-%COMP%]{display:block;padding-bottom:6rem}@media(min-width:769px){[_nghost-%COMP%]{padding-bottom:2rem}}.next-btn[_ngcontent-%COMP%]{width:100%;max-width:15rem;cursor:pointer;border-radius:.75rem;border-width:0px;--tw-bg-opacity: 1;background-color:rgb(72 118 150 / var(--tw-bg-opacity, 1));padding:1rem 2rem;font-size:1.125rem;line-height:1.75rem;font-weight:700;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.next-btn[_ngcontent-%COMP%]:hover:not(:disabled){--tw-bg-opacity: 1;background-color:rgb(54 86 110 / var(--tw-bg-opacity, 1))}.next-btn[_ngcontent-%COMP%]:disabled{cursor:not-allowed;--tw-bg-opacity: 1;background-color:rgb(218 218 218 / var(--tw-bg-opacity, 1))}"]})}}return o})();var me=l(8729),F=l(6116),T=l(8848);const he=["successSound"],ge=["paymentModal"],fe=o=>({"current-circle":o}),ye=o=>({"done-steps":o});function ve(o,a){if(1&o&&(e.j41(0,"div"),e.nrm(1,"hr",20),e.k0s()),2&o){const t=e.XpG().$implicit,i=e.XpG(2);e.R7$(),e.Y8G("ngClass",e.eq3(1,ye,i.currentStep>=t+1))}}function _e(o,a){if(1&o){const t=e.RV6();e.j41(0,"p",19),e.bIt("click",function(){const n=s.eBV(t).$implicit,r=e.XpG(2);return s.Njj(r.currentStep>n&&r.navigateToStep(n))}),e.EFF(1),e.k0s(),e.nVh(2,ve,2,3,"div")}if(2&o){const t=a.$implicit,i=a.$index,n=a.$count,r=e.XpG(2);e.AVh("cursor-pointer",r.currentStep>t),e.Y8G("ngClass",e.eq3(5,fe,r.currentStep>=t)),e.R7$(),e.SpI(" ",t," "),e.R7$(),e.vxM(i!==n-1?2:-1)}}function we(o,a){if(1&o){const t=e.RV6();e.j41(0,"app-reel-step-one",21),e.bIt("stepComplete",function(n){s.eBV(t);const r=e.XpG(2);return s.Njj(r.onStepOneComplete(n))}),e.k0s()}if(2&o){const t=e.XpG(2);
63e.Y8G("data",t.stepOneData)("disableReelTypeSelection",t.lockReelTypeToProperty)}}function be(o,a){if(1&o){const t=e.RV6();e.j41(0,"app-reel-step-two",22),e.bIt("stepComplete",function(n){s.eBV(t);const r=e.XpG(2);return s.Njj(r.onStepTwoComplete(n))}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("data",t.stepTwoData)("reelType",t.stepOneData.reelType)}}function Ce(o,a){if(1&o){const t=e.RV6();e.j41(0,"app-reel-step-three",23),e.bIt("stepComplete",function(n){s.eBV(t);const r=e.XpG(2);return s.Njj(r.onStepThreeComplete(n))})("stepBack",function(){s.eBV(t);const n=e.XpG(2);return s.Njj(n.onStepBack())}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("data",t.stepThreeData)}}function xe(o,a){if(1&o){const t=e.RV6();e.j41(0,"app-reel-step-preview",24),e.bIt("stepComplete",function(){s.eBV(t);const n=e.XpG(2);return s.Njj(n.onStepPreviewComplete())}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("data",t.stepPreviewData)("description","SERVICE"===t.stepOneData.reelType?t.stepTwoData.description:void 0)("companyName",t.stepTwoData.companyName)("reelType",t.stepOneData.reelType)("selectedListing",t.selectedListing||void 0)}}function Pe(o,a){if(1&o&&(e.j41(0,"div",18)(1,"p"),e.EFF(2),e.k0s()()),2&o){const t=e.XpG(2);e.R7$(2),e.JRh(t.errorMessage)}}function Se(o,a){if(1&o){const t=e.RV6();e.j41(0,"div",6)(1,"div",7)(2,"p",8),e.EFF(3,"\u0625\u062e\u062a\u0631 \u0646\u0648\u0639 \u0627\u0644\u0625\u0636\u0627\u0641\u0629"),e.k0s(),e.j41(4,"a",9),e.bIt("click",function(){s.eBV(t);const n=e.XpG();return s.Njj(n.onCloseModal())}),e.nrm(5,"ng-icon",10),e.k0s()(),e.j41(6,"div",11)(7,"div",12),e.Z7z(8,_e,3,7,null,
63null,e.fX1),e.k0s()()(),e.j41(10,"div",13),e.nVh(11,we,1,2,"app-reel-step-one",14),e.nVh(12,be,1,2,"app-reel-step-two",15),e.nVh(13,Ce,1,1,"app-reel-step-three",16),e.nVh(14,xe,1,5,"app-reel-step-preview",17),e.k0s(),e.nVh(15,Pe,3,1,"div",18)}if(2&o){const t=e.XpG();e.R7$(8),e.Dyx(t.getStepIndicator()),e.R7$(3),e.vxM(1===t.currentStep?11:-1),e.R7$(),e.vxM(2===t.currentStep?12:-1),e.R7$(),e.vxM(3!==t.currentStep||"PROPERTY"!==t.stepOneData.reelType||t.lockReelTypeToProperty?-1:13),e.R7$(),e.vxM(t.isPreviewStep?14:-1),e.R7$(),e.vxM(t.errorMessage?15:-1)}}function Te(o,a){1&o&&(e.j41(0,"div",4),e.nrm(1,"div",25),e.j41(2,"p"),e.EFF(3,"\u062c\u0627\u0631\u064a \u0627\u0644\u0625\u0631\u0633\u0627\u0644..."),e.k0s()())}let Me=(()=>{class o{constructor(t,i,n,r,c,y){this.reelsService=t,this.reelsState=i,this.reelPaymentSession=n,this.router=r,this.cdr=c,this.apollo=y,this.closeModal=new s.bkB,this.currentStep=1,this.totalSteps=3,this.stepOneData={reelType:"PROPERTY",publishDuration:null,facebookPublish:!1,selectedPackage:null},this.stepTwoData={companyName:"",description:"",videoFile:null},this.stepThreeData={selectedListingId:null},this.stepPreviewData={videoPreview:null,videoMetadata:null,originalVideoUrl:void 0,mobileVideoUrl:void 0},this.presetListingId=null,this.selectedListing=null,this.isLoading=!1,this.errorMessage="",this.reelFinalized=!1,this.paymentRouteActive=!1,this.destroy$=new C.B,this.handleBeforeUnload=_=>{if(!this.reelFinalized&&this.stepTwoData?.uploadedVideoData?.reelId){_.preventDefault();const w="\u0644\u062f\u064a\u0643 \u0631\u064a\u0644 \u0642\u064a\u062f \u0627\u0644\u0625\u0646\u0634\u0627\u0621. \u0647\u0644 \u062a\u0631\u064a\u062f \u0627\u0644\u0645\u063a\u0627\u062f\u0631\u0629\u061f";return _.returnValue=w,w}}}ngOnInit(){this.cleanupPreviousOrphanedUploads();const t=this.reelsState.getStepOneData(),i=this.reelsState.getStepTwoData(),n=this.reelsState.getStepThreeData(),r=this.reelsState.getStepPreviewData();t&&(this.stepOneData=t,this.updateTotalSteps()),i&&(this.stepTwoData=i),n&&(this.stepThreeData=n),r&&(this.stepPreviewData=r),this.applyPresetListingIfPresent();const c=this.reelsState.getCurrentStep(),y=this.getTotalSteps();c&&c>=1&&c<=y&&(this.currentStep=c),this.setupBeforeUnloadHandler(),this.router.events.pipe((0,E.p)(_=>_ instanceof b.wF),(0,g.Q)(this.destroy$)).subscribe(()=>{this.applyPresetListingIfPresent(),this.syncPaymentModalFromUrl(),this.cdr.markForCheck()}),this.syncPaymentModalFromUrl(),this.cdr.markForCheck()}ngAfterViewInit(){this.syncPaymentModalFromUrl()}syncPaymentModalFromUrl(){const t=this.router.url.match(F.G);if(this.paymentRouteActive=!!t,!t)return void this.cdr.markForCheck();const i=Number(t[1]);this.cdr.markForCheck(),queueMicrotask(()=>{this.paymentModal?.openFromRoute(i),this.cdr.markForCheck()})}readListingIdFromUrl(){if(typeof window<"u"&&window.location?.href)try{const i=new URL(window.location.href).searchParams.get("listingId");if(i?.trim())return i.trim()}catch{}const t=this.router.parseUrl(this.router.url).queryParams.listingId;return"string"==typeof t&&t.trim()?t.trim():Array.isArray(t)&&"string"==typeof t[0]&&t[0].trim()?t[0].trim():null}applyPresetListingIfPresent(){const t=this.readListingIdFromUrl(),i=this.router.url;let n=t?.trim()||null;!n&&typeof sessionStorage<"u"&&(i.includes("/nav/reels/add/step-1")&&!t?sessionStorage.removeItem(T.W):n=sessionStorage.getItem(T.W)?.trim()||null),n?this.presetListingId===n&&this.stepThreeData.selectedListingId===n&&"PROPERTY"===this.stepOneData.reelType||(this.presetListingId=n,typeof sessionStorage<"u"&&sessionStorage.setItem(T.W,n),this.stepThreeData={...this.stepThreeData,selectedListingId:n},this.reelsState.setStepThreeData(this.stepThreeData),this.stepOneData={...this.stepOneData,reelType:"PROPERTY"},this.reelsState.setStepOneData(this.stepOneData),this.updateTotalSteps()):this.presetListingId=null}onPaymentStepChange(t){this.router.navigate(["/nav/reels/add/payment",String(t)],{replaceUrl:!0})}onPaymentCancelled(){this.onCloseModal()}updateStep(t){let i;this.currentStep=t,this.reelsState.setCurrentStep(t),i=t===this.getPreviewStepNumber()?"/nav/reels/add/step-preview":3!==t||"PROPERTY"!==this.stepOneData.reelType||this.lockReelTypeToProperty?`/nav/reels/add/step-${t}`:"/nav/reels/add/step-3",this.router.navigate([i],{replaceUrl:!0,queryParamsHandling:"preserve"}),this.cdr.markForCheck()}onStepOneComplete(t){this.stepOneData=t,this.reelsState.setStepOneData(t),this.updateTotalSteps(),this.updateStep(2)}onStepTwoComplete(t){this.stepTwoData=t,this.reelsState.setStepTwoData(t),this.generateVideoPreview(),"SERVICE"===this.stepOneData.reelType?this.updateStep(3):this.lockReelTypeToProperty?this.applyPresetListingAndAdvanceToPreview():this.updateStep(3)}onStepThreeComplete(t){this.stepThreeData=t,this.reelsState.setStepThreeData(t),this.stepTwoData.listingId=t.selectedListingId||void 0,this.selectedListing=t.selectedListing||null,this.updateStep(this.getPreviewStepNumber())}applyPresetListingAndAdvanceToPreview(){const t=this.stepThreeData.selectedListingId?.trim()||this.presetListingId?.trim()||"";t?(this.stepTwoData={...this.stepTwoData,listingId:t},this.reelsState.setStepTwoData(this.stepTwoData),this.stepThreeData={selectedListingId:t,selectedListing:void 0},this.reelsState.setStepThreeData(this.stepThreeData),this.selectedListing={id:t},this.updateStep(this.getPreviewStepNumber()),this.cdr.markForCheck()):this.updateStep(3)}onStepPreviewComplete(){this.submitReel()}onPaymentConfirmed(){this.reelPaymentSession.clear(),this.paymentRouteActive=!1,this.onCloseModal()}get paymentView(){const t=this.reelPaymentSession.getSession();return t?.serviceName?.trim()&&t.servicePriceText?.trim()?{serviceName:t.serviceName.trim(),servicePriceText:t.servicePriceText.trim(),serviceDurationText:t.serviceDurationText??""}:this.wizardPaymentLabels()}wizardPaymentLabels(){const t=this.stepOneData.selectedPackage;return{serviceName:t?.description?.trim()?t.description.trim():"SERVICE"===this.stepOneData.reelType?'\u0625\u062f\u0627\u0631\u0629 \u0627\u0644\u0645\u062d\u062a\u0648\u0649 \u0627\u0644\u0645\u0631\u0626\u064a "\u0631\u064a\u0644"':"\u0631\u064a\u0644 \u0639\u0642\u0627\u0631",servicePriceText:`${this.getTotalPriceForPayment()} \u062f\u064a\u0646\u0627\u0631`,serviceDurationText:t?.name??""}}getTotalPriceForPayment(){const t=this.stepOneData.selectedPackage;if(!t)return 0;let i=t.price;return this.stepOneData.facebookPublish&&(i+=50),i}openPaymentFlowAfterNewReel(t){const i=this.stepOneData.selectedPackage;i?.id?(this.reelPaymentSession.beginSessionFromPreview({...this.wizardPaymentLabels(),packageId:i.id,reelType:this.stepOneData.reelType,reelId:t??this.stepTwoData.uploadedVideoData?.reelId,totalAmount:this.getTotalPriceForPayment()}),this.paymentRouteActive=!0,this.cdr.markForCheck(),this.router.navigate(["/nav/reels/add/payment","1"],{replaceUrl:!0})):this.onCloseModal()}onStepBack(){if(!(this.currentStep<=1)){if(this.currentStep===this.getPreviewStepNumber()&&"PROPERTY"===this.stepOneData.reelType&&this.lockReelTypeToProperty)return void this.updateStep(2);this.updateStep(this.currentStep-1)}}navigateToStep(t){t<this.currentStep&&this.updateStep(t)}generateVideoPreview(){var t=this;return(0,u.A)(function*(){if(t.stepTwoData.uploadedVideoData)try{t.stepPreviewData.originalVideoUrl=t.stepTwoData.uploadedVideoData.originalVideoUrl,t.stepPreviewData.mobileVideoUrl=t.stepTwoData.uploadedVideoData.mobileVideoUrl,t.stepPreviewData.videoPreview=t.stepTwoData.uploadedVideoData.mobileVideoUrl&&"pending"!==t.stepTwoData.uploadedVideoData.mobileVideoUrl?t.stepTwoData.uploadedVideoData.mobileVideoUrl:t.stepTwoData.uploadedVideoData.originalVideoUrl;const i=t.stepTwoData.uploadedVideoData.fileSize,n=t.stepTwoData.uploadedVideoData.duration||0;t.stepPreviewData.videoMetadata={duration:n>0?`${Math.round(n)} \u062b\u0627\u0646\u064a\u0629`:"0 \u062b\u0627\u0646\u064a\u0629",fileSize:i>0?`${(i/1048576).toFixed(1)} \u0645\u064a\u062c\u0627\u0628\u0627\u064a\u062a`:t.stepTwoData.videoFile?.size?`${(t.stepTwoData.videoFile.size/1048576).toFixed(1)} \u0645\u064a\u062c\u0627\u0628\u0627\u064a\u062a`:"0.0 \u0645\u064a\u062c\u0627\u0628\u0627\u064a\u062a",resolution:"\u062d\u062a\u0649 1080p"},t.reelsState.setStepPreviewData(t.stepPreviewData),t.cdr.markForCheck()}catch{t.fallbackToLocalFile()}else t.stepTwoData.videoFile?t.fallbackToLocalFile():(t.stepPreviewData.videoPreview=null,t.stepPreviewData.videoMetadata=null,t.stepPreviewData.originalVideoUrl=void 0,t.stepPreviewData.mobileVideoUrl=void 0)})()}fallbackToLocalFile(){var t=this;return(0,u.A)(function*(){if(t.stepTwoData.videoFile)try{const i=new FileReader;i.onload=r=>{t.stepPreviewData.videoPreview=r.target?.result,t.cdr.markForCheck()},i.readAsDataURL(t.stepTwoData.videoFile);const n=yield t.reelsService.getVideoMetadata(t.stepTwoData.videoFile);t.stepPreviewData.videoMetadata={duration:`${Math.round(n.duration)} \u062b\u0627\u0646\u064a\u0629`,fileSize:`${(t.stepTwoData.videoFile.size/1048576).toFixed(1)} \u0645\u064a\u062c\u0627\u0628\u0627\u064a\u062a`,resolution:`${n.height}p`},t.cdr.markForCheck()}catch{t.stepPreviewData.videoMetadata={duration:"30 \u062b\u0627\u0646\u064a\u0629",fileSize:"100 \u0645\u064a\u062c\u0627\u0628\u0627\u064a\u062a",resolution:"\u062d\u062a\u0649 1080p"},t.cdr.markForCheck()}})()}submitReel(){var t=this;return(0,u.A)(function*(){if(!t.stepTwoData.uploadedVideoData||!t.stepOneData.selectedPackage)return;const i=t.stepTwoData.uploadedVideoData;if(i.reelId&&i.originalVideoUrl){t.isLoading=!0,t.errorMessage="";try{const n=t.stepTwoData.uploadedVideoData.duration,r="number"==typeof n?n:parseFloat(n)||0,c={reelId:t.stepTwoData.uploadedVideoData.reelId,originalVideoUrl:t.stepTwoData.uploadedVideoData.originalVideoUrl,mobileVideoUrl:t.stepTwoData.uploadedVideoData.mobileVideoUrl||"pending",thumbnailUrl:t.stepTwoData.uploadedVideoData.thumbnailUrl||"",duration:r,fileSize:t.stepTwoData.uploadedVideoData.fileSize,type:t.stepOneData.reelType,packageId:t.stepOneData.selectedPackage?.id,facebookPublish:t.stepOneData.facebookPublish};
63"SERVICE"===t.stepOneData.reelType&&(c.companyName=t.stepTwoData.companyName,c.description=t.stepTwoData.description),"PROPERTY"===t.stepOneData.reelType&&(c.listingId=t.stepTwoData.listingId);const y=t.reelsState.getReactivatingReelId(),_=y??t.stepTwoData.uploadedVideoData?.reelId;if(y)try{yield(0,x._)(t.apollo.mutate({mutation:P.UPDATE_REEL_REACTIVATION_PENDING,variables:{reelId:y,packageId:t.stepOneData.selectedPackage.id,facebookPublish:t.stepOneData.facebookPublish??!1}})),t.reelsState.setReactivatingReelId(null),t.playSuccessSound();const w=typeof window<"u"&&window.innerWidth<768?"center":"bottom-left";(0,S.H)({title:"",text:"\u062a\u0645 \u0625\u0639\u0627\u062f\u0629 \u062a\u0641\u0639\u064a\u0644 \u0627\u0644\u0631\u064a\u0644 \u0648\u0625\u0631\u0633\u0627\u0644\u0647 \u0644\u0644\u0645\u0648\u0627\u0641\u0642\u0629 \u0645\u0646 \u0642\u0628\u0644 \u0627\u0644\u0625\u062f\u0627\u0631\u0629.",icon:"success",position:w,timerProgressBar:!0,timer:3e3})}catch{t.errorMessage="\u0641\u0634\u0644 \u0641\u064a \u0625\u0639\u0627\u062f\u0629 \u062a\u0641\u0639\u064a\u0644 \u0627\u0644\u0631\u064a\u0644. \u064a\u0631\u062c\u0649 \u0627\u0644\u0645\u062d\u0627\u0648\u0644\u0629 \u0645\u0631\u0629 \u0623\u062e\u0631\u0649.";const w=typeof window<"u"&&window.innerWidth<768?"center":"bottom-left";return void(0,S.H)({title:"\u062e\u0637\u0623",text:"\u0641\u0634\u0644 \u0641\u064a \u0625\u0639\u0627\u062f\u0629 \u062a\u0641\u0639\u064a\u0644 \u0627\u0644\u0631\u064a\u0644. \u064a\u0631\u062c\u0649 \u0627\u0644\u0645\u062d\u0627\u0648\u0644\u0629 \u0645\u0631\u0629 \u0623\u062e\u0631\u0649.",icon:"error",position:w,timerProgressBar:!0,timer:3e3})}else{yield(0,x._)(t.reelsService.createReel(c)),t.playSuccessSound();const w=typeof window<"u"&&window.innerWidth<768?"center":"bottom-left";(0,S.H)({title:"",text:"\u0627\u0644\u0631\u062c\u0627\u0621 \u0625\u0643\u0645\u0627\u0644 \u0639\u0645\u0644\u064a\u0629 \u0627\u0644\u062f\u0641\u0639. \u062a\u0645 \u0625\u0631\u0633\u0627\u0644 \u0637\u0644\u0628\u0643 \u0625\u0644\u0649 \u0627\u0644\u0625\u062f\u0627\u0631\u0629 \u0648\u0633\u064a\u062a\u0645 \u0645\u0631\u0627\u062c\u0639\u062a\u0647.",icon:"success",position:w,timerProgressBar:!0,timer:3e3})}t.reelFinalized=!0,setTimeout(()=>{t.openPaymentFlowAfterNewReel(_)},1e3)}catch(n){const r=t.isDuplicatePropertyReelError(n);t.errorMessage=r?"\u062a\u0645\u062a \u0625\u0636\u0627\u0641\u0629 \u0631\u064a\u0644 \u0639\u0644\u0649 \u0647\u0630\u0627 \u0627\u0644\u0639\u0642\u0627\u0631 \u0645\u0646 \u0642\u0628\u0644":"\u0641\u0634\u0644 \u0641\u064a \u0625\u0646\u0634\u0627\u0621 \u0627\u0644\u0631\u064a\u0644. \u064a\u0631\u062c\u0649 \u0627\u0644\u0645\u062d\u0627\u0648\u0644\u0629 \u0645\u0631\u0629 \u0623\u062e\u0631\u0649.";const c=typeof window<"u"&&window.innerWidth<768?"center":"bottom-left";(0,S.H)({title:"",text:t.errorMessage,icon:"error",position:c,timerProgressBar:!0,timer:3e3})}finally{t.isLoading=!1,t.cdr.markForCheck()}}})()}isDuplicatePropertyReelError(t){const i=this.extractErrorMessage(t).toLowerCase();return i.includes("a reel has already been added to this property")||i.includes("\u062a\u0645\u062a \u0625\u0636\u0627\u0641\u0629 \u0631\u064a\u0644 \u0639\u0644\u0649 \u0647\u0630\u0627 \u0627\u0644\u0639\u0642\u0627\u0631 \u0645\u0646 \u0642\u0628\u0644")}extractErrorMessage(t){const i=t?.graphQLErrors?.[0]?.message,n=t?.networkError?.error?.message;return i||n||t?.message||""}getStepTitle(){if(1===this.currentStep)return"\u0625\u062e\u062a\u0631 \u0646\u0648\u0639 \u0627\u0644\u0625\u0636\u0627\u0641\u0629";if(2===this.currentStep)return"\u0625\u0636\u0627\u0641\u0629 \u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u0642\u0635\u064a\u0631";if("PROPERTY"===this.stepOneData.reelType){if(3===this.currentStep&&!this.lockReelTypeToProperty)return"\u0627\u062e\u062a\u0631 \u0627\u0644\u0639\u0642\u0627\u0631";if(this.currentStep===this.getPreviewStepNumber())return"\u0645\u0631\u0627\u062c\u0639\u0629 \u0627\u0644\u0645\u0639\u0644\u0648\u0645\u0627\u062a"}else if(3===this.currentStep)return"\u0645\u0631\u0627\u062c\u0639\u0629 \u0627\u0644\u0645\u0639\u0644\u0648\u0645\u0627\u062a";return""}playSuccessSound(){this.successSound?.nativeElement&&this.successSound.nativeElement.play().catch(t=>{})}getTotalSteps(){return"SERVICE"===this.stepOneData.reelType||this.lockReelTypeToProperty?3:4}updateTotalSteps(){this.totalSteps=this.getTotalSteps()}getStepIndicator(){const t=this.getTotalSteps();return Array.from({length:t},(i,n)=>n+1)}getPreviewStepNumber(){return"SERVICE"===this.stepOneData.reelType||this.lockReelTypeToProperty?3:4}get lockReelTypeToProperty(){return!!this.presetListingId?.trim()}get isPreviewStep(){return this.currentStep===this.getPreviewStepNumber()}onCloseModal(){var t=this;return(0,u.A)(function*(){!t.reelFinalized&&t.stepTwoData.uploadedVideoData?.reelId&&sessionStorage.setItem("reels_needs_cleanup","true"),yield t.cleanupOrphanedUpload(),t.reelsState.clearAllData(),sessionStorage.removeItem("reels_needs_cleanup"),t.router.navigate(["/search"]),t.closeModal.emit()})()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),typeof window<"u"&&window.removeEventListener("beforeunload",this.handleBeforeUnload)}setupBeforeUnloadHandler(){typeof window>"u"||window.addEventListener("beforeunload",this.handleBeforeUnload)}cleanupPreviousOrphanedUploads(){var t=this;return(0,u.A)(function*(){const i=sessionStorage.getItem("reels_needs_cleanup"),r=t.reelsState.getStepTwoData()?.uploadedVideoData?.reelId;if(r&&"true"===i)try{yield(0,x._)(t.reelsService.deleteUploadedVideo(r))}catch{}finally{t.reelsState.clearAllData(),sessionStorage.removeItem("reels_needs_cleanup")}else r&&sessionStorage.removeItem("reels_needs_cleanup")})()}cleanupOrphanedUpload(){var t=this;return(0,u.A)(function*(){if(t.reelFinalized||t.reelsState.getReactivatingReelId())return;const r=t.reelsState.getStepTwoData()?.uploadedVideoData?.reelId;if(r)try{yield(0,x._)(t.reelsService.deleteUploadedVideo(r))}catch{}})()}static{this.\u0275fac=function(i){return new(i||o)(e.rXU(I.ReelsService),e.rXU(T._),e.rXU(F.A),e.rXU(b.Ix),e.rXU(R.gRc),e.rXU(D.Ic))}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["app-add-reels"]],viewQuery:function(i,n){if(1&i&&e.GBs(he,5)(ge,5),2&i){let r;e.mGM(r=e.lsd())&&(n.successSound=r.first),e.mGM(r=e.lsd())&&(n.paymentModal=r.first)}},outputs:{closeModal:"closeModal"},features:[e.Jv_([(0,d.EB)({heroXCircle:f.d1p})])],decls:7,vars:5,consts:[["successSound",""],["paymentModal",""],[1,"reels-container"],["src","../../../assets/sounds/magic-spell.wav"],[1,"loading-overlay"],[3,"confirmPayment","stepChange","cancelled","payment"],[1,"flex","flex-col","justify-center","items-center"],[1,"flex","pt-16"],[1,"text-2xl","font-medium","px-14","sm:px-28"],[1,"items-center","cursor-pointer","sm:flex",3,"click"],["name","heroXCircle","size","36"],[1,"flex","justify-center","items-center","relative","w-1/2"],[1,"flex","my-3","sm:my-8","justify-between","circle"],[1,"step-content"],[3,"data","disableReelType
63Selection"],[3,"data","reelType"],[3,"data"],[3,"data","description","companyName","reelType","selectedListing"],[1,"error-message"],[3,"click","ngClass"],[3,"ngClass"],[3,"stepComplete","data","disableReelTypeSelection"],[3,"stepComplete","data","reelType"],[3,"stepComplete","stepBack","data"],[3,"stepComplete","data","description","companyName","reelType","selectedListing"],[1,"loading-spinner"]],template:function(i,n){1&i&&(e.j41(0,"div",2),e.nrm(1,"audio",3,0),e.nVh(3,Se,16,5),e.nVh(4,Te,4,0,"div",4),e.j41(5,"app-reel-payment-modal",5,1),e.bIt("confirmPayment",function(){return n.onPaymentConfirmed()})("stepChange",function(c){return n.onPaymentStepChange(c)})("cancelled",function(){return n.onPaymentCancelled()}),e.k0s()()),2&i&&(e.AVh("reels-container--payment-only",n.paymentRouteActive),e.R7$(3),e.vxM(n.paymentRouteActive?-1:3),e.R7$(),e.vxM(n.isLoading?4:-1),e.R7$(),e.Y8G("payment",n.paymentView))},dependencies:[h.MD,h.YU,v.YN,d.Uq,L.m,me.K,ue,W,A.J],styles:[".reels-container[_ngcontent-%COMP%]{min-height:100dvh;width:100%;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.reels-container--payment-only[_ngcontent-%COMP%]{min-height:0px;min-width:0px;background-color:transparent;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-sha
63dow)}.circle[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{display:flex;height:2.5rem;width:2.5rem;cursor:pointer;align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(217 217 217 / var(--tw-bg-opacity, 1));font-size:1.125rem;line-height:1.75rem;--tw-text-opacity: 1;color:rgb(151 151 151 / var(--tw-text-opacity, 1))}.circle[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex;align-items:center}.circle[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{width:3.5rem;align-items:center;--tw-text-opacity: 1;color:rgb(217 217 217 / var(--tw-text-opacity, 1))}.circle[_ngcontent-%COMP%] > p.current-circle[_ngcontent-%COMP%]{--tw-bg-opacity: 1 !important;background-color:rgb(35 79 104 / var(--tw-bg-opacity, 1))!important;--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity, 1))!important}.circle[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > hr.done-steps[_ngcontent-%COMP%]{--tw-text-opacity: 1;color:rgb(72 118 150 / var(--tw-text-opacity, 1))}.step-content[_ngcontent-%COMP%]{min-height:24rem}.success-step[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;text-align:center}.success-content[_ngcontent-%COMP%]   .success-icon[_ngcontent-%COMP%]{margin-bottom:1rem;font-size:3rem;line-height:1}.success-title[_ngcontent-%COMP%]{margin-bottom:1rem;font-size:1.5rem;line-height:2rem;font-weight:700;--tw-text-opacity: 1;color:rgb(139 200 63 / var(--tw-text-opacity, 1))}.success-message[_ngcontent-%COMP%]{margin-bottom:.75rem;font-size:1rem;line-height:1.5rem;line-height:1.625;--tw-text-opacity: 1;color:rgb(81 85 92 / var(--tw-text-opacity, 1))}.success-message-en[_ngcontent-%COMP%]{font-size:.875rem;line-height:1.25rem;line-height:1.5;--tw-text-opacity: 1;color:rgb(151 151 151 / var(--tw-text-opacity, 1))}.error-message[_ngcontent-%COMP%]{margin-left:1.5rem;margin-right:1.5rem;border-radius:.5rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(251 42 42 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(251 42 42 / var(--tw-bg-opacity, 1));padding:1rem;text-align:center}.error-message[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-weight:500;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.loading-overlay[_ngcontent-%COMP%]{position:absolute;inset:0;z-index:50;display:flex;flex-direction:column;align-items:center;justify-content:center;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));--tw-bg-opacity: .9 }.loading-spinner[_ngcontent-%COMP%]{margin-bottom:1rem;height:2.5rem;width:2.5rem}@keyframes _ngcontent-%COMP%_spin{to{transform:rotate(360deg)}}.loading-spinner[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_spin 1s linear infinite;border-radius:9999px;border-width:4px;border-color:rgb(210 210 210 / var(--tw-border-opacity, 1));--tw-border-opacity: 1;border-top-color:rgb(72 118 150 / var(--tw-border-opacity, 1))}@media(max-width:639px){.circle[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{width:2rem;align-items:center;--tw-text-opacity: 1;color:rgb(217 217 217 / var(--tw-text-opacity, 1))}.circle[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{height:1.75rem;width:1.75rem;font-size:.875rem;line-height:1.25rem}.success-step[_ngcontent-%COMP%]{padding:2rem 1rem}.success-title[_ngcontent-%COMP%]{font-size:1.25rem;line-height:1.75rem}.success-message[_ngcontent-%COMP%]{font-size:.875rem;line-height:1.25rem}.success-message-en[_ngcontent-%COMP%]{font-size:.75rem;line-height:1rem}}"]})}}return o})();var ke=l(3704);const Fe=["reelsModal"];function Ee(o,a){if(1&o){const t=e.RV6();e.j41(0,"app-add-reels",2),e.bIt("closeModal",function(){s.eBV(t);const n=e.XpG();return s.Njj(n.closeReelsModal())}),e.k0s()}}let Ie=(()=>{class o{constructor(t,i,n,r,c,y){this.router=t,this.route=i,this.reelsStateService=n,this.userService=r,this.authModalService=c,this.cdr=y,this.showReelsModal=!1,this.user=null,this.reelsModalConfig={close:!1,class:"w-full md:w-4/5 lg:w-8/12 h-full"},this.destroy$=new C.B}ngOnInit(){this.userService.getUser().pipe((0,k.$)(),(0,g.Q)(this.destroy$)).subscribe(t=>{if(this.user=t,!this.user?.id)return this.authModalService.openAuthModal(this.router.url),void this.router.navigate(["/search"],{replaceUrl:!0});const i=this.route.firstChild;if(i)if("payment/:paymentStep"===(i.snapshot.routeConfig?.path??"")){const r=i.snapshot.paramMap.get("paymentStep");if("1"!==r&&"2"!==r)this.router.navigate(["/map"],{replaceUrl:!0});else{const c=this.reelsStateService.getStepOneData(),y=this.reelsStateService.getStepThreeData();if(c?.reelType){const _="PROPERTY"===c.reelType&&!!y?.selectedListingId?.trim();this.reelsStateService.setCurrentStep("PROPERTY"===c.reelType?_?3:4:3)}}}else{const c=i.snapshot.data?.step;void 0!==c&&this.reelsStateService.setCurrentStep(c)}this.applyReelsModalShellForUrl(this.router.url),this.router.events.pipe((0,E.p)(n=>n instanceof b.wF),(0,g.Q)(this.destroy$)).subscribe(()=>this.applyReelsModalShellForUrl(this.router.url)),setTimeout(()=>{this.showReelsModal=!0,this.cdr.detectChanges(),this.reelsModal?.openDialog()})})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}applyReelsModalShellForUrl(t){const i=F.G.test(t);
63this.reelsModalConfig=i?{close:!1,class:"!rounded-none w-full h-full max-w-none min-h-0 bg-transparent shadow-none p-0 m-0 border-0 overflow-visible flex items-stretch justify-center"}:{close:!1,class:"w-full md:w-4/5 lg:w-8/12 h-full"}}closeReelsModal(){this.showReelsModal=!1,this.reelsModal&&this.reelsModal.isOpen&&this.reelsModal.closeDialog(),this.router.navigate(["/search"])}static{this.\u0275fac=function(i){return new(i||o)(e.rXU(b.Ix),e.rXU(b.nX),e.rXU(T._),e.rXU(m.D),e.rXU(ke.H),e.rXU(R.gRc))}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["app-reels"]],viewQuery:function(i,n){if(1&i&&e.GBs(Fe,5),2&i){let r;e.mGM(r=e.lsd())&&(n.reelsModal=r.first)}},decls:3,vars:2,consts:[["reelsModal",""],[3,"config"],[3,"closeModal"]],template:function(i,n){1&i&&(e.j41(0,"app-modal",1,0),e.nVh(2,Ee,1,0,"app-add-reels"),e.k0s()),2&i&&(e.Y8G("config",n.reelsModalConfig),e.R7$(2),e.vxM(n.showReelsModal?2:-1))},dependencies:[p.z,Me],encapsulation:2})}}return o})()},8621(O,M,l){l.d(M,{a:()=>k});var b=l(177),C=l(7266);let k=(()=>{class g{constructor(p){this.platformId=p,this.eventCleanupFunctions=[],this.isBrowser=(0,b.UE)(this.platformId),this.isMobile=!!this.isBrowser&&this.detectMobile(),this.isIOS=!!this.isBrowser&&this.detectIOS(),this.isAndroid=!!this.isBrowser&&this.detectAndroid()}detectMobile(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}detectIOS(){return/iPhone|iPad|iPod/i.test(navigator.userAgent)}detectAndroid(){return/Android/i.test(navigator.userAgent)}initialize(){!this.isBrowser||!this.isMobile||(this.addDeviceClass(),this.isIOS?this.setupIOSScrollPrevention():this.isAndroid&&this.setupAndroidScrollPrevention(),this.setupDoubleTapPrevention(),this.updateViewportMeta())}addDeviceClass(){this.isIOS?document.body.classList.add("ios-device"):this.isAndroid&&document.body.classList.add("android")}setupIOSScrollPrevention(){const p=()=>{if(this.isStaticContentRoute())return void this.releaseDocumentViewportFix();document.documentElement.style.height="100dvh",document.documentElement.style.overflow="hidden",document.documentElement.style.position="fixed",document.documentElement.style.width="100%",document.documentElement.style.overscrollBehavior="none",document.documentElement.style.touchAction="pan-x pan-y",document.body.style.height="100dvh",document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.width="100%",document.body.style.overscrollBehavior="none",document.body.style.touchAction="pan-x pan-y",document.body.style.webkitOverflowScrolling="touch",document.querySelectorAll(".mobile-scroll-container, .mobile-scroll-cards, .cards").forEach(v=>{const d=v;d.style.height="calc(100dvh - 120px)",d.style.overflowY="auto",d.style.overflowX="hidden",d.style.webkitOverflowScrolling="touch",d.style.overscrollBehaviorY="contain"});const s=document.querySelector("app-home");s&&(s.style.height="100%",s.style.overflow="hidden")};p();const m=h=>{this.isStaticContentRoute()||(document.body.scrollTop>0||document.documentElement.scrollTop>0)&&(h.preventDefault(),window.scrollTo(0,0),document.body.scrollTop=0,document.documentElement.scrollTop=0)};window.addEventListener("scroll",m,{passive:!1}),document.addEventListener("scroll",m,{passive:!1});const u=()=>{const h=window.innerHeight;Math.abs(h-window.lastViewportHeight||0)>50&&(window.lastViewportHeight=h,p())};window.addEventListener("resize",u),window.addEventListener("orientationchange",()=>setTimeout(u,100)),this.eventCleanupFunctions.push(()=>window.removeEventListener("scroll",m),()=>document.removeEventListener("scroll",m),()=>window.removeEventListener("resize",u),()=>window.removeEventListener("orientationchange",u))}static{this.ALLOW_PULL_TO_REFRESH="allow-pull-to-refresh"}setupAndroidScrollPrevention(){const p=()=>{if(this.isStaticContentRoute())return void this.releaseDocumentViewportFix();const u=window.innerHeight;document.body.classList.contains(g.ALLOW_PULL_TO_REFRESH)||(document.body.style.height="100dvh",document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.width="100%",document.body.style.overscrollBehavior="none"),document.querySelectorAll(".mobile-scroll-container, .mobile-scroll-cards").forEach(s=>{s.style.height=u-120+"px",s.style.overflowY="auto",s.style.setProperty("-webkit-overflow-scrolling","touch")})};p();const m=()=>{this.isStaticContentRoute()||(document.body.scrollTop>0||document.documentElement.scrollTop>0)&&window.scrollTo(0,0)};window.addEventListener("scroll",m),window.addEventListener("resize",p),this.eventCleanupFunctions.push(()=>window.removeEventListener("scroll",m),()=>window.removeEventListener("resize",p))}setupDoubleTapPrevention(){let p=0,m=0;const u=d=>!!d.target?.closest("#map, google-map, .gm-style"),h=d=>{if(u(d))return;const f=Date.now();f-p<=300&&d.preventDefault(),p=f},s=d=>
63{if(!u(d))if(d.touches.length>1){if(d.preventDefault(),2===d.touches.length){const f=d.touches[0],x=d.touches[1],P=Math.sqrt(Math.pow(x.clientX-f.clientX,2)+Math.pow(x.clientY-f.clientY,2));m>0&&Math.abs(P-m)>10&&d.preventDefault(),m=P}}else m=0},v=d=>{u(d)||d.preventDefault()};document.addEventListener("touchend",h,{passive:!1}),document.addEventListener("touchstart",s,{passive:!1}),document.addEventListener("touchmove",s,{passive:!1}),this.isIOS&&(document.addEventListener("gesturestart",v,{passive:!1}),document.addEventListener("gesturechange",v,{passive:!1}),document.addEventListener("gestureend",v,{passive:!1})),this.eventCleanupFunctions.push(()=>document.removeEventListener("touchend",h),()=>document.removeEventListener("touchstart",s),()=>document.removeEventListener("touchmove",s)),this.isIOS&&this.eventCleanupFunctions.push(()=>document.removeEventListener("gesturestart",v),()=>document.removeEventListener("gesturechange",v),()=>document.removeEventListener("gestureend",v))}updateViewportMeta(){const p=document.querySelector('meta[name="viewport"]');p&&p.setAttribute("content","width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, viewport-fit=cover, shrink-to-fit=no")}forceViewportFix(){!this.isBrowser||!this.isMobile||document.body.classList.contains(g.ALLOW_PULL_TO_REFRESH)||this.isStaticContentRoute()||(this.isIOS?(document.documentElement.style.height="100dvh",document.documentElement.style.overflow="hidden",document.documentElement.style.position="fixed",document.documentElement.style.width="100%",document.documentElement.style.overscrollBehavior="none",document.documentElement.style.touchAction="pan-x pan-y",document.body.style.height="100dvh",document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.width="100%",document.body.style.overscrollBehavior="none",document.body.style.touchAction="pan-x pan-y"):this.isAndroid&&(document.body.style.height="100dvh",document.body.style.overflow="hidden",document.body.style.position="fixed"))}releaseDocumentViewportFix(){document.documentElement.style.height="",document.documentElement.style.overflow="",document.documentElement.style.position="",document.documentElement.style.width="",document.documentElement.style.overscrollBehavior="",document.documentElement.style.touchAction="",document.body.style.height="",document.body.style.overflow="",document.body.style.position="",document.body.style.width="",document.body.style.overscrollBehavior="",document.body.style.touchAction=""}static{this.STATIC_CONTENT_ROUTES=["/blog","/about","/terms","/policy","/help","/support","/not-found"]}isStaticContentRoute(p){const m=(p??window.location.pathname).split("?")[0].split("#")[0];return g.STATIC_CONTENT_ROUTES.some(u=>m===u||m.startsWith(`${u}/`))}handleNavigation(p){!this.isBrowser||!this.isMobile||setTimeout(()=>{this.isStaticContentRoute(p)?this.releaseDocumentViewportFix():this.forceViewportFix()},100)}get isBrowserEnv(){return this.isBrowser}get isMobileDevice(){return this.isMobile}get isIOSDevice(){return this.isIOS}get isAndroidDevice(){return this.isAndroid}destroy(){this.eventCleanupFunctions.forEach(p=>p()),this.eventCleanupFunctions=[]}static{this.\u0275fac=function(m){return new(m||g)(C.KVO(C.Agw))}}static{this.\u0275prov=C.jDH({token:g,factory:g.\u0275fac,providedIn:"root"})}}return g})()}}]);

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.