PageSourceSearch

https://ecomitram.org/_next/static/chunks/2098-4d2d7e8956bb672a.js

js ecomitram.org collected 2026-10-10 01:45:43 UTC 9,379 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2098,5114],{35114:(e,t,r)=>{r.d(t,{apiMutate:()=>n});var a=r(78079);async function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{return await (0,a.uE)(e,t)}catch(e){if(e instanceof a.hD&&401===e.status&&"AUTH_REQUIRED"===e.errorCode){var r;null==(r=(0,a.uA)())||r()}throw e}}},47104:(e,t,r)=>{r.d(t,{cn:()=>s});var a=r(77786),n=r(97721);function s(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,n.QP)((0,a.$)(t))}},60582:(e,t,r)=>{r.d(t,{As:()=>a.useAuth,BG:()=>a.useAuthActions,Xi:()=>a.useAuthModal});var a=r(44996);r(24404),r(85785),r(4993)},60685:(e,t,r)=>{r.d(t,{ProductReportButton:()=>x});var a=r(84157),n=r(60582),s=r(41865);let o=(0,r(20510).A)("flag",[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]);var i=r(74063),l=r(67283),d=r(35114),c=r(78079);let u={greenwash:"Greenwashing — eco claims seem false or exaggerated","poor-quality":"Poor quality — product does not meet expectations","broken-link":"Broken link — the Amazon page is unavailable",other:"Other"};function g(e){let{promotionId:t}
1=e,[r,n]=(0,s.useState)(!1),[g,x]=(0,s.useState)(""),[h,p]=(0,s.useState)(""),[f,m]=(0,s.useState)(!1),[v,b]=(0,s.useState)(!1),[j,y]=(0,s.useState)(null),k=(0,s.useCallback)(async()=>{if(g){m(!0),y(null);try{await (0,d.apiMutate)("/solutions/".concat(t,"/report"),{method:"POST",body:{reason:g,...h.trim()?{note:h.trim()}:{}}}),b(!0)}catch(e){e instanceof c.hD?y(e.message||"Something went wrong. Please try again."):y("Something went wrong. Please try again.")}finally{m(!1)}}},[t,g,h]),w=(0,s.useCallback)(e=>{e||(x(""),p(""),b(!1),y(null)),n(e)},[]);return(0,a.jsxs)(i.lG,{open:r,onOpenChange:w,children:[(0,a.jsx)(i.zM,{asChild:!0,children:(0,a.jsx)("button",{type:"button","aria-label":"Report this product",title:"Report a problem with this product",className:"absolute top-2 right-2 w-7 h-7 bg-card/90 border border-border-soft rounded-full flex items-center justify-center text-muted-foreground hover:text-destructive hover:border-destructive/40 transition-colors",children:(0,a.jsx)(o,{className:"w-3 h-3",strokeWidth:1.8,"aria-hidden":"true"})})}),(0,a.jsx)(i.Cf,{className:"max-w-sm",children:v?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i.c7,{children:[(0,a.jsx)(i.L3,{children:"Report submitted"}),(0,a.jsx)(i.rr,{children:"Thanks, we’ll review it. If the product violates our guidelines, it will be removed."})]}),(0,a.jsx)(i.Es,{children:(0,a.jsx)(l.$,{onClick:()=>w(!1),children:"Close"})})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i.c7,{children:[(0,a.jsx)(i.L3,{children:"Report this product"}),(0,a.jsx)(i.rr,{children:"Help us keep the catalog trustworthy. Select a reason and we’ll review it."})]}),(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsxs)("label",{htmlFor:"report-reason-".concat(t),className:"text-[13px] font-medium text-foreground",children:["Reason ",(0,a.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,a.jsxs)("select",{id:"report-reason-".concat(t),value:g,onChange:e=>x(e.target.value),className:"w-full rounded-lg border border-input bg-background px-3 py-2 text-[13px] text-foreground focus:outline-none focus:ring-2 focus:ring-ring",children:[(0,a.jsx)("option",{value:"",disabled:!0,children:"Select a reason…"}),Object.entries(u).map(e=>{let[t,r]=e;return(0,a.jsx)("option",{value:t,children:r},t)})]})]}),(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsxs)("label",{htmlFor:"report-note-".concat(t),className:"text-[13px] font-medium text-foreground",children:["Additional details"," ",(0,a.jsx)("span",{className:"text-muted-foreground font-normal",children:"(optional)"})]}),(0,a.jsx)("textarea",{id:"report-note-".concat(t),value:h,onChange:e=>p(e.target.value),rows:3,maxLength:300,placeholder:"Describe the issue…",className:"w-full resize-none rounded-lg border border-input bg-background px-3 py-2 text-[13px] text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring"})]}),j&&(0,a.jsx)("p",{className:"text-[12px] text-destructive",role:"alert",children:j})]}),(0,a.jsxs)(i.Es,{children:[(0,a.jsx)(l.$,{variant:"outline",onClick:()=>w(!1),disabled:f,children:"Cancel"}),(0,a.jsx)(l.$,{variant:"destructive",onClick:()=>void k(),disabled:f||!g,children:f?"Submitting…":"Submit report"})]})]})})]})}function x(e){let{promotionId:t}=e,{user:r}=(0,n.As)();return(null==r?void 0:r.type)!=="verified"?null:(0,a.jsx)(g,{promotionId:t})}},67283:(e,t,r)=>{r.d(t,{$:()=>l,r:()=>i});var a=r(84157);r(41865);var n=r(12696),s=r(54572),o=r(47104);let i=(0,s.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function l(e){let{className:t,variant:r,size:s,asChild:l=!1,...d}=e,c=l?n.DX:"button";return(0,a.jsx)(c,{"data-slot":"button",className:(0,o.cn)(i({variant:r,size:s,className:t})),...d})}},67360:(e,t,r)=>{r.d(t,{ProductDescription:()=>s});var a=r(84157),n=r(41865);function s(e){let{text:t}=e,r=t.trim(),s=r.length>
1120,[o,i]=(0,n.useState)(!1);return""===r?null:s?(0,a.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,a.jsx)("p",{className:o?"text-[12px] leading-[1.45] text-muted-foreground":"text-[12px] leading-[1.45] text-muted-foreground line-clamp-2",children:r}),(0,a.jsx)("button",{type:"button",onClick:()=>i(e=>!e),"aria-expanded":o,className:"self-start text-[11px] font-medium text-primary underline-offset-2 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-sm",children:o?"Read less":"Read more"})]}):(0,a.jsx)("p",{className:"text-[12px] leading-[1.45] text-muted-foreground",children:r})}},74063:(e,t,r)=>{r.d(t,{Cf:()=>u,Es:()=>x,L3:()=>h,c7:()=>g,lG:()=>i,rr:()=>p,zM:()=>l});var a=r(84157);r(41865);var n=r(27385),s=r(60501),o=r(47104);function i(e){let{...t}=e;return(0,a.jsx)(n.bL,{"data-slot":"dialog",...t})}function l(e){let{...t}=e;return(0,a.jsx)(n.l9,{"data-slot":"dialog-trigger",...t})}function d(e){let{...t}=e;return(0,a.jsx)(n.ZL,{"data-slot":"dialog-portal",...t})}function c(e){let{className:t,...r}=e;return(0,a.jsx)(n.hJ,{"data-slot":"dialog-overlay",className:(0,o.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...r})}function u(e){let{className:t,children:r,...i}=e;return(0,a.jsxs)(d,{"data-slot":"dialog-portal",children:[(0,a.jsx)(c,{}),(0,a.jsxs)(n.UC,{"data-slot":"dialog-content",className:(0,o.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...i,children:[r,(0,a.jsxs)(n.bm,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,a.jsx)(s.A,{}),(0,a.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function g(e){let{className:t,...r}=e;return(0,a.jsx)("div",{"data-slot":"dialog-header",className:(0,o.cn)("flex flex-col gap-2 text-center sm:text-left",t),...r})}function x(e){let{className:t,...r}=e;return(0,a.jsx)("div",{"data-slot":"dialog-footer",className:(0,o.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...r})}function h(e){let{className:t,...r}=e;return(0,a.jsx)(n.hE,{"data-slot":"dialog-title",className:(0,o.cn)("text-lg leading-none font-semibold",t),...r})}function p(e){let{className:t,...r}=e;return(0,a.jsx)(n.VY,{"data-slot":"dialog-description",className:(0,o.cn)("text-muted-foreground text-sm",t),...r})}}}]);

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.