PageSourceSearch

https://grizedaleobservatory.com/wp-content/plugins/woocommerce-gi…/blocks.min.js?ver=a3763951217942a91d4b

js grizedaleobservatory.com collected 2026-10-06 15:15:27 UTC 14,749 bytes, 1 lines download raw bytes

1(()=>{var r={485(e,a){var s;function i(){for(var e=[],a=0;a<arguments.length;a++){var r=arguments[a];if(r){var t,o=typeof r;if("string"==o||"number"==o)e.push(r);else if(Array.isArray(r))r.length&&(t=i.apply(null,r))&&e.push(t);else if("object"==o)if(r.toString===Object.prototype.toString)for(var c in r)s.call(r,c)&&r[c]&&e.push(c);else e.push(r.toString())}}return e.join(" ")}s={}.hasOwnProperty,e.exports?e.exports=i.default=i:void 0!==(a=function(){return i}.apply(a,[]))&&(e.exports=a)},20(e,a,r){var r=r(609),i=Symbol.for("react.element"),t=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,l=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function o(e,a,r){var t,o={},c=null,s=null;for(t in void 0!==r&&(c=""+r),void 0!==a.key&&(c=""+a.key),void 0!==a.ref&&(s=a.ref),a)n.call(a,t)&&!d.hasOwnProperty(t)&&(o[t]=a[t]);if(e&&e.defaultProps)for(t in a=e.defaultProps)void 0===o[t]&&(o[t]=a[t]);return{$$typeof:i,type:e,key:c,ref:s,props:o,_owner:l.current}}a.Fragment=t,a.jsx=o,a.jsxs=o},848(e,a,r){e.exports=r(20)},609(e){e.exports=window.React}};let t={};function N(e){var a=t[e];return void 0!==a||(a=t[e]={exports:{}},r[e](a,a.exports,N)),a.exports}N.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return N.d(a,{a:a}),a},N.d=(e,a)=>{if(Array.isArray(a))for(var r=0;r<a.length;){var t=a[r++],o=a[r++];N.o(e,t)?0===o&&r++:0===o?Object.defineProperty(e,t,{enumerable:!0,value:a[r++]}):Object.defineProperty(e,t,{enumerable:!0,get:o})}else for(var t in a)N.o(a,t)&&!N.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},N.o=(e,a)=>Object.hasOwn(e,a);{let n=window.wc.wcSettings,m=()=>{var{show_balance_checkbox:e,show_remaining_balance_per_gift_card:a,is_ui_disabled:r,is_cart_disabled:t,is_redeeming_enabled:o,is_cart:c,is_checkout:s,account_orders_link:i}=(0,n.getSetting)("wc-gift-cards-blocks_data");return{isUiDisabled:r,isCartDisabled:t,isRedeemingEnabled:o,isCart:c,isCheckout:s,showBalanceCheckbox:e,showRemainingBalance:a,accountOrdersLink:i}},C=window.wc.blocksCheckout,f=window.wp.i18n,O=window.wp.element;var e=window.wp.data,a=window.wp.compose,R=N(485),S=N.n(R),T=N(848);let p=({children:e,className:a,screenReaderLabel:r,isLoading:t=!0})=>(0,T.jsxs)("div",{className:S()(a,{"wc-block-components-loading-mask":t}),children:[(0,T.jsx)("div",{className:S()({"wc-block-components-loading-mask__children":t}),"aria-hidden":t,children:e}),t&&(0,T.jsx)("span",{className:"screen-reader-text",children:r||(0,f.__)("Loading…","woocommerce-gift-cards")})]}),u=({className:e,id:a,type:r="text",ariaLabel:t,ariaDescribedBy:o,label:c,screenReaderLabel:s,disabled:i,autoCapitalize:n="off",autoComplete:l="off",value:d="",onChange:m,min:f,max:p,step:u,hasError:g=!1,required:w=!1,focusOnMount:h=!1,onBlur:_=()=>{}})=>{let[b,x]=(0,O.useState)(!0),[v,y]=(0,O.useState)(!1),j=(0,O.useRef)(null),k=((0,O.useEffect)(()=>{b&&h&&j.current?.focus(),x(!1)},[h,b]),"number"===r?{step:u,min:f,max:p}:{}),N={};return Object.keys(k).forEach(e=>{void 0!==k[e]&&(N[e]=k[e])}),(0,T.jsxs)("div",{className:S()("wc-gift-cards-text-input",e,{"is-active":v||d,"has-error":g}),children:[(0,T.jsx)("input",{type:r,id:a,value:d,ref:j,autoCapitalize:n,autoComplete:l,onChange:e=>{m(e.target.value)},onFocus:()=>y(!0),onBlur:e=>{_(e.target.value),y(!1)},"aria-label":t||c,"aria-invalid":!0===g,disabled:i,"aria-describedby":g?o:"",required:w,...N}),(0,T.jsx)(C.Label,{label:c,screenReaderLabel:s||c,wrapperElement:"label",wrapperProps:{htmlFor:a},htmlFor:a})]})},r=(0,a.compose)((0,e.withDispatch)(e=>{e=e("core/notices").createNotice;return{createNotice:e}}))(({extensions:e,createNotice:a})=>{let[r,t]=(0,O.useState)(""),[o,c]=(0,O.useState)(!1),[s,i]=(0,O.useState)(!1),[n,l]=(0,O.useState)("");if(!0==(!e||!e.hasOwnProperty("woocommerce-gift-cards")||!e["woocommerce-gift-cards"].hasOwnProperty("account_giftcards")))return null;let d=m().isCheckout;return(0,T.jsx)(C.Panel,{className:"wc-gift-cards-apply-panel",hasBorder:!1,initialOpen:!1,title:(0,f.__)("Have a gift card?","woocommerce-gift-cards"),children:(0,T.jsx)(p,{isLoading:o,children:(0,T.jsxs)("form",{className:"wc-gift-cards-form",children:[(0,T.jsx)(u,{id:"wc-gift-cards-form-input",label:(0,f.__)("Enter code","woocommerce-gift-cards"),type:"string",value:r,disabled:o,ariaDescribedBy:"validate-error-gift-card",onChange:e=>{t(e)},focusOnMount:!0,hasError:s&&""===r,errorMessage:n}),(0,T.jsx)(C.Button,{className:"wc-gift-cards-form__button",disabled:null===r||""===r||o,showSpinner:o,onClick:e=>{e.preventDefault(),(e=(e=r).trim()).match(/^([a-zA-Z0-9]{4}[\-]){3}[a-zA-Z0-9]{4}
1$/)?(c(!0),i(!1),l(""),(0,C.extensionCartUpdate)({namespace:"woocommerce-gift-cards",data:{action:"apply_gift_card_to_session",wc_gc_cart_code:e}}).then(()=>{var e=(0,f.__)("Gift card code has been applied.","woocommerce-gift-cards");a("default",e,{id:"wc-gift-cards-form-notice",type:"snackbar",context:d?"wc/checkout":"wc/cart"})}).catch(e=>{i(!0),e?.message&&"string"==typeof e.message?l(e.message):l((0,f.__)("An unknown error occurred.","woocommerce-gift-cards"))}).finally(()=>{c(!1),t("")})):(e=(0,f.__)("Please enter a gift card code that follows the format XXXX-XXXX-XXXX-XXXX, where X can be any letter or number.","woocommerce-gift-cards"),t(""),l(e),i(!0))},type:"submit",children:(0,f.__)("Apply","woocommerce-gift-cards")}),s&&(0,T.jsx)("div",{className:"wc-gift-cards-form__error",role:"alert",children:(0,T.jsx)(O.RawHTML,{id:"validate-error-gift-card",children:n})})]})})})}),t=e=>{var{className:e,extensions:a}=e;return(0,T.jsx)(C.TotalsWrapper,{className:e,children:(0,T.jsx)(r,{extensions:a})})},o=JSON.parse('{"name":"woocommerce/checkout-order-summary-gift-card-form-block","version":"1.0.0","title":"Gift Card Form","description":"Shows the apply gift card form.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/checkout-order-summary-block"],"textdomain":"woocommerce-gift-cards","apiVersion":2}'),d=window.wc.priceFormat,c=({extensions:e})=>{let{is_using_balance:a,available_total:r,pending_total:t}=e["woocommerce-gift-cards"],o=m().accountOrdersLink,[c,s]=(0,O.useState)(a),[i,n]=(0,O.useState)(!1);e=i;var l=(0,O.useMemo)(()=>{var e=(0,f.sprintf)((0,f.__)("Use %s from your gift cards balance.","woocommerce-gift-cards"),"<strong>"+(0,d.formatPrice)(r)+"</strong>"),a='<a href="'+o+'">'+(0,f.__)("pending orders","woocommerce-gift-cards")+"</a>",a=(0,f.sprintf)((0,f.__)("%1$s on hold in %2$s","woocommerce-gift-cards"),(0,d.formatPrice)(t),a);return(0,T.jsxs)(O.RawHTML,{className:"wc-gift-cards-checkbox-message",children:[e,0<t&&'<div class="wc-block-components-totals-item__description">'+a+"</div>"]})},[r,t,o]);return(0,T.jsx)(C.TotalsWrapper,{children:(0,T.jsx)("div",{className:S()("wc-gc-balance-checkbox-container",{"wc-gc-balance-checkbox-container--disabled":e}),children:(0,T.jsx)(C.CheckboxControl,{className:"wc-gc-balance-checkbox",id:"wc-gc-balance-checkbox",checked:c,onChange:e=>(e=e,n(!0),void(0,C.extensionCartUpdate)({namespace:"woocommerce-gift-cards",data:{action:"set_balance_usage",value:e?"yes":"no"}}).then(()=>{s(e=>!e)}).finally(()=>{n(!1)})),disabled:e,children:l})})})},g=({text:e,screenReaderText:a="",element:r="li",className:t="",radius:o="small",children:c=null,...s})=>{t=S()(t,"wc-block-components-chip","wc-block-components-chip--radius-"+o),o=Boolean(a&&a!==e);return(0,T.jsxs)(r,{className:t,...s,children:[(0,T.jsx)("span",{"aria-hidden":o,className:"wc-block-components-chip__text",children:e}),o&&(0,T.jsx)("span",{className:"screen-reader-text",children:a}),c]})};var L=(0,O.forwardRef)(({icon:e,size:a=24,...r},t)=>(0,O.cloneElement)(e,{width:a,height:a,...r,ref:t})),R=window.wp.primitives,P=(0,T.jsx)(R.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,T.jsx)(R.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})});let w=({ariaLabel:e="",className:a="",disabled:r=!1,onRemove:t=()=>{},removeOnAnyClick:o=!1,text:c,screenReaderText:s="",...i})=>{var n=o?"span":"button",l={"aria-label":e=e?e:"string"!=typeof(l=s&&"string"==typeof s?s:c)?(0,f.__)("Remove","woocommerce-gift-cards"):(0,f.sprintf)((0,f.__)('Remove gift card "%s"',"woocommerce-gift-cards"),l),disabled:r,onClick:t,onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||t()}},e=o?l:{},l=o?{"aria-hidden":!0}:l;return(0,T.jsx)(g,{...i,...e,className:S()(a,"is-removable",{"is-removing":r}),element:o?"button":i.element,screenReaderText:s,text:c,children:(0,T.jsx)(n,{className:"wc-block-components-chip__remove",...l,children:(0,T.jsx)(L,{className:"wc-block-components-chip__remove-icon",icon:P,size:16})})})},s=({giftcard:e,handleRemove:a})=>{var r=(0,d.getCurrency)();let[t,o]=(0,O.useState)(!1),{id:c,code:s,amount:i,balance:n,pending_message:l}=e;e=m().showRemainingBalance;return(0,T.jsx)(C.TotalsWrapper,{children:(0,T.jsx)(C.TotalsItem,{className:"wc-gift-cards-totals wc-block-components-totals-discount",currency:r,label:(0,f.__)("Gift Card:","woocommerce-gift-cards"),value:-1*parseInt(i,10),description:(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(w,{className:"wc-gift-cards-totals-giftcard__code-list-item",text:s,element:"div",radiu
1s:"large",screenReaderText:(0,f.sprintf)((0,f.__)("Gift Card: %s","woocommerce-gift-cards"),s),disabled:t,onRemove:()=>{o(!0),a(c)},ariaLabel:(0,f.sprintf)((0,f.__)('Remove gift card "%s"',"woocommerce-gift-cards"),s)},"gifcard-"+s),l&&(0,T.jsx)(O.RawHTML,{children:l}),e&&(0,T.jsxs)("div",{children:[(0,T.jsx)("strong",{children:(0,f.__)("Remaining Balance:","woocommerce-gift-cards")}),(0,T.jsx)("div",{children:(0,d.formatPrice)(n-i)})]})]})})})},i=(0,a.compose)((0,e.withDispatch)(e=>{e=e("core/notices").createNotice;return{createNotice:e}}))(({extensions:e,createNotice:a})=>{e=e["woocommerce-gift-cards"].applied_giftcards;if(!e.length)return null;let r=m().isCheckout,t=e=>{(0,C.extensionCartUpdate)({namespace:"woocommerce-gift-cards",data:{action:"remove_gift_card_from_session",wc_gc_remove_id:e}}).then(()=>{var e=(0,f.__)("Gift card code has been removed.","woocommerce-gift-cards");a("default",e,{id:"wc-gift-cards-removed-gift-card",type:"snackbar",context:r?"wc/checkout":"wc/cart"})}).catch(()=>{})};return e.map(e=>(0,T.jsx)(s,{giftcard:e,handleRemove:t},"giftcard-"+e.id))}),l=({extensions:e})=>{var a,r,{account_giftcards:e,balance:t,available_total:o}=e["woocommerce-gift-cards"];return 0===e.length?null:(a=(0,d.getCurrency)(),r=e.reduce((e,a)=>e+=parseInt(a.amount,10),0),(0,T.jsx)(T.Fragment,{children:(0,T.jsx)(C.TotalsWrapper,{children:(0,T.jsx)(C.TotalsItem,{className:"wc-gift-cards-totals wc-block-components-totals-discount",currency:a,label:(0,f.__)("Gift Cards Balance","woocommerce-gift-cards"),value:-1*r,description:(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("strong",{children:(0,f._n)("Code:","Codes:",e.length,"woocommerce-gift-cards")}),(0,T.jsx)("ul",{className:"wc-block-components-totals-discount__coupon-list",children:e.map(e=>(0,T.jsx)(g,{className:"wc-block-components-totals-discount__coupon-list-item",text:e.code,radius:"large",screenReaderText:(0,f.sprintf)((0,f.__)("Gift Card: %s","woocommerce-gift-cards"),e.code)},"account-giftcard-"+e.code))}),(0,T.jsx)("strong",{children:(0,f.__)("Remaining Balance:","woocommerce-gift-cards")}),(0,T.jsx)("div",{children:(0,d.formatPrice)(t-o)})]})})})}))},h=({extensions:e})=>{var a,r;return!0!=(!e||!e.hasOwnProperty("woocommerce-gift-cards")||!e["woocommerce-gift-cards"].hasOwnProperty("account_giftcards"))&&({cart_total:e,applied_giftcards:r,account_giftcards:a}=e["woocommerce-gift-cards"],r.length||a.length)?(r=(0,d.getCurrency)(),(0,T.jsx)(C.TotalsWrapper,{children:(0,T.jsx)(C.TotalsItem,{className:"wc-gift-cards-totals wc-block-components-totals-footer-item",currency:r,label:(0,f.__)("Total","woocommerce-gift-cards"),value:parseInt(e,10),description:(0,f.__)("(before gift cards)","woocommerce-gift-cards")})})):null},_=e=>{var a,r,t,o;return!0==(!e.extensions||!e.extensions.hasOwnProperty("woocommerce-gift-cards")||!e?.extensions["woocommerce-gift-cards"].hasOwnProperty("account_giftcards"))?null:({balance:o,available_total:a}=e.extensions["woocommerce-gift-cards"],{isRedeemingEnabled:r,showBalanceCheckbox:t}=m(),o=0<o&&r&&t,(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(h,{...e}),(0,T.jsx)(i,{...e}),o&&0<a&&(0,T.jsx)(c,{...e}),o&&(0,T.jsx)(l,{...e})]}))},b=e=>{var a=e.className;return(0,T.jsx)("div",{className:a,children:(0,T.jsx)(_,{...e})})},x=JSON.parse('{"name":"woocommerce/checkout-order-summary-gift-card-totals-block","version":"1.0.0","title":"Gift Card Totals","description":"Shows the gift card totals.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/checkout-order-summary-block"],"textdomain":"woocommerce-gift-cards","apiVersion":2}'),v=e=>{var{className:e,extensions:a}=e;return(0,T.jsx)(C.TotalsWrapper,{className:e,children:(0,T.jsx)(r,{extensions:a})})},y=JSON.parse('{"name":"woocommerce/cart-order-summary-gift-card-form-block","version":"1.0.0","title":"Gift Card Form","description":"Shows the apply gift card form.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/cart-order-summary-block"],"textdomain":"woocommerce-gift-cards","apiVersion":2}'),j=e=>{var a=e.className;return(0,T.jsx)("div",{className:a,children:(0,T.jsx)(_,{...e})})},k=JSON.parse('{"name":"woocommerce/cart-order-summary-gift-card-totals-block","version":"1.0.0","title":"Gift Card Totals","description":"Shows the gift card totals.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/cart-order-summary-block"],"textdomain":"woocommerce-gift-cards","apiVersion":2}');(()=>{var{isCartDisabled:e,isUiDisabled:a}=m();a||((0,C.registerCheckoutBlock)({metadata:o,component:e=>(0,T.jsx)(t,{...e})}),(0,C.registerCheckoutBlock)({metadata:x,component:e=>(0,T.jsx)(b,{...e})}),e)||((0,C.registerCheckoutBlock)({metadata:y,component:e=>(0,T.jsx)(v,{...e})}),(0,C.registerCheckoutBlock)({metadata:k,component:e=>(0,T.jsx)(j,{...e})}))})()}})();

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.