!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="3b849180-82c4-4d2c-8652-c79757521820",e._sentryDebugIdIdentifier="sentry-dbid-3b849180-82c4-4d2c-8652-c79757521820")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7475],{74253:(e,t,s)=>{Promise.resolve().then(s.bind(s,63352)),Promise.resolve().then(s.bind(s,92249)),Promise.resolve().then(s.bind(s,51342)),Promise.resolve().then(s.bind(s,37211)),Promise.resolve().then(s.bind(s,15667)),Promise.resolve().then(s.bind(s,62077)),Promise.resolve().then(s.bind(s,53756)),Promise.resolve().then(s.bind(s,76579)),Promise.resolve().then(s.bind(s,83574)),Promise.resolve().then(s.bind(s,90286)),Promise.resolve().then(s.bind(s,49954)),Promise.resolve().then(s.bind(s,15174)),Promise.resolve().then(s.bind(s,54266)),Promise.resolve().then(s.bind(s,97226)),Promise.resolve().then(s.bind(s,6246)),Promise.resolve().then(s.bind(s,87626)),Promise.resolve().then(s.bind(s,97262)),Promise.resolve().then(s.bind(s,70474)),Promise.resolve().then(s.t.bind(s,54598,23)),Promise.resolve().then(s.t.bind(s,2187,23)),Promise.resolve().then(s.t.bind(s,15111,23))},63352:(e,t,s)=>{"use strict";s.d(t,{HubspotForm:()=>F});var r=s(36636),a=s(71640),l=s(79968),n=s(37611),i=s(48400),o=s(27622),d=s(80513),c=s(54647),u=s(6246),m=s(36130),x=s(55483);let f=(e,t)=>{let s=document.createElement("a");s.download=t,s.href=e,document.body.appendChild(s),s.click(),s.remove()},h=e=>(fetch("/library/api/i",{method:"POST",body:e}).catch(()=>{}),fetch("/library/api/hubspot-form",{method:"POST",body:e}));var p=s(33775),v=s(1189),g=s(50662);let b="/api/v3",j="connect-web-dev-tools-ready",y=[];function w(){"__CONNECT_WEB_DEVTOOLS__"in s.g&&"function"==typeof s.g.__CONNECT_WEB_DEVTOOLS__&&(y.push(s.g.__CONNECT_WEB_DEVTOOLS__),window.removeEventListener(j,w))}w(),"window"in s.g&&window.addEventListener(j,w),(0,g.o)({baseUrl:"/library".concat(b),interceptors:y});let C=(0,g.o)({baseUrl:b,interceptors:y}),E={baseUrl:new URL(b,x.ET).toString(),fetch:(e,t)=>(new Request(e,t).headers.set("Origin",x.ET),fetch(e,t))};(0,g.o)(E);let _=(0,p.yl)({service:v.z,transport:C});var N=s(27969),D=s(54598),P=s.n(D);function z(e){let{reason:t}=e,s=(0,i.useRef)(null);(0,i.useEffect)(()=>{s.current&&s.current.scrollIntoView({behavior:"smooth",block:"center"})},[s]);let{i18n:a}=(0,n.uB)(),l={header:"product_not_found"===t?a._({id:"PA8Ey8"}):a._({id:"rWlB7P"}),description:"product_not_found"===t?a._({id:"47S0Tm"}):a._({id:"iyIDdn"})};return(0,r.jsxs)("div",{ref:s,className:"bg-negative-bg-weakest rounded-s2 p-s4 text-negative-text-onWeaker flex flex-row items-center justify-between",children:[(0,r.jsxs)("div",{className:"gap-s4 flex flex-row items-center",children:[(0,r.jsx)(N.q,{}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"prose-body-small-strong",children:l.header}),(0,r.jsx)("p",{className:"prose-body-small",children:l.description})]})]}),"product_not_found"===t&&(0,r.jsx)(P(),{className:"prose-body-small underline",href:"https://safetyculture.com/contact-us",children:(0,r.jsx)(n.x6,{id:"mpby9d"})})]})}function H(e){let{productTitle:t,productId:s,onSuccess:p}=e,v=m.z.string().email(),{i18n:g,_:b}=(0,n.uB)(),[j,y]=(0,i.useState)({}),[w,C]=(0,i.useState)(!1),[E,N]=(0,i.useState)(null),[D,P]=(0,i.useState)(!1),{data:H,isRefetchError:V,refetch:T,isError:k,isRefetching:F}=(0,u.useQuery)({..._.startTemplateExport.useQuery({id:s}),refetchInterval:1e3,enabled:D,retry:!1});(0,i.useEffect)(()=>{if(D){if(V||k){N("unspecified"),P(!1);return}if((null==H?void 0:H.status.case)==="success"){f(H.status.value.url,t),N(null),P(!1),p();return}if((null==H?void 0:H.status.case)==="failure"){var e;N((null===(e=H.status.value.failedExport)||void 0===e?void 0:e.reason)===d.rS.NOT_FOUND?"product_not_found":"unspecified"),P(!1)}}},[H,p,F,k,V,D,t]);let S=(e,t)=>{let s=g._({id:"CZiBjR"});return t.trim()?"email"!==e||v.safeParse(t).success?"":g._({id:"7NGVOw"}):s},B=e=>{let{name:t,value:s}=e.target;if(""===s)return;let r=S(t,s);y(e=>({...e,[t]:r}))},I=e=>{let{name:t,value:s}=e.target,r=S(t,s);y(e=>({...e,[t]:r}))};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.DialogHeader,{children:(0,r.jsx)(l.DialogTitle,{children:(0,r.jsx)("span",{className:"prose-title-large",id:"dialog-title",children:t})})}),(0,r.jsxs)("form",{onSubmit:e=>{e.preventDefault(),N(null);let t={...j},s=!1,r=new FormData(e.currentTarget);for(let[e,a]of(r.set("formId",x.O0),r.entries())){let r=S(e,a);r&&(t[e]=r,s=!0)}s?y(t):(C(!0),h(r).then(e=>{e.ok?(P(!0),T().catch(()=>{})):N("hubspot_error"),C(!1)}).catch(e=>{N("unspecified"),C(!1),(0,c.Cp)(e)}))},"aria-label":g._({id:"KTzuUC"}),className:"gap-s6 flex flex-col overflow-y-auto",children:[(0,r.jsx)(l.DialogBody,{children:(0,r.jsxs)("div",{className:"gap-s4 flex flex-col",children:[(0,r.jsxs)("div",{className:"gap-s4 flex flex-col sm:flex-row",children:[(0,r.jsxs)("div",{className:"gap-s2 flex w-full flex-col sm:w-1/2",children:[(0,r.jsxs)("label",{className:"prose-label-medium",htmlFor:"firstname",children:[(0,r.jsx)(n.x6,{id:"V1EGGU"}),(0,r.jsx)("span",{className:"text-negative-bg-default",children:"*"})]}),(0,r.jsx)(o.p,{id:"firstname",name:"firstname",onBlur:I,onChange:B}),j.firstname&&(0,r.jsx)("span",{className:"prose-label-medium text-negative-bg-default",children:j.firstname})]}),(0,r.jsxs)("div",{className:"gap-s2 flex w-full flex-col sm:w-1/2",children:[(0,r.jsxs)("label",{className:"prose-label-medium",htmlFor:"lastname",children:[(0,r.jsx)(n.x6,{id:"1ZaQUH"}),(0,r.jsx)("span",{className:"text-negative-bg-default",children:"*"})]}),(0,r.jsx)(o.p,{id:"lastname",name:"lastname",onBlur:I,onChange:B}),j.lastname&&(0,r.jsx)("span",{className:"prose-label-medium text-negative-bg-default",children:j.lastname})]})]}),(0,r.jsxs)("div",{className:"gap-s2 flex flex-col",children:[(0,r.jsxs)("label",{className:"prose-label-medium",htmlFor:"email",children:[(0,r.jsx)(n.x6,{id:"O3oNi5"}),(0,r.jsx)("span",{className:"text-negative-bg-default",children:"*"})]}),(0,r.jsx)(o.p,{id:"email",name:"email",onBlur:I,onChange:B}),j.email&&(0,r.jsx)("span",{className:"prose-label-medium text-negative-bg-default",children:j.email})]}),(0,r.jsx)("p",{className:"prose-label-medium text-surface-text-weaker",children:(0,r.jsx)(n.x6,{id:"pyCWpQ",components:{0:(0,r.jsx)("a",{className:"text-accent-text-default underline",href:"https://safetyculture.com/legal/privacy-policy/",target:"_blank",rel:"noopener noreferrer"})}})}),E&&(0,r.jsx)(z,{reason:E})]})}),(0,r.jsx)(l.E,{children:(0,r.jsx)(a.$,{type:"submit",loading:w||F,children:(0,r.jsx)(n.x6,{id:"mzI/c+"})})})]})]})}var V=s(53670),T=s(51342);function k(e){let{productId:t,productTitle:s}=e,{i18n:a,_:i}=(0,n.uB)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(l.DialogHeader,{children:[(0,r.jsx)(V.A,{className:"h-[8.75rem] min-h-[8.75rem]"}),(0,r.jsx)(l.DialogTitle,{className:"text-center",children:(0,r.jsx)("span",{className:"prose-headline-medium",id:"dialog-header",children:(0,r.jsx)(n.x6,{id:"hw2Bku"})})})]}),(0,r.jsx)(l.DialogBody,{className:"gap-s4 justify-center text-center",children:(0,r.jsx)("p",{className:"prose-label-medium text-surface-text-weaker",children:(0,r.jsx)(n.x6,{id:"tjWcQw"})})}),(0,r.jsx)(l.E,{className:"mt-s4 flex justify-center",children:(0,r.jsx)(T.GetProductLink,{linkText:a._({id:"Z2cNoz"}),productId:t,productTitle:s})})]})}function F(e){let{productId:t,productTitle:s}=e,[o,d]=(0,i.useState)("pending"),c=(0,i.useRef)(null);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.$,{ref:c,variation:"tertiary",onClick:()=>{d("collectData")},children:(0,r.jsx)(n.x6,{id:"CVpe95"})}),(0,r.jsx)(l.Dialog,{open:"collectData"===o,onOpenChange:e=>{e||d("pending")},children:(0,r.jsx)(l.DialogContent,{onCloseAutoFocus:()=>{var e;return null===(e=c.current)||void 0===e?void 0:e.focus()},"aria-describedby":void 0,size:"large",slotProps:{closeButton:{onClick:()=>{d("pending")}}},children:(0,r.jsx)(H,{productId:t,productTitle:s,onSuccess:()=>{d("templateImportFlow")}})})}),(0,r.jsx)(l.Dialog,{open:"templateImportFlow"===o,onOpenChange:e=>{e||d("pending")},children:(0,r.jsx)(l.DialogContent,{onCloseAutoFocus:()=>{var e;return null===(e=c.current)||void 0===e?void 0:e.focus()},"aria-describedby":void 0,size:"large",slotProps:{closeButton:{onClick:()=>{d("pending")}}},children:(0,r.jsx)(k,{productId:t,productTitle:s})})})]})}},92249:(e,t,s)=>{"use strict";s.d(t,{InspectionPreview:()=>k});var r=s(36636),a=s(76815),l=s(48400);let{fi:n}=a.Ej;function i(e){return"(min-width: ".concat(n[e],")")}function o(e,t){return[e&&window.matchMedia(i(e)),t&&window.matchMedia("not all and ".concat(i(t)))]}function d(e){return e.replace("max-","")}function c(e){return e.startsWith("max-")&&d(e)in n}let u=(e,t)=>{let[s,r]=(0,l.useMemo)(()=>(function(e){if(e in n)return[e,void 0];if(c(e))return[void 0,d(e)];let t=e.split(":");if(2===t.length&&t[0]in n&&c(t[1]))return[t[0],d(t[1])];throw Error("Invalid media query: ".concat(e))})(e),[e]),[a,i]=(0,l.useState)(()=>o(s,r).every(e=>void 0===e||e.matches));return(0,l.useEffect)(()=>{let[e,t]=o(s,r),a=()=>{i([e,t].every(e=>void 0===e||e.matches))};return null==e||e.addEventListener("change",a),null==t||t.addEventListener("change",a),i([e,t].every(e=>void 0===e||e.matches)),()=>{null==e||e.removeEventListener("change",a),null==t||t.removeEventListener("change",a)}},[s,r]),a};var m=s(6246),x=s(37611),f=s(55483);let h={ERROR:"ul.frameError",FRAME_READY:"ul.frameReady",TEMPLATE_DATA:"cl.templateData"};function p(e){let{onError:t,onReady:s,template:a}=e,{i18n:n,_:i}=(0,x.uB)(),o=(0,l.useRef)(null),d=(0,l.useRef)(null),c=(0,l.useCallback)(e=>{if(null==d.current)throw Error("Port not ready");d.current.postMessage(e)},[]),u=(0,l.useCallback)(e=>{let{topic:s,payload:r}=e;s===h.ERROR&&t()},[t]);return(0,l.useEffect)(()=>{let e=e=>{if(e.origin===f.v5&&null==d.current)switch(e.data.topic){case h.ERROR:t();break;case h.FRAME_READY:null!=e.ports[0]&&function(e){if(null!=d.current)throw Error("Port already initialized");d.current=e,d.current.onmessage=e=>{u(e.data)},c({topic:h.TEMPLATE_DATA,payload:a})}(e.ports[0]),s()}};return window.addEventListener("message",e),()=>{window.removeEventListener("message",e)}},[u,t,s,c,a]),(0,r.jsx)("iframe",{className:"xs:rounded-[2rem] xs:p-s3 xs:min-w-[23rem] border-white-default relative z-10 h-full min-w-full rounded-none border p-0",ref:o,src:"".concat(f.v5,"/template-preview"),title:n._({id:"xn3DSi"})})}var v=s(79968),g=s(60411);function b(e){return(0,r.jsxs)("svg",{width:"200",height:"201",viewBox:"0 0 200 201",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,r.jsx)("path",{d:"M112.987 139.43H100.602H100.077H87.6922L82.7241 159.882H100.077H100.602H117.92L112.987 139.43Z",fill:"#D2DCEC"}),(0,r.jsx)("path",{opacity:"0.65",d:"M86.2578 145.313L113.792 142.897L112.987 139.43H87.6923L86.2578 145.313Z",fill:"#C7D2E1"}),(0,r.jsx)("path",{d:"M158.784 140.585H41.8603C35.3179 140.585 30 135.262 30 128.713V50.372C30 43.8231 35.3179 38.5 41.8603 38.5H158.784C165.327 38.5 170.645 43.8231 170.645 50.372V128.713C170.645 135.262 165.362 140.585 158.784 140.585Z",fill:"url(#paint0_linear_6522_66880)"}),(0,r.jsx)("path",{opacity:"0.65",d:"M100.29 131.517C102.49 131.517 104.273 129.734 104.273 127.534C104.273 125.334 102.49 123.551 100.29 123.551C98.0899 123.551 96.3066 125.334 96.3066 127.534C96.3066 129.734 98.0899 131.517 100.29 131.517Z",fill:"#4740C8"}),(0,r.jsx)("path",{d:"M157.803 44.5H43.1968C39.7886 44.5 37 47.3081 37 50.7402V111.825C37 113.836 38.6181 115.5 40.6492 115.5H160.351C162.348 115.5 164 113.871 164 111.825V50.7402C164 47.2734 161.211 44.5 157.803 44.5Z",fill:"white"}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M100.323 58.9922C88.283 58.9922 78.5229 68.7522 78.5229 80.7918C78.5229 92.8314 88.283 102.591 100.323 102.591C112.362 102.591 122.122 92.8314 122.122 80.7918C122.122 68.7522 112.362 58.9922 100.323 58.9922ZM97.4897 71.2704C97.4145 70.1271 98.3215 69.1585 99.4672 69.1585H101.18C102.325 69.1585 103.232 70.1271 103.157 71.2704L102.354 83.4794C102.327 83.8961 101.981 84.22 101.563 84.22H99.0839C98.6663 84.22 98.3203 83.8961 98.2929 83.4794L97.4897 71.2704ZM103.295 89.1747C103.295 90.8164 101.964 92.1474 100.323 92.1474C98.6808 92.1474 97.3499 90.8164 97.3499 89.1747C97.3499 87.5329 98.6808 86.202 100.323 86.202C101.964 86.202 103.295 87.5329 103.295 89.1747Z",fill:"url(#paint1_linear_6522_66880)"}),(0,r.jsx)("path",{d:"M122.258 157.395H76.9512C74.5372 157.395 72.543 159.111 72.0881 161.387C72.0532 161.912 72.438 162.367 72.9978 162.367H73.0328H126.212H126.247C126.772 162.367 127.192 161.912 127.157 161.387C126.667 159.111 124.673 157.395 122.258 157.395Z",fill:"#C7D2E1"}),(0,r.jsxs)("defs",{children:[(0,r.jsxs)("linearGradient",{id:"paint0_linear_6522_66880",x1:"66.0821",y1:"30.8853",x2:"170.58",y2:"140.654",gradientUnits:"userSpaceOnUse",children:[(0,r.jsx)("stop",{stopColor:"#E3EBFA"}),(0,r.jsx)("stop",{offset:"1",stopColor:"#CFD9EA"})]}),(0,r.jsxs)("linearGradient",{id:"paint1_linear_6522_66880",x1:"100.322",y1:"58.9922",x2:"100.322",y2:"102.591",gradientUnits:"userSpaceOnUse",children:[(0,r.jsx)("stop",{stopColor:"#BBB6FF"}),(0,r.jsx)("stop",{offset:"1",stopColor:"#9F98FF"})]})]})]})}function j(){return(0,r.jsxs)("div",{className:"gap-s2 flex max-w-[20rem] flex-col items-center text-center",children:[(0,r.jsx)(b,{"aria-hidden":"true"}),(0,r.jsx)("span",{className:"prose-title-large",children:(0,r.jsx)(x.x6,{id:"Pi+d4p"})}),(0,r.jsx)("span",{className:"prose-body-medium",children:(0,r.jsx)(x.x6,{id:"7LJF63"})})]})}var y=s(71640),w=s(54642);function C(e){return(0,r.jsxs)("svg",{className:"max-w-full",width:"320",height:"560",viewBox:"0 0 320 560",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,r.jsx)("path",{d:"M0 24C0 10.7452 10.7452 0 24 0H296C309.255 0 320 10.7452 320 24V536C320 549.255 309.255 560 296 560H24C10.7452 560 0 549.255 0 536V24Z",fill:"white"}),(0,r.jsx)("rect",{x:"16",y:"56",width:"288",height:"12",rx:"6",fill:"#E9EDF6"}),(0,r.jsx)("rect",{x:"16",y:"76",width:"288",height:"12",rx:"6",fill:"#E9EDF6"}),(0,r.jsx)("rect",{x:"16",y:"96",width:"160",height:"12",rx:"6",fill:"#E9EDF6"}),(0,r.jsx)("path",{d:"M16 132C16 127.582 19.5817 124 24 124H296C300.418 124 304 127.582 304 132V156C304 160.418 300.418 164 296 164H24C19.5817 164 16 160.418 16 156V132Z",fill:"#E9EDF6"}),(0,r.jsx)("path",{d:"M16 180C16 175.582 19.5817 172 24 172H296C300.418 172 304 175.582 304 180V204C304 208.418 300.418 212 296 212H24C19.5817 212 16 208.418 16 204V180Z",fill:"#E9EDF6"}),(0,r.jsx)("path",{d:"M16 228C16 223.582 19.5817 220 24 220H296C300.418 220 304 223.582 304 228V252C304 256.418 300.418 260 296 260H24C19.5817 260 16 256.418 16 252V228Z",fill:"#E9EDF6"}),(0,r.jsx)("rect",{x:"16",y:"300",width:"288",height:"12",rx:"6",fill:"#E9EDF6"}),(0,r.jsx)("rect",{x:"16",y:"320",width:"288",height:"12",rx:"6",fill:"#E9EDF6"}),(0,r.jsx)("rect",{x:"16",y:"340",width:"160",height:"12",rx:"6",fill:"#E9EDF6"}),(0,r.jsx)("path",{d:"M16 376C16 371.582 19.5817 368 24 368H296C300.418 368 304 371.582 304 376V400C304 404.418 300.418 408 296 408H24C19.5817 408 16 404.418 16 400V376Z",fill:"#E9EDF6"}),(0,r.jsx)("path",{d:"M16 424C16 419.582 19.5817 416 24 416H296C300.418 416 304 419.582 304 424V448C304 452.418 300.418 456 296 456H24C19.5817 456 16 452.418 16 448V424Z",fill:"#E9EDF6"}),(0,r.jsx)("path",{d:"M16 472C16 467.582 19.5817 464 24 464H296C300.418 464 304 467.582 304 472V496C304 500.418 300.418 504 296 504H24C19.5817 504 16 500.418 16 496V472Z",fill:"#E9EDF6"})]})}function E(e){let{onPreviewRequest:t}=e;return(0,r.jsxs)("div",{className:"aligncenter gap-s3 relative isolate flex h-full w-full flex-col justify-center overflow-hidden",children:[(0,r.jsx)(C,{"aria-hidden":"true",className:"top-s7 xs:top-s0 xs:h-full absolute left-1/2 h-auto w-full -translate-x-1/2"}),(0,r.jsx)(y.$,{onClick:()=>{t()},startIcon:(0,r.jsx)(w.v,{}),size:"lg",className:"absolute left-1/2 top-1/2 w-max -translate-x-1/2 -translate-y-1/2 transform",variation:"secondary",children:(0,r.jsx)(x.x6,{id:"1vtnVh"})})]})}var _=s(51342);function N(e){let{children:t}=e;return(0,r.jsx)("div",{className:"inset-s0 border-white-default shadow-surface-text-placeholder ring-surface-text-placeholder absolute z-0 rounded-[2rem] border-[0.75rem] border-solid shadow-sm ring-1 ring-inset",children:t})}function D(e){let{iframe:t,ready:s,hasError:a}=e,{i18n:l,_:n}=(0,x.uB)();return a?(0,r.jsx)(j,{}):(0,r.jsxs)(r.Fragment,{children:[!s&&(0,r.jsx)(g.y,{"aria-label":l._({id:"++T3kB"}),"aria-live":"polite",role:"status",size:"xSmall"}),(0,r.jsxs)("section",{className:"relative isolate h-full",hidden:!s,children:[t,(0,r.jsx)(N,{})]})]})}function P(e){let{id:t,title:s,iframe:a,ready:n,hasError:i,onDismiss:o}=e,{i18n:d,_:c}=(0,x.uB)(),[u,m]=(0,l.useState)(!0);return u?(0,r.jsx)(v.Dialog,{modal:!0,open:u,onOpenChange:e=>{e||(m(!1),o())},children:(0,r.jsxs)(v.DialogContent,{className:"translate-y-s0 bottom-[0] top-auto h-full max-h-[calc(100dvh-1.5rem)] max-w-full rounded-b-none",slotProps:{closeButton:{"aria-label":d._({id:"yz7wBu"})}},"aria-describedby":void 0,children:[(0,r.jsxs)(v.DialogHeader,{children:[(0,r.jsx)(v.DialogTitle,{children:s}),(0,r.jsx)(_.GetProductLink,{className:"mt-s4",linkText:d._({id:"O9H+/O"}),productId:t,productTitle:s})]}),!n&&(0,r.jsx)(g.y,{"aria-label":d._({id:"++T3kB"}),"aria-live":"polite",role:"status",size:"xSmall"}),i?(0,r.jsx)("div",{className:"grid h-full place-content-center",children:(0,r.jsx)(j,{})}):(0,r.jsx)("div",{className:"h-full",hidden:!n,children:a})]})}):(0,r.jsx)(E,{onPreviewRequest:()=>{m(!0)}})}var z=s(33775),H=s(53120);let V=(0,z.yl)({service:H.t});var T=s(96983);function k(e){let{id:t,title:s}=e,[a,n]=(0,l.useState)("placeholder"),[i,o]=(0,l.useState)(),d=u("xs"),{refetch:c}=(0,m.useQuery)({queryKey:V.getProductPreview.getQueryKey({productId:t}),queryFn:()=>S(t),enabled:!1});(0,l.useEffect)(()=>{if("loading"===a){let e=setTimeout(()=>{n("error")},1e4);return()=>{clearTimeout(e)}}},[a]);let x=(0,l.useMemo)(()=>i?(0,r.jsx)(p,{onError:()=>{n("error")},onReady:()=>{n("ready")},template:i}):null,[i]);return"placeholder"===a?(0,r.jsx)(E,{onPreviewRequest:()=>{(0,T.u)("click_preview",{common:{type:"template"}}),n("loading"),c().then(e=>{e.isError||!e.data?n("error"):o(e.data.templateData)}).catch(()=>{n("error")})}}):void 0===d?null:d?(0,r.jsx)(D,{ready:"ready"===a,hasError:"error"===a,iframe:x}):(0,r.jsx)(P,{id:t,title:s,iframe:x,ready:"ready"===a,hasError:"error"===a,onDismiss:()=>{n("loading")}})}let F=new Headers;async function S(e){let t=await fetch("/library/api/rest-proxy/contentlibrary/public/v1/preview?productId=".concat(e),{headers:F});return t.ok?await t.json():null}f.nS&&F.set("x-region",f.nS)},51342:(e,t,s)=>{"use strict";s.d(t,{GetProductLink:()=>d});var r=s(36636),a=s(71640),l=s(59083),n=s(55483),i=s(96973),o=s(96983);function d(e){let{className:t,linkText:s,productId:d,productTitle:c}=e,u=(0,l.useSearchParams)(),m=new URL(n.$m);return m.searchParams.set("name",c),m.searchParams.set("productId",d),m.searchParams.set("$deeplink_path","contentLibrary/createOrder/"+d),(0,r.jsx)(a.$,{className:t,asChild:!0,onClick:()=>{var e;(0,o.u)("click_button",{common:{label:"download"},algolia:{insightsType:"imported_product",eventType:"conversion",index:(0,i.A4)(null!==(e=u.get("sort"))&&void 0!==e?e:void 0),products:[{product_id:d}]}})},children:(0,r.jsx)("a",{href:String(m),target:"_blank",rel:"noreferrer",children:s})})}},15667:(e,t,s)=>{"use strict";s.d(t,{TruncateParagraph:()=>n});var r=s(36636),a=s(37611),l=s(48400);function n(e){let{children:t}=e,s=(0,l.useRef)(null),[n,i]=(0,l.useState)(!1),[o,d]=(0,l.useState)(!1),c=(0,l.useCallback)(()=>{s.current&&i(s.current.scrollHeight>s.current.offsetHeight)},[]);!function(e,t){let s=(0,l.useRef)(!1);(0,l.useEffect)(()=>{s.current=!0;let r=e.current,a=new ResizeObserver(e=>{s.current&&t(e)});return r&&a.observe(r),()=>{s.current=!1,r&&a.unobserve(r)}},[e,t])}(s,c);let u=(0,l.useId)(),{i18n:m,_:x}=(0,a.uB)(),f={true:m._({id:"uPo3PQ"}),false:m._({id:"V1fa9u"}),other:m._({id:"muMa99"})};return(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsxs)("p",{id:u,className:"prose-body-medium text-surface-text-weak ".concat(o?"":"line-clamp-2"),children:[(0,r.jsx)("span",{ref:s,"aria-hidden":!0,className:"invisible absolute max-h-[2lh] overflow-hidden",children:t}),t]}),n&&(0,r.jsx)("button",{className:"right-s0 text-accent-text-default prose-label-large absolute m-0 cursor-pointer border-0 bg-transparent p-0 hover:underline",onClick:()=>{d(e=>!e)},"aria-expanded":o,"aria-controls":u,children:f[o.toString()]})]})}},79968:(e,t,s)=>{"use strict";s.d(t,{Dialog:()=>o,DialogBody:()=>j,DialogContent:()=>m,DialogHeader:()=>f,DialogTitle:()=>p,DialogTrigger:()=>d,E:()=>g});var r=s(36636),a=s(55412),l=s(25438),n=s(40105),i=s(93114);let o=a.bL,d=a.l9,c=(0,n.tv)({base:["bg-overlay-bg-default inset-s0 fixed z-50"]}),u=(0,n.tv)({base:["fixed left-[50%] top-[50%] z-50 translate-x-[-50%] translate-y-[-50%]","bg-surface-bg-default flex w-full flex-col rounded-xl shadow-sm","py-s6 gap-s6 max-h-[75dvh]"],variants:{size:{small:["max-w-[19.5rem]"],medium:["max-w-[25rem]"],large:["max-w-[37.5rem]"],xLarge:["max-w-[60rem]]"]},smallScreenVariant:{dialog:[],fullScreen:["max-xs:h-full max-xs:max-h-full max-xs:w-full max-xs:max-w-full max-xs:rounded-none"],bottomSheet:["max-xs:max-w-full max-xs:rounded-b-none max-xs:rounded-t-xl max-xs:top-auto max-xs:bottom-[0] max-xs:translate-y-s0 max-xs:max-h-[calc(100dvh-1.5rem)]"]}},defaultVariants:{size:"medium",smallScreenVariant:"dialog"}});function m(e){let{className:t,children:s,size:n=u.defaultVariants.size,smallScreenVariant:o=u.defaultVariants.smallScreenVariant,slotProps:d={},...m}=e;return(0,r.jsxs)(a.ZJ,{children:[(0,r.jsx)(a.hJ,{id:"asdf",className:c()}),(0,r.jsxs)(a.UC,{className:u({className:t,size:n,smallScreenVariant:o}),...m,children:[s,(0,r.jsx)(a.bm,{...d.closeButton,asChild:!0,children:(0,r.jsx)(i.K,{className:"right-s2 top-s2 absolute",shape:"circle",variation:"tertiary",size:"sm",children:(0,r.jsx)(l.n,{})})})]})]})}let x=(0,n.tv)({base:["px-s6 gap-s2 flex flex-col"]});function f(e){let{className:t,...s}=e;return(0,r.jsx)("div",{className:x({className:t}),...s})}let h=(0,n.tv)({base:"prose-title-large line-clamp-2"});function p(e){let{className:t,...s}=e;return(0,r.jsx)(a.hE,{className:h({className:t}),...s})}(0,n.tv)({base:"prose-body-medium line-clamp-2"});let v=(0,n.tv)({base:["gap-s2 px-s6 flex justify-end"]});function g(e){let{className:t,...s}=e;return(0,r.jsx)("div",{className:v({className:t}),...s})}let b=(0,n.tv)({base:["px-s6 relative flex h-full flex-auto flex-col overflow-y-auto"]});function j(e){let{className:t,...s}=e;return(0,r.jsx)("div",{className:b({className:t}),...s})}},93114:(e,t,s)=>{"use strict";s.d(t,{K:()=>d});var r=s(36636),a=s(71959),l=s(48400),n=s(40105),i=s(71640);let o=(0,n.tv)({base:i.r.base,defaultVariants:{size:"md",variation:"primary",color:"primary",shape:"square"},variants:{...i.r.variants,size:{lg:["size-[3rem] *:size-[1.25rem]"],md:["size-[2.5rem] *:size-[1.125rem]"],sm:["size-[2rem] *:size-[1.125rem]"]},shape:{circle:"rounded-full",square:"rounded-md"}},compoundVariants:i.r.compoundVariants}),d=(0,l.forwardRef)((e,t)=>{let{className:s,variation:l,size:n,color:i,asChild:d=!1,children:c,shape:u,...m}=e,x=d?a.DX:"button";return(0,r.jsx)(x,{className:o({variation:l,size:n,color:i,shape:u,className:s}),ref:t,...m,children:c})});d.displayName="IconButton"},27622:(e,t,s)=>{"use strict";s.d(t,{p:()=>d});var r=s(36636),a=s(48400),l=s(40105);let n=(0,l.tv)({base:["bg-surface-bg-default relative flex items-center","outline-accent-border-default outline-2 outline-offset-[-1px] has-[:focus]:outline","[&:not(:has(:disabled))]:hover:ring-surface-border-strong ring-surface-border-default ring-1","font-body text-body-medium"],defaultVariants:{size:"md",error:!1,disabled:!1},variants:{size:{md:["leading-body-small h-s10 rounded-sm"],lg:["leading-body-medium h-s12 rounded-md"]},error:{true:[]},disabled:{true:["has-[:disabled]:outline-surface-border-disabled has-[:disabled]:bg-surface-bg-disabled","text-surface-text-disabled"]}},compoundVariants:[{disabled:!1,error:!0,className:["outline-negative-border-default outline"]}]}),i=(0,l.tv)({base:["px-s3 placeholder-surface-text-placeholder w-full bg-transparent outline-none"],defaultVariants:{size:"md"},variants:{size:{md:["h-s10"],lg:["h-s12"]},startIcon:{true:[]},endIcon:{true:[]}},compoundVariants:[{size:"md",startIcon:!0,className:["pl-s9"]},{size:"lg",startIcon:!0,className:["pl-s10"]},{size:"md",endIcon:!0,className:["pr-s9"]},{size:"lg",endIcon:!0,className:["pr-s10"]}]}),o=(0,l.tv)({base:"absolute flex items-center justify-center",defaultVariants:{size:"md"},variants:{size:{md:"size-s4",lg:"size-s5"},left:{true:["left-s3"]},right:{true:["right-s3"]}}}),d=(0,a.forwardRef)((e,t)=>{let{className:s,size:a,error:l,disabled:d,startIcon:c,endIcon:u,...m}=e;return(0,r.jsxs)("div",{className:n({size:a,error:l,disabled:d,className:s}),children:[c&&(0,r.jsx)("span",{className:o({size:a,left:!0}),children:c}),(0,r.jsx)("input",{ref:t,className:i({size:a,startIcon:!!c,endIcon:!!u}),disabled:d,...m}),u&&(0,r.jsx)("span",{className:o({size:a,right:!0}),children:u})]})});d.displayName="Input"}},e=>{var t=t=>e(e.s=t);e.O(0,[4598,6692,2205,4375,4062,7962,5106,3716,7211,1895,5939,4387,7358],()=>t(74253)),_N_E=e.O()}]);