PageSourceSearch

https://www.carlroth.com/chunk-OTOH3ICN.js

js carlroth.com collected 2026-10-02 04:54:01 UTC 6,066 bytes, 1 lines download raw bytes

1import{c as at}from"./chunk-DXB6A4ED.js";import"./chunk-HATCCJ5D.js";import{Ba as et,Fa as nt,Ia as it,Ja as ot,O as X,Oa as rt,P as Z,Q as tt}from"./chunk-I75ST7ZI.js";import{$b as b,Aa as C,Ac as _,Bh as J,Ch as K,Eb as a,Ec as k,Fb as p,Gb as u,Hb as x,I as L,Lb as m,Mb as g,Ob as v,Tb as y,Te as Q,U as S,Vb as o,Wf as U,Yf as Y,Zb as P,Zf as q,_a as r,_b as E,dc as I,dd as V,hb as W,ic as h,id as $,ie as N,jc as f,ka as A,kb as w,ke as j,lb as F,pb as l,qd as D,qg as O,ra as M,sh as z,tc as R,te as H,th as G,v as B,za as T,zc as s}from"./chunk-ZV6XJHCK.js";import"./chunk-NAIKXHWT.js";var st=["addToWishlistButton"],_t=["removeFromWishlistButton"],dt=()=>({cxRoute:"login"});function pt(e,d){if(e&1){let t=v();p(0,"div")(1,"button",7,2),s(3,"async"),s(4,"cxTranslate"),y("click",function(){let c=T(t).ngIf,i=o(6);return C(i.remove(c))}),x(5,"cx-icon",8),p(6,"span",9),h(7),s(8,"cxTranslate"),u()()()}if(e&2){let t=o(6);r(),a("disabled",_(3,4,t.loading$))("cxAtMessage",_(4,6,"addToWishList.removedFromWishList")),r(4),a("type",t.iconTypes.HEART),r(2),f(_(8,8,"addToWishList.remove"))}}function lt(e,d){if(e&1){let t=v();p(0,"button",10,3),s(2,"async"),s(3,"cxTranslate"),y("click",function(){T(t);let c=o(5).ngIf,i=o();return C(i.add(c))}),x(4,"cx-icon",8),p(5,"span",9),h(6),s(7,"cxTranslate"),u()()}if(e&2){let t=o(6);a("disabled",_(2,4,t.loading$))("cxAtMessage",_(3,6,"addToWishList.addedToWishList")),r(4),a("type",t.iconTypes.EMPTY_HEART),r(2),f(_(7,8,"addToWishList.add"))}}function mt(e,d){if(e&1&&(m(0),l(1,pt,9,10,"div",5)(2,lt,8,10,"ng-template",null,1,k),g()),e&2){let t=I(3),n=o(2).ngIf,c=o(2).ngIf,i=o();r(),a("ngIf",i.getProductInWishList(c,n))("ngIfElse",t)}}function gt(e,d){if(e&1){let t=v();p(0,"div")(1,"button",11),s(2,"async"),s(3,"cxTranslate"),y("click",function(){let c=T(t).ngIf,i=o(6);return C(i.remove(c))}),x(4,"cx-icon",8),p(5,"span",9),h(6),s(7,"cxTranslate"),u()()()}if(e&2){let t=o(6);r(),a("disabled",_(2,4,t.loading$))("cxAtMessage",_(3,6,"addToWishList.removedFromWishList")),r(3),a("type",t.iconTypes.HEART),r(2),f(_(7,8,"addToWishList.remove"))}}function ut(e,d){if(e&1){let t=v();p(0,"button",12),s(1,"async"),s(2,"cxTranslate"),y("click",function(){T(t);let c=o(5).ngIf,i=o();return C(i.add(c))}),x(3,"cx-icon",8),p(4,"span",9),h(5),s(6,"cxTranslate"),u()()}if(e&2){let t=o(6);a("disabled",_(1,4,t.loading$))("cxAtMessage",_(2,6,"addToWishList.addedToWishList")),r(3),a("type",t.iconTypes.EMPTY_HEART),r(2),f(_(6,8,"addToWishList.add"))}}function xt(e,d){if(e&1&&(m(0),l(1,gt,8,10,"div",5)(2,ut,7,10,"ng-template",null,1,k),g()),e&2){let t=I(3),n=o(2).ngIf,c=o(2).ngIf,i=o();r(),a("ngIf",i.getProductInWishList(c,n))("ngIfElse",t)}}function ht(e,d){e&1&&(m(0),l(1,mt,4,2,"ng-container",6)(2,xt,4,2,"ng-container",6),g()),e&2&&(r(),a("cxFeature","a11yLinkBtnsToTertiaryBtns"),r(),a("cxFeature","!a11yLinkBtnsToTertiaryBtns"))}function ft(e,d){if(e&1&&(m(0),l(1,ht,3,2,"ng-container",4),g()),e&2){let t=o(3);r(),a("ngIf",t.hasStock)}}function Tt(e,d){if(e&1&&(m(0),l(1,ft,2,1,"ng-container",4),s(2,"async"),g()),e&2){let t=o(2);r(),a("ngIf",_(2,1,t.wishListEntries$))}}function Ct(e,d){if(e&1&&(m(0),l(1,Tt,3,3,"ng-container",5),s(2,"async"),g()),e&2){let t=o(),n=I(3);r(),a("ngIf",_(2,2,t.userLoggedIn$))("ngIfElse",n)}}function vt(e,d){if(e&1&&(m(0),p(1,"a",13),s(2,"cxUrl"),x(3,"cx-icon",8),p(4,"span",9),h(5),s(6,"cxTranslate"),u()(),g()),e&2){let t=o(2);r(),a("routerLink",_(2,3,R(7,dt))),r(2),a("type",t.iconTypes.EMPTY_HEART),r(2),f(_(6,5,"addToWishList.anonymous"))}}function yt(e,d){if(e&1&&l(0,vt,7,8,"ng-container",4),e&2){let t=o();a("ngIf",t.hasStock)}}var ct=(()=>{class e{constructor(t,n,c){this.wishListFacade=t,this.currentProductService=n,this.authService=c,this.product$=this.currentProductService.getProduct().pipe(L(Q),A(i=>this.setStockInfo(i))),this.userLoggedIn$=this.authService.isUserLoggedIn().pipe(A(i=>{i&&(this.wishListEntries$=this.getWishListEntries(),this.loading$=this.wishListFacade.getWishListLoading())})),this.hasStock=!1,this.iconTypes=X,q("a11yAddToWishListBtnMargin")}add(t){t.code&&(this.wishListFacade.addEntry(t.code),this.restoreFocus())}remove(t){this.wishListFacade.removeEntry(t),this.restoreFocus()}getProductInWishList(t,n){return n.find(i=>i.product?.code===t.code)}setStockInfo(t){this.hasStock=!!(t.stock&&t.stock.stockLevelStatus!=="outOfStock")}getWishListEntries(){return this.wishListFacade.getWishList().pipe(L(t=>!!t),B(t=>t.entries??[]))}restoreFocus(){this.loading$.pipe(L(t=>!t),S(1)).subscribe(()=>{this.removeFromWishlistButton?.nativeElement.focus()||this.addToWishlistButton?.nativeElement.focus()})}static{this.\u0275fac=function(n){return new(n||e)(W(at),W(et),W(O))}}
1static{this.\u0275cmp=w({type:e,selectors:[["cx-add-to-wishlist"]],viewQuery:function(n,c){if(n&1&&P(st,5)(_t,5),n&2){let i;E(i=b())&&(c.addToWishlistButton=i.first),E(i=b())&&(c.removeFromWishlistButton=i.first)}},decls:4,vars:3,consts:[["loginPrompt",""],["addItem",""],["removeFromWishlistButton",""],["addToWishlistButton",""],[4,"ngIf"],[4,"ngIf","ngIfElse"],[4,"cxFeature"],[1,"btn","btn-tertiary","button-remove",3,"click","disabled","cxAtMessage"],["aria-hidden","true",3,"type"],[1,"button-text"],[1,"btn","btn-tertiary","button-add",3,"click","disabled","cxAtMessage"],[1,"btn","btn-link","button-remove","cx-action-link",3,"click","disabled","cxAtMessage"],[1,"btn","btn-link","button-add","cx-action-link",3,"click","disabled","cxAtMessage"],["cxBtnLikeLink","",1,"btn","btn-link","button-add-link","cx-action-link",3,"routerLink"]],template:function(n,c){n&1&&(l(0,Ct,3,4,"ng-container",4),s(1,"async"),l(2,yt,1,1,"ng-template",null,0,k)),n&2&&a("ngIf",_(1,1,c.product$))},dependencies:[V,nt,Z,it,N,U,$,J,z],encapsulation:2,changeDetection:0})}}return e})(),Mt=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=F({type:e})}static{this.\u0275inj=M({providers:[H({cmsComponents:{AddToWishListComponent:{component:ct}}})],imports:[D,K,tt,j,G,rt,Y,ot,ct]})}}return e})();export{ct as AddToWishListComponent,Mt as AddToWishListModule};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.