PageSourceSearch

https://www.bigfishgames.com/92.86ba975d6192a2051024.js

js bigfishgames.com collected 2026-09-24 08:42:35 UTC 5,158 bytes, 80 lines download raw bytes

1/*! @version pwa-studio: 1.0.0, @magento/venia-ui: ~11.7.0, @magento/venia-product-recommendations: 1.0.2, @magento/venia-data-collector: 1.0.7, @magento/upward-security-headers: ~1.1.18, @magento/pwa-theme-venia: ~2.4.0, @magento/pwa-buildpack: ~11.5.3, @magento/peregrine: ~15.5.2, @magento/pagebuilder: ~9.3.5, @magento/eslint-config: ~1.5.0, @magento/babel-preset-peregrine: ~1.3.3, @apollo/client: ~3.5.0 */
2(window.webpackJsonp=window.webpackJsonp||[]).push([[92],{CcqN:function(e,t,r){"use strict"
3r.r(t)
4var a=r("q1tI"),i=r.n(a),c=r("dDsW"),n=r("Ty5D"),s=r("+TN3"),u=r("pZLH"),o=r("as/0"),d=r("Cess"),l=r("J3e4"),m=r("DPQw"),p=r("MBvx"),g=r("O/QL")
5t.default=(()=>{const e=Object(c.a)(),t=Object(n.g)(),r=Object(n.h)(),[{cartId:_}]=Object(o.b)(),[,{dispatch:f}]=Object(d.b)(),[,{addToast:h}]=Object(l.a)(),{openMiniCart:T}=Object(g.b)(),y=Object(a.useMemo)(()=>{const e=new URLSearchParams(r.search).get("sku")
6return e?e.split(",").map(e=>e.trim().toUpperCase()).filter(Boolean):[]},[r.search]),b=Object(a.useMemo)(()=>
6new URLSearchParams(r.search).get("returnUrl"),[r.search]),v=Object(a.useRef)(!1),C=Object(a.useCallback)(()=>{b?t.push(b):window.history.length>1?t.goBack():t.push("/")},[t,b]),{data:O,loading:k}=Object(s.a)(p.a.GET_CART_DETAILS,{variables:{cartId:_},skip:!_,fetchPolicy:"network-only"}),{data:I,loading:w,error:P}=Object(s.a)(p.a.GET_PRODUCTS_BY_SKU,{variables:{skus:y},skip:!y.length,fetchPolicy:"network-only"}),[D]=Object(u.a)(p.a.ADD_PRODUCTS_TO_CART)
7return Object(a.useEffect)(()=>{v.current||(async()=>{var t,r,a,i
8if(!y.length)return void C()
9if(w||k)return
10if(P)return void C()
11if(!(null===(r=null===(t=null==I?void 0:I.products)||void 0===t?void 0:t.items)||void 0===r?void 0:r.length))return void C()
12if(!_)return
13v.current=!0
14const c=new Set((null===(i=null===(a=null==O?void 0:O.cart)||void 0===a?void 0:a.items)||void 0===i?void 0:i.map(e=>e.product.sku))||[]),n=[],s=I.products.items.filter(e=>!c.has(e.sku)||(n.push(e.name),!1))
15if(n.length>0){const t=1===n.length?e.formatMessage({id:"addToCart.alreadyInCartSingle",defaultMessage:"{productName} is already in your cart."},{productName:n[0]}):e.formatMessage({id:"addToCart.alreadyInCartMultiple",defaultMessage:"{count} items are already in your cart."},{count:n.length})
16h({type:"info",message:t,timeout:5e3})}if(s.length)try{const t=s.map(e=>({quantity:1,sku:e.sku,...e.uid&&{entered_options:[{uid:e.uid,value:e.name}]}}))
17await D({variables:{cartId:_,cartItems:t}}),s.forEach(e=>{f({type:"CART_ADD_ITEM",payload:{cartId:_,sku:e.sku,name:e.name,pricing:{regularPrice:{amount:e.price_range.maximum_price.regular_price}},priceTotal:e.price_range.maximum_price.final_price.value,currencyCode:e.price_range.maximum_price.final_price.currency,discountAmount:e.price_range.maximum_price.discount.amount_off,selectedOptions:null,quantity:1}})}),T(),await new Promise(e=>setTimeout(e,50)),C()}catch(t){v.current=!1,h({type:"error",message:e.formatMessage({id:"addToCart.error",defaultMessage:"There was a problem adding items to your cart. Please try again."}),timeout:5e3}),C()}else C()})()},[y,I,w,P,O,k,_,D,f,C,h,e,T]),i.a.createElement(m.a,{global:!0})})},MBvx:function(e,t,r){"use strict"
18var a=r("UYTu"),i=r("juDi"),c=r("POf8")
19const n=a.a`
20    query GetCartDetails($cartId: String!) {
21        cart(cart_id: $cartId) {
22            id
23            items {
24                uid
25                product {
26                    sku
27                }
28            }
29        }
30    }
31`,s=a.a`
32    query GetProductsBySkus($skus: [String]!) {
33        products(filter: { sku: { in: $skus } }) {
34            items {
35                uid
36                sku
37                name
38                # IMPORTANT: The 'price' field must be included alongside 'price_range' even though it's not directly used.
39                # Without it, Magento's GraphQL API returns incorrect pricing for non-USD currencies and customer-specific
40                # discounts. This is a known Magento quirk where 'price_range' alone returns the wrong values.
41                price {
42                    regularPrice {
43                        amount {
44                            currency
45                            value
46                        }
47                    }
48                }
49                price_range {
50                    maximum_price {
51                        final_price {
52                            currency
53                            value
54                        }
55                        regular_price {
56                            currency
57                            value
58                        }
59                        discount {
60                            amount_off
61                        }
62                    }
63                }
64            }
65        }
66    }
67`,u=a.a`
68    mutation AddProductsToCart($cartId: String!, $cartItems: [CartItemInput!]!) {
69        addProductsToCart(cartId: $cartId, cartItems: $cartItems) {
70            cart {
71                id
72                ...MiniCartFragment
73                ...GameClubPricingFragment
74            }
75        }
76    }
77    ${i.a}
78    ${c.d}
79`
80t.a={GET_CART_DETAILS:n,GET_PRODUCTS_BY_SKU:s,ADD_PRODUCTS_TO_CART:u}}}])

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.