useShopProductBelowFoldContentChange",["CometRelay","FBLogger","ShopProductContext","asyncToGeneratorRuntime","react","useCurrentRoute","useCurrentURI","useShopProductBelowFoldContentChangeQuery.graphql"],(function(a,b,c,d,e,f,g){"use strict";var h,i;e=i||d("react");var j=e.useCallback,k=e.useContext,l=e.useEffect,m=e.useState;function a(a,e){var f=k(c("ShopProductContext")),g=f.initialLoadProductKey,i=f.isAvailableInCurrentCountry,n=f.selectedProduct,o=d("CometRelay").useRelayEnvironment(),p=(f=c("useCurrentRoute")())==null?void 0:f.tracePolicy,q=c("useCurrentURI")();f=m(null);var r=f[0],s=f[1];f=m(!1);var t=f[0],u=f[1];f=m(new Map());var v=f[0],w=f[1],x=j(function(){var f=b("asyncToGeneratorRuntime").asyncToGenerator(function*(f){var g=v.get(f);if(g!=null){s(g);return}if(e===f||a==null){s(null);return}g=null;if(a!=null){var i=a.find(function(a){return a.productKey===f});g=(i=i==null?void 0:i.belowTheFoldCmsID)!=null?i:null}if(g==null){s(null);return}u(!0);try{i=(yield d("CometRelay").fetchQuery(o,h!==void 0?h:h=b("useShopProductBelowFoldContentChangeQuery.graphql"),{requesterURI:q.toString(),cms_id:g,trace_policy:p!=null?p:"default"}).toPromise());p==null&&c("FBLogger")("shop_product_below_fold_content_change").mustfix("Trace policy is null for product %s ",f);var j=i==null?void 0:i.xfb_dolly_marketing_cms_content_by_id;j?(w(function(a){a=new Map(a);a.set(f,j);return a}),s(j)):s(null)}catch(a){s(null);throw c("FBLogger")("shop_product_below_fold_content_change").mustfixThrow("Failed to load product specific content: "+(a instanceof Error?a.message:String(a)))}finally{u(!1)}});return function(a){return f.apply(this,arguments)}}(),[v,q,o,e,a,p]);l(function(){var a;if((n==null?void 0:n.productKey)==null)if(!i)a=g;else return;else a=n.productKey;if(a==null)throw c("FBLogger")("shop_product_below_fold_content_change").mustfixThrow("selectedProductKey is null in useShopProductBelowFoldContentChange");x(a)["catch"](function(b){throw c("FBLogger")("shop_product_below_fold_content_change").mustfixThrow("Failed to fetch product specific content for selectedProductKey: "+(a!=null?a:"")+(b instanceof Error?b.message:String(b)))})},[n,i,x,g]);return{content:r,isLoading:t,productKey:(f=n==null?void 0:n.productKey)!=null?f:null}}g["default"]=a}),98);
-----
useShopProductBelowFoldContentChangeQuery_facebookRelayOperation",[],(function(a,b,c,d,e,f){e.exports="24265724953110446"}),null);
-----
-----
useShopProductBelowFoldContentChangeQuery_facebookRelayOperation",[],(function(a,b,c,d,e,f){e.exports="24265724953110446"}),null);
-----