GoScrobble/web/node_modules/react-cookie/umd/reactCookie.min.js

2 lines
11 KiB
JavaScript

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("universal-cookie"),require("react")):"function"==typeof define&&define.amd?define(["universal-cookie","react"],t):(e=e||self).ReactCookie=t(e.UniversalCookie,e.React)}(this,function(l,p){"use strict";function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function t(e,t){return e(t={exports:{}},t.exports),t.exports}l=l&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l,p=p&&Object.prototype.hasOwnProperty.call(p,"default")?p.default:p;var c=t(function(e,t){var o;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=((o=l)&&o.__esModule?o:{default:o}).default;t.default=r,e.exports=t.default});e(c);var y=t(function(e,t){function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Consumer=t.Provider=void 0;var o,r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};t=f(t);if(t&&t.has(e))return t.get(e);var o,r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(o in e){var u;"default"!==o&&Object.prototype.hasOwnProperty.call(e,o)&&((u=n?Object.getOwnPropertyDescriptor(e,o):null)&&(u.get||u.set)?Object.defineProperty(r,o,u):r[o]=e[o])}r.default=e,t&&t.set(e,r);return r}(p),n=(o=c)&&o.__esModule?o:{default:o};function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(f=function(e){return e?o:t})(e)}var u=r.createContext(new n.default),r=u.Provider,n=u.Consumer;t.Consumer=n,t.Provider=r,t.default=u});e(y);y.Consumer,y.Provider;var a=t(function(e,t){function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};t=f(t);if(t&&t.has(e))return t.get(e);var o,r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(o in e){var u;"default"!==o&&Object.prototype.hasOwnProperty.call(e,o)&&((u=n?Object.getOwnPropertyDescriptor(e,o):null)&&(u.get||u.set)?Object.defineProperty(r,o,u):r[o]=e[o])}r.default=e,t&&t.set(e,r);return r}(p),n=(o=l)&&o.__esModule?o:{default:o};function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(f=function(e){return e?o:t})(e)}var u,c,a=(u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),a=(c=r.Component,a(s,c),s.prototype.render=function(){return r.createElement(y.Provider,{value:this.cookies},this.props.children)},s);function s(e){var t=c.call(this,e)||this;return e.cookies?t.cookies=e.cookies:t.cookies=new n.default,t}t.default=a,e.exports=t.default});e(a);var o="function"==typeof Symbol&&Symbol.for,r=o?Symbol.for("react.element"):60103,n=o?Symbol.for("react.portal"):60106,u=o?Symbol.for("react.fragment"):60107,i=o?Symbol.for("react.strict_mode"):60108,f=o?Symbol.for("react.profiler"):60114,s=o?Symbol.for("react.provider"):60109,d=o?Symbol.for("react.context"):60110,m=o?Symbol.for("react.async_mode"):60111,b=o?Symbol.for("react.concurrent_mode"):60111,v=o?Symbol.for("react.forward_ref"):60112,O=o?Symbol.for("react.suspense"):60113,P=o?Symbol.for("react.suspense_list"):60120,_=o?Symbol.for("react.memo"):60115,w=o?Symbol.for("react.lazy"):60116,h=o?Symbol.for("react.block"):60121,j=o?Symbol.for("react.fundamental"):60117,g=o?Symbol.for("react.responder"):60118,C=o?Symbol.for("react.scope"):60119;function M(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case m:case b:case u:case f:case i:case O:return e;default:switch(e=e&&e.$$typeof){case d:case v:case w:case _:case s:return e;default:return t}}case n:return t}}}function S(e){return M(e)===b}var k={AsyncMode:m,ConcurrentMode:b,ContextConsumer:d,ContextProvider:s,Element:r,ForwardRef:v,Fragment:u,Lazy:w,Memo:_,Portal:n,Profiler:f,StrictMode:i,Suspense:O,isAsyncMode:function(e){return S(e)||M(e)===m},isConcurrentMode:S,isContextConsumer:function(e){return M(e)===d},isContextProvider:function(e){return M(e)===s},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},isForwardRef:function(e){return M(e)===v},isFragment:function(e){return M(e)===u},isLazy:function(e){return M(e)===w},isMemo:function(e){return M(e)===_},isPortal:function(e){return M(e)===n},isProfiler:function(e){return M(e)===f},isStrictMode:function(e){return M(e)===i},isSuspense:function(e){return M(e)===O},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===u||e===b||e===f||e===i||e===O||e===P||"object"==typeof e&&null!==e&&(e.$$typeof===w||e.$$typeof===_||e.$$typeof===s||e.$$typeof===d||e.$$typeof===v||e.$$typeof===j||e.$$typeof===g||e.$$typeof===C||e.$$typeof===h)},typeOf:M},o=t(function(e,t){}),$=(o.AsyncMode,o.ConcurrentMode,o.ContextConsumer,o.ContextProvider,o.Element,o.ForwardRef,o.Fragment,o.Lazy,o.Memo,o.Portal,o.Profiler,o.StrictMode,o.Suspense,o.isAsyncMode,o.isConcurrentMode,o.isContextConsumer,o.isContextProvider,o.isElement,o.isForwardRef,o.isFragment,o.isLazy,o.isMemo,o.isPortal,o.isProfiler,o.isStrictMode,o.isSuspense,o.isValidElementType,o.typeOf,t(function(e){e.exports=k})),x={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},E={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},W={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},D={};function R(e){return $.isMemo(e)?W:D[e.$$typeof]||x}D[$.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},D[$.Memo]=W;var F=Object.defineProperty,A=Object.getOwnPropertyNames,L=Object.getOwnPropertySymbols,N=Object.getOwnPropertyDescriptor,T=Object.getPrototypeOf,z=Object.prototype;function I(e,t,o){if("string"!=typeof t){var r;!z||(r=T(t))&&r!==z&&I(e,r,o);var n=A(t);L&&(n=n.concat(L(t)));for(var u=R(e),i=R(t),f=0;f<n.length;++f){var c=n[f];if(!(E[c]||o&&o[c]||i&&i[c]||u&&u[c])){var a=N(t,c);try{F(e,c,a)}catch(e){}}}}return e}var U=t(function(e,t){function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(n){var o=n.displayName||n.name,r=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.onChange=function(){e.forceUpdate()},e}return a(e,t),e.prototype.listen=function(){this.props.cookies.addChangeListener(this.onChange)},e.prototype.unlisten=function(e){(e||this.props.cookies).removeChangeListener(this.onChange)},e.prototype.componentDidMount=function(){this.listen()},e.prototype.componentDidUpdate=function(e){e.cookies!==this.props.cookies&&(this.unlisten(e.cookies),this.listen())},e.prototype.componentWillUnmount=function(){this.unlisten()},e.prototype.render=function(){var e=this.props,t=e.forwardedRef,o=e.cookies,r=l(e,["forwardedRef","cookies"]),e=o.getAll();return u.createElement(n,s({},r,{ref:t,cookies:o,allCookies:e}))},e.displayName="withCookies("+o+")",e.WrappedComponent=n,e}(u.Component),e=u.forwardRef(function(t,o){return u.createElement(y.Consumer,null,function(e){return u.createElement(r,s({cookies:e},t,{forwardedRef:o}))})});return e.displayName=r.displayName,e.WrappedComponent=r.WrappedComponent,(0,f.default)(e,n)};var o,u=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};t=c(t);if(t&&t.has(e))return t.get(e);var o,r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(o in e){var u;"default"!==o&&Object.prototype.hasOwnProperty.call(e,o)&&((u=n?Object.getOwnPropertyDescriptor(e,o):null)&&(u.get||u.set)?Object.defineProperty(r,o,u):r[o]=e[o])}r.default=e,t&&t.set(e,r);return r}(p),f=(o=I)&&o.__esModule?o:{default:o};function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(c=function(e){return e?o:t})(e)}var r,a=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),s=function(){return(s=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)},l=function(e,t){var o={};for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]]);return o};e.exports=t.default});e(U);var B=t(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isInBrowser=function(){return"undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement}});e(B);B.isInBrowser;var q=t(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(t){var o=(0,p.useContext)(f.default);if(!o)throw new Error("Missing <CookiesProvider>");var e=o.getAll(),r=(0,p.useState)(e),n=r[0],u=r[1],i=(0,p.useRef)(n);(0,B.isInBrowser)()&&(0,p.useLayoutEffect)(function(){function e(){var e=o.getAll();!function(e,t,o){if(!e)return!0;for(var r=0,n=e;r<n.length;r++){var u=n[r];if(t[u]!==o[u])return!0}return!1}(t||null,e,i.current)||u(e),i.current=e}return o.addChangeListener(e),function(){o.removeChangeListener(e)}},[o]);e=(0,p.useMemo)(function(){return o.set.bind(o)},[o]),r=(0,p.useMemo)(function(){return o.remove.bind(o)},[o]);return[n,e,r]};var o,f=(o=y)&&o.__esModule?o:{default:o};e.exports=t.default});e(q);var V=Object.freeze({__proto__:null});return e(t(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var o={Cookies:!0,CookiesProvider:!0,withCookies:!0,useCookies:!0};Object.defineProperty(t,"Cookies",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"CookiesProvider",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"withCookies",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"useCookies",{enumerable:!0,get:function(){return i.default}});var r=f(c),n=f(a),u=f(U),i=f(q);function f(e){return e&&e.__esModule?e:{default:e}}Object.keys(V).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===V[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return V[e]}}))})}))});