var e,t;"function"==typeof(e=globalThis.define)&&(t=e,e=null),function(t,r,n,a,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof i[a]&&i[a],l=s.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(e,r){if(!l[e]){if(!t[e]){var n="function"==typeof i[a]&&i[a];if(!r&&n)return n(e,!0);if(s)return s(e,!0);if(u&&"string"==typeof e)return u(e);var o=Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}f.resolve=function(r){var n=t[e][1][r];return null!=n?n:r},f.cache={};var d=l[e]=new c.Module(e);t[e][0].call(d.exports,f,d,d.exports,this)}return l[e].exports;function f(e){var t=f.resolve(e);return!1===t?{}:c(t)}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.exports={}},c.modules=t,c.cache=l,c.parent=s,c.register=function(e,r){t[e]=[function(e,t){t.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return i[a]}}),i[a]=c;for(var d=0;dh);var a=e("react"),o=n.interopDefault(a),i=e("react-dom/client"),s=e("~common/utils"),l=e("~libs/smartLink/contentScriptCommon"),u=e("../common/const"),c=e("../services/offer-list-toolbar");let d=null,f=null,p=null,h={matches:[""],run_at:"document_end"};function m(){p?.unmount(),p=null,f?.remove(),f=null}function g(e){if(!d||f?.isConnected)return;m(),f?.remove(),(f=document.createElement("div")).id="market-mate-offer-list-toolbar",f.className="market-mate-offer-list-toolbar";let t=f.attachShadow({mode:"open"}),r=document.createElement("div");r.id="1688-market-mate-toolbar";let n=document.createElement("style");if(n.textContent=c.OfferListToolbarStyle,n.setAttribute("data-styled",""),t.append(n),e.toolbarConfig?.toolbar?.shadowRootStyleSheet){let r=document.createElement("style");r.textContent=e.toolbarConfig.toolbar.shadowRootStyleSheet,r.setAttribute("data-styled",""),t.append(r)}t.append(r),d.insertAdjacentElement(e.toolbarConfig?.toolbar?.toolbarPosition,f),(p=(0,i.createRoot)(r)).render((0,o.default).createElement(c.OfferListToolbar,{root:t,config:e.toolbarConfig}))}(async function(){let e=(await (0,s.getExtensionLocalStorage)([u.STORAGE_KEY_OFFER_LIST_TOOLBAR_INFO]))[u.STORAGE_KEY_OFFER_LIST_TOOLBAR_INFO];if(!e)return;let t=e.supportList,r=t.filter(e=>new RegExp(e.regex).test(location.href));if(!r.length||!r[0]?.website)return;let n=e?.websites?.[r[0]?.website];if(!n)return;let a=n.toolbar?.toolbarTargetSelector;if(!a)return;d=document.querySelector(a),g({toolbarConfig:n});let o=new MutationObserver(e=>{e.forEach(e=>{"childList"===e.type&&(e.addedNodes?.forEach(e=>{e instanceof HTMLElement&&(e.matches(a)||e.querySelector(a))&&(d=document.querySelector(a),g({toolbarConfig:n}))}),e.removedNodes?.forEach(e=>{e instanceof HTMLElement&&e.contains(f)&&m()}))})});o.observe(document.body,{childList:!0,subtree:!0});let i=()=>{o.disconnect()};window.addEventListener("pagehide",i),window.addEventListener("beforeunload",i)})(),(0,l.checkAndExecuteMaterial)("document_end")},{react:"a8qhJ","react-dom/client":"5AVdy","~common/utils":"kYpGH","~libs/smartLink/contentScriptCommon":"3LhjC","../common/const":"bkfUq","../services/offer-list-toolbar":"ab0PN","@parcel/transformer-js/src/esmodule-helpers.js":"fRZO2"}],a8qhJ:[function(e,t,r){t.exports=e("956f36295e4e0134")},{"956f36295e4e0134":"iTdc5"}],iTdc5:[function(e,t,r){var n=Symbol.for("react.element"),a=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.iterator,m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,b={};function v(e,t,r){this.props=e,this.context=t,this.refs=b,this.updater=r||m}function y(){}function x(e,t,r){this.props=e,this.context=t,this.refs=b,this.updater=r||m}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=v.prototype;var w=x.prototype=new y;w.constructor=x,g(w,v.prototype),w.isPureReactComponent=!0;var S=Array.isArray,k=Object.prototype.hasOwnProperty,C={current:null},D={key:!0,ref:!0,__self:!0,__source:!0};function E(e,t,r){var a,o={},i=null,s=null;if(null!=t)for(a in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(i=""+t.key),t)k.call(t,a)&&!D.hasOwnProperty(a)&&(o[a]=t[a]);var l=arguments.length-2;if(1===l)o.children=r;else if(1