PageSourceSearch

https://shop.motorolasolutions.com/storefront/occ-public/esm/min/component-110e1b0c.js

js motorolasolutions.com collected 2026-09-24 08:31:53 UTC 5,399 bytes, 2 lines download raw bytes

1import{_ as e}from"./_rollupPluginBabelHelpers-927c6dd0.js";import{L as t,aj as s,am as o,j as i,bx as a,ah as r,a4 as d,ag as c,bc as n,R as l}from"./client-c7cf1e30.js";import{a as m,g as p}from"./wishlists-705ef65f.js";import{S as u,P as h}from"./contexts-1fa00dc9.js";import{g as L}from"./utils-7422d731.js";import{u as g}from"./index-fbaff3ff.js";import{C as T}from"./check-circle-7e5eeadb.js";import{C as W}from"./list-alt-230bb7cb.js";import x from"./index-5e03f400.js";import{S as _,p as f}from"./index-6b1ab753.js";import{C as A}from"./index-d06de53d.js";import"./index-9f6df208.js";import"./index-d91ab00a.js";import"./times-09572977.js";const I=l.lazy((()=>import("./index-6b82b3da.js"))),b=l.lazy((()=>import("./index-9a8cba69.js"))),k=l.lazy((()=>import("./index-1d9c7e3d.js"))),C=l.lazy((()=>import("./index-65f83dab.js"))),v=e=>l.createElement("button",{disabled:e.disabled,type:"button",className:"ProductAddToWishList__Link",onClick:e.handleClick},l.createElement(W,{className:"ProductAddToWishList__Icon"}),l.createElement("span",null,e.label)),y=W=>{const f=(()=>{const{getState:e}=t.exports.useContext(u),{productSelection:a}=t.exports.useContext(h),{productId:r,skuId:d,quantity:c,commerceItem:n,shippingGroups:l,shippingGroupId:m,setTriggerRemoveItem:p}=a;if(r&&d){const t=s(e(),{productId:r}),a=o(e(),{skuId:d});if(!i(t)&&!i(a))return L(t,a,c)}else if(n&&!i(n))return{productId:n.productId,skuId:n.catRefId,productDisplayName:n.displayName,productSalePrice:n.salePrice?n.salePrice:n.listPrice,productThumbImageURL:n.primaryThumbImageURL,productVariantValues:n.variant,quantity:n.quantity,shippingGroups:l,shippingGroupId:m,commerceItem:n,setTriggerRemoveItem:p};return{}})(),{getState:y,action:j}=t.exports.useContext(u),{setTriggerRemoveItem:E=d,productDisplayName:P}=f,w={show:!1,title:"",content:()=>null,params:{}},[S,N]=t.exports.useState(w),{labelAddToWishList:M="",actionMoveToWishList:R="",alertItemAlreadyInWishlist:H="",closeLinkAltText:z="",headerLoginOrCreateAccount:q="",headerAddToWishList:D="",headerCreateWishList:G="",headerAddedToWishList:O="",alertMoveToWishListSuccess:U="",moveToWishList:V=!1}=W,B=g(c),F=t.exports.useCallback((()=>{N(w)}),[w]),J=t.exports.useCallback(((e,t)=>{E(!0),j("notify",{level:"success",message:n(U,{PRODUCTNAME:e,WISHLISTNAME:t})})}),[j,U,E]),X=t.exports.useCallback((e=>{if(e.ok){const{data:t={}}=e,{id:s="",wishlistName:o=""}=t;0===((e.json||{}).response||{}).code.indexOf("200")?(N(w),V?J(P,o):j("notify",{level:"success",message:H})):V?(N(w),J(P,o)):N({show:!0,title:l.createElement("span",null,l.createElement(T,{className:"ProductAddToWishList__SuccessIcon"}),l.createElement("span",{id:"AddToWishListModal__Header"},O)),content:C,params:{wishListId:s}})}else j("notify",{level:"error",message:e.error.message})}),[j,H,O,w,V,J,P]),Y=t.exports.useCallback((()=>{N({show:!0,title:l.createElement("span",{id:"AddToWishListModal__Header"},G),content:k,params:{onAddToWishListComplete:X,onCancel:F}})}),[X,F,G]),Z=t.exports.useCallback((()=>{if(B){const e=m(y()).siteId||"";j("listWishlists",{siteId:e}).then((e=>{if(e.ok){const e=p(y());e&&Object.keys(e).length?N({show:!0,title:l.createElement("span",{id:"AddToWishListModal__Header"},D),content:b,params:{onAddToWishListComplete:X,onCancel:F,onNewWishListClick:Y,setTriggerRemoveItem:E,moveToWishList:V}}):N({show:!0,title:l.createElement("span",{id:"AddToWishListModal__Header"},G),content:k,params:{onAddToWishListComplete:X,onCancel:F}})}else{const{error:t={}}=e;j("notify",{level:"error",message:t.message})}}))}else N({show:!0,title:l.createElement("span",{id:"AddToWishListModal__Header"},q),content:I,params:{}})}),[B,q,y,j,D,X,F,Y,E,V,G]);return(e=>{let s=!1;const{action:o,getState:d}=t.exports.useContext(u),c=a(d()),n=r(d()),l=g(m);c.pages&&c.pages[n]&&c.pages[n].showAddToWishList&&(s=!0),t.exports.useEffect((()=>{s&&!i(l)&&(e(),o("saveComponentData",{pages:{[r(d())]:{showAddToWishList:!1}}}))}),[o,s,d,e,l])})(Z),l.createElement(_,{id:"ProductAddToWishList",css:".ProductAddToWishList{display:inline-flex}.ProductAddToWishList__Link{align-items:center;background:none;color:#4a4a4a;color:var(--cc-color);display:flex;font-size:.875rem;font-size:var(--cc-font-size-small);justify-content:center;padding:0;text-decoration:underline;width:auto}.ProductAddToWishList__Link .Icon{height:1.075rem;height:calc(var(--cc-font-size-small) + .2rem);margin:.3rem auto;padding-right:.25rem}.ProductAddToWishList__Link:disabled,button:not(:disabled).ProductAddToWishList__Link:active,button:not(:disabled).ProductAddToWishList__Link:hover{background:none}.ProductAddToWishList__SuccessIcon{color:#060;color:var(--cc-success-message-icon-color)}.ProductAddToWishList__SuccessIcon+#AddToWishListModal__Header{margin:auto 0 auto 1rem}@media only screen and (max-width:768px){.ProductAddToWishList__Button{width:100%}}"},l.createElement("div",{className:"ProductAddToWishList"},l.createElement(v,{disabled:!(f.productId&&f.skuId),label:V?R:M,handleClick:Z}),l.createElement(A,null,l.createElement(x,{show:S.show,onClose:F,closeIconTitle:z,closeAriaLabel:z,title:S.title},l.createElement("div",{"aria-live":"polite"},l.createElement(t.exports.Suspense,{fallback:null},l.createElement(S.content,e({productSelection:f},S.params,W))))))))};y.propTypes={moveToWishList:f.exports.bool.isRequired},y.defaultProps={};export{y as default};
2//# sourceMappingURL=component-110e1b0c.js.map

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.