PageSourceSearch

https://www.ru.is/_next/static/chunks/5389.85ff33bac8040477.js

js ru.is collected 2026-09-24 08:47:59 UTC 3,640 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5389],{15389:(e,t,s)=>{s.r(t),s.d(t,{GiftcardStatus:()=>u});var r=s(6029),a=s(32),i=s.n(a),l=s(79820),c=s(16525),n=s(58503),d=s(52497),o=s(90604),x=s(42043),m=s(55729);let u=e=>{var t;let{block:s}=e,a=(0,x.useTranslations)("blocks.giftcard-status"),[u,p]=(0,m.useState)(""),[h,g]=(0,m.useState)(null),[v,N]=(0,m.useState)(!1),j=async()=>{if(!u)return void(0,o.f)("error",a("empty-code"));N(!0);try{let{data:e}=await i()("/api/giftcards/".concat(u));e&&g(e)}catch(t){var e;console.error((null==t||null==(e=t.response)?void 0:e.data)||t),(0,o.f)("error",a("fetch-error"))}finally{N(!1)}},y=null!=(t=null==h?void 0:h.usage_limit_reached)?t:!!h&&h.usage_limit>0&&h.usage_count>=h.usage_limit,b=null==h?void 0:h.restrictions,f=[["restriction-include-products",null==b?void 0:b.include_products],["restriction-exclude-products",null==b?void 0:b.exclude_products],["restriction-include-categories",null==b?void 0:b.include_categories],["restriction-exclude-categories",null==b?void 0:b.exclude_categories]].map(e=>{let[t,s]=e;return{key:t,names:null!=s?s:[]}}).filter(e=>e.names.length>0);return(0,r.jsxs)("div",{className:"w-full mx-auto bg-white rounded-2xl shadow-md p-6 space-y-5",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 text-gray-800",children:[(0,r.jsx)(l.o,{className:"h-10 w-10 text-primary shrink-0"}),(0,r.jsx)("h6",{className:"font-semibold !mb-0",children:a("title")})]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(n.p,{className:"flex-1 min-w-0",placeholder:a("placeholder"),type:"text",value:u,onChange:e=>p(e.target.value),onKeyDown:e=>{"Enter"===e.key&&j()}}),(0,r.jsx)(c.$,{isLoading:v,spinnerClassName:"h-10 w-10 text-primary",onClick:j,className:"whitespace-nowrap shrink-0 ".concat(v?"!bg-white !text-primary !border-primary pointer-events-none":""),children:a("check")})]}),h&&(0,r.jsxs)("div",{className:"border-t border-gray-100 pt-5",children:[h.product_name&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"text-center text-textlight mb-2",children:[a("for-product"),":"," ",(0,r.jsx)("span",{className:"font-semibold text-gray-800",children:h.product_name})]}),(0,r.jsxs)("div",{className:"text-center text-textlight mb-2",children:[a("usage-limit"),":"," ",(0,r.jsxs)("span",{className:"font-semibold text-gray-800",children:[h.usage_count,"/",h.usage_limit]})]})]}),(0,r.jsxs)("div",{className:"text-center py-4 font-semibold",children:[(0,r.jsx)("div",{className:" uppercase tracking-widest mb-3",children:a("remaining")}),y&&h.product_name?(0,r.jsx)("div",{className:"text-[48px] text-primary mb-3",children:(0,d.$g)(0)}):(0,r.jsx)("div",{className:"text-[48px] text-primary mb-3",children:(0,d.$g)(parseInt(h.remaining_amount))}),y&&(0,r.jsx)("div",{className:"text-red-600 mb-3",children:a("usage-limit-reached")}),(0,r.jsxs)("div",{className:" text-textlight",children:[a("expires"),":"," ","No Expiration"!==h.coupon_expiry?h.coupon_expiry:a("no-expiration")]})]}),f.length>0&&(0,r.jsxs)("div",{className:"border-t border-gray-100 pt-4",children:[(0,r.jsx)("div",{className:"uppercase tracking-widest text-textlight mb-2 text-center",children:a("restrictions")}),(0,r.jsx)("dl",{className:"space-y-1",children:f.map(e=>(0,r.jsxs)("div",{className:"flex flex-wrap justify-center gap-x-2 text-center",children:[(0,r.jsxs)("dt",{className:"text-textlight",children:[a(e.key),":"]}),(0,r.jsx)("dd",{className:"font-semibold text-gray-800",children:e.names.join(", ")})]},e.key))})]})]}),!h&&!v&&(0,r.jsx)("p",{className:"text-sm text-gray-400 text-center pb-1",children:a("prompt")})]})}}}]);

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.