@mapvx/website-component 0.13.0 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/main.js +1 -1
- package/package.json +1 -1
package/dist/browser/main.js
CHANGED
|
@@ -1509,7 +1509,7 @@ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered a
|
|
|
1509
1509
|
`))});document=Me(ui);sanitizer=Me(ty);config=Me(wU);iconLibrary=Me(dy);stackItem=Me(TU,{optional:!0});stack=Me(MU,{optional:!0});constructor(){this.stack!=null&&this.stackItem==null&&console.error('FontAwesome: fa-icon and fa-duotone-icon elements must specify stackItemSize attribute when wrapped into fa-stack. Example: <fa-icon stackItemSize="2x" />.')}findIconDefinition(i){let l=DU(i,this.config.defaultPrefix);if("icon"in l)return l;let d=this.iconLibrary.getIconDefinition(l.prefix,l.iconName);return d??(xU(l),null)}buildParams(){let i=this.fixedWidth(),l={flip:this.flip(),animation:this.animation(),border:this.border(),inverse:this.inverse(),size:this.size(),pull:this.pull(),rotate:this.rotate(),fixedWidth:typeof i=="boolean"?i:this.config.fixedWidth,stackItemSize:this.stackItem!=null?this.stackItem.stackItemSize():void 0},d=this.transform(),a=typeof d=="string"?Bk.transform(d):d,I=this.mask(),R=I!=null?this.findIconDefinition(I):null,L={},H=this.a11yRole();H!=null&&(L.role=H);let K={};return l.rotate!=null&&!Uk(l.rotate)&&(K["--fa-rotate-angle"]=`${l.rotate}`),{title:this.title(),transform:a,classes:SU(l),mask:R??void 0,symbol:this.symbol(),attributes:L,styles:K}}static \u0275fac=function(l){return new(l||n)};static \u0275cmp=cn({type:n,selectors:[["fa-icon"]],hostAttrs:[1,"ng-fa-icon"],hostVars:2,hostBindings:function(l,d){l&2&&(Y0("innerHTML",d.renderedIconHTML(),Vd),zg("title",d.title()??void 0))},inputs:{icon:[1,"icon"],title:[1,"title"],animation:[1,"animation"],mask:[1,"mask"],flip:[1,"flip"],size:[1,"size"],pull:[1,"pull"],border:[1,"border"],inverse:[1,"inverse"],symbol:[1,"symbol"],rotate:[1,"rotate"],fixedWidth:[1,"fixedWidth"],transform:[1,"transform"],a11yRole:[1,"a11yRole"]},outputs:{icon:"iconChange",title:"titleChange",animation:"animationChange",mask:"maskChange",flip:"flipChange",size:"sizeChange",pull:"pullChange",border:"borderChange",inverse:"inverseChange",symbol:"symbolChange",rotate:"rotateChange",fixedWidth:"fixedWidthChange",transform:"transformChange",a11yRole:"a11yRoleChange"},decls:0,vars:0,template:function(l,d){},encapsulation:2,changeDetection:0})}return n})();var D_=(()=>{class n{static \u0275fac=function(l){return new(l||n)};static \u0275mod=yc({type:n});static \u0275inj=vl({})}return n})();var Wn=class n{iconLibrary=Me(dy);logger=Me(qn);getIconDefinition(r,i){let l=this.iconLibrary.getIconDefinition(r,i);return l||(this.logger.logWarning(new Error(`Icon definition not found for ${r} ${i}`)),cC)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=zt({token:n,factory:n.\u0275fac})};var Nn="primary",Iy=Symbol("RouteTitle"),YC=class{params;constructor(r){this.params=r||{}}has(r){return Object.prototype.hasOwnProperty.call(this.params,r)}get(r){if(this.has(r)){let i=this.params[r];return Array.isArray(i)?i[0]:i}return null}getAll(r){if(this.has(r)){let i=this.params[r];return Array.isArray(i)?i:[i]}return[]}get keys(){return Object.keys(this.params)}};function If(n){return new YC(n)}function Kk(n,r,i){let l=i.path.split("/");if(l.length>n.length||i.pathMatch==="full"&&(r.hasChildren()||l.length<n.length))return null;let d={};for(let a=0;a<l.length;a++){let I=l[a],R=n[a];if(I[0]===":")d[I.substring(1)]=R;else if(I!==R.path)return null}return{consumed:n.slice(0,l.length),posParams:d}}function AU(n,r){if(n.length!==r.length)return!1;for(let i=0;i<n.length;++i)if(!wc(n[i],r[i]))return!1;return!0}function wc(n,r){let i=n?KC(n):void 0,l=r?KC(r):void 0;if(!i||!l||i.length!=l.length)return!1;let d;for(let a=0;a<i.length;a++)if(d=i[a],!Xk(n[d],r[d]))return!1;return!0}function KC(n){return[...Object.keys(n),...Object.getOwnPropertySymbols(n)]}function Xk(n,r){if(Array.isArray(n)&&Array.isArray(r)){if(n.length!==r.length)return!1;let i=[...n].sort(),l=[...r].sort();return i.every((d,a)=>l[a]===d)}else return n===r}function Jk(n){return n.length>0?n[n.length-1]:null}function ku(n){return Gb(n)?n:_f(n)?ri(Promise.resolve(n)):Cn(n)}var kU={exact:eR,subset:tR},Qk={exact:RU,subset:OU,ignored:()=>!0};function $k(n,r,i){return kU[i.paths](n.root,r.root,i.matrixParams)&&Qk[i.queryParams](n.queryParams,r.queryParams)&&!(i.fragment==="exact"&&n.fragment!==r.fragment)}function RU(n,r){return wc(n,r)}function eR(n,r,i){if(!Sf(n.segments,r.segments)||!P_(n.segments,r.segments,i)||n.numberOfChildren!==r.numberOfChildren)return!1;for(let l in r.children)if(!n.children[l]||!eR(n.children[l],r.children[l],i))return!1;return!0}function OU(n,r){return Object.keys(r).length<=Object.keys(n).length&&Object.keys(r).every(i=>Xk(n[i],r[i]))}function tR(n,r,i){return nR(n,r,r.segments,i)}function nR(n,r,i,l){if(n.segments.length>i.length){let d=n.segments.slice(0,i.length);return!(!Sf(d,i)||r.hasChildren()||!P_(d,i,l))}else if(n.segments.length===i.length){if(!Sf(n.segments,i)||!P_(n.segments,i,l))return!1;for(let d in r.children)if(!n.children[d]||!tR(n.children[d],r.children[d],l))return!1;return!0}else{let d=i.slice(0,n.segments.length),a=i.slice(n.segments.length);return!Sf(n.segments,d)||!P_(n.segments,d,l)||!n.children[Nn]?!1:nR(n.children[Nn],r,a,l)}}function P_(n,r,i){return r.every((l,d)=>Qk[i](n[d].parameters,l.parameters))}var Cc=class{root;queryParams;fragment;_queryParamMap;constructor(r=new kr([],{}),i={},l=null){this.root=r,this.queryParams=i,this.fragment=l}get queryParamMap(){return this._queryParamMap??=If(this.queryParams),this._queryParamMap}toString(){return NU.serialize(this)}},kr=class{segments;children;parent=null;constructor(r,i){this.segments=r,this.children=i,Object.values(i).forEach(l=>l.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return A_(this)}},Kd=class{path;parameters;_parameterMap;constructor(r,i){this.path=r,this.parameters=i}get parameterMap(){return this._parameterMap??=If(this.parameters),this._parameterMap}toString(){return iR(this)}};function LU(n,r){return Sf(n,r)&&n.every((i,l)=>wc(i.parameters,r[l].parameters))}function Sf(n,r){return n.length!==r.length?!1:n.every((i,l)=>i.path===r[l].path)}function FU(n,r){let i=[];return Object.entries(n.children).forEach(([l,d])=>{l===Nn&&(i=i.concat(r(d,l)))}),Object.entries(n.children).forEach(([l,d])=>{l!==Nn&&(i=i.concat(r(d,l)))}),i}var Dy=(()=>{class n{static \u0275fac=function(l){return new(l||n)};static \u0275prov=zt({token:n,factory:()=>new Df,providedIn:"root"})}return n})(),Df=class{parse(r){let i=new JC(r);return new Cc(i.parseRootSegment(),i.parseQueryParams(),i.parseFragment())}serialize(r){let i=`/${hy(r.root,!0)}`,l=BU(r.queryParams),d=typeof r.fragment=="string"?`#${zU(r.fragment)}`:"";return`${i}${l}${d}`}},NU=new Df;function A_(n){return n.segments.map(r=>iR(r)).join("/")}function hy(n,r){if(!n.hasChildren())return A_(n);if(r){let i=n.children[Nn]?hy(n.children[Nn],!1):"",l=[];return Object.entries(n.children).forEach(([d,a])=>{d!==Nn&&l.push(`${d}:${hy(a,!1)}`)}),l.length>0?`${i}(${l.join("//")})`:i}else{let i=FU(n,(l,d)=>d===Nn?[hy(n.children[Nn],!1)]:[`${d}:${hy(l,!1)}`]);return Object.keys(n.children).length===1&&n.children[Nn]!=null?`${A_(n)}/${i[0]}`:`${A_(n)}/(${i.join("//")})`}}function rR(n){return encodeURIComponent(n).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function T_(n){return rR(n).replace(/%3B/gi,";")}function zU(n){return encodeURI(n)}function XC(n){return rR(n).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function k_(n){return decodeURIComponent(n)}function Gk(n){return k_(n.replace(/\+/g,"%20"))}function iR(n){return`${XC(n.path)}${jU(n.parameters)}`}function jU(n){return Object.entries(n).map(([r,i])=>`;${XC(r)}=${XC(i)}`).join("")}function BU(n){let r=Object.entries(n).map(([i,l])=>Array.isArray(l)?l.map(d=>`${T_(i)}=${T_(d)}`).join("&"):`${T_(i)}=${T_(l)}`).filter(i=>i);return r.length?`?${r.join("&")}`:""}var VU=/^[^\/()?;#]+/;function HC(n){let r=n.match(VU);return r?r[0]:""}var UU=/^[^\/()?;=#]+/;function $U(n){let r=n.match(UU);return r?r[0]:""}var GU=/^[^=?&#]+/;function HU(n){let r=n.match(GU);return r?r[0]:""}var qU=/^[^&#]+/;function WU(n){let r=n.match(qU);return r?r[0]:""}var JC=class{url;remaining;constructor(r){this.url=r,this.remaining=r}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new kr([],{}):new kr([],this.parseChildren())}parseQueryParams(){let r={};if(this.consumeOptional("?"))do this.parseQueryParam(r);while(this.consumeOptional("&"));return r}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let r=[];for(this.peekStartsWith("(")||r.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),r.push(this.parseSegment());let i={};this.peekStartsWith("/(")&&(this.capture("/"),i=this.parseParens(!0));let l={};return this.peekStartsWith("(")&&(l=this.parseParens(!1)),(r.length>0||Object.keys(i).length>0)&&(l[Nn]=new kr(r,i)),l}parseSegment(){let r=HC(this.remaining);if(r===""&&this.peekStartsWith(";"))throw new Ht(4009,!1);return this.capture(r),new Kd(k_(r),this.parseMatrixParams())}parseMatrixParams(){let r={};for(;this.consumeOptional(";");)this.parseParam(r);return r}parseParam(r){let i=$U(this.remaining);if(!i)return;this.capture(i);let l="";if(this.consumeOptional("=")){let d=HC(this.remaining);d&&(l=d,this.capture(l))}r[k_(i)]=k_(l)}parseQueryParam(r){let i=HU(this.remaining);if(!i)return;this.capture(i);let l="";if(this.consumeOptional("=")){let I=WU(this.remaining);I&&(l=I,this.capture(l))}let d=Gk(i),a=Gk(l);if(r.hasOwnProperty(d)){let I=r[d];Array.isArray(I)||(I=[I],r[d]=I),I.push(a)}else r[d]=a}parseParens(r){let i={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let l=HC(this.remaining),d=this.remaining[l.length];if(d!=="/"&&d!==")"&&d!==";")throw new Ht(4010,!1);let a;l.indexOf(":")>-1?(a=l.slice(0,l.indexOf(":")),this.capture(a),this.capture(":")):r&&(a=Nn);let I=this.parseChildren();i[a??Nn]=Object.keys(I).length===1&&I[Nn]?I[Nn]:new kr([],I),this.consumeOptional("//")}return i}peekStartsWith(r){return this.remaining.startsWith(r)}consumeOptional(r){return this.peekStartsWith(r)?(this.remaining=this.remaining.substring(r.length),!0):!1}capture(r){if(!this.consumeOptional(r))throw new Ht(4011,!1)}};function oR(n){return n.segments.length>0?new kr([],{[Nn]:n}):n}function sR(n){let r={};for(let[l,d]of Object.entries(n.children)){let a=sR(d);if(l===Nn&&a.segments.length===0&&a.hasChildren())for(let[I,R]of Object.entries(a.children))r[I]=R;else(a.segments.length>0||a.hasChildren())&&(r[l]=a)}let i=new kr(n.segments,r);return ZU(i)}function ZU(n){if(n.numberOfChildren===1&&n.children[Nn]){let r=n.children[Nn];return new kr(n.segments.concat(r.segments),r.children)}return n}function im(n){return n instanceof Cc}function aR(n,r,i=null,l=null){let d=lR(n);return cR(d,r,i,l)}function lR(n){let r;function i(a){let I={};for(let L of a.children){let H=i(L);I[L.outlet]=H}let R=new kr(a.url,I);return a===n&&(r=R),R}let l=i(n.root),d=oR(l);return r??d}function cR(n,r,i,l){let d=n;for(;d.parent;)d=d.parent;if(r.length===0)return qC(d,d,d,i,l);let a=YU(r);if(a.toRoot())return qC(d,d,new kr([],{}),i,l);let I=KU(a,d,n),R=I.processChildren?py(I.segmentGroup,I.index,a.commands):dR(I.segmentGroup,I.index,a.commands);return qC(d,I.segmentGroup,R,i,l)}function R_(n){return typeof n=="object"&&n!=null&&!n.outlets&&!n.segmentPath}function yy(n){return typeof n=="object"&&n!=null&&n.outlets}function qC(n,r,i,l,d){let a={};l&&Object.entries(l).forEach(([L,H])=>{a[L]=Array.isArray(H)?H.map(K=>`${K}`):`${H}`});let I;n===r?I=i:I=uR(n,r,i);let R=oR(sR(I));return new Cc(R,a,d)}function uR(n,r,i){let l={};return Object.entries(n.children).forEach(([d,a])=>{a===r?l[d]=i:l[d]=uR(a,r,i)}),new kr(n.segments,l)}var O_=class{isAbsolute;numberOfDoubleDots;commands;constructor(r,i,l){if(this.isAbsolute=r,this.numberOfDoubleDots=i,this.commands=l,r&&l.length>0&&R_(l[0]))throw new Ht(4003,!1);let d=l.find(yy);if(d&&d!==Jk(l))throw new Ht(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function YU(n){if(typeof n[0]=="string"&&n.length===1&&n[0]==="/")return new O_(!0,0,n);let r=0,i=!1,l=n.reduce((d,a,I)=>{if(typeof a=="object"&&a!=null){if(a.outlets){let R={};return Object.entries(a.outlets).forEach(([L,H])=>{R[L]=typeof H=="string"?H.split("/"):H}),[...d,{outlets:R}]}if(a.segmentPath)return[...d,a.segmentPath]}return typeof a!="string"?[...d,a]:I===0?(a.split("/").forEach((R,L)=>{L==0&&R==="."||(L==0&&R===""?i=!0:R===".."?r++:R!=""&&d.push(R))}),d):[...d,a]},[]);return new O_(i,r,l)}var nm=class{segmentGroup;processChildren;index;constructor(r,i,l){this.segmentGroup=r,this.processChildren=i,this.index=l}};function KU(n,r,i){if(n.isAbsolute)return new nm(r,!0,0);if(!i)return new nm(r,!1,NaN);if(i.parent===null)return new nm(i,!0,0);let l=R_(n.commands[0])?0:1,d=i.segments.length-1+l;return XU(i,d,n.numberOfDoubleDots)}function XU(n,r,i){let l=n,d=r,a=i;for(;a>d;){if(a-=d,l=l.parent,!l)throw new Ht(4005,!1);d=l.segments.length}return new nm(l,!1,d-a)}function JU(n){return yy(n[0])?n[0].outlets:{[Nn]:n}}function dR(n,r,i){if(n??=new kr([],{}),n.segments.length===0&&n.hasChildren())return py(n,r,i);let l=QU(n,r,i),d=i.slice(l.commandIndex);if(l.match&&l.pathIndex<n.segments.length){let a=new kr(n.segments.slice(0,l.pathIndex),{});return a.children[Nn]=new kr(n.segments.slice(l.pathIndex),n.children),py(a,0,d)}else return l.match&&d.length===0?new kr(n.segments,{}):l.match&&!n.hasChildren()?QC(n,r,i):l.match?py(n,0,d):QC(n,r,i)}function py(n,r,i){if(i.length===0)return new kr(n.segments,{});{let l=JU(i),d={};if(Object.keys(l).some(a=>a!==Nn)&&n.children[Nn]&&n.numberOfChildren===1&&n.children[Nn].segments.length===0){let a=py(n.children[Nn],r,i);return new kr(n.segments,a.children)}return Object.entries(l).forEach(([a,I])=>{typeof I=="string"&&(I=[I]),I!==null&&(d[a]=dR(n.children[a],r,I))}),Object.entries(n.children).forEach(([a,I])=>{l[a]===void 0&&(d[a]=I)}),new kr(n.segments,d)}}function QU(n,r,i){let l=0,d=r,a={match:!1,pathIndex:0,commandIndex:0};for(;d<n.segments.length;){if(l>=i.length)return a;let I=n.segments[d],R=i[l];if(yy(R))break;let L=`${R}`,H=l<i.length-1?i[l+1]:null;if(d>0&&L===void 0)break;if(L&&H&&typeof H=="object"&&H.outlets===void 0){if(!qk(L,H,I))return a;l+=2}else{if(!qk(L,{},I))return a;l++}d++}return{match:!0,pathIndex:d,commandIndex:l}}function QC(n,r,i){let l=n.segments.slice(0,r),d=0;for(;d<i.length;){let a=i[d];if(yy(a)){let L=e$(a.outlets);return new kr(l,L)}if(d===0&&R_(i[0])){let L=n.segments[r];l.push(new Kd(L.path,Hk(i[0]))),d++;continue}let I=yy(a)?a.outlets[Nn]:`${a}`,R=d<i.length-1?i[d+1]:null;I&&R&&R_(R)?(l.push(new Kd(I,Hk(R))),d+=2):(l.push(new Kd(I,{})),d++)}return new kr(l,{})}function e$(n){let r={};return Object.entries(n).forEach(([i,l])=>{typeof l=="string"&&(l=[l]),l!==null&&(r[i]=QC(new kr([],{}),0,l))}),r}function Hk(n){let r={};return Object.entries(n).forEach(([i,l])=>r[i]=`${l}`),r}function qk(n,r,i){return n==i.path&&wc(r,i.parameters)}var my="imperative",Ho=(function(n){return n[n.NavigationStart=0]="NavigationStart",n[n.NavigationEnd=1]="NavigationEnd",n[n.NavigationCancel=2]="NavigationCancel",n[n.NavigationError=3]="NavigationError",n[n.RoutesRecognized=4]="RoutesRecognized",n[n.ResolveStart=5]="ResolveStart",n[n.ResolveEnd=6]="ResolveEnd",n[n.GuardsCheckStart=7]="GuardsCheckStart",n[n.GuardsCheckEnd=8]="GuardsCheckEnd",n[n.RouteConfigLoadStart=9]="RouteConfigLoadStart",n[n.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",n[n.ChildActivationStart=11]="ChildActivationStart",n[n.ChildActivationEnd=12]="ChildActivationEnd",n[n.ActivationStart=13]="ActivationStart",n[n.ActivationEnd=14]="ActivationEnd",n[n.Scroll=15]="Scroll",n[n.NavigationSkipped=16]="NavigationSkipped",n})(Ho||{}),va=class{id;url;constructor(r,i){this.id=r,this.url=i}},Tf=class extends va{type=Ho.NavigationStart;navigationTrigger;restoredState;constructor(r,i,l="imperative",d=null){super(r,i),this.navigationTrigger=l,this.restoredState=d}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},Pu=class extends va{urlAfterRedirects;type=Ho.NavigationEnd;constructor(r,i,l){super(r,i),this.urlAfterRedirects=l}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},$s=(function(n){return n[n.Redirect=0]="Redirect",n[n.SupersededByNewNavigation=1]="SupersededByNewNavigation",n[n.NoDataFromResolver=2]="NoDataFromResolver",n[n.GuardRejected=3]="GuardRejected",n[n.Aborted=4]="Aborted",n})($s||{}),vy=(function(n){return n[n.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",n[n.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",n})(vy||{}),xc=class extends va{reason;code;type=Ho.NavigationCancel;constructor(r,i,l,d){super(r,i),this.reason=l,this.code=d}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},Au=class extends va{reason;code;type=Ho.NavigationSkipped;constructor(r,i,l,d){super(r,i),this.reason=l,this.code=d}},om=class extends va{error;target;type=Ho.NavigationError;constructor(r,i,l,d){super(r,i),this.error=l,this.target=d}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},_y=class extends va{urlAfterRedirects;state;type=Ho.RoutesRecognized;constructor(r,i,l,d){super(r,i),this.urlAfterRedirects=l,this.state=d}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},L_=class extends va{urlAfterRedirects;state;type=Ho.GuardsCheckStart;constructor(r,i,l,d){super(r,i),this.urlAfterRedirects=l,this.state=d}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},F_=class extends va{urlAfterRedirects;state;shouldActivate;type=Ho.GuardsCheckEnd;constructor(r,i,l,d,a){super(r,i),this.urlAfterRedirects=l,this.state=d,this.shouldActivate=a}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},N_=class extends va{urlAfterRedirects;state;type=Ho.ResolveStart;constructor(r,i,l,d){super(r,i),this.urlAfterRedirects=l,this.state=d}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},z_=class extends va{urlAfterRedirects;state;type=Ho.ResolveEnd;constructor(r,i,l,d){super(r,i),this.urlAfterRedirects=l,this.state=d}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},j_=class{route;type=Ho.RouteConfigLoadStart;constructor(r){this.route=r}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},B_=class{route;type=Ho.RouteConfigLoadEnd;constructor(r){this.route=r}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},V_=class{snapshot;type=Ho.ChildActivationStart;constructor(r){this.snapshot=r}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},U_=class{snapshot;type=Ho.ChildActivationEnd;constructor(r){this.snapshot=r}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},$_=class{snapshot;type=Ho.ActivationStart;constructor(r){this.snapshot=r}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},G_=class{snapshot;type=Ho.ActivationEnd;constructor(r){this.snapshot=r}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}};var by=class{},sm=class{url;navigationBehaviorOptions;constructor(r,i){this.url=r,this.navigationBehaviorOptions=i}};function t$(n){return!(n instanceof by)&&!(n instanceof sm)}function n$(n,r){return n.providers&&!n._injector&&(n._injector=Ng(n.providers,r,`Route: ${n.path}`)),n._injector??r}function Rl(n){return n.outlet||Nn}function r$(n,r){let i=n.filter(l=>Rl(l)===r);return i.push(...n.filter(l=>Rl(l)!==r)),i}function cm(n){if(!n)return null;if(n.routeConfig?._injector)return n.routeConfig._injector;for(let r=n.parent;r;r=r.parent){let i=r.routeConfig;if(i?._loadedInjector)return i._loadedInjector;if(i?._injector)return i._injector}return null}var H_=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return cm(this.route?.snapshot)??this.rootInjector}constructor(r){this.rootInjector=r,this.children=new um(this.rootInjector)}},um=(()=>{class n{rootInjector;contexts=new Map;constructor(i){this.rootInjector=i}onChildOutletCreated(i,l){let d=this.getOrCreateContext(i);d.outlet=l,this.contexts.set(i,d)}onChildOutletDestroyed(i){let l=this.getContext(i);l&&(l.outlet=null,l.attachRef=null)}onOutletDeactivated(){let i=this.contexts;return this.contexts=new Map,i}onOutletReAttached(i){this.contexts=i}getOrCreateContext(i){let l=this.getContext(i);return l||(l=new H_(this.rootInjector),this.contexts.set(i,l)),l}getContext(i){return this.contexts.get(i)||null}static \u0275fac=function(l){return new(l||n)($n(os))};static \u0275prov=zt({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),q_=class{_root;constructor(r){this._root=r}get root(){return this._root.value}parent(r){let i=this.pathFromRoot(r);return i.length>1?i[i.length-2]:null}children(r){let i=eS(r,this._root);return i?i.children.map(l=>l.value):[]}firstChild(r){let i=eS(r,this._root);return i&&i.children.length>0?i.children[0].value:null}siblings(r){let i=tS(r,this._root);return i.length<2?[]:i[i.length-2].children.map(d=>d.value).filter(d=>d!==r)}pathFromRoot(r){return tS(r,this._root).map(i=>i.value)}};function eS(n,r){if(n===r.value)return r;for(let i of r.children){let l=eS(n,i);if(l)return l}return null}function tS(n,r){if(n===r.value)return[r];for(let i of r.children){let l=tS(n,i);if(l.length)return l.unshift(r),l}return[]}var ya=class{value;children;constructor(r,i){this.value=r,this.children=i}toString(){return`TreeNode(${this.value})`}};function tm(n){let r={};return n&&n.children.forEach(i=>r[i.value.outlet]=i),r}var wy=class extends q_{snapshot;constructor(r,i){super(r),this.snapshot=i,cS(this,r)}toString(){return this.snapshot.toString()}};function hR(n){let r=i$(n),i=new Vr([new Kd("",{})]),l=new Vr({}),d=new Vr({}),a=new Vr({}),I=new Vr(""),R=new Ba(i,l,a,I,d,Nn,n,r.root);return R.snapshot=r.root,new wy(new ya(R,[]),r)}function i$(n){let r={},i={},l={},a=new Ef([],r,l,"",i,Nn,n,null,{});return new xy("",new ya(a,[]))}var Ba=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(r,i,l,d,a,I,R,L){this.urlSubject=r,this.paramsSubject=i,this.queryParamsSubject=l,this.fragmentSubject=d,this.dataSubject=a,this.outlet=I,this.component=R,this._futureSnapshot=L,this.title=this.dataSubject?.pipe(Tn(H=>H[Iy]))??Cn(void 0),this.url=r,this.params=i,this.queryParams=l,this.fragment=d,this.data=a}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(Tn(r=>If(r))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(Tn(r=>If(r))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function W_(n,r,i="emptyOnly"){let l,{routeConfig:d}=n;return r!==null&&(i==="always"||d?.path===""||!r.component&&!r.routeConfig?.loadComponent)?l={params:Lt(Lt({},r.params),n.params),data:Lt(Lt({},r.data),n.data),resolve:Lt(Lt(Lt(Lt({},n.data),r.data),d?.data),n._resolvedData)}:l={params:Lt({},n.params),data:Lt({},n.data),resolve:Lt(Lt({},n.data),n._resolvedData??{})},d&&pR(d)&&(l.resolve[Iy]=d.title),l}var Ef=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;get title(){return this.data?.[Iy]}constructor(r,i,l,d,a,I,R,L,H){this.url=r,this.params=i,this.queryParams=l,this.fragment=d,this.data=a,this.outlet=I,this.component=R,this.routeConfig=L,this._resolve=H}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=If(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=If(this.queryParams),this._queryParamMap}toString(){let r=this.url.map(l=>l.toString()).join("/"),i=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${r}', path:'${i}')`}},xy=class extends q_{url;constructor(r,i){super(i),this.url=r,cS(this,i)}toString(){return fR(this._root)}};function cS(n,r){r.value._routerState=n,r.children.forEach(i=>cS(n,i))}function fR(n){let r=n.children.length>0?` { ${n.children.map(fR).join(", ")} } `:"";return`${n.value}${r}`}function WC(n){if(n.snapshot){let r=n.snapshot,i=n._futureSnapshot;n.snapshot=i,wc(r.queryParams,i.queryParams)||n.queryParamsSubject.next(i.queryParams),r.fragment!==i.fragment&&n.fragmentSubject.next(i.fragment),wc(r.params,i.params)||n.paramsSubject.next(i.params),AU(r.url,i.url)||n.urlSubject.next(i.url),wc(r.data,i.data)||n.dataSubject.next(i.data)}else n.snapshot=n._futureSnapshot,n.dataSubject.next(n._futureSnapshot.data)}function nS(n,r){let i=wc(n.params,r.params)&&LU(n.url,r.url),l=!n.parent!=!r.parent;return i&&!l&&(!n.parent||nS(n.parent,r.parent))}function pR(n){return typeof n.title=="string"||n.title===null}var mR=new yn(""),Mf=(()=>{class n{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=Nn;activateEvents=new ys;deactivateEvents=new ys;attachEvents=new ys;detachEvents=new ys;routerOutletData=cr();parentContexts=Me(um);location=Me(vf);changeDetector=Me(i_);inputBinder=Me(X_,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(i){if(i.name){let{firstChange:l,previousValue:d}=i.name;if(l)return;this.isTrackedInParentContexts(d)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(d)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(i){return this.parentContexts.getContext(i)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let i=this.parentContexts.getContext(this.name);i?.route&&(i.attachRef?this.attach(i.attachRef,i.route):this.activateWith(i.route,i.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Ht(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Ht(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Ht(4012,!1);this.location.detach();let i=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(i.instance),i}attach(i,l){this.activated=i,this._activatedRoute=l,this.location.insert(i.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(i.instance)}deactivate(){if(this.activated){let i=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(i)}}activateWith(i,l){if(this.isActivated)throw new Ht(4013,!1);this._activatedRoute=i;let d=this.location,I=i.snapshot.component,R=this.parentContexts.getOrCreateContext(this.name).children,L=new rS(i,R,d.injector,this.routerOutletData);this.activated=d.createComponent(I,{index:d.length,injector:L,environmentInjector:l}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(l){return new(l||n)};static \u0275dir=$d({type:n,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[Pg]})}return n})(),rS=class{route;childContexts;parent;outletData;constructor(r,i,l,d){this.route=r,this.childContexts=i,this.parent=l,this.outletData=d}get(r,i){return r===Ba?this.route:r===um?this.childContexts:r===mR?this.outletData:this.parent.get(r,i)}},X_=new yn("");var uS=(()=>{class n{static \u0275fac=function(l){return new(l||n)};static \u0275cmp=cn({type:n,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(l,d){l&1&&Tt(0,"router-outlet")},dependencies:[Mf],encapsulation:2})}return n})();function dS(n){let r=n.children&&n.children.map(dS),i=r?nr(Lt({},n),{children:r}):Lt({},n);return!i.component&&!i.loadComponent&&(r||i.loadChildren)&&i.outlet&&i.outlet!==Nn&&(i.component=uS),i}function o$(n,r,i){let l=Cy(n,r._root,i?i._root:void 0);return new wy(l,r)}function Cy(n,r,i){if(i&&n.shouldReuseRoute(r.value,i.value.snapshot)){let l=i.value;l._futureSnapshot=r.value;let d=s$(n,r,i);return new ya(l,d)}else{if(n.shouldAttach(r.value)){let a=n.retrieve(r.value);if(a!==null){let I=a.route;return I.value._futureSnapshot=r.value,I.children=r.children.map(R=>Cy(n,R)),I}}let l=a$(r.value),d=r.children.map(a=>Cy(n,a));return new ya(l,d)}}function s$(n,r,i){return r.children.map(l=>{for(let d of i.children)if(n.shouldReuseRoute(l.value,d.value.snapshot))return Cy(n,l,d);return Cy(n,l)})}function a$(n){return new Ba(new Vr(n.url),new Vr(n.params),new Vr(n.queryParams),new Vr(n.fragment),new Vr(n.data),n.outlet,n.component,n)}var am=class{redirectTo;navigationBehaviorOptions;constructor(r,i){this.redirectTo=r,this.navigationBehaviorOptions=i}},gR="ngNavigationCancelingError";function Z_(n,r){let{redirectTo:i,navigationBehaviorOptions:l}=im(r)?{redirectTo:r,navigationBehaviorOptions:void 0}:r,d=yR(!1,$s.Redirect);return d.url=i,d.navigationBehaviorOptions=l,d}function yR(n,r){let i=new Error(`NavigationCancelingError: ${n||""}`);return i[gR]=!0,i.cancellationCode=r,i}function l$(n){return vR(n)&&im(n.url)}function vR(n){return!!n&&n[gR]}var c$=(n,r,i,l)=>Tn(d=>(new iS(r,d.targetRouterState,d.currentRouterState,i,l).activate(n),d)),iS=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(r,i,l,d,a){this.routeReuseStrategy=r,this.futureState=i,this.currState=l,this.forwardEvent=d,this.inputBindingEnabled=a}activate(r){let i=this.futureState._root,l=this.currState?this.currState._root:null;this.deactivateChildRoutes(i,l,r),WC(this.futureState.root),this.activateChildRoutes(i,l,r)}deactivateChildRoutes(r,i,l){let d=tm(i);r.children.forEach(a=>{let I=a.value.outlet;this.deactivateRoutes(a,d[I],l),delete d[I]}),Object.values(d).forEach(a=>{this.deactivateRouteAndItsChildren(a,l)})}deactivateRoutes(r,i,l){let d=r.value,a=i?i.value:null;if(d===a)if(d.component){let I=l.getContext(d.outlet);I&&this.deactivateChildRoutes(r,i,I.children)}else this.deactivateChildRoutes(r,i,l);else a&&this.deactivateRouteAndItsChildren(i,l)}deactivateRouteAndItsChildren(r,i){r.value.component&&this.routeReuseStrategy.shouldDetach(r.value.snapshot)?this.detachAndStoreRouteSubtree(r,i):this.deactivateRouteAndOutlet(r,i)}detachAndStoreRouteSubtree(r,i){let l=i.getContext(r.value.outlet),d=l&&r.value.component?l.children:i,a=tm(r);for(let I of Object.values(a))this.deactivateRouteAndItsChildren(I,d);if(l&&l.outlet){let I=l.outlet.detach(),R=l.children.onOutletDeactivated();this.routeReuseStrategy.store(r.value.snapshot,{componentRef:I,route:r,contexts:R})}}deactivateRouteAndOutlet(r,i){let l=i.getContext(r.value.outlet),d=l&&r.value.component?l.children:i,a=tm(r);for(let I of Object.values(a))this.deactivateRouteAndItsChildren(I,d);l&&(l.outlet&&(l.outlet.deactivate(),l.children.onOutletDeactivated()),l.attachRef=null,l.route=null)}activateChildRoutes(r,i,l){let d=tm(i);r.children.forEach(a=>{this.activateRoutes(a,d[a.value.outlet],l),this.forwardEvent(new G_(a.value.snapshot))}),r.children.length&&this.forwardEvent(new U_(r.value.snapshot))}activateRoutes(r,i,l){let d=r.value,a=i?i.value:null;if(WC(d),d===a)if(d.component){let I=l.getOrCreateContext(d.outlet);this.activateChildRoutes(r,i,I.children)}else this.activateChildRoutes(r,i,l);else if(d.component){let I=l.getOrCreateContext(d.outlet);if(this.routeReuseStrategy.shouldAttach(d.snapshot)){let R=this.routeReuseStrategy.retrieve(d.snapshot);this.routeReuseStrategy.store(d.snapshot,null),I.children.onOutletReAttached(R.contexts),I.attachRef=R.componentRef,I.route=R.route.value,I.outlet&&I.outlet.attach(R.componentRef,R.route.value),WC(R.route.value),this.activateChildRoutes(r,null,I.children)}else I.attachRef=null,I.route=d,I.outlet&&I.outlet.activateWith(d,I.injector),this.activateChildRoutes(r,null,I.children)}else this.activateChildRoutes(r,null,l)}},Y_=class{path;route;constructor(r){this.path=r,this.route=this.path[this.path.length-1]}},rm=class{component;route;constructor(r,i){this.component=r,this.route=i}};function u$(n,r,i){let l=n._root,d=r?r._root:null;return fy(l,d,i,[l.value])}function d$(n){let r=n.routeConfig?n.routeConfig.canActivateChild:null;return!r||r.length===0?null:{node:n,guards:r}}function dm(n,r){let i=Symbol(),l=r.get(n,i);return l===i?typeof n=="function"&&!d2(n)?n:r.get(n):l}function fy(n,r,i,l,d={canDeactivateChecks:[],canActivateChecks:[]}){let a=tm(r);return n.children.forEach(I=>{h$(I,a[I.value.outlet],i,l.concat([I.value]),d),delete a[I.value.outlet]}),Object.entries(a).forEach(([I,R])=>gy(R,i.getContext(I),d)),d}function h$(n,r,i,l,d={canDeactivateChecks:[],canActivateChecks:[]}){let a=n.value,I=r?r.value:null,R=i?i.getContext(n.value.outlet):null;if(I&&a.routeConfig===I.routeConfig){let L=f$(I,a,a.routeConfig.runGuardsAndResolvers);L?d.canActivateChecks.push(new Y_(l)):(a.data=I.data,a._resolvedData=I._resolvedData),a.component?fy(n,r,R?R.children:null,l,d):fy(n,r,i,l,d),L&&R&&R.outlet&&R.outlet.isActivated&&d.canDeactivateChecks.push(new rm(R.outlet.component,I))}else I&&gy(r,R,d),d.canActivateChecks.push(new Y_(l)),a.component?fy(n,null,R?R.children:null,l,d):fy(n,null,i,l,d);return d}function f$(n,r,i){if(typeof i=="function")return i(n,r);switch(i){case"pathParamsChange":return!Sf(n.url,r.url);case"pathParamsOrQueryParamsChange":return!Sf(n.url,r.url)||!wc(n.queryParams,r.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!nS(n,r)||!wc(n.queryParams,r.queryParams);case"paramsChange":default:return!nS(n,r)}}function gy(n,r,i){let l=tm(n),d=n.value;Object.entries(l).forEach(([a,I])=>{d.component?r?gy(I,r.children.getContext(a),i):gy(I,null,i):gy(I,r,i)}),d.component?r&&r.outlet&&r.outlet.isActivated?i.canDeactivateChecks.push(new rm(r.outlet.component,d)):i.canDeactivateChecks.push(new rm(null,d)):i.canDeactivateChecks.push(new rm(null,d))}function Ty(n){return typeof n=="function"}function p$(n){return typeof n=="boolean"}function m$(n){return n&&Ty(n.canLoad)}function g$(n){return n&&Ty(n.canActivate)}function y$(n){return n&&Ty(n.canActivateChild)}function v$(n){return n&&Ty(n.canDeactivate)}function _$(n){return n&&Ty(n.canMatch)}function _R(n){return n instanceof cu||n?.name==="EmptyError"}var M_=Symbol("INITIAL_VALUE");function lm(){return Wi(n=>Oa(n.map(r=>r.pipe(Ls(1),Jb(M_)))).pipe(Tn(r=>{for(let i of r)if(i!==!0){if(i===M_)return M_;if(i===!1||b$(i))return i}return!0}),Oi(r=>r!==M_),Ls(1)))}function b$(n){return im(n)||n instanceof am}function w$(n,r){return xo(i=>{let{targetSnapshot:l,currentSnapshot:d,guards:{canActivateChecks:a,canDeactivateChecks:I}}=i;return I.length===0&&a.length===0?Cn(nr(Lt({},i),{guardsResult:!0})):x$(I,l,d,n).pipe(xo(R=>R&&p$(R)?C$(l,a,n,r):Cn(R)),Tn(R=>nr(Lt({},i),{guardsResult:R})))})}function x$(n,r,i,l){return ri(n).pipe(xo(d=>T$(d.component,d.route,i,r,l)),uu(d=>d!==!0,!0))}function C$(n,r,i,l){return ri(r).pipe(Mp(d=>Tp(E$(d.route.parent,l),S$(d.route,l),D$(n,d.path,i),I$(n,d.route,i))),uu(d=>d!==!0,!0))}function S$(n,r){return n!==null&&r&&r(new $_(n)),Cn(!0)}function E$(n,r){return n!==null&&r&&r(new V_(n)),Cn(!0)}function I$(n,r,i){let l=r.routeConfig?r.routeConfig.canActivate:null;if(!l||l.length===0)return Cn(!0);let d=l.map(a=>ng(()=>{let I=cm(r)??i,R=dm(a,I),L=g$(R)?R.canActivate(r,n):Ns(I,()=>R(r,n));return ku(L).pipe(uu())}));return Cn(d).pipe(lm())}function D$(n,r,i){let l=r[r.length-1],a=r.slice(0,r.length-1).reverse().map(I=>d$(I)).filter(I=>I!==null).map(I=>ng(()=>{let R=I.guards.map(L=>{let H=cm(I.node)??i,K=dm(L,H),W=y$(K)?K.canActivateChild(l,n):Ns(H,()=>K(l,n));return ku(W).pipe(uu())});return Cn(R).pipe(lm())}));return Cn(a).pipe(lm())}function T$(n,r,i,l,d){let a=r&&r.routeConfig?r.routeConfig.canDeactivate:null;if(!a||a.length===0)return Cn(!0);let I=a.map(R=>{let L=cm(r)??d,H=dm(R,L),K=v$(H)?H.canDeactivate(n,r,i,l):Ns(L,()=>H(n,r,i,l));return ku(K).pipe(uu())});return Cn(I).pipe(lm())}function M$(n,r,i,l){let d=r.canLoad;if(d===void 0||d.length===0)return Cn(!0);let a=d.map(I=>{let R=dm(I,n),L=m$(R)?R.canLoad(r,i):Ns(n,()=>R(r,i));return ku(L)});return Cn(a).pipe(lm(),bR(l))}function bR(n){return jb(Zi(r=>{if(typeof r!="boolean")throw Z_(n,r)}),Tn(r=>r===!0))}function P$(n,r,i,l){let d=r.canMatch;if(!d||d.length===0)return Cn(!0);let a=d.map(I=>{let R=dm(I,n),L=_$(R)?R.canMatch(r,i):Ns(n,()=>R(r,i));return ku(L)});return Cn(a).pipe(lm(),bR(l))}var Sy=class{segmentGroup;constructor(r){this.segmentGroup=r||null}},Ey=class extends Error{urlTree;constructor(r){super(),this.urlTree=r}};function em(n){return Dp(new Sy(n))}function A$(n){return Dp(new Ht(4e3,!1))}function k$(n){return Dp(yR(!1,$s.GuardRejected))}var oS=class{urlSerializer;urlTree;constructor(r,i){this.urlSerializer=r,this.urlTree=i}lineralizeSegments(r,i){let l=[],d=i.root;for(;;){if(l=l.concat(d.segments),d.numberOfChildren===0)return Cn(l);if(d.numberOfChildren>1||!d.children[Nn])return A$(`${r.redirectTo}`);d=d.children[Nn]}}applyRedirectCommands(r,i,l,d,a){return R$(i,d,a).pipe(Tn(I=>{if(I instanceof Cc)throw new Ey(I);let R=this.applyRedirectCreateUrlTree(I,this.urlSerializer.parse(I),r,l);if(I[0]==="/")throw new Ey(R);return R}))}applyRedirectCreateUrlTree(r,i,l,d){let a=this.createSegmentGroup(r,i.root,l,d);return new Cc(a,this.createQueryParams(i.queryParams,this.urlTree.queryParams),i.fragment)}createQueryParams(r,i){let l={};return Object.entries(r).forEach(([d,a])=>{if(typeof a=="string"&&a[0]===":"){let R=a.substring(1);l[d]=i[R]}else l[d]=a}),l}createSegmentGroup(r,i,l,d){let a=this.createSegments(r,i.segments,l,d),I={};return Object.entries(i.children).forEach(([R,L])=>{I[R]=this.createSegmentGroup(r,L,l,d)}),new kr(a,I)}createSegments(r,i,l,d){return i.map(a=>a.path[0]===":"?this.findPosParam(r,a,d):this.findOrReturn(a,l))}findPosParam(r,i,l){let d=l[i.path.substring(1)];if(!d)throw new Ht(4001,!1);return d}findOrReturn(r,i){let l=0;for(let d of i){if(d.path===r.path)return i.splice(l),d;l++}return r}};function R$(n,r,i){if(typeof n=="string")return Cn(n);let l=n,{queryParams:d,fragment:a,routeConfig:I,url:R,outlet:L,params:H,data:K,title:W}=r;return ku(Ns(i,()=>l({params:H,data:K,queryParams:d,fragment:a,routeConfig:I,url:R,outlet:L,title:W})))}var sS={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function O$(n,r,i,l,d){let a=wR(n,r,i);return a.matched?(l=n$(r,l),P$(l,r,i,d).pipe(Tn(I=>I===!0?a:Lt({},sS)))):Cn(a)}function wR(n,r,i){if(r.path==="**")return L$(i);if(r.path==="")return r.pathMatch==="full"&&(n.hasChildren()||i.length>0)?Lt({},sS):{matched:!0,consumedSegments:[],remainingSegments:i,parameters:{},positionalParamSegments:{}};let d=(r.matcher||Kk)(i,n,r);if(!d)return Lt({},sS);let a={};Object.entries(d.posParams??{}).forEach(([R,L])=>{a[R]=L.path});let I=d.consumed.length>0?Lt(Lt({},a),d.consumed[d.consumed.length-1].parameters):a;return{matched:!0,consumedSegments:d.consumed,remainingSegments:i.slice(d.consumed.length),parameters:I,positionalParamSegments:d.posParams??{}}}function L$(n){return{matched:!0,parameters:n.length>0?Jk(n).parameters:{},consumedSegments:n,remainingSegments:[],positionalParamSegments:{}}}function Wk(n,r,i,l){return i.length>0&&z$(n,i,l)?{segmentGroup:new kr(r,N$(l,new kr(i,n.children))),slicedSegments:[]}:i.length===0&&j$(n,i,l)?{segmentGroup:new kr(n.segments,F$(n,i,l,n.children)),slicedSegments:i}:{segmentGroup:new kr(n.segments,n.children),slicedSegments:i}}function F$(n,r,i,l){let d={};for(let a of i)if(J_(n,r,a)&&!l[Rl(a)]){let I=new kr([],{});d[Rl(a)]=I}return Lt(Lt({},l),d)}function N$(n,r){let i={};i[Nn]=r;for(let l of n)if(l.path===""&&Rl(l)!==Nn){let d=new kr([],{});i[Rl(l)]=d}return i}function z$(n,r,i){return i.some(l=>J_(n,r,l)&&Rl(l)!==Nn)}function j$(n,r,i){return i.some(l=>J_(n,r,l))}function J_(n,r,i){return(n.hasChildren()||r.length>0)&&i.pathMatch==="full"?!1:i.path===""}function B$(n,r,i){return r.length===0&&!n.children[i]}var aS=class{};function V$(n,r,i,l,d,a,I="emptyOnly"){return new lS(n,r,i,l,d,I,a).recognize()}var U$=31,lS=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(r,i,l,d,a,I,R){this.injector=r,this.configLoader=i,this.rootComponentType=l,this.config=d,this.urlTree=a,this.paramsInheritanceStrategy=I,this.urlSerializer=R,this.applyRedirects=new oS(this.urlSerializer,this.urlTree)}noMatchError(r){return new Ht(4002,`'${r.segmentGroup}'`)}recognize(){let r=Wk(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(r).pipe(Tn(({children:i,rootSnapshot:l})=>{let d=new ya(l,i),a=new xy("",d),I=aR(l,[],this.urlTree.queryParams,this.urlTree.fragment);return I.queryParams=this.urlTree.queryParams,a.url=this.urlSerializer.serialize(I),{state:a,tree:I}}))}match(r){let i=new Ef([],Object.freeze({}),Object.freeze(Lt({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),Nn,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,r,Nn,i).pipe(Tn(l=>({children:l,rootSnapshot:i})),Id(l=>{if(l instanceof Ey)return this.urlTree=l.urlTree,this.match(l.urlTree.root);throw l instanceof Sy?this.noMatchError(l):l}))}processSegmentGroup(r,i,l,d,a){return l.segments.length===0&&l.hasChildren()?this.processChildren(r,i,l,a):this.processSegment(r,i,l,l.segments,d,!0,a).pipe(Tn(I=>I instanceof ya?[I]:[]))}processChildren(r,i,l,d){let a=[];for(let I of Object.keys(l.children))I==="primary"?a.unshift(I):a.push(I);return ri(a).pipe(Mp(I=>{let R=l.children[I],L=r$(i,I);return this.processSegmentGroup(r,L,R,I,d)}),Yb((I,R)=>(I.push(...R),I)),Dd(null),Zb(),xo(I=>{if(I===null)return em(l);let R=xR(I);return $$(R),Cn(R)}))}processSegment(r,i,l,d,a,I,R){return ri(i).pipe(Mp(L=>this.processSegmentAgainstRoute(L._injector??r,i,L,l,d,a,I,R).pipe(Id(H=>{if(H instanceof Sy)return Cn(null);throw H}))),uu(L=>!!L),Id(L=>{if(_R(L))return B$(l,d,a)?Cn(new aS):em(l);throw L}))}processSegmentAgainstRoute(r,i,l,d,a,I,R,L){return Rl(l)!==I&&(I===Nn||!J_(d,a,l))?em(d):l.redirectTo===void 0?this.matchSegmentAgainstRoute(r,d,l,a,I,L):this.allowRedirects&&R?this.expandSegmentAgainstRouteUsingRedirect(r,d,i,l,a,I,L):em(d)}expandSegmentAgainstRouteUsingRedirect(r,i,l,d,a,I,R){let{matched:L,parameters:H,consumedSegments:K,positionalParamSegments:W,remainingSegments:Q}=wR(i,d,a);if(!L)return em(i);typeof d.redirectTo=="string"&&d.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>U$&&(this.allowRedirects=!1));let Y=new Ef(a,H,Object.freeze(Lt({},this.urlTree.queryParams)),this.urlTree.fragment,Zk(d),Rl(d),d.component??d._loadedComponent??null,d,Yk(d)),V=W_(Y,R,this.paramsInheritanceStrategy);return Y.params=Object.freeze(V.params),Y.data=Object.freeze(V.data),this.applyRedirects.applyRedirectCommands(K,d.redirectTo,W,Y,r).pipe(Wi(ae=>this.applyRedirects.lineralizeSegments(d,ae)),xo(ae=>this.processSegment(r,l,i,ae.concat(Q),I,!1,R)))}matchSegmentAgainstRoute(r,i,l,d,a,I){let R=O$(i,l,d,r,this.urlSerializer);return l.path==="**"&&(i.children={}),R.pipe(Wi(L=>L.matched?(r=l._injector??r,this.getChildConfig(r,l,d).pipe(Wi(({routes:H})=>{let K=l._loadedInjector??r,{parameters:W,consumedSegments:Q,remainingSegments:Y}=L,V=new Ef(Q,W,Object.freeze(Lt({},this.urlTree.queryParams)),this.urlTree.fragment,Zk(l),Rl(l),l.component??l._loadedComponent??null,l,Yk(l)),te=W_(V,I,this.paramsInheritanceStrategy);V.params=Object.freeze(te.params),V.data=Object.freeze(te.data);let{segmentGroup:ae,slicedSegments:z}=Wk(i,Q,Y,H);if(z.length===0&&ae.hasChildren())return this.processChildren(K,H,ae,V).pipe(Tn(ve=>new ya(V,ve)));if(H.length===0&&z.length===0)return Cn(new ya(V,[]));let ie=Rl(l)===a;return this.processSegment(K,H,ae,z,ie?Nn:a,!0,V).pipe(Tn(ve=>new ya(V,ve instanceof ya?[ve]:[])))}))):em(i)))}getChildConfig(r,i,l){return i.children?Cn({routes:i.children,injector:r}):i.loadChildren?i._loadedRoutes!==void 0?Cn({routes:i._loadedRoutes,injector:i._loadedInjector}):M$(r,i,l,this.urlSerializer).pipe(xo(d=>d?this.configLoader.loadChildren(r,i).pipe(Zi(a=>{i._loadedRoutes=a.routes,i._loadedInjector=a.injector})):k$(i))):Cn({routes:[],injector:r})}};function $$(n){n.sort((r,i)=>r.value.outlet===Nn?-1:i.value.outlet===Nn?1:r.value.outlet.localeCompare(i.value.outlet))}function G$(n){let r=n.value.routeConfig;return r&&r.path===""}function xR(n){let r=[],i=new Set;for(let l of n){if(!G$(l)){r.push(l);continue}let d=r.find(a=>l.value.routeConfig===a.value.routeConfig);d!==void 0?(d.children.push(...l.children),i.add(d)):r.push(l)}for(let l of i){let d=xR(l.children);r.push(new ya(l.value,d))}return r.filter(l=>!i.has(l))}function Zk(n){return n.data||{}}function Yk(n){return n.resolve||{}}function H$(n,r,i,l,d,a){return xo(I=>V$(n,r,i,l,I.extractedUrl,d,a).pipe(Tn(({state:R,tree:L})=>nr(Lt({},I),{targetSnapshot:R,urlAfterRedirects:L}))))}function q$(n,r){return xo(i=>{let{targetSnapshot:l,guards:{canActivateChecks:d}}=i;if(!d.length)return Cn(i);let a=new Set(d.map(L=>L.route)),I=new Set;for(let L of a)if(!I.has(L))for(let H of CR(L))I.add(H);let R=0;return ri(I).pipe(Mp(L=>a.has(L)?W$(L,l,n,r):(L.data=W_(L,L.parent,n).resolve,Cn(void 0))),Zi(()=>R++),Pp(1),xo(L=>R===I.size?Cn(i):gs))})}function CR(n){let r=n.children.map(i=>CR(i)).flat();return[n,...r]}function W$(n,r,i,l){let d=n.routeConfig,a=n._resolve;return d?.title!==void 0&&!pR(d)&&(a[Iy]=d.title),ng(()=>(n.data=W_(n,n.parent,i).resolve,Z$(a,n,r,l).pipe(Tn(I=>(n._resolvedData=I,n.data=Lt(Lt({},n.data),I),null)))))}function Z$(n,r,i,l){let d=KC(n);if(d.length===0)return Cn({});let a={};return ri(d).pipe(xo(I=>Y$(n[I],r,i,l).pipe(uu(),Zi(R=>{if(R instanceof am)throw Z_(new Df,R);a[I]=R}))),Pp(1),Tn(()=>a),Id(I=>_R(I)?gs:Dp(I)))}function Y$(n,r,i,l){let d=cm(r)??l,a=dm(n,d),I=a.resolve?a.resolve(r,i):Ns(d,()=>a(r,i));return ku(I)}function ZC(n){return Wi(r=>{let i=n(r);return i?ri(i).pipe(Tn(()=>r)):Cn(r)})}var hS=(()=>{class n{buildTitle(i){let l,d=i.root;for(;d!==void 0;)l=this.getResolvedTitleForRoute(d)??l,d=d.children.find(a=>a.outlet===Nn);return l}getResolvedTitleForRoute(i){return i.data[Iy]}static \u0275fac=function(l){return new(l||n)};static \u0275prov=zt({token:n,factory:()=>Me(SR),providedIn:"root"})}return n})(),SR=(()=>{class n extends hS{title;constructor(i){super(),this.title=i}updateTitle(i){let l=this.buildTitle(i);l!==void 0&&this.title.setTitle(l)}static \u0275fac=function(l){return new(l||n)($n(bP))};static \u0275prov=zt({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),My=new yn("",{providedIn:"root",factory:()=>({})}),Py=new yn(""),ER=(()=>{class n{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=Me(Ix);loadComponent(i,l){if(this.componentLoaders.get(l))return this.componentLoaders.get(l);if(l._loadedComponent)return Cn(l._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(l);let d=ku(Ns(i,()=>l.loadComponent())).pipe(Tn(DR),Wi(TR),Zi(I=>{this.onLoadEndListener&&this.onLoadEndListener(l),l._loadedComponent=I}),rg(()=>{this.componentLoaders.delete(l)})),a=new Ep(d,()=>new fr).pipe(Sp());return this.componentLoaders.set(l,a),a}loadChildren(i,l){if(this.childrenLoaders.get(l))return this.childrenLoaders.get(l);if(l._loadedRoutes)return Cn({routes:l._loadedRoutes,injector:l._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(l);let a=IR(l,this.compiler,i,this.onLoadEndListener).pipe(rg(()=>{this.childrenLoaders.delete(l)})),I=new Ep(a,()=>new fr).pipe(Sp());return this.childrenLoaders.set(l,I),I}static \u0275fac=function(l){return new(l||n)};static \u0275prov=zt({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function IR(n,r,i,l){return ku(Ns(i,()=>n.loadChildren())).pipe(Tn(DR),Wi(TR),xo(d=>d instanceof q0||Array.isArray(d)?Cn(d):ri(r.compileModuleAsync(d))),Tn(d=>{l&&l(n);let a,I,R=!1;return Array.isArray(d)?(I=d,R=!0):(a=d.create(i).injector,I=a.get(Py,[],{optional:!0,self:!0}).flat()),{routes:I.map(dS),injector:a}}))}function K$(n){return n&&typeof n=="object"&&"default"in n}function DR(n){return K$(n)?n.default:n}function TR(n){return Cn(n)}var Q_=(()=>{class n{static \u0275fac=function(l){return new(l||n)};static \u0275prov=zt({token:n,factory:()=>Me(X$),providedIn:"root"})}return n})(),X$=(()=>{class n{shouldProcessUrl(i){return!0}extract(i){return i}merge(i,l){return i}static \u0275fac=function(l){return new(l||n)};static \u0275prov=zt({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),MR=new yn("");var PR=new yn(""),AR=(()=>{class n{currentNavigation=sn(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=null;events=new fr;transitionAbortWithErrorSubject=new fr;configLoader=Me(ER);environmentInjector=Me(os);destroyRef=Me(Bs);urlSerializer=Me(Dy);rootContexts=Me(um);location=Me(Yp);inputBindingEnabled=Me(X_,{optional:!0})!==null;titleStrategy=Me(hS);options=Me(My,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=Me(Q_);createViewTransition=Me(MR,{optional:!0});navigationErrorHandler=Me(PR,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>Cn(void 0);rootComponentType=null;destroyed=!1;constructor(){let i=d=>this.events.next(new j_(d)),l=d=>this.events.next(new B_(d));this.configLoader.onLoadEndListener=l,this.configLoader.onLoadStartListener=i,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(i){let l=++this.navigationId;$o(()=>{this.transitions?.next(nr(Lt({},i),{extractedUrl:this.urlHandlingStrategy.extract(i.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,abortController:new AbortController,id:l}))})}setupNavigations(i){return this.transitions=new Vr(null),this.transitions.pipe(Oi(l=>l!==null),Wi(l=>{let d=!1;return Cn(l).pipe(Wi(a=>{if(this.navigationId>l.id)return this.cancelNavigationTransition(l,"",$s.SupersededByNewNavigation),gs;this.currentTransition=l,this.currentNavigation.set({id:a.id,initialUrl:a.rawUrl,extractedUrl:a.extractedUrl,targetBrowserUrl:typeof a.extras.browserUrl=="string"?this.urlSerializer.parse(a.extras.browserUrl):a.extras.browserUrl,trigger:a.source,extras:a.extras,previousNavigation:this.lastSuccessfulNavigation?nr(Lt({},this.lastSuccessfulNavigation),{previousNavigation:null}):null,abort:()=>a.abortController.abort()});let I=!i.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),R=a.extras.onSameUrlNavigation??i.onSameUrlNavigation;if(!I&&R!=="reload")return this.events.next(new Au(a.id,this.urlSerializer.serialize(a.rawUrl),"",vy.IgnoredSameUrlNavigation)),a.resolve(!1),gs;if(this.urlHandlingStrategy.shouldProcessUrl(a.rawUrl))return Cn(a).pipe(Wi(L=>(this.events.next(new Tf(L.id,this.urlSerializer.serialize(L.extractedUrl),L.source,L.restoredState)),L.id!==this.navigationId?gs:Promise.resolve(L))),H$(this.environmentInjector,this.configLoader,this.rootComponentType,i.config,this.urlSerializer,this.paramsInheritanceStrategy),Zi(L=>{l.targetSnapshot=L.targetSnapshot,l.urlAfterRedirects=L.urlAfterRedirects,this.currentNavigation.update(K=>(K.finalUrl=L.urlAfterRedirects,K));let H=new _y(L.id,this.urlSerializer.serialize(L.extractedUrl),this.urlSerializer.serialize(L.urlAfterRedirects),L.targetSnapshot);this.events.next(H)}));if(I&&this.urlHandlingStrategy.shouldProcessUrl(a.currentRawUrl)){let{id:L,extractedUrl:H,source:K,restoredState:W,extras:Q}=a,Y=new Tf(L,this.urlSerializer.serialize(H),K,W);this.events.next(Y);let V=hR(this.rootComponentType).snapshot;return this.currentTransition=l=nr(Lt({},a),{targetSnapshot:V,urlAfterRedirects:H,extras:nr(Lt({},Q),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update(te=>(te.finalUrl=H,te)),Cn(l)}else return this.events.next(new Au(a.id,this.urlSerializer.serialize(a.extractedUrl),"",vy.IgnoredByUrlHandlingStrategy)),a.resolve(!1),gs}),Zi(a=>{let I=new L_(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(I)}),Tn(a=>(this.currentTransition=l=nr(Lt({},a),{guards:u$(a.targetSnapshot,a.currentSnapshot,this.rootContexts)}),l)),w$(this.environmentInjector,a=>this.events.next(a)),Zi(a=>{if(l.guardsResult=a.guardsResult,a.guardsResult&&typeof a.guardsResult!="boolean")throw Z_(this.urlSerializer,a.guardsResult);let I=new F_(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot,!!a.guardsResult);this.events.next(I)}),Oi(a=>a.guardsResult?!0:(this.cancelNavigationTransition(a,"",$s.GuardRejected),!1)),ZC(a=>{if(a.guards.canActivateChecks.length!==0)return Cn(a).pipe(Zi(I=>{let R=new N_(I.id,this.urlSerializer.serialize(I.extractedUrl),this.urlSerializer.serialize(I.urlAfterRedirects),I.targetSnapshot);this.events.next(R)}),Wi(I=>{let R=!1;return Cn(I).pipe(q$(this.paramsInheritanceStrategy,this.environmentInjector),Zi({next:()=>R=!0,complete:()=>{R||this.cancelNavigationTransition(I,"",$s.NoDataFromResolver)}}))}),Zi(I=>{let R=new z_(I.id,this.urlSerializer.serialize(I.extractedUrl),this.urlSerializer.serialize(I.urlAfterRedirects),I.targetSnapshot);this.events.next(R)}))}),ZC(a=>{let I=R=>{let L=[];if(R.routeConfig?.loadComponent){let H=cm(R)??this.environmentInjector;L.push(this.configLoader.loadComponent(H,R.routeConfig).pipe(Zi(K=>{R.component=K}),Tn(()=>{})))}for(let H of R.children)L.push(...I(H));return L};return Oa(I(a.targetSnapshot.root)).pipe(Dd(null),Ls(1))}),ZC(()=>this.afterPreactivation()),Wi(()=>{let{currentSnapshot:a,targetSnapshot:I}=l,R=this.createViewTransition?.(this.environmentInjector,a.root,I.root);return R?ri(R).pipe(Tn(()=>l)):Cn(l)}),Tn(a=>{let I=o$(i.routeReuseStrategy,a.targetSnapshot,a.currentRouterState);return this.currentTransition=l=nr(Lt({},a),{targetRouterState:I}),this.currentNavigation.update(R=>(R.targetRouterState=I,R)),l}),Zi(()=>{this.events.next(new by)}),c$(this.rootContexts,i.routeReuseStrategy,a=>this.events.next(a),this.inputBindingEnabled),Ls(1),rs(new lr(a=>{let I=l.abortController.signal,R=()=>a.next();return I.addEventListener("abort",R),()=>I.removeEventListener("abort",R)}).pipe(Oi(()=>!d&&!l.targetRouterState),Zi(()=>{this.cancelNavigationTransition(l,l.abortController.signal.reason+"",$s.Aborted)}))),Zi({next:a=>{d=!0,this.lastSuccessfulNavigation=$o(this.currentNavigation),this.events.next(new Pu(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects))),this.titleStrategy?.updateTitle(a.targetRouterState.snapshot),a.resolve(!0)},complete:()=>{d=!0}}),rs(this.transitionAbortWithErrorSubject.pipe(Zi(a=>{throw a}))),rg(()=>{d||this.cancelNavigationTransition(l,"",$s.SupersededByNewNavigation),this.currentTransition?.id===l.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),Id(a=>{if(this.destroyed)return l.resolve(!1),gs;if(d=!0,vR(a))this.events.next(new xc(l.id,this.urlSerializer.serialize(l.extractedUrl),a.message,a.cancellationCode)),l$(a)?this.events.next(new sm(a.url,a.navigationBehaviorOptions)):l.resolve(!1);else{let I=new om(l.id,this.urlSerializer.serialize(l.extractedUrl),a,l.targetSnapshot??void 0);try{let R=Ns(this.environmentInjector,()=>this.navigationErrorHandler?.(I));if(R instanceof am){let{message:L,cancellationCode:H}=Z_(this.urlSerializer,R);this.events.next(new xc(l.id,this.urlSerializer.serialize(l.extractedUrl),L,H)),this.events.next(new sm(R.redirectTo,R.navigationBehaviorOptions))}else throw this.events.next(I),a}catch(R){this.options.resolveNavigationPromiseOnError?l.resolve(!1):l.reject(R)}}return gs}))}))}cancelNavigationTransition(i,l,d){let a=new xc(i.id,this.urlSerializer.serialize(i.extractedUrl),l,d);this.events.next(a),i.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let i=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),l=$o(this.currentNavigation),d=l?.targetBrowserUrl??l?.extractedUrl;return i.toString()!==d?.toString()&&!l?.extras.skipLocationChange}static \u0275fac=function(l){return new(l||n)};static \u0275prov=zt({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function J$(n){return n!==my}var kR=(()=>{class n{static \u0275fac=function(l){return new(l||n)};static \u0275prov=zt({token:n,factory:()=>Me(Q$),providedIn:"root"})}return n})(),K_=class{shouldDetach(r){return!1}store(r,i){}shouldAttach(r){return!1}retrieve(r){return null}shouldReuseRoute(r,i){return r.routeConfig===i.routeConfig}},Q$=(()=>{class n extends K_{static \u0275fac=(()=>{let i;return function(d){return(i||(i=qp(n)))(d||n)}})();static \u0275prov=zt({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),RR=(()=>{class n{urlSerializer=Me(Dy);options=Me(My,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";location=Me(Yp);urlHandlingStrategy=Me(Q_);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new Cc;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}createBrowserPath({finalUrl:i,initialUrl:l,targetBrowserUrl:d}){let a=i!==void 0?this.urlHandlingStrategy.merge(i,l):l,I=d??a;return I instanceof Cc?this.urlSerializer.serialize(I):I}commitTransition({targetRouterState:i,finalUrl:l,initialUrl:d}){l&&i?(this.currentUrlTree=l,this.rawUrlTree=this.urlHandlingStrategy.merge(l,d),this.routerState=i):this.rawUrlTree=d}routerState=hR(null);getRouterState(){return this.routerState}stateMemento=this.createStateMemento();updateStateMemento(){this.stateMemento=this.createStateMemento()}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}resetInternalState({finalUrl:i}){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,i??this.rawUrlTree)}static \u0275fac=function(l){return new(l||n)};static \u0275prov=zt({token:n,factory:()=>Me(eG),providedIn:"root"})}return n})(),eG=(()=>{class n extends RR{currentPageId=0;lastSuccessfulId=-1;restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}registerNonRouterCurrentEntryChangeListener(i){return this.location.subscribe(l=>{l.type==="popstate"&&setTimeout(()=>{i(l.url,l.state,"popstate")})})}handleRouterEvent(i,l){i instanceof Tf?this.updateStateMemento():i instanceof Au?this.commitTransition(l):i instanceof _y?this.urlUpdateStrategy==="eager"&&(l.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(l),l)):i instanceof by?(this.commitTransition(l),this.urlUpdateStrategy==="deferred"&&!l.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(l),l)):i instanceof xc&&i.code!==$s.SupersededByNewNavigation&&i.code!==$s.Redirect?this.restoreHistory(l):i instanceof om?this.restoreHistory(l,!0):i instanceof Pu&&(this.lastSuccessfulId=i.id,this.currentPageId=this.browserPageId)}setBrowserUrl(i,{extras:l,id:d}){let{replaceUrl:a,state:I}=l;if(this.location.isCurrentPathEqualTo(i)||a){let R=this.browserPageId,L=Lt(Lt({},I),this.generateNgRouterState(d,R));this.location.replaceState(i,"",L)}else{let R=Lt(Lt({},I),this.generateNgRouterState(d,this.browserPageId+1));this.location.go(i,"",R)}}restoreHistory(i,l=!1){if(this.canceledNavigationResolution==="computed"){let d=this.browserPageId,a=this.currentPageId-d;a!==0?this.location.historyGo(a):this.getCurrentUrlTree()===i.finalUrl&&a===0&&(this.resetInternalState(i),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(l&&this.resetInternalState(i),this.resetUrlToCurrentUrlTree())}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(i,l){return this.canceledNavigationResolution==="computed"?{navigationId:i,\u0275routerPageId:l}:{navigationId:i}}static \u0275fac=(()=>{let i;return function(d){return(i||(i=qp(n)))(d||n)}})();static \u0275prov=zt({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function fS(n,r){n.events.pipe(Oi(i=>i instanceof Pu||i instanceof xc||i instanceof om||i instanceof Au),Tn(i=>i instanceof Pu||i instanceof Au?0:(i instanceof xc?i.code===$s.Redirect||i.code===$s.SupersededByNewNavigation:!1)?2:1),Oi(i=>i!==2),Ls(1)).subscribe(()=>{r()})}var tG={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},nG={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},Xd=(()=>{class n{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=Me(W0);stateManager=Me(RR);options=Me(My,{optional:!0})||{};pendingTasks=Me(gu);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=Me(AR);urlSerializer=Me(Dy);location=Me(Yp);urlHandlingStrategy=Me(Q_);injector=Me(os);_events=new fr;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=Me(kR);onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=Me(Py,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!Me(X_,{optional:!0});currentNavigation=this.navigationTransitions.currentNavigation.asReadonly();constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:i=>{this.console.warn(i)}}),this.subscribeToNavigationEvents()}eventsSubscription=new Ri;subscribeToNavigationEvents(){let i=this.navigationTransitions.events.subscribe(l=>{try{let d=this.navigationTransitions.currentTransition,a=$o(this.navigationTransitions.currentNavigation);if(d!==null&&a!==null){if(this.stateManager.handleRouterEvent(l,a),l instanceof xc&&l.code!==$s.Redirect&&l.code!==$s.SupersededByNewNavigation)this.navigated=!0;else if(l instanceof Pu)this.navigated=!0;else if(l instanceof sm){let I=l.navigationBehaviorOptions,R=this.urlHandlingStrategy.merge(l.url,d.currentRawUrl),L=Lt({browserUrl:d.extras.browserUrl,info:d.extras.info,skipLocationChange:d.extras.skipLocationChange,replaceUrl:d.extras.replaceUrl||this.urlUpdateStrategy==="eager"||J$(d.source)},I);this.scheduleNavigation(R,my,null,L,{resolve:d.resolve,reject:d.reject,promise:d.promise})}}t$(l)&&this._events.next(l)}catch(d){this.navigationTransitions.transitionAbortWithErrorSubject.next(d)}});this.eventsSubscription.add(i)}resetRootComponentType(i){this.routerState.root.component=i,this.navigationTransitions.rootComponentType=i}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),my,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((i,l,d)=>{this.navigateToSyncWithBrowser(i,d,l)})}navigateToSyncWithBrowser(i,l,d){let a={replaceUrl:!0},I=d?.navigationId?d:null;if(d){let L=Lt({},d);delete L.navigationId,delete L.\u0275routerPageId,Object.keys(L).length!==0&&(a.state=L)}let R=this.parseUrl(i);this.scheduleNavigation(R,l,I,a).catch(L=>{this.disposed||this.injector.get(ma)(L)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return $o(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(i){this.config=i.map(dS),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(i,l={}){let{relativeTo:d,queryParams:a,fragment:I,queryParamsHandling:R,preserveFragment:L}=l,H=L?this.currentUrlTree.fragment:I,K=null;switch(R??this.options.defaultQueryParamsHandling){case"merge":K=Lt(Lt({},this.currentUrlTree.queryParams),a);break;case"preserve":K=this.currentUrlTree.queryParams;break;default:K=a||null}K!==null&&(K=this.removeEmptyProps(K));let W;try{let Q=d?d.snapshot:this.routerState.snapshot.root;W=lR(Q)}catch{(typeof i[0]!="string"||i[0][0]!=="/")&&(i=[]),W=this.currentUrlTree.root}return cR(W,i,K,H??null)}navigateByUrl(i,l={skipLocationChange:!1}){let d=im(i)?i:this.parseUrl(i),a=this.urlHandlingStrategy.merge(d,this.rawUrlTree);return this.scheduleNavigation(a,my,null,l)}navigate(i,l={skipLocationChange:!1}){return rG(i),this.navigateByUrl(this.createUrlTree(i,l),l)}serializeUrl(i){return this.urlSerializer.serialize(i)}parseUrl(i){try{return this.urlSerializer.parse(i)}catch{return this.console.warn(fu(4018,!1)),this.urlSerializer.parse("/")}}isActive(i,l){let d;if(l===!0?d=Lt({},tG):l===!1?d=Lt({},nG):d=l,im(i))return $k(this.currentUrlTree,i,d);let a=this.parseUrl(i);return $k(this.currentUrlTree,a,d)}removeEmptyProps(i){return Object.entries(i).reduce((l,[d,a])=>(a!=null&&(l[d]=a),l),{})}scheduleNavigation(i,l,d,a,I){if(this.disposed)return Promise.resolve(!1);let R,L,H;I?(R=I.resolve,L=I.reject,H=I.promise):H=new Promise((W,Q)=>{R=W,L=Q});let K=this.pendingTasks.add();return fS(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(K))}),this.navigationTransitions.handleNavigationRequest({source:l,restoredState:d,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:i,extras:a,resolve:R,reject:L,promise:H,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),H.catch(W=>Promise.reject(W))}static \u0275fac=function(l){return new(l||n)};static \u0275prov=zt({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function rG(n){for(let r=0;r<n.length;r++)if(n[r]==null)throw new Ht(4008,!1)}var sG=new yn("");function pS(n,...r){return kd([{provide:Py,multi:!0,useValue:n},[],{provide:Ba,useFactory:aG,deps:[Xd]},{provide:Z0,multi:!0,useFactory:lG},r.map(i=>i.\u0275providers)])}function aG(n){return n.routerState.root}function lG(){let n=Me(Uo);return r=>{let i=n.get(Pl);if(r!==i.components[0])return;let l=n.get(Xd),d=n.get(cG);n.get(uG)===1&&l.initialNavigation(),n.get(dG,null,{optional:!0})?.setUpPreloading(),n.get(sG,null,{optional:!0})?.init(),l.resetRootComponentType(i.componentTypes[0]),d.closed||(d.next(),d.complete(),d.unsubscribe())}}var cG=new yn("",{factory:()=>new fr}),uG=new yn("",{providedIn:"root",factory:()=>1});var dG=new yn("");var Eo=class n{logger=Me(qn);router=Me(Xd);platformId=Me(Dl);history=[["/"]];resetHistory(){this.history=[["/"]],this.router.navigate(["/"])}getCurrentPath(){return this.history.at(-1)?.join("")??"/"}navigateToHome(){this.router.navigate(["/"]),this.history.push(["/"])}navigateToListView(){this.router.navigate(["/list"]),this.history.push(["/list"])}navigateToSearchView(){this.router.navigate(["/search"]),this.history.push(["/search"])}navigateToProfile(r){this.scrollToTop(),this.router.navigate(["/profile",r]),this.history.push(["/profile",r])}navigateToRoute(r){this.router.navigate(["/route",r]),this.history.push(["/route",r])}goBack(){if(this.history.length>1){this.history.pop();let r=this.history.pop();if(!r){this.logger.log("No previous path found");return}this.router.navigate(r),this.history.push(r);return}this.logger.log("Only current path in history")}scrollToTop(){if(_c(this.platformId))try{let r=document.querySelector("mapvx-website");if(r){r.scrollIntoView({behavior:"smooth",block:"start"});return}window.scrollTo({top:0,behavior:"smooth"})}catch(r){this.logger.log("Error scrolling to top:",r),window.scrollTo(0,0)}}static \u0275fac=function(i){return new(i||n)};static \u0275prov=zt({token:n,factory:n.\u0275fac})};function mS(n){return I_(n)}var fG={"Yoga Studio":["fak","beauty"],"Salon / Barbershop":["fak","services"],"Event Space":["fak","events"],"Comedy Club":["fak","events"],"Women's Store":["fak","shopping"],Gym:["fak","beauty"],Spa:["fak","beauty"],"Men's Store":["fak","shopping"],"Clothing Store":["fak","shopping"],"Shoe Store":["fak","shopping"],"Gift Shop":["fak","shopping"],Winery:["fak","food-and-beverage"],"Perfume Shop":["fak","shopping"],"Sporting Goods Shop":["fak","shopping"],"Jewelry Store":["fak","shopping"],"Flower Shop":["fak","shopping"],"Watch Shop":["fak","shopping"],"Health & Beauty Service":["fak","beauty"],"Furniture / Home Store":["fak","shopping"],"Optical Shop":["fak","beauty"],"Salad Place":["fak","food-and-beverage"],"Italian Restaurant":["fak","food-and-beverage"],Cafeteria:["fak","food-and-beverage"],Restaurant:["fak","food-and-beverage"],Caf\u00E9:["fak","food-and-beverage"],"American Restaurant":["fak","food-and-beverage"],"Fast Food Restaurant":["fak","food-and-beverage"],"Cocktail Bar":["fak","food-and-beverage"],Delicatessen:["fak","food-and-beverage"],"Japanese Restaurant":["fak","food-and-beverage"],"Middle Eastern Restaurant":["fak","food-and-beverage"],"Mediterranean Restaurant":["fak","food-and-beverage"],"Brazilian Restaurant":["fak","food-and-beverage"],Pub:["fak","food-and-beverage"],"Beer Bar":["fak","food-and-beverage"],Bar:["fak","food-and-beverage"],Lounge:["fak","food-and-beverage"],Nightclub:["fak","food-and-beverage"],"Chocolate Shop":["fak","food-and-beverage"],"Ice Cream Shop":["fak","food-and-beverage"],"Donut Shop":["fak","food-and-beverage"],"Coffee Shop":["fak","food-and-beverage"],"Grocery Store":["fak","shopping"],Pharmacy:["fak","health"],"Convenience Store":["fak","shopping"],"Dentist's Office":["fak","health"],Bank:["fak","services"],"Travel Agency":["fak","airport"],"Shipping Store":["fak","services"],"Mobile Phone Shop":["fak","shopping"],Parking:["fak","parking"],"Public Restrooms":["fak","user"],"Public Bathroom":["fak","user"],"Transport Service":["fak","user"],Hotel:["fak","hotels"],"Coming soon":["fak","user"],"Roller Rink":["fak","beauty"],"Music Venue":["fak","events"],"Football Shop":["fak","shopping"],Stage:["fak","events"],Tavern:["fak","food-and-beverage"],"Point of interest":["fak","user"],Entrance:["fak","user"],Exit:["fak","user"],"Music Festival":["fak","events"]};function e1(n){let r=fG[n];return r||["fak","shopping"]}var yS={};DI(yS,{faAirport:()=>pG,faArrowTopRight:()=>mG,faBackground:()=>gS,faBeauty:()=>gG,faCenter:()=>yG,faCompass:()=>vG,faCompassNorth:()=>_G,faDeals:()=>bG,faEvents:()=>wG,faFoodAndBeverage:()=>xG,faHealth:()=>CG,faHotels:()=>SG,faParking:()=>EG,faRoute:()=>IG,faServices:()=>DG,faShopping:()=>TG,faUser:()=>MG});var pG={prefix:"fak",iconName:"airport",icon:[448,512,[],"e009","M431.4 140.8c-.2-.7-.6-1.3-1.1-1.9-14.7-18.5-41.3-23.7-61.9-11.8l-84.5 48.8-49.6-32.1 4.1-2.4c3.6-2 4.8-6.6 2.8-10.2s-6.6-4.8-10.2-2.8l-10.7 6.3-28-18.2 4.1-2.4c3.6-2 4.8-6.6 2.8-10.2s-6.6-4.8-10.2-2.8l-10.7 6.3-66.7-43.2-44.9 25.9 133.4 134.5-54.3 31.4c-10.7 6.1-27.7 21.2-41 36.2L33.3 254.2c-2.3-1.2-5.1-1.2-7.2 .1L4.2 266.9C2.3 268 1 270.1 .6 272.2s.4 4.5 1.9 6.1l65.4 70.9 28.8 92.1c.7 2.2 2.3 3.9 4.5 4.7 .8 .4 1.8 .5 2.8 .5 1.3 0 2.5-.4 3.7-1l21.9-12.6c2.3-1.3 3.6-3.6 3.7-6.1l2.9-80.6c19.7-4.1 41.3-11.3 51.9-17.5l54.3-31.4 49.8 182.7 44.9-25.9-4.1-79.3 10.7-6.3c3.6-2 4.8-6.6 2.8-10.2s-6.6-4.8-10.2-2.8l-4.1 2.4-1.7-33.5 10.7-6.3c3.6-2 4.8-6.6 2.8-10.2s-6.6-4.8-10.2-2.8l-4.1 2.4-3-59.1 84.5-48.7c20.6-11.8 29.4-37.4 20.7-59.5l-.4 .5z"]},mG={prefix:"fak",iconName:"arrow-top-right",icon:[427,512,[],"e010","M41 490.7l0-320 275.1 0-88.6-95.3 35.1-38 147.7 160-148.3 160.7-34.5-38 88.6-96-225.8 0 0 266.7-49.2 0z"]},gS={prefix:"fak",iconName:"background",icon:[388,512,[],"e00a","M387.9 193.9C387.9 86.9 301 0 193.9 0S0 86.9 0 193.9 84.7 385.6 190.1 387.7l0 67.8c-11.6 1.9-20.5 11.9-20.5 24 0 13.5 11 24.4 24.4 24.4s24.4-11 24.4-24.4c0-12.1-8.8-22.2-20.5-24l0-67.8c105.3-2 190.1-88 190.1-193.8zM210.5 479.4c0 9.2-7.4 16.6-16.6 16.6s-16.6-7.4-16.6-16.6 7.4-16.6 16.6-16.6 16.6 7.4 16.6 16.6z"]},gG={prefix:"fak",iconName:"beauty",icon:[576,512,[],"e000","M190.8 234.2c-21.8-10.6-45.1-16.3-66.9-18.6-.6-35.8 5.4-66.6 8.6-78.7 1-3.2 4.2-5.1 7.4-4.5 11.8 3.5 40 13.1 69.4 31.7-9 21.1-16 45.1-18.2 70.4l0 0zm176.6-70.4c29.1-18.6 57.6-28.2 69.4-31.7 3.2-.6 6.4 1 7.4 4.5 3.2 12.5 9.3 42.9 8.6 78.7-22.1 2.2-45.1 8-66.9 18.6-2.2-25.3-9-49-18.2-70.4l0 0zM260.9 417.6c-33.9 6.1-94.1 10.2-143.7-19.8-63-38.4-89-120-95-142.7-.6-3.2 1-6.7 4.2-7.7 21.8-5.8 101.1-23 163.8 14.4 5.1 71 49.6 131.2 70.4 155.5l0 0zM385.7 262.1c63-37.4 142.4-20.2 163.8-14.4 3.2 1 5.1 4.2 4.2 7.7-6.1 22.7-32 104.3-95 142.7-49.6 30.1-109.4 25.9-143.7 19.8 5.1-5.8 11.2-13.4 18.2-23 17.3-24 37.4-58.6 47-98.6 2.6-10.9 4.5-22.1 5.4-33.6l0 0zm-23.4-12.8c0 89.3-74.2 161.9-74.2 161.9s-74.2-72.6-74.2-161.9c0-76.8 54.4-140.8 70.1-157.8 2.2-2.2 6.1-2.2 8.3 0 15.7 17 70.1 81 70.1 157.8l0 0z"]},yG={prefix:"fak",iconName:"center",icon:[576,512,[],"e00f","M545.2 238.7l-50.9 0C486 138.2 406 57.9 305.5 49.9l0-50.9c0-9.6-8-17.3-17.3-17.3S271-10.6 271-1l0 50.9C170.5 58.2 90.5 138.2 82.2 238.7l-50.9 0c-9.6 0-17.3 8-17.3 17.3s7.7 17.3 17.3 17.3l50.9 0C90.5 373.4 170.5 454.1 271 462.1l0 50.9c0 9.6 8 17.3 17.3 17.3s17.3-7.7 17.3-17.3l0-50.9c100.2-8.3 180.8-88.6 188.8-188.8l50.9 0c9.6 0 17.3-7.7 17.3-17.3s-7.7-17.3-17.3-17.3zM459.1 256c0 5.8-.3 11.5-1 17.3-8 80.3-72.3 144.6-152.6 153-11.5 1.3-23 1.3-34.6 0-80.6-8.3-144.6-72.6-152.6-153l0 0c-.6-5.4-1-11.2-1-17.3s.3-11.5 1-17.3l0 0c8.3-80.6 72.3-144.6 152.6-152.6 11.5-1.3 23-1.3 34.6 0 80.3 8.3 144.6 72.3 152.6 152.6 .6 5.8 1 11.5 1 17.3zm-271.2 0a100.1 100.1 0 1 1 200.2 0 100.1 100.1 0 1 1 -200.2 0z"]},vG={prefix:"fak",iconName:"compass",icon:[256,512,[],"e00d","M238.9 263.4l0 257.6-47 0-118.4-163.2 0 163.2-55.7 0 0-257.6 47 0 118.4 161.6 0-161.6 55.7 0zM26.8 203.5c-3.2 0-5.8-1.3-7.7-3.5-1.6-2.2-1.9-4.8-.6-7L119.9-4.2C121.2-7 124.7-9 128.2-9s7 1.9 8.3 4.8L238 193c1.6 3.2 .6 6.7-2.6 9s-7.7 2.2-10.9 .6l-96.3-53.4-96.3 53.4s-3.2 1.3-5.1 1.3l0 0z"]},_G={prefix:"fak",iconName:"compass-north",icon:[382,512,[],"e00b","M202.8 6.9c-6.5-6.5-17-6.5-23.6 0L112.5 73.6c-4.8 4.8-6.2 11.9-3.6 18.2 2.6 6.2 8.7 10.4 15.4 10.4l133.4 0c6.7 0 12.9-4 15.4-10.4 2.6-6.2 1.2-13.3-3.6-18.2L202.8 6.9zM191 133a190.5 190.5 0 1 0 0 381 190.5 190.5 0 1 0 0-381zm38.9 278.1l-74.7-107.9 0 97.6c0 9.9-8 17.9-17.9 17.9s-17.9-8-17.9-17.9l0-154.7c0-7.9 5.1-14.8 12.5-17s15.6 .5 20 6.9l74.7 107.9 0-97.6c0-9.9 8-17.9 17.9-17.9s17.9 8 17.9 17.9l0 154.7c0 7.9-5 14.8-12.5 17-7.4 2.3-15.6-.5-20-6.9z"]},bG={prefix:"fak",iconName:"deals",icon:[512,512,[],"e007","M256 0a256 256 0 1 0 0 512 256 256 0 1 0 0-512zm0 30.1a225.9 225.9 0 1 1 0 451.8 225.9 225.9 0 1 1 0-451.8zM288 232l-10.2-2.2 0-66.9c19.5 6.1 30.7 23 36.8 41.6l46.7-18.6c-9.3-32-34.2-63.7-83.2-70.7l0-33.6-35.5 0 0 33.3c-53.4 5.8-81.3 41.6-81.3 80.6 0 51.5 30.1 73.3 73 81.3l8 1.6 0 72.3c-26.9-7.4-40.6-31-44.8-53.8l-49 18.6 .3 0c9.3 39.7 38.7 75.8 93.8 82.2l0 33.6 35.5 0 0-33.3c58.9-5.8 86.1-42.2 86.1-83.8 0-50.9-37.4-73-75.8-82.2zm-45.8-70.7l0 61.8c-17.6-4.8-27.5-13.8-27.5-31 0-12.5 7.7-26.2 27.5-30.7l0 0zM277.8 351l0-66.9c19.8 4.8 32 16 32 32.6s-9.6 30.1-32 34.2z"]},wG={prefix:"fak",iconName:"events",icon:[576,512,[],"e003","M421.4 122.6c-24.3-24.3-27.2-62.1-8.6-89.6 1.6-2.2 1.3-5.4-.6-7.4L370.2-16.3c-2.2-2.2-5.8-2.2-8 0L132.8 213.1c-2.2 2.2-2.2 5.8 0 8l11.5 11.5c3.5 3.5 3.5 9.3 0 12.8s-9.3 3.5-12.8 0L120 233.9c-2.2-2.2-5.8-2.2-8 0L15.7 330.2c-2.2 2.2-2.2 5.8 0 8l41.9 41.9c1.9 1.9 5.1 2.2 7.4 .6 27.5-18.6 65.3-15.7 89.6 8.6s27.2 62.1 8.6 89.6c-1.6 2.2-1.3 5.4 .6 7.4l41.9 41.9c2.2 2.2 5.8 2.2 8 0L310.1 432c2.2-2.2 2.2-5.8 0-8l-11.5-11.5c-3.5-3.5-3.5-9.3 0-12.5 3.5-3.5 9.3-3.5 12.5 0l11.5 11.5c2.2 2.2 5.8 2.2 8 0L560 182.1c2.2-2.2 2.2-5.8 0-8l-41.9-41.9c-1.9-1.9-5.1-2.2-7.4-.6-27.5 18.6-65.3 15.7-89.6-8.6zm-225 174.7c-4.5 4.5-11.8 4.5-16.3 0L152 269.1c-4.5-4.5-4.5-11.8 0-16.3s11.8-4.5 16.3 0L196.5 281c4.5 4.5 4.5 11.8 0 16.3zM247 344.6c-4.5 4.5-11.8 4.5-16.3 0l-28.2-28.2c-4.5-4.5-4.5-11.8 0-16.3s11.8-4.5 16.3 0L247 328.3c4.5 4.5 4.5 11.8 0 16.3zm48.3 48c-4.5 4.5-11.8 4.5-16.3 0l-28.2-28.2c-4.5-4.5-4.5-11.8 0-16.3s11.8-4.5 16.3 0l28.2 28.2c4.5 4.5 4.5 11.8 0 16.3zM421.4 229.1c-.3 2.9-2.6 5.4-5.1 6.7l-43.2 18.9c-1.9 1-3.5 2.2-4.2 4.2l-18.9 43.2s-1 1.9-1.9 2.6c-1.3 1.3-2.9 2.2-4.8 2.6-2.9 .3-6.1-.6-8-2.9l-31-35.2c-1.3-1.6-3.5-2.6-5.4-2.9l-46.7-4.5c-2.9 0-5.8-2.2-7-4.8s-1.3-6.1 0-8.3l23.7-40.3c1-1.9 1.6-4.2 1-6.1l-10.2-45.8c-.6-2.9 0-6.1 2.2-8.3s5.1-2.9 8.3-2.2l45.8 10.2c2.2 .3 4.2 0 6.1-1l40.3-23.7c2.6-1.6 5.8-1.6 8.3 0 2.6 1.3 4.5 4.2 4.8 7l4.5 46.7c0 2.2 1.3 4.2 2.9 5.4l35.2 31c2.2 1.9 3.2 5.1 2.9 8l0 0z"]},xG={prefix:"fak",iconName:"food-and-beverage",icon:[512,512,[],"e001","M497.9 145.9l-127 0 0-114.6-24 0 0 114.6-127.4 0c-8 0-14.4 6.4-14.4 14.4l0 17.3c0 8 6.4 14.4 14.4 14.4l19.2 0 3.5 53.8c-61.1-30.1-140.5-23.4-192.6 18.2-29.1 23-47.4 55-48.6 90.6 0 5.1 3.8 9.3 9 9.3l301.4 0c5.1 0 9.3-4.2 9-9.3-1.6-43.5-28.8-80.6-66.6-103l-3.8-59.5 218.9 0-17 259.2c-.6 10.9-11.8 18.2-23 18.2l-116.2 0c5.1-4.5 8.6-10.9 8.6-18.2l0-19.5c0-4.8-4.2-8.3-9-8.3l-303 0c-4.8 0-9 3.5-9 8.3l0 19.5c0 17.9 19.2 29.4 37.4 29.4l390.4 0c17-.3 32.6-11.8 33.6-28.8L479 192 498.2 192c8 0 14.4-6.4 14.4-14.4l0-17.3c0-8-6.4-14.4-14.4-14.4zm3.8 31.7c0 1.9-1.6 3.8-3.8 3.8l-278.4 0c-1.9 0-3.8-1.6-3.8-3.8l0-17.3c0-1.9 1.6-3.8 3.8-3.8l278.4 0c1.9 0 3.8 1.6 3.8 3.8l0 17.3zM9.3 402.9l301.8 0c4.8 0 8.6-3.8 8.6-8.6s-3.8-8.6-8.6-8.6l-301.8 0c-4.8 0-8.6 3.8-8.6 8.6s3.8 8.6 8.6 8.6z"]},CG={prefix:"fak",iconName:"health",icon:[512,512,[],"e002","M256 0a256 256 0 1 0 0 512 256 256 0 1 0 0-512zm0 30.1a225.9 225.9 0 1 1 0 451.8 225.9 225.9 0 1 1 0-451.8zM393.9 212.5l-94.4 0 0-94.4c0-5.1-4.2-9.3-9.3-9.3l-68.5 0c-5.1 0-9.3 4.2-9.3 9.3l0 94.4-94.4 0c-5.1 0-9.3 4.2-9.3 9.3l0 68.5c0 5.1 4.2 9.3 9.3 9.3l94.4 0 0 94.4c0 5.1 4.2 9.3 9.3 9.3l68.5 0c5.1 0 9.3-4.2 9.3-9.3l0-94.4 94.4 0c5.1 0 9.3-4.2 9.3-9.3l0-68.5c0-5.1-4.2-9.3-9.3-9.3z"]},SG={prefix:"fak",iconName:"hotels",icon:[512,512,[],"e00c","M50.1 357.8l8.1-18.1 80.6 36.1-8.1 18.1zm462.7 78.7L428 207.7c14.4-8.6 26.2-21.4 33.9-36.8 10.9-22.4 11.8-48 3.2-72.3-17.9-48.3-71.7-74.9-119.7-59.2-17 5.4-31.4 15.7-42.2 29.4-7.7-2.2-15.7-3.5-23.7-4.5-3.5-.3-6.7 0-10.2-.3-1.6-4.5-3.5-8.3-5.8-11.2-2.2-3.2-5.4-6.4-9.3-9.9-14.4-12.8-32.3-21.1-51.2-22.7-5.1-.3-9.6-.6-13.4 0-4.8 .3-10.2 2.2-16 5.1-10.9 5.4-20.5 13.4-28.8 23.7L46.2 171.8c-8.3 10.9-15 23-19.8 35.5-5.4 12.5-9.3 25.9-10.9 40.3L-.5 407c-1.3 13.1 0 25.9 3.5 37.8 1.9 6.4 4.5 11.2 7.4 15.4 2.2 3.2 5.4 6.4 9.3 9.9 14.4 12.8 32.3 21.1 51.2 22.7 2.9 .3 5.4 .3 8 .3l0 0c1.9 0 3.8 0 5.4-.3 4.8-.3 10.2-2.2 16-5.1 10.9-5.4 20.5-13.4 28.8-23.7l98.6-122.9c8.3-10.9 15-23 19.8-35.5 5.4-12.5 9.3-25.9 10.9-40l13.8-136.3 1.9 0c3.5 .3 6.7 .3 10.2 .3 .6 9.3 1.9 18.6 5.4 27.8 14.4 39 52.2 63.7 91.2 63.7 3.2 0 6.4-.3 9.6-.6l42.9 116.5-44.5 14.4 12.2 37.8 46.1-15 6.4 17-59.5 19.5 12.2 37.8 61.1-19.8 8.3 22.1 37.1-13.8zM237.6 92.5c2.9-1.6 9-3.5 17.3-4.5 .3 4.2 0 8.3 0 12.8-8.6-2.9-14.7-6.1-17.3-8.3zm1.3 170.2c-1.3 11.8-4.5 23.7-9.6 34.9-4.2 10.9-9.9 21.4-17 30.7L114 450.9c-6.4 8-13.8 14.1-22.1 18.2-4.5 2.2-7.7 2.9-9.3 3.2l-9.3 0c-14.7-1.3-28.5-7.7-40-17.9-2.9-2.6-5.1-4.8-6.7-7-1-1.3-2.6-4.2-4.2-9.6-2.6-9.3-3.8-19.2-2.6-29.8L36 248.6c1.6-11.8 4.8-23.7 9.6-34.9 4.2-10.9 9.9-21.4 17-30.7L161.1 60.5c6.4-8 13.8-14.1 22.1-18.2 4.5-2.2 7.7-2.9 9.3-3.2l9.3 0c14.7 1.3 28.5 7.7 40 17.9 2.6 2.6 5.1 5.1 6.4 7l.3 .6c-8 1.3-14.7 3.2-20.5 6.1-2.6-3.2-5.8-6.1-9.6-8-6.4-2.9-13.8-3.2-20.5-.3s-12.2 8.3-15 15c-5.8 14.1 .6 30.4 14.1 36.2 3.5 1.6 7 2.2 10.9 2.2 3.2 0 6.7-.6 9.9-1.9 1.9-1 3.5-2.2 5.1-3.5 7.4 6.1 17.9 10.9 30.1 14.1L239.2 262.1zM212.9 93.1s-1.6 2.2-2.9 2.9c-1 .6-2.9 1-5.1 0-3.8-1.6-5.4-6.4-3.8-10.6 .6-1.9 2.2-3.2 4.2-4.2 1-.6 2.9-1 5.1 0 1.9 .6 3.2 2.2 3.8 4.2-.6 1.9-1.3 3.5-1.3 5.1l0 2.6zM274.4 105c.6-5.8 .6-11.5 0-17.3l2.9 0c5.1 .6 9.6 1.3 13.4 2.2-2.2 5.1-3.8 10.2-5.1 15.7-3.2 0-6.1 0-9.6-.3l-1.9 0zm52.5 38.4c-2.6-6.7-3.5-13.4-3.5-20.2 3.5-1.6 6.7-3.2 9-5.4 6.4-5.1 8-11.2 8.3-15.4 .3-4.5-1-8.6-3.2-12.5 5.4-5.8 12.2-10.9 20.2-13.4 28.2-9.3 59.5 6.7 70.1 35.2 5.1 13.8 4.5 28.5-1.6 41.3-5.8 12.2-16.3 21.1-29.1 25.3-28.2 9.3-59.5-6.7-70.1-35.2z"]},EG={prefix:"fak",iconName:"parking",icon:[448,512,[],"e006","M16 0L246.4 0C356.5 0 432 63.7 432 165.4S356.5 332.2 247 332.2l-119.7 0 0 179.8-111.4 0 0-512zM315.8 165.4c0-45.1-36.5-73.3-89.3-73.3l-98.9 0 0 147.8 98.9 0c52.8 0 89.3-26.9 89.3-74.6z"]},IG={prefix:"fak",iconName:"route",icon:[384,512,[],"e00e","M22.7 206.4c-3.2-3.2-5.1-7.7-4.5-11.8 .3-4.2 3.2-7.4 7-8.6L347.8 82.6c4.8-1.6 10.2 0 14.1 4.2 3.8 3.8 5.8 9.6 4.2 14.1L262.7 423c-1.6 5.1-6.7 7.7-12.2 6.7-5.8-1-10.6-5.8-12.2-11.2L192.3 257 30.4 210.6c-2.6-.6-4.8-2.2-6.7-4.2l-.3 0z"]},DG={prefix:"fak",iconName:"services",icon:[512,512,[],"e005","M89.6 51.2l102.4 0c7 0 12.8-5.8 12.8-12.8S199 25.6 192 25.6l-140.8 0C22.7 25.6 0 48.6 0 76.8l0 384C0 489.3 23 512 51.2 512L192 512c7 0 12.8-5.8 12.8-12.8S199 486.4 192 486.4l-102.4 0c-7 0-12.8-5.8-12.8-12.8s5.8-12.8 12.8-12.8l102.4 0c7 0 12.8-5.8 12.8-12.8S199 435.2 192 435.2l-102.4 0c-7 0-12.8-5.8-12.8-12.8s5.8-12.8 12.8-12.8l102.4 0c7 0 12.8-5.8 12.8-12.8S199 384 192 384L89.6 384c-7 0-12.8-5.8-12.8-12.8s5.8-12.8 12.8-12.8l102.4 0c7 0 12.8-5.8 12.8-12.8S199 332.8 192 332.8l-102.4 0c-7 0-12.8-5.8-12.8-12.8s5.8-12.8 12.8-12.8l102.4 0c7 0 12.8-5.8 12.8-12.8S199 281.6 192 281.6l-102.4 0c-7 0-12.8-5.8-12.8-12.8S82.6 256 89.6 256L192 256c7 0 12.8-5.8 12.8-12.8S199 230.4 192 230.4l-102.4 0c-7 0-12.8-5.8-12.8-12.8s5.8-12.8 12.8-12.8l102.4 0c7 0 12.8-5.8 12.8-12.8S199 179.2 192 179.2l-102.4 0c-7 0-12.8-5.8-12.8-12.8s5.8-12.8 12.8-12.8l102.4 0c7 0 12.8-5.8 12.8-12.8S199 128 192 128L89.6 128c-7 0-12.8-5.8-12.8-12.8s5.8-12.8 12.8-12.8l102.4 0c7 0 12.8-5.8 12.8-12.8S199 76.8 192 76.8l-102.4 0c-7 0-12.8-5.8-12.8-12.8s5.8-12.8 12.8-12.8l0 0zM460.8 385.3l0-1.3c0-33.6-28.8-63.4-72.6-81.9 21.4-26.9 21.4-73.3 21.4-97.3 0-25.6-17.3-204.8-38.4-204.8s-38.4 179.2-38.4 204.8c0 20.2 .3 70.1 21.8 97.3-44.2 18.6-73 48.3-73 81.9l0 1.3c-29.1 6.1-51.2 31.7-51.2 62.7 0 35.5 28.8 64 64 64s64-28.8 64-64c0-31-22.1-57-51.2-62.7l0-1.3c0-23.4 25.3-46.7 64-61.4 39 14.7 64 38.1 64 61.4l0 1.3c-29.4 6.1-51.2 31.7-51.2 62.7 0 35.5 28.8 64 64 64s64-28.8 64-64c0-31-22.1-57-51.2-62.7l0 0zM256 448a38.4 38.4 0 1 1 76.8 0 38.4 38.4 0 1 1 -76.8 0zM371.2 256a12.8 12.8 0 1 1 0 25.6 12.8 12.8 0 1 1 0-25.6zM448 409.6a38.4 38.4 0 1 1 0 76.8 38.4 38.4 0 1 1 0-76.8z"]},TG={prefix:"fak",iconName:"shopping",icon:[512,512,[],"e004","M498.1 501.1L446.6 107.8c-.6-4.8-4.8-8.6-9.6-8.6l-76.5 0 0-22.4c0-42.6-34.6-77.1-77.1-77.1-9.3 0-17.9 1.6-26.2 4.8-8.3-2.9-17-4.8-26.2-4.8-42.6 0-77.1 34.6-77.1 77.1l0 22.4-77.8 0c-4.8 0-9 3.5-9.6 8.6L14.9 501.1c0 2.9 .3 5.4 2.2 7.7s4.5 3.2 7.4 3.2l464.3 0c2.9 0 5.4-1.3 7.4-3.2s2.6-5.1 2.2-7.7l0 0zM354.4 481.3l47.7-362.6 26.6 0 47.7 364.2zM283.1 19.5c32 0 57.6 25.9 57.6 57.6l0 22.4-33 0 0-22.4c0-23-10.2-43.5-25.9-57.6l1.3 0zm-25.9 6.4c18.6 9.6 31.4 28.8 31.4 51.2l0 22.4-63 0 0-22.4c0-22.4 12.8-41.9 31.4-51.2l0 0zM173 77.1c0-32 25.9-57.6 57.6-57.6l1.3 0c-16 14.1-25.9 34.9-25.9 57.6l0 22.4-33 0 0-22.4z"]},MG={prefix:"fak",iconName:"user",icon:[320,512,[],"e008","M190.7 104l0 0c28.8 0 52.2-23.4 52.2-52.2S219.5-.3 190.7-.3l0 0c-28.8 0-52.2 23.7-52.2 52.2s23.7 51.8 52.2 51.8zM75.8 381.1l0 0c-.6 1.6-1.6 3.2-2.9 4.8-11.5 13.8-22.7 27.2-34.2 41L12.1 458.6c-5.4 6.4-4.5 16 1.9 21.4l20.5 17.3c2.9 2.2 6.1 3.5 9.9 3.5 4.5 0 8.6-1.9 11.5-5.4 12.2-14.4 38.1-45.1 51.8-61.4 1.6-1.9 3.5-4.2 5.4-6.1 4.8-5.1 9.3-10.6 12.8-16.6 4.8-9 9.3-18.2 13.1-27.5L88.6 345.6c-4.2 11.8-8 23.7-12.2 35.2zM312 223.7l-1.3 0c-6.7-1-13.1-2.2-19.5-3.8-39.4-11.8-62.1-33-71.7-65.9-1.9-6.7-5.1-12.8-9-18.6-10.2-15.4-26.2-25.6-44.2-28.2-16.3-2.9-32.6 1.6-45.4 11.8-17.3 14.1-35.8 26.9-53.8 39.4L63 161.3c-10.2 7-19.5 16.3-26.6 26.9-9.9 14.1-20.2 28.2-30.7 42.2l-7 9.6c-4.8 6.7-3.5 16.3 3.2 21.1l21.8 15.7c6.7 4.8 16.3 3.5 21.1-3.5l7-9.6c11.8-16.3 23-32 34.9-47.4 2.2-2.6 4.5-5.1 7.4-7l-9.6 54.4c-3.5 19.2 3.5 38.4 18.2 50.9 11.8 9.9 24 20.2 35.8 30.1 13.4 11.2 26.9 22.4 40.3 33.9 1.6 1.3 2.9 3.2 3.8 5.4 7.7 20.5 15 41 22.4 61.4l20.5 56.3c2.2 6.1 8 9.9 14.1 9.9 1.6 0 3.5 0 5.1-1l25-9c7.7-2.9 11.8-11.5 9-19.2-9-25.3-33.9-94.1-47.7-131.2-1.3-2.9-2.9-5.4-5.4-7.7-13.8-11.8-27.5-23.7-41.6-34.9-1.6-1.3-2.2-1.6-1.3-5.4 2.9-11.2 5.1-22.4 6.7-33.6 2.2-16.3 4.2-28.8 7-42.9 29.4 31.7 69.8 50.6 112.6 53.4 4.2 0 8-1.3 11.2-3.8 3.2-2.9 4.8-7 4.8-11.2l0-26.9c0-7.7-5.8-14.1-13.1-15z"]};var qo=class n{onDestroy=new fr;logger=Me(qn);mapService=Me(yi);navigatorService=Me(Eo);loadedDataService=Me(oi);iconLibraryService=Me(Wn);document=Me(ui);markers=new Set;_hasCurrentLocationMarker=!1;ngOnDestroy(){this.onDestroy.next(),this.onDestroy.complete()}getIconFromPlace(r){this.logger.log("getIconFromPlace",r);let[i,l]=e1(r.localizedCategory||"");return this.iconLibraryService.getIconDefinition(i,l)}toSVGString(r){return $C(i=>{i(mS(gS)),i(mS(r))}).html.join("")}createPlaceMarkerElement(r){let i=this.getIconFromPlace(r);return this.createElement(r.lazarilloId,i)}createOriginMarkerElement(){let r=this.iconLibraryService.getIconDefinition("fak","user");return this.createElement("origin",r,["route-marker","origin-marker"])}createElement(r,i,l=[]){let d=this.document.createElement("div");return d.className="marker",d.classList.add(...l),d.id=`${r}-marker`,d.innerHTML=this.toSVGString(i),d}addMarker(r){if(this.markers.has(r.lazarilloId)){this.logger.log("Marker already exists for place",r.lazarilloId);return}let i={element:this.createPlaceMarkerElement(r),id:r.lazarilloId,coordinate:r.position,floorId:r.inFloors?.[0],onClick:()=>{this.logger.log("Marker clicked for place",r.lazarilloId),this.navigatorService.navigateToProfile(r.lazarilloId)},anchor:"bottom"};this.mapService.addMarker(i),this.markers.add(r.lazarilloId),this.logger.log("Marker added for place",r.lazarilloId)}addInitialMarkers(){this.loadedDataService.getAvailablePlaces().pipe(Ls(1),rs(this.onDestroy)).subscribe({next:r=>{for(let i of r)this.addMarker(i)},error:r=>{this.logger.logWarning("Error adding initial markers",r)}})}addMarkers(r){this.mapService.mapReady.pipe(Oi(i=>i),Ls(1),rs(this.onDestroy)).subscribe({next:()=>{this.removeAllMarkers();for(let i of r)this.addMarker(i)},error:i=>{this.logger.logWarning("Error adding markers",i)}})}removeAllMarkers(){for(let r of this.markers)this.mapService.removeMarker(r);this.markers.clear()}hasMarker(r){return this.markers.has(r)}selectMarker(r){if(!this.markers.has(r)){this.logger.logWarning("Marker not found",r);return}let i=this.document.getElementById(`${r}-marker`);if(!i){this.logger.logWarning("Marker not found",r);return}i.classList.add("selected")}deselectMarker(r){if(!this.markers.has(r)){this.logger.logWarning("Marker not found",r);return}let i=this.document.getElementById(`${r}-marker`);if(!i){this.logger.logWarning("Marker not found",r);return}i.classList.remove("selected")}deselectMarkers(){let r=this.document.querySelectorAll(".marker.selected");for(let i of r)i.classList.remove("selected")}addOriginMarker(r){let i={element:this.createOriginMarkerElement(),id:"origin",coordinate:r,anchor:"bottom"};this.mapService.addMarker(i),this.markers.add("origin")}addDestinationMarker(r){let i={element:this.createElement(r.lazarilloId,this.getIconFromPlace(r),["route-marker","destination-marker"]),id:r.lazarilloId,coordinate:r.position,anchor:"bottom"};this.mapService.addMarker(i),this.markers.add(r.lazarilloId)}addRouteMarker(r){let i={element:this.createElement(r.lazarilloId,this.getIconFromPlace(r),["route-marker"]),id:r.lazarilloId,coordinate:r.position,anchor:"bottom"};this.mapService.addMarker(i),this.markers.add(r.lazarilloId)}addRouteMarkers(r){for(let i of r)this.addRouteMarker(i)}createCurrentLocationMarkerElement(){let r=this.document.createElement("div");return r.className="current-location-marker",r.id="current-location-marker",r.innerHTML=wP,r}addCurrentLocationMarker(r){let i={element:this.createCurrentLocationMarkerElement(),id:"current-location",coordinate:r,anchor:"bottom"};this.mapService.addMarker(i),this._hasCurrentLocationMarker=!0}updateCurrentLocationMarker(r){this.mapService.updateMarkerPosition("current-location",r)}getCurrentLocationMarkerElement(){return this.document.getElementById("current-location-marker")}get hasCurrentLocationMarker(){return this._hasCurrentLocationMarker}removeCurrentLocationMarker(){console.log("====> removeCurrentLocationMarker"),this.mapService.removeMarker("current-location"),this._hasCurrentLocationMarker=!1}prepareToMapReuse(){this.removeAllMarkers()}static \u0275fac=function(i){return new(i||n)};static \u0275prov=zt({token:n,factory:n.\u0275fac})};var Jd=class n{sdkService=Me(ea);logger=Me(qn);markerService=Me(qo);currentlyWatchingLocation=sn(!1);currentLocation=new Vr(null);currentBearing=new Vr(null);hasBearingPermission=!1;watchId;async checkLocationPermission(){return"permissions"in navigator?navigator.permissions.query({name:"geolocation"}).then(async r=>r.state).catch(r=>(this.logger.logWarning(r),"denied")):(this.logger.log("Permissions API not supported"),"denied")}async requestLocationPermission(){return new Promise(r=>{navigator.geolocation.getCurrentPosition(()=>{console.log("requestLocationPermission granted"),r("granted")},i=>{console.log("requestLocationPermission denied",i),i.code===3?r("prompt"):r("denied")},{enableHighAccuracy:!0,timeout:5e3})})}async getCurrentLocation(){return this.currentlyWatchingLocation()&&this.currentLocation.value!=null?this.currentLocation.value:new Promise((r,i)=>{navigator.geolocation.getCurrentPosition(l=>{r(c_(l))},l=>{i(new Error("Error getting current location",{cause:l}))},{enableHighAccuracy:!0})})}checkBearingLocation(){typeof DeviceOrientationEvent<"u"&&"requestPermission"in DeviceOrientationEvent&&DeviceOrientationEvent.requestPermission().then(i=>{this.hasBearingPermission=i==="granted"}).catch(i=>{this.logger.logWarning(i),this.hasBearingPermission=!1}),this.hasBearingPermission=!0}startWatching(){this.checkBearingLocation(),console.log("startWatching"),console.log("hasBearingPermission",this.hasBearingPermission),this.currentlyWatchingLocation.set(!0),!this.watchId&&(this.watchId=this.sdkService.watchUserLocation(r=>{this.currentLocation.next(r)},r=>{this.logger.logWarning("Error watching user location",r)}),this.hasBearingPermission&&this.sdkService.watchUserHeading(r=>{this.currentBearing.next(r)},r=>{this.logger.logWarning("Error watching user bearing",r)}))}stopWatching(){this.watchId&&this.sdkService.stopWatchingUserLocation(this.watchId),this.hasBearingPermission&&this.sdkService.stopWatchingUserHeading(),this.watchId=void 0,this.markerService.removeCurrentLocationMarker(),this.currentlyWatchingLocation.set(!1)}temporalStopWatching(){this.watchId&&this.sdkService.stopWatchingUserLocation(this.watchId),this.hasBearingPermission&&this.sdkService.stopWatchingUserHeading(),this.watchId=void 0}static \u0275fac=function(i){return new(i||n)};static \u0275prov=zt({token:n,factory:n.\u0275fac})};var t1=(d=>(d[d.NotStarted=0]="NotStarted",d[d.Playing=1]="Playing",d[d.Paused=2]="Paused",d[d.Finished=3]="Finished",d))(t1||{});var Sc=class n{logger=Me(qn);mapService=Me(yi);sdkService=Me(ea);platformId=Me(Dl);document=Me(ui);animationStatusSubject=new Vr(0);activeRouteSubject=new Vr(null);currentStepSubject=new Vr(null);getRoute(r,i){return this.sdkService.getRoute(r,i)}getSecondaryOrangeColor(){if(!_c(this.platformId))return"#EE5845";try{return getComputedStyle(this.document.documentElement).getPropertyValue("--definitions-colors-secondary-orange").trim()}catch(r){return this.logger.logWarning("Error getting --definitions-colors-secondary-orange:",r),"#EE5845"}}startAnimatingRoute(r){let i=this.getSecondaryOrangeColor(),l={behindPathStyle:{type:"Solid",color:i},aheadPathStyle:{type:"Solid",color:"#000000"},routeIcon:this.getRouteIcon(i)},d={callBack:({isFinished:a,step:I})=>{a?(this.animationStatusSubject.next(3),this.currentStepSubject.next(null)):(this.animationStatusSubject.next(1),this.currentStepSubject.next(I))}};this.animationStatusSubject.next(1),this.activeRouteSubject.next(r),this.mapService.startAnimatingRoute(r,l,d)}getRouteIcon(r){let i=this.document.createElement("div");return i.className="route-icon",i.id="route-icon",i.innerHTML=`<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1510
1510
|
<circle cx="15" cy="15" r="15" fill="${r}"/>
|
|
1511
1511
|
<path d="M10.0788 19.6042L14.5476 8.6442C14.7061 8.25536 15.0835 8 15.5013 8C15.9191 8 16.2965 8.25536 16.455 8.6442L20.9238 19.6042C21.1946 20.2717 20.7106 21 19.9932 21C19.7684 21 19.5523 20.9246 19.3766 20.7882L15.5013 17.75L11.6232 20.7882C11.4474 20.9246 11.2313 21 11.0066 21C10.292 21 9.80512 20.2687 10.076 19.6042H10.0788Z" fill="white"/>
|
|
1512
|
-
</svg>`,i}pauseRouteAnimation(){this.animationStatusSubject.next(2),this.mapService.pauseAnimatingRoute()}resumeRouteAnimation(){this.animationStatusSubject.next(1),this.mapService.resumeAnimatingRoute()}restartRouteAnimation(){this.animationStatusSubject.next(1),this.mapService.restartAnimatingRoute()}removeRoute(){this.animationStatusSubject.next(0),this.activeRouteSubject.next(null),this.currentStepSubject.next(null),this.mapService.removeRoute()}static \u0275fac=function(i){return new(i||n)};static \u0275prov=zt({token:n,factory:n.\u0275fac})};var n1={term:"",results:[]};function vS(n,r){let i=r?.injector??Me(Uo),l=new Ra(1),d=Hn(()=>{let a;try{a=n()}catch(I){$o(()=>l.error(I));return}$o(()=>l.next(a))},{injector:i,manualCleanup:!0});return i.get(Bs).onDestroy(()=>{d.destroy(),l.complete()}),l.asObservable()}function uo(n,r){let l=!r?.manualCleanup?r?.injector?.get(Bs)??Me(Bs):null,d=PG(r?.equal),a;r?.requireSync?a=sn({kind:0},{equal:d}):a=sn({kind:1,value:r?.initialValue},{equal:d});let I,R=n.subscribe({next:L=>a.set({kind:1,value:L}),error:L=>{a.set({kind:2,error:L}),I?.()},complete:()=>{I?.()}});if(r?.requireSync&&a().kind===0)throw new Ht(601,!1);return I=l?.onDestroy(R.unsubscribe.bind(R)),tn(()=>{let L=a();switch(L.kind){case 1:return L.value;case 2:throw L.error;case 0:throw new Ht(601,!1)}},{equal:r?.equal})}function PG(n=Object.is){return(r,i)=>r.kind===1&&i.kind===1&&n(r.value,i.value)}var fi=class n{loadedDataService=Me(oi);homePlaces=sn([]);showCategoryFilters=sn(!0);showCityFilter=sn(!0);defaultToMap=sn(!1);activeView=Go(()=>this.defaultToMap()?"map":"grid");inputValue=sn("");selectedInstitution=sn("");hideDeals=sn(!1);cardWidth=sn(void 0);rowsPerPage=sn(2);initialInstitutionId=sn("");lastListedPlaces=sn([]);categoryFiltersData=uo(this.loadedDataService.getInstitution().pipe(Tn(r=>{let i=r.properties;if(i){let l=i.filter(d=>"childPlaces"in d&&d.childPlaces!==void 0).map(d=>({placeData:"childPlaces"in d?d.childPlaces:[],name:d.title}));return l.splice(1,0,{name:"All",placeData:[]}),l}return[]})),{initialValue:[]});selectedFilter=Go(()=>this.categoryFiltersData()[0]?.name);currentPageIndex=Go({source:this.selectedFilter,computation:(r,i)=>r!==i?.source?1:i?.value??1});lastCardSelected=new fr;userAction=new fr;lastSearchData=sn(n1);static \u0275fac=function(i){return new(i||n)};static \u0275prov=zt({token:n,factory:n.\u0275fac})};var OR={fas:{},fak:{}},_S=[];function LR(n){Object.keys(n).forEach(function(r){if(r!=="prefix"){var i=n[r],l=i.icon[2];l.forEach(function(d){typeof d=="string"&&(OR[i.prefix][d]=i)}),OR[i.prefix][i.iconName]=i,_S.push(i)}})}LR(uC);LR(yS);var Ay=TI(sC());var r1=class n{destroy$=new fr;apiKey=cr("");institutionId=cr("");initialData=cr("");showCategoryFilters=cr(!0,{transform:r=>typeof r=="string"?r==="true":r});showCityFilter=cr(!0,{transform:r=>typeof r=="string"?r==="true":r});defaultToMap=cr(!1,{transform:r=>typeof r=="string"?r==="true":r});inheritFontFamily=cr(!1,{transform:r=>typeof r=="string"?r==="true":r});hideDeals=cr(!1,{transform:this.transformToBoolean});cardWidth=cr(void 0,{transform:r=>{if(!(r==null||r==="")){if(typeof r=="string"){let i=Number.parseInt(r,10);return Number.isNaN(i)||i<=0?void 0:i}return typeof r=="number"&&r<=0?void 0:r}}});rowsPerPage=cr(2,{transform:r=>{if(typeof r=="string"){let i=Number.parseInt(r,10);return Number.isNaN(i)||i<=0?2:Math.min(Math.max(i,1),10)}return r<=0?2:Math.min(Math.max(r,1),10)}});cardSelected=vs();userAction=vs();router=Me(Xd);navigatorService=Me(Eo);locationStrategy=Me(vc);platformId=Me(Dl);logger=Me(qn);sdkService=Me(ea);loadedDataService=Me(oi);homeStateService=Me(fi);iconLibrary=Me(dy);isInitialized=!1;isConnected=!1;static instanceCount=0;static hasBeenConnected=!1;constructor(){this.loadIcons(),Hn(()=>{let r=this.apiKey();r&&r.trim()!==""&&!this.sdkService.isInitialized()&&(this.logger.log("\u{1F511} Initializing SDK with provided API key"),this.sdkService.initialize(r.trim()),this.loadData())}),Hn(()=>{this.homeStateService.initialInstitutionId.set(this.institutionId())}),Hn(()=>{this.homeStateService.hideDeals.set(this.hideDeals())}),Hn(()=>{this.homeStateService.cardWidth.set(this.cardWidth())}),Hn(()=>{this.homeStateService.rowsPerPage.set(this.rowsPerPage())}),Hn(()=>{let r=this.initialData();r&&r.trim()!==""&&this.processInitialData(r)}),Hn(()=>{this.homeStateService.showCategoryFilters.set(this.showCategoryFilters())}),Hn(()=>{this.homeStateService.showCityFilter.set(this.showCityFilter())}),Hn(()=>{let r=this.defaultToMap();this.logger.log("====> defaultToMap input",r),this.homeStateService.defaultToMap.set(r)}),Hn(()=>{let r=this.institutionId();r&&r.trim()!==""&&this.updateInstitution(r)}),this.homeStateService.lastCardSelected.pipe(rs(this.destroy$)).subscribe(r=>{this.cardSelected.emit(r),this.logger.log("====> cardSelected",r)}),this.homeStateService.userAction.pipe(rs(this.destroy$)).subscribe(r=>{this.userAction.emit(r),this.logger.log("====> userAction",r)})}ngOnInit(){_c(this.platformId)?this.handleInstanceTracking():this.logger.log("\u{1F5A5}\uFE0F Componente inicializado en servidor (SSR)")}loadIcons(){this.iconLibrary.addIcons(..._S)}loadData(){this.loadPlaces(),this.loadConfiguration(),this.loadInstitution()}async loadCityFilterOptions(r){this.loadedDataService.cityFilterOptions.set(r);let i=r[0];i&&this.homeStateService.selectedInstitution.set(i.institutionId);let l=r.filter(d=>d.type==="parent-place");Promise.all(l.map(async d=>{let a=async()=>{let R=await this.sdkService.getPlaceDetail(d.parentPlaceId);this.loadedDataService.updatePotentialParentPlaces(R)},I=async()=>{let R=await this.sdkService.getSubPlaces(d.parentPlaceId);this.loadedDataService.updateAvailablePlaces(R)};await Promise.all([a(),I()])}))}transformToBoolean(r){return typeof r=="string"?r==="true":r}processInitialData(r){try{let i=JSON.parse(r);if(i.availablePlaces){let d=i.availablePlaces.map(a=>new Ay.LzPlace(a)).filter(a=>a.generalCategory!=="transport"&&!a.hidePlace);this.loadedDataService.updateAvailablePlaces(d),this.logger.log(`\u2705 Successfully loaded ${d.length} places from initial data`)}if(i.institutions){let d=i.institutions.map(a=>new Ay.Institution(a)).find(a=>a.lazarilloId===this.institutionId());d?this.loadedDataService.setInstitution(d):this.logger.log(`\u274C Institution not found for id ${this.institutionId()}`)}}catch(i){this.logger.log("\u274C Error processing initial data",i),this.logger.log(`\u274C Data: ${r}`)}}async loadPlaces(){let r=_c(this.platformId)?"Browser":"Server";try{this.logger.log(`\u{1F4CD} Loading initial places data on ${r}...`);let i=await this.sdkService.getAvailablePlaces(),l=i.filter(d=>d.generalCategory!=="transport"&&!d.hidePlace);this.loadedDataService.updateAvailablePlaces(l),this.logger.log(`\u2705 Successfully loaded ${i.length} places on ${r}`)}catch(i){this.logger.log(`\u274C Error loading initial places data on ${r}:`,i)}}async loadConfiguration(){try{let r=await this.sdkService.getConfiguration();this.loadedDataService.setConfiguration(r);let i=r.cityOptions||[];this.loadCityFilterOptions(i),this.logger.log("\u2705 Successfully loaded configuration",r)}catch(r){this.logger.log("\u274C Error loading initial configuration",r)}}async loadInstitution(){try{let r=await this.sdkService.getInstitutions(),i=r.find(l=>l.lazarilloId===this.institutionId());this.loadedDataService.setInstitutions(r),i?(this.loadedDataService.setInstitution(i),this.logger.log("\u2705 Successfully loaded institution",i)):this.logger.log("\u274C Institution not found")}catch(r){this.logger.log("\u274C Error loading institution data",r)}}updateInstitution(r){console.log("====> updateInstitution",r);let i=this.initialData();if(i&&i.trim()!==""){let l=JSON.parse(i);if(l.institutions){let d=l.institutions.map(I=>new Ay.Institution(I)),a=d.find(I=>I.lazarilloId===r);if(this.loadedDataService.setInstitutions(d),a){this.loadedDataService.setInstitution(a),this.logger.log("\u2705 Successfully updated institution",a);return}}}this.loadInstitution()}handleInstanceTracking(){n.instanceCount++;let r=this.checkForExistingRouterContent(),i=this.router.url;n.hasBeenConnected||r||i!=="/"&&n.instanceCount===1?(this.logger.log("\u{1F504} Detectada reconexi\xF3n del web component"),this.logger.log(` - Instancia #${n.instanceCount}`),this.logger.log(` - URL del router: ${i}`),this.logger.log(` - Contenido en router outlet: ${r}`),this.handleReconnection()):this.logger.log(`\u{1F680} Primera conexi\xF3n del web component (instancia #${n.instanceCount})`),n.hasBeenConnected=!0}checkForExistingRouterContent(){try{let r=document.querySelector("router-outlet");return r?r.children.length>0:!1}catch{return!1}}ngAfterViewInit(){this.isConnected=!0,this.scheduleRouterInitialization()}ngOnDestroy(){this.isConnected=!1,this.destroy$.next(),this.destroy$.complete()}scheduleRouterInitialization(){_c(this.platformId)?requestAnimationFrame(()=>{this.initializeRouter()}):setTimeout(()=>{this.initializeRouter()},0)}initializeRouter(){if(this.isInitialized&&this.isConnected)return;this.locationStrategy.setInitialPath("/");let r=this.router.url,i=this.router.routerState.root.firstChild;r==="/"&&!i?this.router.navigateByUrl("/").then(()=>{this.isInitialized=!0}).catch(l=>{console.error("Error en navegaci\xF3n inicial:",l),this.isInitialized=!0}):this.isInitialized=!0}handleReconnection(){this.logger.log("\u{1F504} Procesando reconexi\xF3n del web component");let r=_c(this.platformId)?10:50;setTimeout(()=>{this.checkAndFixRouterSync()},r)}checkAndFixRouterSync(){if(!_c(this.platformId)){this.logger.log("\u2139\uFE0F Saltando verificaci\xF3n de sincronizaci\xF3n en servidor");return}let r=this.locationStrategy.getCurrentPath()||"/",i=this.router.url,l=this.router.routerState.root.firstChild,d=this.checkForExistingRouterContent();this.logger.log("\u{1F50D} Verificando sincronizaci\xF3n del router:"),this.logger.log(` - Path interno: "${r}"`),this.logger.log(` - Router URL: "${i}"`),this.logger.log(` - Tiene ruta activa: ${!!l}`),this.logger.log(` - Contenido en router outlet: ${d}`),r==="/"&&i!=="/"||r==="/"&&!l&&d||r==="/"&&i==="/"&&d&&!l?(this.logger.log("\u26A0\uFE0F Desincronizaci\xF3n detectada - aplicando correcci\xF3n"),this.performGentleReset()):this.logger.log("\u2705 Router sincronizado correctamente")}performGentleReset(){this.logger.log("\u{1F504} Realizando reset suave del router"),this.router.navigateByUrl("/",{replaceUrl:!0}).then(()=>{this.logger.log("\u2705 Navegaci\xF3n correctiva completada")}).catch(r=>{console.error("\u274C Error en navegaci\xF3n correctiva:",r)})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-root"]],inputs:{apiKey:[1,"apiKey"],institutionId:[1,"institutionId"],initialData:[1,"initialData"],showCategoryFilters:[1,"showCategoryFilters"],showCityFilter:[1,"showCityFilter"],defaultToMap:[1,"defaultToMap"],inheritFontFamily:[1,"inheritFontFamily"],hideDeals:[1,"hideDeals"],cardWidth:[1,"cardWidth"],rowsPerPage:[1,"rowsPerPage"]},outputs:{cardSelected:"cardSelected",userAction:"userAction"},features:[J0([Eo,fi,qo,Wn,Sc,Jd])],decls:4,vars:2,consts:[[1,"named-container"],[1,"app-container"],[1,"app-content"]],template:function(i,l){i&1&&(rt(0,"div",0)(1,"div",1)(2,"div",2),Tt(3,"router-outlet"),at()()()),i&2&&(st(),ii("inherit-font-family",l.inheritFontFamily()))},dependencies:[D_,Mf],styles:["*[_ngcontent-%COMP%]{margin:0;padding:0}.named-container[_ngcontent-%COMP%]{container-name:mapvx-container;container-type:inline-size;width:100%}.app-container[_ngcontent-%COMP%]{display:flex;padding:0;flex-direction:column;justify-content:center;align-items:flex-start;gap:22px;background:var(--definitions-colors-background-50);font-family:Open Sans,sans-serif}.app-container.inherit-font-family[_ngcontent-%COMP%]{font-family:inherit}.app-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:19px}.app-header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{color:var(--definitions-colors-text-900);font:var(--definitions-textFonts-desktop-h1);font-family:inherit}.app-header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--definitions-colors-text-800);font:var(--definitions-textFonts-desktop-sub-1);font-family:inherit}.main-navigation[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:center;flex-wrap:wrap}.nav-button[_ngcontent-%COMP%]{background:#fff3;border:1px solid rgba(255,255,255,.3);color:#fff;padding:.5rem 1rem;border-radius:4px;cursor:pointer;font-size:.9rem;transition:all .2s ease}.nav-button[_ngcontent-%COMP%]:hover{background:#ffffff4d;transform:translateY(-1px)}.nav-button[_ngcontent-%COMP%]:active{transform:translateY(0)}.route-debug[_ngcontent-%COMP%]{margin-top:.5rem;text-align:center}.route-debug[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{color:#fffc;font-size:.8rem;font-family:Courier New,monospace;background:#0000001a;padding:.25rem .5rem;border-radius:4px}.app-content[_ngcontent-%COMP%]{width:100%}"]})};var i1=class n extends vc{_path="";_baseHref;_popStateListeners=[];constructor(){super(),this._baseHref=this.getBaseHref()}path(){return this._path}prepareExternalUrl(r){return this._baseHref+"#"+r}pushState(r,i,l,d){this._updatePath(r,l,d)}replaceState(r,i,l,d){this._updatePath(r,l,d)}forward(){}back(){}getState(){return null}historyGo(r){}onPopState(r){this._popStateListeners.push(r)}getBaseHref(){return typeof document<"u"?document.querySelector("base")?.href??"/":"/"}_updatePath(r,i,l){this._path=i+(l?"?"+l:""),this._notifyPopState(r,i)}_notifyPopState(r,i){let l={type:"popstate",state:r,url:i,pop:!0};this._popStateListeners.forEach(d=>{try{d(l)}catch(a){console.error("Error in popstate listener:",a)}})}getCurrentPath(){return this._path}setInitialPath(r){this._path=r}static \u0275fac=function(i){return new(i||n)};static \u0275prov=zt({token:n,factory:n.\u0275fac,providedIn:"root"})};var AG=["categoryFilters"];function kG(n,r){if(n&1){let i=Fr();rt(0,"button",14),rn("click",function(){pr(i);let d=qt();return mr(d.onClearInput())}),Tt(1,"fa-icon",6),at()}if(n&2){let i=qt();st(),Rt("icon",i.faXmark)}}function RG(n,r){if(n&1&&Tt(0,"fa-icon",6),n&2){let i=qt(2);Rt("icon",i.faCaretUp)}}function OG(n,r){if(n&1&&Tt(0,"fa-icon",6),n&2){let i=qt(2);Rt("icon",i.faCaretDown)}}function LG(n,r){if(n&1){let i=Fr();rt(0,"button",21),rn("click",function(){let d=pr(i).$implicit,a=qt(3);return mr(a.onCitySelect(d))}),en(1),at()}if(n&2){let i=r.$implicit;st(),Ji(" ",i.name," ")}}function FG(n,r){if(n&1&&(rt(0,"div",19),Ki(1,LG,2,1,"button",20,bf),at()),n&2){let i=qt(2);st(),Xi(i.citiesOptions())}}function NG(n,r){if(n&1){let i=Fr();rt(0,"div",9)(1,"button",15),rn("click",function(){pr(i);let d=qt();return mr(d.onCityFilterClick())}),Tt(2,"fa-icon",6),at(),rt(3,"button",16),rn("click",function(){pr(i);let d=qt();return mr(d.onCityFilterClick())}),rt(4,"span",17),en(5),at(),rt(6,"div",18),Rn(7,RG,1,1,"fa-icon",6)(8,OG,1,1,"fa-icon",6),at()(),Rn(9,FG,3,0,"div",19),at()}if(n&2){let i,l=qt();st(),ii("active",l.isCityDropdownOpen()),st(),Rt("icon",l.faFilter),st(3),So((i=l.selectedCity())==null?null:i.name),st(2),On(l.isCityDropdownOpen()?7:8),st(2),On(l.isCityDropdownOpen()?9:-1)}}var o1=class n{logger=Me(qn);stateService=Me(fi);mapService=Me(yi);navigatorService=Me(Eo);loadedDataService=Me(oi);iconLibrary=Me(Wn);categoryFilters;activeView=tn(()=>this.stateService.activeView());showCityFilter=tn(()=>this.stateService.showCityFilter()&&this.citiesOptions().length>0);inputValue=tn(()=>this.stateService.inputValue());citiesOptions=tn(()=>this.loadedDataService.cityFilterOptions());selectedCity=Go(()=>{let r=this.stateService.selectedInstitution();return this.citiesOptions().find(l=>l.institutionId===r)||this.citiesOptions().length>0?this.citiesOptions()[0]:void 0});isCityDropdownOpen=sn(!1);mapReady=uo(this.mapService.mapReady,{initialValue:!1});faGrid2=this.iconLibrary.getIconDefinition("fas","grid-2");faMagnifyingGlass=this.iconLibrary.getIconDefinition("fas","magnifying-glass");faMapLocationDot=this.iconLibrary.getIconDefinition("fas","map-location-dot");faXmark=this.iconLibrary.getIconDefinition("fas","xmark");faCaretDown=this.iconLibrary.getIconDefinition("fas","caret-down");faCaretUp=this.iconLibrary.getIconDefinition("fas","caret-up");faFilter=this.iconLibrary.getIconDefinition("fas","filter");constructor(){Hn(()=>{if(this.stateService.activeView()==="map"&&this.mapReady()){let r=this.stateService.lastListedPlaces(),i=r.map(d=>d.inFloors?.[0]),l=this.getMostFrequentValue(i);l!==void 0&&this.mapService.updateFloor(l),setTimeout(()=>{this.mapService.fitCoordinates(r.map(d=>d.position),{padding:{top:100,left:100,right:100,bottom:100}})},100)}})}ngOnInit(){this.stateService.inputValue()!==""&&this.navigatorService.navigateToSearchView()}ngAfterViewInit(){this.readUrlParams()}readUrlParams(){let r=new URLSearchParams(location.search),i=r.get("search");i&&(this.stateService.inputValue.set(i),this.navigatorService.navigateToSearchView());let l=r.get("tenant");l&&this.navigatorService.navigateToProfile(l);let d=r.get("destination");d&&this.navigatorService.navigateToRoute(d)}onGridClick(){this.stateService.activeView.set("grid")}onMapClick(){this.stateService.activeView.set("map")}onInputChange(r){let i=r.target;this.stateService.inputValue.set(i.value),this.navigatorService.navigateToSearchView()}onClearInput(){this.stateService.inputValue.set(""),this.stateService.userAction.next({type:"return-to-home",data:{filter:this.stateService.selectedFilter()}}),this.navigatorService.navigateToHome()}onCityFilterClick(){this.isCityDropdownOpen.update(r=>!r)}onCitySelect(r){if(this.stateService.selectedInstitution.set(r.institutionId),this.selectedCity.set(r),this.isCityDropdownOpen.set(!1),this.loadedDataService.updateInstitution(r.institutionId),r.type==="institution")this.mapService.removeParentPlace(),this.loadedDataService.parentPlace.set(void 0);else{let l=this.loadedDataService.potentialParentPlaces().find(d=>d.lazarilloId===r.parentPlaceId);l?(this.mapService.setParentPlace(l),this.loadedDataService.parentPlace.set(l)):this.mapService.removeParentPlace()}}getMostFrequentValue(r){if(r.length===0)return;let i=new Map,l=0,d;for(let a of r){if(a==null)continue;let I=(i.get(a)||0)+1;i.set(a,I),I>l&&(l=I,d=a)}return d}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-home-screen"]],viewQuery:function(i,l){if(i&1&&Bg(AG,5),i&2){let d;Vg(d=Ug())&&(l.categoryFilters=d.first)}},decls:23,vars:12,consts:[[1,"home-screen"],[1,"sub-navigation"],[1,"sub-nav-top"],[1,"search-section"],[1,"search-bar"],[1,"search-icon"],[3,"icon"],["name","search input","type","text","placeholder","Search...",1,"search-input",3,"input","value"],[1,"search-clear"],[1,"city-filter-container"],[1,"view-toggle"],[1,"view-btn",3,"click"],[1,"view-icon"],[1,"sub-content"],[1,"search-clear",3,"click"],[1,"mobile-city-filter",3,"click"],[1,"desktop-city-filter",3,"click"],[1,"city-text"],[1,"dropdown-icon"],[1,"city-dropdown"],[1,"city-option"],[1,"city-option",3,"click"]],template:function(i,l){i&1&&(rt(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),Tt(6,"fa-icon",6),at(),rt(7,"input",7),rn("input",function(a){return l.onInputChange(a)}),at(),Rn(8,kG,2,1,"button",8),at(),Rn(9,NG,10,6,"div",9),at(),rt(10,"div",10)(11,"button",11),rn("click",function(){return l.onGridClick()}),rt(12,"div",12),Tt(13,"fa-icon",6),at(),rt(14,"span"),en(15,"Grid View"),at()(),rt(16,"button",11),rn("click",function(){return l.onMapClick()}),rt(17,"div",12),Tt(18,"fa-icon",6),at(),rt(19,"span"),en(20,"Map View"),at()()()()(),rt(21,"div",13),Tt(22,"router-outlet"),at()()),i&2&&(st(4),ii("active",l.inputValue()!==""),st(2),Rt("icon",l.faMagnifyingGlass),st(),Rt("value",l.inputValue()),st(),On(l.inputValue()!==""?8:-1),st(),On(l.showCityFilter()?9:-1),st(2),ii("active",l.activeView()==="grid"),st(2),Rt("icon",l.faGrid2),st(3),ii("active",l.activeView()==="map"),st(2),Rt("icon",l.faMapLocationDot))},dependencies:[wr,Mf],styles:["*[_ngcontent-%COMP%]{margin:0;padding:0;border:0}.home-screen[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:36px}.sub-navigation[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2.25rem;margin-bottom:1.5rem}.sub-nav-top[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:40px}@container mapvx-container (width <= 640px){.sub-nav-top[_ngcontent-%COMP%]{gap:13px}}.search-section[_ngcontent-%COMP%]{display:flex;gap:24px;align-items:center}@container mapvx-container (width <= 640px){.search-section[_ngcontent-%COMP%]{gap:11px}}.search-bar[_ngcontent-%COMP%]{background:var(--definitions-colors-background-white);border-bottom:1px solid var(--definitions-colors-primary-black);display:flex;width:342px;padding:12px 20px;align-items:center;gap:10px}@container mapvx-container (width <= 960px){.search-bar[_ngcontent-%COMP%]{width:150px}}@container mapvx-container (width <= 640px){.search-bar[_ngcontent-%COMP%]{width:110px}}.search-bar.active[_ngcontent-%COMP%]{border-bottom:1px solid var(--definitions-colors-secondary-orange)}.search-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-text-800);display:flex;align-items:center;font-size:20px}.search-bar.active[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-orange)}.search-clear[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-orange);display:flex;align-items:center;font-size:20px;border:none;background:none}.search-clear[_ngcontent-%COMP%]:hover{cursor:pointer}.search-input[_ngcontent-%COMP%]{border:none;outline:none;background:transparent;font:var(--definitions-textFonts-desktop-button-4);font-family:inherit;color:var(--definitions-colors-text-800);width:100%}.search-input[_ngcontent-%COMP%]::placeholder{color:var(--definitions-colors-text-800)}.city-filter-container[_ngcontent-%COMP%]{position:relative}.desktop-city-filter[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.875rem 1rem;height:45px;box-sizing:border-box;cursor:pointer;border:none;background:none}@container mapvx-container (width <= 640px){.desktop-city-filter[_ngcontent-%COMP%]{display:none}}.city-text[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-5);font-family:inherit;color:var(--definitions-colors-text-900);white-space:nowrap}.dropdown-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-text-900);display:flex;align-items:center;font-size:12px}.mobile-city-filter[_ngcontent-%COMP%]{display:none}@container mapvx-container (width <= 640px){.mobile-city-filter[_ngcontent-%COMP%]{display:flex;height:45px;width:52px;padding:0;justify-content:center;align-items:center;gap:10px;cursor:pointer;border:none;background:var(--definitions-colors-background-white);color:var(--definitions-colors-primary-black);font-size:20px}.mobile-city-filter.active[_ngcontent-%COMP%]{background:var(--definitions-colors-primary-black);color:var(--definitions-colors-black_white-50)}}.city-dropdown[_ngcontent-%COMP%]{position:absolute;top:100%;left:0;right:0;background:var(--definitions-colors-background-white);border:1px solid var(--definitions-colors-primary-300);z-index:1;padding:8px 0;min-width:111px}.city-option[_ngcontent-%COMP%]{display:block;width:100%;padding:12px 16px;border:none;background:none;text-align:center;cursor:pointer;font:var(--definitions-textFonts-desktop-input-2);font-family:inherit;color:var(--definitions-colors-text-900);transition:background-color .2s ease}.city-option[_ngcontent-%COMP%]:not(:last-child){border-bottom:1px solid var(--definitions-colors-primary-100)}.city-option[_ngcontent-%COMP%]:hover{background:var(--definitions-colors-background-50)}.view-toggle[_ngcontent-%COMP%]{display:flex;align-items:center}.view-btn[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.625rem;padding:10px 28px;border:none;background:var(--definitions-colors-background-50);cursor:pointer;font:var(--definitions-textFonts-desktop-button-2);font-family:inherit;color:var(--definitions-colors-text-900);white-space:nowrap;transition:all .2s ease;position:relative;border-bottom:1px solid var(--definitions-colors-text-900)}.view-btn.active[_ngcontent-%COMP%]{background:var(--definitions-colors-text-900);color:var(--definitions-colors-text-50)}.view-btn[_ngcontent-%COMP%] .view-icon[_ngcontent-%COMP%]{display:flex;align-items:center;color:currentcolor}@container mapvx-container (width <= 770px){.view-btn[_ngcontent-%COMP%]{padding:10px 0;width:52px;justify-content:center}.view-btn[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:none}}@container mapvx-container (width <= 640px){.view-btn[_ngcontent-%COMP%]{padding:10px 0;width:52px;justify-content:center}.view-btn[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:none}}"],changeDetection:0})};var s1="https://images.ctfassets.net/37yx0l0lf3yk/6eJ4fYG9hQxJ8ayujcebhe/8cf968e7d66df9a8bc75b72b7e7d6432/00002167_BedrockWebsite_TenantCOmingSoon_PlaceholderImage_3840x3840_V2-web.jpg?q=80&fm=webp&w=1920";function a1(n){return n.tags?.includes("deals")||n.tags?.includes("events")}var zG=()=>({rotate:42});function jG(n,r){if(n&1&&Tt(0,"fa-icon",3),n&2){let i=qt();Rt("icon",i.faCircleNotch)("transform",Eu(2,zG))}}function BG(n,r){n&1&&(rt(0,"div",4),en(1,"Deals + Events"),at())}var l1=class n{iconLibrary=Me(Wn);navigatorService=Me(Eo);homeStateService=Me(fi);place=cr.required();hasDealsOrEvents=tn(()=>this.place().banners.some(a1));hideDeals=tn(()=>this.homeStateService.hideDeals());imageSrc=tn(()=>this.place().images[0]||s1);isImageLoading=sn(!0);faCircleNotch=this.iconLibrary.getIconDefinition("fas","circle-notch");constructor(){Hn(()=>{this.imageSrc()&&this.startImageLoading()})}navigateToProfile(){let r=this.place().lazarilloId;this.homeStateService.lastCardSelected.next(r),this.navigatorService.navigateToProfile(r)}startImageLoading(){this.isImageLoading.set(!0)}endImageLoading(){this.isImageLoading.set(!1)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-location-card"]],inputs:{place:[1,"place"]},decls:12,vars:8,consts:[[1,"location-card",3,"click"],[1,"card-image"],[3,"load","error","src","alt"],[1,"loading-icon",3,"icon","transform"],[1,"card-deals-or-events"],[1,"card-content"],[1,"location-name"],[1,"location-address"],[1,"location-category"]],template:function(i,l){i&1&&(rt(0,"button",0),rn("click",function(){return l.navigateToProfile()}),rt(1,"div",1)(2,"img",2),rn("load",function(){return l.endImageLoading()})("error",function(){return l.endImageLoading()}),at(),Rn(3,jG,1,3,"fa-icon",3)(4,BG,2,0,"div",4),at(),rt(5,"div",5)(6,"h3",6),en(7),at(),rt(8,"p",7),en(9),at(),rt(10,"span",8),en(11),at()()()),i&2&&(st(),ii("loading",l.isImageLoading()),st(),Rt("src",l.imageSrc(),yf)("alt",l.place().title),st(),On(l.isImageLoading()?3:l.hasDealsOrEvents()&&!l.hideDeals()?4:-1),st(4),So(l.place().title),st(2),So(l.place().address),st(2),So(l.place().localizedCategory))},dependencies:[wr],styles:["*[_ngcontent-%COMP%]{margin:0;padding:0}.location-card[_ngcontent-%COMP%]{display:flex;padding:5px 5px 10px;flex-direction:column;align-items:flex-start;gap:12px;background:var(--definitions-colors-background-50);border:none;width:100%}.location-card[_ngcontent-%COMP%]:hover{cursor:pointer}.card-image[_ngcontent-%COMP%]{width:100%;overflow:hidden;position:relative;aspect-ratio:1/1}@container mapvx-container (width <= 640px){.card-image[_ngcontent-%COMP%]{min-width:160px;min-height:160px}}.card-image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;display:block;transition:transform .4s ease}.card-image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]:hover{transform:scale(1.2)}.card-image[_ngcontent-%COMP%] .card-deals-or-events[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;width:100%;background-color:var(--definitions-colors-secondary-orange);color:var(--definitions-colors-text-white);display:flex;padding:5px;justify-content:center;align-items:center;gap:8.462px;flex-shrink:0;font:var(--definitions-textFonts-desktop-body-4);font-family:inherit}.card-image.loading[_ngcontent-%COMP%]{background-color:var(--definitions-colors-primary-300);display:flex;justify-content:center;align-items:center}.card-image.loading[_ngcontent-%COMP%] .loading-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-primary-600);font-size:100px}.card-image.loading[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:none}.card-content[_ngcontent-%COMP%]{display:flex;width:100%;flex-direction:column;align-items:flex-start;gap:8px}@container mapvx-container (width <= 640px){.card-content[_ngcontent-%COMP%]{min-width:160px}}.location-name[_ngcontent-%COMP%]{color:var(--definitions-colors-text-black);font:var(--definitions-textFonts-desktop-body-3);font-family:inherit;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;text-align:start}.location-address[_ngcontent-%COMP%]{color:var(--definitions-colors-text-grey);font:var(--definitions-textFonts-desktop-body-5);font-family:inherit;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;text-align:start}.location-category[_ngcontent-%COMP%]{color:var(--definitions-colors-text-light-grey);font:var(--definitions-textFonts-desktop-body-5);font-family:inherit;display:none}"],changeDetection:0})};var VG=["cardContainer"],UG=["*"];function $G(n,r){if(n&1&&Tt(0,"app-location-card",3),n&2){let i=r.$implicit;Rt("place",i)}}function GG(n,r){n&1&&Su(0)}function HG(n,r){if(n&1){let i=Fr();rt(0,"button",7),rn("click",function(){pr(i);let d=qt(3);return mr(d.previousPage())}),Tt(1,"fa-icon",8),at()}if(n&2){let i=qt(3);st(),Rt("icon",i.faChevronLeft)}}function qG(n,r){if(n&1&&Rn(0,HG,2,1,"button",6),n&2){let i=qt().$implicit,l=qt();On(i<l.currentPageIndex()?0:-1)}}function WG(n,r){n&1&&(rt(0,"button",9),en(1,"..."),at())}function ZG(n,r){if(n&1){let i=Fr();rt(0,"button",11),rn("click",function(){pr(i);let d=qt(3);return mr(d.nextPage())}),Tt(1,"fa-icon",8),at()}if(n&2){let i=qt(3);st(),Rt("icon",i.faChevronRight)}}function YG(n,r){if(n&1&&(Rn(0,WG,2,0,"button",9),Rn(1,ZG,2,1,"button",10)),n&2){let i=qt().$implicit,l=qt();On(i<l.totalPages()?0:-1),st(),On(i>l.currentPageIndex()?1:-1)}}function KG(n,r){if(n&1){let i=Fr();Rn(0,qG,1,1),rt(1,"button",5),rn("click",function(){let d=pr(i).$implicit,a=qt();return mr(a.goToPage(d))}),en(2),at(),Rn(3,YG,2,2)}if(n&2){let i=r.$implicit,l=r.$index,d=r.$count,a=qt();On(l===0?0:-1),st(),ii("active",a.currentPageIndex()===i),st(),Ji(" ",i," "),st(),On(l===d-1?3:-1)}}var hm=class n{stateService=Me(fi);iconLibrary=Me(Wn);cardContainer=n_("cardContainer");faChevronLeft=this.iconLibrary.getIconDefinition("fas","chevron-left");faChevronRight=this.iconLibrary.getIconDefinition("fas","chevron-right");places=cr.required();itemsPerPage=tn(()=>this.calculateItemsPerPage(this.showMap(),this.cardContainer(),this.stateService.cardWidth(),this.stateService.rowsPerPage()));currentPageIndex=tn(()=>this.stateService.currentPageIndex());totalPages=tn(()=>Math.ceil(this.places().length/this.itemsPerPage()));cardContainerStyles=tn(()=>{let r=this.stateService.cardWidth();return r?{"--card-width":`${r}`}:{}});pages=tn(()=>{let r=this.totalPages();switch(r){case 0:return[];case 1:return[1];case 2:return[1,2];default:{let l=this.currentPageIndex()-1;return l<1&&(l=1),l+2>r&&(l=r-2),Array.from({length:3},(d,a)=>a+l)}}});currentPagePlaces=tn(()=>{let r=this.places(),i=this.itemsPerPage(),l=this.currentPageIndex();return r.slice((l-1)*i,l*i)});showMap=tn(()=>this.stateService.activeView()==="map");calculateItemsPerPage(r,i,l,d=2){if(r)return d*2;if(i){let a=globalThis.getComputedStyle(i.nativeElement),I=l??Number.parseInt(a.getPropertyValue("--card-width")||"0"),R=Number.parseInt(a.getPropertyValue("--card-gap")||"0"),L=I+R;if(L<=0)return d*5;let H=i.nativeElement.clientWidth,W=Math.floor((H+R)/L)*d;return Number.isFinite(W)&&W>0?W:d*5}return d*5}nextPage(){let r=this.currentPageIndex(),i=this.totalPages();r<i&&this.stateService.currentPageIndex.set(r+1)}previousPage(){let r=this.currentPageIndex();r>1&&this.stateService.currentPageIndex.set(r-1)}goToPage(r){this.stateService.currentPageIndex.set(r)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-paginator"]],viewQuery:function(i,l){i&1&&$g(l.cardContainer,VG,5),i&2&&Gg()},inputs:{places:[1,"places"]},ngContentSelectors:UG,decls:9,vars:6,consts:[["cardContainer",""],[1,"paginator"],[1,"paginator-places",3,"ngStyle"],[3,"place"],[1,"paginator-buttons"],[1,"paginator-button",3,"click"],[1,"previous-button"],[1,"previous-button",3,"click"],[3,"icon"],[1,"paginator-button","ellipsis"],[1,"next-button"],[1,"next-button",3,"click"]],template:function(i,l){i&1&&(Cu(),rt(0,"div",1)(1,"div",2,0),Ki(3,$G,1,1,"app-location-card",3,Qs,!1,GG,1,0),at(),rt(6,"div",4),Ki(7,KG,4,5,null,null,bf),at()()),i&2&&(ii("with-map",l.showMap()),st(),ii("with-map",l.showMap()),Rt("ngStyle",l.cardContainerStyles()),st(2),Xi(l.currentPagePlaces()),st(4),Xi(l.pages()))},dependencies:[Hd,Ux,l1,wr],styles:['.paginator[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:36px}.paginator.with-map[_ngcontent-%COMP%]{min-height:730px}@container mapvx-container (width <= 1024px){.paginator.with-map[_ngcontent-%COMP%]{min-height:unset}}.paginator-places[_ngcontent-%COMP%]{--card-width: 237;--card-gap: 13;display:grid;grid-template-columns:repeat(auto-fill,minmax(calc(var(--card-width) * 1px),1fr));align-items:flex-start;place-content:flex-start space-around;gap:24px 13px;align-self:stretch}@container mapvx-container (width <= 640px){.paginator-places[_ngcontent-%COMP%]{--card-width: 170}}.paginator-places.with-map[_ngcontent-%COMP%]{gap:16px 8px;flex-shrink:0}@container mapvx-container (width <= 640px){.paginator-places.with-map[_ngcontent-%COMP%]{display:flex;overflow-x:auto}}.paginator-buttons[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;gap:8px;flex-wrap:wrap}.paginator-button[_ngcontent-%COMP%]{color:var(--definitions-colors-text-900);text-align:center;font:var(--definitions-textFonts-desktop-button-1);font-family:inherit;font-feature-settings:"liga" off,"clig" off;letter-spacing:-1px;border:none;background:none}.paginator-button[_ngcontent-%COMP%]:hover{cursor:pointer}.paginator-button.active[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-orange)}.paginator-button.ellipsis[_ngcontent-%COMP%]:hover{cursor:default}.previous-button[_ngcontent-%COMP%], .next-button[_ngcontent-%COMP%]{color:var(--definitions-colors-text-900);background:none;border:none;font-size:21px}.previous-button[_ngcontent-%COMP%]:hover, .next-button[_ngcontent-%COMP%]:hover{cursor:pointer}'],changeDetection:0})};var c1=class n{onDestroy=new fr;iconLibrary=Me(Wn);mapService=Me(yi);logger=Me(qn);loadedDataService=Me(oi);faCenter=this.iconLibrary.getIconDefinition("fak","center");ngOnDestroy(){this.onDestroy.next(),this.onDestroy.complete()}onClick(){let r=this.mapService.rotation.getValue();this.loadedDataService.getConfiguration().pipe(Ls(1),rs(this.onDestroy)).subscribe({next:i=>{this.mapService.updateCamera({center:i.initialCenter,zoom:i.initialZoom,pitch:i.initialPitch??0,bearing:r})},error:i=>{this.logger.logWarning("Error centering map",i)}})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-center-map-button"]],decls:2,vars:1,consts:[[1,"button",3,"click"],[3,"icon"]],template:function(i,l){i&1&&(rt(0,"button",0),rn("click",function(){return l.onClick()}),Tt(1,"fa-icon",1),at()),i&2&&(st(),Rt("icon",l.faCenter))},dependencies:[wr],styles:[".button[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:40px;border:1px solid var(--definitions-colors-primary-900);background-color:var(--definitions-colors-background-white);box-shadow:var(--definitions-shadows-general)}.button[_ngcontent-%COMP%]:hover{cursor:pointer}.button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px;color:var(--definitions-colors-text-black)}"],changeDetection:0})};var XG=n=>({rotate:n}),u1=class n{mapService=Me(yi);iconLibrary=Me(Wn);rotation=uo(this.mapService.rotation.asObservable().pipe(Tn(r=>360-r)),{initialValue:0});faCompass=this.iconLibrary.getIconDefinition("fak","compass");static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-compass-button"]],decls:2,vars:4,consts:[[1,"button"],[3,"icon","transform"]],template:function(i,l){i&1&&(rt(0,"button",0),Tt(1,"fa-icon",1),at()),i&2&&(st(),Rt("icon",l.faCompass)("transform",Ex(2,XG,l.rotation())))},dependencies:[wr],styles:[".button[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:40px;border:1px solid var(--definitions-colors-primary-900);background-color:var(--definitions-colors-background-white);box-shadow:var(--definitions-shadows-general)}.button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px;color:var(--definitions-colors-text-black)}"],changeDetection:0})};var d1=class n{iconLibrary=Me(Wn);locationService=Me(Jd);logger=Me(qn);markerService=Me(qo);mapService=Me(yi);locationPermission=sn("prompt");active=tn(()=>this.locationService.currentlyWatchingLocation());mapReady=uo(this.mapService.mapReady.asObservable(),{initialValue:!1});positionSubscription;bearingSubscription;faLocation=this.iconLibrary.getIconDefinition("fas","location-arrow");constructor(){this.checkLocationPermission(),Hn(()=>{this.mapReady()?this.active()?(this.positionSubscription=this.locationService.currentLocation.asObservable().subscribe({next:r=>{this.logger.log("location",r),r!=null&&(this.markerService.hasCurrentLocationMarker?this.markerService.updateCurrentLocationMarker(r.position):this.markerService.addCurrentLocationMarker(r.position))},error:r=>{this.logger.logWarning("Error updating current location marker position",r)}}),this.bearingSubscription=Oa([this.locationService.currentBearing.asObservable(),this.mapService.rotation.asObservable()]).subscribe({next:([r,i])=>{this.logger.log("bearing",r),this.logger.log("maprotation",i);let d=(r??0)-i;if(this.logger.log("markerRotation",d),this.markerService.hasCurrentLocationMarker){let a=this.markerService.getCurrentLocationMarkerElement();a!=null&&(a.style.transform=`rotate(${d}deg)`)}},error:r=>{this.logger.logWarning("Error updating current location marker rotation",r)}})):(this.positionSubscription?.unsubscribe(),this.bearingSubscription?.unsubscribe(),this.markerService.removeCurrentLocationMarker(),this.positionSubscription=void 0,this.bearingSubscription=void 0):(this.positionSubscription?.unsubscribe(),this.bearingSubscription?.unsubscribe(),this.positionSubscription=void 0,this.bearingSubscription=void 0)})}ngOnDestroy(){this.locationService.temporalStopWatching(),this.positionSubscription?.unsubscribe(),this.bearingSubscription?.unsubscribe(),this.markerService.removeCurrentLocationMarker()}checkLocationPermission(){this.locationService.checkLocationPermission().then(r=>{this.locationPermission.set(r),r==="granted"&&this.active()&&this.locationService.startWatching()}).catch(r=>{this.logger.logWarning("Error checking location permission",r),this.locationPermission.set("denied")})}async onClick(){if(this.active())this.locationService.stopWatching();else switch(this.locationPermission()){case"granted":this.locationService.startWatching();break;case"prompt":await this.requestPermissions();break;case"denied":this.logger.logWarning("Location permission denied");break}}async requestPermissions(){await this.locationService.requestLocationPermission()==="granted"?(this.locationPermission.set("granted"),this.locationService.startWatching()):this.locationPermission.set("denied")}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-location-button"]],decls:2,vars:3,consts:[[1,"button",3,"click"],[3,"icon"]],template:function(i,l){i&1&&(rt(0,"button",0),rn("click",function(){return l.onClick()}),Tt(1,"fa-icon",1),at()),i&2&&(ii("active",l.active()),st(),Rt("icon",l.faLocation))},dependencies:[wr],styles:[".button[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:40px;border:1px solid var(--definitions-colors-primary-900);background-color:var(--definitions-colors-background-white);color:var(--definitions-colors-text-black);box-shadow:var(--definitions-shadows-general)}.button[_ngcontent-%COMP%]:hover{cursor:pointer}.button.active[_ngcontent-%COMP%]{background-color:var(--definitions-colors-secondary-blue);color:var(--definitions-colors-text-white);border-color:var(--definitions-colors-secondary-blue)}.button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:18px}"],changeDetection:0})};var h1=class n{mapService=Me(yi);iconLibrary=Me(Wn);faPlus=this.iconLibrary.getIconDefinition("fas","plus");faMinus=this.iconLibrary.getIconDefinition("fas","minus");onZoomIn(){this.mapService.updateZoomLevelOn(1)}onZoomOut(){this.mapService.updateZoomLevelOn(-1)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-zoom-buttons"]],decls:5,vars:2,consts:[[1,"zoom-buttons-container"],[1,"zoom-button","zoom-in",3,"click"],[3,"icon"],[1,"zoom-button","zoom-out",3,"click"]],template:function(i,l){i&1&&(rt(0,"div",0)(1,"button",1),rn("click",function(){return l.onZoomIn()}),Tt(2,"fa-icon",2),at(),rt(3,"button",3),rn("click",function(){return l.onZoomOut()}),Tt(4,"fa-icon",2),at()()),i&2&&(st(2),Rt("icon",l.faPlus),st(2),Rt("icon",l.faMinus))},dependencies:[wr],styles:[".zoom-buttons-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;border-radius:40px;border:1px solid var(--definitions-colors-primary-900);background-color:var(--definitions-colors-background-white);box-shadow:var(--definitions-shadows-general)}.zoom-button[_ngcontent-%COMP%]{width:40px;height:40px;border:none;background-color:transparent}.zoom-button[_ngcontent-%COMP%]:hover{cursor:pointer}.zoom-button.zoom-in[_ngcontent-%COMP%]{border-radius:40px 40px 0 0}.zoom-button.zoom-out[_ngcontent-%COMP%]{border-radius:0 0 40px 40px}.zoom-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px;color:var(--definitions-colors-text-black)}"],changeDetection:0})};var f1=class n{static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-buttons-container"]],decls:5,vars:0,consts:[[1,"buttons-container-wrapper"]],template:function(i,l){i&1&&(rt(0,"div",0),Tt(1,"app-location-button")(2,"app-compass-button")(3,"app-center-map-button")(4,"app-zoom-buttons"),at())},dependencies:[u1,c1,h1,d1],styles:[".buttons-container-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:20px}"],changeDetection:0})};function JG(n,r){if(n&1){let i=Fr();rt(0,"button",4),rn("click",function(){let d=pr(i).$implicit,a=qt(3);return mr(a.selectFloor(d))}),en(1),at()}if(n&2){let i=r.$implicit;st(),Ji(" ",i.name," ")}}function QG(n,r){if(n&1&&(rt(0,"div",2),Ki(1,JG,2,1,"button",3,Qs),at()),n&2){let i=qt(2);st(),Xi(i.floors())}}function eH(n,r){if(n&1){let i=Fr();rt(0,"button",0),rn("click",function(){pr(i);let d=qt();return mr(d.toggleFloorSelector())}),rt(1,"span"),en(2),at(),Tt(3,"fa-icon",1),at(),Rn(4,QG,3,0,"div",2)}if(n&2){let i=qt();st(2),So(i.selectedFloor().name),st(),Rt("icon",i.showFloorOptions()?i.caretUp:i.caretDown),st(),On(i.showFloorOptions()?4:-1)}}var p1=class n{loadedDataService=Me(oi);mapService=Me(yi);iconLibrary=Me(Wn);parentPlace=tn(()=>this.loadedDataService.parentPlace());floors=tn(()=>this.parentPlace()?.innerFloors??[]);currentFloorId=tn(()=>this.mapService.currentFloorId());selectedFloor=tn(()=>this.floors().find(r=>r.key===this.currentFloorId())??this.floors()[0]);showFloorOptions=sn(!1);caretDown=this.iconLibrary.getIconDefinition("fas","caret-down");caretUp=this.iconLibrary.getIconDefinition("fas","caret-up");toggleFloorSelector(){this.showFloorOptions.update(r=>!r)}selectFloor(r){this.showFloorOptions.set(!1),this.mapService.updateFloor(r.key)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-floor-selector"]],decls:1,vars:1,consts:[[1,"floor-selector-button",3,"click"],[3,"icon"],[1,"floor-options"],[1,"floor-option"],[1,"floor-option",3,"click"]],template:function(i,l){i&1&&Rn(0,eH,5,3),i&2&&On(l.floors().length>0?0:-1)},dependencies:[wr],styles:[".floor-selector-button[_ngcontent-%COMP%]{padding:10px;border:0;border-radius:16px;background-color:var(--definitions-colors-background-white);box-shadow:var(--definitions-shadows-general)}.floor-options[_ngcontent-%COMP%]{position:absolute;top:100%;left:0;right:0;background-color:var(--definitions-colors-background-white);border-radius:16px;box-shadow:var(--definitions-shadows-general);display:flex;flex-direction:column}.floor-option[_ngcontent-%COMP%]{padding:10px;border:0;background-color:transparent}.floor-option[_ngcontent-%COMP%]:not(:last-child){border-bottom:1px solid var(--definitions-colors-gray-200)}"]})};var tH=["map"],nH=["*"];function rH(n,r){n&1&&Tt(0,"app-floor-selector",3)}var Qd=class n{mapRef;logger=Me(qn);mapService=Me(yi);markerService=Me(qo);routingService=Me(Sc);loadedDataService=Me(oi);showFloorSelector=tn(()=>this.loadedDataService.parentPlace()!==void 0);ngAfterViewInit(){this.mapService.createMap(this.mapRef.nativeElement)}ngOnDestroy(){this.logger.log("Destroying map and preparing to reuse"),this.markerService.prepareToMapReuse(),this.routingService.removeRoute(),this.mapService.prepareToReuse()}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-map"]],viewQuery:function(i,l){if(i&1&&Bg(tH,5),i&2){let d;Vg(d=Ug())&&(l.mapRef=d.first)}},ngContentSelectors:nH,decls:6,vars:1,consts:[["map",""],[1,"map-wrapper"],["id","map"],[1,"floor-selector"],[1,"buttons-container"]],template:function(i,l){i&1&&(Cu(),rt(0,"div",1),Tt(1,"div",2,0),Rn(3,rH,1,0,"app-floor-selector",3),Tt(4,"app-buttons-container",4),Su(5),at()),i&2&&(st(3),On(l.showFloorSelector()?3:-1))},dependencies:[f1,p1],styles:[".map-wrapper[_ngcontent-%COMP%]{height:100%;width:100%;position:relative}#map[_ngcontent-%COMP%]{height:100%;min-width:10px;min-height:10px}.buttons-container[_ngcontent-%COMP%]{position:absolute;bottom:18px;right:17px}.floor-selector[_ngcontent-%COMP%]{position:absolute;top:18px;right:17px}"],changeDetection:0})};var iH=["*"];function oH(n,r){n&1&&(rt(0,"div",2),Tt(1,"app-map"),at())}var fm=class n{stateService=Me(fi);showMap=tn(()=>this.stateService.activeView()==="map");static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-view-container"]],ngContentSelectors:iH,decls:4,vars:3,consts:[[1,"view-container"],[1,"view-content"],[1,"map-container"]],template:function(i,l){i&1&&(Cu(),rt(0,"div",0)(1,"div",1),Su(2),at(),Rn(3,oH,2,0,"div",2),at()),i&2&&(st(),ii("with-map",l.showMap()),st(2),On(l.showMap()?3:-1))},dependencies:[Qd],styles:[".view-container[_ngcontent-%COMP%]{display:flex;align-items:stretch;gap:8px}@container mapvx-container (width <= 1024px){.view-container[_ngcontent-%COMP%]{flex-direction:column-reverse;align-items:flex-start}}@container mapvx-container (width <= 640px){.view-container[_ngcontent-%COMP%]{flex-direction:column-reverse;align-items:flex-start}}.view-content[_ngcontent-%COMP%]{width:100%}.view-content.with-map[_ngcontent-%COMP%]{width:50%;min-width:482px;flex-shrink:0}@container mapvx-container (width <= 1024px){.view-content.with-map[_ngcontent-%COMP%]{width:100%;min-width:unset}}.map-container[_ngcontent-%COMP%]{width:100%;min-height:730px}@container mapvx-container (width <= 1024px){.map-container[_ngcontent-%COMP%]{width:100%;height:730px}}@container mapvx-container (width <= 640px){.map-container[_ngcontent-%COMP%]{width:100%;height:400px;min-height:unset}}"],changeDetection:0})};var sH=["categoryFilters"],aH=(n,r)=>r.name;function lH(n,r){if(n&1){let i=Fr();rt(0,"button",11),rn("click",function(){let d=pr(i).$implicit,a=qt(2);return mr(a.updateSelectedFilter(d.name))}),en(1),at()}if(n&2){let i=r.$implicit,l=qt(2);ii("active",l.selectedFilter()===i.name),st(),Ji(" ",i.name," ")}}function cH(n,r){if(n&1&&(rt(0,"div",2)(1,"div",5,0)(3,"div",6),Ki(4,lH,2,3,"button",7,aH),at(),rt(6,"div",8),Tt(7,"div",9)(8,"div",10),at()()()),n&2){let i=qt();st(4),Xi(i.categoryFiltersData()),st(4),K0("left",i.indicatorPosition(),"px")}}var m1=class n{logger=Me(qn);stateService=Me(fi);loadedDataService=Me(oi);markerService=Me(qo);categoryFilters=n_("categoryFilters");activeView=tn(()=>this.stateService.activeView());loadedPlaces=uo(this.loadedDataService.getAvailablePlaces(),{initialValue:[]});categoryFiltersData=tn(()=>this.stateService.categoryFiltersData());places=Go(()=>this.loadedPlaces());selectedFilter=tn(()=>this.stateService.selectedFilter());selectedInstitution=tn(()=>this.stateService.selectedInstitution());showCategoryFilters=tn(()=>this.stateService.showCategoryFilters());showCityFilter=tn(()=>this.stateService.showCityFilter());indicatorPosition=sn(0);constructor(){Hn(()=>{let r=this.categoryFiltersData();if(this.logger.log("====> loadedCategoryFiltersData",r),r.length>0){let i=r.map(l=>l.name);this.readFilterFromUrl(i)}}),Hn(()=>{if(this.activeView()==="map"){let r=this.places();this.logger.log("====> addMarkers ",r),this.markerService.addMarkers(r)}}),Hn(()=>{let r=this.loadedPlaces(),i=this.showCategoryFilters(),l=r;if(this.showCityFilter()){let a=this.selectedInstitution();a!==""&&(l=l.filter(I=>I.parentInstitutionId===a))}if(i){let a=this.selectedFilter(),I=this.categoryFiltersData();if(a!=="All"){let R=I.find(L=>L.name===a)?.placeData||[];l=r.filter(L=>R.includes(L.lazarilloId))}}this.logger.log("====> filteredPlaces",l),this.places.set(l)}),Hn(()=>{let r=this.places();this.stateService.lastListedPlaces.set(r)}),Hn(()=>{let r=this.selectedFilter(),i=this.categoryFiltersData(),l=this.categoryFilters();this.showCategoryFilters()&&l?requestAnimationFrame(()=>{let a=this.getIndicatorPosition(r,i,l);this.indicatorPosition.set(a)}):this.indicatorPosition.set(0)})}readFilterFromUrl(r){let l=new URLSearchParams(location.search).get("tab");l&&r.includes(l)&&this.stateService.selectedFilter.set(l)}getIndicatorPosition(r,i,l){if(l==null)return 0;let d=l.nativeElement.querySelectorAll(".category-btn");if(d.length===0)return 0;let a=i.findIndex(Y=>Y.name===r);if(a===-1||a>=d.length)return 0;let I=d[a];if(!I)return 0;let R=l.nativeElement.getBoundingClientRect(),L=I.getBoundingClientRect(),H=L.width,K=L.left-R.left,W=80,Q=K+H/2-W/2;return Math.min(Math.max(0,Q),R.width-W)}updateSelectedFilter(r){this.stateService.selectedFilter.set(r),this.stateService.userAction.next({type:"select-filter",data:{filter:r}})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-list-view"]],viewQuery:function(i,l){i&1&&$g(l.categoryFilters,sH,5),i&2&&Gg()},decls:5,vars:2,consts:[["categoryFilters",""],[1,"list-view"],[1,"category-filters-overflow"],[1,"list-container"],[3,"places"],[1,"category-filters-container"],[1,"category-filters"],[1,"category-btn",3,"active"],[1,"active-indicator"],[1,"background-line"],[1,"active-line"],[1,"category-btn",3,"click"]],template:function(i,l){i&1&&(rt(0,"div",1),Rn(1,cH,9,2,"div",2),rt(2,"app-view-container")(3,"div",3),Tt(4,"app-paginator",4),at()()()),i&2&&(st(),On(l.showCategoryFilters()?1:-1),st(3),Rt("places",l.places()))},dependencies:[fm,hm],styles:[".list-view[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:36px}.category-filters-overflow[_ngcontent-%COMP%]{width:100%;overflow-x:auto}.category-filters-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:16px;width:100%;min-width:max-content}.category-filters[_ngcontent-%COMP%]{display:flex;gap:2.4375rem;align-items:center}.category-btn[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;font:var(--definitions-textFonts-desktop-button-5);font-family:inherit;font-weight:400;color:var(--definitions-colors-text-900);white-space:nowrap;padding:0;transition:color .2s ease}.category-btn.active[_ngcontent-%COMP%], .category-btn[_ngcontent-%COMP%]:hover{color:var(--definitions-colors-secondary-orange)}.active-indicator[_ngcontent-%COMP%]{position:relative;width:100%;height:3px;display:flex;align-items:center}.background-line[_ngcontent-%COMP%]{height:.5px;background:var(--definitions-colors-primary-black);border-radius:2px;width:100%}.active-line[_ngcontent-%COMP%]{position:absolute;top:0;height:100%;width:80px;background:var(--definitions-colors-secondary-orange);border-radius:2px;transition:left .3s ease}.list-container[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})};var uH=()=>({rotate:42}),g1=class n{iconLibrary=Me(Wn);faCircleNotch=this.iconLibrary.getIconDefinition("fas","circle-notch");static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-loading-location-card"]],decls:7,vars:3,consts:[[1,"loading-location-card"],[1,"loading-card-image"],[3,"icon","transform"],[1,"loading-card-content"],[1,"loading-location-name"],[1,"loading-location-address"],[1,"loading-location-category"]],template:function(i,l){i&1&&(rt(0,"div",0)(1,"div",1),Tt(2,"fa-icon",2),at(),rt(3,"div",3),Tt(4,"div",4)(5,"div",5)(6,"div",6),at()()),i&2&&(st(2),Rt("icon",l.faCircleNotch)("transform",Eu(2,uH)))},dependencies:[wr],styles:[".loading-location-card[_ngcontent-%COMP%]{display:flex;padding:5px 5px 10px;flex-direction:column;align-items:flex-start;gap:12px}.loading-card-image[_ngcontent-%COMP%]{display:flex;width:227px;height:227px;justify-content:center;align-items:center;background-color:var(--definitions-colors-primary-300)}@container mapvx-container (width <= 640px){.loading-card-image[_ngcontent-%COMP%]{width:160px;height:160px}}.loading-card-image[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-primary-600);font-size:95px}.loading-card-content[_ngcontent-%COMP%]{display:flex;width:227px;flex-direction:column;align-items:flex-start;gap:8px}@container mapvx-container (width <= 640px){.loading-card-content[_ngcontent-%COMP%]{width:160px}}.loading-location-name[_ngcontent-%COMP%]{display:flex;width:85%;height:24px;padding:7.253px 0;flex-direction:column;justify-content:center;align-items:center;border-radius:28.09px;background:var(--definitions-colors-primary-300)}.loading-location-address[_ngcontent-%COMP%]{display:flex;width:70%;height:11px;align-items:center;gap:18px;flex-shrink:0;align-self:stretch;border-radius:28.09px;background:var(--definitions-colors-primary-200)}.loading-location-category[_ngcontent-%COMP%]{display:flex;width:45%;height:11px;justify-content:space-between;align-items:center;border-radius:24px;background:var(--definitions-colors-primary-200)}"]})};var dH=()=>[1,2,3,4,5,6,7,8,9,10];function hH(n,r){n&1&&Tt(0,"app-loading-location-card")}var y1=class n{homeStateService=Me(fi);showMap=tn(()=>this.homeStateService.activeView()==="map");static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-loading-card-list"]],decls:3,vars:3,consts:[[1,"loading-container"]],template:function(i,l){i&1&&(rt(0,"div",0),Ki(1,hH,1,0,"app-loading-location-card",null,bf),at()),i&2&&(ii("with-map",l.showMap()),st(),Xi(Eu(2,dH)))},dependencies:[g1],styles:[".loading-container[_ngcontent-%COMP%]{display:flex;place-content:flex-start;align-items:flex-start;gap:24px 13px;align-self:stretch;flex-wrap:wrap}.loading-container.with-map[_ngcontent-%COMP%]{gap:16px 8px;height:730px}"]})};function fH(n,r){n&1&&(rt(0,"p"),en(1,"Looking for your results..."),at())}function pH(n,r){if(n&1&&(rt(0,"p"),en(1),at()),n&2){let i=qt(3);st(),Ji('Showing 1 result for "',i.searchTerm(),'"')}}function mH(n,r){if(n&1&&(rt(0,"p"),en(1),at()),n&2){let i=qt(3);st(),X0("Showing ",i.places().length,' results for "',i.searchTerm(),'"')}}function gH(n,r){if(n&1&&Rn(0,pH,2,1,"p")(1,mH,2,2,"p"),n&2){let i=qt(2);On(i.places().length===1?0:1)}}function yH(n,r){if(n&1&&(rt(0,"p"),en(1),at()),n&2){let i=qt(2);st(),Ji('No results found for "',i.searchTerm(),'"')}}function vH(n,r){if(n&1&&Rn(0,gH,2,1)(1,yH,2,1,"p"),n&2){let i=qt();On(i.places().length>0?0:1)}}function _H(n,r){n&1&&Tt(0,"app-loading-card-list")}function bH(n,r){if(n&1&&(rt(0,"div",6)(1,"app-paginator",7)(2,"div",8),Tt(3,"fa-icon",4),rt(4,"h2"),en(5,"No results found"),at(),rt(6,"div",9)(7,"p"),en(8,"Sorry, we can\u2019t find any places that match your search. Please try again."),at()()()()()),n&2){let i=qt();st(),Rt("places",i.places()),st(2),Rt("icon",i.faBuildingMagnifyingGlass)}}var v1=class n{logger=Me(qn);loadedDataService=Me(oi);sdkService=Me(ea);stateService=Me(fi);navigatorService=Me(Eo);markerService=Me(qo);iconLibrary=Me(Wn);searching=Go(()=>this.stateService.lastSearchData().term==="");inputValue$=vS(this.stateService.inputValue).pipe(qb(500),Tn(r=>r.trim()),Oi(r=>r!==""),Wb());searchTerm=uo(this.inputValue$,{initialValue:this.stateService.lastSearchData().term});places=uo(Oa([this.loadedDataService.getInstitutionId(),this.inputValue$,vS(this.stateService.lastSearchData)]).pipe(Wi(([r,i,l])=>l.term===i?(this.logger.log("====> lastSearchData",l),this.searching.set(!1),Cn(l.results)):(this.searching.set(!0),this.logger.log("====> searchTerm",i),this.logger.log("====> institutionId",r),ri(this.sdkService.searchPlaces(i,r)))),Zi(()=>this.searching.set(!1))),{initialValue:this.stateService.lastSearchData().results});faArrowLeft=this.iconLibrary.getIconDefinition("fas","arrow-left");faBuildingMagnifyingGlass=this.iconLibrary.getIconDefinition("fas","building-magnifying-glass");constructor(){Hn(()=>{let r=this.places();this.markerService.addMarkers(r)}),Hn(()=>{let r=this.places();this.stateService.lastListedPlaces.set(r)}),Hn(()=>{let r=this.searching();this.logger.log("====> searching",r)}),Hn(()=>{let r=this.searchTerm();r&&this.stateService.userAction.next({type:"search",data:{searchTerm:r}})})}ngOnDestroy(){this.stateService.inputValue()===""?(this.logger.log("====> EMPTY_SEARCH_DATA"),this.stateService.lastSearchData.set(n1)):(this.logger.log("====> SETTING LAST SEARCH DATA"),this.stateService.lastSearchData.set({term:this.stateService.inputValue(),results:this.places()}))}onBackClick(){this.stateService.inputValue.set(""),this.stateService.userAction.next({type:"return-to-home",data:{filter:this.stateService.selectedFilter()}}),this.navigatorService.navigateToHome()}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-search-view"]],decls:13,vars:3,consts:[[1,"search-view"],[1,"search-view-header"],[1,"back-button"],[1,"back-btn",3,"click"],[3,"icon"],[1,"search-view-info"],[1,"results-container"],[3,"places"],[1,"no-results"],[1,"no-results-description"]],template:function(i,l){i&1&&(rt(0,"div",0)(1,"div",1)(2,"div",2)(3,"button",3),rn("click",function(){return l.onBackClick()}),Tt(4,"fa-icon",4),rt(5,"span"),en(6,"Back"),at()()(),rt(7,"div",5),Rn(8,fH,2,0,"p")(9,vH,2,1),at()(),rt(10,"app-view-container"),Rn(11,_H,1,0,"app-loading-card-list")(12,bH,9,2,"div",6),at()()),i&2&&(st(4),Rt("icon",l.faArrowLeft),st(4),On(l.searching()?8:9),st(3),On(l.searching()?11:12))},dependencies:[fm,hm,D_,wr,y1],styles:['*[_ngcontent-%COMP%]{margin:0;padding:0}.search-view[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:36px}.search-view-header[_ngcontent-%COMP%]{display:flex;width:100%;flex-direction:column;justify-content:center;align-items:flex-start;gap:23px}.search-view-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--definitions-colors-text-800);font:var(--definitions-textFonts-desktop-sub-2);font-family:inherit;letter-spacing:-.9px}.results-container[_ngcontent-%COMP%]{width:100%}.back-button[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;gap:16px}.back-btn[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;gap:12px;color:var(--definitions-colors-secondary-blue);border:none;background:none}.back-btn[_ngcontent-%COMP%]:hover{cursor:pointer}.back-btn[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:24px}.back-btn[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-blue);font:var(--definitions-textFonts-desktop-button-1);font-family:inherit;font-feature-settings:"liga" off,"clig" off;letter-spacing:-1px}.no-results[_ngcontent-%COMP%]{display:flex;width:100%;height:100%;flex-direction:column;justify-content:center;align-items:center;gap:31px}.no-results[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:160px;color:var(--definitions-colors-text-light-grey)}.no-results[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{color:var(--definitions-colors-text-grey);font:var(--definitions-textFonts-desktop-h2);font-family:inherit}.no-results[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--definitions-colors-text-grey);font:var(--definitions-textFonts-desktop-sub-1);font-family:inherit;text-align:center}'],changeDetection:0})};function _1(n){switch(n){case"su":return"Sunday";case"mo":return"Monday";case"tu":return"Tuesday";case"we":return"Wednesday";case"th":return"Thursday";case"fr":return"Friday";case"sa":return"Saturday"}}function w1(n){switch(n.getDay()){case 0:return"su";case 1:return"mo";case 2:return"tu";case 3:return"we";case 4:return"th";case 5:return"fr";case 6:return"sa";default:return"mo"}}function wH(n){switch(n){case 0:return"su";case 1:return"mo";case 2:return"tu";case 3:return"we";case 4:return"th";case 5:return"fr";case 6:return"sa";default:return"mo"}}function b1(n){let[r,i]=n.split(":"),l=parseInt(r)%24,d=parseInt(i),a;return l<12?(a="AM",l===0&&(l=12)):(a="PM",l!==12&&(l-=12)),`${l}:${d<10?"0":""}${d} ${a}`}function zR(n){let r=b1(n.open),i=b1(n.close);return`${r} - ${i}`}function xH(n){let r=b1(n.open),i=b1(n.close);return`${r} to ${i}`}function CH(n){let r=new Date,i=new Date(r);jR(i);let l=w1(i),d=n[l];if(d&&d.length>0){for(let a of d)if(FR(a.open)&&FR(a.close)){let I=NR(a.open,i),R=NR(a.close,i);if(I>R&&SH(R),r>=I&&r<=R)return!0}}return!1}function jR(n){let r=n.getDate();n.setDate(r-1)}function SH(n){let r=n.getDate();n.setDate(r+1)}function EH(n){let i=w1(new Date),l=n[i];return l&&l.length>0}function FR(n){return/^([0-9]|0[0-9]|1[0-9]|2[0-4]):[0-5][0-9]$/.test(n)}function NR(n,r){let[i,l]=n.split(":").map(Number),d=r?new Date(r):new Date;return new Date(d.getFullYear(),d.getMonth(),d.getDate(),i,l,0,0)}function IH(n){return n.sort((r,i)=>r.open.localeCompare(i.open))}function DH(n){let i=w1(new Date),l=n[i];return l&&l.length>0?BR(l):""}function TH(n){let r=new Date;jR(r);let i=w1(r),l=n[i];return l&&l.length>0?BR(l):""}function MH(n){let r=PH(n);return`Open on ${_1(r)}`}function BR(n){return n.length===1?zR(n[0]):(IH(n),n.map(xH).join(" - "))}function PH(n){let i=new Date().getDay();for(let l=0;l<7;l++){let d=(i+l)%7,a=wH(d),I=n[a];if(I&&I.length>0)return a}return"mo"}function VR(n){return CH(n)?TH(n):EH(n)?DH(n):MH(n)}function UR(n){let r=["mo","tu","we","th","fr","sa","su"],i=R=>{let L=n[R];return!L||L.length===0?["Closed"]:L.map(H=>zR(H))},l=(R,L)=>R.length!==L.length?!1:R.every((H,K)=>H===L[K]),d=(R,L)=>R===L?_1(R):`${_1(R)} - ${_1(L)}`,a=[],I=0;for(;I<r.length;){let R=r[I],L=i(R),H=I+1;for(;H<r.length&&l(L,i(r[H]));)H++;let K=d(R,r[H-1]);a.push({day:K,schedule:L}),I=H}if(a.length>1){let R=a[0],L=a[a.length-1];if(l(R.schedule,L.schedule)){let H=R.day.split(" - "),W=L.day.split(" - ")[0],Q=H.length>1?H[1]:H[0],Y=`${W} - ${Q}`;a[0]={day:Y,schedule:R.schedule},a.pop()}}return a}function AH(n,r){if(n&1&&Tt(0,"div",9),n&2){let i=r.$implicit;Rt("innerHTML",i,Vd)}}function kH(n,r){if(n&1&&(rt(0,"div",6)(1,"div",7),en(2),at(),rt(3,"div",8),Ki(4,AH,1,1,"div",9,Qs),at()()),n&2){let i=r.$implicit;st(2),So(i.day),st(2),Xi(i.schedule)}}var x1=class n{iconLibrary=Me(Wn);schedules=cr.required({transform:r=>r?UR(r):[]});closeClicked=vs();faClockThree=this.iconLibrary.getIconDefinition("fas","clock-three");faXmark=this.iconLibrary.getIconDefinition("fas","xmark");hideModal(){this.closeClicked.emit()}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-other-schedules"]],inputs:{schedules:[1,"schedules"]},outputs:{closeClicked:"closeClicked"},decls:11,vars:2,consts:[[1,"other-schedules-container"],[1,"other-schedules-header"],[1,"other-schedules-title"],[3,"icon"],[1,"close-button",3,"click"],[1,"schedules"],[1,"schedule"],[1,"schedule-day"],[1,"schedule-time"],[1,"schedule-time-item",3,"innerHTML"]],template:function(i,l){i&1&&(rt(0,"div",0)(1,"div",1)(2,"div",2),Tt(3,"fa-icon",3),rt(4,"h2"),en(5,"Other Schedules"),at()(),rt(6,"button",4),rn("click",function(){return l.hideModal()}),Tt(7,"fa-icon",3),at()(),rt(8,"div",5),Ki(9,kH,6,1,"div",6,Qs),at()()),i&2&&(st(3),Rt("icon",l.faClockThree),st(4),Rt("icon",l.faXmark),st(2),Xi(l.schedules()))},dependencies:[wr],styles:[".other-schedules-container[_ngcontent-%COMP%]{padding:16px;background-color:var(--definitions-colors-background-50);box-shadow:var(--definitions-shadows-general)}.other-schedules-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.other-schedules-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.other-schedules-title[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;color:var(--definitions-colors-text-900);font:var(--definitions-textFonts-desktop-sub-2);font-family:inherit}@container mapvx-container (width <= 640px){.other-schedules-title[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:16px}}.other-schedules-title[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-primary-600);font-size:32px}@container mapvx-container (width <= 640px){.other-schedules-title[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px}}.close-button[_ngcontent-%COMP%]{padding:0;background:none;border:none;cursor:pointer}.close-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px}.schedules[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px;background-color:#fff}.schedule[_ngcontent-%COMP%]{display:flex;gap:40px;align-items:center;justify-content:space-between}.schedule-times[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.schedule-time[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:end}.schedule-time-item[_ngcontent-%COMP%]{color:var(--definitions-colors-text-800);font:var(--definitions-textFonts-desktop-sub-5);font-family:inherit}@container mapvx-container (width <= 640px){.schedule-time-item[_ngcontent-%COMP%]{font-size:12px;font-weight:400}}"]})};var RH=()=>({rotate:42});function OH(n,r){if(n&1&&Tt(0,"fa-icon",3),n&2){let i=qt();Rt("icon",i.faCircleNotch)("transform",Eu(2,RH))}}function LH(n,r){if(n&1){let i=Fr();rt(0,"div",10),Tt(1,"fa-icon",9),rt(2,"div",24)(3,"button",25),rn("click",function(){pr(i);let d=qt();return mr(d.showOtherSchedulesModal())}),at(),rt(4,"div",26),en(5,"*Hours may vary"),at()()()}if(n&2){let i=qt();st(),Rt("icon",i.faClockThree),st(2),Rt("innerHTML",i.schedule(),Vd)}}function FH(n,r){if(n&1){let i=Fr();rt(0,"div",11)(1,"app-other-schedules",27),rn("closeClicked",function(){pr(i);let d=qt();return mr(d.hideOtherSchedulesModal())}),at()()}if(n&2){let i=qt();st(),Rt("schedules",i.place().openingHours)}}function NH(n,r){if(n&1&&Tt(0,"div",31),n&2){let i=r.$implicit;Rt("innerHTML",i,Vd)}}function zH(n,r){if(n&1&&(rt(0,"div",12)(1,"div",28),Tt(2,"fa-icon",9),rt(3,"div",29),en(4,"Deals + Events"),at()(),rt(5,"div",30),Ki(6,NH,1,1,"div",31,Qs),at()()),n&2){let i=qt();st(2),Rt("icon",i.faBadgeDollar),st(4),Xi(i.banners())}}function jH(n,r){if(n&1&&(rt(0,"div",21),en(1),at()),n&2){let i=qt();st(),Ji(" ",i.address()," ")}}function BH(n,r){if(n&1&&(rt(0,"div",22),en(1),at()),n&2){let i=r.$implicit;st(),Ji(" ",i," ")}}function VH(n,r){if(n&1&&(rt(0,"div",23)(1,"a",18),en(2),at()()),n&2){let i=r.$implicit;st(),Rt("href",i.url,yf),st(),So(i.title)}}var C1=class n{iconLibrary=Me(Wn);sanitizer=Me(ty);logger=Me(qn);navigatorService=Me(Eo);stateService=Me(fi);place=cr.required();hideDeals=cr(!1);imageSrc=tn(()=>this.place().images[0]||s1);isImageLoading=sn(!0);schedule=tn(()=>{let r=this.place().openingHours;return r?VR(r):""});banners=tn(()=>this.place().banners.filter(a1).filter(r=>r.description!==void 0).map(r=>this.sanitizer.bypassSecurityTrustHtml(r.description||"")));address=tn(()=>this.place().address||"");phones=tn(()=>this.place().properties?.filter(r=>r.type==="phone").map(r=>this.formatPhoneNumber(r.subtitle))||[]);websites=tn(()=>this.place().properties?.filter(r=>r.type==="url").map(this.prepareUrl)||[]);drivingDirectionsUrl=tn(()=>{let r=this.place();return`https://www.google.com/maps/dir/?api=1&destination=${r.position.lat},${r.position.lng}&travelmode=driving`});otherSchedulesModal=sn(!1);faCircleNotch=this.iconLibrary.getIconDefinition("fas","circle-notch");faBadgeDollar=this.iconLibrary.getIconDefinition("fas","badge-dollar");faClockThree=this.iconLibrary.getIconDefinition("fas","clock-three");faArrowTopRight=this.iconLibrary.getIconDefinition("fak","arrow-top-right");iconCategory=tn(()=>{let[r,i]=e1(this.place().localizedCategory||"");return this.iconLibrary.getIconDefinition(r,i)});constructor(){Hn(()=>{this.imageSrc()&&this.startImageLoading()})}prepareUrl(r){return nr(Lt({},r),{url:r.url?.startsWith("http")?r.url:`https://${r.url}`})}startImageLoading(){this.isImageLoading.set(!0)}endImageLoading(){this.isImageLoading.set(!1)}showOtherSchedulesModal(){this.otherSchedulesModal.set(!0)}hideOtherSchedulesModal(){this.otherSchedulesModal.set(!1)}formatPhoneNumber(r){let i=r.replace(/^\+1/,"");return i=i.replaceAll(/\D/g,""),i.length<10?(this.logger.logWarning(`Phone number '${i}' is to short for format`),i):`${i.slice(0,3)}.${i.slice(3,6)}.${i.slice(6)}`}navigateToRoute(){this.stateService.userAction.next({type:"select-destination",data:{destinationId:this.place().lazarilloId,alias:this.place().clientId}}),this.navigatorService.navigateToRoute(this.place().lazarilloId)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-profile-view"]],inputs:{place:[1,"place"],hideDeals:[1,"hideDeals"]},decls:34,vars:15,consts:[[1,"profile-view-content"],[1,"image"],[3,"load","error","src","alt"],[1,"loading-icon",3,"icon","transform"],[1,"info"],[1,"basic-info"],[1,"title"],[1,"category-schedule"],[1,"category"],[3,"icon"],[1,"schedule"],[1,"other-schedules-modal"],[1,"deals-or-events"],[1,"description"],[1,"direction-buttons"],[1,"route-button-container"],[1,"route-button",3,"click"],[1,"driving-link"],["target","_blank",3,"href"],[1,"properties"],[1,"separator"],[1,"address"],[1,"phone"],[1,"website"],[1,"schedule-time"],[1,"schedule-button",3,"click","innerHTML"],[1,"schedule-warning"],[3,"closeClicked","schedules"],[1,"deals-or-events-header"],[1,"deals-or-events-content-title"],[1,"deals-or-events-content"],[1,"banner-content",3,"innerHTML"]],template:function(i,l){i&1&&(rt(0,"div",0)(1,"div",1)(2,"img",2),rn("load",function(){return l.endImageLoading()})("error",function(){return l.endImageLoading()}),at(),Rn(3,OH,1,3,"fa-icon",3),at(),rt(4,"div",4)(5,"div",5)(6,"h1",6),en(7),at(),rt(8,"div",7)(9,"div",8),Tt(10,"fa-icon",9),rt(11,"span"),en(12),at()(),Rn(13,LH,6,2,"div",10),Rn(14,FH,2,1,"div",11),at(),Rn(15,zH,8,1,"div",12),rt(16,"div",13),en(17),at()(),rt(18,"div",14)(19,"div",15)(20,"button",16),rn("click",function(){return l.navigateToRoute()}),Tt(21,"fa-icon",9),rt(22,"span"),en(23,"Pedestrian-friendly directions"),at()()(),rt(24,"div",17)(25,"a",18),en(26,"Driving directions"),at()()(),rt(27,"div",19),Tt(28,"div",20),Rn(29,jH,2,1,"div",21),Ki(30,BH,2,1,"div",22,Qs),Ki(32,VH,3,2,"div",23,Qs),at()()()),i&2&&(st(),ii("loading",l.isImageLoading()),st(),Rt("src",l.imageSrc(),yf)("alt",l.place().title),st(),On(l.isImageLoading()?3:-1),st(4),So(l.place().title),st(3),Rt("icon",l.iconCategory()),st(2),So(l.place().localizedCategory),st(),On(l.schedule()!==""?13:-1),st(),On(l.otherSchedulesModal()?14:-1),st(),On(l.banners().length>0&&!l.hideDeals()?15:-1),st(2),Ji(" ",l.place().description," "),st(4),Rt("icon",l.faArrowTopRight),st(4),Rt("href",l.drivingDirectionsUrl(),yf),st(4),On(l.address()!==""?29:-1),st(),Xi(l.phones()),st(2),Xi(l.websites()))},dependencies:[wr,x1],styles:['.profile-view-content[_ngcontent-%COMP%]{display:flex;padding:0 16px;flex-direction:column;align-items:center;gap:16px}@container mapvx-container (width <= 1024px){.profile-view-content[_ngcontent-%COMP%]{padding:22px 0 0}}@container mapvx-container (width <= 640px){.profile-view-content[_ngcontent-%COMP%]{padding:22px 0 0}}.image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:block;width:100%;object-fit:cover;aspect-ratio:1/1}.image.loading[_ngcontent-%COMP%]{background-color:var(--definitions-colors-primary-300);height:200px;width:100%;display:flex;justify-content:center;align-items:center}.image.loading[_ngcontent-%COMP%] .loading-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-primary-600);font-size:100px}.image.loading[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:none}.info[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:24px;width:100%}.basic-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:16px;width:100%}.title[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-h6);font-family:inherit;margin:0;color:var(--definitions-colors-text-black)}.category-schedule[_ngcontent-%COMP%]{display:flex;width:100%;justify-content:space-between;flex-wrap:wrap;position:relative}.category[_ngcontent-%COMP%]{display:flex;gap:18px;color:var(--definitions-colors-text-grey);align-items:center}.category[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px}.category[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-body-3);font-family:inherit;font-size:16px}.schedule[_ngcontent-%COMP%]{display:flex;gap:18px;align-items:center}.schedule[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-primary-600);font-size:20px}.schedule[_ngcontent-%COMP%] .schedule-time[_ngcontent-%COMP%]{position:relative}.schedule[_ngcontent-%COMP%] .schedule-time[_ngcontent-%COMP%] .schedule-button[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-3);font-family:inherit;font-size:16px;color:var(--definitions-colors-secondary-blue);border:none;background:none;cursor:pointer}.schedule[_ngcontent-%COMP%] .schedule-time[_ngcontent-%COMP%] .schedule-warning[_ngcontent-%COMP%]{position:absolute;top:20px;left:0;font:var(--definitions-textFonts-desktop-sub-5);font-family:inherit;font-size:16px;color:var(--definitions-colors-text-black)}.other-schedules-modal[_ngcontent-%COMP%]{position:absolute;width:max-content;bottom:0;right:50%;transform:translate(50%) translateY(100%)}.deals-or-events[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:8px;width:100%}.deals-or-events-header[_ngcontent-%COMP%]{display:flex;width:100%;align-items:flex-start;gap:18px;color:var(--definitions-colors-secondary-orange)}.deals-or-events-header[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px}.deals-or-events-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:8px}.deals-or-events-content-title[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-sub-4);font-family:inherit;font-size:16px}.banner-content[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-orange);padding:5px;font:var(--definitions-textFonts-desktop-body-3);font-family:inherit;font-size:16px;white-space:pre-wrap;border:1px solid var(--definitions-colors-secondary-orange);border-radius:8px;box-shadow:var(--definitions-shadows-general)}.description[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-body-2);font-family:inherit;color:var(--definitions-colors-text-black)}.direction-buttons[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:16px;align-self:stretch;width:100%}.route-button-container[_ngcontent-%COMP%]{width:100%}.route-button[_ngcontent-%COMP%]{display:flex;padding:8px 16px;justify-content:center;align-items:center;gap:10px;align-self:stretch;background:var(--definitions-colors-primary-black);color:var(--definitions-colors-text-white);border:none;cursor:pointer;width:100%}.route-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-2);font-family:inherit;font-size:16px;font-feature-settings:"liga" off,"clig" off}.driving-link[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-blue);text-decoration:none;font:var(--definitions-textFonts-desktop-button-2);font-family:inherit;font-size:16px;font-feature-settings:"liga" off,"clig" off}.properties[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:16px;width:100%}.separator[_ngcontent-%COMP%]{width:100%;height:1px;background:var(--definitions-colors-primary-100)}.address[_ngcontent-%COMP%], .phone[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-sub-1);font-family:inherit;font-size:16px;color:var(--definitions-colors-text-black)}.website[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-1);font-family:inherit;font-size:16px;font-feature-settings:"liga" off,"clig" off}.website[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-blue);text-decoration:none}']})};var UH=["backButton",""],pm=class n{iconLibraryService=Me(Wn);faArrowLeft=this.iconLibraryService.getIconDefinition("fas","arrow-left");static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["button","backButton",""]],attrs:UH,decls:3,vars:1,consts:[[3,"icon"]],template:function(i,l){i&1&&(Tt(0,"fa-icon",0),rt(1,"span"),en(2,"Back"),at()),i&2&&Rt("icon",l.faArrowLeft)},dependencies:[wr],styles:['[_nghost-%COMP%]{display:flex;justify-content:center;align-items:center;gap:12px;color:var(--definitions-colors-secondary-blue);border:none;background:none}[_nghost-%COMP%]:hover{cursor:pointer}[_nghost-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:24px}[_nghost-%COMP%] span[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-blue);font:var(--definitions-textFonts-desktop-button-1);font-family:inherit;font-feature-settings:"liga" off,"clig" off;letter-spacing:-1px}']})};function $H(n,r){if(n&1&&Tt(0,"app-profile-view",5),n&2){let i=qt(),l=qg(6);Rt("place",l)("hideDeals",i.hideDeals())}}var S1=class n{onDestroy=new fr;route=Me(Ba);logger=Me(qn);loadedDataService=Me(oi);sdkService=Me(ea);mapService=Me(yi);markerService=Me(qo);navigatorService=Me(Eo);homeStateService=Me(fi);iconLibraryService=Me(Wn);_profileId="";place=sn(null);mapReady=uo(this.mapService.mapReady,{requireSync:!0});hideDeals=tn(()=>this.homeStateService.hideDeals());faArrowLeft=this.iconLibraryService.getIconDefinition("fas","arrow-left");constructor(){Hn(()=>{let r=this.place();if(r&&this.mapReady()){let l=r.inFloors?.[0];if(l&&this.mapService.updateFloor(l),!this.markerService.hasMarker(r.lazarilloId)){let d=$o(this.homeStateService.lastListedPlaces);d.length>0?this.markerService.addMarkers(d):this.markerService.addMarker(r)}this.markerService.selectMarker(r.lazarilloId),setTimeout(()=>{this.mapService.updateCamera({center:r.position})},100)}})}ngOnInit(){this.addBackListener();let r=this.route.paramMap.pipe(Tn(i=>i.get("id")),Oi(i=>i!==null),Oi(i=>i!==this._profileId),Xb(1));Oa([r,this.loadedDataService.getAvailablePlaces()]).pipe(rs(this.onDestroy),Wi(([i,l])=>{let d=l.find(a=>a.lazarilloId===i||a.clientId===i);return d?Cn(d):ri(this.sdkService.getPlaceDetail(i))})).subscribe({next:i=>{this._profileId!==i.lazarilloId&&this.cleanOldProfile(),this._profileId=i.lazarilloId,this.place.set(i),this.homeStateService.userAction.next({type:"show-place",data:{placeId:i.lazarilloId,alias:i.clientId}})},error:i=>{this.logger.log("Error getting profile id",i)},complete:()=>{this.logger.log("Profile id complete")}})}ngOnDestroy(){this.removeBackListener(),this.cleanOldProfile(),this.onDestroy.next(),this.onDestroy.complete()}cleanOldProfile(){this._profileId!==""&&this.markerService.deselectMarker(this._profileId)}returnToHome(){this.homeStateService.userAction.next({type:"return-to-home",data:{filter:this.homeStateService.selectedFilter()}}),this.navigatorService.navigateToHome()}backListener(r){this.logger.log("Back listener",r),this.returnToHome()}listener=r=>this.backListener(r);addBackListener(){globalThis.addEventListener("popstate",this.listener)}removeBackListener(){globalThis.removeEventListener("popstate",this.listener)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-profile-screen"]],decls:10,vars:2,consts:[[1,"screen"],[1,"back-button"],["backButton","",3,"click"],[1,"profile-screen-content"],[1,"profile-info"],[3,"place","hideDeals"],[1,"map"]],template:function(i,l){if(i&1){let d=Fr();rt(0,"div",0)(1,"div",1)(2,"button",2),rn("click",function(){return pr(d),mr(l.returnToHome())}),en(3,"Back"),at()(),rt(4,"div",3)(5,"div",4),Zp(6),Rn(7,$H,1,2,"app-profile-view",5),at(),rt(8,"div",6),Tt(9,"app-map"),at()()()}if(i&2){st(6);let d=Hg(l.place());st(),On(d!==null?7:-1)}},dependencies:[Qd,pm,C1],styles:[".screen[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:18px}.profile-screen-content[_ngcontent-%COMP%]{display:flex;width:100%}@container mapvx-container (width <= 1024px){.profile-screen-content[_ngcontent-%COMP%]{flex-direction:column-reverse}}@container mapvx-container (width <= 640px){.profile-screen-content[_ngcontent-%COMP%]{flex-direction:column-reverse}}.profile-info[_ngcontent-%COMP%]{display:flex;width:432px;flex-shrink:0}.profile-info[_ngcontent-%COMP%] app-profile-view[_ngcontent-%COMP%]{width:100%}@container mapvx-container (width <= 1024px){.profile-info[_ngcontent-%COMP%]{width:100%}}.map[_ngcontent-%COMP%]{width:100%;min-height:730px}@container mapvx-container (width <= 1024px){.map[_ngcontent-%COMP%]{height:730px}}@container mapvx-container (width <= 640px){.map[_ngcontent-%COMP%]{width:100%;min-height:unset;height:400px}}"],changeDetection:0})};function GH(n,r){if(n&1){let i=Fr();rt(0,"button",1),rn("click",function(){pr(i);let d=qt();return mr(d.pauseRoute())}),Tt(1,"fa-icon",2),rt(2,"span"),en(3,"Pause route"),at()()}if(n&2){let i=qt();st(),Rt("icon",i.faPause)}}function HH(n,r){if(n&1){let i=Fr();rt(0,"button",1),rn("click",function(){pr(i);let d=qt();return mr(d.resumeRoute())}),Tt(1,"fa-icon",2),rt(2,"span"),en(3,"Resume route"),at()()}if(n&2){let i=qt();st(),Rt("icon",i.faPlay)}}function qH(n,r){if(n&1){let i=Fr();rt(0,"button",1),rn("click",function(){pr(i);let d=qt();return mr(d.restartRoute())}),Tt(1,"fa-icon",2),rt(2,"span"),en(3,"Restart route"),at()()}if(n&2){let i=qt();st(),Rt("icon",i.faRestart)}}function WH(n,r){}var E1=class n{iconLibrary=Me(Wn);routingService=Me(Sc);restartRouteCallback=vs();AnimationState=t1;animationStatus=uo(this.routingService.animationStatusSubject,{initialValue:0});faPlay=this.iconLibrary.getIconDefinition("fas","play");faPause=this.iconLibrary.getIconDefinition("fas","pause");faRestart=this.iconLibrary.getIconDefinition("fas","rotate-right");pauseRoute(){this.routingService.pauseRouteAnimation()}resumeRoute(){this.routingService.resumeRouteAnimation()}restartRoute(){this.routingService.restartRouteAnimation(),this.restartRouteCallback.emit()}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-route-control-button"]],outputs:{restartRouteCallback:"restartRouteCallback"},decls:4,vars:1,consts:[[1,"route-control-button"],[1,"route-control-button",3,"click"],[3,"icon"]],template:function(i,l){if(i&1&&Rn(0,GH,4,1,"button",0)(1,HH,4,1,"button",0)(2,qH,4,1,"button",0)(3,WH,0,0),i&2){let d;On((d=l.animationStatus())===l.AnimationState.Playing?0:d===l.AnimationState.Paused?1:d===l.AnimationState.Finished?2:3)}},dependencies:[wr],styles:["[_nghost-%COMP%]{position:absolute;top:20px;left:500px}@container mapvx-container (width <= 1024px){[_nghost-%COMP%]{top:90px;left:unset;right:20px}}.route-control-button[_ngcontent-%COMP%]{display:flex;width:180px;height:45px;justify-content:center;align-items:center;gap:10px;background:var(--definitions-colors-background-white);color:var(--definitions-colors-text-black);box-shadow:var(--definitions-shadows-general);border:none;cursor:pointer}@container mapvx-container (width <= 1024px){.route-control-button[_ngcontent-%COMP%]{width:45px}}.route-control-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:16px}.route-control-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-5);font-family:inherit}@container mapvx-container (width <= 1024px){.route-control-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:none}}"]})};var I1=class n{iconLibrary=Me(Wn);currentRoute=cr.required();startRouteClick=vs();faCircleSmall=this.iconLibrary.getIconDefinition("fas","circle-small");faArrowTopRight=this.iconLibrary.getIconDefinition("fak","arrow-top-right");time=tn(()=>{let r=this.currentRoute();return this.toMinutes(r.duration)});distance=tn(()=>{let r=this.currentRoute();return Math.ceil(r.length*3.28084)});toMinutes(r){return Math.ceil(r/60)}onStartRouteClick(){this.startRouteClick.emit()}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-route-info"]],inputs:{currentRoute:[1,"currentRoute"]},outputs:{startRouteClick:"startRouteClick"},decls:17,vars:5,consts:[[1,"route-info"],[1,"route-info-item"],[1,"route-info-item-label"],[3,"icon"],[1,"route-info-item-value"],[1,"start-route-button",3,"click"]],template:function(i,l){i&1&&(rt(0,"div",0)(1,"div",1)(2,"span",2),en(3,"Time"),at(),Tt(4,"fa-icon",3),rt(5,"span",4),en(6),at()(),rt(7,"div",1)(8,"span",2),en(9,"Distance"),at(),Tt(10,"fa-icon",3),rt(11,"span",4),en(12),at()()(),rt(13,"button",5),rn("click",function(){return l.onStartRouteClick()}),Tt(14,"fa-icon",3),rt(15,"span"),en(16,"Start Route"),at()()),i&2&&(st(4),Rt("icon",l.faCircleSmall),st(2),Ji("",l.time()," min"),st(4),Rt("icon",l.faCircleSmall),st(2),Ji("",l.distance()," ft"),st(2),Rt("icon",l.faArrowTopRight))},dependencies:[wr],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:40px}.route-info[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap}.route-info-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;color:var(--definitions-colors-text-black)}.start-route-button[_ngcontent-%COMP%]{display:flex;padding:8px 16px;justify-content:center;align-items:center;gap:10px;background-color:var(--definitions-colors-primary-900);color:var(--definitions-colors-text-50);border:none;cursor:pointer;width:100%}.start-route-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-2);font-family:inherit;font-feature-settings:"liga" off,"clig" off;line-height:15px}.start-route-button[_ngcontent-%COMP%]{display:none}']})};var ZH={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},pye=nr(Lt({},ZH),{"[class.ng-submitted]":"isSubmitted"});var YH=new yn("",{providedIn:"root",factory:()=>$R}),$R="always";var KH=(()=>{class n{static \u0275fac=function(l){return new(l||n)};static \u0275mod=yc({type:n});static \u0275inj=vl({})}return n})();var GR=(()=>{class n{static withConfig(i){return{ngModule:n,providers:[{provide:YH,useValue:i.callSetDisabledState??$R}]}}static \u0275fac=function(l){return new(l||n)};static \u0275mod=yc({type:n});static \u0275inj=vl({imports:[KH]})}return n})();function XH(n,r){if(n&1){let i=Fr();rt(0,"button",5),rn("click",function(){pr(i);let d=qt();return mr(d.clearSelectedPlace())}),Tt(1,"fa-icon",6),at()}if(n&2){let i=qt();st(),Rt("icon",i.faXmark)}}function JH(n,r){if(n&1){let i=Fr();rt(0,"button",10),rn("click",function(){pr(i);let d=qt(2);return mr(d.useCurrentLocation())}),rt(1,"div",11),Tt(2,"fa-icon",6),at(),rt(3,"div",12)(4,"div",13),en(5,"Use current location"),at()()()}if(n&2){let i=qt(2);st(2),Rt("icon",i.faLocationArrow)}}function QH(n,r){if(n&1){let i=Fr();rt(0,"button",10),rn("click",function(){let d=pr(i).$implicit,a=qt(2);return mr(a.selectPlace(d))}),rt(1,"div",11),Tt(2,"fa-icon",6),at(),rt(3,"div",12)(4,"div",13),en(5),at(),rt(6,"div",14),en(7),at()()()}if(n&2){let i=r.$implicit,l=qt(2);st(2),Rt("icon",l.faLocationDot),st(3),So(i.title),st(2),So(i.address)}}function eq(n,r){n&1&&(rt(0,"div",9),en(1,"No results found"),at())}function tq(n,r){if(n&1&&(rt(0,"div",4)(1,"div",7),Rn(2,JH,6,1,"button",8),Ki(3,QH,8,3,"button",8,Qs),Rn(5,eq,2,0,"div",9),at()()),n&2){let i=qt();st(2),On(i.allowCurrentLocation()&&i.locationPermission()!=="denied"?2:-1),st(),Xi(i.filteredPlaces()),st(2),On(i.filteredPlaces().length===0&&i.filterText().trim()?5:-1)}}var D1=class n{logger=Me(qn);locationService=Me(Jd);iconLibrary=Me(Wn);places=cr.required();initialSelectedPlace=cr(null);allowCurrentLocation=cr(!1);placeholder=cr("Set a starting point");selectedPlace=Go(()=>this.initialSelectedPlace());selectedPlaceChange=vs();isDropdownOpen=sn(!1);filterText=Go(()=>this.selectedPlace()?.title||"");filteredPlaces=tn(()=>{let r=this.places(),i=this.filterText().toLowerCase().trim();return i?r.filter(l=>l.title?.toLowerCase().includes(i)||l.address?.toLowerCase().includes(i)):r});locationPermission=sn("prompt");faLocationDot=this.iconLibrary.getIconDefinition("fas","location-dot");faLocationArrow=this.iconLibrary.getIconDefinition("fas","location-arrow");faXmark=this.iconLibrary.getIconDefinition("fas","xmark");constructor(){this.checkLocationPermission()}checkLocationPermission(){this.locationService.checkLocationPermission().then(r=>{this.locationPermission.set(r)}).catch(r=>{this.logger.logWarning("Error checking location permission",r),this.locationPermission.set("denied")})}requestLocationPermission(){this.locationService.requestLocationPermission().then(r=>{this.locationPermission.set(r),r==="granted"&&this.getCurrentLocation()}).catch(r=>{this.logger.logWarning("Error requesting location permission",r),this.locationPermission.set("denied")})}getCurrentLocation(){this.locationService.getCurrentLocation().then(r=>{this.selectedPlace.set(r),this.selectedPlaceChange.emit(r)}).catch(r=>{this.logger.logWarning("Error getting current location",r)})}useCurrentLocation(){switch(this.locationPermission()){case"granted":this.getCurrentLocation();break;case"prompt":this.requestLocationPermission();break}}selectPlace(r){this.selectedPlace.set(r),this.isDropdownOpen.set(!1),this.selectedPlaceChange.emit(r)}clearSelectedPlace(){this.selectedPlace.set(null),this.filterText.set(""),this.selectedPlaceChange.emit(null)}onInputFocus(){this.isDropdownOpen.set(!0)}onInputBlur(){setTimeout(()=>{this.isDropdownOpen.set(!1)},150)}onInputChange(r){let i=r.target;this.filterText.set(i.value),this.isDropdownOpen.set(!0)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-place-selector"]],inputs:{places:[1,"places"],initialSelectedPlace:[1,"initialSelectedPlace"],allowCurrentLocation:[1,"allowCurrentLocation"],placeholder:[1,"placeholder"]},outputs:{selectedPlaceChange:"selectedPlaceChange"},decls:5,vars:4,consts:[[1,"place-selector"],[1,"input-container"],["type","text","name","place-input",1,"place-input",3,"input","focus","blur","value","placeholder"],[1,"clear-button"],[1,"dropdown-container"],[1,"clear-button",3,"click"],[3,"icon"],[1,"dropdown-list"],["type","button",1,"place-option"],[1,"no-results"],["type","button",1,"place-option",3,"click"],[1,"place-icon"],[1,"place-info"],[1,"place-title"],[1,"place-address"]],template:function(i,l){i&1&&(rt(0,"div",0)(1,"div",1)(2,"input",2),rn("input",function(a){return l.onInputChange(a)})("focus",function(){return l.onInputFocus()})("blur",function(){return l.onInputBlur()}),at(),Rn(3,XH,2,1,"button",3),at(),Rn(4,tq,6,2,"div",4),at()),i&2&&(st(2),Rt("value",l.filterText())("placeholder",l.placeholder()),st(),On(l.selectedPlace()?3:-1),st(),On(l.isDropdownOpen()?4:-1))},dependencies:[Hd,GR,wr],styles:['[_nghost-%COMP%]{width:100%}.place-selector[_ngcontent-%COMP%]{position:relative;width:100%}.input-container[_ngcontent-%COMP%]{width:100%;display:flex}.place-input[_ngcontent-%COMP%]{width:100%;border:none;font:var(--definitions-textFonts-desktop-button-1);font-family:inherit;font-feature-settings:"liga" off,"clig" off;letter-spacing:-1px;text-overflow:ellipsis;outline:none;color:var(--definitions-colors-text-black)}.place-input[_ngcontent-%COMP%]::placeholder{color:var(--definitions-colors-primary-300)}.clear-button[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:16px;color:var(--definitions-colors-text-900)}.dropdown-container[_ngcontent-%COMP%]{position:absolute;top:100%;left:0;right:0;z-index:10;margin-top:4px}.dropdown-list[_ngcontent-%COMP%]{background:var(--definitions-colors-background-50);border-radius:8px;box-shadow:var(--definitions-shadows-general);max-height:300px;overflow-y:auto;border:1px solid var(--definitions-colors-gray-200)}.place-option[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:4px;padding:15px 24px;cursor:pointer;transition:background-color .2s ease;border-bottom:1px solid #f5f5f5;background:none;border:none;width:100%;text-align:left}.place-option[_ngcontent-%COMP%]:last-child{border-bottom:none}.place-option[_ngcontent-%COMP%]:hover{background-color:#f8f9fa}.place-option[_ngcontent-%COMP%]:active{background-color:#e9ecef}.place-option[_ngcontent-%COMP%]:focus{outline:2px solid #5D5D5D;outline-offset:-2px}.place-icon[_ngcontent-%COMP%]{flex-shrink:0;width:19.341px;height:19.341px;margin-top:2px;color:var(--definitions-colors-primary-600)}.place-info[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:4px;min-width:0}.place-title[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-3);font-family:inherit;color:var(--definitions-colors-text-900);word-wrap:break-word}.place-address[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-body-3);font-family:inherit;color:var(--definitions-colors-text-800);word-wrap:break-word}.no-results[_ngcontent-%COMP%]{padding:20px 24px;text-align:center;font:var(--definitions-textFonts-desktop-body-3);font-family:inherit;color:var(--definitions-colors-text-800)}@media (width <= 768px){.place-option[_ngcontent-%COMP%]{padding:12px 20px}.place-title[_ngcontent-%COMP%]{font-size:15px}.place-address[_ngcontent-%COMP%]{font-size:13px}}']})};var T1=class n{logger=Me(qn);iconLibrary=Me(Wn);places=cr.required();initialDestination=cr(null);originPlace=sn(null);destinationPlace=Go(()=>this.initialDestination());originSelected=vs();destinationSelected=vs();swapPlaces=vs();clearDestination=vs();locationPermission=sn("prompt");faLocationDot=this.iconLibrary.getIconDefinition("fas","location-dot");faEllipsisVertical=this.iconLibrary.getIconDefinition("fas","ellipsis-vertical");faArrowsRetweet=this.iconLibrary.getIconDefinition("fas","arrows-retweet");canSwapPlaces=tn(()=>tC(this.originPlace())&&tC(this.destinationPlace()));onOriginSelected(r){this.originSelected.emit(r),this.originPlace.set(r)}onDestinationSelected(r){if(eC(r)){this.logger.logWarning("Current location is not allowed as destination");return}this.destinationSelected.emit(r),this.destinationPlace.set(r)}onSwapPlaces(){let r=this.originPlace(),i=this.destinationPlace();if(eC(r)){this.logger.logWarning("Should not be possible to swap places with current location as origin");return}this.originPlace.set(i),this.originSelected.emit(i),this.destinationPlace.set(r),this.destinationSelected.emit(r)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-route-selector"]],inputs:{places:[1,"places"],initialDestination:[1,"initialDestination"]},outputs:{originSelected:"originSelected",destinationSelected:"destinationSelected",swapPlaces:"swapPlaces",clearDestination:"clearDestination"},decls:20,vars:10,consts:[[1,"route-selector"],[1,"routing-option","origin"],[1,"place-info"],[1,"place-icon"],["xmlns","http://www.w3.org/2000/svg","width","36","height","36","viewBox","0 0 36 36","fill","none"],["width","36","height","36","rx","18","fill","#8DC8FF"],["d","M29.2517 17.7595C29.1117 23.9741 23.9602 28.8986 17.7456 28.7586C11.5309 28.6185 6.60648 23.4671 6.74649 17.2524C6.8865 11.0378 12.038 6.11332 18.2526 6.25333C24.4673 6.39334 29.3917 11.5448 29.2517 17.7595Z","fill","#2C57A0"],["d","M13.5364 22.4764C13.4259 22.5279 13.3135 22.5415 13.199 22.5173C13.0847 22.4932 12.9902 22.4373 12.9155 22.3496C12.8298 22.2721 12.7772 22.1766 12.7577 22.0629C12.7384 21.9495 12.7519 21.8395 12.7982 21.7327L17.6404 11.5662C17.7437 11.3532 17.9102 11.2493 18.1399 11.2545C18.3697 11.2597 18.5313 11.371 18.6249 11.5884L23.0044 21.9626C23.0458 22.0714 23.0543 22.182 23.03 22.2944C23.0054 22.407 22.9485 22.5001 22.8594 22.5736C22.7808 22.6579 22.6839 22.7095 22.5687 22.7283C22.4532 22.7475 22.3415 22.7288 22.2335 22.6723L17.9278 20.6691L13.5364 22.4764ZM14.4251 20.9295L17.954 19.5064L21.4153 21.087L18.0981 13.1117L14.4251 20.9295Z","fill","white"],[3,"selectedPlaceChange","places","initialSelectedPlace","allowCurrentLocation"],[1,"connector-line"],[1,"connector-dots"],[3,"icon"],[1,"connector-line-element"],["type","button",1,"swap-button",3,"click","disabled"],[1,"routing-option","destination"],[3,"selectedPlaceChange","places","initialSelectedPlace","placeholder"]],template:function(i,l){i&1&&(rt(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),s0(),rt(4,"svg",4),Tt(5,"rect",5)(6,"path",6)(7,"path",7),at()(),a0(),rt(8,"app-place-selector",8),rn("selectedPlaceChange",function(a){return l.onOriginSelected(a)}),at()()(),rt(9,"div",9)(10,"div",10),Tt(11,"fa-icon",11),at(),Tt(12,"div",12),rt(13,"button",13),rn("click",function(){return l.onSwapPlaces()}),Tt(14,"fa-icon",11),at()(),rt(15,"div",14)(16,"div",2)(17,"div",3),Tt(18,"fa-icon",11),at(),rt(19,"app-place-selector",15),rn("selectedPlaceChange",function(a){return l.onDestinationSelected(a)}),at()()()()),i&2&&(st(8),Rt("places",l.places())("initialSelectedPlace",l.originPlace())("allowCurrentLocation",!0),st(3),Rt("icon",l.faEllipsisVertical),st(2),Rt("disabled",!l.canSwapPlaces()),st(),Rt("icon",l.faArrowsRetweet),st(4),Rt("icon",l.faLocationDot),st(),Rt("places",l.places())("initialSelectedPlace",l.destinationPlace())("placeholder","Select a destination"))},dependencies:[Hd,D1,wr],styles:['.route-selector[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px;position:relative;width:100%;box-sizing:border-box}.routing-option[_ngcontent-%COMP%]{display:flex;gap:10px;align-items:center;padding:0 40px 0 0;box-sizing:border-box;width:100%}.place-info[_ngcontent-%COMP%]{display:flex;gap:10px;align-items:center;flex:1;min-width:0}.place-icon[_ngcontent-%COMP%]{flex-shrink:0;width:36px;height:36px;display:flex;align-items:center;justify-content:center}.destination[_ngcontent-%COMP%] .place-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-text-black)}.connector-line[_ngcontent-%COMP%]{display:flex;gap:8px;align-items:center;width:100%;position:relative}.connector-dots[_ngcontent-%COMP%]{flex-shrink:0;width:36px;height:36px;display:flex;align-items:center;justify-content:center}.connector-dots[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px;color:#5d5d5d}.connector-line-element[_ngcontent-%COMP%]{flex:1;height:1px;background:#e0e0e0;position:relative}.connector-line-element[_ngcontent-%COMP%]:before{content:"";position:absolute;top:50%;left:0;right:0;height:1px;background:repeating-linear-gradient(to right,#e0e0e0 0,#e0e0e0 4px,transparent 4px,transparent 8px);transform:translateY(-50%)}.swap-button[_ngcontent-%COMP%]{flex-shrink:0;width:32px;height:25px;background:none;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:background-color .2s ease}.swap-button[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.swap-button[_ngcontent-%COMP%]:hover:not(:disabled){background-color:#f5f5f5}.swap-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:16px;color:#5d5d5d}.clear-button[_ngcontent-%COMP%]{flex-shrink:0;width:20px;height:20px;background:none;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:50%;transition:background-color .2s ease}.clear-button[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.clear-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:12px;color:#666}.select-destination-button[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;padding:8px 12px;border-radius:6px;transition:background-color .2s ease;flex:1;text-align:left}.select-destination-button[_ngcontent-%COMP%]:hover{background-color:#f8f9fa}.select-destination-button[_ngcontent-%COMP%] .place-label[_ngcontent-%COMP%]{font-family:Open Sans,sans-serif;font-weight:600;font-size:20px;line-height:1;color:#cbcbcb;font-variation-settings:"wdth" 100;letter-spacing:-1px}.destination-selector[_ngcontent-%COMP%]{position:absolute;top:81px;left:84.5px;width:310px;z-index:1000;background:#fff;box-shadow:0 4px 4px #00000040;border-radius:8px;overflow:hidden}@media (width <= 768px){.route-selector[_ngcontent-%COMP%]{padding:20px 16px}.place-text[_ngcontent-%COMP%]{font-size:18px}.place-icon[_ngcontent-%COMP%]{width:32px;height:32px}.place-icon[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:18px}.destination-selector[_ngcontent-%COMP%]{left:16px;right:16px;width:auto}}']})};function nq(n,r){if(n&1){let i=Fr();rt(0,"div",6)(1,"app-route-info",9),rn("startRouteClick",function(){pr(i);let d=qt();return mr(d.startStepAnimation())}),at()()}if(n&2){qt();let i=qg(7);st(),Rt("currentRoute",i)}}var M1=class n{routeId="";route=Me(Ba);logger=Me(qn);navigatorService=Me(Eo);loadedDataService=Me(oi);mapService=Me(yi);markerService=Me(qo);homeStateService=Me(fi);routingService=Me(Sc);mapReady=uo(this.mapService.mapReady,{requireSync:!0});places=uo(this.loadedDataService.getAvailablePlaces(),{initialValue:[]});originPoint=sn(null);destinationPlace=Go(()=>this.initialDestination());initialDestination=sn(null);currentRoute=sn(null);constructor(){this.routeId=this.route.snapshot.params.id||"unknown",Hn(()=>{let r=this.places();if(r.length>0){let i=r.find(l=>l.lazarilloId===this.routeId||l.clientId===this.routeId);i&&this.initialDestination.set(i)}}),Hn(()=>{if(this.mapReady()){let i=$o(this.homeStateService.lastListedPlaces);this.markerService.addRouteMarkers(i)}}),Hn(()=>{let r=this.destinationPlace();r&&this.mapReady()&&(this.markerService.deselectMarkers(),this.markerService.hasMarker(r.lazarilloId)||this.markerService.addRouteMarker(r),this.markerService.selectMarker(r.lazarilloId),$o(this.originPoint)===null&&setTimeout(()=>{this.mapService.updateCamera({center:r.position})},100))}),Hn(()=>{let r=this.originPoint(),i=this.destinationPlace();r&&i?this.mapReady()&&(this.markerService.removeAllMarkers(),this.markerService.addOriginMarker(r.position),this.markerService.addDestinationMarker(i),this.routingService.getRoute(r,i).then(l=>{this.currentRoute.set(l),this.routingService.startAnimatingRoute(l),this.fitMapToRoute(r,i,l)}).catch(l=>{this.logger.logWarning("Error getting route",l)})):this.currentRoute.set(null)})}returnToProfile(){this.navigatorService.navigateToProfile(this.routeId)}onDestinationSelected(r){this.destinationPlace.set(r)}onOriginSelected(r){this.originPoint.set(r)}startStepAnimation(){this.currentRoute()&&this.logger.log("Starting step animation")}fitMapToRoute(r,i,l){let d=r?.position??this.originPoint()?.position,a=i?.position??this.destinationPlace()?.position,I=l??this.currentRoute(),R=document.querySelector(".route-related-components");if(d&&a&&I&&R&&this.mapReady()){let L=getComputedStyle(R),H=Number.parseInt(L.getPropertyValue("--padding-top")),K=Number.parseInt(L.getPropertyValue("--padding-left"));setTimeout(()=>{this.mapService.fitRoute(d,a,I,{padding:{top:H,left:K,right:70,bottom:50}})},100)}}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-route-screen"]],decls:12,vars:4,consts:[[1,"route-screen"],[1,"back-button"],["backButton","",3,"click"],[1,"route-screen-content"],[1,"route-related-components"],[3,"originSelected","destinationSelected","places","initialDestination"],[1,"route-info"],[1,"map"],[3,"restartRouteCallback"],[3,"startRouteClick","currentRoute"]],template:function(i,l){if(i&1){let d=Fr();rt(0,"div",0)(1,"div",1)(2,"button",2),rn("click",function(){return pr(d),mr(l.returnToProfile())}),en(3,"Back"),at()(),rt(4,"div",3)(5,"div",4)(6,"app-route-selector",5),rn("originSelected",function(I){return pr(d),mr(l.onOriginSelected(I))})("destinationSelected",function(I){return pr(d),mr(l.onDestinationSelected(I))}),at(),Zp(7),Rn(8,nq,2,1,"div",6),at(),rt(9,"div",7)(10,"app-map")(11,"app-route-control-button",8),rn("restartRouteCallback",function(){return pr(d),mr(l.fitMapToRoute())}),at()()()()()}if(i&2){st(6),Rt("places",l.places())("initialDestination",l.initialDestination()),st();let d=Hg(l.currentRoute());st(),On(d!==null?8:-1)}},dependencies:[pm,Qd,T1,I1,E1],styles:[".route-screen-content[_ngcontent-%COMP%]{position:relative}.route-related-components[_ngcontent-%COMP%]{--padding-top: 130;--padding-left: 450;position:absolute;top:0;left:0;width:450px;box-sizing:border-box;z-index:1;display:flex;flex-direction:column;gap:40px;padding:40px 38px;background-color:var(--definitions-colors-background-white)}@container mapvx-container (width <= 1024px){.route-related-components[_ngcontent-%COMP%]{--padding-top: 70;--padding-left: 50;position:unset;width:100%}}.map[_ngcontent-%COMP%]{width:100%;height:820px}"],changeDetection:0})};var HR=[{path:"",component:o1,children:[{path:"list",redirectTo:"",pathMatch:"full"},{path:"",component:m1},{path:"search",component:v1}]},{path:"profile/:id",component:S1},{path:"route/:id",component:M1},{path:"**",redirectTo:""}];var qR={providers:[q2(),Tx(),pS(HR),{provide:vc,useClass:i1},qn]};Qx(qR).then(n=>{let r=oP(r1,{injector:n.injector});customElements.define("mapvx-website",r)}).catch(n=>console.error(n));
|
|
1512
|
+
</svg>`,i}pauseRouteAnimation(){this.animationStatusSubject.next(2),this.mapService.pauseAnimatingRoute()}resumeRouteAnimation(){this.animationStatusSubject.next(1),this.mapService.resumeAnimatingRoute()}restartRouteAnimation(){this.animationStatusSubject.next(1),this.mapService.restartAnimatingRoute()}removeRoute(){this.animationStatusSubject.next(0),this.activeRouteSubject.next(null),this.currentStepSubject.next(null),this.mapService.removeRoute()}static \u0275fac=function(i){return new(i||n)};static \u0275prov=zt({token:n,factory:n.\u0275fac})};var n1={term:"",results:[]};function vS(n,r){let i=r?.injector??Me(Uo),l=new Ra(1),d=Hn(()=>{let a;try{a=n()}catch(I){$o(()=>l.error(I));return}$o(()=>l.next(a))},{injector:i,manualCleanup:!0});return i.get(Bs).onDestroy(()=>{d.destroy(),l.complete()}),l.asObservable()}function uo(n,r){let l=!r?.manualCleanup?r?.injector?.get(Bs)??Me(Bs):null,d=PG(r?.equal),a;r?.requireSync?a=sn({kind:0},{equal:d}):a=sn({kind:1,value:r?.initialValue},{equal:d});let I,R=n.subscribe({next:L=>a.set({kind:1,value:L}),error:L=>{a.set({kind:2,error:L}),I?.()},complete:()=>{I?.()}});if(r?.requireSync&&a().kind===0)throw new Ht(601,!1);return I=l?.onDestroy(R.unsubscribe.bind(R)),tn(()=>{let L=a();switch(L.kind){case 1:return L.value;case 2:throw L.error;case 0:throw new Ht(601,!1)}},{equal:r?.equal})}function PG(n=Object.is){return(r,i)=>r.kind===1&&i.kind===1&&n(r.value,i.value)}var fi=class n{loadedDataService=Me(oi);homePlaces=sn([]);showCategoryFilters=sn(!0);showCityFilter=sn(!0);defaultToMap=sn(!1);activeView=Go(()=>this.defaultToMap()?"map":"grid");inputValue=sn("");selectedInstitution=sn("");hideDeals=sn(!1);cardWidth=sn(void 0);rowsPerPage=sn(2);initialInstitutionId=sn("");lastListedPlaces=sn([]);categoryFiltersData=uo(this.loadedDataService.getInstitution().pipe(Tn(r=>{let i=r.properties;if(i){let l=i.filter(d=>"childPlaces"in d&&d.childPlaces!==void 0).map(d=>({placeData:"childPlaces"in d?d.childPlaces:[],name:d.title}));return l.splice(1,0,{name:"All",placeData:[]}),l}return[]})),{initialValue:[]});selectedFilter=Go(()=>this.categoryFiltersData()[0]?.name);currentPageIndex=Go({source:this.selectedFilter,computation:(r,i)=>r!==i?.source?1:i?.value??1});lastCardSelected=new fr;userAction=new fr;lastSearchData=sn(n1);static \u0275fac=function(i){return new(i||n)};static \u0275prov=zt({token:n,factory:n.\u0275fac})};var OR={fas:{},fak:{}},_S=[];function LR(n){Object.keys(n).forEach(function(r){if(r!=="prefix"){var i=n[r],l=i.icon[2];l.forEach(function(d){typeof d=="string"&&(OR[i.prefix][d]=i)}),OR[i.prefix][i.iconName]=i,_S.push(i)}})}LR(uC);LR(yS);var Ay=TI(sC());var r1=class n{destroy$=new fr;apiKey=cr("");institutionId=cr("");initialData=cr("");showCategoryFilters=cr(!0,{transform:r=>typeof r=="string"?r==="true":r});showCityFilter=cr(!0,{transform:r=>typeof r=="string"?r==="true":r});defaultToMap=cr(!1,{transform:r=>typeof r=="string"?r==="true":r});inheritFontFamily=cr(!1,{transform:r=>typeof r=="string"?r==="true":r});hideDeals=cr(!1,{transform:this.transformToBoolean});cardWidth=cr(void 0,{transform:r=>{if(!(r==null||r==="")){if(typeof r=="string"){let i=Number.parseInt(r,10);return Number.isNaN(i)||i<=0?void 0:i}return typeof r=="number"&&r<=0?void 0:r}}});rowsPerPage=cr(2,{transform:r=>{if(typeof r=="string"){let i=Number.parseInt(r,10);return Number.isNaN(i)||i<=0?2:Math.min(Math.max(i,1),10)}return r<=0?2:Math.min(Math.max(r,1),10)}});cardSelected=vs();userAction=vs();router=Me(Xd);navigatorService=Me(Eo);locationStrategy=Me(vc);platformId=Me(Dl);logger=Me(qn);sdkService=Me(ea);loadedDataService=Me(oi);homeStateService=Me(fi);iconLibrary=Me(dy);isInitialized=!1;isConnected=!1;static instanceCount=0;static hasBeenConnected=!1;constructor(){this.loadIcons(),Hn(()=>{let r=this.apiKey();r&&r.trim()!==""&&!this.sdkService.isInitialized()&&(this.logger.log("\u{1F511} Initializing SDK with provided API key"),this.sdkService.initialize(r.trim()),this.loadData())}),Hn(()=>{this.homeStateService.initialInstitutionId.set(this.institutionId())}),Hn(()=>{this.homeStateService.hideDeals.set(this.hideDeals())}),Hn(()=>{this.homeStateService.cardWidth.set(this.cardWidth())}),Hn(()=>{this.homeStateService.rowsPerPage.set(this.rowsPerPage())}),Hn(()=>{let r=this.initialData();r&&r.trim()!==""&&this.processInitialData(r)}),Hn(()=>{this.homeStateService.showCategoryFilters.set(this.showCategoryFilters())}),Hn(()=>{this.homeStateService.showCityFilter.set(this.showCityFilter())}),Hn(()=>{let r=this.defaultToMap();this.logger.log("====> defaultToMap input",r),this.homeStateService.defaultToMap.set(r)}),Hn(()=>{let r=this.institutionId();r&&r.trim()!==""&&this.updateInstitution(r)}),this.homeStateService.lastCardSelected.pipe(rs(this.destroy$)).subscribe(r=>{this.cardSelected.emit(r),this.logger.log("====> cardSelected",r)}),this.homeStateService.userAction.pipe(rs(this.destroy$)).subscribe(r=>{this.userAction.emit(r),this.logger.log("====> userAction",r)})}ngOnInit(){_c(this.platformId)?this.handleInstanceTracking():this.logger.log("\u{1F5A5}\uFE0F Componente inicializado en servidor (SSR)")}loadIcons(){this.iconLibrary.addIcons(..._S)}loadData(){this.loadPlaces(),this.loadConfiguration(),this.loadInstitution()}async loadCityFilterOptions(r){this.loadedDataService.cityFilterOptions.set(r);let i=r[0];i&&this.homeStateService.selectedInstitution.set(i.institutionId);let l=r.filter(d=>d.type==="parent-place");Promise.all(l.map(async d=>{let a=async()=>{let R=await this.sdkService.getPlaceDetail(d.parentPlaceId);this.loadedDataService.updatePotentialParentPlaces(R)},I=async()=>{let R=await this.sdkService.getSubPlaces(d.parentPlaceId);this.loadedDataService.updateAvailablePlaces(R)};await Promise.all([a(),I()])}))}transformToBoolean(r){return typeof r=="string"?r==="true":r}processInitialData(r){try{let i=JSON.parse(r);if(i.availablePlaces){let d=i.availablePlaces.map(a=>new Ay.LzPlace(a)).filter(a=>a.generalCategory!=="transport"&&!a.hidePlace);this.loadedDataService.updateAvailablePlaces(d),this.logger.log(`\u2705 Successfully loaded ${d.length} places from initial data`)}if(i.institutions){let d=i.institutions.map(a=>new Ay.Institution(a)).find(a=>a.lazarilloId===this.institutionId());d?this.loadedDataService.setInstitution(d):this.logger.log(`\u274C Institution not found for id ${this.institutionId()}`)}}catch(i){this.logger.log("\u274C Error processing initial data",i),this.logger.log(`\u274C Data: ${r}`)}}async loadPlaces(){let r=_c(this.platformId)?"Browser":"Server";try{this.logger.log(`\u{1F4CD} Loading initial places data on ${r}...`);let i=await this.sdkService.getAvailablePlaces(),l=i.filter(d=>d.generalCategory!=="transport"&&!d.hidePlace);this.loadedDataService.updateAvailablePlaces(l),this.logger.log(`\u2705 Successfully loaded ${i.length} places on ${r}`)}catch(i){this.logger.log(`\u274C Error loading initial places data on ${r}:`,i)}}async loadConfiguration(){try{let r=await this.sdkService.getConfiguration();this.loadedDataService.setConfiguration(r);let i=r.cityOptions||[];this.loadCityFilterOptions(i),this.logger.log("\u2705 Successfully loaded configuration",r)}catch(r){this.logger.log("\u274C Error loading initial configuration",r)}}async loadInstitution(){try{let r=await this.sdkService.getInstitutions(),i=r.find(l=>l.lazarilloId===this.institutionId());this.loadedDataService.setInstitutions(r),i?(this.loadedDataService.setInstitution(i),this.logger.log("\u2705 Successfully loaded institution",i)):this.logger.log("\u274C Institution not found")}catch(r){this.logger.log("\u274C Error loading institution data",r)}}updateInstitution(r){console.log("====> updateInstitution",r);let i=this.initialData();if(i&&i.trim()!==""){let l=JSON.parse(i);if(l.institutions){let d=l.institutions.map(I=>new Ay.Institution(I)),a=d.find(I=>I.lazarilloId===r);if(this.loadedDataService.setInstitutions(d),a){this.loadedDataService.setInstitution(a),this.logger.log("\u2705 Successfully updated institution",a);return}}}this.loadInstitution()}handleInstanceTracking(){n.instanceCount++;let r=this.checkForExistingRouterContent(),i=this.router.url;n.hasBeenConnected||r||i!=="/"&&n.instanceCount===1?(this.logger.log("\u{1F504} Detectada reconexi\xF3n del web component"),this.logger.log(` - Instancia #${n.instanceCount}`),this.logger.log(` - URL del router: ${i}`),this.logger.log(` - Contenido en router outlet: ${r}`),this.handleReconnection()):this.logger.log(`\u{1F680} Primera conexi\xF3n del web component (instancia #${n.instanceCount})`),n.hasBeenConnected=!0}checkForExistingRouterContent(){try{let r=document.querySelector("router-outlet");return r?r.children.length>0:!1}catch{return!1}}ngAfterViewInit(){this.isConnected=!0,this.scheduleRouterInitialization()}ngOnDestroy(){this.isConnected=!1,this.destroy$.next(),this.destroy$.complete()}scheduleRouterInitialization(){_c(this.platformId)?requestAnimationFrame(()=>{this.initializeRouter()}):setTimeout(()=>{this.initializeRouter()},0)}initializeRouter(){if(this.isInitialized&&this.isConnected)return;this.locationStrategy.setInitialPath("/");let r=this.router.url,i=this.router.routerState.root.firstChild;r==="/"&&!i?this.router.navigateByUrl("/").then(()=>{this.isInitialized=!0}).catch(l=>{console.error("Error en navegaci\xF3n inicial:",l),this.isInitialized=!0}):this.isInitialized=!0}handleReconnection(){this.logger.log("\u{1F504} Procesando reconexi\xF3n del web component");let r=_c(this.platformId)?10:50;setTimeout(()=>{this.checkAndFixRouterSync()},r)}checkAndFixRouterSync(){if(!_c(this.platformId)){this.logger.log("\u2139\uFE0F Saltando verificaci\xF3n de sincronizaci\xF3n en servidor");return}let r=this.locationStrategy.getCurrentPath()||"/",i=this.router.url,l=this.router.routerState.root.firstChild,d=this.checkForExistingRouterContent();this.logger.log("\u{1F50D} Verificando sincronizaci\xF3n del router:"),this.logger.log(` - Path interno: "${r}"`),this.logger.log(` - Router URL: "${i}"`),this.logger.log(` - Tiene ruta activa: ${!!l}`),this.logger.log(` - Contenido en router outlet: ${d}`),r==="/"&&i!=="/"||r==="/"&&!l&&d||r==="/"&&i==="/"&&d&&!l?(this.logger.log("\u26A0\uFE0F Desincronizaci\xF3n detectada - aplicando correcci\xF3n"),this.performGentleReset()):this.logger.log("\u2705 Router sincronizado correctamente")}performGentleReset(){this.logger.log("\u{1F504} Realizando reset suave del router"),this.router.navigateByUrl("/",{replaceUrl:!0}).then(()=>{this.logger.log("\u2705 Navegaci\xF3n correctiva completada")}).catch(r=>{console.error("\u274C Error en navegaci\xF3n correctiva:",r)})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-root"]],inputs:{apiKey:[1,"apiKey"],institutionId:[1,"institutionId"],initialData:[1,"initialData"],showCategoryFilters:[1,"showCategoryFilters"],showCityFilter:[1,"showCityFilter"],defaultToMap:[1,"defaultToMap"],inheritFontFamily:[1,"inheritFontFamily"],hideDeals:[1,"hideDeals"],cardWidth:[1,"cardWidth"],rowsPerPage:[1,"rowsPerPage"]},outputs:{cardSelected:"cardSelected",userAction:"userAction"},features:[J0([Eo,fi,qo,Wn,Sc,Jd])],decls:4,vars:2,consts:[[1,"named-container"],[1,"app-container"],[1,"app-content"]],template:function(i,l){i&1&&(rt(0,"div",0)(1,"div",1)(2,"div",2),Tt(3,"router-outlet"),at()()()),i&2&&(st(),ii("inherit-font-family",l.inheritFontFamily()))},dependencies:[D_,Mf],styles:["*[_ngcontent-%COMP%]{margin:0;padding:0}.named-container[_ngcontent-%COMP%]{container-name:mapvx-container;container-type:inline-size;width:100%}.app-container[_ngcontent-%COMP%]{display:flex;padding:0;flex-direction:column;justify-content:center;align-items:flex-start;gap:22px;background:var(--definitions-colors-background-50);font-family:Open Sans,sans-serif}.app-container.inherit-font-family[_ngcontent-%COMP%]{font-family:inherit}.app-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:19px}.app-header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{color:var(--definitions-colors-text-900);font:var(--definitions-textFonts-desktop-h1);font-family:inherit}.app-header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--definitions-colors-text-800);font:var(--definitions-textFonts-desktop-sub-1);font-family:inherit}.main-navigation[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:center;flex-wrap:wrap}.nav-button[_ngcontent-%COMP%]{background:#fff3;border:1px solid rgba(255,255,255,.3);color:#fff;padding:.5rem 1rem;border-radius:4px;cursor:pointer;font-size:.9rem;transition:all .2s ease}.nav-button[_ngcontent-%COMP%]:hover{background:#ffffff4d;transform:translateY(-1px)}.nav-button[_ngcontent-%COMP%]:active{transform:translateY(0)}.route-debug[_ngcontent-%COMP%]{margin-top:.5rem;text-align:center}.route-debug[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{color:#fffc;font-size:.8rem;font-family:Courier New,monospace;background:#0000001a;padding:.25rem .5rem;border-radius:4px}.app-content[_ngcontent-%COMP%]{width:100%}"]})};var i1=class n extends vc{_path="";_baseHref;_popStateListeners=[];constructor(){super(),this._baseHref=this.getBaseHref()}path(){return this._path}prepareExternalUrl(r){return this._baseHref+"#"+r}pushState(r,i,l,d){this._updatePath(r,l,d)}replaceState(r,i,l,d){this._updatePath(r,l,d)}forward(){}back(){}getState(){return null}historyGo(r){}onPopState(r){this._popStateListeners.push(r)}getBaseHref(){return typeof document<"u"?document.querySelector("base")?.href??"/":"/"}_updatePath(r,i,l){this._path=i+(l?"?"+l:""),this._notifyPopState(r,i)}_notifyPopState(r,i){let l={type:"popstate",state:r,url:i,pop:!0};this._popStateListeners.forEach(d=>{try{d(l)}catch(a){console.error("Error in popstate listener:",a)}})}getCurrentPath(){return this._path}setInitialPath(r){this._path=r}static \u0275fac=function(i){return new(i||n)};static \u0275prov=zt({token:n,factory:n.\u0275fac,providedIn:"root"})};var AG=["categoryFilters"];function kG(n,r){if(n&1){let i=Fr();rt(0,"button",14),rn("click",function(){pr(i);let d=qt();return mr(d.onClearInput())}),Tt(1,"fa-icon",6),at()}if(n&2){let i=qt();st(),Rt("icon",i.faXmark)}}function RG(n,r){if(n&1&&Tt(0,"fa-icon",6),n&2){let i=qt(2);Rt("icon",i.faCaretUp)}}function OG(n,r){if(n&1&&Tt(0,"fa-icon",6),n&2){let i=qt(2);Rt("icon",i.faCaretDown)}}function LG(n,r){if(n&1){let i=Fr();rt(0,"button",21),rn("click",function(){let d=pr(i).$implicit,a=qt(3);return mr(a.onCitySelect(d))}),en(1),at()}if(n&2){let i=r.$implicit;st(),Ji(" ",i.name," ")}}function FG(n,r){if(n&1&&(rt(0,"div",19),Ki(1,LG,2,1,"button",20,bf),at()),n&2){let i=qt(2);st(),Xi(i.citiesOptions())}}function NG(n,r){if(n&1){let i=Fr();rt(0,"div",9)(1,"button",15),rn("click",function(){pr(i);let d=qt();return mr(d.onCityFilterClick())}),Tt(2,"fa-icon",6),at(),rt(3,"button",16),rn("click",function(){pr(i);let d=qt();return mr(d.onCityFilterClick())}),rt(4,"span",17),en(5),at(),rt(6,"div",18),Rn(7,RG,1,1,"fa-icon",6)(8,OG,1,1,"fa-icon",6),at()(),Rn(9,FG,3,0,"div",19),at()}if(n&2){let i,l=qt();st(),ii("active",l.isCityDropdownOpen()),st(),Rt("icon",l.faFilter),st(3),So((i=l.selectedCity())==null?null:i.name),st(2),On(l.isCityDropdownOpen()?7:8),st(2),On(l.isCityDropdownOpen()?9:-1)}}var o1=class n{logger=Me(qn);stateService=Me(fi);mapService=Me(yi);navigatorService=Me(Eo);loadedDataService=Me(oi);iconLibrary=Me(Wn);categoryFilters;activeView=tn(()=>this.stateService.activeView());showCityFilter=tn(()=>this.stateService.showCityFilter()&&this.citiesOptions().length>0);inputValue=tn(()=>this.stateService.inputValue());citiesOptions=tn(()=>this.loadedDataService.cityFilterOptions());selectedCity=Go(()=>{let r=this.stateService.selectedInstitution();return this.citiesOptions().find(l=>l.institutionId===r)||this.citiesOptions().length>0?this.citiesOptions()[0]:void 0});isCityDropdownOpen=sn(!1);mapReady=uo(this.mapService.mapReady,{initialValue:!1});faGrid2=this.iconLibrary.getIconDefinition("fas","grid-2");faMagnifyingGlass=this.iconLibrary.getIconDefinition("fas","magnifying-glass");faMapLocationDot=this.iconLibrary.getIconDefinition("fas","map-location-dot");faXmark=this.iconLibrary.getIconDefinition("fas","xmark");faCaretDown=this.iconLibrary.getIconDefinition("fas","caret-down");faCaretUp=this.iconLibrary.getIconDefinition("fas","caret-up");faFilter=this.iconLibrary.getIconDefinition("fas","filter");constructor(){Hn(()=>{if(this.stateService.activeView()==="map"&&this.mapReady()){let r=this.stateService.lastListedPlaces(),i=r.map(d=>d.inFloors?.[0]),l=this.getMostFrequentValue(i);l!==void 0&&this.mapService.updateFloor(l),setTimeout(()=>{this.mapService.fitCoordinates(r.map(d=>d.position),{padding:{top:100,left:100,right:100,bottom:100}})},100)}})}ngOnInit(){this.stateService.inputValue()!==""&&this.navigatorService.navigateToSearchView()}ngAfterViewInit(){this.readUrlParams()}readUrlParams(){let r=new URLSearchParams(location.search),i=r.get("search");i&&(this.stateService.inputValue.set(i),this.navigatorService.navigateToSearchView());let l=r.get("tenant");l&&this.navigatorService.navigateToProfile(l);let d=r.get("destination");d&&this.navigatorService.navigateToRoute(d)}onGridClick(){this.stateService.activeView.set("grid")}onMapClick(){this.stateService.activeView.set("map")}onInputChange(r){let i=r.target;this.stateService.inputValue.set(i.value),this.navigatorService.navigateToSearchView()}onClearInput(){this.stateService.inputValue.set(""),this.stateService.userAction.next({type:"return-to-home",data:{filter:this.stateService.selectedFilter()}}),this.navigatorService.navigateToHome()}onCityFilterClick(){this.isCityDropdownOpen.update(r=>!r)}onCitySelect(r){if(this.stateService.selectedInstitution.set(r.institutionId),this.selectedCity.set(r),this.isCityDropdownOpen.set(!1),this.loadedDataService.updateInstitution(r.institutionId),r.type==="institution")this.mapService.removeParentPlace(),this.loadedDataService.parentPlace.set(void 0);else{let l=this.loadedDataService.potentialParentPlaces().find(d=>d.lazarilloId===r.parentPlaceId);l?(this.mapService.setParentPlace(l),this.loadedDataService.parentPlace.set(l)):this.mapService.removeParentPlace()}}getMostFrequentValue(r){if(r.length===0)return;let i=new Map,l=0,d;for(let a of r){if(a==null)continue;let I=(i.get(a)||0)+1;i.set(a,I),I>l&&(l=I,d=a)}return d}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-home-screen"]],viewQuery:function(i,l){if(i&1&&Bg(AG,5),i&2){let d;Vg(d=Ug())&&(l.categoryFilters=d.first)}},decls:23,vars:12,consts:[[1,"home-screen"],[1,"sub-navigation"],[1,"sub-nav-top"],[1,"search-section"],[1,"search-bar"],[1,"search-icon"],[3,"icon"],["name","search input","type","text","placeholder","Search...",1,"search-input",3,"input","value"],[1,"search-clear"],[1,"city-filter-container"],[1,"view-toggle"],[1,"view-btn",3,"click"],[1,"view-icon"],[1,"sub-content"],[1,"search-clear",3,"click"],[1,"mobile-city-filter",3,"click"],[1,"desktop-city-filter",3,"click"],[1,"city-text"],[1,"dropdown-icon"],[1,"city-dropdown"],[1,"city-option"],[1,"city-option",3,"click"]],template:function(i,l){i&1&&(rt(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),Tt(6,"fa-icon",6),at(),rt(7,"input",7),rn("input",function(a){return l.onInputChange(a)}),at(),Rn(8,kG,2,1,"button",8),at(),Rn(9,NG,10,6,"div",9),at(),rt(10,"div",10)(11,"button",11),rn("click",function(){return l.onGridClick()}),rt(12,"div",12),Tt(13,"fa-icon",6),at(),rt(14,"span"),en(15,"Grid View"),at()(),rt(16,"button",11),rn("click",function(){return l.onMapClick()}),rt(17,"div",12),Tt(18,"fa-icon",6),at(),rt(19,"span"),en(20,"Map View"),at()()()()(),rt(21,"div",13),Tt(22,"router-outlet"),at()()),i&2&&(st(4),ii("active",l.inputValue()!==""),st(2),Rt("icon",l.faMagnifyingGlass),st(),Rt("value",l.inputValue()),st(),On(l.inputValue()!==""?8:-1),st(),On(l.showCityFilter()?9:-1),st(2),ii("active",l.activeView()==="grid"),st(2),Rt("icon",l.faGrid2),st(3),ii("active",l.activeView()==="map"),st(2),Rt("icon",l.faMapLocationDot))},dependencies:[wr,Mf],styles:["*[_ngcontent-%COMP%]{margin:0;padding:0;border:0}.home-screen[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:36px}.sub-navigation[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2.25rem;margin-bottom:1.5rem}.sub-nav-top[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:40px}@container mapvx-container (width <= 640px){.sub-nav-top[_ngcontent-%COMP%]{gap:13px}}.search-section[_ngcontent-%COMP%]{display:flex;gap:24px;align-items:center}@container mapvx-container (width <= 640px){.search-section[_ngcontent-%COMP%]{gap:11px}}.search-bar[_ngcontent-%COMP%]{background:var(--definitions-colors-background-white);border-bottom:1px solid var(--definitions-colors-primary-black);display:flex;width:342px;padding:12px 20px;align-items:center;gap:10px}@container mapvx-container (width <= 960px){.search-bar[_ngcontent-%COMP%]{width:150px}}@container mapvx-container (width <= 640px){.search-bar[_ngcontent-%COMP%]{width:110px}}.search-bar.active[_ngcontent-%COMP%]{border-bottom:1px solid var(--definitions-colors-secondary-orange)}.search-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-text-800);display:flex;align-items:center;font-size:20px}.search-bar.active[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-orange)}.search-clear[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-orange);display:flex;align-items:center;font-size:20px;border:none;background:none}.search-clear[_ngcontent-%COMP%]:hover{cursor:pointer}.search-input[_ngcontent-%COMP%]{border:none;outline:none;background:transparent;font:var(--definitions-textFonts-desktop-button-4);font-family:inherit;color:var(--definitions-colors-text-800);width:100%}.search-input[_ngcontent-%COMP%]::placeholder{color:var(--definitions-colors-text-800)}.city-filter-container[_ngcontent-%COMP%]{position:relative}.desktop-city-filter[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.875rem 1rem;height:45px;box-sizing:border-box;cursor:pointer;border:none;background:none}@container mapvx-container (width <= 640px){.desktop-city-filter[_ngcontent-%COMP%]{display:none}}.city-text[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-5);font-family:inherit;color:var(--definitions-colors-text-900);white-space:nowrap}.dropdown-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-text-900);display:flex;align-items:center;font-size:12px}.mobile-city-filter[_ngcontent-%COMP%]{display:none}@container mapvx-container (width <= 640px){.mobile-city-filter[_ngcontent-%COMP%]{display:flex;height:45px;width:52px;padding:0;justify-content:center;align-items:center;gap:10px;cursor:pointer;border:none;background:var(--definitions-colors-background-white);color:var(--definitions-colors-primary-black);font-size:20px}.mobile-city-filter.active[_ngcontent-%COMP%]{background:var(--definitions-colors-primary-black);color:var(--definitions-colors-black_white-50)}}.city-dropdown[_ngcontent-%COMP%]{position:absolute;top:100%;left:0;right:0;background:var(--definitions-colors-background-white);border:1px solid var(--definitions-colors-primary-300);z-index:1;padding:8px 0;min-width:111px}.city-option[_ngcontent-%COMP%]{display:block;width:100%;padding:12px 16px;border:none;background:none;text-align:center;cursor:pointer;font:var(--definitions-textFonts-desktop-input-2);font-family:inherit;color:var(--definitions-colors-text-900);transition:background-color .2s ease}.city-option[_ngcontent-%COMP%]:not(:last-child){border-bottom:1px solid var(--definitions-colors-primary-100)}.city-option[_ngcontent-%COMP%]:hover{background:var(--definitions-colors-background-50)}.view-toggle[_ngcontent-%COMP%]{display:flex;align-items:center}.view-btn[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.625rem;padding:10px 28px;border:none;background:var(--definitions-colors-background-50);cursor:pointer;font:var(--definitions-textFonts-desktop-button-2);font-family:inherit;color:var(--definitions-colors-text-900);white-space:nowrap;transition:all .2s ease;position:relative;border-bottom:1px solid var(--definitions-colors-text-900)}.view-btn.active[_ngcontent-%COMP%]{background:var(--definitions-colors-text-900);color:var(--definitions-colors-text-50)}.view-btn[_ngcontent-%COMP%] .view-icon[_ngcontent-%COMP%]{display:flex;align-items:center;color:currentcolor}@container mapvx-container (width <= 770px){.view-btn[_ngcontent-%COMP%]{padding:10px 0;width:52px;justify-content:center}.view-btn[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:none}}@container mapvx-container (width <= 640px){.view-btn[_ngcontent-%COMP%]{padding:10px 0;width:52px;justify-content:center}.view-btn[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:none}}"],changeDetection:0})};var s1="https://images.ctfassets.net/37yx0l0lf3yk/6eJ4fYG9hQxJ8ayujcebhe/8cf968e7d66df9a8bc75b72b7e7d6432/00002167_BedrockWebsite_TenantCOmingSoon_PlaceholderImage_3840x3840_V2-web.jpg?q=80&fm=webp&w=1920";function a1(n){return n.tags?.includes("deals")||n.tags?.includes("events")}var zG=()=>({rotate:42});function jG(n,r){if(n&1&&Tt(0,"fa-icon",3),n&2){let i=qt();Rt("icon",i.faCircleNotch)("transform",Eu(2,zG))}}function BG(n,r){n&1&&(rt(0,"div",4),en(1,"Deals + Events"),at())}var l1=class n{iconLibrary=Me(Wn);navigatorService=Me(Eo);homeStateService=Me(fi);place=cr.required();hasDealsOrEvents=tn(()=>this.place().banners.some(a1));hideDeals=tn(()=>this.homeStateService.hideDeals());imageSrc=tn(()=>this.place().images[0]||s1);isImageLoading=sn(!0);faCircleNotch=this.iconLibrary.getIconDefinition("fas","circle-notch");constructor(){Hn(()=>{this.imageSrc()&&this.startImageLoading()})}navigateToProfile(){let r=this.place().lazarilloId;this.homeStateService.lastCardSelected.next(r),this.navigatorService.navigateToProfile(r)}startImageLoading(){this.isImageLoading.set(!0)}endImageLoading(){this.isImageLoading.set(!1)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-location-card"]],inputs:{place:[1,"place"]},decls:12,vars:8,consts:[[1,"location-card",3,"click"],[1,"card-image"],[3,"load","error","src","alt"],[1,"loading-icon",3,"icon","transform"],[1,"card-deals-or-events"],[1,"card-content"],[1,"location-name"],[1,"location-address"],[1,"location-category"]],template:function(i,l){i&1&&(rt(0,"button",0),rn("click",function(){return l.navigateToProfile()}),rt(1,"div",1)(2,"img",2),rn("load",function(){return l.endImageLoading()})("error",function(){return l.endImageLoading()}),at(),Rn(3,jG,1,3,"fa-icon",3)(4,BG,2,0,"div",4),at(),rt(5,"div",5)(6,"h3",6),en(7),at(),rt(8,"p",7),en(9),at(),rt(10,"span",8),en(11),at()()()),i&2&&(st(),ii("loading",l.isImageLoading()),st(),Rt("src",l.imageSrc(),yf)("alt",l.place().title),st(),On(l.isImageLoading()?3:l.hasDealsOrEvents()&&!l.hideDeals()?4:-1),st(4),So(l.place().title),st(2),So(l.place().address),st(2),So(l.place().localizedCategory))},dependencies:[wr],styles:["*[_ngcontent-%COMP%]{margin:0;padding:0}.location-card[_ngcontent-%COMP%]{display:flex;padding:5px 5px 10px;flex-direction:column;align-items:flex-start;gap:12px;background:var(--definitions-colors-background-50);border:none;width:100%}.location-card[_ngcontent-%COMP%]:hover{cursor:pointer}.card-image[_ngcontent-%COMP%]{width:100%;overflow:hidden;position:relative;aspect-ratio:1/1}@container mapvx-container (width <= 640px){.card-image[_ngcontent-%COMP%]{min-width:160px;min-height:160px}}.card-image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;display:block;transition:transform .4s ease}.card-image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]:hover{transform:scale(1.2)}.card-image[_ngcontent-%COMP%] .card-deals-or-events[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;width:100%;background-color:var(--definitions-colors-secondary-orange);color:var(--definitions-colors-text-white);display:flex;padding:5px;justify-content:center;align-items:center;gap:8.462px;flex-shrink:0;font:var(--definitions-textFonts-desktop-body-4);font-family:inherit}.card-image.loading[_ngcontent-%COMP%]{background-color:var(--definitions-colors-primary-300);display:flex;justify-content:center;align-items:center}.card-image.loading[_ngcontent-%COMP%] .loading-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-primary-600);font-size:100px}.card-image.loading[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:none}.card-content[_ngcontent-%COMP%]{display:flex;width:100%;flex-direction:column;align-items:flex-start;gap:8px}@container mapvx-container (width <= 640px){.card-content[_ngcontent-%COMP%]{min-width:160px}}.location-name[_ngcontent-%COMP%]{color:var(--definitions-colors-text-black);font:var(--definitions-textFonts-desktop-body-3);font-family:inherit;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;text-align:start}.location-address[_ngcontent-%COMP%]{color:var(--definitions-colors-text-grey);font:var(--definitions-textFonts-desktop-body-5);font-family:inherit;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;text-align:start}.location-category[_ngcontent-%COMP%]{color:var(--definitions-colors-text-light-grey);font:var(--definitions-textFonts-desktop-body-5);font-family:inherit;display:none}"],changeDetection:0})};var VG=["cardContainer"],UG=["*"];function $G(n,r){if(n&1&&Tt(0,"app-location-card",3),n&2){let i=r.$implicit;Rt("place",i)}}function GG(n,r){n&1&&Su(0)}function HG(n,r){if(n&1){let i=Fr();rt(0,"button",7),rn("click",function(){pr(i);let d=qt(3);return mr(d.previousPage())}),Tt(1,"fa-icon",8),at()}if(n&2){let i=qt(3);st(),Rt("icon",i.faChevronLeft)}}function qG(n,r){if(n&1&&Rn(0,HG,2,1,"button",6),n&2){let i=qt().$implicit,l=qt();On(i<l.currentPageIndex()?0:-1)}}function WG(n,r){n&1&&(rt(0,"button",9),en(1,"..."),at())}function ZG(n,r){if(n&1){let i=Fr();rt(0,"button",11),rn("click",function(){pr(i);let d=qt(3);return mr(d.nextPage())}),Tt(1,"fa-icon",8),at()}if(n&2){let i=qt(3);st(),Rt("icon",i.faChevronRight)}}function YG(n,r){if(n&1&&(Rn(0,WG,2,0,"button",9),Rn(1,ZG,2,1,"button",10)),n&2){let i=qt().$implicit,l=qt();On(i<l.totalPages()?0:-1),st(),On(i>l.currentPageIndex()?1:-1)}}function KG(n,r){if(n&1){let i=Fr();Rn(0,qG,1,1),rt(1,"button",5),rn("click",function(){let d=pr(i).$implicit,a=qt();return mr(a.goToPage(d))}),en(2),at(),Rn(3,YG,2,2)}if(n&2){let i=r.$implicit,l=r.$index,d=r.$count,a=qt();On(l===0?0:-1),st(),ii("active",a.currentPageIndex()===i),st(),Ji(" ",i," "),st(),On(l===d-1?3:-1)}}var hm=class n{stateService=Me(fi);iconLibrary=Me(Wn);cardContainer=n_("cardContainer");faChevronLeft=this.iconLibrary.getIconDefinition("fas","chevron-left");faChevronRight=this.iconLibrary.getIconDefinition("fas","chevron-right");places=cr.required();itemsPerPage=tn(()=>this.calculateItemsPerPage(this.showMap(),this.cardContainer(),this.stateService.cardWidth(),this.stateService.rowsPerPage()));currentPageIndex=tn(()=>this.stateService.currentPageIndex());totalPages=tn(()=>Math.ceil(this.places().length/this.itemsPerPage()));cardContainerStyles=tn(()=>{let r=this.stateService.cardWidth();return r?{"--card-width":`${r}`}:{}});pages=tn(()=>{let r=this.totalPages();switch(r){case 0:return[];case 1:return[1];case 2:return[1,2];default:{let l=this.currentPageIndex()-1;return l<1&&(l=1),l+2>r&&(l=r-2),Array.from({length:3},(d,a)=>a+l)}}});currentPagePlaces=tn(()=>{let r=this.places(),i=this.itemsPerPage(),l=this.currentPageIndex();return r.slice((l-1)*i,l*i)});showMap=tn(()=>this.stateService.activeView()==="map");calculateItemsPerPage(r,i,l,d=2){if(i){let a=globalThis.getComputedStyle(i.nativeElement),I=l??Number.parseInt(a.getPropertyValue("--card-width")||"0"),R=Number.parseInt(a.getPropertyValue("--card-gap")||"0"),L=I+R;if(L<=0)return d*5;let H=i.nativeElement.clientWidth,W=Math.floor((H+R)/L)*d;return Number.isFinite(W)&&W>0?W:d*5}return d*5}nextPage(){let r=this.currentPageIndex(),i=this.totalPages();r<i&&this.stateService.currentPageIndex.set(r+1)}previousPage(){let r=this.currentPageIndex();r>1&&this.stateService.currentPageIndex.set(r-1)}goToPage(r){this.stateService.currentPageIndex.set(r)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-paginator"]],viewQuery:function(i,l){i&1&&$g(l.cardContainer,VG,5),i&2&&Gg()},inputs:{places:[1,"places"]},ngContentSelectors:UG,decls:9,vars:6,consts:[["cardContainer",""],[1,"paginator"],[1,"paginator-places",3,"ngStyle"],[3,"place"],[1,"paginator-buttons"],[1,"paginator-button",3,"click"],[1,"previous-button"],[1,"previous-button",3,"click"],[3,"icon"],[1,"paginator-button","ellipsis"],[1,"next-button"],[1,"next-button",3,"click"]],template:function(i,l){i&1&&(Cu(),rt(0,"div",1)(1,"div",2,0),Ki(3,$G,1,1,"app-location-card",3,Qs,!1,GG,1,0),at(),rt(6,"div",4),Ki(7,KG,4,5,null,null,bf),at()()),i&2&&(ii("with-map",l.showMap()),st(),ii("with-map",l.showMap()),Rt("ngStyle",l.cardContainerStyles()),st(2),Xi(l.currentPagePlaces()),st(4),Xi(l.pages()))},dependencies:[Hd,Ux,l1,wr],styles:['.paginator[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:36px}.paginator.with-map[_ngcontent-%COMP%]{min-height:730px}@container mapvx-container (width <= 1024px){.paginator.with-map[_ngcontent-%COMP%]{min-height:unset}}.paginator-places[_ngcontent-%COMP%]{--card-width: 237;--card-gap: 13;display:grid;grid-template-columns:repeat(auto-fill,minmax(calc(var(--card-width) * 1px),1fr));align-items:flex-start;place-content:flex-start space-around;gap:24px 13px;align-self:stretch}@container mapvx-container (width <= 640px){.paginator-places[_ngcontent-%COMP%]{--card-width: 170}}.paginator-places.with-map[_ngcontent-%COMP%]{gap:16px 8px;flex-shrink:0}@container mapvx-container (width <= 640px){.paginator-places.with-map[_ngcontent-%COMP%]{display:flex;overflow-x:auto}}.paginator-buttons[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;gap:8px;flex-wrap:wrap}.paginator-button[_ngcontent-%COMP%]{color:var(--definitions-colors-text-900);text-align:center;font:var(--definitions-textFonts-desktop-button-1);font-family:inherit;font-feature-settings:"liga" off,"clig" off;letter-spacing:-1px;border:none;background:none}.paginator-button[_ngcontent-%COMP%]:hover{cursor:pointer}.paginator-button.active[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-orange)}.paginator-button.ellipsis[_ngcontent-%COMP%]:hover{cursor:default}.previous-button[_ngcontent-%COMP%], .next-button[_ngcontent-%COMP%]{color:var(--definitions-colors-text-900);background:none;border:none;font-size:21px}.previous-button[_ngcontent-%COMP%]:hover, .next-button[_ngcontent-%COMP%]:hover{cursor:pointer}'],changeDetection:0})};var c1=class n{onDestroy=new fr;iconLibrary=Me(Wn);mapService=Me(yi);logger=Me(qn);loadedDataService=Me(oi);faCenter=this.iconLibrary.getIconDefinition("fak","center");ngOnDestroy(){this.onDestroy.next(),this.onDestroy.complete()}onClick(){let r=this.mapService.rotation.getValue();this.loadedDataService.getConfiguration().pipe(Ls(1),rs(this.onDestroy)).subscribe({next:i=>{this.mapService.updateCamera({center:i.initialCenter,zoom:i.initialZoom,pitch:i.initialPitch??0,bearing:r})},error:i=>{this.logger.logWarning("Error centering map",i)}})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-center-map-button"]],decls:2,vars:1,consts:[[1,"button",3,"click"],[3,"icon"]],template:function(i,l){i&1&&(rt(0,"button",0),rn("click",function(){return l.onClick()}),Tt(1,"fa-icon",1),at()),i&2&&(st(),Rt("icon",l.faCenter))},dependencies:[wr],styles:[".button[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:40px;border:1px solid var(--definitions-colors-primary-900);background-color:var(--definitions-colors-background-white);box-shadow:var(--definitions-shadows-general)}.button[_ngcontent-%COMP%]:hover{cursor:pointer}.button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px;color:var(--definitions-colors-text-black)}"],changeDetection:0})};var XG=n=>({rotate:n}),u1=class n{mapService=Me(yi);iconLibrary=Me(Wn);rotation=uo(this.mapService.rotation.asObservable().pipe(Tn(r=>360-r)),{initialValue:0});faCompass=this.iconLibrary.getIconDefinition("fak","compass");static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-compass-button"]],decls:2,vars:4,consts:[[1,"button"],[3,"icon","transform"]],template:function(i,l){i&1&&(rt(0,"button",0),Tt(1,"fa-icon",1),at()),i&2&&(st(),Rt("icon",l.faCompass)("transform",Ex(2,XG,l.rotation())))},dependencies:[wr],styles:[".button[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:40px;border:1px solid var(--definitions-colors-primary-900);background-color:var(--definitions-colors-background-white);box-shadow:var(--definitions-shadows-general)}.button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px;color:var(--definitions-colors-text-black)}"],changeDetection:0})};var d1=class n{iconLibrary=Me(Wn);locationService=Me(Jd);logger=Me(qn);markerService=Me(qo);mapService=Me(yi);locationPermission=sn("prompt");active=tn(()=>this.locationService.currentlyWatchingLocation());mapReady=uo(this.mapService.mapReady.asObservable(),{initialValue:!1});positionSubscription;bearingSubscription;faLocation=this.iconLibrary.getIconDefinition("fas","location-arrow");constructor(){this.checkLocationPermission(),Hn(()=>{this.mapReady()?this.active()?(this.positionSubscription=this.locationService.currentLocation.asObservable().subscribe({next:r=>{this.logger.log("location",r),r!=null&&(this.markerService.hasCurrentLocationMarker?this.markerService.updateCurrentLocationMarker(r.position):this.markerService.addCurrentLocationMarker(r.position))},error:r=>{this.logger.logWarning("Error updating current location marker position",r)}}),this.bearingSubscription=Oa([this.locationService.currentBearing.asObservable(),this.mapService.rotation.asObservable()]).subscribe({next:([r,i])=>{this.logger.log("bearing",r),this.logger.log("maprotation",i);let d=(r??0)-i;if(this.logger.log("markerRotation",d),this.markerService.hasCurrentLocationMarker){let a=this.markerService.getCurrentLocationMarkerElement();a!=null&&(a.style.transform=`rotate(${d}deg)`)}},error:r=>{this.logger.logWarning("Error updating current location marker rotation",r)}})):(this.positionSubscription?.unsubscribe(),this.bearingSubscription?.unsubscribe(),this.markerService.removeCurrentLocationMarker(),this.positionSubscription=void 0,this.bearingSubscription=void 0):(this.positionSubscription?.unsubscribe(),this.bearingSubscription?.unsubscribe(),this.positionSubscription=void 0,this.bearingSubscription=void 0)})}ngOnDestroy(){this.locationService.temporalStopWatching(),this.positionSubscription?.unsubscribe(),this.bearingSubscription?.unsubscribe(),this.markerService.removeCurrentLocationMarker()}checkLocationPermission(){this.locationService.checkLocationPermission().then(r=>{this.locationPermission.set(r),r==="granted"&&this.active()&&this.locationService.startWatching()}).catch(r=>{this.logger.logWarning("Error checking location permission",r),this.locationPermission.set("denied")})}async onClick(){if(this.active())this.locationService.stopWatching();else switch(this.locationPermission()){case"granted":this.locationService.startWatching();break;case"prompt":await this.requestPermissions();break;case"denied":this.logger.logWarning("Location permission denied");break}}async requestPermissions(){await this.locationService.requestLocationPermission()==="granted"?(this.locationPermission.set("granted"),this.locationService.startWatching()):this.locationPermission.set("denied")}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-location-button"]],decls:2,vars:3,consts:[[1,"button",3,"click"],[3,"icon"]],template:function(i,l){i&1&&(rt(0,"button",0),rn("click",function(){return l.onClick()}),Tt(1,"fa-icon",1),at()),i&2&&(ii("active",l.active()),st(),Rt("icon",l.faLocation))},dependencies:[wr],styles:[".button[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:40px;border:1px solid var(--definitions-colors-primary-900);background-color:var(--definitions-colors-background-white);color:var(--definitions-colors-text-black);box-shadow:var(--definitions-shadows-general)}.button[_ngcontent-%COMP%]:hover{cursor:pointer}.button.active[_ngcontent-%COMP%]{background-color:var(--definitions-colors-secondary-blue);color:var(--definitions-colors-text-white);border-color:var(--definitions-colors-secondary-blue)}.button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:18px}"],changeDetection:0})};var h1=class n{mapService=Me(yi);iconLibrary=Me(Wn);faPlus=this.iconLibrary.getIconDefinition("fas","plus");faMinus=this.iconLibrary.getIconDefinition("fas","minus");onZoomIn(){this.mapService.updateZoomLevelOn(1)}onZoomOut(){this.mapService.updateZoomLevelOn(-1)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-zoom-buttons"]],decls:5,vars:2,consts:[[1,"zoom-buttons-container"],[1,"zoom-button","zoom-in",3,"click"],[3,"icon"],[1,"zoom-button","zoom-out",3,"click"]],template:function(i,l){i&1&&(rt(0,"div",0)(1,"button",1),rn("click",function(){return l.onZoomIn()}),Tt(2,"fa-icon",2),at(),rt(3,"button",3),rn("click",function(){return l.onZoomOut()}),Tt(4,"fa-icon",2),at()()),i&2&&(st(2),Rt("icon",l.faPlus),st(2),Rt("icon",l.faMinus))},dependencies:[wr],styles:[".zoom-buttons-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;border-radius:40px;border:1px solid var(--definitions-colors-primary-900);background-color:var(--definitions-colors-background-white);box-shadow:var(--definitions-shadows-general)}.zoom-button[_ngcontent-%COMP%]{width:40px;height:40px;border:none;background-color:transparent}.zoom-button[_ngcontent-%COMP%]:hover{cursor:pointer}.zoom-button.zoom-in[_ngcontent-%COMP%]{border-radius:40px 40px 0 0}.zoom-button.zoom-out[_ngcontent-%COMP%]{border-radius:0 0 40px 40px}.zoom-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px;color:var(--definitions-colors-text-black)}"],changeDetection:0})};var f1=class n{static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-buttons-container"]],decls:5,vars:0,consts:[[1,"buttons-container-wrapper"]],template:function(i,l){i&1&&(rt(0,"div",0),Tt(1,"app-location-button")(2,"app-compass-button")(3,"app-center-map-button")(4,"app-zoom-buttons"),at())},dependencies:[u1,c1,h1,d1],styles:[".buttons-container-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:20px}"],changeDetection:0})};function JG(n,r){if(n&1){let i=Fr();rt(0,"button",4),rn("click",function(){let d=pr(i).$implicit,a=qt(3);return mr(a.selectFloor(d))}),en(1),at()}if(n&2){let i=r.$implicit;st(),Ji(" ",i.name," ")}}function QG(n,r){if(n&1&&(rt(0,"div",2),Ki(1,JG,2,1,"button",3,Qs),at()),n&2){let i=qt(2);st(),Xi(i.floors())}}function eH(n,r){if(n&1){let i=Fr();rt(0,"button",0),rn("click",function(){pr(i);let d=qt();return mr(d.toggleFloorSelector())}),rt(1,"span"),en(2),at(),Tt(3,"fa-icon",1),at(),Rn(4,QG,3,0,"div",2)}if(n&2){let i=qt();st(2),So(i.selectedFloor().name),st(),Rt("icon",i.showFloorOptions()?i.caretUp:i.caretDown),st(),On(i.showFloorOptions()?4:-1)}}var p1=class n{loadedDataService=Me(oi);mapService=Me(yi);iconLibrary=Me(Wn);parentPlace=tn(()=>this.loadedDataService.parentPlace());floors=tn(()=>this.parentPlace()?.innerFloors??[]);currentFloorId=tn(()=>this.mapService.currentFloorId());selectedFloor=tn(()=>this.floors().find(r=>r.key===this.currentFloorId())??this.floors()[0]);showFloorOptions=sn(!1);caretDown=this.iconLibrary.getIconDefinition("fas","caret-down");caretUp=this.iconLibrary.getIconDefinition("fas","caret-up");toggleFloorSelector(){this.showFloorOptions.update(r=>!r)}selectFloor(r){this.showFloorOptions.set(!1),this.mapService.updateFloor(r.key)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-floor-selector"]],decls:1,vars:1,consts:[[1,"floor-selector-button",3,"click"],[3,"icon"],[1,"floor-options"],[1,"floor-option"],[1,"floor-option",3,"click"]],template:function(i,l){i&1&&Rn(0,eH,5,3),i&2&&On(l.floors().length>0?0:-1)},dependencies:[wr],styles:[".floor-selector-button[_ngcontent-%COMP%]{padding:10px;border:0;border-radius:16px;background-color:var(--definitions-colors-background-white);box-shadow:var(--definitions-shadows-general)}.floor-options[_ngcontent-%COMP%]{position:absolute;top:100%;left:0;right:0;background-color:var(--definitions-colors-background-white);border-radius:16px;box-shadow:var(--definitions-shadows-general);display:flex;flex-direction:column}.floor-option[_ngcontent-%COMP%]{padding:10px;border:0;background-color:transparent}.floor-option[_ngcontent-%COMP%]:not(:last-child){border-bottom:1px solid var(--definitions-colors-gray-200)}"]})};var tH=["map"],nH=["*"];function rH(n,r){n&1&&Tt(0,"app-floor-selector",3)}var Qd=class n{mapRef;logger=Me(qn);mapService=Me(yi);markerService=Me(qo);routingService=Me(Sc);loadedDataService=Me(oi);showFloorSelector=tn(()=>this.loadedDataService.parentPlace()!==void 0);ngAfterViewInit(){this.mapService.createMap(this.mapRef.nativeElement)}ngOnDestroy(){this.logger.log("Destroying map and preparing to reuse"),this.markerService.prepareToMapReuse(),this.routingService.removeRoute(),this.mapService.prepareToReuse()}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-map"]],viewQuery:function(i,l){if(i&1&&Bg(tH,5),i&2){let d;Vg(d=Ug())&&(l.mapRef=d.first)}},ngContentSelectors:nH,decls:6,vars:1,consts:[["map",""],[1,"map-wrapper"],["id","map"],[1,"floor-selector"],[1,"buttons-container"]],template:function(i,l){i&1&&(Cu(),rt(0,"div",1),Tt(1,"div",2,0),Rn(3,rH,1,0,"app-floor-selector",3),Tt(4,"app-buttons-container",4),Su(5),at()),i&2&&(st(3),On(l.showFloorSelector()?3:-1))},dependencies:[f1,p1],styles:[".map-wrapper[_ngcontent-%COMP%]{height:100%;width:100%;position:relative}#map[_ngcontent-%COMP%]{height:100%;min-width:10px;min-height:10px}.buttons-container[_ngcontent-%COMP%]{position:absolute;bottom:18px;right:17px}.floor-selector[_ngcontent-%COMP%]{position:absolute;top:18px;right:17px}"],changeDetection:0})};var iH=["*"];function oH(n,r){n&1&&(rt(0,"div",2),Tt(1,"app-map"),at())}var fm=class n{stateService=Me(fi);showMap=tn(()=>this.stateService.activeView()==="map");static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-view-container"]],ngContentSelectors:iH,decls:4,vars:3,consts:[[1,"view-container"],[1,"view-content"],[1,"map-container"]],template:function(i,l){i&1&&(Cu(),rt(0,"div",0)(1,"div",1),Su(2),at(),Rn(3,oH,2,0,"div",2),at()),i&2&&(st(),ii("with-map",l.showMap()),st(2),On(l.showMap()?3:-1))},dependencies:[Qd],styles:[".view-container[_ngcontent-%COMP%]{display:flex;align-items:stretch;gap:8px}@container mapvx-container (width <= 1024px){.view-container[_ngcontent-%COMP%]{flex-direction:column-reverse;align-items:flex-start}}@container mapvx-container (width <= 640px){.view-container[_ngcontent-%COMP%]{flex-direction:column-reverse;align-items:flex-start}}.view-content[_ngcontent-%COMP%]{width:100%}.view-content.with-map[_ngcontent-%COMP%]{width:50%;min-width:482px;flex-shrink:0}@container mapvx-container (width <= 1024px){.view-content.with-map[_ngcontent-%COMP%]{width:100%;min-width:unset}}.map-container[_ngcontent-%COMP%]{width:100%;min-height:730px}@container mapvx-container (width <= 1024px){.map-container[_ngcontent-%COMP%]{width:100%;height:730px}}@container mapvx-container (width <= 640px){.map-container[_ngcontent-%COMP%]{width:100%;height:400px;min-height:unset}}"],changeDetection:0})};var sH=["categoryFilters"],aH=(n,r)=>r.name;function lH(n,r){if(n&1){let i=Fr();rt(0,"button",11),rn("click",function(){let d=pr(i).$implicit,a=qt(2);return mr(a.updateSelectedFilter(d.name))}),en(1),at()}if(n&2){let i=r.$implicit,l=qt(2);ii("active",l.selectedFilter()===i.name),st(),Ji(" ",i.name," ")}}function cH(n,r){if(n&1&&(rt(0,"div",2)(1,"div",5,0)(3,"div",6),Ki(4,lH,2,3,"button",7,aH),at(),rt(6,"div",8),Tt(7,"div",9)(8,"div",10),at()()()),n&2){let i=qt();st(4),Xi(i.categoryFiltersData()),st(4),K0("left",i.indicatorPosition(),"px")}}var m1=class n{logger=Me(qn);stateService=Me(fi);loadedDataService=Me(oi);markerService=Me(qo);categoryFilters=n_("categoryFilters");activeView=tn(()=>this.stateService.activeView());loadedPlaces=uo(this.loadedDataService.getAvailablePlaces(),{initialValue:[]});categoryFiltersData=tn(()=>this.stateService.categoryFiltersData());places=Go(()=>this.loadedPlaces());selectedFilter=tn(()=>this.stateService.selectedFilter());selectedInstitution=tn(()=>this.stateService.selectedInstitution());showCategoryFilters=tn(()=>this.stateService.showCategoryFilters());showCityFilter=tn(()=>this.stateService.showCityFilter());indicatorPosition=sn(0);constructor(){Hn(()=>{let r=this.categoryFiltersData();if(this.logger.log("====> loadedCategoryFiltersData",r),r.length>0){let i=r.map(l=>l.name);this.readFilterFromUrl(i)}}),Hn(()=>{if(this.activeView()==="map"){let r=this.places();this.logger.log("====> addMarkers ",r),this.markerService.addMarkers(r)}}),Hn(()=>{let r=this.loadedPlaces(),i=this.showCategoryFilters(),l=r;if(this.showCityFilter()){let a=this.selectedInstitution();a!==""&&(l=l.filter(I=>I.parentInstitutionId===a))}if(i){let a=this.selectedFilter(),I=this.categoryFiltersData();if(a!=="All"){let R=I.find(L=>L.name===a)?.placeData||[];l=r.filter(L=>R.includes(L.lazarilloId))}}this.logger.log("====> filteredPlaces",l),this.places.set(l)}),Hn(()=>{let r=this.places();this.stateService.lastListedPlaces.set(r)}),Hn(()=>{let r=this.selectedFilter(),i=this.categoryFiltersData(),l=this.categoryFilters();this.showCategoryFilters()&&l?requestAnimationFrame(()=>{let a=this.getIndicatorPosition(r,i,l);this.indicatorPosition.set(a)}):this.indicatorPosition.set(0)})}readFilterFromUrl(r){let l=new URLSearchParams(location.search).get("tab");l&&r.includes(l)&&this.stateService.selectedFilter.set(l)}getIndicatorPosition(r,i,l){if(l==null)return 0;let d=l.nativeElement.querySelectorAll(".category-btn");if(d.length===0)return 0;let a=i.findIndex(Y=>Y.name===r);if(a===-1||a>=d.length)return 0;let I=d[a];if(!I)return 0;let R=l.nativeElement.getBoundingClientRect(),L=I.getBoundingClientRect(),H=L.width,K=L.left-R.left,W=80,Q=K+H/2-W/2;return Math.min(Math.max(0,Q),R.width-W)}updateSelectedFilter(r){this.stateService.selectedFilter.set(r),this.stateService.userAction.next({type:"select-filter",data:{filter:r}})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-list-view"]],viewQuery:function(i,l){i&1&&$g(l.categoryFilters,sH,5),i&2&&Gg()},decls:5,vars:2,consts:[["categoryFilters",""],[1,"list-view"],[1,"category-filters-overflow"],[1,"list-container"],[3,"places"],[1,"category-filters-container"],[1,"category-filters"],[1,"category-btn",3,"active"],[1,"active-indicator"],[1,"background-line"],[1,"active-line"],[1,"category-btn",3,"click"]],template:function(i,l){i&1&&(rt(0,"div",1),Rn(1,cH,9,2,"div",2),rt(2,"app-view-container")(3,"div",3),Tt(4,"app-paginator",4),at()()()),i&2&&(st(),On(l.showCategoryFilters()?1:-1),st(3),Rt("places",l.places()))},dependencies:[fm,hm],styles:[".list-view[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:36px}.category-filters-overflow[_ngcontent-%COMP%]{width:100%;overflow-x:auto}.category-filters-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:16px;width:100%;min-width:max-content}.category-filters[_ngcontent-%COMP%]{display:flex;gap:2.4375rem;align-items:center}.category-btn[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;font:var(--definitions-textFonts-desktop-button-5);font-family:inherit;font-weight:400;color:var(--definitions-colors-text-900);white-space:nowrap;padding:0;transition:color .2s ease}.category-btn.active[_ngcontent-%COMP%], .category-btn[_ngcontent-%COMP%]:hover{color:var(--definitions-colors-secondary-orange)}.active-indicator[_ngcontent-%COMP%]{position:relative;width:100%;height:3px;display:flex;align-items:center}.background-line[_ngcontent-%COMP%]{height:.5px;background:var(--definitions-colors-primary-black);border-radius:2px;width:100%}.active-line[_ngcontent-%COMP%]{position:absolute;top:0;height:100%;width:80px;background:var(--definitions-colors-secondary-orange);border-radius:2px;transition:left .3s ease}.list-container[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})};var uH=()=>({rotate:42}),g1=class n{iconLibrary=Me(Wn);faCircleNotch=this.iconLibrary.getIconDefinition("fas","circle-notch");static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-loading-location-card"]],decls:7,vars:3,consts:[[1,"loading-location-card"],[1,"loading-card-image"],[3,"icon","transform"],[1,"loading-card-content"],[1,"loading-location-name"],[1,"loading-location-address"],[1,"loading-location-category"]],template:function(i,l){i&1&&(rt(0,"div",0)(1,"div",1),Tt(2,"fa-icon",2),at(),rt(3,"div",3),Tt(4,"div",4)(5,"div",5)(6,"div",6),at()()),i&2&&(st(2),Rt("icon",l.faCircleNotch)("transform",Eu(2,uH)))},dependencies:[wr],styles:[".loading-location-card[_ngcontent-%COMP%]{display:flex;padding:5px 5px 10px;flex-direction:column;align-items:flex-start;gap:12px}.loading-card-image[_ngcontent-%COMP%]{display:flex;width:227px;height:227px;justify-content:center;align-items:center;background-color:var(--definitions-colors-primary-300)}@container mapvx-container (width <= 640px){.loading-card-image[_ngcontent-%COMP%]{width:160px;height:160px}}.loading-card-image[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-primary-600);font-size:95px}.loading-card-content[_ngcontent-%COMP%]{display:flex;width:227px;flex-direction:column;align-items:flex-start;gap:8px}@container mapvx-container (width <= 640px){.loading-card-content[_ngcontent-%COMP%]{width:160px}}.loading-location-name[_ngcontent-%COMP%]{display:flex;width:85%;height:24px;padding:7.253px 0;flex-direction:column;justify-content:center;align-items:center;border-radius:28.09px;background:var(--definitions-colors-primary-300)}.loading-location-address[_ngcontent-%COMP%]{display:flex;width:70%;height:11px;align-items:center;gap:18px;flex-shrink:0;align-self:stretch;border-radius:28.09px;background:var(--definitions-colors-primary-200)}.loading-location-category[_ngcontent-%COMP%]{display:flex;width:45%;height:11px;justify-content:space-between;align-items:center;border-radius:24px;background:var(--definitions-colors-primary-200)}"]})};var dH=()=>[1,2,3,4,5,6,7,8,9,10];function hH(n,r){n&1&&Tt(0,"app-loading-location-card")}var y1=class n{homeStateService=Me(fi);showMap=tn(()=>this.homeStateService.activeView()==="map");static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-loading-card-list"]],decls:3,vars:3,consts:[[1,"loading-container"]],template:function(i,l){i&1&&(rt(0,"div",0),Ki(1,hH,1,0,"app-loading-location-card",null,bf),at()),i&2&&(ii("with-map",l.showMap()),st(),Xi(Eu(2,dH)))},dependencies:[g1],styles:[".loading-container[_ngcontent-%COMP%]{display:flex;place-content:flex-start;align-items:flex-start;gap:24px 13px;align-self:stretch;flex-wrap:wrap}.loading-container.with-map[_ngcontent-%COMP%]{gap:16px 8px;height:730px}"]})};function fH(n,r){n&1&&(rt(0,"p"),en(1,"Looking for your results..."),at())}function pH(n,r){if(n&1&&(rt(0,"p"),en(1),at()),n&2){let i=qt(3);st(),Ji('Showing 1 result for "',i.searchTerm(),'"')}}function mH(n,r){if(n&1&&(rt(0,"p"),en(1),at()),n&2){let i=qt(3);st(),X0("Showing ",i.places().length,' results for "',i.searchTerm(),'"')}}function gH(n,r){if(n&1&&Rn(0,pH,2,1,"p")(1,mH,2,2,"p"),n&2){let i=qt(2);On(i.places().length===1?0:1)}}function yH(n,r){if(n&1&&(rt(0,"p"),en(1),at()),n&2){let i=qt(2);st(),Ji('No results found for "',i.searchTerm(),'"')}}function vH(n,r){if(n&1&&Rn(0,gH,2,1)(1,yH,2,1,"p"),n&2){let i=qt();On(i.places().length>0?0:1)}}function _H(n,r){n&1&&Tt(0,"app-loading-card-list")}function bH(n,r){if(n&1&&(rt(0,"div",6)(1,"app-paginator",7)(2,"div",8),Tt(3,"fa-icon",4),rt(4,"h2"),en(5,"No results found"),at(),rt(6,"div",9)(7,"p"),en(8,"Sorry, we can\u2019t find any places that match your search. Please try again."),at()()()()()),n&2){let i=qt();st(),Rt("places",i.places()),st(2),Rt("icon",i.faBuildingMagnifyingGlass)}}var v1=class n{logger=Me(qn);loadedDataService=Me(oi);sdkService=Me(ea);stateService=Me(fi);navigatorService=Me(Eo);markerService=Me(qo);iconLibrary=Me(Wn);searching=Go(()=>this.stateService.lastSearchData().term==="");inputValue$=vS(this.stateService.inputValue).pipe(qb(500),Tn(r=>r.trim()),Oi(r=>r!==""),Wb());searchTerm=uo(this.inputValue$,{initialValue:this.stateService.lastSearchData().term});places=uo(Oa([this.loadedDataService.getInstitutionId(),this.inputValue$,vS(this.stateService.lastSearchData)]).pipe(Wi(([r,i,l])=>l.term===i?(this.logger.log("====> lastSearchData",l),this.searching.set(!1),Cn(l.results)):(this.searching.set(!0),this.logger.log("====> searchTerm",i),this.logger.log("====> institutionId",r),ri(this.sdkService.searchPlaces(i,r)))),Zi(()=>this.searching.set(!1))),{initialValue:this.stateService.lastSearchData().results});faArrowLeft=this.iconLibrary.getIconDefinition("fas","arrow-left");faBuildingMagnifyingGlass=this.iconLibrary.getIconDefinition("fas","building-magnifying-glass");constructor(){Hn(()=>{let r=this.places();this.markerService.addMarkers(r)}),Hn(()=>{let r=this.places();this.stateService.lastListedPlaces.set(r)}),Hn(()=>{let r=this.searching();this.logger.log("====> searching",r)}),Hn(()=>{let r=this.searchTerm();r&&this.stateService.userAction.next({type:"search",data:{searchTerm:r}})})}ngOnDestroy(){this.stateService.inputValue()===""?(this.logger.log("====> EMPTY_SEARCH_DATA"),this.stateService.lastSearchData.set(n1)):(this.logger.log("====> SETTING LAST SEARCH DATA"),this.stateService.lastSearchData.set({term:this.stateService.inputValue(),results:this.places()}))}onBackClick(){this.stateService.inputValue.set(""),this.stateService.userAction.next({type:"return-to-home",data:{filter:this.stateService.selectedFilter()}}),this.navigatorService.navigateToHome()}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-search-view"]],decls:13,vars:3,consts:[[1,"search-view"],[1,"search-view-header"],[1,"back-button"],[1,"back-btn",3,"click"],[3,"icon"],[1,"search-view-info"],[1,"results-container"],[3,"places"],[1,"no-results"],[1,"no-results-description"]],template:function(i,l){i&1&&(rt(0,"div",0)(1,"div",1)(2,"div",2)(3,"button",3),rn("click",function(){return l.onBackClick()}),Tt(4,"fa-icon",4),rt(5,"span"),en(6,"Back"),at()()(),rt(7,"div",5),Rn(8,fH,2,0,"p")(9,vH,2,1),at()(),rt(10,"app-view-container"),Rn(11,_H,1,0,"app-loading-card-list")(12,bH,9,2,"div",6),at()()),i&2&&(st(4),Rt("icon",l.faArrowLeft),st(4),On(l.searching()?8:9),st(3),On(l.searching()?11:12))},dependencies:[fm,hm,D_,wr,y1],styles:['*[_ngcontent-%COMP%]{margin:0;padding:0}.search-view[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:36px}.search-view-header[_ngcontent-%COMP%]{display:flex;width:100%;flex-direction:column;justify-content:center;align-items:flex-start;gap:23px}.search-view-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--definitions-colors-text-800);font:var(--definitions-textFonts-desktop-sub-2);font-family:inherit;letter-spacing:-.9px}.results-container[_ngcontent-%COMP%]{width:100%}.back-button[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;gap:16px}.back-btn[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;gap:12px;color:var(--definitions-colors-secondary-blue);border:none;background:none}.back-btn[_ngcontent-%COMP%]:hover{cursor:pointer}.back-btn[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:24px}.back-btn[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-blue);font:var(--definitions-textFonts-desktop-button-1);font-family:inherit;font-feature-settings:"liga" off,"clig" off;letter-spacing:-1px}.no-results[_ngcontent-%COMP%]{display:flex;width:100%;height:100%;flex-direction:column;justify-content:center;align-items:center;gap:31px}.no-results[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:160px;color:var(--definitions-colors-text-light-grey)}.no-results[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{color:var(--definitions-colors-text-grey);font:var(--definitions-textFonts-desktop-h2);font-family:inherit}.no-results[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--definitions-colors-text-grey);font:var(--definitions-textFonts-desktop-sub-1);font-family:inherit;text-align:center}'],changeDetection:0})};function _1(n){switch(n){case"su":return"Sunday";case"mo":return"Monday";case"tu":return"Tuesday";case"we":return"Wednesday";case"th":return"Thursday";case"fr":return"Friday";case"sa":return"Saturday"}}function w1(n){switch(n.getDay()){case 0:return"su";case 1:return"mo";case 2:return"tu";case 3:return"we";case 4:return"th";case 5:return"fr";case 6:return"sa";default:return"mo"}}function wH(n){switch(n){case 0:return"su";case 1:return"mo";case 2:return"tu";case 3:return"we";case 4:return"th";case 5:return"fr";case 6:return"sa";default:return"mo"}}function b1(n){let[r,i]=n.split(":"),l=parseInt(r)%24,d=parseInt(i),a;return l<12?(a="AM",l===0&&(l=12)):(a="PM",l!==12&&(l-=12)),`${l}:${d<10?"0":""}${d} ${a}`}function zR(n){let r=b1(n.open),i=b1(n.close);return`${r} - ${i}`}function xH(n){let r=b1(n.open),i=b1(n.close);return`${r} to ${i}`}function CH(n){let r=new Date,i=new Date(r);jR(i);let l=w1(i),d=n[l];if(d&&d.length>0){for(let a of d)if(FR(a.open)&&FR(a.close)){let I=NR(a.open,i),R=NR(a.close,i);if(I>R&&SH(R),r>=I&&r<=R)return!0}}return!1}function jR(n){let r=n.getDate();n.setDate(r-1)}function SH(n){let r=n.getDate();n.setDate(r+1)}function EH(n){let i=w1(new Date),l=n[i];return l&&l.length>0}function FR(n){return/^([0-9]|0[0-9]|1[0-9]|2[0-4]):[0-5][0-9]$/.test(n)}function NR(n,r){let[i,l]=n.split(":").map(Number),d=r?new Date(r):new Date;return new Date(d.getFullYear(),d.getMonth(),d.getDate(),i,l,0,0)}function IH(n){return n.sort((r,i)=>r.open.localeCompare(i.open))}function DH(n){let i=w1(new Date),l=n[i];return l&&l.length>0?BR(l):""}function TH(n){let r=new Date;jR(r);let i=w1(r),l=n[i];return l&&l.length>0?BR(l):""}function MH(n){let r=PH(n);return`Open on ${_1(r)}`}function BR(n){return n.length===1?zR(n[0]):(IH(n),n.map(xH).join(" - "))}function PH(n){let i=new Date().getDay();for(let l=0;l<7;l++){let d=(i+l)%7,a=wH(d),I=n[a];if(I&&I.length>0)return a}return"mo"}function VR(n){return CH(n)?TH(n):EH(n)?DH(n):MH(n)}function UR(n){let r=["mo","tu","we","th","fr","sa","su"],i=R=>{let L=n[R];return!L||L.length===0?["Closed"]:L.map(H=>zR(H))},l=(R,L)=>R.length!==L.length?!1:R.every((H,K)=>H===L[K]),d=(R,L)=>R===L?_1(R):`${_1(R)} - ${_1(L)}`,a=[],I=0;for(;I<r.length;){let R=r[I],L=i(R),H=I+1;for(;H<r.length&&l(L,i(r[H]));)H++;let K=d(R,r[H-1]);a.push({day:K,schedule:L}),I=H}if(a.length>1){let R=a[0],L=a[a.length-1];if(l(R.schedule,L.schedule)){let H=R.day.split(" - "),W=L.day.split(" - ")[0],Q=H.length>1?H[1]:H[0],Y=`${W} - ${Q}`;a[0]={day:Y,schedule:R.schedule},a.pop()}}return a}function AH(n,r){if(n&1&&Tt(0,"div",9),n&2){let i=r.$implicit;Rt("innerHTML",i,Vd)}}function kH(n,r){if(n&1&&(rt(0,"div",6)(1,"div",7),en(2),at(),rt(3,"div",8),Ki(4,AH,1,1,"div",9,Qs),at()()),n&2){let i=r.$implicit;st(2),So(i.day),st(2),Xi(i.schedule)}}var x1=class n{iconLibrary=Me(Wn);schedules=cr.required({transform:r=>r?UR(r):[]});closeClicked=vs();faClockThree=this.iconLibrary.getIconDefinition("fas","clock-three");faXmark=this.iconLibrary.getIconDefinition("fas","xmark");hideModal(){this.closeClicked.emit()}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-other-schedules"]],inputs:{schedules:[1,"schedules"]},outputs:{closeClicked:"closeClicked"},decls:11,vars:2,consts:[[1,"other-schedules-container"],[1,"other-schedules-header"],[1,"other-schedules-title"],[3,"icon"],[1,"close-button",3,"click"],[1,"schedules"],[1,"schedule"],[1,"schedule-day"],[1,"schedule-time"],[1,"schedule-time-item",3,"innerHTML"]],template:function(i,l){i&1&&(rt(0,"div",0)(1,"div",1)(2,"div",2),Tt(3,"fa-icon",3),rt(4,"h2"),en(5,"Other Schedules"),at()(),rt(6,"button",4),rn("click",function(){return l.hideModal()}),Tt(7,"fa-icon",3),at()(),rt(8,"div",5),Ki(9,kH,6,1,"div",6,Qs),at()()),i&2&&(st(3),Rt("icon",l.faClockThree),st(4),Rt("icon",l.faXmark),st(2),Xi(l.schedules()))},dependencies:[wr],styles:[".other-schedules-container[_ngcontent-%COMP%]{padding:16px;background-color:var(--definitions-colors-background-50);box-shadow:var(--definitions-shadows-general)}.other-schedules-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.other-schedules-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.other-schedules-title[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;color:var(--definitions-colors-text-900);font:var(--definitions-textFonts-desktop-sub-2);font-family:inherit}@container mapvx-container (width <= 640px){.other-schedules-title[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:16px}}.other-schedules-title[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-primary-600);font-size:32px}@container mapvx-container (width <= 640px){.other-schedules-title[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px}}.close-button[_ngcontent-%COMP%]{padding:0;background:none;border:none;cursor:pointer}.close-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px}.schedules[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px;background-color:#fff}.schedule[_ngcontent-%COMP%]{display:flex;gap:40px;align-items:center;justify-content:space-between}.schedule-times[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.schedule-time[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:end}.schedule-time-item[_ngcontent-%COMP%]{color:var(--definitions-colors-text-800);font:var(--definitions-textFonts-desktop-sub-5);font-family:inherit}@container mapvx-container (width <= 640px){.schedule-time-item[_ngcontent-%COMP%]{font-size:12px;font-weight:400}}"]})};var RH=()=>({rotate:42});function OH(n,r){if(n&1&&Tt(0,"fa-icon",3),n&2){let i=qt();Rt("icon",i.faCircleNotch)("transform",Eu(2,RH))}}function LH(n,r){if(n&1){let i=Fr();rt(0,"div",10),Tt(1,"fa-icon",9),rt(2,"div",24)(3,"button",25),rn("click",function(){pr(i);let d=qt();return mr(d.showOtherSchedulesModal())}),at(),rt(4,"div",26),en(5,"*Hours may vary"),at()()()}if(n&2){let i=qt();st(),Rt("icon",i.faClockThree),st(2),Rt("innerHTML",i.schedule(),Vd)}}function FH(n,r){if(n&1){let i=Fr();rt(0,"div",11)(1,"app-other-schedules",27),rn("closeClicked",function(){pr(i);let d=qt();return mr(d.hideOtherSchedulesModal())}),at()()}if(n&2){let i=qt();st(),Rt("schedules",i.place().openingHours)}}function NH(n,r){if(n&1&&Tt(0,"div",31),n&2){let i=r.$implicit;Rt("innerHTML",i,Vd)}}function zH(n,r){if(n&1&&(rt(0,"div",12)(1,"div",28),Tt(2,"fa-icon",9),rt(3,"div",29),en(4,"Deals + Events"),at()(),rt(5,"div",30),Ki(6,NH,1,1,"div",31,Qs),at()()),n&2){let i=qt();st(2),Rt("icon",i.faBadgeDollar),st(4),Xi(i.banners())}}function jH(n,r){if(n&1&&(rt(0,"div",21),en(1),at()),n&2){let i=qt();st(),Ji(" ",i.address()," ")}}function BH(n,r){if(n&1&&(rt(0,"div",22),en(1),at()),n&2){let i=r.$implicit;st(),Ji(" ",i," ")}}function VH(n,r){if(n&1&&(rt(0,"div",23)(1,"a",18),en(2),at()()),n&2){let i=r.$implicit;st(),Rt("href",i.url,yf),st(),So(i.title)}}var C1=class n{iconLibrary=Me(Wn);sanitizer=Me(ty);logger=Me(qn);navigatorService=Me(Eo);stateService=Me(fi);place=cr.required();hideDeals=cr(!1);imageSrc=tn(()=>this.place().images[0]||s1);isImageLoading=sn(!0);schedule=tn(()=>{let r=this.place().openingHours;return r?VR(r):""});banners=tn(()=>this.place().banners.filter(a1).filter(r=>r.description!==void 0).map(r=>this.sanitizer.bypassSecurityTrustHtml(r.description||"")));address=tn(()=>this.place().address||"");phones=tn(()=>this.place().properties?.filter(r=>r.type==="phone").map(r=>this.formatPhoneNumber(r.subtitle))||[]);websites=tn(()=>this.place().properties?.filter(r=>r.type==="url").map(this.prepareUrl)||[]);drivingDirectionsUrl=tn(()=>{let r=this.place();return`https://www.google.com/maps/dir/?api=1&destination=${r.position.lat},${r.position.lng}&travelmode=driving`});otherSchedulesModal=sn(!1);faCircleNotch=this.iconLibrary.getIconDefinition("fas","circle-notch");faBadgeDollar=this.iconLibrary.getIconDefinition("fas","badge-dollar");faClockThree=this.iconLibrary.getIconDefinition("fas","clock-three");faArrowTopRight=this.iconLibrary.getIconDefinition("fak","arrow-top-right");iconCategory=tn(()=>{let[r,i]=e1(this.place().localizedCategory||"");return this.iconLibrary.getIconDefinition(r,i)});constructor(){Hn(()=>{this.imageSrc()&&this.startImageLoading()})}prepareUrl(r){return nr(Lt({},r),{url:r.url?.startsWith("http")?r.url:`https://${r.url}`})}startImageLoading(){this.isImageLoading.set(!0)}endImageLoading(){this.isImageLoading.set(!1)}showOtherSchedulesModal(){this.otherSchedulesModal.set(!0)}hideOtherSchedulesModal(){this.otherSchedulesModal.set(!1)}formatPhoneNumber(r){let i=r.replace(/^\+1/,"");return i=i.replaceAll(/\D/g,""),i.length<10?(this.logger.logWarning(`Phone number '${i}' is to short for format`),i):`${i.slice(0,3)}.${i.slice(3,6)}.${i.slice(6)}`}navigateToRoute(){this.stateService.userAction.next({type:"select-destination",data:{destinationId:this.place().lazarilloId,alias:this.place().clientId}}),this.navigatorService.navigateToRoute(this.place().lazarilloId)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-profile-view"]],inputs:{place:[1,"place"],hideDeals:[1,"hideDeals"]},decls:34,vars:15,consts:[[1,"profile-view-content"],[1,"image"],[3,"load","error","src","alt"],[1,"loading-icon",3,"icon","transform"],[1,"info"],[1,"basic-info"],[1,"title"],[1,"category-schedule"],[1,"category"],[3,"icon"],[1,"schedule"],[1,"other-schedules-modal"],[1,"deals-or-events"],[1,"description"],[1,"direction-buttons"],[1,"route-button-container"],[1,"route-button",3,"click"],[1,"driving-link"],["target","_blank",3,"href"],[1,"properties"],[1,"separator"],[1,"address"],[1,"phone"],[1,"website"],[1,"schedule-time"],[1,"schedule-button",3,"click","innerHTML"],[1,"schedule-warning"],[3,"closeClicked","schedules"],[1,"deals-or-events-header"],[1,"deals-or-events-content-title"],[1,"deals-or-events-content"],[1,"banner-content",3,"innerHTML"]],template:function(i,l){i&1&&(rt(0,"div",0)(1,"div",1)(2,"img",2),rn("load",function(){return l.endImageLoading()})("error",function(){return l.endImageLoading()}),at(),Rn(3,OH,1,3,"fa-icon",3),at(),rt(4,"div",4)(5,"div",5)(6,"h1",6),en(7),at(),rt(8,"div",7)(9,"div",8),Tt(10,"fa-icon",9),rt(11,"span"),en(12),at()(),Rn(13,LH,6,2,"div",10),Rn(14,FH,2,1,"div",11),at(),Rn(15,zH,8,1,"div",12),rt(16,"div",13),en(17),at()(),rt(18,"div",14)(19,"div",15)(20,"button",16),rn("click",function(){return l.navigateToRoute()}),Tt(21,"fa-icon",9),rt(22,"span"),en(23,"Pedestrian-friendly directions"),at()()(),rt(24,"div",17)(25,"a",18),en(26,"Driving directions"),at()()(),rt(27,"div",19),Tt(28,"div",20),Rn(29,jH,2,1,"div",21),Ki(30,BH,2,1,"div",22,Qs),Ki(32,VH,3,2,"div",23,Qs),at()()()),i&2&&(st(),ii("loading",l.isImageLoading()),st(),Rt("src",l.imageSrc(),yf)("alt",l.place().title),st(),On(l.isImageLoading()?3:-1),st(4),So(l.place().title),st(3),Rt("icon",l.iconCategory()),st(2),So(l.place().localizedCategory),st(),On(l.schedule()!==""?13:-1),st(),On(l.otherSchedulesModal()?14:-1),st(),On(l.banners().length>0&&!l.hideDeals()?15:-1),st(2),Ji(" ",l.place().description," "),st(4),Rt("icon",l.faArrowTopRight),st(4),Rt("href",l.drivingDirectionsUrl(),yf),st(4),On(l.address()!==""?29:-1),st(),Xi(l.phones()),st(2),Xi(l.websites()))},dependencies:[wr,x1],styles:['.profile-view-content[_ngcontent-%COMP%]{display:flex;padding:0 16px;flex-direction:column;align-items:center;gap:16px}@container mapvx-container (width <= 1024px){.profile-view-content[_ngcontent-%COMP%]{padding:22px 0 0}}@container mapvx-container (width <= 640px){.profile-view-content[_ngcontent-%COMP%]{padding:22px 0 0}}.image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:block;width:100%;object-fit:cover;aspect-ratio:1/1}.image.loading[_ngcontent-%COMP%]{background-color:var(--definitions-colors-primary-300);height:200px;width:100%;display:flex;justify-content:center;align-items:center}.image.loading[_ngcontent-%COMP%] .loading-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-primary-600);font-size:100px}.image.loading[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:none}.info[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:24px;width:100%}.basic-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:16px;width:100%}.title[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-h6);font-family:inherit;margin:0;color:var(--definitions-colors-text-black)}.category-schedule[_ngcontent-%COMP%]{display:flex;width:100%;justify-content:space-between;flex-wrap:wrap;position:relative}.category[_ngcontent-%COMP%]{display:flex;gap:18px;color:var(--definitions-colors-text-grey);align-items:center}.category[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px}.category[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-body-3);font-family:inherit;font-size:16px}.schedule[_ngcontent-%COMP%]{display:flex;gap:18px;align-items:center}.schedule[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-primary-600);font-size:20px}.schedule[_ngcontent-%COMP%] .schedule-time[_ngcontent-%COMP%]{position:relative}.schedule[_ngcontent-%COMP%] .schedule-time[_ngcontent-%COMP%] .schedule-button[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-3);font-family:inherit;font-size:16px;color:var(--definitions-colors-secondary-blue);border:none;background:none;cursor:pointer}.schedule[_ngcontent-%COMP%] .schedule-time[_ngcontent-%COMP%] .schedule-warning[_ngcontent-%COMP%]{position:absolute;top:20px;left:0;font:var(--definitions-textFonts-desktop-sub-5);font-family:inherit;font-size:16px;color:var(--definitions-colors-text-black)}.other-schedules-modal[_ngcontent-%COMP%]{position:absolute;width:max-content;bottom:0;right:50%;transform:translate(50%) translateY(100%)}.deals-or-events[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:8px;width:100%}.deals-or-events-header[_ngcontent-%COMP%]{display:flex;width:100%;align-items:flex-start;gap:18px;color:var(--definitions-colors-secondary-orange)}.deals-or-events-header[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px}.deals-or-events-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:8px}.deals-or-events-content-title[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-sub-4);font-family:inherit;font-size:16px}.banner-content[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-orange);padding:5px;font:var(--definitions-textFonts-desktop-body-3);font-family:inherit;font-size:16px;white-space:pre-wrap;border:1px solid var(--definitions-colors-secondary-orange);border-radius:8px;box-shadow:var(--definitions-shadows-general)}.description[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-body-2);font-family:inherit;color:var(--definitions-colors-text-black)}.direction-buttons[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:16px;align-self:stretch;width:100%}.route-button-container[_ngcontent-%COMP%]{width:100%}.route-button[_ngcontent-%COMP%]{display:flex;padding:8px 16px;justify-content:center;align-items:center;gap:10px;align-self:stretch;background:var(--definitions-colors-primary-black);color:var(--definitions-colors-text-white);border:none;cursor:pointer;width:100%}.route-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-2);font-family:inherit;font-size:16px;font-feature-settings:"liga" off,"clig" off}.driving-link[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-blue);text-decoration:none;font:var(--definitions-textFonts-desktop-button-2);font-family:inherit;font-size:16px;font-feature-settings:"liga" off,"clig" off}.properties[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:16px;width:100%}.separator[_ngcontent-%COMP%]{width:100%;height:1px;background:var(--definitions-colors-primary-100)}.address[_ngcontent-%COMP%], .phone[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-sub-1);font-family:inherit;font-size:16px;color:var(--definitions-colors-text-black)}.website[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-1);font-family:inherit;font-size:16px;font-feature-settings:"liga" off,"clig" off}.website[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-blue);text-decoration:none}']})};var UH=["backButton",""],pm=class n{iconLibraryService=Me(Wn);faArrowLeft=this.iconLibraryService.getIconDefinition("fas","arrow-left");static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["button","backButton",""]],attrs:UH,decls:3,vars:1,consts:[[3,"icon"]],template:function(i,l){i&1&&(Tt(0,"fa-icon",0),rt(1,"span"),en(2,"Back"),at()),i&2&&Rt("icon",l.faArrowLeft)},dependencies:[wr],styles:['[_nghost-%COMP%]{display:flex;justify-content:center;align-items:center;gap:12px;color:var(--definitions-colors-secondary-blue);border:none;background:none}[_nghost-%COMP%]:hover{cursor:pointer}[_nghost-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:24px}[_nghost-%COMP%] span[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-blue);font:var(--definitions-textFonts-desktop-button-1);font-family:inherit;font-feature-settings:"liga" off,"clig" off;letter-spacing:-1px}']})};function $H(n,r){if(n&1&&Tt(0,"app-profile-view",5),n&2){let i=qt(),l=qg(6);Rt("place",l)("hideDeals",i.hideDeals())}}var S1=class n{onDestroy=new fr;route=Me(Ba);logger=Me(qn);loadedDataService=Me(oi);sdkService=Me(ea);mapService=Me(yi);markerService=Me(qo);navigatorService=Me(Eo);homeStateService=Me(fi);iconLibraryService=Me(Wn);_profileId="";place=sn(null);mapReady=uo(this.mapService.mapReady,{requireSync:!0});hideDeals=tn(()=>this.homeStateService.hideDeals());faArrowLeft=this.iconLibraryService.getIconDefinition("fas","arrow-left");constructor(){Hn(()=>{let r=this.place();if(r&&this.mapReady()){let l=r.inFloors?.[0];if(l&&this.mapService.updateFloor(l),!this.markerService.hasMarker(r.lazarilloId)){let d=$o(this.homeStateService.lastListedPlaces);d.length>0?this.markerService.addMarkers(d):this.markerService.addMarker(r)}this.markerService.selectMarker(r.lazarilloId),setTimeout(()=>{this.mapService.updateCamera({center:r.position})},100)}})}ngOnInit(){this.addBackListener();let r=this.route.paramMap.pipe(Tn(i=>i.get("id")),Oi(i=>i!==null),Oi(i=>i!==this._profileId),Xb(1));Oa([r,this.loadedDataService.getAvailablePlaces()]).pipe(rs(this.onDestroy),Wi(([i,l])=>{let d=l.find(a=>a.lazarilloId===i||a.clientId===i);return d?Cn(d):ri(this.sdkService.getPlaceDetail(i))})).subscribe({next:i=>{this._profileId!==i.lazarilloId&&this.cleanOldProfile(),this._profileId=i.lazarilloId,this.place.set(i),this.homeStateService.userAction.next({type:"show-place",data:{placeId:i.lazarilloId,alias:i.clientId}})},error:i=>{this.logger.log("Error getting profile id",i)},complete:()=>{this.logger.log("Profile id complete")}})}ngOnDestroy(){this.removeBackListener(),this.cleanOldProfile(),this.onDestroy.next(),this.onDestroy.complete()}cleanOldProfile(){this._profileId!==""&&this.markerService.deselectMarker(this._profileId)}returnToHome(){this.homeStateService.userAction.next({type:"return-to-home",data:{filter:this.homeStateService.selectedFilter()}}),this.navigatorService.navigateToHome()}backListener(r){this.logger.log("Back listener",r),this.returnToHome()}listener=r=>this.backListener(r);addBackListener(){globalThis.addEventListener("popstate",this.listener)}removeBackListener(){globalThis.removeEventListener("popstate",this.listener)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-profile-screen"]],decls:10,vars:2,consts:[[1,"screen"],[1,"back-button"],["backButton","",3,"click"],[1,"profile-screen-content"],[1,"profile-info"],[3,"place","hideDeals"],[1,"map"]],template:function(i,l){if(i&1){let d=Fr();rt(0,"div",0)(1,"div",1)(2,"button",2),rn("click",function(){return pr(d),mr(l.returnToHome())}),en(3,"Back"),at()(),rt(4,"div",3)(5,"div",4),Zp(6),Rn(7,$H,1,2,"app-profile-view",5),at(),rt(8,"div",6),Tt(9,"app-map"),at()()()}if(i&2){st(6);let d=Hg(l.place());st(),On(d!==null?7:-1)}},dependencies:[Qd,pm,C1],styles:[".screen[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:18px}.profile-screen-content[_ngcontent-%COMP%]{display:flex;width:100%}@container mapvx-container (width <= 1024px){.profile-screen-content[_ngcontent-%COMP%]{flex-direction:column-reverse}}@container mapvx-container (width <= 640px){.profile-screen-content[_ngcontent-%COMP%]{flex-direction:column-reverse}}.profile-info[_ngcontent-%COMP%]{display:flex;width:432px;flex-shrink:0}.profile-info[_ngcontent-%COMP%] app-profile-view[_ngcontent-%COMP%]{width:100%}@container mapvx-container (width <= 1024px){.profile-info[_ngcontent-%COMP%]{width:100%}}.map[_ngcontent-%COMP%]{width:100%;min-height:730px}@container mapvx-container (width <= 1024px){.map[_ngcontent-%COMP%]{height:730px}}@container mapvx-container (width <= 640px){.map[_ngcontent-%COMP%]{width:100%;min-height:unset;height:400px}}"],changeDetection:0})};function GH(n,r){if(n&1){let i=Fr();rt(0,"button",1),rn("click",function(){pr(i);let d=qt();return mr(d.pauseRoute())}),Tt(1,"fa-icon",2),rt(2,"span"),en(3,"Pause route"),at()()}if(n&2){let i=qt();st(),Rt("icon",i.faPause)}}function HH(n,r){if(n&1){let i=Fr();rt(0,"button",1),rn("click",function(){pr(i);let d=qt();return mr(d.resumeRoute())}),Tt(1,"fa-icon",2),rt(2,"span"),en(3,"Resume route"),at()()}if(n&2){let i=qt();st(),Rt("icon",i.faPlay)}}function qH(n,r){if(n&1){let i=Fr();rt(0,"button",1),rn("click",function(){pr(i);let d=qt();return mr(d.restartRoute())}),Tt(1,"fa-icon",2),rt(2,"span"),en(3,"Restart route"),at()()}if(n&2){let i=qt();st(),Rt("icon",i.faRestart)}}function WH(n,r){}var E1=class n{iconLibrary=Me(Wn);routingService=Me(Sc);restartRouteCallback=vs();AnimationState=t1;animationStatus=uo(this.routingService.animationStatusSubject,{initialValue:0});faPlay=this.iconLibrary.getIconDefinition("fas","play");faPause=this.iconLibrary.getIconDefinition("fas","pause");faRestart=this.iconLibrary.getIconDefinition("fas","rotate-right");pauseRoute(){this.routingService.pauseRouteAnimation()}resumeRoute(){this.routingService.resumeRouteAnimation()}restartRoute(){this.routingService.restartRouteAnimation(),this.restartRouteCallback.emit()}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-route-control-button"]],outputs:{restartRouteCallback:"restartRouteCallback"},decls:4,vars:1,consts:[[1,"route-control-button"],[1,"route-control-button",3,"click"],[3,"icon"]],template:function(i,l){if(i&1&&Rn(0,GH,4,1,"button",0)(1,HH,4,1,"button",0)(2,qH,4,1,"button",0)(3,WH,0,0),i&2){let d;On((d=l.animationStatus())===l.AnimationState.Playing?0:d===l.AnimationState.Paused?1:d===l.AnimationState.Finished?2:3)}},dependencies:[wr],styles:["[_nghost-%COMP%]{position:absolute;top:20px;left:500px}@container mapvx-container (width <= 1024px){[_nghost-%COMP%]{top:90px;left:unset;right:20px}}.route-control-button[_ngcontent-%COMP%]{display:flex;width:180px;height:45px;justify-content:center;align-items:center;gap:10px;background:var(--definitions-colors-background-white);color:var(--definitions-colors-text-black);box-shadow:var(--definitions-shadows-general);border:none;cursor:pointer}@container mapvx-container (width <= 1024px){.route-control-button[_ngcontent-%COMP%]{width:45px}}.route-control-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:16px}.route-control-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-5);font-family:inherit}@container mapvx-container (width <= 1024px){.route-control-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:none}}"]})};var I1=class n{iconLibrary=Me(Wn);currentRoute=cr.required();startRouteClick=vs();faCircleSmall=this.iconLibrary.getIconDefinition("fas","circle-small");faArrowTopRight=this.iconLibrary.getIconDefinition("fak","arrow-top-right");time=tn(()=>{let r=this.currentRoute();return this.toMinutes(r.duration)});distance=tn(()=>{let r=this.currentRoute();return Math.ceil(r.length*3.28084)});toMinutes(r){return Math.ceil(r/60)}onStartRouteClick(){this.startRouteClick.emit()}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-route-info"]],inputs:{currentRoute:[1,"currentRoute"]},outputs:{startRouteClick:"startRouteClick"},decls:17,vars:5,consts:[[1,"route-info"],[1,"route-info-item"],[1,"route-info-item-label"],[3,"icon"],[1,"route-info-item-value"],[1,"start-route-button",3,"click"]],template:function(i,l){i&1&&(rt(0,"div",0)(1,"div",1)(2,"span",2),en(3,"Time"),at(),Tt(4,"fa-icon",3),rt(5,"span",4),en(6),at()(),rt(7,"div",1)(8,"span",2),en(9,"Distance"),at(),Tt(10,"fa-icon",3),rt(11,"span",4),en(12),at()()(),rt(13,"button",5),rn("click",function(){return l.onStartRouteClick()}),Tt(14,"fa-icon",3),rt(15,"span"),en(16,"Start Route"),at()()),i&2&&(st(4),Rt("icon",l.faCircleSmall),st(2),Ji("",l.time()," min"),st(4),Rt("icon",l.faCircleSmall),st(2),Ji("",l.distance()," ft"),st(2),Rt("icon",l.faArrowTopRight))},dependencies:[wr],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:40px}.route-info[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap}.route-info-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;color:var(--definitions-colors-text-black)}.start-route-button[_ngcontent-%COMP%]{display:flex;padding:8px 16px;justify-content:center;align-items:center;gap:10px;background-color:var(--definitions-colors-primary-900);color:var(--definitions-colors-text-50);border:none;cursor:pointer;width:100%}.start-route-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-2);font-family:inherit;font-feature-settings:"liga" off,"clig" off;line-height:15px}.start-route-button[_ngcontent-%COMP%]{display:none}']})};var ZH={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},pye=nr(Lt({},ZH),{"[class.ng-submitted]":"isSubmitted"});var YH=new yn("",{providedIn:"root",factory:()=>$R}),$R="always";var KH=(()=>{class n{static \u0275fac=function(l){return new(l||n)};static \u0275mod=yc({type:n});static \u0275inj=vl({})}return n})();var GR=(()=>{class n{static withConfig(i){return{ngModule:n,providers:[{provide:YH,useValue:i.callSetDisabledState??$R}]}}static \u0275fac=function(l){return new(l||n)};static \u0275mod=yc({type:n});static \u0275inj=vl({imports:[KH]})}return n})();function XH(n,r){if(n&1){let i=Fr();rt(0,"button",5),rn("click",function(){pr(i);let d=qt();return mr(d.clearSelectedPlace())}),Tt(1,"fa-icon",6),at()}if(n&2){let i=qt();st(),Rt("icon",i.faXmark)}}function JH(n,r){if(n&1){let i=Fr();rt(0,"button",10),rn("click",function(){pr(i);let d=qt(2);return mr(d.useCurrentLocation())}),rt(1,"div",11),Tt(2,"fa-icon",6),at(),rt(3,"div",12)(4,"div",13),en(5,"Use current location"),at()()()}if(n&2){let i=qt(2);st(2),Rt("icon",i.faLocationArrow)}}function QH(n,r){if(n&1){let i=Fr();rt(0,"button",10),rn("click",function(){let d=pr(i).$implicit,a=qt(2);return mr(a.selectPlace(d))}),rt(1,"div",11),Tt(2,"fa-icon",6),at(),rt(3,"div",12)(4,"div",13),en(5),at(),rt(6,"div",14),en(7),at()()()}if(n&2){let i=r.$implicit,l=qt(2);st(2),Rt("icon",l.faLocationDot),st(3),So(i.title),st(2),So(i.address)}}function eq(n,r){n&1&&(rt(0,"div",9),en(1,"No results found"),at())}function tq(n,r){if(n&1&&(rt(0,"div",4)(1,"div",7),Rn(2,JH,6,1,"button",8),Ki(3,QH,8,3,"button",8,Qs),Rn(5,eq,2,0,"div",9),at()()),n&2){let i=qt();st(2),On(i.allowCurrentLocation()&&i.locationPermission()!=="denied"?2:-1),st(),Xi(i.filteredPlaces()),st(2),On(i.filteredPlaces().length===0&&i.filterText().trim()?5:-1)}}var D1=class n{logger=Me(qn);locationService=Me(Jd);iconLibrary=Me(Wn);places=cr.required();initialSelectedPlace=cr(null);allowCurrentLocation=cr(!1);placeholder=cr("Set a starting point");selectedPlace=Go(()=>this.initialSelectedPlace());selectedPlaceChange=vs();isDropdownOpen=sn(!1);filterText=Go(()=>this.selectedPlace()?.title||"");filteredPlaces=tn(()=>{let r=this.places(),i=this.filterText().toLowerCase().trim();return i?r.filter(l=>l.title?.toLowerCase().includes(i)||l.address?.toLowerCase().includes(i)):r});locationPermission=sn("prompt");faLocationDot=this.iconLibrary.getIconDefinition("fas","location-dot");faLocationArrow=this.iconLibrary.getIconDefinition("fas","location-arrow");faXmark=this.iconLibrary.getIconDefinition("fas","xmark");constructor(){this.checkLocationPermission()}checkLocationPermission(){this.locationService.checkLocationPermission().then(r=>{this.locationPermission.set(r)}).catch(r=>{this.logger.logWarning("Error checking location permission",r),this.locationPermission.set("denied")})}requestLocationPermission(){this.locationService.requestLocationPermission().then(r=>{this.locationPermission.set(r),r==="granted"&&this.getCurrentLocation()}).catch(r=>{this.logger.logWarning("Error requesting location permission",r),this.locationPermission.set("denied")})}getCurrentLocation(){this.locationService.getCurrentLocation().then(r=>{this.selectedPlace.set(r),this.selectedPlaceChange.emit(r)}).catch(r=>{this.logger.logWarning("Error getting current location",r)})}useCurrentLocation(){switch(this.locationPermission()){case"granted":this.getCurrentLocation();break;case"prompt":this.requestLocationPermission();break}}selectPlace(r){this.selectedPlace.set(r),this.isDropdownOpen.set(!1),this.selectedPlaceChange.emit(r)}clearSelectedPlace(){this.selectedPlace.set(null),this.filterText.set(""),this.selectedPlaceChange.emit(null)}onInputFocus(){this.isDropdownOpen.set(!0)}onInputBlur(){setTimeout(()=>{this.isDropdownOpen.set(!1)},150)}onInputChange(r){let i=r.target;this.filterText.set(i.value),this.isDropdownOpen.set(!0)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-place-selector"]],inputs:{places:[1,"places"],initialSelectedPlace:[1,"initialSelectedPlace"],allowCurrentLocation:[1,"allowCurrentLocation"],placeholder:[1,"placeholder"]},outputs:{selectedPlaceChange:"selectedPlaceChange"},decls:5,vars:4,consts:[[1,"place-selector"],[1,"input-container"],["type","text","name","place-input",1,"place-input",3,"input","focus","blur","value","placeholder"],[1,"clear-button"],[1,"dropdown-container"],[1,"clear-button",3,"click"],[3,"icon"],[1,"dropdown-list"],["type","button",1,"place-option"],[1,"no-results"],["type","button",1,"place-option",3,"click"],[1,"place-icon"],[1,"place-info"],[1,"place-title"],[1,"place-address"]],template:function(i,l){i&1&&(rt(0,"div",0)(1,"div",1)(2,"input",2),rn("input",function(a){return l.onInputChange(a)})("focus",function(){return l.onInputFocus()})("blur",function(){return l.onInputBlur()}),at(),Rn(3,XH,2,1,"button",3),at(),Rn(4,tq,6,2,"div",4),at()),i&2&&(st(2),Rt("value",l.filterText())("placeholder",l.placeholder()),st(),On(l.selectedPlace()?3:-1),st(),On(l.isDropdownOpen()?4:-1))},dependencies:[Hd,GR,wr],styles:['[_nghost-%COMP%]{width:100%}.place-selector[_ngcontent-%COMP%]{position:relative;width:100%}.input-container[_ngcontent-%COMP%]{width:100%;display:flex}.place-input[_ngcontent-%COMP%]{width:100%;border:none;font:var(--definitions-textFonts-desktop-button-1);font-family:inherit;font-feature-settings:"liga" off,"clig" off;letter-spacing:-1px;text-overflow:ellipsis;outline:none;color:var(--definitions-colors-text-black)}.place-input[_ngcontent-%COMP%]::placeholder{color:var(--definitions-colors-primary-300)}.clear-button[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:16px;color:var(--definitions-colors-text-900)}.dropdown-container[_ngcontent-%COMP%]{position:absolute;top:100%;left:0;right:0;z-index:10;margin-top:4px}.dropdown-list[_ngcontent-%COMP%]{background:var(--definitions-colors-background-50);border-radius:8px;box-shadow:var(--definitions-shadows-general);max-height:300px;overflow-y:auto;border:1px solid var(--definitions-colors-gray-200)}.place-option[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:4px;padding:15px 24px;cursor:pointer;transition:background-color .2s ease;border-bottom:1px solid #f5f5f5;background:none;border:none;width:100%;text-align:left}.place-option[_ngcontent-%COMP%]:last-child{border-bottom:none}.place-option[_ngcontent-%COMP%]:hover{background-color:#f8f9fa}.place-option[_ngcontent-%COMP%]:active{background-color:#e9ecef}.place-option[_ngcontent-%COMP%]:focus{outline:2px solid #5D5D5D;outline-offset:-2px}.place-icon[_ngcontent-%COMP%]{flex-shrink:0;width:19.341px;height:19.341px;margin-top:2px;color:var(--definitions-colors-primary-600)}.place-info[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:4px;min-width:0}.place-title[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-3);font-family:inherit;color:var(--definitions-colors-text-900);word-wrap:break-word}.place-address[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-body-3);font-family:inherit;color:var(--definitions-colors-text-800);word-wrap:break-word}.no-results[_ngcontent-%COMP%]{padding:20px 24px;text-align:center;font:var(--definitions-textFonts-desktop-body-3);font-family:inherit;color:var(--definitions-colors-text-800)}@media (width <= 768px){.place-option[_ngcontent-%COMP%]{padding:12px 20px}.place-title[_ngcontent-%COMP%]{font-size:15px}.place-address[_ngcontent-%COMP%]{font-size:13px}}']})};var T1=class n{logger=Me(qn);iconLibrary=Me(Wn);places=cr.required();initialDestination=cr(null);originPlace=sn(null);destinationPlace=Go(()=>this.initialDestination());originSelected=vs();destinationSelected=vs();swapPlaces=vs();clearDestination=vs();locationPermission=sn("prompt");faLocationDot=this.iconLibrary.getIconDefinition("fas","location-dot");faEllipsisVertical=this.iconLibrary.getIconDefinition("fas","ellipsis-vertical");faArrowsRetweet=this.iconLibrary.getIconDefinition("fas","arrows-retweet");canSwapPlaces=tn(()=>tC(this.originPlace())&&tC(this.destinationPlace()));onOriginSelected(r){this.originSelected.emit(r),this.originPlace.set(r)}onDestinationSelected(r){if(eC(r)){this.logger.logWarning("Current location is not allowed as destination");return}this.destinationSelected.emit(r),this.destinationPlace.set(r)}onSwapPlaces(){let r=this.originPlace(),i=this.destinationPlace();if(eC(r)){this.logger.logWarning("Should not be possible to swap places with current location as origin");return}this.originPlace.set(i),this.originSelected.emit(i),this.destinationPlace.set(r),this.destinationSelected.emit(r)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-route-selector"]],inputs:{places:[1,"places"],initialDestination:[1,"initialDestination"]},outputs:{originSelected:"originSelected",destinationSelected:"destinationSelected",swapPlaces:"swapPlaces",clearDestination:"clearDestination"},decls:20,vars:10,consts:[[1,"route-selector"],[1,"routing-option","origin"],[1,"place-info"],[1,"place-icon"],["xmlns","http://www.w3.org/2000/svg","width","36","height","36","viewBox","0 0 36 36","fill","none"],["width","36","height","36","rx","18","fill","#8DC8FF"],["d","M29.2517 17.7595C29.1117 23.9741 23.9602 28.8986 17.7456 28.7586C11.5309 28.6185 6.60648 23.4671 6.74649 17.2524C6.8865 11.0378 12.038 6.11332 18.2526 6.25333C24.4673 6.39334 29.3917 11.5448 29.2517 17.7595Z","fill","#2C57A0"],["d","M13.5364 22.4764C13.4259 22.5279 13.3135 22.5415 13.199 22.5173C13.0847 22.4932 12.9902 22.4373 12.9155 22.3496C12.8298 22.2721 12.7772 22.1766 12.7577 22.0629C12.7384 21.9495 12.7519 21.8395 12.7982 21.7327L17.6404 11.5662C17.7437 11.3532 17.9102 11.2493 18.1399 11.2545C18.3697 11.2597 18.5313 11.371 18.6249 11.5884L23.0044 21.9626C23.0458 22.0714 23.0543 22.182 23.03 22.2944C23.0054 22.407 22.9485 22.5001 22.8594 22.5736C22.7808 22.6579 22.6839 22.7095 22.5687 22.7283C22.4532 22.7475 22.3415 22.7288 22.2335 22.6723L17.9278 20.6691L13.5364 22.4764ZM14.4251 20.9295L17.954 19.5064L21.4153 21.087L18.0981 13.1117L14.4251 20.9295Z","fill","white"],[3,"selectedPlaceChange","places","initialSelectedPlace","allowCurrentLocation"],[1,"connector-line"],[1,"connector-dots"],[3,"icon"],[1,"connector-line-element"],["type","button",1,"swap-button",3,"click","disabled"],[1,"routing-option","destination"],[3,"selectedPlaceChange","places","initialSelectedPlace","placeholder"]],template:function(i,l){i&1&&(rt(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),s0(),rt(4,"svg",4),Tt(5,"rect",5)(6,"path",6)(7,"path",7),at()(),a0(),rt(8,"app-place-selector",8),rn("selectedPlaceChange",function(a){return l.onOriginSelected(a)}),at()()(),rt(9,"div",9)(10,"div",10),Tt(11,"fa-icon",11),at(),Tt(12,"div",12),rt(13,"button",13),rn("click",function(){return l.onSwapPlaces()}),Tt(14,"fa-icon",11),at()(),rt(15,"div",14)(16,"div",2)(17,"div",3),Tt(18,"fa-icon",11),at(),rt(19,"app-place-selector",15),rn("selectedPlaceChange",function(a){return l.onDestinationSelected(a)}),at()()()()),i&2&&(st(8),Rt("places",l.places())("initialSelectedPlace",l.originPlace())("allowCurrentLocation",!0),st(3),Rt("icon",l.faEllipsisVertical),st(2),Rt("disabled",!l.canSwapPlaces()),st(),Rt("icon",l.faArrowsRetweet),st(4),Rt("icon",l.faLocationDot),st(),Rt("places",l.places())("initialSelectedPlace",l.destinationPlace())("placeholder","Select a destination"))},dependencies:[Hd,D1,wr],styles:['.route-selector[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px;position:relative;width:100%;box-sizing:border-box}.routing-option[_ngcontent-%COMP%]{display:flex;gap:10px;align-items:center;padding:0 40px 0 0;box-sizing:border-box;width:100%}.place-info[_ngcontent-%COMP%]{display:flex;gap:10px;align-items:center;flex:1;min-width:0}.place-icon[_ngcontent-%COMP%]{flex-shrink:0;width:36px;height:36px;display:flex;align-items:center;justify-content:center}.destination[_ngcontent-%COMP%] .place-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-text-black)}.connector-line[_ngcontent-%COMP%]{display:flex;gap:8px;align-items:center;width:100%;position:relative}.connector-dots[_ngcontent-%COMP%]{flex-shrink:0;width:36px;height:36px;display:flex;align-items:center;justify-content:center}.connector-dots[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px;color:#5d5d5d}.connector-line-element[_ngcontent-%COMP%]{flex:1;height:1px;background:#e0e0e0;position:relative}.connector-line-element[_ngcontent-%COMP%]:before{content:"";position:absolute;top:50%;left:0;right:0;height:1px;background:repeating-linear-gradient(to right,#e0e0e0 0,#e0e0e0 4px,transparent 4px,transparent 8px);transform:translateY(-50%)}.swap-button[_ngcontent-%COMP%]{flex-shrink:0;width:32px;height:25px;background:none;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:background-color .2s ease}.swap-button[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.swap-button[_ngcontent-%COMP%]:hover:not(:disabled){background-color:#f5f5f5}.swap-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:16px;color:#5d5d5d}.clear-button[_ngcontent-%COMP%]{flex-shrink:0;width:20px;height:20px;background:none;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:50%;transition:background-color .2s ease}.clear-button[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.clear-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:12px;color:#666}.select-destination-button[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;padding:8px 12px;border-radius:6px;transition:background-color .2s ease;flex:1;text-align:left}.select-destination-button[_ngcontent-%COMP%]:hover{background-color:#f8f9fa}.select-destination-button[_ngcontent-%COMP%] .place-label[_ngcontent-%COMP%]{font-family:Open Sans,sans-serif;font-weight:600;font-size:20px;line-height:1;color:#cbcbcb;font-variation-settings:"wdth" 100;letter-spacing:-1px}.destination-selector[_ngcontent-%COMP%]{position:absolute;top:81px;left:84.5px;width:310px;z-index:1000;background:#fff;box-shadow:0 4px 4px #00000040;border-radius:8px;overflow:hidden}@media (width <= 768px){.route-selector[_ngcontent-%COMP%]{padding:20px 16px}.place-text[_ngcontent-%COMP%]{font-size:18px}.place-icon[_ngcontent-%COMP%]{width:32px;height:32px}.place-icon[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:18px}.destination-selector[_ngcontent-%COMP%]{left:16px;right:16px;width:auto}}']})};function nq(n,r){if(n&1){let i=Fr();rt(0,"div",6)(1,"app-route-info",9),rn("startRouteClick",function(){pr(i);let d=qt();return mr(d.startStepAnimation())}),at()()}if(n&2){qt();let i=qg(7);st(),Rt("currentRoute",i)}}var M1=class n{routeId="";route=Me(Ba);logger=Me(qn);navigatorService=Me(Eo);loadedDataService=Me(oi);mapService=Me(yi);markerService=Me(qo);homeStateService=Me(fi);routingService=Me(Sc);mapReady=uo(this.mapService.mapReady,{requireSync:!0});places=uo(this.loadedDataService.getAvailablePlaces(),{initialValue:[]});originPoint=sn(null);destinationPlace=Go(()=>this.initialDestination());initialDestination=sn(null);currentRoute=sn(null);constructor(){this.routeId=this.route.snapshot.params.id||"unknown",Hn(()=>{let r=this.places();if(r.length>0){let i=r.find(l=>l.lazarilloId===this.routeId||l.clientId===this.routeId);i&&this.initialDestination.set(i)}}),Hn(()=>{if(this.mapReady()){let i=$o(this.homeStateService.lastListedPlaces);this.markerService.addRouteMarkers(i)}}),Hn(()=>{let r=this.destinationPlace();r&&this.mapReady()&&(this.markerService.deselectMarkers(),this.markerService.hasMarker(r.lazarilloId)||this.markerService.addRouteMarker(r),this.markerService.selectMarker(r.lazarilloId),$o(this.originPoint)===null&&setTimeout(()=>{this.mapService.updateCamera({center:r.position})},100))}),Hn(()=>{let r=this.originPoint(),i=this.destinationPlace();r&&i?this.mapReady()&&(this.markerService.removeAllMarkers(),this.markerService.addOriginMarker(r.position),this.markerService.addDestinationMarker(i),this.routingService.getRoute(r,i).then(l=>{this.currentRoute.set(l),this.routingService.startAnimatingRoute(l),this.fitMapToRoute(r,i,l)}).catch(l=>{this.logger.logWarning("Error getting route",l)})):this.currentRoute.set(null)})}returnToProfile(){this.navigatorService.navigateToProfile(this.routeId)}onDestinationSelected(r){this.destinationPlace.set(r)}onOriginSelected(r){this.originPoint.set(r)}startStepAnimation(){this.currentRoute()&&this.logger.log("Starting step animation")}fitMapToRoute(r,i,l){let d=r?.position??this.originPoint()?.position,a=i?.position??this.destinationPlace()?.position,I=l??this.currentRoute(),R=document.querySelector(".route-related-components");if(d&&a&&I&&R&&this.mapReady()){let L=getComputedStyle(R),H=Number.parseInt(L.getPropertyValue("--padding-top")),K=Number.parseInt(L.getPropertyValue("--padding-left"));setTimeout(()=>{this.mapService.fitRoute(d,a,I,{padding:{top:H,left:K,right:70,bottom:50}})},100)}}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=cn({type:n,selectors:[["app-route-screen"]],decls:12,vars:4,consts:[[1,"route-screen"],[1,"back-button"],["backButton","",3,"click"],[1,"route-screen-content"],[1,"route-related-components"],[3,"originSelected","destinationSelected","places","initialDestination"],[1,"route-info"],[1,"map"],[3,"restartRouteCallback"],[3,"startRouteClick","currentRoute"]],template:function(i,l){if(i&1){let d=Fr();rt(0,"div",0)(1,"div",1)(2,"button",2),rn("click",function(){return pr(d),mr(l.returnToProfile())}),en(3,"Back"),at()(),rt(4,"div",3)(5,"div",4)(6,"app-route-selector",5),rn("originSelected",function(I){return pr(d),mr(l.onOriginSelected(I))})("destinationSelected",function(I){return pr(d),mr(l.onDestinationSelected(I))}),at(),Zp(7),Rn(8,nq,2,1,"div",6),at(),rt(9,"div",7)(10,"app-map")(11,"app-route-control-button",8),rn("restartRouteCallback",function(){return pr(d),mr(l.fitMapToRoute())}),at()()()()()}if(i&2){st(6),Rt("places",l.places())("initialDestination",l.initialDestination()),st();let d=Hg(l.currentRoute());st(),On(d!==null?8:-1)}},dependencies:[pm,Qd,T1,I1,E1],styles:[".route-screen-content[_ngcontent-%COMP%]{position:relative}.route-related-components[_ngcontent-%COMP%]{--padding-top: 130;--padding-left: 450;position:absolute;top:0;left:0;width:450px;box-sizing:border-box;z-index:1;display:flex;flex-direction:column;gap:40px;padding:40px 38px;background-color:var(--definitions-colors-background-white)}@container mapvx-container (width <= 1024px){.route-related-components[_ngcontent-%COMP%]{--padding-top: 70;--padding-left: 50;position:unset;width:100%}}.map[_ngcontent-%COMP%]{width:100%;height:820px}"],changeDetection:0})};var HR=[{path:"",component:o1,children:[{path:"list",redirectTo:"",pathMatch:"full"},{path:"",component:m1},{path:"search",component:v1}]},{path:"profile/:id",component:S1},{path:"route/:id",component:M1},{path:"**",redirectTo:""}];var qR={providers:[q2(),Tx(),pS(HR),{provide:vc,useClass:i1},qn]};Qx(qR).then(n=>{let r=oP(r1,{injector:n.injector});customElements.define("mapvx-website",r)}).catch(n=>console.error(n));
|
|
1513
1513
|
/*! Bundled license information:
|
|
1514
1514
|
|
|
1515
1515
|
maplibre-gl/dist/maplibre-gl.js:
|