UNPKG

strapi-plugin-firebase-authentication

Version:

Allows easy integration between clients utilizing Firebase for authentication and Strapi

1,306 lines (1,305 loc) 1.25 MB
"use strict"; const crypto$1 = require("crypto"); const require$$0$1 = require("child_process"); const require$$0$2 = require("os"); const require$$0$4 = require("path"); const require$$0$3 = require("fs"); const require$$0$5 = require("assert"); const require$$2 = require("events"); const require$$0$7 = require("buffer"); const require$$0$6 = require("stream"); const require$$2$1 = require("util"); const require$$0$8 = require("constants"); require("node:stream"); const admin$1 = require("firebase-admin"); const CryptoJS = require("crypto-js"); const fs$8 = require("fs/promises"); const _interopDefault = (e) => e && e.__esModule ? e : { default: e }; function _interopNamespace(e) { if (e && e.__esModule) return e; const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } }); if (e) { for (const k in e) { if (k !== "default") { const d2 = Object.getOwnPropertyDescriptor(e, k); Object.defineProperty(n, k, d2.get ? d2 : { enumerable: true, get: () => e[k] }); } } } n.default = e; return Object.freeze(n); } const crypto__default = /* @__PURE__ */ _interopDefault(crypto$1); const require$$0__default = /* @__PURE__ */ _interopDefault(require$$0$1); const require$$0__default$1 = /* @__PURE__ */ _interopDefault(require$$0$2); const require$$0__namespace = /* @__PURE__ */ _interopNamespace(require$$0$4); const require$$0__default$2 = /* @__PURE__ */ _interopDefault(require$$0$3); const require$$0__default$3 = /* @__PURE__ */ _interopDefault(require$$0$5); const require$$2__default = /* @__PURE__ */ _interopDefault(require$$2); const require$$0__default$5 = /* @__PURE__ */ _interopDefault(require$$0$7); const require$$0__default$4 = /* @__PURE__ */ _interopDefault(require$$0$6); const require$$2__default$1 = /* @__PURE__ */ _interopDefault(require$$2$1); const require$$0__default$6 = /* @__PURE__ */ _interopDefault(require$$0$8); const admin__default = /* @__PURE__ */ _interopDefault(admin$1); const CryptoJS__default = /* @__PURE__ */ _interopDefault(CryptoJS); const fs__namespace = /* @__PURE__ */ _interopNamespace(fs$8); async function migrateFirebaseUserData(strapi2, dryRun = false) { strapi2.log.info("=== Firebase User Data Migration ==="); strapi2.log.info(`Mode: ${dryRun ? "DRY RUN (no changes)" : "LIVE (will modify database)"}`); strapi2.log.info(""); const result = { totalUsers: 0, usersWithFirebaseData: 0, migrated: 0, skipped: 0, errors: [] }; try { strapi2.log.info("Step 1: Checking if migration is needed..."); const columnCheck = await strapi2.db.connection.raw(` SELECT column_name FROM information_schema.columns WHERE table_name = 'up_users' AND column_name IN ('firebase_user_id', 'apple_email') `); const columnsExist = columnCheck.rows && columnCheck.rows.length > 0; if (!columnsExist) { strapi2.log.info("✅ Migration not needed - User table has no Firebase columns (clean database)"); strapi2.log.info( "This is expected for fresh installations where Firebase plugin owns all Firebase data." ); strapi2.log.info(""); return result; } strapi2.log.info("Firebase columns found in User table - proceeding with migration..."); strapi2.log.info(""); strapi2.log.info("Step 2: Finding users with Firebase data..."); const usersWithFirebaseData = await strapi2.db.connection.select("id", "document_id", "username", "email", "firebase_user_id", "apple_email").from("up_users").where(function() { this.whereNotNull("firebase_user_id").orWhereNotNull("apple_email"); }); const countResult = await strapi2.db.connection("up_users").count("* as count"); result.totalUsers = Number(countResult[0].count); result.usersWithFirebaseData = usersWithFirebaseData.length; strapi2.log.info(`Total users: ${result.totalUsers}`); strapi2.log.info(`Users with Firebase data: ${result.usersWithFirebaseData}`); strapi2.log.info(""); if (result.usersWithFirebaseData === 0) { strapi2.log.info("No users with Firebase data found. Migration complete."); return result; } strapi2.log.info("Step 3: Migrating user data..."); strapi2.log.info(""); for (const user of usersWithFirebaseData) { const userIdentifier = `${user.username} (${user.email})`; try { const existing = await strapi2.db.query("plugin::firebase-authentication.firebase-user-data").findOne({ where: { user: { documentId: user.document_id } } }); if (existing) { strapi2.log.info(`⏭️ SKIP: ${userIdentifier} - Already has firebase_user_data record`); result.skipped++; continue; } const firebaseData = { user: user.document_id }; if (user.firebase_user_id) { firebaseData.firebaseUserID = user.firebase_user_id; } if (user.apple_email) { firebaseData.appleEmail = user.apple_email; } strapi2.log.info(`🔄 MIGRATE: ${userIdentifier}`); strapi2.log.info(` Firebase UID: ${firebaseData.firebaseUserID || "none"}`); strapi2.log.info(` Apple Email: ${firebaseData.appleEmail || "none"}`); if (!dryRun) { try { await strapi2.db.query("plugin::firebase-authentication.firebase-user-data").create({ data: firebaseData }); strapi2.log.info(` ✅ SUCCESS`); } catch (createError) { if (createError.code === "23505") { strapi2.log.warn(` ⚠️ SKIP: Unique constraint violation (already exists)`); result.skipped++; continue; } throw createError; } } else { strapi2.log.info(` 🔍 DRY RUN - Would create record`); } result.migrated++; strapi2.log.info(""); } catch (error2) { const errorMessage = error2 instanceof Error ? error2.message : String(error2); strapi2.log.error(`❌ ERROR: ${userIdentifier}`); strapi2.log.error(` ${errorMessage}`); strapi2.log.error(""); result.errors.push({ user: userIdentifier, error: errorMessage }); } } strapi2.log.info("Step 4: Verifying migration..."); const finalCount = await strapi2.db.query("plugin::firebase-authentication.firebase-user-data").count(); strapi2.log.info(`Total firebase_user_data records: ${finalCount}`); strapi2.log.info(""); strapi2.log.info("=== Migration Summary ==="); strapi2.log.info(`Total users: ${result.totalUsers}`); strapi2.log.info(`Users with Firebase data: ${result.usersWithFirebaseData}`); strapi2.log.info(`Migrated: ${result.migrated}`); strapi2.log.info(`Skipped (already migrated): ${result.skipped}`); strapi2.log.info(`Errors: ${result.errors.length}`); if (result.errors.length > 0) { strapi2.log.error(""); strapi2.log.error("=== Errors ==="); result.errors.forEach(({ user, error: error2 }) => { strapi2.log.error(`${user}: ${error2}`); }); } strapi2.log.info(""); if (dryRun) { strapi2.log.info("🔍 DRY RUN COMPLETE - No changes were made"); strapi2.log.info("Run again with dryRun=false to perform actual migration"); } else if (result.errors.length === 0) { strapi2.log.info("✅ MIGRATION COMPLETE - All users migrated successfully!"); } else { strapi2.log.warn("⚠️ MIGRATION COMPLETE WITH ERRORS - Review errors above"); } } catch (error2) { strapi2.log.error("Fatal error during migration:"); strapi2.log.error(error2); throw error2; } return result; } const bootstrap = async ({ strapi: strapi2 }) => { const actions = [ { section: "plugins", displayName: "Allow access to the Firebase Auth interface", uid: "menu-link", pluginName: "firebase-authentication" } ]; try { strapi2.log.info("Firebase plugin bootstrap starting..."); await strapi2.plugin("firebase-authentication").service("settingsService").init(); if (strapi2.firebase) { strapi2.log.info("Firebase successfully initialized"); strapi2.log.info(" - Admin SDK available at: strapi.firebase"); } else { strapi2.log.warn("Firebase not initialized - no config found in database"); strapi2.log.warn(" - Upload Firebase service account JSON via plugin settings"); } } catch (error2) { strapi2.log.error("Firebase initialization failed during bootstrap:"); strapi2.log.error(` Error: ${error2.message}`); strapi2.log.error(` Stack: ${error2.stack}`); } await strapi2.admin.services.permission.actionProvider.registerMany(actions); if (strapi2.plugin("users-permissions")) { const userPermissionsService = strapi2.plugin("users-permissions").service("users-permissions"); userPermissionsService.initialize(); } if (process.env.RUN_FIREBASE_MIGRATION === "true") { const dryRun = process.env.DRY_RUN === "true"; strapi2.log.info(""); strapi2.log.info("Firebase migration triggered by RUN_FIREBASE_MIGRATION env variable"); await migrateFirebaseUserData(strapi2, dryRun); } setImmediate(async () => { try { await strapi2.plugin("firebase-authentication").service("autoLinkService").linkAllUsers(strapi2); } catch (error2) { strapi2.log.error(`Auto-linking failed: ${error2.message}`); } }); }; const destroy = ({ strapi: strapi2 }) => { }; const register = ({ strapi: strapi2 }) => { strapi2.log.info("Firebase Auth Plugin registered"); strapi2.config.get("plugin::firebase-authentication"); }; const config$1 = { default: ({ env: env2 }) => ({ firebaseJsonEncryptionKey: env2("FIREBASE_JSON_ENCRYPTION_KEY", "your-key-here"), emailRequired: env2.bool("FIREBASE_EMAIL_REQUIRED", false), emailPattern: "{randomString}@phone-user.firebase.local" }), validator(config2) { if (!config2.firebaseJsonEncryptionKey) { throw new Error("FIREBASE_JSON_ENCRYPTION_KEY is required for Firebase Auth to work"); } if (config2.emailRequired) { if (!config2.emailPattern || config2.emailPattern.trim() === "") { throw new Error( '[Firebase Auth Plugin] emailPattern is required when emailRequired is true.\nAvailable tokens: {randomString}, {phoneNumber}, {timestamp}\nExample: "phone_{phoneNumber}_{randomString}@myapp.local"' ); } const hasUniqueness = config2.emailPattern.includes("{randomString}") || config2.emailPattern.includes("{timestamp}"); if (!hasUniqueness) { throw new Error( `[Firebase Auth Plugin] emailPattern must include {randomString} or {timestamp} for uniqueness. Your pattern: "${config2.emailPattern}" Valid examples: - "phone_{phoneNumber}_{randomString}@myapp.local" - "user_{timestamp}@temp.local" - "{randomString}@phone-user.firebase.local"` ); } } } }; const kind$1 = "singleType"; const collectionName$1 = "firebase_authentication_configurations"; const info$1 = { singularName: "firebase-authentication-configuration", pluralName: "firebase-authentication-configurations", displayName: "Firebase-authentication configuration" }; const options$1 = { draftAndPublish: false }; const pluginOptions$1 = { "content-manager": { visible: false }, "content-type-builder": { visible: false } }; const attributes$1 = { firebase_config_json: { type: "json" }, firebase_web_api_key: { type: "string", required: false, configurable: true, description: "Optional: Only required for the emailLogin endpoint. Most users should use Firebase Client SDK instead." }, passwordRequirementsRegex: { type: "string", "default": "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[@$!%*?&])[A-Za-z\\d@$!%*?&]{8,}$" }, passwordRequirementsMessage: { type: "text", "default": "Password must be at least 8 characters long and contain at least one uppercase letter, one lowercase letter, one number, and one special character." }, passwordResetUrl: { type: "string", "default": "http://localhost:3000/reset-password" }, passwordResetEmailSubject: { type: "string", "default": "Reset Your Password" }, enableMagicLink: { type: "boolean", "default": false, description: "Enable passwordless authentication via email" }, magicLinkUrl: { type: "string", "default": "http://localhost:1338/verify-magic-link.html", description: "URL where users complete magic link sign-in" }, magicLinkEmailSubject: { type: "string", "default": "Sign in to Your Application" }, magicLinkExpiryHours: { type: "integer", "default": 1, minimum: 1, maximum: 72, description: "How long the magic link remains valid (in hours)" }, emailVerificationUrl: { type: "string", "default": "http://localhost:3000/verify-email", description: "URL where users will be redirected to verify their email" }, emailVerificationEmailSubject: { type: "string", "default": "Verify Your Email" }, includeCredentialsInPasswordResetLink: { type: "boolean", "default": false, description: "Include Firebase custom token in password reset links for auto-login" }, includeCredentialsInVerificationLink: { type: "boolean", "default": false, description: "Include Firebase custom token in email verification links for auto-login" } }; const firebaseAuthenticationConfiguration = { kind: kind$1, collectionName: collectionName$1, info: info$1, options: options$1, pluginOptions: pluginOptions$1, attributes: attributes$1 }; const kind = "collectionType"; const collectionName = "firebase_user_data"; const info = { singularName: "firebase-user-data", pluralName: "firebase-user-datas", displayName: "Firebase User Data", description: "Stores Firebase-specific user data (UID, Apple email)" }; const options = { draftAndPublish: false }; const pluginOptions = { "content-manager": { visible: false }, "content-type-builder": { visible: false } }; const attributes = { user: { type: "relation", relation: "oneToOne", target: "plugin::users-permissions.user" }, firebaseUserID: { type: "string", unique: true, required: true }, appleEmail: { type: "string", "private": true }, resetTokenHash: { type: "string", "private": true }, resetTokenExpiresAt: { type: "datetime" }, verificationTokenHash: { type: "string", "private": true }, verificationTokenExpiresAt: { type: "datetime" } }; const firebaseUserData = { kind, collectionName, info, options, pluginOptions, attributes }; const contentTypes = { "firebase-authentication-configuration": { schema: firebaseAuthenticationConfiguration }, "firebase-user-data": { schema: firebaseUserData } }; var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {}; function getDefaultExportFromCjs(x) { return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x; } var lodash = { exports: {} }; /** * @license * Lodash <https://lodash.com/> * Copyright OpenJS Foundation and other contributors <https://openjsf.org/> * Released under MIT license <https://lodash.com/license> * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ lodash.exports; (function(module2, exports$1) { (function() { var undefined$1; var VERSION = "4.17.21"; var LARGE_ARRAY_SIZE2 = 200; var CORE_ERROR_TEXT = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", FUNC_ERROR_TEXT2 = "Expected a function", INVALID_TEMPL_VAR_ERROR_TEXT = "Invalid `variable` option passed into `_.template`"; var HASH_UNDEFINED2 = "__lodash_hash_undefined__"; var MAX_MEMOIZE_SIZE2 = 500; var PLACEHOLDER = "__lodash_placeholder__"; var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4; var COMPARE_PARTIAL_FLAG2 = 1, COMPARE_UNORDERED_FLAG2 = 2; var WRAP_BIND_FLAG = 1, WRAP_BIND_KEY_FLAG = 2, WRAP_CURRY_BOUND_FLAG = 4, WRAP_CURRY_FLAG = 8, WRAP_CURRY_RIGHT_FLAG = 16, WRAP_PARTIAL_FLAG = 32, WRAP_PARTIAL_RIGHT_FLAG = 64, WRAP_ARY_FLAG = 128, WRAP_REARG_FLAG = 256, WRAP_FLIP_FLAG = 512; var DEFAULT_TRUNC_LENGTH = 30, DEFAULT_TRUNC_OMISSION = "..."; var HOT_COUNT = 800, HOT_SPAN = 16; var LAZY_FILTER_FLAG = 1, LAZY_MAP_FLAG = 2, LAZY_WHILE_FLAG = 3; var INFINITY = 1 / 0, MAX_SAFE_INTEGER2 = 9007199254740991, MAX_INTEGER = 17976931348623157e292, NAN = 0 / 0; var MAX_ARRAY_LENGTH = 4294967295, MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; var wrapFlags = [ ["ary", WRAP_ARY_FLAG], ["bind", WRAP_BIND_FLAG], ["bindKey", WRAP_BIND_KEY_FLAG], ["curry", WRAP_CURRY_FLAG], ["curryRight", WRAP_CURRY_RIGHT_FLAG], ["flip", WRAP_FLIP_FLAG], ["partial", WRAP_PARTIAL_FLAG], ["partialRight", WRAP_PARTIAL_RIGHT_FLAG], ["rearg", WRAP_REARG_FLAG] ]; var argsTag2 = "[object Arguments]", arrayTag2 = "[object Array]", asyncTag2 = "[object AsyncFunction]", boolTag2 = "[object Boolean]", dateTag2 = "[object Date]", domExcTag = "[object DOMException]", errorTag2 = "[object Error]", funcTag2 = "[object Function]", genTag2 = "[object GeneratorFunction]", mapTag2 = "[object Map]", numberTag2 = "[object Number]", nullTag2 = "[object Null]", objectTag2 = "[object Object]", promiseTag2 = "[object Promise]", proxyTag2 = "[object Proxy]", regexpTag2 = "[object RegExp]", setTag2 = "[object Set]", stringTag2 = "[object String]", symbolTag2 = "[object Symbol]", undefinedTag2 = "[object Undefined]", weakMapTag2 = "[object WeakMap]", weakSetTag = "[object WeakSet]"; var arrayBufferTag2 = "[object ArrayBuffer]", dataViewTag2 = "[object DataView]", float32Tag2 = "[object Float32Array]", float64Tag2 = "[object Float64Array]", int8Tag2 = "[object Int8Array]", int16Tag2 = "[object Int16Array]", int32Tag2 = "[object Int32Array]", uint8Tag2 = "[object Uint8Array]", uint8ClampedTag2 = "[object Uint8ClampedArray]", uint16Tag2 = "[object Uint16Array]", uint32Tag2 = "[object Uint32Array]"; var reEmptyStringLeading = /\b__p \+= '';/g, reEmptyStringMiddle = /\b(__p \+=) '' \+/g, reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, reUnescapedHtml = /[&<>"']/g, reHasEscapedHtml = RegExp(reEscapedHtml.source), reHasUnescapedHtml = RegExp(reUnescapedHtml.source); var reEscape = /<%-([\s\S]+?)%>/g, reEvaluate = /<%([\s\S]+?)%>/g, reInterpolate = /<%=([\s\S]+?)%>/g; var reIsDeepProp2 = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp2 = /^\w*$/, rePropName2 = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; var reRegExpChar2 = /[\\^$.*+?()[\]{}|]/g, reHasRegExpChar = RegExp(reRegExpChar2.source); var reTrimStart = /^\s+/; var reWhitespace = /\s/; var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, reSplitDetails = /,? & /; var reAsciiWord2 = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/; var reEscapeChar2 = /\\(\\)?/g; var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; var reFlags = /\w*$/; var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; var reIsBinary = /^0b[01]+$/i; var reIsHostCtor2 = /^\[object .+?Constructor\]$/; var reIsOctal = /^0o[0-7]+$/i; var reIsUint2 = /^(?:0|[1-9]\d*)$/; var reLatin2 = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; var reNoMatch = /($^)/; var reUnescapedString = /['\n\r\u2028\u2029\\]/g; var rsAstralRange2 = "\\ud800-\\udfff", rsComboMarksRange2 = "\\u0300-\\u036f", reComboHalfMarksRange2 = "\\ufe20-\\ufe2f", rsComboSymbolsRange2 = "\\u20d0-\\u20ff", rsComboRange2 = rsComboMarksRange2 + reComboHalfMarksRange2 + rsComboSymbolsRange2, rsDingbatRange2 = "\\u2700-\\u27bf", rsLowerRange2 = "a-z\\xdf-\\xf6\\xf8-\\xff", rsMathOpRange2 = "\\xac\\xb1\\xd7\\xf7", rsNonCharRange2 = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", rsPunctuationRange2 = "\\u2000-\\u206f", rsSpaceRange2 = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", rsUpperRange2 = "A-Z\\xc0-\\xd6\\xd8-\\xde", rsVarRange2 = "\\ufe0e\\ufe0f", rsBreakRange2 = rsMathOpRange2 + rsNonCharRange2 + rsPunctuationRange2 + rsSpaceRange2; var rsApos2 = "['’]", rsAstral2 = "[" + rsAstralRange2 + "]", rsBreak2 = "[" + rsBreakRange2 + "]", rsCombo2 = "[" + rsComboRange2 + "]", rsDigits2 = "\\d+", rsDingbat2 = "[" + rsDingbatRange2 + "]", rsLower2 = "[" + rsLowerRange2 + "]", rsMisc2 = "[^" + rsAstralRange2 + rsBreakRange2 + rsDigits2 + rsDingbatRange2 + rsLowerRange2 + rsUpperRange2 + "]", rsFitz2 = "\\ud83c[\\udffb-\\udfff]", rsModifier2 = "(?:" + rsCombo2 + "|" + rsFitz2 + ")", rsNonAstral2 = "[^" + rsAstralRange2 + "]", rsRegional2 = "(?:\\ud83c[\\udde6-\\uddff]){2}", rsSurrPair2 = "[\\ud800-\\udbff][\\udc00-\\udfff]", rsUpper2 = "[" + rsUpperRange2 + "]", rsZWJ2 = "\\u200d"; var rsMiscLower2 = "(?:" + rsLower2 + "|" + rsMisc2 + ")", rsMiscUpper2 = "(?:" + rsUpper2 + "|" + rsMisc2 + ")", rsOptContrLower2 = "(?:" + rsApos2 + "(?:d|ll|m|re|s|t|ve))?", rsOptContrUpper2 = "(?:" + rsApos2 + "(?:D|LL|M|RE|S|T|VE))?", reOptMod2 = rsModifier2 + "?", rsOptVar2 = "[" + rsVarRange2 + "]?", rsOptJoin2 = "(?:" + rsZWJ2 + "(?:" + [rsNonAstral2, rsRegional2, rsSurrPair2].join("|") + ")" + rsOptVar2 + reOptMod2 + ")*", rsOrdLower2 = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", rsOrdUpper2 = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", rsSeq2 = rsOptVar2 + reOptMod2 + rsOptJoin2, rsEmoji2 = "(?:" + [rsDingbat2, rsRegional2, rsSurrPair2].join("|") + ")" + rsSeq2, rsSymbol2 = "(?:" + [rsNonAstral2 + rsCombo2 + "?", rsCombo2, rsRegional2, rsSurrPair2, rsAstral2].join("|") + ")"; var reApos2 = RegExp(rsApos2, "g"); var reComboMark2 = RegExp(rsCombo2, "g"); var reUnicode2 = RegExp(rsFitz2 + "(?=" + rsFitz2 + ")|" + rsSymbol2 + rsSeq2, "g"); var reUnicodeWord2 = RegExp([ rsUpper2 + "?" + rsLower2 + "+" + rsOptContrLower2 + "(?=" + [rsBreak2, rsUpper2, "$"].join("|") + ")", rsMiscUpper2 + "+" + rsOptContrUpper2 + "(?=" + [rsBreak2, rsUpper2 + rsMiscLower2, "$"].join("|") + ")", rsUpper2 + "?" + rsMiscLower2 + "+" + rsOptContrLower2, rsUpper2 + "+" + rsOptContrUpper2, rsOrdUpper2, rsOrdLower2, rsDigits2, rsEmoji2 ].join("|"), "g"); var reHasUnicode2 = RegExp("[" + rsZWJ2 + rsAstralRange2 + rsComboRange2 + rsVarRange2 + "]"); var reHasUnicodeWord2 = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; var contextProps = [ "Array", "Buffer", "DataView", "Date", "Error", "Float32Array", "Float64Array", "Function", "Int8Array", "Int16Array", "Int32Array", "Map", "Math", "Object", "Promise", "RegExp", "Set", "String", "Symbol", "TypeError", "Uint8Array", "Uint8ClampedArray", "Uint16Array", "Uint32Array", "WeakMap", "_", "clearTimeout", "isFinite", "parseInt", "setTimeout" ]; var templateCounter = -1; var typedArrayTags2 = {}; typedArrayTags2[float32Tag2] = typedArrayTags2[float64Tag2] = typedArrayTags2[int8Tag2] = typedArrayTags2[int16Tag2] = typedArrayTags2[int32Tag2] = typedArrayTags2[uint8Tag2] = typedArrayTags2[uint8ClampedTag2] = typedArrayTags2[uint16Tag2] = typedArrayTags2[uint32Tag2] = true; typedArrayTags2[argsTag2] = typedArrayTags2[arrayTag2] = typedArrayTags2[arrayBufferTag2] = typedArrayTags2[boolTag2] = typedArrayTags2[dataViewTag2] = typedArrayTags2[dateTag2] = typedArrayTags2[errorTag2] = typedArrayTags2[funcTag2] = typedArrayTags2[mapTag2] = typedArrayTags2[numberTag2] = typedArrayTags2[objectTag2] = typedArrayTags2[regexpTag2] = typedArrayTags2[setTag2] = typedArrayTags2[stringTag2] = typedArrayTags2[weakMapTag2] = false; var cloneableTags = {}; cloneableTags[argsTag2] = cloneableTags[arrayTag2] = cloneableTags[arrayBufferTag2] = cloneableTags[dataViewTag2] = cloneableTags[boolTag2] = cloneableTags[dateTag2] = cloneableTags[float32Tag2] = cloneableTags[float64Tag2] = cloneableTags[int8Tag2] = cloneableTags[int16Tag2] = cloneableTags[int32Tag2] = cloneableTags[mapTag2] = cloneableTags[numberTag2] = cloneableTags[objectTag2] = cloneableTags[regexpTag2] = cloneableTags[setTag2] = cloneableTags[stringTag2] = cloneableTags[symbolTag2] = cloneableTags[uint8Tag2] = cloneableTags[uint8ClampedTag2] = cloneableTags[uint16Tag2] = cloneableTags[uint32Tag2] = true; cloneableTags[errorTag2] = cloneableTags[funcTag2] = cloneableTags[weakMapTag2] = false; var deburredLetters2 = { // Latin-1 Supplement block. "À": "A", "Á": "A", "Â": "A", "Ã": "A", "Ä": "A", "Å": "A", "à": "a", "á": "a", "â": "a", "ã": "a", "ä": "a", "å": "a", "Ç": "C", "ç": "c", "Ð": "D", "ð": "d", "È": "E", "É": "E", "Ê": "E", "Ë": "E", "è": "e", "é": "e", "ê": "e", "ë": "e", "Ì": "I", "Í": "I", "Î": "I", "Ï": "I", "ì": "i", "í": "i", "î": "i", "ï": "i", "Ñ": "N", "ñ": "n", "Ò": "O", "Ó": "O", "Ô": "O", "Õ": "O", "Ö": "O", "Ø": "O", "ò": "o", "ó": "o", "ô": "o", "õ": "o", "ö": "o", "ø": "o", "Ù": "U", "Ú": "U", "Û": "U", "Ü": "U", "ù": "u", "ú": "u", "û": "u", "ü": "u", "Ý": "Y", "ý": "y", "ÿ": "y", "Æ": "Ae", "æ": "ae", "Þ": "Th", "þ": "th", "ß": "ss", // Latin Extended-A block. "Ā": "A", "Ă": "A", "Ą": "A", "ā": "a", "ă": "a", "ą": "a", "Ć": "C", "Ĉ": "C", "Ċ": "C", "Č": "C", "ć": "c", "ĉ": "c", "ċ": "c", "č": "c", "Ď": "D", "Đ": "D", "ď": "d", "đ": "d", "Ē": "E", "Ĕ": "E", "Ė": "E", "Ę": "E", "Ě": "E", "ē": "e", "ĕ": "e", "ė": "e", "ę": "e", "ě": "e", "Ĝ": "G", "Ğ": "G", "Ġ": "G", "Ģ": "G", "ĝ": "g", "ğ": "g", "ġ": "g", "ģ": "g", "Ĥ": "H", "Ħ": "H", "ĥ": "h", "ħ": "h", "Ĩ": "I", "Ī": "I", "Ĭ": "I", "Į": "I", "İ": "I", "ĩ": "i", "ī": "i", "ĭ": "i", "į": "i", "ı": "i", "Ĵ": "J", "ĵ": "j", "Ķ": "K", "ķ": "k", "ĸ": "k", "Ĺ": "L", "Ļ": "L", "Ľ": "L", "Ŀ": "L", "Ł": "L", "ĺ": "l", "ļ": "l", "ľ": "l", "ŀ": "l", "ł": "l", "Ń": "N", "Ņ": "N", "Ň": "N", "Ŋ": "N", "ń": "n", "ņ": "n", "ň": "n", "ŋ": "n", "Ō": "O", "Ŏ": "O", "Ő": "O", "ō": "o", "ŏ": "o", "ő": "o", "Ŕ": "R", "Ŗ": "R", "Ř": "R", "ŕ": "r", "ŗ": "r", "ř": "r", "Ś": "S", "Ŝ": "S", "Ş": "S", "Š": "S", "ś": "s", "ŝ": "s", "ş": "s", "š": "s", "Ţ": "T", "Ť": "T", "Ŧ": "T", "ţ": "t", "ť": "t", "ŧ": "t", "Ũ": "U", "Ū": "U", "Ŭ": "U", "Ů": "U", "Ű": "U", "Ų": "U", "ũ": "u", "ū": "u", "ŭ": "u", "ů": "u", "ű": "u", "ų": "u", "Ŵ": "W", "ŵ": "w", "Ŷ": "Y", "ŷ": "y", "Ÿ": "Y", "Ź": "Z", "Ż": "Z", "Ž": "Z", "ź": "z", "ż": "z", "ž": "z", "IJ": "IJ", "ij": "ij", "Œ": "Oe", "œ": "oe", "ʼn": "'n", "ſ": "s" }; var htmlEscapes = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }; var htmlUnescapes = { "&amp;": "&", "&lt;": "<", "&gt;": ">", "&quot;": '"', "&#39;": "'" }; var stringEscapes = { "\\": "\\", "'": "'", "\n": "n", "\r": "r", "\u2028": "u2028", "\u2029": "u2029" }; var freeParseFloat = parseFloat, freeParseInt = parseInt; var freeGlobal2 = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; var freeSelf2 = typeof self == "object" && self && self.Object === Object && self; var root2 = freeGlobal2 || freeSelf2 || Function("return this")(); var freeExports = exports$1 && !exports$1.nodeType && exports$1; var freeModule = freeExports && true && module2 && !module2.nodeType && module2; var moduleExports = freeModule && freeModule.exports === freeExports; var freeProcess = moduleExports && freeGlobal2.process; var nodeUtil2 = function() { try { var types = freeModule && freeModule.require && freeModule.require("util").types; if (types) { return types; } return freeProcess && freeProcess.binding && freeProcess.binding("util"); } catch (e) { } }(); var nodeIsArrayBuffer = nodeUtil2 && nodeUtil2.isArrayBuffer, nodeIsDate = nodeUtil2 && nodeUtil2.isDate, nodeIsMap = nodeUtil2 && nodeUtil2.isMap, nodeIsRegExp = nodeUtil2 && nodeUtil2.isRegExp, nodeIsSet = nodeUtil2 && nodeUtil2.isSet, nodeIsTypedArray2 = nodeUtil2 && nodeUtil2.isTypedArray; function apply(func, thisArg, args) { switch (args.length) { case 0: return func.call(thisArg); case 1: return func.call(thisArg, args[0]); case 2: return func.call(thisArg, args[0], args[1]); case 3: return func.call(thisArg, args[0], args[1], args[2]); } return func.apply(thisArg, args); } function arrayAggregator(array2, setter, iteratee, accumulator) { var index2 = -1, length = array2 == null ? 0 : array2.length; while (++index2 < length) { var value = array2[index2]; setter(accumulator, value, iteratee(value), array2); } return accumulator; } function arrayEach(array2, iteratee) { var index2 = -1, length = array2 == null ? 0 : array2.length; while (++index2 < length) { if (iteratee(array2[index2], index2, array2) === false) { break; } } return array2; } function arrayEachRight(array2, iteratee) { var length = array2 == null ? 0 : array2.length; while (length--) { if (iteratee(array2[length], length, array2) === false) { break; } } return array2; } function arrayEvery(array2, predicate) { var index2 = -1, length = array2 == null ? 0 : array2.length; while (++index2 < length) { if (!predicate(array2[index2], index2, array2)) { return false; } } return true; } function arrayFilter2(array2, predicate) { var index2 = -1, length = array2 == null ? 0 : array2.length, resIndex = 0, result = []; while (++index2 < length) { var value = array2[index2]; if (predicate(value, index2, array2)) { result[resIndex++] = value; } } return result; } function arrayIncludes(array2, value) { var length = array2 == null ? 0 : array2.length; return !!length && baseIndexOf(array2, value, 0) > -1; } function arrayIncludesWith(array2, value, comparator2) { var index2 = -1, length = array2 == null ? 0 : array2.length; while (++index2 < length) { if (comparator2(value, array2[index2])) { return true; } } return false; } function arrayMap2(array2, iteratee) { var index2 = -1, length = array2 == null ? 0 : array2.length, result = Array(length); while (++index2 < length) { result[index2] = iteratee(array2[index2], index2, array2); } return result; } function arrayPush2(array2, values) { var index2 = -1, length = values.length, offset = array2.length; while (++index2 < length) { array2[offset + index2] = values[index2]; } return array2; } function arrayReduce2(array2, iteratee, accumulator, initAccum) { var index2 = -1, length = array2 == null ? 0 : array2.length; if (initAccum && length) { accumulator = array2[++index2]; } while (++index2 < length) { accumulator = iteratee(accumulator, array2[index2], index2, array2); } return accumulator; } function arrayReduceRight(array2, iteratee, accumulator, initAccum) { var length = array2 == null ? 0 : array2.length; if (initAccum && length) { accumulator = array2[--length]; } while (length--) { accumulator = iteratee(accumulator, array2[length], length, array2); } return accumulator; } function arraySome2(array2, predicate) { var index2 = -1, length = array2 == null ? 0 : array2.length; while (++index2 < length) { if (predicate(array2[index2], index2, array2)) { return true; } } return false; } var asciiSize = baseProperty2("length"); function asciiToArray2(string2) { return string2.split(""); } function asciiWords2(string2) { return string2.match(reAsciiWord2) || []; } function baseFindKey(collection, predicate, eachFunc) { var result; eachFunc(collection, function(value, key, collection2) { if (predicate(value, key, collection2)) { result = key; return false; } }); return result; } function baseFindIndex(array2, predicate, fromIndex, fromRight) { var length = array2.length, index2 = fromIndex + (fromRight ? 1 : -1); while (fromRight ? index2-- : ++index2 < length) { if (predicate(array2[index2], index2, array2)) { return index2; } } return -1; } function baseIndexOf(array2, value, fromIndex) { return value === value ? strictIndexOf(array2, value, fromIndex) : baseFindIndex(array2, baseIsNaN, fromIndex); } function baseIndexOfWith(array2, value, fromIndex, comparator2) { var index2 = fromIndex - 1, length = array2.length; while (++index2 < length) { if (comparator2(array2[index2], value)) { return index2; } } return -1; } function baseIsNaN(value) { return value !== value; } function baseMean(array2, iteratee) { var length = array2 == null ? 0 : array2.length; return length ? baseSum(array2, iteratee) / length : NAN; } function baseProperty2(key) { return function(object2) { return object2 == null ? undefined$1 : object2[key]; }; } function basePropertyOf2(object2) { return function(key) { return object2 == null ? undefined$1 : object2[key]; }; } function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { eachFunc(collection, function(value, index2, collection2) { accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index2, collection2); }); return accumulator; } function baseSortBy(array2, comparer) { var length = array2.length; array2.sort(comparer); while (length--) { array2[length] = array2[length].value; } return array2; } function baseSum(array2, iteratee) { var result, index2 = -1, length = array2.length; while (++index2 < length) { var current = iteratee(array2[index2]); if (current !== undefined$1) { result = result === undefined$1 ? current : result + current; } } return result; } function baseTimes2(n, iteratee) { var index2 = -1, result = Array(n); while (++index2 < n) { result[index2] = iteratee(index2); } return result; } function baseToPairs(object2, props) { return arrayMap2(props, function(key) { return [key, object2[key]]; }); } function baseTrim(string2) { return string2 ? string2.slice(0, trimmedEndIndex(string2) + 1).replace(reTrimStart, "") : string2; } function baseUnary2(func) { return function(value) { return func(value); }; } function baseValues(object2, props) { return arrayMap2(props, function(key) { return object2[key]; }); } function cacheHas2(cache, key) { return cache.has(key); } function charsStartIndex(strSymbols, chrSymbols) { var index2 = -1, length = strSymbols.length; while (++index2 < length && baseIndexOf(chrSymbols, strSymbols[index2], 0) > -1) { } return index2; } function charsEndIndex(strSymbols, chrSymbols) { var index2 = strSymbols.length; while (index2-- && baseIndexOf(chrSymbols, strSymbols[index2], 0) > -1) { } return index2; } function countHolders(array2, placeholder2) { var length = array2.length, result = 0; while (length--) { if (array2[length] === placeholder2) { ++result; } } return result; } var deburrLetter2 = basePropertyOf2(deburredLetters2); var escapeHtmlChar = basePropertyOf2(htmlEscapes); function escapeStringChar(chr) { return "\\" + stringEscapes[chr]; } function getValue2(object2, key) { return object2 == null ? undefined$1 : object2[key]; } function hasUnicode2(string2) { return reHasUnicode2.test(string2); } function hasUnicodeWord2(string2) { return reHasUnicodeWord2.test(string2); } function iteratorToArray(iterator2) { var data, result = []; while (!(data = iterator2.next()).done) { result.push(data.value); } return result; } function mapToArray2(map2) { var index2 = -1, result = Array(map2.size); map2.forEach(function(value, key) { result[++index2] = [key, value]; }); return result; } function overArg2(func, transform2) { return function(arg) { return func(transform2(arg)); }; } function replaceHolders(array2, placeholder2) { var index2 = -1, length = array2.length, resIndex = 0, result = []; while (++index2 < length) { var value = array2[index2]; if (value === placeholder2 || value === PLACEHOLDER) { array2[index2] = PLACEHOLDER; result[resIndex++] = index2; } } return result; } function setToArray2(set2) { var index2 = -1, result = Array(set2.size); set2.forEach(function(value) { result[++index2] = value; }); return result; } function setToPairs(set2) { var index2 = -1, result = Array(set2.size); set2.forEach(function(value) { result[++index2] = [value, value]; }); return result; } function strictIndexOf(array2, value, fromIndex) { var index2 = fromIndex - 1, length = array2.length; while (++index2 < length) { if (array2[index2] === value) { return index2; } } return -1; } function strictLastIndexOf(array2, value, fromIndex) { var index2 = fromIndex + 1; while (index2--) { if (array2[index2] === value) { return index2; } } return index2; } function stringSize(string2) { return hasUnicode2(string2) ? unicodeSize(string2) : asciiSize(string2); } function stringToArray2(string2) { return hasUnicode2(string2) ? unicodeToArray2(string2) : asciiToArray2(string2); } function trimmedEndIndex(string2) { var index2 = string2.length; while (index2-- && reWhitespace.test(string2.charAt(index2))) { } return index2; } var unescapeHtmlChar = basePropertyOf2(htmlUnescapes); function unicodeSize(string2) { var result = reUnicode2.lastIndex = 0; while (reUnicode2.test(string2)) { ++result; } return result; } function unicodeToArray2(string2) { return string2.match(reUnicode2) || []; } function unicodeWords2(string2) { return string2.match(reUnicodeWord2) || []; } var runInContext = function runInContext2(context) { context = context == null ? root2 : _2.defaults(root2.Object(), context, _2.pick(root2, contextProps)); var Array2 = context.Array, Date2 = context.Date, Error2 = context.Error, Function2 = context.Function, Math2 = context.Math, Object2 = context.Object, RegExp2 = context.RegExp, String2 = context.String, TypeError2 = context.TypeError; var arrayProto2 = Array2.prototype, funcProto2 = Function2.prototype, objectProto2 = Object2.prototype; var coreJsData2 = context["__core-js_shared__"]; var funcToString2 = funcProto2.toString; var hasOwnProperty2 = objectProto2.hasOwnProperty; var idCounter = 0; var maskSrcKey2 = function() { var uid = /[^.]+$/.exec(coreJsData2 && coreJsData2.keys && coreJsData2.keys.IE_PROTO || ""); return uid ? "Symbol(src)_1." + uid : ""; }(); var nativeObjectToString2 = objectProto2.toString; var objectCtorString = funcToString2.call(Object2); var oldDash = root2._; var reIsNative2 = RegExp2( "^" + funcToString2.call(hasOwnProperty2).replace(reRegExpChar2, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); var Buffer2 = moduleExports ? context.Buffer : undefined$1, Symbol2 = context.Symbol, Uint8Array2 = context.Uint8Array, allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : undefined$1, getPrototype = overArg2(Object2.getPrototypeOf, Object2), objectCreate = Object2.create, propertyIsEnumerable2 = objectProto2.propertyIsEnumerable, splice2 = arrayProto2.splice, spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : undefined$1, symIterator = Symbol2 ? Symbol2.iterator : undefined$1, symToStringTag2 = Symbol2 ? Symbol2.toStringTag : undefined$1; var defineProperty2 = function() { try { var func = getNative2(Object2, "defineProperty"); func({}, "", {}); return func; } catch (e) { } }(); var ctxClearTimeout = context.clearTimeout !== root2.clearTimeout && context.clearTimeout, ctxNow = Date2 && Date2.now !== root2.Date.now && Date2.now, ctxSetTimeout = context.setTimeout !== root2.setTimeout && context.setTimeout; var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols2 = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : undefined$1, nativeIsFinite = context.isFinite, nativeJoin = arrayProto2.join, nativeKeys2 = overArg2(Object2.keys, Object2), nativeMax = Math2.max, nativeMin = Math2.min, nativeNow = Date2.now, nativeParseInt = context.parseInt, nativeRandom = Math2.random, nativeReverse = arrayProto2.reverse; var DataView2 = getNative2(context, "DataView"), Map2 = getNative2(context, "Map"), Promise2 = getNative2(context, "Promise"), Set2 = getNative2(context, "Set"), WeakMap2 = getNative2(context, "WeakMap"), nativeCreate2 = getNative2(Object2, "create"); var metaMap = WeakMap2 && new WeakMap2(); var realNames = {}; var dataViewCtorString2 = toSource2(DataView2), mapCtorString2 = toSource2(Map2), promiseCtorString2 = toSource2(Promise2), setCtorString2 = toSource2(Set2), weakMapCtorString2 = toSource2(WeakMap2); var symbolProto2 = Symbol2 ? Symbol2.prototype : undefined$1, symbolValueOf2 = symbolProto2 ? symbolProto2.valueOf : undefined$1, symbolToString2 = symbolProto2 ? symbolProto2.toString : undefined$1; function lodash2(value) { if (isObjectLike2(value) && !isArray2(value) && !(value instanceof LazyWrapper)) { if (value instanceof LodashWrapper) { return value; } if (hasOwnProperty2.call(value, "__wrapped__")) { return wrapperClone(value); } } return new LodashWrapper(value); } var baseCreate = /* @__PURE__ */ function() { function object2() { } return function(proto) { if (!isObject2(proto)) { return {}; } if (objectCreate) { return objectCreate(proto); } object2.prototype = proto; var result2 = new object2(); object2.prototype = undefined$1; return result2; }; }(); function baseLodash() { } function LodashWrapper(value, chainAll) { this.__wrapped__ = value; this.__actions__ = []; this.__chain__ = !!chainAll; this.__index__ = 0; this.__values__ = undefined$1; } lodash2.templateSettings = { /** * Used to detect `data` property values to be HTML-escaped. * * @memberOf _.templateSettings * @type {RegExp} */ "escape": reEscape, /** * Used to detect code to be evaluated. * * @memberOf _.templateSettings * @type {RegExp} */ "evaluate": reEvaluate, /** * Used to detect `data` property values to inject. * * @memberOf _.templateSettings * @type {RegExp} */ "interpolate": reInterpolate, /** * Used to reference the data object in the template text. * * @memberOf _.templateSettings * @type {string} */ "variable": "", /** * Used to import variables into the compiled template. * * @memberOf _.templateSettings * @type {Object} */ "imports": { /** * A reference to the `lodash` function. * * @memberOf _.templateSettings.imports * @type {Function} */ "_": lodash2 } }; lodash2.prototype = baseLodash.prototype; lodash2.prototype.constructor = lodash2; LodashWrapper.prototype = baseCreate(baseLodash.prototype); LodashWrapper.prototype.constructor = LodashWrapper; function LazyWrapper(value) { this.__wrapped__ = value; this.__actions__ = []; this.__dir__ = 1; this.__filtered__ = false; this.__iteratees__ = []; this.__takeCount__ = MAX_ARRAY_LENGTH; this.__views__ = []; } function lazyClone() { var result2 = new LazyWrapper(this.__wrapped__); result2.__actions__ = copyArray(this.__actions__); result2.__dir__ = this.__dir__; result2.__filtered__ = this.__filtered__; result2.__iteratees__ = copyArray(this.__iteratees__); result2.__takeCount__ = this.__takeCount__; result2.__views__ = copyArray(this.__views__); return result2; } function lazyReverse() { if (this.__filtered__) { var result2 = new LazyWrapper(this); result2.__dir__ = -1; result2.__filtered__ = true; } else { result2 = this.clone(); result2.__dir__ *= -1; } return result2; } function lazyValue() { var array2 = this.__wrapped__.value(), dir = this.__dir__, isArr = isArray2(array2), isRight = dir < 0, arrLength = isArr ? array2.length : 0, view = getView(0, arrLength, this.__views__), start = view.start, end2 = view.end, length = end2 - start, index2 = isRight ? end2 : start - 1, iteratees = this.__iteratees__, iterLength = iteratees.length, resIndex = 0, takeCount = nativeMin(length, this.__takeCount__); if (!isArr || !isRight && arrLength == length && takeCount == length) { return baseWrapperValue(array2, this.__actions__); } var result2 = []; outer: while (length-- && resIndex < takeCount) { index2 += dir; var iterIndex = -1, value = array2[index2]; while (++iterIndex < iterLength) { var data = iteratees[iterIndex], iteratee2 = data.iteratee, type2 = data.type, computed = iteratee2(value); if (type2 == LAZY_MAP_FLAG) { value = computed; } else if (!computed) { if (type2 == LAZY_FILTER_FLAG) { continue outer; } else { break outer; } } } result2[resIndex++] = value; } return result2; } LazyWrapper.prototype = baseCreate(baseLodash.prototype); LazyWrapper.prototype.constructor = LazyWrapper; function Hash2(entries) { var index2 = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index2 < length) { var entry = entries[index2]; this.set(entry[0], entry[1]); } } function hashClear2() { this.__data__ = nativeCreate2 ? nativeCreate2(null) : {}; this.size = 0; } function hashDelete2(key) { var result2 = this.has(key) && delete this.__data__[key];