{"version":3,"file":"commons-app-Provider.js.718c9a6e5c79b6b39202.js","mappings":"uKA2CA,IAtCA,UAAkB,MAChBA,EAAK,QACLC,EAAO,SACPC,EAAQ,YACRC,IAEA,MAAMC,GAAe,IAAAC,UAAQ,KAC3B,MAAMC,GAAe,OAAmBN,GACxC,MAAO,CACLA,QACAM,eACAC,eAAgBJ,EAAc,IAAMA,OAAcK,EACnD,GACA,CAACR,EAAOG,IACLM,GAAgB,IAAAJ,UAAQ,IAAML,EAAMU,YAAY,CAACV,KACvD,QAA0B,KACxB,MAAM,aACJM,GACEF,EAQJ,OAPAE,EAAaK,cAAgBL,EAAaM,iBAC1CN,EAAaO,eAETJ,IAAkBT,EAAMU,YAC1BJ,EAAaM,mBAGR,KACLN,EAAaQ,iBACbR,EAAaK,mBAAgBH,CAAS,CACvC,GACA,CAACJ,EAAcK,IAClB,MAAMM,EAAUd,GAAW,IAE3B,OAAoB,gBAAoBc,EAAQC,SAAU,CACxDC,MAAOb,GACNF,EACL,C","sources":["webpack://grfanclub-webview/./node_modules/react-redux/es/components/Provider.js"],"sourcesContent":["import React, { useMemo } from 'react';\nimport { ReactReduxContext } from './Context';\nimport { createSubscription } from '../utils/Subscription';\nimport { useIsomorphicLayoutEffect } from '../utils/useIsomorphicLayoutEffect';\n\nfunction Provider({\n store,\n context,\n children,\n serverState\n}) {\n const contextValue = useMemo(() => {\n const subscription = createSubscription(store);\n return {\n store,\n subscription,\n getServerState: serverState ? () => serverState : undefined\n };\n }, [store, serverState]);\n const previousState = useMemo(() => store.getState(), [store]);\n useIsomorphicLayoutEffect(() => {\n const {\n subscription\n } = contextValue;\n subscription.onStateChange = subscription.notifyNestedSubs;\n subscription.trySubscribe();\n\n if (previousState !== store.getState()) {\n subscription.notifyNestedSubs();\n }\n\n return () => {\n subscription.tryUnsubscribe();\n subscription.onStateChange = undefined;\n };\n }, [contextValue, previousState]);\n const Context = context || ReactReduxContext; // @ts-ignore 'AnyAction' is assignable to the constraint of type 'A', but 'A' could be instantiated with a different subtype\n\n return /*#__PURE__*/React.createElement(Context.Provider, {\n value: contextValue\n }, children);\n}\n\nexport default Provider;"],"names":["store","context","children","serverState","contextValue","useMemo","subscription","getServerState","undefined","previousState","getState","onStateChange","notifyNestedSubs","trySubscribe","tryUnsubscribe","Context","Provider","value"],"sourceRoot":""}