PageSourceSearch

https://jeffdabbsministries.com/_next/static/chunks/1r6jtfzjv0ik1.js

js jeffdabbsministries.com collected 2026-10-07 17:44:01 UTC 30,901 bytes, 4 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="2514d850-4d7d-b7cd-055e-f9cc9ff4e674")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,948138,e=>{e.v({addToCartModal:"AddToCartModal-module-scss-module__-hSo6a__addToCartModal",backdrop:"AddToCartModal-module-scss-module__-hSo6a__backdrop",bookTitle:"AddToCartModal-module-scss-module__-hSo6a__bookTitle",closeButton:"AddToCartModal-module-scss-module__-hSo6a__closeButton",dialog:"AddToCartModal-module-scss-module__-hSo6a__dialog",image:"AddToCartModal-module-scss-module__-hSo6a__image",imageMerch:"AddToCartModal-module-scss-module__-hSo6a__imageMerch",imageWrapper:"AddToCartModal-module-scss-module__-hSo6a__imageWrapper",noteText:"AddToCartModal-module-scss-module__-hSo6a__noteText",price:"AddToCartModal-module-scss-module__-hSo6a__price",productDetails:"AddToCartModal-module-scss-module__-hSo6a__productDetails",productLabel:"AddToCartModal-module-scss-module__-hSo6a__productLabel",titleRow:"AddToCartModal-module-scss-module__-hSo6a__titleRow"})},159319,846662,e=>{"use strict";var t=e.i(271645),r=e.i(810121),o=e.i(829310),n=e.i(887399),i=e.i(962008);let a=null,s=null,d=async()=>a||(s||(s=(0,n.getEcommerceConfig)().then(e=>a=(0,o.resolveCurrencyCode)(e.storeCurrency)).catch(()=>r.DEFAULT_STORE_CURRENCY).finally(()=>{s=null})),s);function l(){let[e,o]=(0,t.useState)(a??r.DEFAULT_STORE_CURRENCY);return(0,t.useEffect)(()=>{if(a)return;let e=!0;return d().then(t=>{e&&o(t)}),()=>{e=!1}},[]),e}function c(){let{globalData:e,globalPreviewData:t}=(0,i.useStoreContext)(),r=e?.storeCurrency??t?.storeCurrency;return(0,o.resolveCurrencyCode)(r)}e.s(["invalidateStoreCurrencyCache",0,()=>{a=null},"useSiteEditorCurrencyPrefix",0,function(e){let t=l();return(0,o.getSiteEditorCurrencyPrefix)(e??t)},"useSiteStoreCurrency",0,c,"useStoreCurrency",0,l,"useStorePriceBounds",0,function(){let e=l(),t=(0,r.getMinimumProductPrice)(e);return{minPrice:t,minPriceLabel:(0,o.formatStoreCurrency)(t,e),maxPriceLabel:(0,o.formatStoreCurrency)(r.MAX_MERCHANDISE_PRICE,e)}}],159319);var u=e.i(843476),p=e.i(37727),_=e.i(799642),E=e.i(501408),m=e.i(865426),S=e.i(215302),T=e.i(76368),R=e.i(570066),y=e.i(792851),g=e.i(657121),h=e.i(698436),f=e.i(217211),C=e.i(444362),O=e.i(278451),A=e.i(703841),P=e.i(327470),b=e.i(948138);e.s(["default",0,function({show:e,onHide:r,cartItem:n,onCheckout:a,container:s,checkoutError:d,isCheckingOut:l}){let I,{globalData:D}=(0,i.useStoreContext)(),k=c(),N=(0,O.useFeatureFlagsContext)(),{isFeatureFlagActive:L}=(0,C.useFeatureFlags)(N),M=L(E.FEATURE_FLAG.THEMES_AS_PRESETS),U=(0,t.useMemo)(()=>
2(0,f.getThemeBackgroundColor)(D?.site?.themeOptions,M),[D?.site?.themeOptions,M]),v=(0,t.useMemo)(()=>U?(0,R.getModalStylesByBrightness)(U):{overlayOpacity:.75,modalDropshadowOpacity:.5,modalBackgroundColor:void 0},[U]);if(t.default.useEffect(()=>{if(e){let e=("function"==typeof s?s():s)||document.documentElement;return e.style.setProperty("--modal-overlay-opacity",v.overlayOpacity.toString()),e.style.setProperty("--modal-dropshadow-opacity",v.modalDropshadowOpacity.toString()),v.modalBackgroundColor&&e.style.setProperty("--modal-background-color",v.modalBackgroundColor),()=>{e.style.removeProperty("--modal-overlay-opacity"),e.style.removeProperty("--modal-dropshadow-opacity"),e.style.removeProperty("--modal-background-color")}}},[e,v,s]),!n)return null;let x=(0,y.isMerchCartItem)(n),F=n.product.title&&n.product.title!==n.book.bookTitle?n.product.title:"",H=(0,y.isPhysicalCartItem)(n)&&n.product.binding?m.BINDING_TYPE_LABELS[n.product.binding]:n.product.mediaType?m.MEDIA_TYPE_LABELS[n.product.mediaType]:"";return(0,u.jsxs)(_.Modal,{show:e,onHide:r,centered:!0,className:b.default.addToCartModal,container:s,enforceFocus:!1,backdropClassName:b.default.backdrop,dialogClassName:b.default.dialog,"data-sentry-element":"Modal","data-sentry-component":"AddToCartModal","data-sentry-source-file":"index.tsx",children:[(0,u.jsxs)(_.Modal.Header,{"data-sentry-element":"Modal.Header","data-sentry-source-file":"index.tsx",children:[(0,u.jsx)(_.Modal.Title,{"data-sentry-element":"Modal.Title","data-sentry-source-file":"index.tsx",children:m.ECOMMERCE.ADDED_TO_CART}),(0,u.jsx)("button",{type:"button",className:b.default.closeButton,onClick:r,"aria-label":S.GLOBAL.CLOSE,children:(0,u.jsx)(p.X,{size:30,"data-sentry-element":"X","data-sentry-source-file":"index.tsx"})})]}),(0,u.jsxs)(_.Modal.Body,{"data-sentry-element":"Modal.Body","data-sentry-source-file":"index.tsx",children:[d&&(0,u.jsx)("p",{className:"text-danger text-center w-100 mb-2",children:d}),n.book.bookImages?.[0]?.src&&(0,u.jsx)("div",{className:b.default.imageWrapper,children:(0,u.jsx)(P.default,{src:n.book.bookImages[0].src,alt:n.book.bookTitle||m.ECOMMERCE.BOOK_COVER_ALT,className:(0,T.classNames)(b.default.image,x&&b.default.imageMerch),priority:!0})}),(0,u.jsxs)("div",{className:b.default.titleRow,children:[(0,u.jsx)("h3",{className:b.default.bookTitle,children:n.book.bookTitle}),(0,u.jsx)("p",{className:b.default.price,children:(0,o.formatStoreCurrency)(n.product.price??0,k)})]}),(0,u.jsxs)("div",{className:b.default.productDetails,children:[F?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("p",{className:b.default.productLabel,children:F}),H&&(0,u.jsx)("p",{className:b.default.noteText,children:H})]}):H&&(0,u.jsx)("p",{className:b.default.productLabel,children:H}),(0,y.isPhysicalCartItem)(n)?(0,u.jsx)("p",{className:b.default.noteText,children:(0,g.formatShippingLabel)(n.product,(0,h.resolveProductShippingConfig)(D?.shippingConfig,D?.shippingProfiles,n.product.id),D?.domesticCountry)}):(I=(0,g.formatDeliveryLabel)(n.product),(0,u.jsxs)(u.Fragment,{children:[n.product.formats&&(0,u.jsx)("p",{className:b.default.noteText,children:(0,g.formatProductFormats)(n.product)}),I&&(0,u.jsx)("p",{className:b.default.noteText,children:I})]}))]})]}),(0,u.jsxs)(_.Modal.Footer,{"data-sentry-element":"Modal.Footer","data-sentry-source-file":"index.tsx",children:[(0,u.jsx)(A.GlobalButton,{variant:"dark",className:"w-100",onClick:a,disabled:l,loading:l,"data-sentry-element":"GlobalButton","data-sentry-source-file":"index.tsx",children:m.ECOMMERCE.CHECK_OUT}),(0,u.jsx)(A.GlobalButton,{variant:"outline-dark",className:"w-100",onClick:r,"data-sentry-element":"GlobalButton","data-sentry-source-file":"index.tsx",children:m.ECOMMERCE.CONTINUE_SHOPPING})]})]})}],846662)},149792,792851,e=>{"use strict";var t=e.i(271645),r=e.i(618566),o=e.i(810121),n=e.i(899297),i=e.i(605796),a=e.i(719525),s=e.i(392645),d=e.i(865426),l=e.i(334255),c=e.i(887399),u=e.i(429741),p=e.i(969298),_=e.i(128331),E=e.i(241279),m=e.i(305957),S=e.i(962008),T=e.i(657121);let R=e=>e?.filter(e=>!e.isInactive)||[],y=e=>{let t=(0,T.parseBuyerStockCount)(e.stockQuantity);return{...null!=e.trackInventory&&{trackInventory:e.trackInventory},...null!=t&&{stockQuantity:t},...null!=e.isStockZero&&{isStockZero:e.isStockZero}}},g=e=>(0,T.isPhysicalProduct)(e.product.type),h=e=>!!e.isMerch||!e.book?.id,f=(e,t)=>(0,T.getBuyerAvailableStock)(((e,t)=>{let r=e.product?.id;if(t&&r){if(h(e)){for(let e of t.merchandise??[]){let t=e.variants?.find(e=>e.internalIdentifier===r);if(t)return t;if(e.variantId===r)return e}return}for(let e of t.books??t.books_ordered??[]){let t=e.products?.find(e=>e.id===r);if(t)return t}}})(e,t)??e.product),C=(e,t)=>Math.max(1,Math.min(e,o.MAX_CART_ITEM_QUANTITY,t??o.MAX_CART_ITEM_QUANTITY)),O=(e,t)=>{let r=new Map(t.map(e=>[e.strapi_product_id,e.available]));return{updatedCart:e.flatMap(e=>{let t=r.get(e.product?.id);return null==t?[e]:t<=0?[]:[{...e,quantity:Math.min(e.quantity??1,t,o.MAX_CART_ITEM_QUANTITY)}]}),reduced:e.reduce((e,t)=>
2{let o=r.get(t.product?.id);return null!=o&&o>=1&&e.push({item:t,available:o}),e},[])}},A=e=>{if(0===e.length)return d.ECOMMERCE.CHECKOUT_INVALID_CART_ERROR;if(1===e.length){let{item:t,available:r}=e[0],o=t.product?.title||(t.product?.binding?d.BINDING_TYPE_LABELS[t.product.binding]:""),n=h(t)?d.ECOMMERCE.STOCK_UNIT_ITEM:d.ECOMMERCE.STOCK_UNIT_COPY;return o?d.ECOMMERCE.CHECKOUT_INSUFFICIENT_STOCK_ERROR(o,r,n):d.ECOMMERCE.CHECKOUT_INSUFFICIENT_STOCK_ERROR_MULTIPLE}return d.ECOMMERCE.CHECKOUT_INSUFFICIENT_STOCK_ERROR_MULTIPLE};e.s(["applyInsufficientStock",0,O,"clampCartQuantity",0,C,"createCartItem",0,({book:e,product:t,authorName:r,bookUrl:o})=>({book:{id:e.id,bookTitle:e.bookTitle,bookAuthor:r,bookImages:e.bookImages,bookUrl:o},product:{id:t.id,title:t.title,description:t.description,price:t.price,mediaType:t.mediaType,type:t.type,binding:t.binding,formats:t.formats,...y(t)},quantity:1}),"createMerchCartItem",0,({merchandise:e,productHref:t,heroImageSrc:r,variant:o})=>{let n=o?.internalIdentifier??e.variantId;if(!n)return null;let i=o?.title||e.title;return{book:{bookTitle:e.title,bookUrl:t,...r&&{bookImages:[{src:r}]}},product:{id:n,title:i,description:e.description,price:o?.price??e.price,type:e.kind,...y(o??e)},quantity:1,isMerch:!0}},"getActiveProducts",0,R,"insufficientStockMessage",0,A,"isMerchCartItem",0,h,"isPhysicalCartItem",0,g,"resolveCartItemAvailability",0,f],792851);let P=e=>({product_id:e.product?.id||"",product_name:e.product?.title||"",book_title:e.book?.bookTitle||""}),b=()=>{let{globalData:e}=(0,S.useStoreContext)();return{isReadyToSell:e?.readyToSell??!1}};e.s(["useBookProductWebsite",0,({book:e})=>{let{isReadyToSell:t}=b(),r=R(e?.products).length>0;return{canShowProduct:t&&r}},"useCart",0,()=>{let{cart:e,updateCart:i,globalData:s}=(0,S.useStoreContext)(),{currentSiteSlug:l}=(0,_.useCurrentProperties)(),u=(0,r.useRouter)(),{trackEvent:E}=(0,p.default)(),[m,R]=(0,t.useState)(!1),[y,h]=(0,t.useState)(null),b=e=>f(e,s?.site),I=t=>{let r=e.find(e=>e.product?.id===t);i(e.filter(e=>e.product?.id!==t)),r&&E(n.ANALYTICS_EVENTS.ECOMMERCE_PRODUCT_REMOVED,P(r))},D=(0,t.useCallback)(()=>{i([])},[i]),k=async(t,r=!1)=>{if(m)return;h(null);let p=s?.site?.global?.internalSiteId;if(!p){console.error("Author ID not found"),h(d.ECOMMERCE.CHECKOUT_ERROR);return}let _=t||e;if(0===_.length){console.error("No products to checkout"),h(d.ECOMMERCE.CHECKOUT_ERROR);return}let S=_.map(e=>({strapi_product_id:e.product.id,quantity:e.quantity||1}));R(!0),E(n.ANALYTICS_EVENTS.ECOMMERCE_CHECKOUT_STARTED,{product_count:String(_.length),product_ids:S.map(e=>e.strapi_product_id),products:_.map(e=>({...P(e),price:String(e.product?.price??0)}))});try{let e=null;try{let t=await fetch("/api/client-id");t.ok&&(e=(await t.json()).clientIp)}catch(e){console.warn("Failed to get client IP:",e)}let t={site_id:p,items:S,...e&&{ip_location:e},accept_promotional_email:!!r},n=await (0,c.createEmbeddedCheckoutSession)(t);if(n?.client_secret){sessionStorage.setItem(o.EMBEDDED_CHECKOUT_SESSION_STORAGE_KEY,JSON.stringify({clientSecret:n.client_secret,siteId:p,hasPhysicalProducts:N})),u.push(`/${l}${a.PAGE_SLUG.CART}/checkout`),R(!1);return}console.error("No client_secret returned from embedded checkout session"),h(d.ECOMMERCE.CHECKOUT_ERROR),R(!1)}catch(t){if(console.error("Error creating checkout session:",t),t?.error_code===o.ECOMMERCE_ERROR_CODE.INVALID_CART&&Array.isArray(t?.details)){let r=t.details;i(e.filter(e=>!r.includes(e.product?.id))),h(d.ECOMMERCE.CHECKOUT_INVALID_CART_ERROR)}else if(t?.error_code===o.ECOMMERCE_ERROR_CODE.INSUFFICIENT_STOCK&&Array.isArray(t?.details)){let{updatedCart:r,reduced:o}=O(e,t.details);i(r),h(A(o))}else h(d.ECOMMERCE.CHECKOUT_ERROR);R(!1)}},N=e.some(g);return{cart:e,getCartCount:()=>e.reduce((e,t)=>e+(t.quantity||1),0),addToCart:t=>{if((0,T.isPhysicalProduct)(t.product?.type)){let r=e.findIndex(e=>e.product?.id===t.product?.id);if(r>=0){let o=[...e];o[r]={...o[r],quantity:C((o[r].quantity??1)+1,b(o[r]))},i(o),E(n.ANALYTICS_EVENTS.ECOMMERCE_ADDED_TO_CART,{...P(t),price:String(t.product?.price??0)});return}}i([...e,t]),E(n.ANALYTICS_EVENTS.ECOMMERCE_ADDED_TO_CART,{...P(t),price:String(t.product?.price??0)})},updateQuantity:(t,r)=>{r<=0?I(t):i(e.map(e=>e.product?.id===t?{...e,quantity:C(r,b(e))}:e))},getItemAvailability:b,isProductInCart:t=>e.some(e=>e.product?.id===t),removeFromCart:I,clearCart:D,goToCart:()=>{u.push(`/${l}${a.PAGE_SLUG.CART}`)},checkout:k,isCheckingOut:m,checkoutError:y,clearCheckoutError:()=>h(null),cartHasPhysicalProducts:N}},"useEcommerceAccess",0,()=>{let{hasFeatureAccess:e}=(0,E.useFeatureAccess)();return{isEcommerceActive:e(s.FEATURE_ACCESS.ECOMMERCE)}},"useEcommerceWebsite",0,b,"useReceiptDownload",0,()=>{let[e,r]=(0,t.useState)(!1),{showToast:o}=(0,m.useToast)();return{handleDownloadReceipt:async e=>{r(!0);try{let t=await (0,c.getOrderReceiptLink)(e);(0,u.openInNewTab)(t.url)}catch(e){o({message:l.SHARED_ORDERS.RECEIPT_DOWNLOAD_ERROR,type:i.TOAST_TYPE.DANGER.name,withCloseButton:!0})}finally{r(!1)}},isDownloadingReceipt:e}}],149792)},887399,e=>{"use strict";
2var t=e.i(815126),r=e.i(865426),o=e.i(142713),n=e.i(334255),i=e.i(404427),a=e.i(361892),s=e.i(799819),d=e.i(698436);let l=e=>e?{country:e.country??null,payoutCurrency:e.payout_currency??null,storeCurrency:e.store_currency??null,onboardingDetailsSubmitted:e.onboarding_details_submitted??!1,domesticFlatRate:"number"==typeof e.domestic_flat_rate?e.domestic_flat_rate:s.DEFAULT_DOMESTIC_FLAT_RATE,internationalShippingEnabled:e.international_shipping_enabled??!1,internationalFlatRate:"number"==typeof e.international_flat_rate?e.international_flat_rate:s.DEFAULT_INTERNATIONAL_FLAT_RATE,shippingNotice:"string"==typeof e.shipping_notice?e.shipping_notice:null}:{country:null,payoutCurrency:null,storeCurrency:null,onboardingDetailsSubmitted:!1,domesticFlatRate:s.DEFAULT_DOMESTIC_FLAT_RATE,internationalShippingEnabled:!1,internationalFlatRate:s.DEFAULT_INTERNATIONAL_FLAT_RATE,shippingNotice:null};var c=e.i(80767),u=e.i(107531),p=e.i(892182),_=e.i(61487);async function E(e){return(0,p.apiRequestHandler)({endpoint:"/ecommerce/checkout/direct/create-embedded-checkout-session",method:"POST",body:e,statusSendSentry:p.SENTRY_REPORTED_STATUSES})}async function m(e){return(0,p.apiRequestHandler)({endpoint:"/ecommerce/checkout/direct/update-embedded-checkout-shipping",method:"POST",body:e,statusSendSentry:p.SENTRY_REPORTED_STATUSES})}async function S(){try{let e=await (0,p.apiRequestHandler)({endpoint:"/ecommerce/shipping/config",method:"GET",customErrorDescription:r.SHIPPING.LOAD_ERROR,statusSendSentry:p.SENTRY_REPORTED_STATUSES});return(0,s.normalizeShippingConfiguration)(e)}catch(e){return(0,_.handleApiError)({status:e?.status,message:e?.message||r.SHIPPING.LOAD_ERROR,data:e})}}let T="/ecommerce/shipping/profiles";async function R(e,t,r,o){try{let n=await (0,p.apiRequestHandler)({endpoint:e,method:t,customErrorDescription:r,statusSendSentry:p.SENTRY_REPORTED_STATUSES,...o&&{body:o}});return(0,d.normalizeShippingProfiles)(n)??{profiles:[],assignments:{}}}catch(e){return(0,_.handleApiError)({status:e?.status,message:e?.message||r,data:e})}}async function y(){try{let e=await (0,p.apiRequestHandler)({endpoint:"/ecommerce/config",method:"GET",customErrorDescription:r.ECOMMERCE_SETTINGS.LOAD_ERROR,statusSendSentry:p.SENTRY_REPORTED_STATUSES});if(!e||"string"==typeof e)return l(null);return l(e)}catch(e){return(0,_.handleApiError)({status:e?.status,message:e?.message||r.ECOMMERCE_SETTINGS.LOAD_ERROR,data:e})}}async function g(e){try{let t=await (0,p.apiRequestHandler)({endpoint:"/ecommerce/config",method:"POST",body:e,customErrorDescription:r.ECOMMERCE_SETTINGS.SAVE_ERROR,statusSendSentry:p.SENTRY_REPORTED_STATUSES});if(!t||0===Object.keys(t).length)return l(null);return l(t)}catch(e){return(0,_.handleApiError)({status:e?.status,message:e?.message||r.ECOMMERCE_SETTINGS.SAVE_ERROR,data:e})}}let h=e=>{let t=e??{};return{stockQuantity:t.stock_quantity,stockVersion:t.stock_version,stockConflict:!!t.stock_conflict}},f=e=>"number"!=typeof e.stock_quantity?{}:{stock_quantity:e.stock_quantity,..."number"==typeof e.stock_version&&{stock_version:e.stock_version}};async function C({productData:e}){return(0,p.apiRequestHandler)({endpoint:"/ecommerce/product",method:"POST",statusSendSentry:p.SENTRY_REPORTED_STATUSES,body:{id:e.id,label:e.label,book:e.book,price:e.price,type:e.type,...e.media_type&&{media_type:e.media_type},...null!=e.binding&&{binding:e.binding},..."boolean"==typeof e.is_sold_out&&{is_sold_out:e.is_sold_out},..."boolean"==typeof e.track_inventory&&{track_inventory:e.track_inventory},...f(e),...e.shipping_profile_id&&{shipping_profile_id:e.shipping_profile_id},is_inactive:e.is_inactive??!1}})}async function O({listingData:e,documentId:t}){let r="string"==typeof t&&t.length>0,o=await (0,p.apiRequestHandler)({endpoint:r?`/ecommerce/merchandise/${encodeURIComponent(t)}`:"/ecommerce/merchandise",method:r?"PUT":"POST",statusSendSentry:p.SENTRY_REPORTED_STATUSES,body:{title:e.title,...null!=e.slug&&{slug:e.slug},...null!=e.description&&{description:e.description},type:e.type,price:e.price,...e.gallery&&{gallery:e.gallery},is_inactive:e.is_inactive??!1,..."boolean"==typeof e.is_sold_out&&{is_sold_out:e.is_sold_out},..."boolean"==typeof e.track_inventory&&{track_inventory:e.track_inventory},...f(e),...e.shipping_profile_id&&{shipping_profile_id:e.shipping_profile_id},...e.options&&{options:e.options},...e.variants&&{variants:e.variants.map(e=>({choice_ids:e.choice_ids,..."number"==typeof e.price&&{price:e.price},..."boolean"==typeof e.is_inactive&&{is_inactive:e.is_inactive},...f(e)}))}}});return{listingId:o?.listing_id,slug:o?.slug,data:o?.data,...h(o),...Array.isArray(o?.variants)&&{variants:o.variants.map(e=>({internalIdentifier:e?.internal_identifier,choiceIds:Array.isArray(e?.choice_ids)?e.choice_ids:[],...e?.label&&{label:e.label},isInactive:!!e?.is_inactive,...h(e)}))}}}async function A(e){return(0,p.apiRequestHandler)({endpoint:`/ecommerce/merchandise/${encodeURIComponent(e)}`,method:"DELETE",statusSendSentry:p.SENTRY_REPORTED_STATUSES})}async function P(e){return(0,p.apiRequestHandler)({endpoint:"/ecommerce/merchandise/reorder",method:"POST",statusSendSentry:p.SENTRY_REPORTED_STATUSES,body:{merchandise_ids:e}})}async function b(e){let t=e?`?bookId=${encodeURIComponent(e)}`:"";return(0,p.apiRequestHandler)({endpoint:`/ecommerce/product/inventory${t}`,method:"GET",statusSendSentry:p.SENTRY_REPORTED_STATUSES})}async function I(e,t,r){return(0,p.apiRequestHandler)({endpoint:`/ecommerce/product/${encodeURIComponent(e)}/stock`,method:"PATCH",statusSendSentry:[500],body:{stock_quantity:t,..."number"==typeof r&&{stock_ver
2sion:r}}})}let D=async({page:e=0,size:t=10,status:r,source:o,refundedOnly:n}={})=>{let i=new URLSearchParams({page:e.toString(),size:t.toString()});return r&&i.set("status",r),o&&i.set("source",o),n&&i.set("refundedOnly","true"),(0,p.apiRequestHandler)({endpoint:`/orders?${i.toString()}`,method:"GET",statusSendSentry:p.SENTRY_REPORTED_STATUSES})};async function k({page:e=0,size:t=10,status:r,source:o,refundedOnly:n}={}){return D({page:e,size:t,status:r,source:o,refundedOnly:n})}async function N({status:e,source:t,refundedOnly:r}={}){return(await k({page:0,size:1,status:e,source:t,refundedOnly:r})).total_elements}let L=e=>({image:e.image,title:e.title,digitalMediaType:e.digitalMediaType??e.digital_media_type??e.digital_type??null,price:e.price,quantity:e.quantity??1,binding:e.binding??null,label:e.label??null}),M=e=>({image:e.image,title:e.title,digital_media_type:e.digital_media_type??e.digitalMediaType??e.digital_type??null,price:e.price,quantity:e.quantity??1,binding:e.binding??null,label:e.label??null}),U=e=>{if(null==e)return null;let t=Number(e);return Number.isFinite(t)?t:null};async function v(e){var r,o,n,i,a;let s,d,l,c,u;return r=await (0,p.apiRequestHandler)({endpoint:`/orders/${encodeURIComponent(e)}`,method:"GET",statusSendSentry:[500]}),s=(o=r.groupedProducts?.authorFulfilled??r.groupedProducts?.author_fulfilled??r.grouped_products?.authorFulfilled??r.grouped_products?.author_fulfilled)?{ecommerceOrderShippingId:o.ecommerceOrderShippingId??o.ecommerce_order_shipping_id??"",trackingNumber:o.trackingNumber??o.tracking_number??null,carrier:o.carrier??null,status:o.status??"UNFULFILLED",products:(o.products??[]).map(L)}:null,d=(n=r.groupedProducts?.digitalBooks??r.groupedProducts?.digital_books??r.grouped_products?.digitalBooks??r.grouped_products?.digital_books)?{status:n.status??"DELIVERED",products:(n.products??[]).map(L)}:null,l=(i=r.groupedProducts?.podBooks??r.groupedProducts?.pod_books??r.grouped_products?.podBooks??r.grouped_products?.pod_books)?{status:i.status??"FULFILLED",products:(i.products??[]).map(L),trackingNumber:i.trackingNumber??i.tracking_number??null,carrier:i.carrier??null}:null,c={store_currency:r.store_currency??r.storeCurrency??"usd",payout_currency:r.payout_currency??r.payoutCurrency??"usd",exchange_rate:U(r.exchange_rate??r.exchangeRate),total_paid_converted:U(r.total_paid_converted??r.totalPaidConverted)},{id:r.id,order_number:String(r.order_number??r.orderNumber??""),creation_date:r.creation_date??r.creationDate??"",status:r.status,products:(r.products??[]).map(M),subtotal:r.subtotal,tax:r.tax,processing_fee:r.processing_fee??r.processingFee??0,total:r.total??r.totalPaid,customer:{id:(u=r.customer).id??"",name:u.name??"",email:u.email??"",total_orders:u.total_orders??u.totalOrders??0,location:u.location??null,country:u.country,country_code:u.country_code??u.countryCode,city:u.city,latitude:u.latitude,longitude:u.longitude,first_order_creation_date:u.first_order_creation_date??u.firstOrderCreationDate??null,total_order_value:u.total_order_value??u.totalOrderValue??0,payout_currency:u.payout_currency??u.payoutCurrency??null,mailer_contact_id:u.mailer_contact_id??u.mailerContactId??""},total_paid:r.total_paid??r.totalPaid??0,net_proceeds:r.net_proceeds??r.netProceeds??0,refunded_amount:U(r.refunded_amount??r.refundedAmount),refunded_amount_converted:U(r.refunded_amount_converted??r.refundedAmountConverted),refund_status:r.refund_status??r.refundStatus??null,shippingInfo:(a=r.shippingInfo??r.shipping_info)?{recipientName:a.recipientName??a.recipient_name??"",addressLine1:a.addressLine1??a.address_line1??a.address_line_1??"",addressLine2:a.addressLine2??a.address_line2??a.address_line_2??null,city:a.city??"",state:a.state??null,postalCode:a.postalCode??a.postal_code??"",countryCode:a.countryCode??a.country_code??"",isDomestic:a.isDomestic??a.is_domestic??!1,shippingAmount:a.shippingAmount??a.shipping_amount??0}:null,groupedProducts:s||d||l?{authorFulfilled:s,digitalBooks:d,podBooks:l}:null,source:r.source??t.OrderSourceEnum.WEB,description:r.description??null,...c}}async function x(e,t){let r={tracking_number:(0,c.trimToNull)(t.trackingNumber)??null,carrier:(0,c.trimToNull)(t.carrier)??null},o=await (0,p.apiRequestHandler)({endpoint:`/orders/shipping/${e}/fulfill`,method:"PATCH",body:r,statusSendSentry:p.SENTRY_REPORTED_STATUSES});return{ecommerceOrderShippingId:o.ecommerceOrderShippingId??o.ec
2ommerce_order_shipping_id??o.id??e,orderId:o.orderId??o.order_id??"",trackingNumber:o.trackingNumber??o.tracking_number??null,carrier:o.carrier??null,status:o.status}}async function F({fileId:e}){return(0,p.apiRequestHandler)({endpoint:`/ecommerce/digital/files/${e}`,method:"DELETE",customErrorDescription:o.UPLOAD_ERROR.FAILED_TO_DELETE_DIGITAL_FILE,statusSendSentry:p.SENTRY_REPORTED_STATUSES})}async function H({strapi_document_id:e,format:t,size_bytes:r,content_type:n,original_filename:i,checksum_sha256:a}){return(0,p.apiRequestHandler)({endpoint:"/ecommerce/digital/files/sessions",method:"POST",customErrorDescription:o.UPLOAD_ERROR.FAILED_TO_CREATE_DIGITAL_FILE_SESSION,statusSendSentry:p.SENTRY_REPORTED_STATUSES,body:{strapi_document_id:e,format:t,size_bytes:r,content_type:n,original_filename:i,checksum_sha256:a}})}async function w({presignedUrl:e,fileData:t,contentType:r,contentLength:n,onProgress:i}){try{if(i){let a=(await function(e){let{url:t,method:r="PUT",headers:n={},data:i,onProgress:a}=e;return new Promise((e,s)=>{let d=new XMLHttpRequest,l=[],c=0,u=Date.now();a&&d.upload.addEventListener("progress",e=>{if(e.lengthComputable){let t=e.loaded/e.total*100,r=Date.now(),o=(r-u)/1e3,n=e.loaded-c,i=o>0?n/o:0;i>0&&(l.push(i),l.length>5&&l.shift());let s=l.length>0?l.reduce((e,t)=>e+t,0)/l.length:0;a(t,e.loaded,e.total,s),u=r,c=e.loaded}}),d.addEventListener("load",()=>{let t={};if(d.getAllResponseHeaders().split("\r\n").forEach(e=>{if(!e.trim())return;let r=e.indexOf(":");if(-1===r)return;let o=e.slice(0,r).trim(),n=e.slice(r+1).trim();o&&(t[o.toLowerCase()]=n||null)}),d.status>=200&&d.status<300){let r;try{r=d.responseText?JSON.parse(d.responseText):{}}catch{r=d.responseText}e({data:r,headers:t})}else{let e=Error(o.UPLOAD_ERROR.UPLOAD_FAILED_WITH_STATUS(d.status,d.statusText));e.status=d.status,e.statusText=d.statusText,e.responseBody=d.responseText,e.responseHeaders=t,s(e)}}),d.addEventListener("error",()=>{s(Error(o.UPLOAD_ERROR.UPLOAD_NETWORK_ERROR))}),d.addEventListener("abort",()=>{s(Error(o.UPLOAD_ERROR.UPLOAD_ABORTED))}),d.open(r,t),Object.keys(n).forEach(e=>{d.setRequestHeader(e,n[e])}),d.send(i)})}({url:e,method:"PUT",headers:{"Content-Type":r,"Content-Length":n.toString()},data:t,onProgress:i})).headers.etag;if(!a)throw Error(o.UPLOAD_ERROR.ETAG_NOT_FOUND);return{etag:a}}let a=await fetch(e,{method:"PUT",headers:{"Content-Type":r,"Content-Length":n.toString()},body:t});if(!a.ok){let e=await a.text().catch(()=>""),t={};a.headers.forEach((e,r)=>{t[r]=e});let r=Error(o.UPLOAD_ERROR.FAILED_TO_UPLOAD_PART(a.status,a.statusText));throw r.status=a.status,r.statusText=a.statusText,r.responseBody=e,r.responseHeaders=t,r}let s=a.headers.get("ETag");if(!s)throw Error(o.UPLOAD_ERROR.ETAG_NOT_FOUND);return{etag:s}}catch(i){let t=(()=>{try{return new URL(e).pathname}catch{return"unknown"}})();return u.default.sendError({error:i,message:i?.message??o.UPLOAD_ERROR.ERROR_UPLOADING_DIGITAL_FILE_PART,toConsole:!1,requestData:{presignedPath:t,contentType:r,contentLength:n},responseData:{status:i?.status,statusText:i?.statusText,responseBody:i?.responseBody,responseHeaders:i?.responseHeaders},tags:{endpoint:"s3-presigned-upload",statusCode:i?.status}}),(0,_.handleApiError)({message:i.message??o.UPLOAD_ERROR.ERROR_UPLOADING_DIGITAL_FILE_PART})}}async function q({uploadId:e,parts:t}){return(0,p.apiRequestHandler)({endpoint:`/ecommerce/digital/files/sessions/${e}/complete-multipart`,method:"POST",body:{parts:t},customErrorDescription:o.UPLOAD_ERROR.FAILED_TO_COMPLETE_MULTIPART_DIGITAL_FILE_SESSION,statusSendSentry:p.SENTRY_REPORTED_STATUSES})}async function G(e){return(0,p.apiRequestHandler)({endpoint:`/ecommerce/checkout/${e}/post-checkout`,method:"GET",statusSendSentry:[500],customErrorDescription:"Failed to get post-checkout information"})}async function B(e){return(0,p.apiRequestHandler)({endpoint:"/ecommerce/digital-file/downloads",method:"GET",params:{token:e},statusSendSentry:p.SENTRY_REPORTED_STATUSES})}async function Y(e,t,r){return(0,p.apiRequestHandler)({endpoint:`/ecommerce/digital-file/downloads/files/${e}/${t}`,method:"GET",params:{token:r},statusSendSentry:p.SENTRY_REPORTED_STATUSES})}async function $(e){return(0,p.apiRequestHandler)({endpoint:`/orders/${e}/receipt-link`,method:"GET",statusSendSentry:p.SENTRY_REPORTED_STATUSES})}async function j(e){return(0,p.apiRequestHandler)({endpoint:"/ecommerce/digital-file/downloads/request-new",method:"POST",params:{token:e},statusSendSentry:p.SENTRY_REPORTED_STATUSES})}async function K(e){return(0,p.apiRequestHandler)({endpoint:`/ecommerce/orders/${e}
2/download-link/refresh`,method:"POST",statusSendSentry:p.SENTRY_REPORTED_STATUSES})}async function V(e,t){return(0,p.apiRequestHandler)({endpoint:`/ecommerce/orders/${e}/download-link/send`,method:"POST",body:t,statusSendSentry:p.SENTRY_REPORTED_STATUSES})}async function W(e){return(0,p.apiRequestHandler)({endpoint:`/ecommerce/digital/files/${e}/download`,method:"GET",statusSendSentry:p.SENTRY_REPORTED_STATUSES})}async function X(e){return(0,p.apiRequestHandler)({endpoint:`/ecommerce/product/${e}`,method:"DELETE",statusSendSentry:p.SENTRY_REPORTED_STATUSES})}async function Q({bookId:e,productIds:t}){return(0,p.apiRequestHandler)({endpoint:"/ecommerce/product/reorder",method:"POST",body:{book:e,product_ids:t},statusSendSentry:p.SENTRY_REPORTED_STATUSES})}async function z({status:e,source:t,refundedOnly:r}={}){let o=(0,i.gateway)((0,i.retrieveServerType)()),s=(0,a.getCookie)("authToken"),d={};s&&(d.Authorization=`Bearer ${s}`);let l=new URLSearchParams;e&&l.set("status",e),t&&l.set("source",t),r&&l.set("refundedOnly","true");let c=l.toString();try{let e,t=await o({url:c?`/orders/export?${c}`:"/orders/export",method:"GET",headers:d,responseType:"blob"});if(t.status<200||t.status>=300){let e=t.data instanceof Blob?await t.data.text().then(e=>{try{return JSON.parse(e)}catch{return{description:n.SHARED_ORDERS.EXPORT_FAILED.replace("{status}",String(t.status))}}}):t.data;throw(0,_.handleApiError)({status:t.status,message:e?.description||e?.message||n.SHARED_ORDERS.EXPORT_FAILED.replace("{status}",String(t.status)),data:e})}let r=t.headers["content-disposition"];if(r){let t=r.match(/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/);t&&t[1]&&(e=t[1].replace(/['"]/g,""))}return{blob:t.data,filename:e}}catch(e){throw console.error("Error exporting orders:",e),e}}e.s(["completeMultipartDigitalFileSession",0,q,"createDigitalFileSession",0,H,"createEmbeddedCheckoutSession",0,E,"createShippingProfile",0,e=>R(T,"POST",r.SHIPPING.PROFILES_SAVE_ERROR,e),"deleteDigitalFile",0,F,"deleteEcommerceMerchandise",0,A,"deleteEcommerceProduct",0,X,"deleteShippingProfile",0,e=>R(`${T}/${e}`,"DELETE",r.SHIPPING.PROFILES_SAVE_ERROR),"downloadDigitalFile",0,W,"exportOrders",0,z,"fulfillEcommerceOrderShipping",0,x,"getDownloadFileUrl",0,Y,"getDownloadInformation",0,B,"getEcommerceConfig",0,y,"getEcommerceInventory",0,b,"getEcommerceOrderDetail",0,v,"getEcommerceOrders",0,k,"getEcommerceOrdersCount",0,N,"getOrderReceiptLink",0,$,"getPostCheckout",0,G,"getShippingConfig",0,S,"getShippingProfiles",0,()=>R(T,"GET",r.SHIPPING.PROFILES_LOAD_ERROR),"parseStockVersionConflict",0,e=>e&&"object"==typeof e&&("STOCK_VERSION_CONFLICT"===e.error_code||409===e.status&&e.details)?{stockQuantity:e.details?.stock_quantity??null,stockVersion:e.details?.stock_version??null}:null,"readUpsertStockResult",0,h,"refreshDownloadLink",0,K,"reorderEcommerceMerchandise",0,P,"reorderEcommerceProducts",0,Q,"requestNewDownloadLink",0,j,"sendDownloadLink",0,V,"setDefaultShippingProfile",0,e=>R(`${T}/${e}/default`,"PUT",r.SHIPPING.PROFILES_SAVE_ERROR),"updateEcommerceProductStock",0,I,"updateEmbeddedCheckoutShipping",0,m,"updateShippingProfile",0,(e,t)=>R(`${T}/${e}`,"PUT",r.SHIPPING.PROFILES_SAVE_ERROR,t),"uploadDigitalFilePart",0,w,"upsertEcommerceConfig",0,g,"upsertEcommerceMerchandise",0,O,"upsertEcommerceProduct",0,C],887399)}]);
3
4//# debugId=2514d850-4d7d-b7cd-055e-f9cc9ff4e674

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.