crates/core/tests/snapshots/webpack4_unpack__module-50.snap

GitHub
---
source: crates/core/tests/webpack4_unpack.rs
expression: code
---
import r from "./module-29.js";
const o = typeof Symbol === "function" && Symbol.for;
const i = o ? Symbol.for("react.element") : 60103;
const a = o ? Symbol.for("react.portal") : 60106;
export const Fragment = o ? Symbol.for("react.fragment") : 60107;
export const StrictMode = o ? Symbol.for("react.strict_mode") : 60108;
export const Profiler = o ? Symbol.for("react.profiler") : 60114;
const s = o ? Symbol.for("react.provider") : 60109;
const f = o ? Symbol.for("react.context") : 60110;
const d = o ? Symbol.for("react.forward_ref") : 60112;
export const Suspense = o ? Symbol.for("react.suspense") : 60113;
const h = o ? Symbol.for("react.memo") : 60115;
const m = o ? Symbol.for("react.lazy") : 60116;
const y = typeof Symbol === "function" && Symbol.iterator;
function v(e) {
    let t = `https://reactjs.org/docs/error-decoder.html?invariant=${e}`;
    for(let n = 1; n < arguments.length; n++){
        t += `&args[]=${encodeURIComponent(arguments[n])}`;
    }
    return `Minified React error #${e}; visit ${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`;
}
const b = {
    isMounted () {
        return false;
    },
    enqueueForceUpdate () {},
    enqueueReplaceState () {},
    enqueueSetState () {}
};
const g = {};
export class Component {
    constructor(e, t, n){
        this.props = e;
        this.context = t;
        this.refs = g;
        this.updater = n || b;
    }
    setState(e, t) {
        if (typeof e !== "object" && typeof e !== "function" && e != null) {
            throw Error(v(85));
        }
        this.updater.enqueueSetState(this, e, t, "setState");
    }
    forceUpdate(e) {
        this.updater.enqueueForceUpdate(this, e, "forceUpdate");
    }
}
function E() {}
export function PureComponent(e, t, n) {
    this.props = e;
    this.context = t;
    this.refs = g;
    this.updater = n || b;
}
Component.prototype.isReactComponent = {};
E.prototype = Component.prototype;
const k = PureComponent.prototype = new E;
k.constructor = PureComponent;
r(k, Component.prototype);
k.isPureReactComponent = true;
const T = {
    current: null
};
const hasOwnProperty = Object.prototype.hasOwnProperty;
const O = {
    key: true,
    ref: true,
    __self: true,
    __source: true
};
export function createElement(e, t, n) {
    let r;
    const o = {};
    let a = null;
    let u = null;
    if (t != null) {
        if (t.ref !== undefined) {
            u = t.ref;
        }
        if (t.key !== undefined) {
            a = `${t.key}`;
        }
        for(r in t){
            if (hasOwnProperty.call(t, r) && !O.hasOwnProperty(r)) {
                o[r] = t[r];
            }
        }
    }
    let l = arguments.length - 2;
    if (l === 1) {
        o.children = n;
    } else if (l > 1) {
        const c = Array(l);
        for(let s = 0; s < l; s++){
            c[s] = arguments[s + 2];
        }
        o.children = c;
    }
    if (e && e.defaultProps) {
        for(r in l = e.defaultProps){
            if (o[r] === undefined) {
                o[r] = l[r];
            }
        }
    }
    return {
        $$typeof: i,
        type: e,
        key: a,
        ref: u,
        props: o,
        _owner: T.current
    };
}
export function isValidElement(e) {
    return typeof e === "object" && e !== null && e.$$typeof === i;
}
const _ = /\/+/g;
const j = [];
function R(e, t, n, r) {
    if (j.length) {
        const o = j.pop();
        o.result = e;
        o.keyPrefix = t;
        o.func = n;
        o.context = r;
        o.count = 0;
        return o;
    }
    return {
        result: e,
        keyPrefix: t,
        func: n,
        context: r,
        count: 0
    };
}
function N(e) {
    e.result = null;
    e.keyPrefix = null;
    e.func = null;
    e.context = null;
    e.count = 0;
    if (j.length < 10) {
        j.push(e);
    }
}
function M(e, t, n) {
    if (e == null) {
        return 0;
    }
    return function e(t, r, o) {
        let n = "";
        let u = typeof t;
        if (!(u !== "undefined" && u !== "boolean")) {
            t = null;
        }
        let l = false;
        if (t === null) {
            l = true;
        } else {
            switch(u){
                case "string":
                case "number":
                    l = true;
                    break;
                case "object":
                    switch(t.$$typeof){
                        case i:
                        case a:
                            l = true;
                    }
            }
        }
        if (l) {
            r(o, t, n === "" ? `.${A(t, 0)}` : n);
            return 1;
        }
        l = 0;
        n = n === "" ? "." : `${n}:`;
        if (Array.isArray(t)) {
            for(var c = 0; c < t.length; c++){
                var s = n + A(u = t[c], c);
                l += e(u, s, r, o);
            }
        } else {
            s = t === null || typeof t !== "object" ? null : typeof (s = y && t[y] || t["@@iterator"]) === "function" ? s : null;
            if (typeof s === "function") {
                t = s.call(t);
                for(c = 0; !(u = t.next()).done;){
                    l += e(u = u.value, s = n + A(u, c++), r, o);
                }
            } else if (u === "object") {
                r = `${t}`;
                throw Error(v(31, r === "[object Object]" ? `object with keys {${Object.keys(t).join(", ")}}` : r, ""));
            }
        }
        return l;
    }(e, t, n);
}
function A(e, t) {
    if (typeof e === "object" && e !== null && e.key != null) {
        return ((e)=>{
            const t = {
                "=": "=0",
                ":": "=2"
            };
            return `\$${`${e}`.replace(/[=:]/g, (e)=>t[e])}`;
        })(e.key);
    }
    return t.toString(36);
}
function L(e, t) {
    e.func.call(e.context, t, e.count++);
}
function I(e, t, n) {
    const { result, keyPrefix } = e;
    e = e.func.call(e.context, t, e.count++);
    if (Array.isArray(e)) {
        D(e, result, n, (e)=>e);
    } else if (e != null) {
        if (isValidElement(e)) {
            e = ((e, key)=>({
                    $$typeof: i,
                    type: e.type,
                    key,
                    ref: e.ref,
                    props: e.props,
                    _owner: e._owner
                }))(e, keyPrefix + (!e.key || t && t.key === e.key ? "" : `${`${e.key}`.replace(_, "$&/")}/`) + n);
        }
        result.push(e);
    }
}
function D(e, t, n, r, o) {
    let i = "";
    if (n != null) {
        i = `${`${n}`.replace(_, "$&/")}/`;
    }
    M(e, I, t = R(t, i, r, o));
    N(t);
}
const F = {
    current: null
};
function z() {
    const F_current = F.current;
    if (F_current === null) {
        throw Error(v(321));
    }
    return F_current;
}
export const __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {
    ReactCurrentDispatcher: F,
    ReactCurrentBatchConfig: {
        suspense: null
    },
    ReactCurrentOwner: T,
    IsSomeRendererActing: {
        current: false
    },
    assign: r
};
export const Children = {
    map (e, t, n) {
        if (e == null) {
            return e;
        }
        const r = [];
        D(e, r, null, t, n);
        return r;
    },
    forEach (e, t, n) {
        if (e == null) {
            return e;
        }
        M(e, L, t = R(null, null, t, n));
        N(t);
    },
    count (e) {
        return M(e, ()=>null, null);
    },
    toArray (e) {
        const t = [];
        D(e, t, null, (e)=>e);
        return t;
    },
    only (e) {
        if (!isValidElement(e)) {
            throw Error(v(143));
        }
        return e;
    }
};
export const cloneElement = function(e, t, n) {
    if (e === null || e === undefined) {
        throw Error(v(267, e));
    }
    const o = r({}, e.props);
    let e_key = e.key;
    let e_ref = e.ref;
    let e__owner = e._owner;
    if (t != null) {
        if (t.ref !== undefined) {
            e_ref = t.ref;
            e__owner = T.current;
        }
        if (t.key !== undefined) {
            e_key = `${t.key}`;
        }
        if (e.type && e.type.defaultProps) var c = e.type.defaultProps;
        for(s in t){
            if (hasOwnProperty.call(t, s) && !O.hasOwnProperty(s)) {
                o[s] = t[s] === undefined && c !== undefined ? c[s] : t[s];
            }
        }
    }
    var s = arguments.length - 2;
    if (s === 1) {
        o.children = n;
    } else if (s > 1) {
        c = Array(s);
        for(let f = 0; f < s; f++){
            c[f] = arguments[f + 2];
        }
        o.children = c;
    }
    return {
        $$typeof: i,
        type: e.type,
        key: e_key,
        ref: e_ref,
        props: o,
        _owner: e__owner
    };
};
export const createContext = (e, _calculateChangedBits = null)=>{
    e = {
        $$typeof: f,
        _calculateChangedBits,
        _currentValue: e,
        _currentValue2: e,
        _threadCount: 0,
        Provider: null,
        Consumer: null
    };
    e.Provider = {
        $$typeof: s,
        _context: e
    };
    return e.Consumer = e;
};
export const createFactory = (e)=>{
    const t = createElement.bind(null, e);
    t.type = e;
    return t;
};
export const createRef = ()=>({
        current: null
    });
export const forwardRef = (render)=>({
        $$typeof: d,
        render
    });
export const lazy = (_ctor)=>({
        $$typeof: m,
        _ctor,
        _status: -1,
        _result: null
    });
export const memo = (type, t)=>({
        $$typeof: h,
        type,
        compare: t === undefined ? null : t
    });
export const useCallback = (e, t)=>z().useCallback(e, t);
export const useContext = (e, t)=>z().useContext(e, t);
export const useDebugValue = ()=>{};
export const useEffect = (e, t)=>z().useEffect(e, t);
export const useImperativeHandle = (e, t, n)=>z().useImperativeHandle(e, t, n);
export const useLayoutEffect = (e, t)=>z().useLayoutEffect(e, t);
export const useMemo = (e, t)=>z().useMemo(e, t);
export const useReducer = (e, t, n)=>z().useReducer(e, t, n);
export const useRef = (e)=>z().useRef(e);
export const useState = (e)=>z().useState(e);
export const version = "16.14.0";