castled-js-sdk 0.0.1 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (660) hide show
  1. package/.env.example +8 -0
  2. package/.eslintignore +15 -0
  3. package/.eslintrc.json +41 -0
  4. package/.github/ISSUE_TEMPLATE/bug_report.md +50 -0
  5. package/.github/ISSUE_TEMPLATE/feature_request.md +19 -0
  6. package/.github/pull_request_template.md +22 -0
  7. package/.github/workflows/build-and-quality-checks.yml +50 -0
  8. package/.github/workflows/deploy-beta.yml +55 -0
  9. package/.github/workflows/deploy-cdn.yml +113 -0
  10. package/.github/workflows/deploy-npm.yml +80 -0
  11. package/.github/workflows/deploy-sanity-suite.yml +46 -0
  12. package/.github/workflows/test.yml +39 -0
  13. package/.husky/commit-msg +4 -0
  14. package/.husky/pre-commit +4 -0
  15. package/.nvmrc +1 -0
  16. package/.prettierignore +10 -0
  17. package/.prettierrc +7 -0
  18. package/.size-limit.js +30 -0
  19. package/.versionrc +12 -0
  20. package/LICENSE +67 -0
  21. package/README.md +102 -22
  22. package/__mocks__/BraveBrowser.js +9 -0
  23. package/__mocks__/fixtures.js +130 -0
  24. package/__mocks__/msw.handlers.js +34 -0
  25. package/__mocks__/msw.server.js +6 -0
  26. package/__tests__/camelcase.test.js +29 -0
  27. package/__tests__/data-residency.test.js +238 -0
  28. package/__tests__/features/core/metrics/errorReporting/ErrorReportingService.test.js +80 -0
  29. package/__tests__/integrations/BingAds/__mocks__/data.js +17 -0
  30. package/__tests__/integrations/BingAds/browser.test.js +148 -0
  31. package/__tests__/integrations/BingAds/utils.test.js +138 -0
  32. package/__tests__/integrations/Braze/Braze.test.js +462 -0
  33. package/__tests__/integrations/FacebookPixel/FacebookPixel.test.js +347 -0
  34. package/__tests__/integrations/FacebookPixel/utils.test.js +688 -0
  35. package/__tests__/integrations/Fullstory/fullstory.test.js +147 -0
  36. package/__tests__/integrations/GA4/__mocks__/data.js +1480 -0
  37. package/__tests__/integrations/GA4/browser.test.js +94 -0
  38. package/__tests__/integrations/GA4/utils.test.js +337 -0
  39. package/__tests__/integrations/GoogleAds/__mocks__/data.js +235 -0
  40. package/__tests__/integrations/GoogleAds/browser.test.js +202 -0
  41. package/__tests__/integrations/GoogleAds/utils.test.js +110 -0
  42. package/__tests__/integrations/LaunchDarkly/__mocks__/data.js +61 -0
  43. package/__tests__/integrations/LaunchDarkly/browser.test.js +148 -0
  44. package/__tests__/integrations/LaunchDarkly/utils.test.js +36 -0
  45. package/__tests__/integrations/Lemnisk/lemnisk.test.js +156 -0
  46. package/__tests__/integrations/Mixpanel/browser.test.js +60 -0
  47. package/__tests__/integrations/PinterestTag/__mocks__/data.js +24 -0
  48. package/__tests__/integrations/PinterestTag/utils.test.js +19 -0
  49. package/__tests__/integrations/TikTokAds/tiktokads.test.js +231 -0
  50. package/__tests__/ketchConsent.test.js +49 -0
  51. package/__tests__/oneTrustCookieConsent.test.js +89 -0
  52. package/__tests__/script.test.js +167 -0
  53. package/__tests__/service-worker/__mocks__/fixtures.js +79 -0
  54. package/__tests__/service-worker/__mocks__/msw.server.js +12 -0
  55. package/__tests__/service-worker/index.test.js +109 -0
  56. package/__tests__/transformationHandler.test.js +169 -0
  57. package/__tests__/utils/IntegrationsData.test.js +105 -0
  58. package/__tests__/utils/ObjectUtils.test.js +227 -0
  59. package/__tests__/utils/cdnPaths.test.js +63 -0
  60. package/__tests__/utils/clientHint.test.js +87 -0
  61. package/__tests__/utils/commonUtils.test.js +271 -0
  62. package/__tests__/utils/errorHandler.test.js +60 -0
  63. package/__tests__/utils/eventProcessorUtils.test.js +266 -0
  64. package/__tests__/utils/navigator.test.js +38 -0
  65. package/__tests__/utils/preProcessQueue.test.js +78 -0
  66. package/__tests__/utils/screenDetails.test.js +19 -0
  67. package/__tests__/utils/utils.test.js +348 -0
  68. package/assets/integrations/AdobeAnalytics/adobe-analytics-heartbeat.js +12384 -0
  69. package/assets/integrations/AdobeAnalytics/adobe-analytics-js.js +5046 -0
  70. package/babel.config.json +34 -0
  71. package/commitlint.config.js +3 -0
  72. package/examples/SampleEventsTest.Html +133 -0
  73. package/examples/TC/TC_001.js +4 -0
  74. package/examples/TC/TC_002.js +4 -0
  75. package/examples/TC/TC_003.js +4 -0
  76. package/examples/TC/TC_004.js +4 -0
  77. package/examples/TC/TC_005.js +4 -0
  78. package/examples/chrome-extension/USAGE.md +131 -0
  79. package/examples/chrome-extension/background-script/LICENSE +21 -0
  80. package/examples/chrome-extension/background-script/README.md +101 -0
  81. package/examples/chrome-extension/background-script/foreground.js +7 -0
  82. package/examples/chrome-extension/background-script/logo/logo-128.png +0 -0
  83. package/examples/chrome-extension/background-script/logo/logo-16.png +0 -0
  84. package/examples/chrome-extension/background-script/logo/logo-48.png +0 -0
  85. package/examples/chrome-extension/background-script/logo/logo.svg +138 -0
  86. package/examples/chrome-extension/background-script/manifest.json +37 -0
  87. package/examples/chrome-extension/background-script/popup/popup.css +11 -0
  88. package/examples/chrome-extension/background-script/popup/popup.html +11 -0
  89. package/examples/chrome-extension/background-script/rudderAnalytics.js +5345 -0
  90. package/examples/chrome-extension/background-script/service-worker.js +32 -0
  91. package/examples/chrome-extension/background-script/settings/settings.css +8 -0
  92. package/examples/chrome-extension/background-script/settings/settings.html +12 -0
  93. package/examples/chrome-extension/background-script-websockets/LICENSE +21 -0
  94. package/examples/chrome-extension/background-script-websockets/README.md +101 -0
  95. package/examples/chrome-extension/background-script-websockets/foreground.js +7 -0
  96. package/examples/chrome-extension/background-script-websockets/logo/logo-128.png +0 -0
  97. package/examples/chrome-extension/background-script-websockets/logo/logo-16.png +0 -0
  98. package/examples/chrome-extension/background-script-websockets/logo/logo-48.png +0 -0
  99. package/examples/chrome-extension/background-script-websockets/logo/logo.svg +138 -0
  100. package/examples/chrome-extension/background-script-websockets/manifest.json +37 -0
  101. package/examples/chrome-extension/background-script-websockets/popup/popup.css +11 -0
  102. package/examples/chrome-extension/background-script-websockets/popup/popup.html +11 -0
  103. package/{service-worker/index.es.js → examples/chrome-extension/background-script-websockets/rudderAnalytics.js} +1283 -1274
  104. package/examples/chrome-extension/background-script-websockets/service-worker.js +60 -0
  105. package/examples/chrome-extension/background-script-websockets/settings/settings.css +8 -0
  106. package/examples/chrome-extension/background-script-websockets/settings/settings.html +12 -0
  107. package/examples/chrome-extension/content-script/LICENSE +21 -0
  108. package/examples/chrome-extension/content-script/README.md +101 -0
  109. package/examples/chrome-extension/content-script/foreground.js +65 -0
  110. package/examples/chrome-extension/content-script/logo/logo-128.png +0 -0
  111. package/examples/chrome-extension/content-script/logo/logo-16.png +0 -0
  112. package/examples/chrome-extension/content-script/logo/logo-48.png +0 -0
  113. package/examples/chrome-extension/content-script/logo/logo.svg +138 -0
  114. package/examples/chrome-extension/content-script/manifest.json +39 -0
  115. package/examples/chrome-extension/content-script/popup/popup.css +11 -0
  116. package/examples/chrome-extension/content-script/popup/popup.html +11 -0
  117. package/examples/chrome-extension/content-script/service-worker-utils.js +17 -0
  118. package/examples/chrome-extension/content-script/service-worker.js +12 -0
  119. package/examples/chrome-extension/content-script/settings/settings.css +8 -0
  120. package/examples/chrome-extension/content-script/settings/settings.html +12 -0
  121. package/examples/chrome-extension/websocket-server/server.mjs +19 -0
  122. package/examples/html/autotrack-test.html +96 -0
  123. package/examples/html/ecomm_test.html +358 -0
  124. package/examples/html/script-test.html +968 -0
  125. package/examples/html/segment.html +177 -0
  126. package/examples/html/test_poster.jpg +0 -0
  127. package/examples/umd/index.js +11 -0
  128. package/examples/umd/package.json +42 -0
  129. package/examples/umd/rollup.config.js +36 -0
  130. package/examples/umd/tests/test.html +5 -0
  131. package/examples/v1.1/tc1.html +139 -0
  132. package/examples/v1.1/tc2.1.html +140 -0
  133. package/examples/v1.1/tc2.2.html +139 -0
  134. package/examples/v1.1/tc2.3.html +143 -0
  135. package/examples/v1.1/tc3.1.html +139 -0
  136. package/examples/v1.1/tc3.2.html +142 -0
  137. package/examples/v1.1/tc3.3.html +142 -0
  138. package/examples/v1.1/tc3.4.html +144 -0
  139. package/examples/v1.1/tc3.5.html +142 -0
  140. package/examples/v1.1/tc4.html +142 -0
  141. package/examples/v1.1/tc5.html +150 -0
  142. package/github-release.config.js +5 -0
  143. package/jest/jest.global-setup.js +3 -0
  144. package/jest/jest.polyfills.js +10 -0
  145. package/jest/jest.setup-dom.js +49 -0
  146. package/jest.config.js +196 -0
  147. package/package.json +198 -39
  148. package/packages/npm/README.md +125 -0
  149. package/packages/npm/package.json +50 -0
  150. package/patches/@segment+localstorage-retry+1.3.0.patch +73 -0
  151. package/patches/@segment+top-domain+3.0.1.patch +34 -0
  152. package/public/index.html +136 -0
  153. package/public/list_integration_sdks.html +390 -0
  154. package/rollup-configs/rollup.integrations.config.js +29 -0
  155. package/rollup-configs/rollup.sdk.browser.js +32 -0
  156. package/rollup-configs/rollup.sdk.npm.js +43 -0
  157. package/rollup-configs/rollup.utilities.js +120 -0
  158. package/rollup-configs/rollup.worker.config.js +37 -0
  159. package/sanity-suite/.babelrc +33 -0
  160. package/sanity-suite/.env.example +6 -0
  161. package/sanity-suite/__mocks__/alias1.json +137 -0
  162. package/sanity-suite/__mocks__/alias2.json +97 -0
  163. package/sanity-suite/__mocks__/alias5.json +103 -0
  164. package/sanity-suite/__mocks__/alias6.json +137 -0
  165. package/sanity-suite/__mocks__/group1.json +120 -0
  166. package/sanity-suite/__mocks__/group2.json +86 -0
  167. package/sanity-suite/__mocks__/group4.json +101 -0
  168. package/sanity-suite/__mocks__/group5.json +67 -0
  169. package/sanity-suite/__mocks__/group6.json +66 -0
  170. package/sanity-suite/__mocks__/identify1.json +136 -0
  171. package/sanity-suite/__mocks__/identify2.json +102 -0
  172. package/sanity-suite/__mocks__/identify3.json +99 -0
  173. package/sanity-suite/__mocks__/identify4.json +65 -0
  174. package/sanity-suite/__mocks__/identify5.json +102 -0
  175. package/sanity-suite/__mocks__/identify6.json +103 -0
  176. package/sanity-suite/__mocks__/identify7.json +102 -0
  177. package/sanity-suite/__mocks__/identify8.json +103 -0
  178. package/sanity-suite/__mocks__/page1.json +119 -0
  179. package/sanity-suite/__mocks__/page2.json +86 -0
  180. package/sanity-suite/__mocks__/page4.json +112 -0
  181. package/sanity-suite/__mocks__/page5.json +79 -0
  182. package/sanity-suite/__mocks__/page6.json +77 -0
  183. package/sanity-suite/__mocks__/page7.json +77 -0
  184. package/sanity-suite/__mocks__/page8.json +75 -0
  185. package/sanity-suite/__mocks__/page9.json +155 -0
  186. package/sanity-suite/__mocks__/sourceConfig1.json +988 -0
  187. package/sanity-suite/__mocks__/track1.json +150 -0
  188. package/sanity-suite/__mocks__/track2.json +118 -0
  189. package/sanity-suite/__mocks__/track4.json +134 -0
  190. package/sanity-suite/__mocks__/track5.json +102 -0
  191. package/sanity-suite/__mocks__/track6.json +81 -0
  192. package/sanity-suite/__mocks__/track7.json +81 -0
  193. package/sanity-suite/package-lock.json +7951 -0
  194. package/sanity-suite/package.json +67 -0
  195. package/sanity-suite/public/eventFiltering/index-cdn.html +112 -0
  196. package/sanity-suite/public/eventFiltering/index-local.html +109 -0
  197. package/sanity-suite/public/eventFiltering/index-npm.html +92 -0
  198. package/sanity-suite/public/index-cdn.html +112 -0
  199. package/sanity-suite/public/index-local.html +109 -0
  200. package/sanity-suite/public/index-npm.html +92 -0
  201. package/sanity-suite/public/preloadBuffer/index-cdn.html +112 -0
  202. package/sanity-suite/public/preloadBuffer/index-local.html +109 -0
  203. package/sanity-suite/public/preloadBuffer/index-npm.html +92 -0
  204. package/sanity-suite/rollup.config.js +199 -0
  205. package/sanity-suite/src/index-npm.js +65 -0
  206. package/sanity-suite/src/index.js +5 -0
  207. package/sanity-suite/src/testBook/ResultAssertions.js +51 -0
  208. package/sanity-suite/src/testBook/TestBook.js +345 -0
  209. package/sanity-suite/src/testBook/ignoredProperties.js +150 -0
  210. package/sanity-suite/src/testBook/index.js +11 -0
  211. package/sanity-suite/src/testBookSuites/alias.js +287 -0
  212. package/sanity-suite/src/testBookSuites/group.js +240 -0
  213. package/sanity-suite/src/testBookSuites/identify.js +455 -0
  214. package/sanity-suite/src/testBookSuites/index.js +31 -0
  215. package/sanity-suite/src/testBookSuites/page.js +258 -0
  216. package/sanity-suite/src/testBookSuites/sourceConfig.js +84 -0
  217. package/sanity-suite/src/testBookSuites/track.js +451 -0
  218. package/scripts/integrationBuildScript.js +77 -0
  219. package/scripts/run_tests.sh +6 -0
  220. package/src/core/analytics.js +1668 -0
  221. package/src/features/core/cookieConsent/CookieConsentFactory.js +32 -0
  222. package/src/features/core/cookieConsent/OneTrust/browser.js +102 -0
  223. package/src/features/core/cookieConsent/OneTrust/index.js +3 -0
  224. package/src/features/core/cookieConsent/ketch/browser.js +114 -0
  225. package/src/features/core/cookieConsent/ketch/index.js +1 -0
  226. package/src/features/core/deviceModeTransformation/transformationHandler.js +189 -0
  227. package/src/features/core/deviceModeTransformation/util.js +23 -0
  228. package/src/features/core/metrics/errorReporting/ErrorReportingService.js +116 -0
  229. package/src/features/core/metrics/errorReporting/providers/Bugsnag.js +240 -0
  230. package/src/features/core/session/index.js +207 -0
  231. package/src/integrations/ActiveCampaign/browser.js +52 -0
  232. package/src/integrations/ActiveCampaign/constants.js +14 -0
  233. package/src/integrations/ActiveCampaign/index.js +3 -0
  234. package/src/integrations/ActiveCampaign/nativeSdkLoader.js +24 -0
  235. package/src/integrations/AdobeAnalytics/browser.js +276 -0
  236. package/src/integrations/AdobeAnalytics/constants.js +14 -0
  237. package/src/integrations/AdobeAnalytics/eCommHandle.js +56 -0
  238. package/src/integrations/AdobeAnalytics/heartbeatHandle.js +266 -0
  239. package/src/integrations/AdobeAnalytics/index.js +1 -0
  240. package/src/integrations/AdobeAnalytics/util.js +678 -0
  241. package/src/integrations/Adroll/browser.js +125 -0
  242. package/src/integrations/Adroll/constants.js +10 -0
  243. package/src/integrations/Adroll/index.js +1 -0
  244. package/src/integrations/Adroll/util.js +48 -0
  245. package/src/integrations/Amplitude/browser.js +352 -0
  246. package/src/integrations/Amplitude/constants.js +9 -0
  247. package/src/integrations/Amplitude/index.js +1 -0
  248. package/src/integrations/Amplitude/nativeSdkLoader.js +112 -0
  249. package/src/integrations/Amplitude/test/test_amplitude.html +157 -0
  250. package/src/integrations/Amplitude/utils.js +25 -0
  251. package/src/integrations/Appcues/browser.js +79 -0
  252. package/src/integrations/Appcues/constants.js +9 -0
  253. package/src/integrations/Appcues/index.js +1 -0
  254. package/src/integrations/Axeptio/browser.js +61 -0
  255. package/src/integrations/Axeptio/constants.js +8 -0
  256. package/src/integrations/Axeptio/index.js +1 -0
  257. package/src/integrations/Axeptio/nativeSdkLoader.js +14 -0
  258. package/src/integrations/Axeptio/utils.js +16 -0
  259. package/src/integrations/BingAds/browser.js +79 -0
  260. package/src/integrations/BingAds/constants.js +12 -0
  261. package/src/integrations/BingAds/index.js +1 -0
  262. package/src/integrations/BingAds/nativeSdkLoader.js +30 -0
  263. package/src/integrations/BingAds/utils.js +101 -0
  264. package/src/integrations/Braze/browser.js +284 -0
  265. package/src/integrations/Braze/constants.js +11 -0
  266. package/src/integrations/Braze/index.js +1 -0
  267. package/src/integrations/Braze/nativeSdkLoader.js +35 -0
  268. package/src/integrations/Braze/utils.js +51 -0
  269. package/src/integrations/Bugsnag/browser.js +60 -0
  270. package/src/integrations/Bugsnag/constants.js +8 -0
  271. package/src/integrations/Bugsnag/index.js +1 -0
  272. package/src/integrations/Chartbeat/browser.js +148 -0
  273. package/src/integrations/Chartbeat/constants.js +10 -0
  274. package/src/integrations/Chartbeat/index.js +1 -0
  275. package/src/integrations/Chartbeat/nativeSdkLoader.js +7 -0
  276. package/src/integrations/Clevertap/browser.js +206 -0
  277. package/src/integrations/Clevertap/constants.js +8 -0
  278. package/src/integrations/Clevertap/index.js +1 -0
  279. package/src/integrations/Comscore/browser.js +130 -0
  280. package/src/integrations/Comscore/constants.js +11 -0
  281. package/src/integrations/Comscore/index.js +1 -0
  282. package/src/integrations/Comscore/nativeSdkLoader.js +10 -0
  283. package/src/integrations/ConvertFlow/browser.js +59 -0
  284. package/src/integrations/ConvertFlow/constants.js +15 -0
  285. package/src/integrations/ConvertFlow/index.js +1 -0
  286. package/src/integrations/ConvertFlow/utils.js +107 -0
  287. package/src/integrations/Criteo/browser.js +155 -0
  288. package/src/integrations/Criteo/constants.js +11 -0
  289. package/src/integrations/Criteo/index.js +1 -0
  290. package/src/integrations/Criteo/utils.js +343 -0
  291. package/src/integrations/CustomerIO/browser.js +74 -0
  292. package/src/integrations/CustomerIO/constants.js +10 -0
  293. package/src/integrations/CustomerIO/index.js +1 -0
  294. package/src/integrations/CustomerIO/nativeSdkLoader.js +31 -0
  295. package/src/integrations/DCMFloodlight/browser.js +240 -0
  296. package/src/integrations/DCMFloodlight/constants.js +15 -0
  297. package/src/integrations/DCMFloodlight/index.js +1 -0
  298. package/src/integrations/DCMFloodlight/utils.js +336 -0
  299. package/src/integrations/Drip/browser.js +169 -0
  300. package/src/integrations/Drip/constants.js +8 -0
  301. package/src/integrations/Drip/index.js +1 -0
  302. package/src/integrations/Drip/nativeSdkLoader.js +10 -0
  303. package/src/integrations/Drip/utils.js +29 -0
  304. package/src/integrations/Engage/browser.js +124 -0
  305. package/src/integrations/Engage/constants.js +16 -0
  306. package/src/integrations/Engage/index.js +1 -0
  307. package/src/integrations/Engage/nativeSdkLoader.js +25 -0
  308. package/src/integrations/Engage/utils.js +69 -0
  309. package/src/integrations/FacebookPixel/browser.js +313 -0
  310. package/src/integrations/FacebookPixel/constants.js +77 -0
  311. package/src/integrations/FacebookPixel/index.js +1 -0
  312. package/src/integrations/FacebookPixel/utils.js +310 -0
  313. package/src/integrations/Fullstory/browser.js +169 -0
  314. package/src/integrations/Fullstory/constants.js +13 -0
  315. package/src/integrations/Fullstory/index.js +1 -0
  316. package/src/integrations/Fullstory/nativeSdkLoader.js +69 -0
  317. package/src/integrations/GA/browser.js +816 -0
  318. package/src/integrations/GA/constants.js +10 -0
  319. package/src/integrations/GA/index.js +1 -0
  320. package/src/integrations/GA/index.test.js +184 -0
  321. package/src/integrations/GA360/browser.js +58 -0
  322. package/src/integrations/GA360/constants.js +14 -0
  323. package/src/integrations/GA360/index.js +1 -0
  324. package/src/integrations/GA4/browser.js +264 -0
  325. package/src/integrations/GA4/config.js +296 -0
  326. package/src/integrations/GA4/constants.js +15 -0
  327. package/src/integrations/GA4/index.js +1 -0
  328. package/src/integrations/GA4/utils.js +329 -0
  329. package/src/integrations/GoogleAds/browser.js +212 -0
  330. package/src/integrations/GoogleAds/constants.js +11 -0
  331. package/src/integrations/GoogleAds/index.js +1 -0
  332. package/src/integrations/GoogleAds/nativeSdkLoader.js +26 -0
  333. package/src/integrations/GoogleAds/utils.js +117 -0
  334. package/src/integrations/GoogleOptimize/browser.js +79 -0
  335. package/src/integrations/GoogleOptimize/constants.js +13 -0
  336. package/src/integrations/GoogleOptimize/index.js +1 -0
  337. package/src/integrations/GoogleTagManager/browser.js +95 -0
  338. package/src/integrations/GoogleTagManager/constants.js +10 -0
  339. package/src/integrations/GoogleTagManager/index.js +1 -0
  340. package/src/integrations/GoogleTagManager/nativeSdkLoader.js +21 -0
  341. package/src/integrations/Heap/browser.js +67 -0
  342. package/src/integrations/Heap/constants.js +9 -0
  343. package/src/integrations/Heap/index.js +1 -0
  344. package/src/integrations/Heap/nativeSdkLoader.js +40 -0
  345. package/src/integrations/Heap/util.js +23 -0
  346. package/src/integrations/Hotjar/browser.js +86 -0
  347. package/src/integrations/Hotjar/constants.js +10 -0
  348. package/src/integrations/Hotjar/index.js +1 -0
  349. package/src/integrations/Hotjar/nativeSdkLoader.js +21 -0
  350. package/src/integrations/HubSpot/browser.js +96 -0
  351. package/src/integrations/HubSpot/constants.js +11 -0
  352. package/src/integrations/HubSpot/index.js +1 -0
  353. package/src/integrations/INTERCOM/browser.js +107 -0
  354. package/src/integrations/INTERCOM/constants.js +8 -0
  355. package/src/integrations/INTERCOM/index.js +1 -0
  356. package/src/integrations/INTERCOM/nativeSdkLoader.js +46 -0
  357. package/src/integrations/INTERCOM/utils.js +68 -0
  358. package/src/integrations/Iterable/browser.js +185 -0
  359. package/src/integrations/Iterable/constants.js +8 -0
  360. package/src/integrations/Iterable/index.js +1 -0
  361. package/src/integrations/Iterable/utils.js +111 -0
  362. package/src/integrations/June/browser.js +98 -0
  363. package/src/integrations/June/constants.js +8 -0
  364. package/src/integrations/June/index.js +1 -0
  365. package/src/integrations/Keen/browser.js +153 -0
  366. package/src/integrations/Keen/constants.js +10 -0
  367. package/src/integrations/Keen/index.js +1 -0
  368. package/src/integrations/Kissmetrics/browser.js +254 -0
  369. package/src/integrations/Kissmetrics/constants.js +8 -0
  370. package/src/integrations/Kissmetrics/index.js +1 -0
  371. package/src/integrations/Kissmetrics/nativeSdkLoader.js +23 -0
  372. package/src/integrations/Klaviyo/browser.js +195 -0
  373. package/src/integrations/Klaviyo/constants.js +8 -0
  374. package/src/integrations/Klaviyo/index.js +1 -0
  375. package/src/integrations/Klaviyo/util.js +91 -0
  376. package/src/integrations/LaunchDarkly/browser.js +74 -0
  377. package/src/integrations/LaunchDarkly/constants.js +11 -0
  378. package/src/integrations/LaunchDarkly/index.js +1 -0
  379. package/src/integrations/LaunchDarkly/utils.js +24 -0
  380. package/src/integrations/Lemnisk/browser.js +85 -0
  381. package/src/integrations/Lemnisk/constants.js +13 -0
  382. package/src/integrations/Lemnisk/index.js +1 -0
  383. package/src/integrations/Lemnisk/nativeSdkLoader.js +34 -0
  384. package/src/integrations/LinkedInInsightTag/browser.js +71 -0
  385. package/src/integrations/LinkedInInsightTag/constants.js +16 -0
  386. package/src/integrations/LinkedInInsightTag/index.js +1 -0
  387. package/src/integrations/LiveChat/browser.js +82 -0
  388. package/src/integrations/LiveChat/constants.js +12 -0
  389. package/src/integrations/LiveChat/index.js +1 -0
  390. package/src/integrations/LiveChat/nativeSdkLoader.js +40 -0
  391. package/src/integrations/LiveChat/util.js +71 -0
  392. package/src/integrations/Lotame/LotameStorage.js +21 -0
  393. package/src/integrations/Lotame/browser.js +172 -0
  394. package/src/integrations/Lotame/constants.js +8 -0
  395. package/src/integrations/Lotame/index.js +1 -0
  396. package/src/integrations/Lytics/browser.js +87 -0
  397. package/src/integrations/Lytics/constants.js +8 -0
  398. package/src/integrations/Lytics/index.js +1 -0
  399. package/src/integrations/Lytics/nativeSdkLoader.js +77 -0
  400. package/src/integrations/Lytics/test/script-test-lytics.html +250 -0
  401. package/src/integrations/Matomo/browser.js +188 -0
  402. package/src/integrations/Matomo/constants.js +8 -0
  403. package/src/integrations/Matomo/index.js +1 -0
  404. package/src/integrations/Matomo/nativeSdkLoader.js +20 -0
  405. package/src/integrations/Matomo/util.js +417 -0
  406. package/src/integrations/MicrosoftClarity/browser.js +70 -0
  407. package/src/integrations/MicrosoftClarity/constants.js +14 -0
  408. package/src/integrations/MicrosoftClarity/index.js +1 -0
  409. package/src/integrations/MicrosoftClarity/nativeSdkLoader.js +22 -0
  410. package/src/integrations/Mixpanel/browser.js +326 -0
  411. package/src/integrations/Mixpanel/constants.js +11 -0
  412. package/src/integrations/Mixpanel/index.js +1 -0
  413. package/src/integrations/Mixpanel/nativeSdkLoader.js +71 -0
  414. package/src/integrations/Mixpanel/util.js +178 -0
  415. package/src/integrations/MoEngage/browser.js +133 -0
  416. package/src/integrations/MoEngage/constants.js +12 -0
  417. package/src/integrations/MoEngage/index.js +1 -0
  418. package/src/integrations/MoEngage/nativeSdkLoader.js +66 -0
  419. package/src/integrations/MoEngage/test/script-test-moengage.html +216 -0
  420. package/src/integrations/Mouseflow/browser.js +98 -0
  421. package/src/integrations/Mouseflow/constants.js +14 -0
  422. package/src/integrations/Mouseflow/index.js +1 -0
  423. package/src/integrations/Mouseflow/utils.js +27 -0
  424. package/src/integrations/Olark/browser.js +94 -0
  425. package/src/integrations/Olark/constants.js +8 -0
  426. package/src/integrations/Olark/index.js +1 -0
  427. package/src/integrations/Olark/nativeSdkLoader.js +31 -0
  428. package/src/integrations/Olark/utils.js +51 -0
  429. package/src/integrations/Optimizely/browser.js +230 -0
  430. package/src/integrations/Optimizely/constants.js +8 -0
  431. package/src/integrations/Optimizely/index.js +1 -0
  432. package/src/integrations/Optimizely/utils.js +23 -0
  433. package/src/integrations/Pendo/browser.js +119 -0
  434. package/src/integrations/Pendo/constants.js +8 -0
  435. package/src/integrations/Pendo/index.js +1 -0
  436. package/src/integrations/Pendo/nativeSdkLoader.js +32 -0
  437. package/src/integrations/PinterestTag/browser.js +241 -0
  438. package/src/integrations/PinterestTag/constants.js +19 -0
  439. package/src/integrations/PinterestTag/index.js +1 -0
  440. package/src/integrations/PinterestTag/nativeSdkLoader.js +19 -0
  441. package/src/integrations/PinterestTag/propertyMappingConfig.js +57 -0
  442. package/src/integrations/PinterestTag/test/input.js +180 -0
  443. package/src/integrations/PinterestTag/test/output.js +129 -0
  444. package/src/integrations/PinterestTag/utils.js +47 -0
  445. package/src/integrations/Podsights/browser.js +178 -0
  446. package/src/integrations/Podsights/constants.js +206 -0
  447. package/src/integrations/Podsights/index.js +1 -0
  448. package/src/integrations/Podsights/utils.js +65 -0
  449. package/src/integrations/PostAffiliatePro/browser.js +133 -0
  450. package/src/integrations/PostAffiliatePro/constants.js +13 -0
  451. package/src/integrations/PostAffiliatePro/index.js +1 -0
  452. package/src/integrations/PostAffiliatePro/utils.js +40 -0
  453. package/src/integrations/Posthog/browser.js +154 -0
  454. package/src/integrations/Posthog/constants.js +12 -0
  455. package/src/integrations/Posthog/index.js +1 -0
  456. package/src/integrations/Posthog/nativeSdkLoader.js +48 -0
  457. package/src/integrations/Posthog/test/test_posthog.html +77 -0
  458. package/src/integrations/Posthog/utils.js +36 -0
  459. package/src/integrations/ProfitWell/browser.js +72 -0
  460. package/src/integrations/ProfitWell/constants.js +12 -0
  461. package/src/integrations/ProfitWell/index.js +1 -0
  462. package/src/integrations/ProfitWell/nativeSdkLoader.js +25 -0
  463. package/src/integrations/Qualaroo/browser.js +116 -0
  464. package/src/integrations/Qualaroo/constants.js +8 -0
  465. package/src/integrations/Qualaroo/index.js +1 -0
  466. package/src/integrations/Qualaroo/utils.js +83 -0
  467. package/src/integrations/Qualtrics/browser.js +89 -0
  468. package/src/integrations/Qualtrics/constants.js +8 -0
  469. package/src/integrations/Qualtrics/index.js +1 -0
  470. package/src/integrations/Qualtrics/nativeSdkLoader.js +79 -0
  471. package/src/integrations/QuantumMetric/browser.js +63 -0
  472. package/src/integrations/QuantumMetric/constants.js +13 -0
  473. package/src/integrations/QuantumMetric/index.js +1 -0
  474. package/src/integrations/QuoraPixel/browser.js +64 -0
  475. package/src/integrations/QuoraPixel/constants.js +15 -0
  476. package/src/integrations/QuoraPixel/index.js +1 -0
  477. package/src/integrations/QuoraPixel/nativeSdkLoader.js +21 -0
  478. package/src/integrations/RedditPixel/browser.js +98 -0
  479. package/src/integrations/RedditPixel/constants.js +13 -0
  480. package/src/integrations/RedditPixel/index.js +1 -0
  481. package/src/integrations/RedditPixel/nativeSdkLoader.js +21 -0
  482. package/src/integrations/Refiner/browser.js +119 -0
  483. package/src/integrations/Refiner/constants.js +8 -0
  484. package/src/integrations/Refiner/index.js +1 -0
  485. package/src/integrations/Refiner/nativeSdkLoader.js +20 -0
  486. package/src/integrations/Refiner/utils.js +44 -0
  487. package/src/integrations/Rockerbox/browser.js +89 -0
  488. package/src/integrations/Rockerbox/constants.js +12 -0
  489. package/src/integrations/Rockerbox/index.js +1 -0
  490. package/src/integrations/Rockerbox/nativeSdkLoader.js +32 -0
  491. package/src/integrations/RollBar/browser.js +92 -0
  492. package/src/integrations/RollBar/constants.js +13 -0
  493. package/src/integrations/RollBar/index.js +1 -0
  494. package/src/integrations/RollBar/nativeSdkLoader.js +383 -0
  495. package/src/integrations/Satismeter/browser.js +94 -0
  496. package/src/integrations/Satismeter/constants.js +9 -0
  497. package/src/integrations/Satismeter/index.js +1 -0
  498. package/src/integrations/Satismeter/nativeSdkLoader.js +23 -0
  499. package/src/integrations/Satismeter/util.js +54 -0
  500. package/src/integrations/Sendinblue/browser.js +111 -0
  501. package/src/integrations/Sendinblue/constants.js +25 -0
  502. package/src/integrations/Sendinblue/index.js +1 -0
  503. package/src/integrations/Sendinblue/nativeSdkLoader.js +36 -0
  504. package/src/integrations/Sendinblue/utils.js +112 -0
  505. package/src/integrations/Sentry/browser.js +118 -0
  506. package/src/integrations/Sentry/constants.js +8 -0
  507. package/src/integrations/Sentry/index.js +1 -0
  508. package/src/integrations/Sentry/utils.js +80 -0
  509. package/src/integrations/Shynet/browser.js +97 -0
  510. package/src/integrations/Shynet/constants.js +15 -0
  511. package/src/integrations/Shynet/index.js +1 -0
  512. package/src/integrations/SnapEngage/browser.js +75 -0
  513. package/src/integrations/SnapEngage/constants.js +12 -0
  514. package/src/integrations/SnapEngage/index.js +1 -0
  515. package/src/integrations/SnapEngage/nativeSdkLoader.js +24 -0
  516. package/src/integrations/SnapEngage/util.js +63 -0
  517. package/src/integrations/SnapPixel/browser.js +232 -0
  518. package/src/integrations/SnapPixel/constants.js +13 -0
  519. package/src/integrations/SnapPixel/index.js +1 -0
  520. package/src/integrations/SnapPixel/nativeSdkLoader.js +20 -0
  521. package/src/integrations/SnapPixel/util.js +211 -0
  522. package/src/integrations/TVSquared/browser.js +96 -0
  523. package/src/integrations/TVSquared/constants.js +14 -0
  524. package/src/integrations/TVSquared/index.js +1 -0
  525. package/src/integrations/TVSquared/utils.js +40 -0
  526. package/src/integrations/TiktokAds/browser.js +103 -0
  527. package/src/integrations/TiktokAds/constants.js +86 -0
  528. package/src/integrations/TiktokAds/index.js +1 -0
  529. package/src/integrations/TiktokAds/nativeSdkLoader.js +52 -0
  530. package/src/integrations/TiktokAds/util.js +71 -0
  531. package/src/integrations/VWO/browser.js +131 -0
  532. package/src/integrations/VWO/constants.js +13 -0
  533. package/src/integrations/VWO/index.js +1 -0
  534. package/src/integrations/VWO/nativeSdkLoader.js +64 -0
  535. package/src/integrations/Vero/browser.js +165 -0
  536. package/src/integrations/Vero/constants.js +8 -0
  537. package/src/integrations/Vero/index.js +1 -0
  538. package/src/integrations/Woopra/browser.js +83 -0
  539. package/src/integrations/Woopra/constants.js +8 -0
  540. package/src/integrations/Woopra/index.js +1 -0
  541. package/src/integrations/Woopra/nativeSdkLoader.js +43 -0
  542. package/src/integrations/YandexMetrica/browser.js +143 -0
  543. package/src/integrations/YandexMetrica/constants.js +10 -0
  544. package/src/integrations/YandexMetrica/index.js +1 -0
  545. package/src/integrations/YandexMetrica/nativeSdkLoader.js +35 -0
  546. package/src/integrations/YandexMetrica/utils.js +138 -0
  547. package/src/integrations/index.js +155 -0
  548. package/src/service-worker/index.js +466 -0
  549. package/src/utils/EventRepository.js +78 -0
  550. package/src/utils/HtElement.js +33 -0
  551. package/src/utils/HtElementBuilder.js +29 -0
  552. package/src/utils/IntegrationsData.js +61 -0
  553. package/src/utils/JSFileLoader.js +66 -0
  554. package/src/utils/ObjectUtils.js +68 -0
  555. package/src/utils/PreProcessQueue.js +66 -0
  556. package/src/utils/RudderApp.js +9 -0
  557. package/src/utils/RudderContext.js +21 -0
  558. package/src/utils/RudderInfo.js +41 -0
  559. package/src/utils/RudderMessage.js +28 -0
  560. package/src/utils/ScriptLoader.js +53 -0
  561. package/src/utils/beaconQueue.js +133 -0
  562. package/src/utils/camelcase.js +48 -0
  563. package/src/utils/cdnPaths.js +43 -0
  564. package/src/utils/clientHint.js +28 -0
  565. package/src/utils/client_server_name.js +78 -0
  566. package/src/utils/commonUtils.js +207 -0
  567. package/src/utils/config_to_integration_names.js +80 -0
  568. package/src/utils/constants.js +82 -0
  569. package/src/utils/errorHandler.js +88 -0
  570. package/src/utils/eventProcessorUtils.js +53 -0
  571. package/src/utils/integration_cname.js +156 -0
  572. package/src/utils/linker/base64decoder.js +31 -0
  573. package/src/utils/linker/crc32.js +42 -0
  574. package/src/utils/linker/index.js +134 -0
  575. package/src/utils/linker/userLib.js +20 -0
  576. package/src/utils/logUtil.js +51 -0
  577. package/src/utils/logger.js +106 -0
  578. package/src/utils/navigator.js +32 -0
  579. package/src/utils/notifyError.js +16 -0
  580. package/src/utils/pageProperties.js +74 -0
  581. package/src/utils/screenDetails.js +23 -0
  582. package/src/utils/storage/cookie.js +93 -0
  583. package/src/utils/storage/index.js +3 -0
  584. package/src/utils/storage/storage.js +459 -0
  585. package/src/utils/storage/store.js +72 -0
  586. package/src/utils/storage/v3DecryptionUtils.js +19 -0
  587. package/src/utils/utils.js +966 -0
  588. package/src/utils/xhrModule.js +111 -0
  589. package/stats/AdobeAnalytics.html +4044 -0
  590. package/stats/Adroll.html +4044 -0
  591. package/stats/Amplitude.html +4044 -0
  592. package/stats/Appcues.html +4044 -0
  593. package/stats/BingAds.html +4044 -0
  594. package/stats/Braze.html +4044 -0
  595. package/stats/Bugsnag.html +4044 -0
  596. package/stats/Chartbeat.html +4044 -0
  597. package/stats/Clevertap.html +4044 -0
  598. package/stats/Comscore.html +4044 -0
  599. package/stats/ConvertFlow.html +4044 -0
  600. package/stats/Criteo.html +4044 -0
  601. package/stats/CustomerIO.html +4044 -0
  602. package/stats/DCMFloodlight.html +4044 -0
  603. package/stats/Drip.html +4044 -0
  604. package/stats/Engage.html +4044 -0
  605. package/stats/FacebookPixel.html +4044 -0
  606. package/stats/Fullstory.html +4044 -0
  607. package/stats/GA.html +4044 -0
  608. package/stats/GA360.html +4044 -0
  609. package/stats/GA4.html +4044 -0
  610. package/stats/GoogleAds.html +4044 -0
  611. package/stats/GoogleOptimize.html +4044 -0
  612. package/stats/GoogleTagManager.html +4044 -0
  613. package/stats/Heap.html +4044 -0
  614. package/stats/Hotjar.html +4044 -0
  615. package/stats/HubSpot.html +4044 -0
  616. package/stats/INTERCOM.html +4044 -0
  617. package/stats/Iterable.html +4044 -0
  618. package/stats/June.html +4044 -0
  619. package/stats/Keen.html +4044 -0
  620. package/stats/Kissmetrics.html +4044 -0
  621. package/stats/Klaviyo.html +4044 -0
  622. package/stats/LaunchDarkly.html +4044 -0
  623. package/stats/LinkedInInsightTag.html +4044 -0
  624. package/stats/LiveChat.html +4044 -0
  625. package/stats/Lotame.html +4044 -0
  626. package/stats/Lytics.html +4044 -0
  627. package/stats/Matomo.html +4044 -0
  628. package/stats/Mixpanel.html +4044 -0
  629. package/stats/MoEngage.html +4044 -0
  630. package/stats/Mouseflow.html +4044 -0
  631. package/stats/Optimizely.html +4044 -0
  632. package/stats/Pendo.html +4044 -0
  633. package/stats/PinterestTag.html +4044 -0
  634. package/stats/Podsights.html +4044 -0
  635. package/stats/PostAffiliatePro.html +4044 -0
  636. package/stats/Posthog.html +4044 -0
  637. package/stats/ProfitWell.html +4044 -0
  638. package/stats/Qualaroo.html +4044 -0
  639. package/stats/Qualtrics.html +4044 -0
  640. package/stats/QuantumMetric.html +4044 -0
  641. package/stats/QuoraPixel.html +4044 -0
  642. package/stats/RedditPixel.html +4044 -0
  643. package/stats/Refiner.html +4044 -0
  644. package/stats/Rockerbox.html +4044 -0
  645. package/stats/RollBar.html +4044 -0
  646. package/stats/Sentry.html +4044 -0
  647. package/stats/Shynet.html +4044 -0
  648. package/stats/SnapEngage.html +4044 -0
  649. package/stats/SnapPixel.html +4044 -0
  650. package/stats/TVSquared.html +4044 -0
  651. package/stats/VWO.html +4044 -0
  652. package/stats/Vero.html +4044 -0
  653. package/stats/Woopra.html +4044 -0
  654. package/stats/YandexMetrica.html +4044 -0
  655. package/stats/rudder-analytics.html +4044 -0
  656. package/index.es.js +0 -1
  657. package/index.js +0 -1
  658. package/service-worker/index.js +0 -5346
  659. /package/{index.d.ts → packages/npm/index.d.ts} +0 -0
  660. /package/{service-worker → src/service-worker}/index.d.ts +0 -0
@@ -426,74 +426,74 @@ function _toPropertyKey(arg) {
426
426
 
427
427
  var global$1 = (typeof global !== "undefined" ? global :
428
428
  typeof self !== "undefined" ? self :
429
- typeof window !== "undefined" ? window : {});
429
+ typeof window !== "undefined" ? window : {});
430
430
 
431
431
  // shim for using process in browser
432
432
  // based off https://github.com/defunctzombie/node-process/blob/master/browser.js
433
433
 
434
434
  function defaultSetTimout() {
435
- throw new Error('setTimeout has not been defined');
435
+ throw new Error('setTimeout has not been defined');
436
436
  }
437
437
  function defaultClearTimeout () {
438
- throw new Error('clearTimeout has not been defined');
438
+ throw new Error('clearTimeout has not been defined');
439
439
  }
440
440
  var cachedSetTimeout = defaultSetTimout;
441
441
  var cachedClearTimeout = defaultClearTimeout;
442
442
  if (typeof global$1.setTimeout === 'function') {
443
- cachedSetTimeout = setTimeout;
443
+ cachedSetTimeout = setTimeout;
444
444
  }
445
445
  if (typeof global$1.clearTimeout === 'function') {
446
- cachedClearTimeout = clearTimeout;
446
+ cachedClearTimeout = clearTimeout;
447
447
  }
448
448
 
449
449
  function runTimeout(fun) {
450
- if (cachedSetTimeout === setTimeout) {
451
- //normal enviroments in sane situations
452
- return setTimeout(fun, 0);
453
- }
454
- // if setTimeout wasn't available but was latter defined
455
- if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
456
- cachedSetTimeout = setTimeout;
457
- return setTimeout(fun, 0);
458
- }
450
+ if (cachedSetTimeout === setTimeout) {
451
+ //normal enviroments in sane situations
452
+ return setTimeout(fun, 0);
453
+ }
454
+ // if setTimeout wasn't available but was latter defined
455
+ if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
456
+ cachedSetTimeout = setTimeout;
457
+ return setTimeout(fun, 0);
458
+ }
459
+ try {
460
+ // when when somebody has screwed with setTimeout but no I.E. maddness
461
+ return cachedSetTimeout(fun, 0);
462
+ } catch(e){
459
463
  try {
460
- // when when somebody has screwed with setTimeout but no I.E. maddness
461
- return cachedSetTimeout(fun, 0);
464
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
465
+ return cachedSetTimeout.call(null, fun, 0);
462
466
  } catch(e){
463
- try {
464
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
465
- return cachedSetTimeout.call(null, fun, 0);
466
- } catch(e){
467
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
468
- return cachedSetTimeout.call(this, fun, 0);
469
- }
467
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
468
+ return cachedSetTimeout.call(this, fun, 0);
470
469
  }
470
+ }
471
471
 
472
472
 
473
473
  }
474
474
  function runClearTimeout(marker) {
475
- if (cachedClearTimeout === clearTimeout) {
476
- //normal enviroments in sane situations
477
- return clearTimeout(marker);
478
- }
479
- // if clearTimeout wasn't available but was latter defined
480
- if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
481
- cachedClearTimeout = clearTimeout;
482
- return clearTimeout(marker);
483
- }
475
+ if (cachedClearTimeout === clearTimeout) {
476
+ //normal enviroments in sane situations
477
+ return clearTimeout(marker);
478
+ }
479
+ // if clearTimeout wasn't available but was latter defined
480
+ if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
481
+ cachedClearTimeout = clearTimeout;
482
+ return clearTimeout(marker);
483
+ }
484
+ try {
485
+ // when when somebody has screwed with setTimeout but no I.E. maddness
486
+ return cachedClearTimeout(marker);
487
+ } catch (e){
484
488
  try {
485
- // when when somebody has screwed with setTimeout but no I.E. maddness
486
- return cachedClearTimeout(marker);
489
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
490
+ return cachedClearTimeout.call(null, marker);
487
491
  } catch (e){
488
- try {
489
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
490
- return cachedClearTimeout.call(null, marker);
491
- } catch (e){
492
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
493
- // Some versions of I.E. have different rules for clearTimeout vs setTimeout
494
- return cachedClearTimeout.call(this, marker);
495
- }
492
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
493
+ // Some versions of I.E. have different rules for clearTimeout vs setTimeout
494
+ return cachedClearTimeout.call(this, marker);
496
495
  }
496
+ }
497
497
 
498
498
 
499
499
 
@@ -504,62 +504,62 @@ var currentQueue;
504
504
  var queueIndex = -1;
505
505
 
506
506
  function cleanUpNextTick() {
507
- if (!draining || !currentQueue) {
508
- return;
509
- }
510
- draining = false;
511
- if (currentQueue.length) {
512
- queue = currentQueue.concat(queue);
513
- } else {
514
- queueIndex = -1;
515
- }
516
- if (queue.length) {
517
- drainQueue();
518
- }
507
+ if (!draining || !currentQueue) {
508
+ return;
509
+ }
510
+ draining = false;
511
+ if (currentQueue.length) {
512
+ queue = currentQueue.concat(queue);
513
+ } else {
514
+ queueIndex = -1;
515
+ }
516
+ if (queue.length) {
517
+ drainQueue();
518
+ }
519
519
  }
520
520
 
521
521
  function drainQueue() {
522
- if (draining) {
523
- return;
524
- }
525
- var timeout = runTimeout(cleanUpNextTick);
526
- draining = true;
527
-
528
- var len = queue.length;
529
- while(len) {
530
- currentQueue = queue;
531
- queue = [];
532
- while (++queueIndex < len) {
533
- if (currentQueue) {
534
- currentQueue[queueIndex].run();
535
- }
536
- }
537
- queueIndex = -1;
538
- len = queue.length;
522
+ if (draining) {
523
+ return;
524
+ }
525
+ var timeout = runTimeout(cleanUpNextTick);
526
+ draining = true;
527
+
528
+ var len = queue.length;
529
+ while(len) {
530
+ currentQueue = queue;
531
+ queue = [];
532
+ while (++queueIndex < len) {
533
+ if (currentQueue) {
534
+ currentQueue[queueIndex].run();
535
+ }
539
536
  }
540
- currentQueue = null;
541
- draining = false;
542
- runClearTimeout(timeout);
537
+ queueIndex = -1;
538
+ len = queue.length;
539
+ }
540
+ currentQueue = null;
541
+ draining = false;
542
+ runClearTimeout(timeout);
543
543
  }
544
544
  function nextTick(fun) {
545
- var args = new Array(arguments.length - 1);
546
- if (arguments.length > 1) {
547
- for (var i = 1; i < arguments.length; i++) {
548
- args[i - 1] = arguments[i];
549
- }
550
- }
551
- queue.push(new Item(fun, args));
552
- if (queue.length === 1 && !draining) {
553
- runTimeout(drainQueue);
545
+ var args = new Array(arguments.length - 1);
546
+ if (arguments.length > 1) {
547
+ for (var i = 1; i < arguments.length; i++) {
548
+ args[i - 1] = arguments[i];
554
549
  }
550
+ }
551
+ queue.push(new Item(fun, args));
552
+ if (queue.length === 1 && !draining) {
553
+ runTimeout(drainQueue);
554
+ }
555
555
  }
556
556
  // v8 likes predictible objects
557
557
  function Item(fun, array) {
558
- this.fun = fun;
559
- this.array = array;
558
+ this.fun = fun;
559
+ this.array = array;
560
560
  }
561
561
  Item.prototype.run = function () {
562
- this.fun.apply(null, this.array);
562
+ this.fun.apply(null, this.array);
563
563
  };
564
564
  var title = 'browser';
565
565
  var platform = 'browser';
@@ -582,12 +582,12 @@ var removeAllListeners = noop$1;
582
582
  var emit = noop$1;
583
583
 
584
584
  function binding(name) {
585
- throw new Error('process.binding is not supported');
585
+ throw new Error('process.binding is not supported');
586
586
  }
587
587
 
588
588
  function cwd () { return '/' }
589
589
  function chdir (dir) {
590
- throw new Error('process.chdir is not supported');
590
+ throw new Error('process.chdir is not supported');
591
591
  }function umask() { return 0; }
592
592
 
593
593
  // from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js
@@ -985,7 +985,7 @@ if (Buffer.TYPED_ARRAY_SUPPORT) {
985
985
  Buffer.prototype.__proto__ = Uint8Array.prototype;
986
986
  Buffer.__proto__ = Uint8Array;
987
987
  if (typeof Symbol !== 'undefined' && Symbol.species &&
988
- Buffer[Symbol.species] === Buffer) ;
988
+ Buffer[Symbol.species] === Buffer) ;
989
989
  }
990
990
 
991
991
  function assertSize (size) {
@@ -1122,7 +1122,7 @@ function fromObject (that, obj) {
1122
1122
 
1123
1123
  if (obj) {
1124
1124
  if ((typeof ArrayBuffer !== 'undefined' &&
1125
- obj.buffer instanceof ArrayBuffer) || 'length' in obj) {
1125
+ obj.buffer instanceof ArrayBuffer) || 'length' in obj) {
1126
1126
  if (typeof obj.length !== 'number' || isnan(obj.length)) {
1127
1127
  return createBuffer(that, 0)
1128
1128
  }
@@ -1142,7 +1142,7 @@ function checked (length) {
1142
1142
  // length is NaN (which is otherwise coerced to zero.)
1143
1143
  if (length >= kMaxLength()) {
1144
1144
  throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
1145
- 'size: 0x' + kMaxLength().toString(16) + ' bytes')
1145
+ 'size: 0x' + kMaxLength().toString(16) + ' bytes')
1146
1146
  }
1147
1147
  return length | 0
1148
1148
  }
@@ -1228,7 +1228,7 @@ function byteLength (string, encoding) {
1228
1228
  return string.length
1229
1229
  }
1230
1230
  if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&
1231
- (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
1231
+ (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
1232
1232
  return string.byteLength
1233
1233
  }
1234
1234
  if (typeof string !== 'string') {
@@ -1520,7 +1520,7 @@ function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
1520
1520
  } else if (typeof val === 'number') {
1521
1521
  val = val & 0xFF; // Search for a byte value [0-255]
1522
1522
  if (Buffer.TYPED_ARRAY_SUPPORT &&
1523
- typeof Uint8Array.prototype.indexOf === 'function') {
1523
+ typeof Uint8Array.prototype.indexOf === 'function') {
1524
1524
  if (dir) {
1525
1525
  return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
1526
1526
  } else {
@@ -1541,7 +1541,7 @@ function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
1541
1541
  if (encoding !== undefined) {
1542
1542
  encoding = String(encoding).toLowerCase();
1543
1543
  if (encoding === 'ucs2' || encoding === 'ucs-2' ||
1544
- encoding === 'utf16le' || encoding === 'utf-16le') {
1544
+ encoding === 'utf16le' || encoding === 'utf-16le') {
1545
1545
  if (arr.length < 2 || val.length < 2) {
1546
1546
  return -1
1547
1547
  }
@@ -1654,12 +1654,12 @@ Buffer.prototype.write = function write (string, offset, length, encoding) {
1654
1654
  encoding = 'utf8';
1655
1655
  length = this.length;
1656
1656
  offset = 0;
1657
- // Buffer#write(string, encoding)
1657
+ // Buffer#write(string, encoding)
1658
1658
  } else if (length === undefined && typeof offset === 'string') {
1659
1659
  encoding = offset;
1660
1660
  length = this.length;
1661
1661
  offset = 0;
1662
- // Buffer#write(string, offset[, length][, encoding])
1662
+ // Buffer#write(string, offset[, length][, encoding])
1663
1663
  } else if (isFinite(offset)) {
1664
1664
  offset = offset | 0;
1665
1665
  if (isFinite(length)) {
@@ -1669,7 +1669,7 @@ Buffer.prototype.write = function write (string, offset, length, encoding) {
1669
1669
  encoding = length;
1670
1670
  length = undefined;
1671
1671
  }
1672
- // legacy write(string, encoding, offset, length) - remove in v0.13
1672
+ // legacy write(string, encoding, offset, length) - remove in v0.13
1673
1673
  } else {
1674
1674
  throw new Error(
1675
1675
  'Buffer.write(string, encoding, offset[, length]) is no longer supported'
@@ -1745,8 +1745,8 @@ function utf8Slice (buf, start, end) {
1745
1745
  var codePoint = null;
1746
1746
  var bytesPerSequence = (firstByte > 0xEF) ? 4
1747
1747
  : (firstByte > 0xDF) ? 3
1748
- : (firstByte > 0xBF) ? 2
1749
- : 1;
1748
+ : (firstByte > 0xBF) ? 2
1749
+ : 1;
1750
1750
 
1751
1751
  if (i + bytesPerSequence <= end) {
1752
1752
  var secondByte, thirdByte, fourthByte, tempCodePoint;
@@ -1969,7 +1969,7 @@ Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
1969
1969
  return ((this[offset]) |
1970
1970
  (this[offset + 1] << 8) |
1971
1971
  (this[offset + 2] << 16)) +
1972
- (this[offset + 3] * 0x1000000)
1972
+ (this[offset + 3] * 0x1000000)
1973
1973
  };
1974
1974
 
1975
1975
  Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
@@ -1977,8 +1977,8 @@ Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
1977
1977
 
1978
1978
  return (this[offset] * 0x1000000) +
1979
1979
  ((this[offset + 1] << 16) |
1980
- (this[offset + 2] << 8) |
1981
- this[offset + 3])
1980
+ (this[offset + 2] << 8) |
1981
+ this[offset + 3])
1982
1982
  };
1983
1983
 
1984
1984
  Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
@@ -2628,35 +2628,35 @@ function isSlowBuffer (obj) {
2628
2628
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
2629
2629
 
2630
2630
  function getDefaultExportFromCjs (x) {
2631
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
2631
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
2632
2632
  }
2633
2633
 
2634
2634
  function getAugmentedNamespace(n) {
2635
2635
  if (n.__esModule) return n;
2636
2636
  var f = n.default;
2637
- if (typeof f == "function") {
2638
- var a = function a () {
2639
- if (this instanceof a) {
2640
- var args = [null];
2641
- args.push.apply(args, arguments);
2642
- var Ctor = Function.bind.apply(f, args);
2643
- return new Ctor();
2644
- }
2645
- return f.apply(this, arguments);
2646
- };
2647
- a.prototype = f.prototype;
2637
+ if (typeof f == "function") {
2638
+ var a = function a () {
2639
+ if (this instanceof a) {
2640
+ var args = [null];
2641
+ args.push.apply(args, arguments);
2642
+ var Ctor = Function.bind.apply(f, args);
2643
+ return new Ctor();
2644
+ }
2645
+ return f.apply(this, arguments);
2646
+ };
2647
+ a.prototype = f.prototype;
2648
2648
  } else a = {};
2649
2649
  Object.defineProperty(a, '__esModule', {value: true});
2650
- Object.keys(n).forEach(function (k) {
2651
- var d = Object.getOwnPropertyDescriptor(n, k);
2652
- Object.defineProperty(a, k, d.get ? d : {
2653
- enumerable: true,
2654
- get: function () {
2655
- return n[k];
2656
- }
2657
- });
2658
- });
2659
- return a;
2650
+ Object.keys(n).forEach(function (k) {
2651
+ var d = Object.getOwnPropertyDescriptor(n, k);
2652
+ Object.defineProperty(a, k, d.get ? d : {
2653
+ enumerable: true,
2654
+ get: function () {
2655
+ return n[k];
2656
+ }
2657
+ });
2658
+ });
2659
+ return a;
2660
2660
  }
2661
2661
 
2662
2662
  var toString$1=Object.prototype.toString;/**
@@ -2667,7 +2667,7 @@ var toString$1=Object.prototype.toString;/**
2667
2667
  * @api public
2668
2668
  */var componentType=function componentType(val){switch(toString$1.call(val)){case'[object Date]':return 'date';case'[object RegExp]':return 'regexp';case'[object Arguments]':return 'arguments';case'[object Array]':return 'array';case'[object Error]':return 'error';}if(val===null)return 'null';if(val===undefined)return 'undefined';if(val!==val)return 'nan';if(val&&val.nodeType===1)return 'element';if(isBuffer$1(val))return 'buffer';val=val.valueOf?val.valueOf():Object.prototype.valueOf.apply(val);return _typeof(val);};// code borrowed from https://github.com/feross/is-buffer/blob/master/index.js
2669
2669
  function isBuffer$1(obj){return !!(obj!=null&&(obj._isBuffer||// For Safari 5-7 (missing Object.prototype.constructor)
2670
- obj.constructor&&typeof obj.constructor.isBuffer==='function'&&obj.constructor.isBuffer(obj)));}
2670
+ obj.constructor&&typeof obj.constructor.isBuffer==='function'&&obj.constructor.isBuffer(obj)));}
2671
2671
 
2672
2672
  /**
2673
2673
  * Join `arr` with the trailing `str` defaulting to "and",
@@ -2774,7 +2774,7 @@ function stylizeWithColor(str, styleType) {
2774
2774
 
2775
2775
  if (style) {
2776
2776
  return '\u001b[' + inspect$1.colors[style][0] + 'm' + str +
2777
- '\u001b[' + inspect$1.colors[style][1] + 'm';
2777
+ '\u001b[' + inspect$1.colors[style][1] + 'm';
2778
2778
  } else {
2779
2779
  return str;
2780
2780
  }
@@ -2801,14 +2801,14 @@ function formatValue(ctx, value, recurseTimes) {
2801
2801
  // Provide a hook for user-specified inspect functions.
2802
2802
  // Check that value is an object with an inspect function on it
2803
2803
  if (ctx.customInspect &&
2804
- value &&
2805
- isFunction$2(value.inspect) &&
2806
- // Filter out the util module, it's inspect function is special
2807
- value.inspect !== inspect$1 &&
2808
- // Also filter out any prototype objects using the circular check.
2809
- !(value.constructor && value.constructor.prototype === value)) {
2804
+ value &&
2805
+ isFunction$2(value.inspect) &&
2806
+ // Filter out the util module, it's inspect function is special
2807
+ value.inspect !== inspect$1 &&
2808
+ // Also filter out any prototype objects using the circular check.
2809
+ !(value.constructor && value.constructor.prototype === value)) {
2810
2810
  var ret = value.inspect(recurseTimes, ctx);
2811
- if (!isString$3(ret)) {
2811
+ if (!isString$2(ret)) {
2812
2812
  ret = formatValue(ctx, ret, recurseTimes);
2813
2813
  }
2814
2814
  return ret;
@@ -2831,7 +2831,7 @@ function formatValue(ctx, value, recurseTimes) {
2831
2831
  // IE doesn't make error fields non-enumerable
2832
2832
  // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
2833
2833
  if (isError(value)
2834
- && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
2834
+ && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
2835
2835
  return formatError(value);
2836
2836
  }
2837
2837
 
@@ -2913,10 +2913,10 @@ function formatValue(ctx, value, recurseTimes) {
2913
2913
  function formatPrimitive(ctx, value) {
2914
2914
  if (isUndefined$1(value))
2915
2915
  return ctx.stylize('undefined', 'undefined');
2916
- if (isString$3(value)) {
2916
+ if (isString$2(value)) {
2917
2917
  var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
2918
- .replace(/'/g, "\\'")
2919
- .replace(/\\"/g, '"') + '\'';
2918
+ .replace(/'/g, "\\'")
2919
+ .replace(/\\"/g, '"') + '\'';
2920
2920
  return ctx.stylize(simple, 'string');
2921
2921
  }
2922
2922
  if (isNumber$1(value))
@@ -2939,7 +2939,7 @@ function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
2939
2939
  for (var i = 0, l = value.length; i < l; ++i) {
2940
2940
  if (hasOwnProperty(value, String(i))) {
2941
2941
  output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
2942
- String(i), true));
2942
+ String(i), true));
2943
2943
  } else {
2944
2944
  output.push('');
2945
2945
  }
@@ -2947,7 +2947,7 @@ function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
2947
2947
  keys.forEach(function(key) {
2948
2948
  if (!key.match(/^\d+$/)) {
2949
2949
  output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
2950
- key, true));
2950
+ key, true));
2951
2951
  }
2952
2952
  });
2953
2953
  return output;
@@ -3003,8 +3003,8 @@ function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
3003
3003
  name = ctx.stylize(name, 'name');
3004
3004
  } else {
3005
3005
  name = name.replace(/'/g, "\\'")
3006
- .replace(/\\"/g, '"')
3007
- .replace(/(^"|"$)/g, "'");
3006
+ .replace(/\\"/g, '"')
3007
+ .replace(/(^"|"$)/g, "'");
3008
3008
  name = ctx.stylize(name, 'string');
3009
3009
  }
3010
3010
  }
@@ -3021,11 +3021,11 @@ function reduceToSingleString(output, base, braces) {
3021
3021
 
3022
3022
  if (length > 60) {
3023
3023
  return braces[0] +
3024
- (base === '' ? '' : base + '\n ') +
3025
- ' ' +
3026
- output.join(',\n ') +
3027
- ' ' +
3028
- braces[1];
3024
+ (base === '' ? '' : base + '\n ') +
3025
+ ' ' +
3026
+ output.join(',\n ') +
3027
+ ' ' +
3028
+ braces[1];
3029
3029
  }
3030
3030
 
3031
3031
  return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
@@ -3050,7 +3050,7 @@ function isNumber$1(arg) {
3050
3050
  return typeof arg === 'number';
3051
3051
  }
3052
3052
 
3053
- function isString$3(arg) {
3053
+ function isString$2(arg) {
3054
3054
  return typeof arg === 'string';
3055
3055
  }
3056
3056
 
@@ -3072,7 +3072,7 @@ function isDate$1(d) {
3072
3072
 
3073
3073
  function isError(e) {
3074
3074
  return isObject$1(e) &&
3075
- (objectToString$1(e) === '[object Error]' || e instanceof Error);
3075
+ (objectToString$1(e) === '[object Error]' || e instanceof Error);
3076
3076
  }
3077
3077
 
3078
3078
  function isFunction$2(arg) {
@@ -3081,11 +3081,11 @@ function isFunction$2(arg) {
3081
3081
 
3082
3082
  function isPrimitive(arg) {
3083
3083
  return arg === null ||
3084
- typeof arg === 'boolean' ||
3085
- typeof arg === 'number' ||
3086
- typeof arg === 'string' ||
3087
- typeof arg === 'symbol' || // ES6 symbol
3088
- typeof arg === 'undefined';
3084
+ typeof arg === 'boolean' ||
3085
+ typeof arg === 'number' ||
3086
+ typeof arg === 'string' ||
3087
+ typeof arg === 'symbol' || // ES6 symbol
3088
+ typeof arg === 'undefined';
3089
3089
  }
3090
3090
 
3091
3091
  function objectToString$1(o) {
@@ -3257,8 +3257,8 @@ function inspect(something) {
3257
3257
  }
3258
3258
  function getMessage(self) {
3259
3259
  return truncate(inspect(self.actual), 128) + ' ' +
3260
- self.operator + ' ' +
3261
- truncate(inspect(self.expected), 128);
3260
+ self.operator + ' ' +
3261
+ truncate(inspect(self.expected), 128);
3262
3262
  }
3263
3263
 
3264
3264
  // At present only the three keys mentioned above are used and
@@ -3336,46 +3336,46 @@ function _deepEqual(actual, expected, strict, memos) {
3336
3336
  } else if (isBuffer$2(actual) && isBuffer$2(expected)) {
3337
3337
  return compare(actual, expected) === 0;
3338
3338
 
3339
- // 7.2. If the expected value is a Date object, the actual value is
3340
- // equivalent if it is also a Date object that refers to the same time.
3339
+ // 7.2. If the expected value is a Date object, the actual value is
3340
+ // equivalent if it is also a Date object that refers to the same time.
3341
3341
  } else if (isDate$1(actual) && isDate$1(expected)) {
3342
3342
  return actual.getTime() === expected.getTime();
3343
3343
 
3344
- // 7.3 If the expected value is a RegExp object, the actual value is
3345
- // equivalent if it is also a RegExp object with the same source and
3346
- // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`).
3344
+ // 7.3 If the expected value is a RegExp object, the actual value is
3345
+ // equivalent if it is also a RegExp object with the same source and
3346
+ // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`).
3347
3347
  } else if (isRegExp(actual) && isRegExp(expected)) {
3348
3348
  return actual.source === expected.source &&
3349
- actual.global === expected.global &&
3350
- actual.multiline === expected.multiline &&
3351
- actual.lastIndex === expected.lastIndex &&
3352
- actual.ignoreCase === expected.ignoreCase;
3349
+ actual.global === expected.global &&
3350
+ actual.multiline === expected.multiline &&
3351
+ actual.lastIndex === expected.lastIndex &&
3352
+ actual.ignoreCase === expected.ignoreCase;
3353
3353
 
3354
- // 7.4. Other pairs that do not both pass typeof value == 'object',
3355
- // equivalence is determined by ==.
3354
+ // 7.4. Other pairs that do not both pass typeof value == 'object',
3355
+ // equivalence is determined by ==.
3356
3356
  } else if ((actual === null || typeof actual !== 'object') &&
3357
- (expected === null || typeof expected !== 'object')) {
3357
+ (expected === null || typeof expected !== 'object')) {
3358
3358
  return strict ? actual === expected : actual == expected;
3359
3359
 
3360
- // If both values are instances of typed arrays, wrap their underlying
3361
- // ArrayBuffers in a Buffer each to increase performance
3362
- // This optimization requires the arrays to have the same type as checked by
3363
- // Object.prototype.toString (aka pToString). Never perform binary
3364
- // comparisons for Float*Arrays, though, since e.g. +0 === -0 but their
3365
- // bit patterns are not identical.
3360
+ // If both values are instances of typed arrays, wrap their underlying
3361
+ // ArrayBuffers in a Buffer each to increase performance
3362
+ // This optimization requires the arrays to have the same type as checked by
3363
+ // Object.prototype.toString (aka pToString). Never perform binary
3364
+ // comparisons for Float*Arrays, though, since e.g. +0 === -0 but their
3365
+ // bit patterns are not identical.
3366
3366
  } else if (isView(actual) && isView(expected) &&
3367
- pToString(actual) === pToString(expected) &&
3368
- !(actual instanceof Float32Array ||
3369
- actual instanceof Float64Array)) {
3367
+ pToString(actual) === pToString(expected) &&
3368
+ !(actual instanceof Float32Array ||
3369
+ actual instanceof Float64Array)) {
3370
3370
  return compare(new Uint8Array(actual.buffer),
3371
- new Uint8Array(expected.buffer)) === 0;
3372
-
3373
- // 7.5 For all other Object pairs, including Array objects, equivalence is
3374
- // determined by having the same number of owned properties (as verified
3375
- // with Object.prototype.hasOwnProperty.call), the same set of keys
3376
- // (although not necessarily the same order), equivalent values for every
3377
- // corresponding key, and an identical 'prototype' property. Note: this
3378
- // accounts for both named and indexed properties on Arrays.
3371
+ new Uint8Array(expected.buffer)) === 0;
3372
+
3373
+ // 7.5 For all other Object pairs, including Array objects, equivalence is
3374
+ // determined by having the same number of owned properties (as verified
3375
+ // with Object.prototype.hasOwnProperty.call), the same set of keys
3376
+ // (although not necessarily the same order), equivalent values for every
3377
+ // corresponding key, and an identical 'prototype' property. Note: this
3378
+ // accounts for both named and indexed properties on Arrays.
3379
3379
  } else if (isBuffer$2(actual) !== isBuffer$2(expected)) {
3380
3380
  return false;
3381
3381
  } else {
@@ -3525,7 +3525,7 @@ function _throws(shouldThrow, block, expected, message) {
3525
3525
  actual = _tryBlock(block);
3526
3526
 
3527
3527
  message = (expected && expected.name ? ' (' + expected.name + ').' : '.') +
3528
- (message ? ' ' + message : '.');
3528
+ (message ? ' ' + message : '.');
3529
3529
 
3530
3530
  if (shouldThrow && !actual) {
3531
3531
  fail(actual, expected, 'Missing expected exception' + message);
@@ -3538,12 +3538,12 @@ function _throws(shouldThrow, block, expected, message) {
3538
3538
  if ((isUnwantedException &&
3539
3539
  userProvidedMessage &&
3540
3540
  expectedException(actual, expected)) ||
3541
- isUnexpectedException) {
3541
+ isUnexpectedException) {
3542
3542
  fail(actual, expected, 'Got unwanted exception' + message);
3543
3543
  }
3544
3544
 
3545
3545
  if ((shouldThrow && actual && expected &&
3546
- !expectedException(actual, expected)) || (!shouldThrow && actual)) {
3546
+ !expectedException(actual, expected)) || (!shouldThrow && actual)) {
3547
3547
  throw actual;
3548
3548
  }
3549
3549
  }
@@ -3608,16 +3608,26 @@ var MAX_SIZE=32<<10;var looselyValidateEvent_1=looselyValidateEvent;/**
3608
3608
  */var genericValidationRules={anonymousId:['string','number'],category:'string',context:'object',event:'string',groupId:['string','number'],integrations:'object',name:'string',previousId:['string','number'],timestamp:'date',userId:['string','number'],type:'string'};/**
3609
3609
  * Validate an event object.
3610
3610
  */function validateGenericEvent(event){assert(type(event)==='object','You must pass a message object.');var json=JSON.stringify(event);// Strings are variable byte encoded, so json.length is not sufficient.
3611
- assert(Buffer.byteLength(json,'utf8')<MAX_SIZE,'Your message must be < 32kb.');for(var key in genericValidationRules){var val=event[key];if(!val)continue;var rule=genericValidationRules[key];if(type(rule)!=='array'){rule=[rule];}var a=rule[0]==='object'?'an':'a';assert(rule.some(function(e){return type(val)===e;}),'"'+key+'" must be '+a+' '+join(rule,'or')+'.');}}var looselyValidate = /*@__PURE__*/getDefaultExportFromCjs(looselyValidateEvent_1);
3611
+ assert(Buffer.byteLength(json,'utf8')<MAX_SIZE,'Your message must be < 32kb.');for(var key in genericValidationRules){var val=event[key];if(!val)continue;var rule=genericValidationRules[key];if(type(rule)!=='array'){rule=[rule];}var a=rule[0]==='object'?'an':'a';assert(rule.some(function(e){return type(val)===e;}),'"'+key+'" must be '+a+' '+join(rule,'or')+'.');}}
3612
3612
 
3613
- var axios$3 = {exports: {}};
3613
+ var axiosExports$1 = {};
3614
+ var axios$3 = {
3615
+ get exports(){ return axiosExports$1; },
3616
+ set exports(v){ axiosExports$1 = v; },
3617
+ };
3618
+
3619
+ var axiosExports = {};
3620
+ var axios$2 = {
3621
+ get exports(){ return axiosExports; },
3622
+ set exports(v){ axiosExports = v; },
3623
+ };
3614
3624
 
3615
3625
  var bind$2=function bind(fn,thisArg){return function wrap(){var args=new Array(arguments.length);for(var i=0;i<args.length;i++){args[i]=arguments[i];}return fn.apply(thisArg,args);};};
3616
3626
 
3617
3627
  var bind$1=bind$2;// utils is a library of generic helper functions non-specific to axios
3618
3628
  var toString=Object.prototype.toString;// eslint-disable-next-line func-names
3619
3629
  var kindOf=function(cache){// eslint-disable-next-line func-names
3620
- return function(thing){var str=toString.call(thing);return cache[str]||(cache[str]=str.slice(8,-1).toLowerCase());};}(Object.create(null));function kindOfTest(type){type=type.toLowerCase();return function isKindOf(thing){return kindOf(thing)===type;};}/**
3630
+ return function(thing){var str=toString.call(thing);return cache[str]||(cache[str]=str.slice(8,-1).toLowerCase());};}(Object.create(null));function kindOfTest(type){type=type.toLowerCase();return function isKindOf(thing){return kindOf(thing)===type;};}/**
3621
3631
  * Determine if a value is an Array
3622
3632
  *
3623
3633
  * @param {Object} val The value to test
@@ -3648,7 +3658,7 @@ return function(thing){var str=toString.call(thing);return cache[str]||(cache[st
3648
3658
  *
3649
3659
  * @param {Object} val The value to test
3650
3660
  * @returns {boolean} True if value is a String, otherwise false
3651
- */function isString$2(val){return typeof val==='string';}/**
3661
+ */function isString$1(val){return typeof val==='string';}/**
3652
3662
  * Determine if a value is a Number
3653
3663
  *
3654
3664
  * @param {Object} val The value to test
@@ -3738,10 +3748,10 @@ return function(thing){var str=toString.call(thing);return cache[str]||(cache[st
3738
3748
  * @param {Object|Array} obj The object to iterate
3739
3749
  * @param {Function} fn The callback to invoke for each item
3740
3750
  */function forEach(obj,fn){// Don't bother if no value provided
3741
- if(obj===null||typeof obj==='undefined'){return;}// Force an array if not already something iterable
3742
- if(_typeof(obj)!=='object'){/*eslint no-param-reassign:0*/obj=[obj];}if(isArray$1(obj)){// Iterate over array values
3743
- for(var i=0,l=obj.length;i<l;i++){fn.call(null,obj[i],i,obj);}}else {// Iterate over object keys
3744
- for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){fn.call(null,obj[key],key,obj);}}}}/**
3751
+ if(obj===null||typeof obj==='undefined'){return;}// Force an array if not already something iterable
3752
+ if(_typeof(obj)!=='object'){/*eslint no-param-reassign:0*/obj=[obj];}if(isArray$1(obj)){// Iterate over array values
3753
+ for(var i=0,l=obj.length;i<l;i++){fn.call(null,obj[i],i,obj);}}else {// Iterate over object keys
3754
+ for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){fn.call(null,obj[key],key,obj);}}}}/**
3745
3755
  * Accepts varargs expecting each argument to be an object, then
3746
3756
  * immutably merges the properties of each object and returns result.
3747
3757
  *
@@ -3793,7 +3803,7 @@ for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){fn.call(nu
3793
3803
  * @returns {Array}
3794
3804
  */function toArray(thing){if(!thing)return null;var i=thing.length;if(isUndefined(i))return null;var arr=new Array(i);while(i-->0){arr[i]=thing[i];}return arr;}// eslint-disable-next-line func-names
3795
3805
  var isTypedArray=function(TypedArray){// eslint-disable-next-line func-names
3796
- return function(thing){return TypedArray&&thing instanceof TypedArray;};}(typeof Uint8Array!=='undefined'&&Object.getPrototypeOf(Uint8Array));var utils$9={isArray:isArray$1,isArrayBuffer:isArrayBuffer,isBuffer:isBuffer,isFormData:isFormData,isArrayBufferView:isArrayBufferView,isString:isString$2,isNumber:isNumber,isObject:isObject,isPlainObject:isPlainObject,isUndefined:isUndefined,isDate:isDate,isFile:isFile,isBlob:isBlob,isFunction:isFunction$1,isStream:isStream,isURLSearchParams:isURLSearchParams,isStandardBrowserEnv:isStandardBrowserEnv,forEach:forEach,merge:merge,extend:extend,trim:trim,stripBOM:stripBOM,inherits:inherits,toFlatObject:toFlatObject,kindOf:kindOf,kindOfTest:kindOfTest,endsWith:endsWith,toArray:toArray,isTypedArray:isTypedArray,isFileList:isFileList};
3806
+ return function(thing){return TypedArray&&thing instanceof TypedArray;};}(typeof Uint8Array!=='undefined'&&Object.getPrototypeOf(Uint8Array));var utils$9={isArray:isArray$1,isArrayBuffer:isArrayBuffer,isBuffer:isBuffer,isFormData:isFormData,isArrayBufferView:isArrayBufferView,isString:isString$1,isNumber:isNumber,isObject:isObject,isPlainObject:isPlainObject,isUndefined:isUndefined,isDate:isDate,isFile:isFile,isBlob:isBlob,isFunction:isFunction$1,isStream:isStream,isURLSearchParams:isURLSearchParams,isStandardBrowserEnv:isStandardBrowserEnv,forEach:forEach,merge:merge,extend:extend,trim:trim,stripBOM:stripBOM,inherits:inherits,toFlatObject:toFlatObject,kindOf:kindOf,kindOfTest:kindOfTest,endsWith:endsWith,toArray:toArray,isTypedArray:isTypedArray,isFileList:isFileList};
3797
3807
 
3798
3808
  var utils$8=utils$9;function encode(val){return encodeURIComponent(val).replace(/%3A/gi,':').replace(/%24/g,'$').replace(/%2C/gi,',').replace(/%20/g,'+').replace(/%5B/gi,'[').replace(/%5D/gi,']');}/**
3799
3809
  * Build a URL by appending params to the end
@@ -3801,7 +3811,7 @@ var utils$8=utils$9;function encode(val){return encodeURIComponent(val).replace(
3801
3811
  * @param {string} url The base of the url (e.g., http://www.google.com)
3802
3812
  * @param {object} [params] The params to be appended
3803
3813
  * @returns {string} The formatted url
3804
- */var buildURL$1=function buildURL(url,params,paramsSerializer){/*eslint no-param-reassign:0*/if(!params){return url;}var serializedParams;if(paramsSerializer){serializedParams=paramsSerializer(params);}else if(utils$8.isURLSearchParams(params)){serializedParams=params.toString();}else {var parts=[];utils$8.forEach(params,function serialize(val,key){if(val===null||typeof val==='undefined'){return;}if(utils$8.isArray(val)){key=key+'[]';}else {val=[val];}utils$8.forEach(val,function parseValue(v){if(utils$8.isDate(v)){v=v.toISOString();}else if(utils$8.isObject(v)){v=JSON.stringify(v);}parts.push(encode(key)+'='+encode(v));});});serializedParams=parts.join('&');}if(serializedParams){var hashmarkIndex=url.indexOf('#');if(hashmarkIndex!==-1){url=url.slice(0,hashmarkIndex);}url+=(url.indexOf('?')===-1?'?':'&')+serializedParams;}return url;};var buildURL$2 = /*@__PURE__*/getDefaultExportFromCjs(buildURL$1);
3814
+ */var buildURL$1=function buildURL(url,params,paramsSerializer){/*eslint no-param-reassign:0*/if(!params){return url;}var serializedParams;if(paramsSerializer){serializedParams=paramsSerializer(params);}else if(utils$8.isURLSearchParams(params)){serializedParams=params.toString();}else {var parts=[];utils$8.forEach(params,function serialize(val,key){if(val===null||typeof val==='undefined'){return;}if(utils$8.isArray(val)){key=key+'[]';}else {val=[val];}utils$8.forEach(val,function parseValue(v){if(utils$8.isDate(v)){v=v.toISOString();}else if(utils$8.isObject(v)){v=JSON.stringify(v);}parts.push(encode(key)+'='+encode(v));});});serializedParams=parts.join('&');}if(serializedParams){var hashmarkIndex=url.indexOf('#');if(hashmarkIndex!==-1){url=url.slice(0,hashmarkIndex);}url+=(url.indexOf('?')===-1?'?':'&')+serializedParams;}return url;};
3805
3815
 
3806
3816
  var utils$7=utils$9;function InterceptorManager$1(){this.handlers=[];}/**
3807
3817
  * Add a new interceptor to the stack
@@ -3826,33 +3836,33 @@ var utils$7=utils$9;function InterceptorManager$1(){this.handlers=[];}/**
3826
3836
  var utils$6=utils$9;var normalizeHeaderName$1=function normalizeHeaderName(headers,normalizedName){utils$6.forEach(headers,function processHeader(value,name){if(name!==normalizedName&&name.toUpperCase()===normalizedName.toUpperCase()){headers[normalizedName]=value;delete headers[name];}});};
3827
3837
 
3828
3838
  var AxiosError_1;var hasRequiredAxiosError;function requireAxiosError(){if(hasRequiredAxiosError)return AxiosError_1;hasRequiredAxiosError=1;var utils=utils$9;/**
3829
- * Create an Error with the specified message, config, error code, request and response.
3830
- *
3831
- * @param {string} message The error message.
3832
- * @param {string} [code] The error code (for example, 'ECONNABORTED').
3833
- * @param {Object} [config] The config.
3834
- * @param {Object} [request] The request.
3835
- * @param {Object} [response] The response.
3836
- * @returns {Error} The created error.
3837
- */function AxiosError(message,code,config,request,response){Error.call(this);this.message=message;this.name='AxiosError';code&&(this.code=code);config&&(this.config=config);request&&(this.request=request);response&&(this.response=response);}utils.inherits(AxiosError,Error,{toJSON:function toJSON(){return {// Standard
3838
- message:this.message,name:this.name,// Microsoft
3839
- description:this.description,number:this.number,// Mozilla
3840
- fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,// Axios
3841
- config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null};}});var prototype=AxiosError.prototype;var descriptors={};['ERR_BAD_OPTION_VALUE','ERR_BAD_OPTION','ECONNABORTED','ETIMEDOUT','ERR_NETWORK','ERR_FR_TOO_MANY_REDIRECTS','ERR_DEPRECATED','ERR_BAD_RESPONSE','ERR_BAD_REQUEST','ERR_CANCELED'// eslint-disable-next-line func-names
3839
+ * Create an Error with the specified message, config, error code, request and response.
3840
+ *
3841
+ * @param {string} message The error message.
3842
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
3843
+ * @param {Object} [config] The config.
3844
+ * @param {Object} [request] The request.
3845
+ * @param {Object} [response] The response.
3846
+ * @returns {Error} The created error.
3847
+ */function AxiosError(message,code,config,request,response){Error.call(this);this.message=message;this.name='AxiosError';code&&(this.code=code);config&&(this.config=config);request&&(this.request=request);response&&(this.response=response);}utils.inherits(AxiosError,Error,{toJSON:function toJSON(){return {// Standard
3848
+ message:this.message,name:this.name,// Microsoft
3849
+ description:this.description,number:this.number,// Mozilla
3850
+ fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,// Axios
3851
+ config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null};}});var prototype=AxiosError.prototype;var descriptors={};['ERR_BAD_OPTION_VALUE','ERR_BAD_OPTION','ECONNABORTED','ETIMEDOUT','ERR_NETWORK','ERR_FR_TOO_MANY_REDIRECTS','ERR_DEPRECATED','ERR_BAD_RESPONSE','ERR_BAD_REQUEST','ERR_CANCELED'// eslint-disable-next-line func-names
3842
3852
  ].forEach(function(code){descriptors[code]={value:code};});Object.defineProperties(AxiosError,descriptors);Object.defineProperty(prototype,'isAxiosError',{value:true});// eslint-disable-next-line func-names
3843
- AxiosError.from=function(error,code,config,request,response,customProps){var axiosError=Object.create(prototype);utils.toFlatObject(error,axiosError,function filter(obj){return obj!==Error.prototype;});AxiosError.call(axiosError,error.message,code,config,request,response);axiosError.name=error.name;customProps&&_extends(axiosError,customProps);return axiosError;};AxiosError_1=AxiosError;return AxiosError_1;}
3853
+ AxiosError.from=function(error,code,config,request,response,customProps){var axiosError=Object.create(prototype);utils.toFlatObject(error,axiosError,function filter(obj){return obj!==Error.prototype;});AxiosError.call(axiosError,error.message,code,config,request,response);axiosError.name=error.name;customProps&&_extends(axiosError,customProps);return axiosError;};AxiosError_1=AxiosError;return AxiosError_1;}
3844
3854
 
3845
3855
  var transitional={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};
3846
3856
 
3847
3857
  var toFormData_1;var hasRequiredToFormData;function requireToFormData(){if(hasRequiredToFormData)return toFormData_1;hasRequiredToFormData=1;var utils=utils$9;/**
3848
- * Convert a data object to FormData
3849
- * @param {Object} obj
3850
- * @param {?Object} [formData]
3851
- * @returns {Object}
3852
- **/function toFormData(obj,formData){// eslint-disable-next-line no-param-reassign
3853
- formData=formData||new FormData();var stack=[];function convertValue(value){if(value===null)return '';if(utils.isDate(value)){return value.toISOString();}if(utils.isArrayBuffer(value)||utils.isTypedArray(value)){return typeof Blob==='function'?new Blob([value]):Buffer.from(value);}return value;}function build(data,parentKey){if(utils.isPlainObject(data)||utils.isArray(data)){if(stack.indexOf(data)!==-1){throw Error('Circular reference detected in '+parentKey);}stack.push(data);utils.forEach(data,function each(value,key){if(utils.isUndefined(value))return;var fullKey=parentKey?parentKey+'.'+key:key;var arr;if(value&&!parentKey&&_typeof(value)==='object'){if(utils.endsWith(key,'{}')){// eslint-disable-next-line no-param-reassign
3854
- value=JSON.stringify(value);}else if(utils.endsWith(key,'[]')&&(arr=utils.toArray(value))){// eslint-disable-next-line func-names
3855
- arr.forEach(function(el){!utils.isUndefined(el)&&formData.append(fullKey,convertValue(el));});return;}}build(value,fullKey);});stack.pop();}else {formData.append(parentKey,convertValue(data));}}build(obj);return formData;}toFormData_1=toFormData;return toFormData_1;}
3858
+ * Convert a data object to FormData
3859
+ * @param {Object} obj
3860
+ * @param {?Object} [formData]
3861
+ * @returns {Object}
3862
+ **/function toFormData(obj,formData){// eslint-disable-next-line no-param-reassign
3863
+ formData=formData||new FormData();var stack=[];function convertValue(value){if(value===null)return '';if(utils.isDate(value)){return value.toISOString();}if(utils.isArrayBuffer(value)||utils.isTypedArray(value)){return typeof Blob==='function'?new Blob([value]):Buffer.from(value);}return value;}function build(data,parentKey){if(utils.isPlainObject(data)||utils.isArray(data)){if(stack.indexOf(data)!==-1){throw Error('Circular reference detected in '+parentKey);}stack.push(data);utils.forEach(data,function each(value,key){if(utils.isUndefined(value))return;var fullKey=parentKey?parentKey+'.'+key:key;var arr;if(value&&!parentKey&&_typeof(value)==='object'){if(utils.endsWith(key,'{}')){// eslint-disable-next-line no-param-reassign
3864
+ value=JSON.stringify(value);}else if(utils.endsWith(key,'[]')&&(arr=utils.toArray(value))){// eslint-disable-next-line func-names
3865
+ arr.forEach(function(el){!utils.isUndefined(el)&&formData.append(fullKey,convertValue(el));});return;}}build(value,fullKey);});stack.pop();}else {formData.append(parentKey,convertValue(data));}}build(obj);return formData;}toFormData_1=toFormData;return toFormData_1;}
3856
3866
 
3857
3867
  var AxiosError$2=requireAxiosError();/**
3858
3868
  * Resolve or reject a Promise based on response status.
@@ -3860,11 +3870,11 @@ var AxiosError$2=requireAxiosError();/**
3860
3870
  * @param {Function} resolve A function that resolves the promise.
3861
3871
  * @param {Function} reject A function that rejects the promise.
3862
3872
  * @param {object} response The response.
3863
- */var settle=function settle(resolve,reject,response){var validateStatus=response.config.validateStatus;if(!response.status||!validateStatus||validateStatus(response.status)){resolve(response);}else {reject(new AxiosError$2('Request failed with status code '+response.status,[AxiosError$2.ERR_BAD_REQUEST,AxiosError$2.ERR_BAD_RESPONSE][Math.floor(response.status/100)-4],response.config,response.request,response));}};var settle$1 = /*@__PURE__*/getDefaultExportFromCjs(settle);
3873
+ */var settle=function settle(resolve,reject,response){var validateStatus=response.config.validateStatus;if(!response.status||!validateStatus||validateStatus(response.status)){resolve(response);}else {reject(new AxiosError$2('Request failed with status code '+response.status,[AxiosError$2.ERR_BAD_REQUEST,AxiosError$2.ERR_BAD_RESPONSE][Math.floor(response.status/100)-4],response.config,response.request,response));}};
3864
3874
 
3865
3875
  var cookies;var hasRequiredCookies;function requireCookies(){if(hasRequiredCookies)return cookies;hasRequiredCookies=1;var utils=utils$9;cookies=utils.isStandardBrowserEnv()?// Standard browser envs support document.cookie
3866
- function standardBrowserEnv(){return {write:function write(name,value,expires,path,domain,secure){var cookie=[];cookie.push(name+'='+encodeURIComponent(value));if(utils.isNumber(expires)){cookie.push('expires='+new Date(expires).toGMTString());}if(utils.isString(path)){cookie.push('path='+path);}if(utils.isString(domain)){cookie.push('domain='+domain);}if(secure===true){cookie.push('secure');}document.cookie=cookie.join('; ');},read:function read(name){var match=document.cookie.match(new RegExp('(^|;\\s*)('+name+')=([^;]*)'));return match?decodeURIComponent(match[3]):null;},remove:function remove(name){this.write(name,'',Date.now()-86400000);}};}():// Non standard browser env (web workers, react-native) lack needed support.
3867
- function nonStandardBrowserEnv(){return {write:function write(){},read:function read(){return null;},remove:function remove(){}};}();return cookies;}
3876
+ function standardBrowserEnv(){return {write:function write(name,value,expires,path,domain,secure){var cookie=[];cookie.push(name+'='+encodeURIComponent(value));if(utils.isNumber(expires)){cookie.push('expires='+new Date(expires).toGMTString());}if(utils.isString(path)){cookie.push('path='+path);}if(utils.isString(domain)){cookie.push('domain='+domain);}if(secure===true){cookie.push('secure');}document.cookie=cookie.join('; ');},read:function read(name){var match=document.cookie.match(new RegExp('(^|;\\s*)('+name+')=([^;]*)'));return match?decodeURIComponent(match[3]):null;},remove:function remove(name){this.write(name,'',Date.now()-86400000);}};}():// Non standard browser env (web workers, react-native) lack needed support.
3877
+ function nonStandardBrowserEnv(){return {write:function write(){},read:function read(){return null;},remove:function remove(){}};}();return cookies;}
3868
3878
 
3869
3879
  /**
3870
3880
  * Determines whether the specified URL is absolute
@@ -3874,7 +3884,7 @@ function nonStandardBrowserEnv(){return {write:function write(){},read:function
3874
3884
  */var isAbsoluteURL$1=function isAbsoluteURL(url){// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
3875
3885
  // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
3876
3886
  // by any combination of letters, digits, plus, period, or hyphen.
3877
- return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);};
3887
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);};
3878
3888
 
3879
3889
  /**
3880
3890
  * Creates a new URL by combining the specified URLs
@@ -3892,94 +3902,94 @@ var isAbsoluteURL=isAbsoluteURL$1;var combineURLs=combineURLs$1;/**
3892
3902
  * @param {string} baseURL The base URL
3893
3903
  * @param {string} requestedURL Absolute or relative URL to combine
3894
3904
  * @returns {string} The combined full path
3895
- */var buildFullPath$1=function buildFullPath(baseURL,requestedURL){if(baseURL&&!isAbsoluteURL(requestedURL)){return combineURLs(baseURL,requestedURL);}return requestedURL;};var buildFullPath$2 = /*@__PURE__*/getDefaultExportFromCjs(buildFullPath$1);
3905
+ */var buildFullPath$1=function buildFullPath(baseURL,requestedURL){if(baseURL&&!isAbsoluteURL(requestedURL)){return combineURLs(baseURL,requestedURL);}return requestedURL;};
3896
3906
 
3897
3907
  var parseHeaders;var hasRequiredParseHeaders;function requireParseHeaders(){if(hasRequiredParseHeaders)return parseHeaders;hasRequiredParseHeaders=1;var utils=utils$9;// Headers whose duplicates are ignored by node
3898
3908
  // c.f. https://nodejs.org/api/http.html#http_message_headers
3899
- var ignoreDuplicateOf=['age','authorization','content-length','content-type','etag','expires','from','host','if-modified-since','if-unmodified-since','last-modified','location','max-forwards','proxy-authorization','referer','retry-after','user-agent'];/**
3900
- * Parse headers into an object
3901
- *
3902
- * ```
3903
- * Date: Wed, 27 Aug 2014 08:58:49 GMT
3904
- * Content-Type: application/json
3905
- * Connection: keep-alive
3906
- * Transfer-Encoding: chunked
3907
- * ```
3908
- *
3909
- * @param {String} headers Headers needing to be parsed
3910
- * @returns {Object} Headers parsed into an object
3911
- */parseHeaders=function parseHeaders(headers){var parsed={};var key;var val;var i;if(!headers){return parsed;}utils.forEach(headers.split('\n'),function parser(line){i=line.indexOf(':');key=utils.trim(line.substr(0,i)).toLowerCase();val=utils.trim(line.substr(i+1));if(key){if(parsed[key]&&ignoreDuplicateOf.indexOf(key)>=0){return;}if(key==='set-cookie'){parsed[key]=(parsed[key]?parsed[key]:[]).concat([val]);}else {parsed[key]=parsed[key]?parsed[key]+', '+val:val;}}});return parsed;};return parseHeaders;}
3909
+ var ignoreDuplicateOf=['age','authorization','content-length','content-type','etag','expires','from','host','if-modified-since','if-unmodified-since','last-modified','location','max-forwards','proxy-authorization','referer','retry-after','user-agent'];/**
3910
+ * Parse headers into an object
3911
+ *
3912
+ * ```
3913
+ * Date: Wed, 27 Aug 2014 08:58:49 GMT
3914
+ * Content-Type: application/json
3915
+ * Connection: keep-alive
3916
+ * Transfer-Encoding: chunked
3917
+ * ```
3918
+ *
3919
+ * @param {String} headers Headers needing to be parsed
3920
+ * @returns {Object} Headers parsed into an object
3921
+ */parseHeaders=function parseHeaders(headers){var parsed={};var key;var val;var i;if(!headers){return parsed;}utils.forEach(headers.split('\n'),function parser(line){i=line.indexOf(':');key=utils.trim(line.substr(0,i)).toLowerCase();val=utils.trim(line.substr(i+1));if(key){if(parsed[key]&&ignoreDuplicateOf.indexOf(key)>=0){return;}if(key==='set-cookie'){parsed[key]=(parsed[key]?parsed[key]:[]).concat([val]);}else {parsed[key]=parsed[key]?parsed[key]+', '+val:val;}}});return parsed;};return parseHeaders;}
3912
3922
 
3913
3923
  var isURLSameOrigin;var hasRequiredIsURLSameOrigin;function requireIsURLSameOrigin(){if(hasRequiredIsURLSameOrigin)return isURLSameOrigin;hasRequiredIsURLSameOrigin=1;var utils=utils$9;isURLSameOrigin=utils.isStandardBrowserEnv()?// Standard browser envs have full support of the APIs needed to test
3914
- // whether the request URL is of the same origin as current location.
3915
- function standardBrowserEnv(){var msie=/(msie|trident)/i.test(navigator.userAgent);var urlParsingNode=document.createElement('a');var originURL;/**
3916
- * Parse a URL to discover it's components
3917
- *
3918
- * @param {String} url The URL to be parsed
3919
- * @returns {Object}
3920
- */function resolveURL(url){var href=url;if(msie){// IE needs attribute set twice to normalize properties
3921
- urlParsingNode.setAttribute('href',href);href=urlParsingNode.href;}urlParsingNode.setAttribute('href',href);// urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
3922
- return {href:urlParsingNode.href,protocol:urlParsingNode.protocol?urlParsingNode.protocol.replace(/:$/,''):'',host:urlParsingNode.host,search:urlParsingNode.search?urlParsingNode.search.replace(/^\?/,''):'',hash:urlParsingNode.hash?urlParsingNode.hash.replace(/^#/,''):'',hostname:urlParsingNode.hostname,port:urlParsingNode.port,pathname:urlParsingNode.pathname.charAt(0)==='/'?urlParsingNode.pathname:'/'+urlParsingNode.pathname};}originURL=resolveURL(window.location.href);/**
3923
- * Determine if a URL shares the same origin as the current location
3924
- *
3925
- * @param {String} requestURL The URL to test
3926
- * @returns {boolean} True if URL shares the same origin, otherwise false
3927
- */return function isURLSameOrigin(requestURL){var parsed=utils.isString(requestURL)?resolveURL(requestURL):requestURL;return parsed.protocol===originURL.protocol&&parsed.host===originURL.host;};}():// Non standard browser envs (web workers, react-native) lack needed support.
3928
- function nonStandardBrowserEnv(){return function isURLSameOrigin(){return true;};}();return isURLSameOrigin;}
3924
+ // whether the request URL is of the same origin as current location.
3925
+ function standardBrowserEnv(){var msie=/(msie|trident)/i.test(navigator.userAgent);var urlParsingNode=document.createElement('a');var originURL;/**
3926
+ * Parse a URL to discover it's components
3927
+ *
3928
+ * @param {String} url The URL to be parsed
3929
+ * @returns {Object}
3930
+ */function resolveURL(url){var href=url;if(msie){// IE needs attribute set twice to normalize properties
3931
+ urlParsingNode.setAttribute('href',href);href=urlParsingNode.href;}urlParsingNode.setAttribute('href',href);// urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
3932
+ return {href:urlParsingNode.href,protocol:urlParsingNode.protocol?urlParsingNode.protocol.replace(/:$/,''):'',host:urlParsingNode.host,search:urlParsingNode.search?urlParsingNode.search.replace(/^\?/,''):'',hash:urlParsingNode.hash?urlParsingNode.hash.replace(/^#/,''):'',hostname:urlParsingNode.hostname,port:urlParsingNode.port,pathname:urlParsingNode.pathname.charAt(0)==='/'?urlParsingNode.pathname:'/'+urlParsingNode.pathname};}originURL=resolveURL(window.location.href);/**
3933
+ * Determine if a URL shares the same origin as the current location
3934
+ *
3935
+ * @param {String} requestURL The URL to test
3936
+ * @returns {boolean} True if URL shares the same origin, otherwise false
3937
+ */return function isURLSameOrigin(requestURL){var parsed=utils.isString(requestURL)?resolveURL(requestURL):requestURL;return parsed.protocol===originURL.protocol&&parsed.host===originURL.host;};}():// Non standard browser envs (web workers, react-native) lack needed support.
3938
+ function nonStandardBrowserEnv(){return function isURLSameOrigin(){return true;};}();return isURLSameOrigin;}
3929
3939
 
3930
3940
  var CanceledError_1;var hasRequiredCanceledError;function requireCanceledError(){if(hasRequiredCanceledError)return CanceledError_1;hasRequiredCanceledError=1;var AxiosError=requireAxiosError();var utils=utils$9;/**
3931
- * A `CanceledError` is an object that is thrown when an operation is canceled.
3932
- *
3933
- * @class
3934
- * @param {string=} message The message.
3935
- */function CanceledError(message){// eslint-disable-next-line no-eq-null,eqeqeq
3936
- AxiosError.call(this,message==null?'canceled':message,AxiosError.ERR_CANCELED);this.name='CanceledError';}utils.inherits(CanceledError,AxiosError,{__CANCEL__:true});CanceledError_1=CanceledError;return CanceledError_1;}
3941
+ * A `CanceledError` is an object that is thrown when an operation is canceled.
3942
+ *
3943
+ * @class
3944
+ * @param {string=} message The message.
3945
+ */function CanceledError(message){// eslint-disable-next-line no-eq-null,eqeqeq
3946
+ AxiosError.call(this,message==null?'canceled':message,AxiosError.ERR_CANCELED);this.name='CanceledError';}utils.inherits(CanceledError,AxiosError,{__CANCEL__:true});CanceledError_1=CanceledError;return CanceledError_1;}
3937
3947
 
3938
3948
  var parseProtocol;var hasRequiredParseProtocol;function requireParseProtocol(){if(hasRequiredParseProtocol)return parseProtocol;hasRequiredParseProtocol=1;parseProtocol=function parseProtocol(url){var match=/^([-+\w]{1,25})(:?\/\/|:)/.exec(url);return match&&match[1]||'';};return parseProtocol;}
3939
3949
 
3940
3950
  var xhr;var hasRequiredXhr;function requireXhr(){if(hasRequiredXhr)return xhr;hasRequiredXhr=1;var utils=utils$9;var settle$1=settle;var cookies=requireCookies();var buildURL=buildURL$1;var buildFullPath=buildFullPath$1;var parseHeaders=requireParseHeaders();var isURLSameOrigin=requireIsURLSameOrigin();var transitionalDefaults=transitional;var AxiosError=requireAxiosError();var CanceledError=requireCanceledError();var parseProtocol=requireParseProtocol();xhr=function xhrAdapter(config){return new Promise(function dispatchXhrRequest(resolve,reject){var requestData=config.data;var requestHeaders=config.headers;var responseType=config.responseType;var onCanceled;function done(){if(config.cancelToken){config.cancelToken.unsubscribe(onCanceled);}if(config.signal){config.signal.removeEventListener('abort',onCanceled);}}if(utils.isFormData(requestData)&&utils.isStandardBrowserEnv()){delete requestHeaders['Content-Type'];// Let the browser set it
3941
3951
  }var request=new XMLHttpRequest();// HTTP basic authentication
3942
- if(config.auth){var username=config.auth.username||'';var password=config.auth.password?unescape(encodeURIComponent(config.auth.password)):'';requestHeaders.Authorization='Basic '+btoa(username+':'+password);}var fullPath=buildFullPath(config.baseURL,config.url);request.open(config.method.toUpperCase(),buildURL(fullPath,config.params,config.paramsSerializer),true);// Set the request timeout in MS
3943
- request.timeout=config.timeout;function onloadend(){if(!request){return;}// Prepare the response
3944
- var responseHeaders='getAllResponseHeaders'in request?parseHeaders(request.getAllResponseHeaders()):null;var responseData=!responseType||responseType==='text'||responseType==='json'?request.responseText:request.response;var response={data:responseData,status:request.status,statusText:request.statusText,headers:responseHeaders,config:config,request:request};settle$1(function _resolve(value){resolve(value);done();},function _reject(err){reject(err);done();},response);// Clean up request
3945
- request=null;}if('onloadend'in request){// Use onloadend if available
3946
- request.onloadend=onloadend;}else {// Listen for ready state to emulate onloadend
3947
- request.onreadystatechange=function handleLoad(){if(!request||request.readyState!==4){return;}// The request errored out and we didn't get a response, this will be
3952
+ if(config.auth){var username=config.auth.username||'';var password=config.auth.password?unescape(encodeURIComponent(config.auth.password)):'';requestHeaders.Authorization='Basic '+btoa(username+':'+password);}var fullPath=buildFullPath(config.baseURL,config.url);request.open(config.method.toUpperCase(),buildURL(fullPath,config.params,config.paramsSerializer),true);// Set the request timeout in MS
3953
+ request.timeout=config.timeout;function onloadend(){if(!request){return;}// Prepare the response
3954
+ var responseHeaders='getAllResponseHeaders'in request?parseHeaders(request.getAllResponseHeaders()):null;var responseData=!responseType||responseType==='text'||responseType==='json'?request.responseText:request.response;var response={data:responseData,status:request.status,statusText:request.statusText,headers:responseHeaders,config:config,request:request};settle$1(function _resolve(value){resolve(value);done();},function _reject(err){reject(err);done();},response);// Clean up request
3955
+ request=null;}if('onloadend'in request){// Use onloadend if available
3956
+ request.onloadend=onloadend;}else {// Listen for ready state to emulate onloadend
3957
+ request.onreadystatechange=function handleLoad(){if(!request||request.readyState!==4){return;}// The request errored out and we didn't get a response, this will be
3948
3958
  // handled by onerror instead
3949
3959
  // With one exception: request that using file: protocol, most browsers
3950
3960
  // will return status as 0 even though it's a successful request
3951
- if(request.status===0&&!(request.responseURL&&request.responseURL.indexOf('file:')===0)){return;}// readystate handler is calling before onerror or ontimeout handlers,
3961
+ if(request.status===0&&!(request.responseURL&&request.responseURL.indexOf('file:')===0)){return;}// readystate handler is calling before onerror or ontimeout handlers,
3952
3962
  // so we should call onloadend on the next 'tick'
3953
- setTimeout(onloadend);};}// Handle browser request cancellation (as opposed to a manual cancellation)
3954
- request.onabort=function handleAbort(){if(!request){return;}reject(new AxiosError('Request aborted',AxiosError.ECONNABORTED,config,request));// Clean up request
3955
- request=null;};// Handle low level network errors
3956
- request.onerror=function handleError(){// Real errors are hidden from us by the browser
3963
+ setTimeout(onloadend);};}// Handle browser request cancellation (as opposed to a manual cancellation)
3964
+ request.onabort=function handleAbort(){if(!request){return;}reject(new AxiosError('Request aborted',AxiosError.ECONNABORTED,config,request));// Clean up request
3965
+ request=null;};// Handle low level network errors
3966
+ request.onerror=function handleError(){// Real errors are hidden from us by the browser
3957
3967
  // onerror should only fire if it's a network error
3958
- reject(new AxiosError('Network Error',AxiosError.ERR_NETWORK,config,request,request));// Clean up request
3959
- request=null;};// Handle timeout
3960
- request.ontimeout=function handleTimeout(){var timeoutErrorMessage=config.timeout?'timeout of '+config.timeout+'ms exceeded':'timeout exceeded';var transitional=config.transitional||transitionalDefaults;if(config.timeoutErrorMessage){timeoutErrorMessage=config.timeoutErrorMessage;}reject(new AxiosError(timeoutErrorMessage,transitional.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,config,request));// Clean up request
3961
- request=null;};// Add xsrf header
3968
+ reject(new AxiosError('Network Error',AxiosError.ERR_NETWORK,config,request,request));// Clean up request
3969
+ request=null;};// Handle timeout
3970
+ request.ontimeout=function handleTimeout(){var timeoutErrorMessage=config.timeout?'timeout of '+config.timeout+'ms exceeded':'timeout exceeded';var transitional=config.transitional||transitionalDefaults;if(config.timeoutErrorMessage){timeoutErrorMessage=config.timeoutErrorMessage;}reject(new AxiosError(timeoutErrorMessage,transitional.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,config,request));// Clean up request
3971
+ request=null;};// Add xsrf header
3962
3972
  // This is only done if running in a standard browser environment.
3963
3973
  // Specifically not if we're in a web worker, or react-native.
3964
- if(utils.isStandardBrowserEnv()){// Add xsrf header
3965
- var xsrfValue=(config.withCredentials||isURLSameOrigin(fullPath))&&config.xsrfCookieName?cookies.read(config.xsrfCookieName):undefined;if(xsrfValue){requestHeaders[config.xsrfHeaderName]=xsrfValue;}}// Add headers to the request
3966
- if('setRequestHeader'in request){utils.forEach(requestHeaders,function setRequestHeader(val,key){if(typeof requestData==='undefined'&&key.toLowerCase()==='content-type'){// Remove Content-Type if data is undefined
3967
- delete requestHeaders[key];}else {// Otherwise add header to the request
3968
- request.setRequestHeader(key,val);}});}// Add withCredentials to request if needed
3969
- if(!utils.isUndefined(config.withCredentials)){request.withCredentials=!!config.withCredentials;}// Add responseType to request if needed
3970
- if(responseType&&responseType!=='json'){request.responseType=config.responseType;}// Handle progress if needed
3971
- if(typeof config.onDownloadProgress==='function'){request.addEventListener('progress',config.onDownloadProgress);}// Not all browsers support upload events
3972
- if(typeof config.onUploadProgress==='function'&&request.upload){request.upload.addEventListener('progress',config.onUploadProgress);}if(config.cancelToken||config.signal){// Handle cancellation
3974
+ if(utils.isStandardBrowserEnv()){// Add xsrf header
3975
+ var xsrfValue=(config.withCredentials||isURLSameOrigin(fullPath))&&config.xsrfCookieName?cookies.read(config.xsrfCookieName):undefined;if(xsrfValue){requestHeaders[config.xsrfHeaderName]=xsrfValue;}}// Add headers to the request
3976
+ if('setRequestHeader'in request){utils.forEach(requestHeaders,function setRequestHeader(val,key){if(typeof requestData==='undefined'&&key.toLowerCase()==='content-type'){// Remove Content-Type if data is undefined
3977
+ delete requestHeaders[key];}else {// Otherwise add header to the request
3978
+ request.setRequestHeader(key,val);}});}// Add withCredentials to request if needed
3979
+ if(!utils.isUndefined(config.withCredentials)){request.withCredentials=!!config.withCredentials;}// Add responseType to request if needed
3980
+ if(responseType&&responseType!=='json'){request.responseType=config.responseType;}// Handle progress if needed
3981
+ if(typeof config.onDownloadProgress==='function'){request.addEventListener('progress',config.onDownloadProgress);}// Not all browsers support upload events
3982
+ if(typeof config.onUploadProgress==='function'&&request.upload){request.upload.addEventListener('progress',config.onUploadProgress);}if(config.cancelToken||config.signal){// Handle cancellation
3973
3983
  // eslint-disable-next-line func-names
3974
- onCanceled=function onCanceled(cancel){if(!request){return;}reject(!cancel||cancel&&cancel.type?new CanceledError():cancel);request.abort();request=null;};config.cancelToken&&config.cancelToken.subscribe(onCanceled);if(config.signal){config.signal.aborted?onCanceled():config.signal.addEventListener('abort',onCanceled);}}if(!requestData){requestData=null;}var protocol=parseProtocol(fullPath);if(protocol&&['http','https','file'].indexOf(protocol)===-1){reject(new AxiosError('Unsupported protocol '+protocol+':',AxiosError.ERR_BAD_REQUEST,config));return;}// Send the request
3975
- request.send(requestData);});};return xhr;}
3984
+ onCanceled=function onCanceled(cancel){if(!request){return;}reject(!cancel||cancel&&cancel.type?new CanceledError():cancel);request.abort();request=null;};config.cancelToken&&config.cancelToken.subscribe(onCanceled);if(config.signal){config.signal.aborted?onCanceled():config.signal.addEventListener('abort',onCanceled);}}if(!requestData){requestData=null;}var protocol=parseProtocol(fullPath);if(protocol&&['http','https','file'].indexOf(protocol)===-1){reject(new AxiosError('Unsupported protocol '+protocol+':',AxiosError.ERR_BAD_REQUEST,config));return;}// Send the request
3985
+ request.send(requestData);});};return xhr;}
3976
3986
 
3977
3987
  var _null;var hasRequired_null;function require_null(){if(hasRequired_null)return _null;hasRequired_null=1;// eslint-disable-next-line strict
3978
- _null=null;return _null;}
3988
+ _null=null;return _null;}
3979
3989
 
3980
3990
  var utils$5=utils$9;var normalizeHeaderName=normalizeHeaderName$1;var AxiosError$1=requireAxiosError();var transitionalDefaults=transitional;var toFormData=requireToFormData();var DEFAULT_CONTENT_TYPE={'Content-Type':'application/x-www-form-urlencoded'};function setContentTypeIfUnset(headers,value){if(!utils$5.isUndefined(headers)&&utils$5.isUndefined(headers['Content-Type'])){headers['Content-Type']=value;}}function getDefaultAdapter(){var adapter;if(typeof XMLHttpRequest!=='undefined'){// For browsers use XHR adapter
3981
- adapter=requireXhr();}else if(typeof browser$1!=='undefined'&&Object.prototype.toString.call(browser$1)==='[object process]'){// For node use HTTP adapter
3982
- adapter=requireXhr();}return adapter;}function stringifySafely(rawValue,parser,encoder){if(utils$5.isString(rawValue)){try{(parser||JSON.parse)(rawValue);return utils$5.trim(rawValue);}catch(e){if(e.name!=='SyntaxError'){throw e;}}}return (encoder||JSON.stringify)(rawValue);}var defaults$3={transitional:transitionalDefaults,adapter:getDefaultAdapter(),transformRequest:[function transformRequest(data,headers){normalizeHeaderName(headers,'Accept');normalizeHeaderName(headers,'Content-Type');if(utils$5.isFormData(data)||utils$5.isArrayBuffer(data)||utils$5.isBuffer(data)||utils$5.isStream(data)||utils$5.isFile(data)||utils$5.isBlob(data)){return data;}if(utils$5.isArrayBufferView(data)){return data.buffer;}if(utils$5.isURLSearchParams(data)){setContentTypeIfUnset(headers,'application/x-www-form-urlencoded;charset=utf-8');return data.toString();}var isObjectPayload=utils$5.isObject(data);var contentType=headers&&headers['Content-Type'];var isFileList;if((isFileList=utils$5.isFileList(data))||isObjectPayload&&contentType==='multipart/form-data'){var _FormData=this.env&&this.env.FormData;return toFormData(isFileList?{'files[]':data}:data,_FormData&&new _FormData());}else if(isObjectPayload||contentType==='application/json'){setContentTypeIfUnset(headers,'application/json');return stringifySafely(data);}return data;}],transformResponse:[function transformResponse(data){var transitional=this.transitional||defaults$3.transitional;var silentJSONParsing=transitional&&transitional.silentJSONParsing;var forcedJSONParsing=transitional&&transitional.forcedJSONParsing;var strictJSONParsing=!silentJSONParsing&&this.responseType==='json';if(strictJSONParsing||forcedJSONParsing&&utils$5.isString(data)&&data.length){try{return JSON.parse(data);}catch(e){if(strictJSONParsing){if(e.name==='SyntaxError'){throw AxiosError$1.from(e,AxiosError$1.ERR_BAD_RESPONSE,this,null,this.response);}throw e;}}}return data;}],/**
3991
+ adapter=requireXhr();}else if(typeof browser$1!=='undefined'&&Object.prototype.toString.call(browser$1)==='[object process]'){// For node use HTTP adapter
3992
+ adapter=requireXhr();}return adapter;}function stringifySafely(rawValue,parser,encoder){if(utils$5.isString(rawValue)){try{(parser||JSON.parse)(rawValue);return utils$5.trim(rawValue);}catch(e){if(e.name!=='SyntaxError'){throw e;}}}return (encoder||JSON.stringify)(rawValue);}var defaults$3={transitional:transitionalDefaults,adapter:getDefaultAdapter(),transformRequest:[function transformRequest(data,headers){normalizeHeaderName(headers,'Accept');normalizeHeaderName(headers,'Content-Type');if(utils$5.isFormData(data)||utils$5.isArrayBuffer(data)||utils$5.isBuffer(data)||utils$5.isStream(data)||utils$5.isFile(data)||utils$5.isBlob(data)){return data;}if(utils$5.isArrayBufferView(data)){return data.buffer;}if(utils$5.isURLSearchParams(data)){setContentTypeIfUnset(headers,'application/x-www-form-urlencoded;charset=utf-8');return data.toString();}var isObjectPayload=utils$5.isObject(data);var contentType=headers&&headers['Content-Type'];var isFileList;if((isFileList=utils$5.isFileList(data))||isObjectPayload&&contentType==='multipart/form-data'){var _FormData=this.env&&this.env.FormData;return toFormData(isFileList?{'files[]':data}:data,_FormData&&new _FormData());}else if(isObjectPayload||contentType==='application/json'){setContentTypeIfUnset(headers,'application/json');return stringifySafely(data);}return data;}],transformResponse:[function transformResponse(data){var transitional=this.transitional||defaults$3.transitional;var silentJSONParsing=transitional&&transitional.silentJSONParsing;var forcedJSONParsing=transitional&&transitional.forcedJSONParsing;var strictJSONParsing=!silentJSONParsing&&this.responseType==='json';if(strictJSONParsing||forcedJSONParsing&&utils$5.isString(data)&&data.length){try{return JSON.parse(data);}catch(e){if(strictJSONParsing){if(e.name==='SyntaxError'){throw AxiosError$1.from(e,AxiosError$1.ERR_BAD_RESPONSE,this,null,this.response);}throw e;}}}return data;}],/**
3983
3993
  * A timeout in milliseconds to abort a request. If set to 0 (default) a
3984
3994
  * timeout is not created.
3985
3995
  */timeout:0,xsrfCookieName:'XSRF-TOKEN',xsrfHeaderName:'X-XSRF-TOKEN',maxContentLength:-1,maxBodyLength:-1,env:{FormData:require_null()},validateStatus:function validateStatus(status){return status>=200&&status<300;},headers:{common:{'Accept':'application/json, text/plain, */*'}}};utils$5.forEach(['delete','get','head'],function forEachMethodNoData(method){defaults$3.headers[method]={};});utils$5.forEach(['post','put','patch'],function forEachMethodWithData(method){defaults$3.headers[method]=utils$5.merge(DEFAULT_CONTENT_TYPE);});var defaults_1=defaults$3;
@@ -4003,11 +4013,11 @@ var utils$3=utils$9;var transformData=transformData$1;var isCancel=requireIsCanc
4003
4013
  * @param {object} config The config that is to be used for the request
4004
4014
  * @returns {Promise} The Promise to be fulfilled
4005
4015
  */var dispatchRequest$1=function dispatchRequest(config){throwIfCancellationRequested(config);// Ensure headers exist
4006
- config.headers=config.headers||{};// Transform request data
4007
- config.data=transformData.call(config,config.data,config.headers,config.transformRequest);// Flatten headers
4008
- config.headers=utils$3.merge(config.headers.common||{},config.headers[config.method]||{},config.headers);utils$3.forEach(['delete','get','head','post','put','patch','common'],function cleanHeaderConfig(method){delete config.headers[method];});var adapter=config.adapter||defaults$1.adapter;return adapter(config).then(function onAdapterResolution(response){throwIfCancellationRequested(config);// Transform response data
4009
- response.data=transformData.call(config,response.data,response.headers,config.transformResponse);return response;},function onAdapterRejection(reason){if(!isCancel(reason)){throwIfCancellationRequested(config);// Transform response data
4010
- if(reason&&reason.response){reason.response.data=transformData.call(config,reason.response.data,reason.response.headers,config.transformResponse);}}return Promise.reject(reason);});};
4016
+ config.headers=config.headers||{};// Transform request data
4017
+ config.data=transformData.call(config,config.data,config.headers,config.transformRequest);// Flatten headers
4018
+ config.headers=utils$3.merge(config.headers.common||{},config.headers[config.method]||{},config.headers);utils$3.forEach(['delete','get','head','post','put','patch','common'],function cleanHeaderConfig(method){delete config.headers[method];});var adapter=config.adapter||defaults$1.adapter;return adapter(config).then(function onAdapterResolution(response){throwIfCancellationRequested(config);// Transform response data
4019
+ response.data=transformData.call(config,response.data,response.headers,config.transformResponse);return response;},function onAdapterRejection(reason){if(!isCancel(reason)){throwIfCancellationRequested(config);// Transform response data
4020
+ if(reason&&reason.response){reason.response.data=transformData.call(config,reason.response.data,reason.response.headers,config.transformResponse);}}return Promise.reject(reason);});};
4011
4021
 
4012
4022
  var utils$2=utils$9;/**
4013
4023
  * Config-specific merge-function which creates a new config-object
@@ -4017,11 +4027,11 @@ var utils$2=utils$9;/**
4017
4027
  * @param {Object} config2
4018
4028
  * @returns {Object} New object resulting from merging config2 to config1
4019
4029
  */var mergeConfig$2=function mergeConfig(config1,config2){// eslint-disable-next-line no-param-reassign
4020
- config2=config2||{};var config={};function getMergedValue(target,source){if(utils$2.isPlainObject(target)&&utils$2.isPlainObject(source)){return utils$2.merge(target,source);}else if(utils$2.isPlainObject(source)){return utils$2.merge({},source);}else if(utils$2.isArray(source)){return source.slice();}return source;}// eslint-disable-next-line consistent-return
4021
- function mergeDeepProperties(prop){if(!utils$2.isUndefined(config2[prop])){return getMergedValue(config1[prop],config2[prop]);}else if(!utils$2.isUndefined(config1[prop])){return getMergedValue(undefined,config1[prop]);}}// eslint-disable-next-line consistent-return
4022
- function valueFromConfig2(prop){if(!utils$2.isUndefined(config2[prop])){return getMergedValue(undefined,config2[prop]);}}// eslint-disable-next-line consistent-return
4023
- function defaultToConfig2(prop){if(!utils$2.isUndefined(config2[prop])){return getMergedValue(undefined,config2[prop]);}else if(!utils$2.isUndefined(config1[prop])){return getMergedValue(undefined,config1[prop]);}}// eslint-disable-next-line consistent-return
4024
- function mergeDirectKeys(prop){if(prop in config2){return getMergedValue(config1[prop],config2[prop]);}else if(prop in config1){return getMergedValue(undefined,config1[prop]);}}var mergeMap={'url':valueFromConfig2,'method':valueFromConfig2,'data':valueFromConfig2,'baseURL':defaultToConfig2,'transformRequest':defaultToConfig2,'transformResponse':defaultToConfig2,'paramsSerializer':defaultToConfig2,'timeout':defaultToConfig2,'timeoutMessage':defaultToConfig2,'withCredentials':defaultToConfig2,'adapter':defaultToConfig2,'responseType':defaultToConfig2,'xsrfCookieName':defaultToConfig2,'xsrfHeaderName':defaultToConfig2,'onUploadProgress':defaultToConfig2,'onDownloadProgress':defaultToConfig2,'decompress':defaultToConfig2,'maxContentLength':defaultToConfig2,'maxBodyLength':defaultToConfig2,'beforeRedirect':defaultToConfig2,'transport':defaultToConfig2,'httpAgent':defaultToConfig2,'httpsAgent':defaultToConfig2,'cancelToken':defaultToConfig2,'socketPath':defaultToConfig2,'responseEncoding':defaultToConfig2,'validateStatus':mergeDirectKeys};utils$2.forEach(Object.keys(config1).concat(Object.keys(config2)),function computeConfigValue(prop){var merge=mergeMap[prop]||mergeDeepProperties;var configValue=merge(prop);utils$2.isUndefined(configValue)&&merge!==mergeDirectKeys||(config[prop]=configValue);});return config;};
4030
+ config2=config2||{};var config={};function getMergedValue(target,source){if(utils$2.isPlainObject(target)&&utils$2.isPlainObject(source)){return utils$2.merge(target,source);}else if(utils$2.isPlainObject(source)){return utils$2.merge({},source);}else if(utils$2.isArray(source)){return source.slice();}return source;}// eslint-disable-next-line consistent-return
4031
+ function mergeDeepProperties(prop){if(!utils$2.isUndefined(config2[prop])){return getMergedValue(config1[prop],config2[prop]);}else if(!utils$2.isUndefined(config1[prop])){return getMergedValue(undefined,config1[prop]);}}// eslint-disable-next-line consistent-return
4032
+ function valueFromConfig2(prop){if(!utils$2.isUndefined(config2[prop])){return getMergedValue(undefined,config2[prop]);}}// eslint-disable-next-line consistent-return
4033
+ function defaultToConfig2(prop){if(!utils$2.isUndefined(config2[prop])){return getMergedValue(undefined,config2[prop]);}else if(!utils$2.isUndefined(config1[prop])){return getMergedValue(undefined,config1[prop]);}}// eslint-disable-next-line consistent-return
4034
+ function mergeDirectKeys(prop){if(prop in config2){return getMergedValue(config1[prop],config2[prop]);}else if(prop in config1){return getMergedValue(undefined,config1[prop]);}}var mergeMap={'url':valueFromConfig2,'method':valueFromConfig2,'data':valueFromConfig2,'baseURL':defaultToConfig2,'transformRequest':defaultToConfig2,'transformResponse':defaultToConfig2,'paramsSerializer':defaultToConfig2,'timeout':defaultToConfig2,'timeoutMessage':defaultToConfig2,'withCredentials':defaultToConfig2,'adapter':defaultToConfig2,'responseType':defaultToConfig2,'xsrfCookieName':defaultToConfig2,'xsrfHeaderName':defaultToConfig2,'onUploadProgress':defaultToConfig2,'onDownloadProgress':defaultToConfig2,'decompress':defaultToConfig2,'maxContentLength':defaultToConfig2,'maxBodyLength':defaultToConfig2,'beforeRedirect':defaultToConfig2,'transport':defaultToConfig2,'httpAgent':defaultToConfig2,'httpsAgent':defaultToConfig2,'cancelToken':defaultToConfig2,'socketPath':defaultToConfig2,'responseEncoding':defaultToConfig2,'validateStatus':mergeDirectKeys};utils$2.forEach(Object.keys(config1).concat(Object.keys(config2)),function computeConfigValue(prop){var merge=mergeMap[prop]||mergeDeepProperties;var configValue=merge(prop);utils$2.isUndefined(configValue)&&merge!==mergeDirectKeys||(config[prop]=configValue);});return config;};
4025
4035
 
4026
4036
  var data;var hasRequiredData;function requireData(){if(hasRequiredData)return data;hasRequiredData=1;data={"version":"0.27.2"};return data;}
4027
4037
 
@@ -4033,8 +4043,8 @@ var VERSION=requireData().version;var AxiosError=requireAxiosError();var validat
4033
4043
  * @param {string?} message - some message with additional info
4034
4044
  * @returns {function}
4035
4045
  */validators$1.transitional=function transitional(validator,version,message){function formatMessage(opt,desc){return '[Axios v'+VERSION+'] Transitional option \''+opt+'\''+desc+(message?'. '+message:'');}// eslint-disable-next-line func-names
4036
- return function(value,opt,opts){if(validator===false){throw new AxiosError(formatMessage(opt,' has been removed'+(version?' in '+version:'')),AxiosError.ERR_DEPRECATED);}if(version&&!deprecatedWarnings[opt]){deprecatedWarnings[opt]=true;// eslint-disable-next-line no-console
4037
- console.warn(formatMessage(opt,' has been deprecated since v'+version+' and will be removed in the near future'));}return validator?validator(value,opt,opts):true;};};/**
4046
+ return function(value,opt,opts){if(validator===false){throw new AxiosError(formatMessage(opt,' has been removed'+(version?' in '+version:'')),AxiosError.ERR_DEPRECATED);}if(version&&!deprecatedWarnings[opt]){deprecatedWarnings[opt]=true;// eslint-disable-next-line no-console
4047
+ console.warn(formatMessage(opt,' has been deprecated since v'+version+' and will be removed in the near future'));}return validator?validator(value,opt,opts):true;};};/**
4038
4048
  * Assert object's properties type
4039
4049
  * @param {object} options
4040
4050
  * @param {object} schema
@@ -4050,58 +4060,58 @@ var utils$1=utils$9;var buildURL=buildURL$1;var InterceptorManager=InterceptorMa
4050
4060
  *
4051
4061
  * @param {Object} config The config specific for this request (merged with this.defaults)
4052
4062
  */Axios$1.prototype.request=function request(configOrUrl,config){/*eslint no-param-reassign:0*/ // Allow for axios('example/url'[, config]) a la fetch API
4053
- if(typeof configOrUrl==='string'){config=config||{};config.url=configOrUrl;}else {config=configOrUrl||{};}config=mergeConfig$1(this.defaults,config);// Set config.method
4054
- if(config.method){config.method=config.method.toLowerCase();}else if(this.defaults.method){config.method=this.defaults.method.toLowerCase();}else {config.method='get';}var transitional=config.transitional;if(transitional!==undefined){validator.assertOptions(transitional,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},false);}// filter out skipped interceptors
4055
- var requestInterceptorChain=[];var synchronousRequestInterceptors=true;this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor){if(typeof interceptor.runWhen==='function'&&interceptor.runWhen(config)===false){return;}synchronousRequestInterceptors=synchronousRequestInterceptors&&interceptor.synchronous;requestInterceptorChain.unshift(interceptor.fulfilled,interceptor.rejected);});var responseInterceptorChain=[];this.interceptors.response.forEach(function pushResponseInterceptors(interceptor){responseInterceptorChain.push(interceptor.fulfilled,interceptor.rejected);});var promise;if(!synchronousRequestInterceptors){var chain=[dispatchRequest,undefined];Array.prototype.unshift.apply(chain,requestInterceptorChain);chain=chain.concat(responseInterceptorChain);promise=Promise.resolve(config);while(chain.length){promise=promise.then(chain.shift(),chain.shift());}return promise;}var newConfig=config;while(requestInterceptorChain.length){var onFulfilled=requestInterceptorChain.shift();var onRejected=requestInterceptorChain.shift();try{newConfig=onFulfilled(newConfig);}catch(error){onRejected(error);break;}}try{promise=dispatchRequest(newConfig);}catch(error){return Promise.reject(error);}while(responseInterceptorChain.length){promise=promise.then(responseInterceptorChain.shift(),responseInterceptorChain.shift());}return promise;};Axios$1.prototype.getUri=function getUri(config){config=mergeConfig$1(this.defaults,config);var fullPath=buildFullPath(config.baseURL,config.url);return buildURL(fullPath,config.params,config.paramsSerializer);};// Provide aliases for supported request methods
4063
+ if(typeof configOrUrl==='string'){config=config||{};config.url=configOrUrl;}else {config=configOrUrl||{};}config=mergeConfig$1(this.defaults,config);// Set config.method
4064
+ if(config.method){config.method=config.method.toLowerCase();}else if(this.defaults.method){config.method=this.defaults.method.toLowerCase();}else {config.method='get';}var transitional=config.transitional;if(transitional!==undefined){validator.assertOptions(transitional,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},false);}// filter out skipped interceptors
4065
+ var requestInterceptorChain=[];var synchronousRequestInterceptors=true;this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor){if(typeof interceptor.runWhen==='function'&&interceptor.runWhen(config)===false){return;}synchronousRequestInterceptors=synchronousRequestInterceptors&&interceptor.synchronous;requestInterceptorChain.unshift(interceptor.fulfilled,interceptor.rejected);});var responseInterceptorChain=[];this.interceptors.response.forEach(function pushResponseInterceptors(interceptor){responseInterceptorChain.push(interceptor.fulfilled,interceptor.rejected);});var promise;if(!synchronousRequestInterceptors){var chain=[dispatchRequest,undefined];Array.prototype.unshift.apply(chain,requestInterceptorChain);chain=chain.concat(responseInterceptorChain);promise=Promise.resolve(config);while(chain.length){promise=promise.then(chain.shift(),chain.shift());}return promise;}var newConfig=config;while(requestInterceptorChain.length){var onFulfilled=requestInterceptorChain.shift();var onRejected=requestInterceptorChain.shift();try{newConfig=onFulfilled(newConfig);}catch(error){onRejected(error);break;}}try{promise=dispatchRequest(newConfig);}catch(error){return Promise.reject(error);}while(responseInterceptorChain.length){promise=promise.then(responseInterceptorChain.shift(),responseInterceptorChain.shift());}return promise;};Axios$1.prototype.getUri=function getUri(config){config=mergeConfig$1(this.defaults,config);var fullPath=buildFullPath(config.baseURL,config.url);return buildURL(fullPath,config.params,config.paramsSerializer);};// Provide aliases for supported request methods
4056
4066
  utils$1.forEach(['delete','get','head','options'],function forEachMethodNoData(method){/*eslint func-names:0*/Axios$1.prototype[method]=function(url,config){return this.request(mergeConfig$1(config||{},{method:method,url:url,data:(config||{}).data}));};});utils$1.forEach(['post','put','patch'],function forEachMethodWithData(method){/*eslint func-names:0*/function generateHTTPMethod(isForm){return function httpMethod(url,data,config){return this.request(mergeConfig$1(config||{},{method:method,headers:isForm?{'Content-Type':'multipart/form-data'}:{},url:url,data:data}));};}Axios$1.prototype[method]=generateHTTPMethod();Axios$1.prototype[method+'Form']=generateHTTPMethod(true);});var Axios_1=Axios$1;
4057
4067
 
4058
4068
  var CancelToken_1;var hasRequiredCancelToken;function requireCancelToken(){if(hasRequiredCancelToken)return CancelToken_1;hasRequiredCancelToken=1;var CanceledError=requireCanceledError();/**
4059
- * A `CancelToken` is an object that can be used to request cancellation of an operation.
4060
- *
4061
- * @class
4062
- * @param {Function} executor The executor function.
4063
- */function CancelToken(executor){if(typeof executor!=='function'){throw new TypeError('executor must be a function.');}var resolvePromise;this.promise=new Promise(function promiseExecutor(resolve){resolvePromise=resolve;});var token=this;// eslint-disable-next-line func-names
4064
- this.promise.then(function(cancel){if(!token._listeners)return;var i;var l=token._listeners.length;for(i=0;i<l;i++){token._listeners[i](cancel);}token._listeners=null;});// eslint-disable-next-line func-names
4065
- this.promise.then=function(onfulfilled){var _resolve;// eslint-disable-next-line func-names
4066
- var promise=new Promise(function(resolve){token.subscribe(resolve);_resolve=resolve;}).then(onfulfilled);promise.cancel=function reject(){token.unsubscribe(_resolve);};return promise;};executor(function cancel(message){if(token.reason){// Cancellation has already been requested
4067
- return;}token.reason=new CanceledError(message);resolvePromise(token.reason);});}/**
4068
- * Throws a `CanceledError` if cancellation has been requested.
4069
- */CancelToken.prototype.throwIfRequested=function throwIfRequested(){if(this.reason){throw this.reason;}};/**
4070
- * Subscribe to the cancel signal
4071
- */CancelToken.prototype.subscribe=function subscribe(listener){if(this.reason){listener(this.reason);return;}if(this._listeners){this._listeners.push(listener);}else {this._listeners=[listener];}};/**
4072
- * Unsubscribe from the cancel signal
4073
- */CancelToken.prototype.unsubscribe=function unsubscribe(listener){if(!this._listeners){return;}var index=this._listeners.indexOf(listener);if(index!==-1){this._listeners.splice(index,1);}};/**
4074
- * Returns an object that contains a new `CancelToken` and a function that, when called,
4075
- * cancels the `CancelToken`.
4076
- */CancelToken.source=function source(){var cancel;var token=new CancelToken(function executor(c){cancel=c;});return {token:token,cancel:cancel};};CancelToken_1=CancelToken;return CancelToken_1;}
4069
+ * A `CancelToken` is an object that can be used to request cancellation of an operation.
4070
+ *
4071
+ * @class
4072
+ * @param {Function} executor The executor function.
4073
+ */function CancelToken(executor){if(typeof executor!=='function'){throw new TypeError('executor must be a function.');}var resolvePromise;this.promise=new Promise(function promiseExecutor(resolve){resolvePromise=resolve;});var token=this;// eslint-disable-next-line func-names
4074
+ this.promise.then(function(cancel){if(!token._listeners)return;var i;var l=token._listeners.length;for(i=0;i<l;i++){token._listeners[i](cancel);}token._listeners=null;});// eslint-disable-next-line func-names
4075
+ this.promise.then=function(onfulfilled){var _resolve;// eslint-disable-next-line func-names
4076
+ var promise=new Promise(function(resolve){token.subscribe(resolve);_resolve=resolve;}).then(onfulfilled);promise.cancel=function reject(){token.unsubscribe(_resolve);};return promise;};executor(function cancel(message){if(token.reason){// Cancellation has already been requested
4077
+ return;}token.reason=new CanceledError(message);resolvePromise(token.reason);});}/**
4078
+ * Throws a `CanceledError` if cancellation has been requested.
4079
+ */CancelToken.prototype.throwIfRequested=function throwIfRequested(){if(this.reason){throw this.reason;}};/**
4080
+ * Subscribe to the cancel signal
4081
+ */CancelToken.prototype.subscribe=function subscribe(listener){if(this.reason){listener(this.reason);return;}if(this._listeners){this._listeners.push(listener);}else {this._listeners=[listener];}};/**
4082
+ * Unsubscribe from the cancel signal
4083
+ */CancelToken.prototype.unsubscribe=function unsubscribe(listener){if(!this._listeners){return;}var index=this._listeners.indexOf(listener);if(index!==-1){this._listeners.splice(index,1);}};/**
4084
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
4085
+ * cancels the `CancelToken`.
4086
+ */CancelToken.source=function source(){var cancel;var token=new CancelToken(function executor(c){cancel=c;});return {token:token,cancel:cancel};};CancelToken_1=CancelToken;return CancelToken_1;}
4077
4087
 
4078
4088
  var spread;var hasRequiredSpread;function requireSpread(){if(hasRequiredSpread)return spread;hasRequiredSpread=1;/**
4079
- * Syntactic sugar for invoking a function and expanding an array for arguments.
4080
- *
4081
- * Common use case would be to use `Function.prototype.apply`.
4082
- *
4083
- * ```js
4084
- * function f(x, y, z) {}
4085
- * var args = [1, 2, 3];
4086
- * f.apply(null, args);
4087
- * ```
4088
- *
4089
- * With `spread` this example can be re-written.
4090
- *
4091
- * ```js
4092
- * spread(function(x, y, z) {})([1, 2, 3]);
4093
- * ```
4094
- *
4095
- * @param {Function} callback
4096
- * @returns {Function}
4097
- */spread=function spread(callback){return function wrap(arr){return callback.apply(null,arr);};};return spread;}
4089
+ * Syntactic sugar for invoking a function and expanding an array for arguments.
4090
+ *
4091
+ * Common use case would be to use `Function.prototype.apply`.
4092
+ *
4093
+ * ```js
4094
+ * function f(x, y, z) {}
4095
+ * var args = [1, 2, 3];
4096
+ * f.apply(null, args);
4097
+ * ```
4098
+ *
4099
+ * With `spread` this example can be re-written.
4100
+ *
4101
+ * ```js
4102
+ * spread(function(x, y, z) {})([1, 2, 3]);
4103
+ * ```
4104
+ *
4105
+ * @param {Function} callback
4106
+ * @returns {Function}
4107
+ */spread=function spread(callback){return function wrap(arr){return callback.apply(null,arr);};};return spread;}
4098
4108
 
4099
4109
  var isAxiosError;var hasRequiredIsAxiosError;function requireIsAxiosError(){if(hasRequiredIsAxiosError)return isAxiosError;hasRequiredIsAxiosError=1;var utils=utils$9;/**
4100
- * Determines whether the payload is an error thrown by Axios
4101
- *
4102
- * @param {*} payload The value to test
4103
- * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
4104
- */isAxiosError=function isAxiosError(payload){return utils.isObject(payload)&&payload.isAxiosError===true;};return isAxiosError;}
4110
+ * Determines whether the payload is an error thrown by Axios
4111
+ *
4112
+ * @param {*} payload The value to test
4113
+ * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
4114
+ */isAxiosError=function isAxiosError(payload){return utils.isObject(payload)&&payload.isAxiosError===true;};return isAxiosError;}
4105
4115
 
4106
4116
  var utils=utils$9;var bind=bind$2;var Axios=Axios_1;var mergeConfig=mergeConfig$2;var defaults=defaults_1;/**
4107
4117
  * Create an instance of Axios
@@ -4109,30 +4119,30 @@ var utils=utils$9;var bind=bind$2;var Axios=Axios_1;var mergeConfig=mergeConfig$
4109
4119
  * @param {Object} defaultConfig The default config for the instance
4110
4120
  * @return {Axios} A new instance of Axios
4111
4121
  */function createInstance(defaultConfig){var context=new Axios(defaultConfig);var instance=bind(Axios.prototype.request,context);// Copy axios.prototype to instance
4112
- utils.extend(instance,Axios.prototype,context);// Copy context to instance
4113
- utils.extend(instance,context);// Factory for creating new instances
4114
- instance.create=function create(instanceConfig){return createInstance(mergeConfig(defaultConfig,instanceConfig));};return instance;}// Create the default instance to be exported
4115
- var axios$2=createInstance(defaults);// Expose Axios class to allow class inheritance
4116
- axios$2.Axios=Axios;// Expose Cancel & CancelToken
4117
- axios$2.CanceledError=requireCanceledError();axios$2.CancelToken=requireCancelToken();axios$2.isCancel=requireIsCancel();axios$2.VERSION=requireData().version;axios$2.toFormData=requireToFormData();// Expose AxiosError class
4118
- axios$2.AxiosError=requireAxiosError();// alias for CanceledError for backward compatibility
4119
- axios$2.Cancel=axios$2.CanceledError;// Expose all/spread
4120
- axios$2.all=function all(promises){return Promise.all(promises);};axios$2.spread=requireSpread();// Expose isAxiosError
4121
- axios$2.isAxiosError=requireIsAxiosError();axios$3.exports=axios$2;// Allow use of default import syntax in TypeScript
4122
- axios$3.exports.default=axios$2;var axiosExports=axios$3.exports;
4123
-
4124
- var axios=axiosExports;var axios$1 = /*@__PURE__*/getDefaultExportFromCjs(axios);
4122
+ utils.extend(instance,Axios.prototype,context);// Copy context to instance
4123
+ utils.extend(instance,context);// Factory for creating new instances
4124
+ instance.create=function create(instanceConfig){return createInstance(mergeConfig(defaultConfig,instanceConfig));};return instance;}// Create the default instance to be exported
4125
+ var axios$1=createInstance(defaults);// Expose Axios class to allow class inheritance
4126
+ axios$1.Axios=Axios;// Expose Cancel & CancelToken
4127
+ axios$1.CanceledError=requireCanceledError();axios$1.CancelToken=requireCancelToken();axios$1.isCancel=requireIsCancel();axios$1.VERSION=requireData().version;axios$1.toFormData=requireToFormData();// Expose AxiosError class
4128
+ axios$1.AxiosError=requireAxiosError();// alias for CanceledError for backward compatibility
4129
+ axios$1.Cancel=axios$1.CanceledError;// Expose all/spread
4130
+ axios$1.all=function all(promises){return Promise.all(promises);};axios$1.spread=requireSpread();// Expose isAxiosError
4131
+ axios$1.isAxiosError=requireIsAxiosError();axios$2.exports=axios$1;// Allow use of default import syntax in TypeScript
4132
+ axiosExports.default=axios$1;
4133
+
4134
+ (function(module){module.exports=axiosExports;})(axios$3);var axios = /*@__PURE__*/getDefaultExportFromCjs(axiosExports$1);
4125
4135
 
4126
4136
  var denyList=new Set(['ENOTFOUND','ENETUNREACH',// SSL errors from https://github.com/nodejs/node/blob/fc8e3e2cdc521978351de257030db0076d79e0ab/src/crypto/crypto_common.cc#L301-L328
4127
- 'UNABLE_TO_GET_ISSUER_CERT','UNABLE_TO_GET_CRL','UNABLE_TO_DECRYPT_CERT_SIGNATURE','UNABLE_TO_DECRYPT_CRL_SIGNATURE','UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY','CERT_SIGNATURE_FAILURE','CRL_SIGNATURE_FAILURE','CERT_NOT_YET_VALID','CERT_HAS_EXPIRED','CRL_NOT_YET_VALID','CRL_HAS_EXPIRED','ERROR_IN_CERT_NOT_BEFORE_FIELD','ERROR_IN_CERT_NOT_AFTER_FIELD','ERROR_IN_CRL_LAST_UPDATE_FIELD','ERROR_IN_CRL_NEXT_UPDATE_FIELD','OUT_OF_MEM','DEPTH_ZERO_SELF_SIGNED_CERT','SELF_SIGNED_CERT_IN_CHAIN','UNABLE_TO_GET_ISSUER_CERT_LOCALLY','UNABLE_TO_VERIFY_LEAF_SIGNATURE','CERT_CHAIN_TOO_LONG','CERT_REVOKED','INVALID_CA','PATH_LENGTH_EXCEEDED','INVALID_PURPOSE','CERT_UNTRUSTED','CERT_REJECTED','HOSTNAME_MISMATCH']);// TODO: Use `error?.code` when targeting Node.js 14
4128
- var isRetryAllowed=function isRetryAllowed(error){return !denyList.has(error&&error.code);};var isRetryAllowed$1 = /*@__PURE__*/getDefaultExportFromCjs(isRetryAllowed);
4137
+ 'UNABLE_TO_GET_ISSUER_CERT','UNABLE_TO_GET_CRL','UNABLE_TO_DECRYPT_CERT_SIGNATURE','UNABLE_TO_DECRYPT_CRL_SIGNATURE','UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY','CERT_SIGNATURE_FAILURE','CRL_SIGNATURE_FAILURE','CERT_NOT_YET_VALID','CERT_HAS_EXPIRED','CRL_NOT_YET_VALID','CRL_HAS_EXPIRED','ERROR_IN_CERT_NOT_BEFORE_FIELD','ERROR_IN_CERT_NOT_AFTER_FIELD','ERROR_IN_CRL_LAST_UPDATE_FIELD','ERROR_IN_CRL_NEXT_UPDATE_FIELD','OUT_OF_MEM','DEPTH_ZERO_SELF_SIGNED_CERT','SELF_SIGNED_CERT_IN_CHAIN','UNABLE_TO_GET_ISSUER_CERT_LOCALLY','UNABLE_TO_VERIFY_LEAF_SIGNATURE','CERT_CHAIN_TOO_LONG','CERT_REVOKED','INVALID_CA','PATH_LENGTH_EXCEEDED','INVALID_PURPOSE','CERT_UNTRUSTED','CERT_REJECTED','HOSTNAME_MISMATCH']);// TODO: Use `error?.code` when targeting Node.js 14
4138
+ var isRetryAllowed=function isRetryAllowed(error){return !denyList.has(error&&error.code);};
4129
4139
 
4130
4140
  function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else {Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly){symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});}keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(Object(source),true).forEach(function(key){_defineProperty(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else {ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else {obj[key]=value;}return obj;}var namespace='axios-retry';/**
4131
4141
  * @param {Error} error
4132
4142
  * @return {boolean}
4133
4143
  */function isNetworkError(error){return !error.response&&Boolean(error.code)&&// Prevents retrying cancelled requests
4134
- error.code!=='ECONNABORTED'&&// Prevents retrying timed out requests
4135
- isRetryAllowed$1(error);// Prevents retrying unsafe errors
4144
+ error.code!=='ECONNABORTED'&&// Prevents retrying timed out requests
4145
+ isRetryAllowed(error);// Prevents retrying unsafe errors
4136
4146
  }var SAFE_HTTP_METHODS=['get','head','options'];var IDEMPOTENT_HTTP_METHODS=SAFE_HTTP_METHODS.concat(['put','delete']);/**
4137
4147
  * @param {Error} error
4138
4148
  * @return {boolean}
@@ -4140,24 +4150,20 @@ isRetryAllowed$1(error);// Prevents retrying unsafe errors
4140
4150
  * @param {Error} error
4141
4151
  * @return {boolean}
4142
4152
  */function isSafeRequestError(error){if(!error.config){// Cannot determine if the request can be retried
4143
- return false;}return isRetryableError(error)&&SAFE_HTTP_METHODS.indexOf(error.config.method)!==-1;}/**
4153
+ return false;}return isRetryableError(error)&&SAFE_HTTP_METHODS.indexOf(error.config.method)!==-1;}/**
4144
4154
  * @param {Error} error
4145
4155
  * @return {boolean}
4146
4156
  */function isIdempotentRequestError(error){if(!error.config){// Cannot determine if the request can be retried
4147
- return false;}return isRetryableError(error)&&IDEMPOTENT_HTTP_METHODS.indexOf(error.config.method)!==-1;}/**
4157
+ return false;}return isRetryableError(error)&&IDEMPOTENT_HTTP_METHODS.indexOf(error.config.method)!==-1;}/**
4148
4158
  * @param {Error} error
4149
4159
  * @return {boolean}
4150
4160
  */function isNetworkOrIdempotentRequestError(error){return isNetworkError(error)||isIdempotentRequestError(error);}/**
4151
4161
  * @return {number} - delay in milliseconds, always 0
4152
4162
  */function noDelay(){return 0;}/**
4153
- * Set delayFactor 1000 for an exponential delay to occur on the order
4154
- * of seconds
4155
4163
  * @param {number} [retryNumber=0]
4156
- * @param {Error} error - unused; for existing API of retryDelay callback
4157
- * @param {number} [delayFactor=100] milliseconds
4158
4164
  * @return {number} - delay in milliseconds
4159
- */function exponentialDelay(){var retryNumber=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;var delayFactor=arguments.length>2&&arguments[2]!==undefined?arguments[2]:100;var delay=Math.pow(2,retryNumber)*delayFactor;var randomSum=delay*0.2*Math.random();// 0-20% of the delay
4160
- return delay+randomSum;}/**
4165
+ */function exponentialDelay(){var retryNumber=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;var delay=Math.pow(2,retryNumber)*100;var randomSum=delay*0.2*Math.random();// 0-20% of the delay
4166
+ return delay+randomSum;}/**
4161
4167
  * Initializes and returns the retry state for the given request/config
4162
4168
  * @param {AxiosRequestConfig} config
4163
4169
  * @return {Object}
@@ -4230,10 +4236,10 @@ return delay+randomSum;}/**
4230
4236
  * @param {Function} [defaultOptions.onRetry=()=>{}]
4231
4237
  * A function to get notified when a retry occurs
4232
4238
  */function _shouldRetry(){_shouldRetry=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(retries,retryCondition,currentState,error){var shouldRetryOrPromise,shouldRetryPromiseResult;return _regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:shouldRetryOrPromise=currentState.retryCount<retries&&retryCondition(error);// This could be a promise
4233
- if(!(_typeof(shouldRetryOrPromise)==='object')){_context.next=12;break;}_context.prev=2;_context.next=5;return shouldRetryOrPromise;case 5:shouldRetryPromiseResult=_context.sent;return _context.abrupt("return",shouldRetryPromiseResult!==false);case 9:_context.prev=9;_context.t0=_context["catch"](2);return _context.abrupt("return",false);case 12:return _context.abrupt("return",shouldRetryOrPromise);case 13:case"end":return _context.stop();}},_callee,null,[[2,9]]);}));return _shouldRetry.apply(this,arguments);}function axiosRetry(axios,defaultOptions){axios.interceptors.request.use(function(config){var currentState=getCurrentState(config);currentState.lastRequestTime=Date.now();return config;});axios.interceptors.response.use(null,/*#__PURE__*/function(){var _ref=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(error){var config,_getRequestOptions,_getRequestOptions$re,retries,_getRequestOptions$re2,retryCondition,_getRequestOptions$re3,retryDelay,_getRequestOptions$sh,shouldResetTimeout,_getRequestOptions$on,onRetry,currentState,delay,lastRequestDuration,timeout;return _regeneratorRuntime().wrap(function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:config=error.config;// If we have no information to retry the request
4234
- if(config){_context2.next=3;break;}return _context2.abrupt("return",Promise.reject(error));case 3:_getRequestOptions=getRequestOptions(config,defaultOptions),_getRequestOptions$re=_getRequestOptions.retries,retries=_getRequestOptions$re===void 0?3:_getRequestOptions$re,_getRequestOptions$re2=_getRequestOptions.retryCondition,retryCondition=_getRequestOptions$re2===void 0?isNetworkOrIdempotentRequestError:_getRequestOptions$re2,_getRequestOptions$re3=_getRequestOptions.retryDelay,retryDelay=_getRequestOptions$re3===void 0?noDelay:_getRequestOptions$re3,_getRequestOptions$sh=_getRequestOptions.shouldResetTimeout,shouldResetTimeout=_getRequestOptions$sh===void 0?false:_getRequestOptions$sh,_getRequestOptions$on=_getRequestOptions.onRetry,onRetry=_getRequestOptions$on===void 0?function(){}:_getRequestOptions$on;currentState=getCurrentState(config);_context2.next=7;return shouldRetry(retries,retryCondition,currentState,error);case 7:if(!_context2.sent){_context2.next=20;break;}currentState.retryCount+=1;delay=retryDelay(currentState.retryCount,error);// Axios fails merging this configuration to the default configuration because it has an issue
4239
+ if(!(_typeof(shouldRetryOrPromise)==='object')){_context.next=12;break;}_context.prev=2;_context.next=5;return shouldRetryOrPromise;case 5:shouldRetryPromiseResult=_context.sent;return _context.abrupt("return",shouldRetryPromiseResult!==false);case 9:_context.prev=9;_context.t0=_context["catch"](2);return _context.abrupt("return",false);case 12:return _context.abrupt("return",shouldRetryOrPromise);case 13:case"end":return _context.stop();}},_callee,null,[[2,9]]);}));return _shouldRetry.apply(this,arguments);}function axiosRetry(axios,defaultOptions){axios.interceptors.request.use(function(config){var currentState=getCurrentState(config);currentState.lastRequestTime=Date.now();return config;});axios.interceptors.response.use(null,/*#__PURE__*/function(){var _ref=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(error){var config,_getRequestOptions,_getRequestOptions$re,retries,_getRequestOptions$re2,retryCondition,_getRequestOptions$re3,retryDelay,_getRequestOptions$sh,shouldResetTimeout,_getRequestOptions$on,onRetry,currentState,delay,lastRequestDuration,timeout;return _regeneratorRuntime().wrap(function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:config=error.config;// If we have no information to retry the request
4240
+ if(config){_context2.next=3;break;}return _context2.abrupt("return",Promise.reject(error));case 3:_getRequestOptions=getRequestOptions(config,defaultOptions),_getRequestOptions$re=_getRequestOptions.retries,retries=_getRequestOptions$re===void 0?3:_getRequestOptions$re,_getRequestOptions$re2=_getRequestOptions.retryCondition,retryCondition=_getRequestOptions$re2===void 0?isNetworkOrIdempotentRequestError:_getRequestOptions$re2,_getRequestOptions$re3=_getRequestOptions.retryDelay,retryDelay=_getRequestOptions$re3===void 0?noDelay:_getRequestOptions$re3,_getRequestOptions$sh=_getRequestOptions.shouldResetTimeout,shouldResetTimeout=_getRequestOptions$sh===void 0?false:_getRequestOptions$sh,_getRequestOptions$on=_getRequestOptions.onRetry,onRetry=_getRequestOptions$on===void 0?function(){}:_getRequestOptions$on;currentState=getCurrentState(config);_context2.next=7;return shouldRetry(retries,retryCondition,currentState,error);case 7:if(!_context2.sent){_context2.next=20;break;}currentState.retryCount+=1;delay=retryDelay(currentState.retryCount,error);// Axios fails merging this configuration to the default configuration because it has an issue
4235
4241
  // with circular structures: https://github.com/mzabriskie/axios/issues/370
4236
- fixConfig(axios,config);if(!(!shouldResetTimeout&&config.timeout&&currentState.lastRequestTime)){_context2.next=17;break;}lastRequestDuration=Date.now()-currentState.lastRequestTime;timeout=config.timeout-lastRequestDuration-delay;if(!(timeout<=0)){_context2.next=16;break;}return _context2.abrupt("return",Promise.reject(error));case 16:config.timeout=timeout;case 17:config.transformRequest=[function(data){return data;}];onRetry(currentState.retryCount,error,config);return _context2.abrupt("return",new Promise(function(resolve){return setTimeout(function(){return resolve(axios(config));},delay);}));case 20:return _context2.abrupt("return",Promise.reject(error));case 21:case"end":return _context2.stop();}},_callee2);}));return function(_x5){return _ref.apply(this,arguments);};}());}// Compatibility with CommonJS
4242
+ fixConfig(axios,config);if(!(!shouldResetTimeout&&config.timeout&&currentState.lastRequestTime)){_context2.next=17;break;}lastRequestDuration=Date.now()-currentState.lastRequestTime;timeout=config.timeout-lastRequestDuration-delay;if(!(timeout<=0)){_context2.next=16;break;}return _context2.abrupt("return",Promise.reject(error));case 16:config.timeout=timeout;case 17:config.transformRequest=[function(data){return data;}];onRetry(currentState.retryCount,error,config);return _context2.abrupt("return",new Promise(function(resolve){return setTimeout(function(){return resolve(axios(config));},delay);}));case 20:return _context2.abrupt("return",Promise.reject(error));case 21:case"end":return _context2.stop();}},_callee2);}));return function(_x5){return _ref.apply(this,arguments);};}());}// Compatibility with CommonJS
4237
4243
  axiosRetry.isNetworkError=isNetworkError;axiosRetry.isSafeRequestError=isSafeRequestError;axiosRetry.isIdempotentRequestError=isIdempotentRequestError;axiosRetry.isNetworkOrIdempotentRequestError=isNetworkOrIdempotentRequestError;axiosRetry.exponentialDelay=exponentialDelay;axiosRetry.isRetryableError=isRetryableError;
4238
4244
 
4239
4245
  var s=1000;var m=s*60;var h=m*60;var d=h*24;var w=d*7;var y=d*365.25;/**
@@ -4268,7 +4274,7 @@ var s=1000;var m=s*60;var h=m*60;var d=h*24;var w=d*7;var y=d*365.25;/**
4268
4274
  * @api private
4269
4275
  */function fmtLong(ms){var msAbs=Math.abs(ms);if(msAbs>=d){return plural(ms,msAbs,d,'day');}if(msAbs>=h){return plural(ms,msAbs,h,'hour');}if(msAbs>=m){return plural(ms,msAbs,m,'minute');}if(msAbs>=s){return plural(ms,msAbs,s,'second');}return ms+' ms';}/**
4270
4276
  * Pluralization helper.
4271
- */function plural(ms,msAbs,n,name){var isPlural=msAbs>=n*1.5;return Math.round(ms/n)+' '+name+(isPlural?'s':'');}var ms$1 = /*@__PURE__*/getDefaultExportFromCjs(ms);
4277
+ */function plural(ms,msAbs,n,name){var isPlural=msAbs>=n*1.5;return Math.round(ms/n)+' '+name+(isPlural?'s':'');}
4272
4278
 
4273
4279
  var IDX=256,HEX=[],BUFFER;while(IDX--)HEX[IDX]=(IDX+256).toString(16).substring(1);function v4(){var i=0,num,out='';if(!BUFFER||IDX+16>256){BUFFER=Array(i=256);while(i--)BUFFER[i]=256*Math.random()|0;i=IDX=0;}for(;i<16;i++){num=BUFFER[IDX+i];if(i==6)out+=HEX[num&15|64];else if(i==8)out+=HEX[num&63|128];else out+=HEX[num];if(i&1&&i>1&&i<11)out+='-';}IDX++;return out;}
4274
4280
 
@@ -4334,906 +4340,909 @@ var IDX=256,HEX=[],BUFFER;while(IDX--)HEX[IDX]=(IDX+256).toString(16).substring(
4334
4340
  *
4335
4341
  * _.isString(1);
4336
4342
  * // => false
4337
- */function isString(value){return typeof value=='string'||!isArray(value)&&isObjectLike(value)&&objectToString.call(value)==stringTag;}var lodash_isstring=isString;var isString$1 = /*@__PURE__*/getDefaultExportFromCjs(lodash_isstring);
4338
-
4339
- var lodash_clonedeep = {exports: {}};
4340
-
4341
- lodash_clonedeep.exports;(function(module,exports){/** Used as the size to enable large array optimizations. */var LARGE_ARRAY_SIZE=200;/** Used to stand-in for `undefined` hash values. */var HASH_UNDEFINED='__lodash_hash_undefined__';/** Used as references for various `Number` constants. */var MAX_SAFE_INTEGER=9007199254740991;/** `Object#toString` result references. */var argsTag='[object Arguments]',arrayTag='[object Array]',boolTag='[object Boolean]',dateTag='[object Date]',errorTag='[object Error]',funcTag='[object Function]',genTag='[object GeneratorFunction]',mapTag='[object Map]',numberTag='[object Number]',objectTag='[object Object]',promiseTag='[object Promise]',regexpTag='[object RegExp]',setTag='[object Set]',stringTag='[object String]',symbolTag='[object Symbol]',weakMapTag='[object WeakMap]';var arrayBufferTag='[object ArrayBuffer]',dataViewTag='[object DataView]',float32Tag='[object Float32Array]',float64Tag='[object Float64Array]',int8Tag='[object Int8Array]',int16Tag='[object Int16Array]',int32Tag='[object Int32Array]',uint8Tag='[object Uint8Array]',uint8ClampedTag='[object Uint8ClampedArray]',uint16Tag='[object Uint16Array]',uint32Tag='[object Uint32Array]';/**
4342
- * Used to match `RegExp`
4343
- * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
4344
- */var reRegExpChar=/[\\^$.*+?()[\]{}|]/g;/** Used to match `RegExp` flags from their coerced string values. */var reFlags=/\w*$/;/** Used to detect host constructors (Safari). */var reIsHostCtor=/^\[object .+?Constructor\]$/;/** Used to detect unsigned integer values. */var reIsUint=/^(?:0|[1-9]\d*)$/;/** Used to identify `toStringTag` values supported by `_.clone`. */var cloneableTags={};cloneableTags[argsTag]=cloneableTags[arrayTag]=cloneableTags[arrayBufferTag]=cloneableTags[dataViewTag]=cloneableTags[boolTag]=cloneableTags[dateTag]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[mapTag]=cloneableTags[numberTag]=cloneableTags[objectTag]=cloneableTags[regexpTag]=cloneableTags[setTag]=cloneableTags[stringTag]=cloneableTags[symbolTag]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=true;cloneableTags[errorTag]=cloneableTags[funcTag]=cloneableTags[weakMapTag]=false;/** Detect free variable `global` from Node.js. */var freeGlobal=_typeof(commonjsGlobal)=='object'&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal;/** Detect free variable `self`. */var freeSelf=(typeof self==="undefined"?"undefined":_typeof(self))=='object'&&self&&self.Object===Object&&self;/** Used as a reference to the global object. */var root=freeGlobal||freeSelf||Function('return this')();/** Detect free variable `exports`. */var freeExports=exports&&!exports.nodeType&&exports;/** Detect free variable `module`. */var freeModule=freeExports&&'object'=='object'&&module&&!module.nodeType&&module;/** Detect the popular CommonJS extension `module.exports`. */var moduleExports=freeModule&&freeModule.exports===freeExports;/**
4345
- * Adds the key-value `pair` to `map`.
4346
- *
4347
- * @private
4348
- * @param {Object} map The map to modify.
4349
- * @param {Array} pair The key-value pair to add.
4350
- * @returns {Object} Returns `map`.
4351
- */function addMapEntry(map,pair){// Don't return `map.set` because it's not chainable in IE 11.
4352
- map.set(pair[0],pair[1]);return map;}/**
4353
- * Adds `value` to `set`.
4354
- *
4355
- * @private
4356
- * @param {Object} set The set to modify.
4357
- * @param {*} value The value to add.
4358
- * @returns {Object} Returns `set`.
4359
- */function addSetEntry(set,value){// Don't return `set.add` because it's not chainable in IE 11.
4360
- set.add(value);return set;}/**
4361
- * A specialized version of `_.forEach` for arrays without support for
4362
- * iteratee shorthands.
4363
- *
4364
- * @private
4365
- * @param {Array} [array] The array to iterate over.
4366
- * @param {Function} iteratee The function invoked per iteration.
4367
- * @returns {Array} Returns `array`.
4368
- */function arrayEach(array,iteratee){var index=-1,length=array?array.length:0;while(++index<length){if(iteratee(array[index],index,array)===false){break;}}return array;}/**
4369
- * Appends the elements of `values` to `array`.
4370
- *
4371
- * @private
4372
- * @param {Array} array The array to modify.
4373
- * @param {Array} values The values to append.
4374
- * @returns {Array} Returns `array`.
4375
- */function arrayPush(array,values){var index=-1,length=values.length,offset=array.length;while(++index<length){array[offset+index]=values[index];}return array;}/**
4376
- * A specialized version of `_.reduce` for arrays without support for
4377
- * iteratee shorthands.
4378
- *
4379
- * @private
4380
- * @param {Array} [array] The array to iterate over.
4381
- * @param {Function} iteratee The function invoked per iteration.
4382
- * @param {*} [accumulator] The initial value.
4383
- * @param {boolean} [initAccum] Specify using the first element of `array` as
4384
- * the initial value.
4385
- * @returns {*} Returns the accumulated value.
4386
- */function arrayReduce(array,iteratee,accumulator,initAccum){var index=-1,length=array?array.length:0;if(initAccum&&length){accumulator=array[++index];}while(++index<length){accumulator=iteratee(accumulator,array[index],index,array);}return accumulator;}/**
4387
- * The base implementation of `_.times` without support for iteratee shorthands
4388
- * or max array length checks.
4389
- *
4390
- * @private
4391
- * @param {number} n The number of times to invoke `iteratee`.
4392
- * @param {Function} iteratee The function invoked per iteration.
4393
- * @returns {Array} Returns the array of results.
4394
- */function baseTimes(n,iteratee){var index=-1,result=Array(n);while(++index<n){result[index]=iteratee(index);}return result;}/**
4395
- * Gets the value at `key` of `object`.
4396
- *
4397
- * @private
4398
- * @param {Object} [object] The object to query.
4399
- * @param {string} key The key of the property to get.
4400
- * @returns {*} Returns the property value.
4401
- */function getValue(object,key){return object==null?undefined:object[key];}/**
4402
- * Checks if `value` is a host object in IE < 9.
4403
- *
4404
- * @private
4405
- * @param {*} value The value to check.
4406
- * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
4407
- */function isHostObject(value){// Many host objects are `Object` objects that can coerce to strings
4343
+ */function isString(value){return typeof value=='string'||!isArray(value)&&isObjectLike(value)&&objectToString.call(value)==stringTag;}var lodash_isstring=isString;
4344
+
4345
+ var lodash_clonedeepExports = {};
4346
+ var lodash_clonedeep = {
4347
+ get exports(){ return lodash_clonedeepExports; },
4348
+ set exports(v){ lodash_clonedeepExports = v; },
4349
+ };
4350
+
4351
+ (function(module,exports){/** Used as the size to enable large array optimizations. */var LARGE_ARRAY_SIZE=200;/** Used to stand-in for `undefined` hash values. */var HASH_UNDEFINED='__lodash_hash_undefined__';/** Used as references for various `Number` constants. */var MAX_SAFE_INTEGER=9007199254740991;/** `Object#toString` result references. */var argsTag='[object Arguments]',arrayTag='[object Array]',boolTag='[object Boolean]',dateTag='[object Date]',errorTag='[object Error]',funcTag='[object Function]',genTag='[object GeneratorFunction]',mapTag='[object Map]',numberTag='[object Number]',objectTag='[object Object]',promiseTag='[object Promise]',regexpTag='[object RegExp]',setTag='[object Set]',stringTag='[object String]',symbolTag='[object Symbol]',weakMapTag='[object WeakMap]';var arrayBufferTag='[object ArrayBuffer]',dataViewTag='[object DataView]',float32Tag='[object Float32Array]',float64Tag='[object Float64Array]',int8Tag='[object Int8Array]',int16Tag='[object Int16Array]',int32Tag='[object Int32Array]',uint8Tag='[object Uint8Array]',uint8ClampedTag='[object Uint8ClampedArray]',uint16Tag='[object Uint16Array]',uint32Tag='[object Uint32Array]';/**
4352
+ * Used to match `RegExp`
4353
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
4354
+ */var reRegExpChar=/[\\^$.*+?()[\]{}|]/g;/** Used to match `RegExp` flags from their coerced string values. */var reFlags=/\w*$/;/** Used to detect host constructors (Safari). */var reIsHostCtor=/^\[object .+?Constructor\]$/;/** Used to detect unsigned integer values. */var reIsUint=/^(?:0|[1-9]\d*)$/;/** Used to identify `toStringTag` values supported by `_.clone`. */var cloneableTags={};cloneableTags[argsTag]=cloneableTags[arrayTag]=cloneableTags[arrayBufferTag]=cloneableTags[dataViewTag]=cloneableTags[boolTag]=cloneableTags[dateTag]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[mapTag]=cloneableTags[numberTag]=cloneableTags[objectTag]=cloneableTags[regexpTag]=cloneableTags[setTag]=cloneableTags[stringTag]=cloneableTags[symbolTag]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=true;cloneableTags[errorTag]=cloneableTags[funcTag]=cloneableTags[weakMapTag]=false;/** Detect free variable `global` from Node.js. */var freeGlobal=_typeof(commonjsGlobal)=='object'&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal;/** Detect free variable `self`. */var freeSelf=(typeof self==="undefined"?"undefined":_typeof(self))=='object'&&self&&self.Object===Object&&self;/** Used as a reference to the global object. */var root=freeGlobal||freeSelf||Function('return this')();/** Detect free variable `exports`. */var freeExports=exports&&!exports.nodeType&&exports;/** Detect free variable `module`. */var freeModule=freeExports&&'object'=='object'&&module&&!module.nodeType&&module;/** Detect the popular CommonJS extension `module.exports`. */var moduleExports=freeModule&&freeModule.exports===freeExports;/**
4355
+ * Adds the key-value `pair` to `map`.
4356
+ *
4357
+ * @private
4358
+ * @param {Object} map The map to modify.
4359
+ * @param {Array} pair The key-value pair to add.
4360
+ * @returns {Object} Returns `map`.
4361
+ */function addMapEntry(map,pair){// Don't return `map.set` because it's not chainable in IE 11.
4362
+ map.set(pair[0],pair[1]);return map;}/**
4363
+ * Adds `value` to `set`.
4364
+ *
4365
+ * @private
4366
+ * @param {Object} set The set to modify.
4367
+ * @param {*} value The value to add.
4368
+ * @returns {Object} Returns `set`.
4369
+ */function addSetEntry(set,value){// Don't return `set.add` because it's not chainable in IE 11.
4370
+ set.add(value);return set;}/**
4371
+ * A specialized version of `_.forEach` for arrays without support for
4372
+ * iteratee shorthands.
4373
+ *
4374
+ * @private
4375
+ * @param {Array} [array] The array to iterate over.
4376
+ * @param {Function} iteratee The function invoked per iteration.
4377
+ * @returns {Array} Returns `array`.
4378
+ */function arrayEach(array,iteratee){var index=-1,length=array?array.length:0;while(++index<length){if(iteratee(array[index],index,array)===false){break;}}return array;}/**
4379
+ * Appends the elements of `values` to `array`.
4380
+ *
4381
+ * @private
4382
+ * @param {Array} array The array to modify.
4383
+ * @param {Array} values The values to append.
4384
+ * @returns {Array} Returns `array`.
4385
+ */function arrayPush(array,values){var index=-1,length=values.length,offset=array.length;while(++index<length){array[offset+index]=values[index];}return array;}/**
4386
+ * A specialized version of `_.reduce` for arrays without support for
4387
+ * iteratee shorthands.
4388
+ *
4389
+ * @private
4390
+ * @param {Array} [array] The array to iterate over.
4391
+ * @param {Function} iteratee The function invoked per iteration.
4392
+ * @param {*} [accumulator] The initial value.
4393
+ * @param {boolean} [initAccum] Specify using the first element of `array` as
4394
+ * the initial value.
4395
+ * @returns {*} Returns the accumulated value.
4396
+ */function arrayReduce(array,iteratee,accumulator,initAccum){var index=-1,length=array?array.length:0;if(initAccum&&length){accumulator=array[++index];}while(++index<length){accumulator=iteratee(accumulator,array[index],index,array);}return accumulator;}/**
4397
+ * The base implementation of `_.times` without support for iteratee shorthands
4398
+ * or max array length checks.
4399
+ *
4400
+ * @private
4401
+ * @param {number} n The number of times to invoke `iteratee`.
4402
+ * @param {Function} iteratee The function invoked per iteration.
4403
+ * @returns {Array} Returns the array of results.
4404
+ */function baseTimes(n,iteratee){var index=-1,result=Array(n);while(++index<n){result[index]=iteratee(index);}return result;}/**
4405
+ * Gets the value at `key` of `object`.
4406
+ *
4407
+ * @private
4408
+ * @param {Object} [object] The object to query.
4409
+ * @param {string} key The key of the property to get.
4410
+ * @returns {*} Returns the property value.
4411
+ */function getValue(object,key){return object==null?undefined:object[key];}/**
4412
+ * Checks if `value` is a host object in IE < 9.
4413
+ *
4414
+ * @private
4415
+ * @param {*} value The value to check.
4416
+ * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
4417
+ */function isHostObject(value){// Many host objects are `Object` objects that can coerce to strings
4408
4418
  // despite having improperly defined `toString` methods.
4409
- var result=false;if(value!=null&&typeof value.toString!='function'){try{result=!!(value+'');}catch(e){}}return result;}/**
4410
- * Converts `map` to its key-value pairs.
4411
- *
4412
- * @private
4413
- * @param {Object} map The map to convert.
4414
- * @returns {Array} Returns the key-value pairs.
4415
- */function mapToArray(map){var index=-1,result=Array(map.size);map.forEach(function(value,key){result[++index]=[key,value];});return result;}/**
4416
- * Creates a unary function that invokes `func` with its argument transformed.
4417
- *
4418
- * @private
4419
- * @param {Function} func The function to wrap.
4420
- * @param {Function} transform The argument transform.
4421
- * @returns {Function} Returns the new function.
4422
- */function overArg(func,transform){return function(arg){return func(transform(arg));};}/**
4423
- * Converts `set` to an array of its values.
4424
- *
4425
- * @private
4426
- * @param {Object} set The set to convert.
4427
- * @returns {Array} Returns the values.
4428
- */function setToArray(set){var index=-1,result=Array(set.size);set.forEach(function(value){result[++index]=value;});return result;}/** Used for built-in method references. */var arrayProto=Array.prototype,funcProto=Function.prototype,objectProto=Object.prototype;/** Used to detect overreaching core-js shims. */var coreJsData=root['__core-js_shared__'];/** Used to detect methods masquerading as native. */var maskSrcKey=function(){var uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||'');return uid?'Symbol(src)_1.'+uid:'';}();/** Used to resolve the decompiled source of functions. */var funcToString=funcProto.toString;/** Used to check objects for own properties. */var hasOwnProperty=objectProto.hasOwnProperty;/**
4429
- * Used to resolve the
4430
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
4431
- * of values.
4432
- */var objectToString=objectProto.toString;/** Used to detect if a method is native. */var reIsNative=RegExp('^'+funcToString.call(hasOwnProperty).replace(reRegExpChar,'\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,'$1.*?')+'$');/** Built-in value references. */var Buffer=moduleExports?root.Buffer:undefined,_Symbol=root.Symbol,Uint8Array=root.Uint8Array,getPrototype=overArg(Object.getPrototypeOf,Object),objectCreate=Object.create,propertyIsEnumerable=objectProto.propertyIsEnumerable,splice=arrayProto.splice;/* Built-in method references for those with the same name as other `lodash` methods. */var nativeGetSymbols=Object.getOwnPropertySymbols,nativeIsBuffer=Buffer?Buffer.isBuffer:undefined,nativeKeys=overArg(Object.keys,Object);/* Built-in method references that are verified to be native. */var DataView=getNative(root,'DataView'),Map=getNative(root,'Map'),Promise=getNative(root,'Promise'),Set=getNative(root,'Set'),WeakMap=getNative(root,'WeakMap'),nativeCreate=getNative(Object,'create');/** Used to detect maps, sets, and weakmaps. */var dataViewCtorString=toSource(DataView),mapCtorString=toSource(Map),promiseCtorString=toSource(Promise),setCtorString=toSource(Set),weakMapCtorString=toSource(WeakMap);/** Used to convert symbols to primitives and strings. */var symbolProto=_Symbol?_Symbol.prototype:undefined,symbolValueOf=symbolProto?symbolProto.valueOf:undefined;/**
4433
- * Creates a hash object.
4434
- *
4435
- * @private
4436
- * @constructor
4437
- * @param {Array} [entries] The key-value pairs to cache.
4438
- */function Hash(entries){var index=-1,length=entries?entries.length:0;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1]);}}/**
4439
- * Removes all key-value entries from the hash.
4440
- *
4441
- * @private
4442
- * @name clear
4443
- * @memberOf Hash
4444
- */function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{};}/**
4445
- * Removes `key` and its value from the hash.
4446
- *
4447
- * @private
4448
- * @name delete
4449
- * @memberOf Hash
4450
- * @param {Object} hash The hash to modify.
4451
- * @param {string} key The key of the value to remove.
4452
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
4453
- */function hashDelete(key){return this.has(key)&&delete this.__data__[key];}/**
4454
- * Gets the hash value for `key`.
4455
- *
4456
- * @private
4457
- * @name get
4458
- * @memberOf Hash
4459
- * @param {string} key The key of the value to get.
4460
- * @returns {*} Returns the entry value.
4461
- */function hashGet(key){var data=this.__data__;if(nativeCreate){var result=data[key];return result===HASH_UNDEFINED?undefined:result;}return hasOwnProperty.call(data,key)?data[key]:undefined;}/**
4462
- * Checks if a hash value for `key` exists.
4463
- *
4464
- * @private
4465
- * @name has
4466
- * @memberOf Hash
4467
- * @param {string} key The key of the entry to check.
4468
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
4469
- */function hashHas(key){var data=this.__data__;return nativeCreate?data[key]!==undefined:hasOwnProperty.call(data,key);}/**
4470
- * Sets the hash `key` to `value`.
4471
- *
4472
- * @private
4473
- * @name set
4474
- * @memberOf Hash
4475
- * @param {string} key The key of the value to set.
4476
- * @param {*} value The value to set.
4477
- * @returns {Object} Returns the hash instance.
4478
- */function hashSet(key,value){var data=this.__data__;data[key]=nativeCreate&&value===undefined?HASH_UNDEFINED:value;return this;}// Add methods to `Hash`.
4479
- Hash.prototype.clear=hashClear;Hash.prototype['delete']=hashDelete;Hash.prototype.get=hashGet;Hash.prototype.has=hashHas;Hash.prototype.set=hashSet;/**
4480
- * Creates an list cache object.
4481
- *
4482
- * @private
4483
- * @constructor
4484
- * @param {Array} [entries] The key-value pairs to cache.
4485
- */function ListCache(entries){var index=-1,length=entries?entries.length:0;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1]);}}/**
4486
- * Removes all key-value entries from the list cache.
4487
- *
4488
- * @private
4489
- * @name clear
4490
- * @memberOf ListCache
4491
- */function listCacheClear(){this.__data__=[];}/**
4492
- * Removes `key` and its value from the list cache.
4493
- *
4494
- * @private
4495
- * @name delete
4496
- * @memberOf ListCache
4497
- * @param {string} key The key of the value to remove.
4498
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
4499
- */function listCacheDelete(key){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){return false;}var lastIndex=data.length-1;if(index==lastIndex){data.pop();}else {splice.call(data,index,1);}return true;}/**
4500
- * Gets the list cache value for `key`.
4501
- *
4502
- * @private
4503
- * @name get
4504
- * @memberOf ListCache
4505
- * @param {string} key The key of the value to get.
4506
- * @returns {*} Returns the entry value.
4507
- */function listCacheGet(key){var data=this.__data__,index=assocIndexOf(data,key);return index<0?undefined:data[index][1];}/**
4508
- * Checks if a list cache value for `key` exists.
4509
- *
4510
- * @private
4511
- * @name has
4512
- * @memberOf ListCache
4513
- * @param {string} key The key of the entry to check.
4514
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
4515
- */function listCacheHas(key){return assocIndexOf(this.__data__,key)>-1;}/**
4516
- * Sets the list cache `key` to `value`.
4517
- *
4518
- * @private
4519
- * @name set
4520
- * @memberOf ListCache
4521
- * @param {string} key The key of the value to set.
4522
- * @param {*} value The value to set.
4523
- * @returns {Object} Returns the list cache instance.
4524
- */function listCacheSet(key,value){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){data.push([key,value]);}else {data[index][1]=value;}return this;}// Add methods to `ListCache`.
4525
- ListCache.prototype.clear=listCacheClear;ListCache.prototype['delete']=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;/**
4526
- * Creates a map cache object to store key-value pairs.
4527
- *
4528
- * @private
4529
- * @constructor
4530
- * @param {Array} [entries] The key-value pairs to cache.
4531
- */function MapCache(entries){var index=-1,length=entries?entries.length:0;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1]);}}/**
4532
- * Removes all key-value entries from the map.
4533
- *
4534
- * @private
4535
- * @name clear
4536
- * @memberOf MapCache
4537
- */function mapCacheClear(){this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}/**
4538
- * Removes `key` and its value from the map.
4539
- *
4540
- * @private
4541
- * @name delete
4542
- * @memberOf MapCache
4543
- * @param {string} key The key of the value to remove.
4544
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
4545
- */function mapCacheDelete(key){return getMapData(this,key)['delete'](key);}/**
4546
- * Gets the map value for `key`.
4547
- *
4548
- * @private
4549
- * @name get
4550
- * @memberOf MapCache
4551
- * @param {string} key The key of the value to get.
4552
- * @returns {*} Returns the entry value.
4553
- */function mapCacheGet(key){return getMapData(this,key).get(key);}/**
4554
- * Checks if a map value for `key` exists.
4555
- *
4556
- * @private
4557
- * @name has
4558
- * @memberOf MapCache
4559
- * @param {string} key The key of the entry to check.
4560
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
4561
- */function mapCacheHas(key){return getMapData(this,key).has(key);}/**
4562
- * Sets the map `key` to `value`.
4563
- *
4564
- * @private
4565
- * @name set
4566
- * @memberOf MapCache
4567
- * @param {string} key The key of the value to set.
4568
- * @param {*} value The value to set.
4569
- * @returns {Object} Returns the map cache instance.
4570
- */function mapCacheSet(key,value){getMapData(this,key).set(key,value);return this;}// Add methods to `MapCache`.
4571
- MapCache.prototype.clear=mapCacheClear;MapCache.prototype['delete']=mapCacheDelete;MapCache.prototype.get=mapCacheGet;MapCache.prototype.has=mapCacheHas;MapCache.prototype.set=mapCacheSet;/**
4572
- * Creates a stack cache object to store key-value pairs.
4573
- *
4574
- * @private
4575
- * @constructor
4576
- * @param {Array} [entries] The key-value pairs to cache.
4577
- */function Stack(entries){this.__data__=new ListCache(entries);}/**
4578
- * Removes all key-value entries from the stack.
4579
- *
4580
- * @private
4581
- * @name clear
4582
- * @memberOf Stack
4583
- */function stackClear(){this.__data__=new ListCache();}/**
4584
- * Removes `key` and its value from the stack.
4585
- *
4586
- * @private
4587
- * @name delete
4588
- * @memberOf Stack
4589
- * @param {string} key The key of the value to remove.
4590
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
4591
- */function stackDelete(key){return this.__data__['delete'](key);}/**
4592
- * Gets the stack value for `key`.
4593
- *
4594
- * @private
4595
- * @name get
4596
- * @memberOf Stack
4597
- * @param {string} key The key of the value to get.
4598
- * @returns {*} Returns the entry value.
4599
- */function stackGet(key){return this.__data__.get(key);}/**
4600
- * Checks if a stack value for `key` exists.
4601
- *
4602
- * @private
4603
- * @name has
4604
- * @memberOf Stack
4605
- * @param {string} key The key of the entry to check.
4606
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
4607
- */function stackHas(key){return this.__data__.has(key);}/**
4608
- * Sets the stack `key` to `value`.
4609
- *
4610
- * @private
4611
- * @name set
4612
- * @memberOf Stack
4613
- * @param {string} key The key of the value to set.
4614
- * @param {*} value The value to set.
4615
- * @returns {Object} Returns the stack cache instance.
4616
- */function stackSet(key,value){var cache=this.__data__;if(cache instanceof ListCache){var pairs=cache.__data__;if(!Map||pairs.length<LARGE_ARRAY_SIZE-1){pairs.push([key,value]);return this;}cache=this.__data__=new MapCache(pairs);}cache.set(key,value);return this;}// Add methods to `Stack`.
4617
- Stack.prototype.clear=stackClear;Stack.prototype['delete']=stackDelete;Stack.prototype.get=stackGet;Stack.prototype.has=stackHas;Stack.prototype.set=stackSet;/**
4618
- * Creates an array of the enumerable property names of the array-like `value`.
4619
- *
4620
- * @private
4621
- * @param {*} value The value to query.
4622
- * @param {boolean} inherited Specify returning inherited property names.
4623
- * @returns {Array} Returns the array of property names.
4624
- */function arrayLikeKeys(value,inherited){// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
4419
+ var result=false;if(value!=null&&typeof value.toString!='function'){try{result=!!(value+'');}catch(e){}}return result;}/**
4420
+ * Converts `map` to its key-value pairs.
4421
+ *
4422
+ * @private
4423
+ * @param {Object} map The map to convert.
4424
+ * @returns {Array} Returns the key-value pairs.
4425
+ */function mapToArray(map){var index=-1,result=Array(map.size);map.forEach(function(value,key){result[++index]=[key,value];});return result;}/**
4426
+ * Creates a unary function that invokes `func` with its argument transformed.
4427
+ *
4428
+ * @private
4429
+ * @param {Function} func The function to wrap.
4430
+ * @param {Function} transform The argument transform.
4431
+ * @returns {Function} Returns the new function.
4432
+ */function overArg(func,transform){return function(arg){return func(transform(arg));};}/**
4433
+ * Converts `set` to an array of its values.
4434
+ *
4435
+ * @private
4436
+ * @param {Object} set The set to convert.
4437
+ * @returns {Array} Returns the values.
4438
+ */function setToArray(set){var index=-1,result=Array(set.size);set.forEach(function(value){result[++index]=value;});return result;}/** Used for built-in method references. */var arrayProto=Array.prototype,funcProto=Function.prototype,objectProto=Object.prototype;/** Used to detect overreaching core-js shims. */var coreJsData=root['__core-js_shared__'];/** Used to detect methods masquerading as native. */var maskSrcKey=function(){var uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||'');return uid?'Symbol(src)_1.'+uid:'';}();/** Used to resolve the decompiled source of functions. */var funcToString=funcProto.toString;/** Used to check objects for own properties. */var hasOwnProperty=objectProto.hasOwnProperty;/**
4439
+ * Used to resolve the
4440
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
4441
+ * of values.
4442
+ */var objectToString=objectProto.toString;/** Used to detect if a method is native. */var reIsNative=RegExp('^'+funcToString.call(hasOwnProperty).replace(reRegExpChar,'\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,'$1.*?')+'$');/** Built-in value references. */var Buffer=moduleExports?root.Buffer:undefined,_Symbol=root.Symbol,Uint8Array=root.Uint8Array,getPrototype=overArg(Object.getPrototypeOf,Object),objectCreate=Object.create,propertyIsEnumerable=objectProto.propertyIsEnumerable,splice=arrayProto.splice;/* Built-in method references for those with the same name as other `lodash` methods. */var nativeGetSymbols=Object.getOwnPropertySymbols,nativeIsBuffer=Buffer?Buffer.isBuffer:undefined,nativeKeys=overArg(Object.keys,Object);/* Built-in method references that are verified to be native. */var DataView=getNative(root,'DataView'),Map=getNative(root,'Map'),Promise=getNative(root,'Promise'),Set=getNative(root,'Set'),WeakMap=getNative(root,'WeakMap'),nativeCreate=getNative(Object,'create');/** Used to detect maps, sets, and weakmaps. */var dataViewCtorString=toSource(DataView),mapCtorString=toSource(Map),promiseCtorString=toSource(Promise),setCtorString=toSource(Set),weakMapCtorString=toSource(WeakMap);/** Used to convert symbols to primitives and strings. */var symbolProto=_Symbol?_Symbol.prototype:undefined,symbolValueOf=symbolProto?symbolProto.valueOf:undefined;/**
4443
+ * Creates a hash object.
4444
+ *
4445
+ * @private
4446
+ * @constructor
4447
+ * @param {Array} [entries] The key-value pairs to cache.
4448
+ */function Hash(entries){var index=-1,length=entries?entries.length:0;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1]);}}/**
4449
+ * Removes all key-value entries from the hash.
4450
+ *
4451
+ * @private
4452
+ * @name clear
4453
+ * @memberOf Hash
4454
+ */function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{};}/**
4455
+ * Removes `key` and its value from the hash.
4456
+ *
4457
+ * @private
4458
+ * @name delete
4459
+ * @memberOf Hash
4460
+ * @param {Object} hash The hash to modify.
4461
+ * @param {string} key The key of the value to remove.
4462
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
4463
+ */function hashDelete(key){return this.has(key)&&delete this.__data__[key];}/**
4464
+ * Gets the hash value for `key`.
4465
+ *
4466
+ * @private
4467
+ * @name get
4468
+ * @memberOf Hash
4469
+ * @param {string} key The key of the value to get.
4470
+ * @returns {*} Returns the entry value.
4471
+ */function hashGet(key){var data=this.__data__;if(nativeCreate){var result=data[key];return result===HASH_UNDEFINED?undefined:result;}return hasOwnProperty.call(data,key)?data[key]:undefined;}/**
4472
+ * Checks if a hash value for `key` exists.
4473
+ *
4474
+ * @private
4475
+ * @name has
4476
+ * @memberOf Hash
4477
+ * @param {string} key The key of the entry to check.
4478
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
4479
+ */function hashHas(key){var data=this.__data__;return nativeCreate?data[key]!==undefined:hasOwnProperty.call(data,key);}/**
4480
+ * Sets the hash `key` to `value`.
4481
+ *
4482
+ * @private
4483
+ * @name set
4484
+ * @memberOf Hash
4485
+ * @param {string} key The key of the value to set.
4486
+ * @param {*} value The value to set.
4487
+ * @returns {Object} Returns the hash instance.
4488
+ */function hashSet(key,value){var data=this.__data__;data[key]=nativeCreate&&value===undefined?HASH_UNDEFINED:value;return this;}// Add methods to `Hash`.
4489
+ Hash.prototype.clear=hashClear;Hash.prototype['delete']=hashDelete;Hash.prototype.get=hashGet;Hash.prototype.has=hashHas;Hash.prototype.set=hashSet;/**
4490
+ * Creates an list cache object.
4491
+ *
4492
+ * @private
4493
+ * @constructor
4494
+ * @param {Array} [entries] The key-value pairs to cache.
4495
+ */function ListCache(entries){var index=-1,length=entries?entries.length:0;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1]);}}/**
4496
+ * Removes all key-value entries from the list cache.
4497
+ *
4498
+ * @private
4499
+ * @name clear
4500
+ * @memberOf ListCache
4501
+ */function listCacheClear(){this.__data__=[];}/**
4502
+ * Removes `key` and its value from the list cache.
4503
+ *
4504
+ * @private
4505
+ * @name delete
4506
+ * @memberOf ListCache
4507
+ * @param {string} key The key of the value to remove.
4508
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
4509
+ */function listCacheDelete(key){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){return false;}var lastIndex=data.length-1;if(index==lastIndex){data.pop();}else {splice.call(data,index,1);}return true;}/**
4510
+ * Gets the list cache value for `key`.
4511
+ *
4512
+ * @private
4513
+ * @name get
4514
+ * @memberOf ListCache
4515
+ * @param {string} key The key of the value to get.
4516
+ * @returns {*} Returns the entry value.
4517
+ */function listCacheGet(key){var data=this.__data__,index=assocIndexOf(data,key);return index<0?undefined:data[index][1];}/**
4518
+ * Checks if a list cache value for `key` exists.
4519
+ *
4520
+ * @private
4521
+ * @name has
4522
+ * @memberOf ListCache
4523
+ * @param {string} key The key of the entry to check.
4524
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
4525
+ */function listCacheHas(key){return assocIndexOf(this.__data__,key)>-1;}/**
4526
+ * Sets the list cache `key` to `value`.
4527
+ *
4528
+ * @private
4529
+ * @name set
4530
+ * @memberOf ListCache
4531
+ * @param {string} key The key of the value to set.
4532
+ * @param {*} value The value to set.
4533
+ * @returns {Object} Returns the list cache instance.
4534
+ */function listCacheSet(key,value){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){data.push([key,value]);}else {data[index][1]=value;}return this;}// Add methods to `ListCache`.
4535
+ ListCache.prototype.clear=listCacheClear;ListCache.prototype['delete']=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;/**
4536
+ * Creates a map cache object to store key-value pairs.
4537
+ *
4538
+ * @private
4539
+ * @constructor
4540
+ * @param {Array} [entries] The key-value pairs to cache.
4541
+ */function MapCache(entries){var index=-1,length=entries?entries.length:0;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1]);}}/**
4542
+ * Removes all key-value entries from the map.
4543
+ *
4544
+ * @private
4545
+ * @name clear
4546
+ * @memberOf MapCache
4547
+ */function mapCacheClear(){this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}/**
4548
+ * Removes `key` and its value from the map.
4549
+ *
4550
+ * @private
4551
+ * @name delete
4552
+ * @memberOf MapCache
4553
+ * @param {string} key The key of the value to remove.
4554
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
4555
+ */function mapCacheDelete(key){return getMapData(this,key)['delete'](key);}/**
4556
+ * Gets the map value for `key`.
4557
+ *
4558
+ * @private
4559
+ * @name get
4560
+ * @memberOf MapCache
4561
+ * @param {string} key The key of the value to get.
4562
+ * @returns {*} Returns the entry value.
4563
+ */function mapCacheGet(key){return getMapData(this,key).get(key);}/**
4564
+ * Checks if a map value for `key` exists.
4565
+ *
4566
+ * @private
4567
+ * @name has
4568
+ * @memberOf MapCache
4569
+ * @param {string} key The key of the entry to check.
4570
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
4571
+ */function mapCacheHas(key){return getMapData(this,key).has(key);}/**
4572
+ * Sets the map `key` to `value`.
4573
+ *
4574
+ * @private
4575
+ * @name set
4576
+ * @memberOf MapCache
4577
+ * @param {string} key The key of the value to set.
4578
+ * @param {*} value The value to set.
4579
+ * @returns {Object} Returns the map cache instance.
4580
+ */function mapCacheSet(key,value){getMapData(this,key).set(key,value);return this;}// Add methods to `MapCache`.
4581
+ MapCache.prototype.clear=mapCacheClear;MapCache.prototype['delete']=mapCacheDelete;MapCache.prototype.get=mapCacheGet;MapCache.prototype.has=mapCacheHas;MapCache.prototype.set=mapCacheSet;/**
4582
+ * Creates a stack cache object to store key-value pairs.
4583
+ *
4584
+ * @private
4585
+ * @constructor
4586
+ * @param {Array} [entries] The key-value pairs to cache.
4587
+ */function Stack(entries){this.__data__=new ListCache(entries);}/**
4588
+ * Removes all key-value entries from the stack.
4589
+ *
4590
+ * @private
4591
+ * @name clear
4592
+ * @memberOf Stack
4593
+ */function stackClear(){this.__data__=new ListCache();}/**
4594
+ * Removes `key` and its value from the stack.
4595
+ *
4596
+ * @private
4597
+ * @name delete
4598
+ * @memberOf Stack
4599
+ * @param {string} key The key of the value to remove.
4600
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
4601
+ */function stackDelete(key){return this.__data__['delete'](key);}/**
4602
+ * Gets the stack value for `key`.
4603
+ *
4604
+ * @private
4605
+ * @name get
4606
+ * @memberOf Stack
4607
+ * @param {string} key The key of the value to get.
4608
+ * @returns {*} Returns the entry value.
4609
+ */function stackGet(key){return this.__data__.get(key);}/**
4610
+ * Checks if a stack value for `key` exists.
4611
+ *
4612
+ * @private
4613
+ * @name has
4614
+ * @memberOf Stack
4615
+ * @param {string} key The key of the entry to check.
4616
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
4617
+ */function stackHas(key){return this.__data__.has(key);}/**
4618
+ * Sets the stack `key` to `value`.
4619
+ *
4620
+ * @private
4621
+ * @name set
4622
+ * @memberOf Stack
4623
+ * @param {string} key The key of the value to set.
4624
+ * @param {*} value The value to set.
4625
+ * @returns {Object} Returns the stack cache instance.
4626
+ */function stackSet(key,value){var cache=this.__data__;if(cache instanceof ListCache){var pairs=cache.__data__;if(!Map||pairs.length<LARGE_ARRAY_SIZE-1){pairs.push([key,value]);return this;}cache=this.__data__=new MapCache(pairs);}cache.set(key,value);return this;}// Add methods to `Stack`.
4627
+ Stack.prototype.clear=stackClear;Stack.prototype['delete']=stackDelete;Stack.prototype.get=stackGet;Stack.prototype.has=stackHas;Stack.prototype.set=stackSet;/**
4628
+ * Creates an array of the enumerable property names of the array-like `value`.
4629
+ *
4630
+ * @private
4631
+ * @param {*} value The value to query.
4632
+ * @param {boolean} inherited Specify returning inherited property names.
4633
+ * @returns {Array} Returns the array of property names.
4634
+ */function arrayLikeKeys(value,inherited){// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
4625
4635
  // Safari 9 makes `arguments.length` enumerable in strict mode.
4626
- var result=isArray(value)||isArguments(value)?baseTimes(value.length,String):[];var length=result.length,skipIndexes=!!length;for(var key in value){if((inherited||hasOwnProperty.call(value,key))&&!(skipIndexes&&(key=='length'||isIndex(key,length)))){result.push(key);}}return result;}/**
4627
- * Assigns `value` to `key` of `object` if the existing value is not equivalent
4628
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
4629
- * for equality comparisons.
4630
- *
4631
- * @private
4632
- * @param {Object} object The object to modify.
4633
- * @param {string} key The key of the property to assign.
4634
- * @param {*} value The value to assign.
4635
- */function assignValue(object,key,value){var objValue=object[key];if(!(hasOwnProperty.call(object,key)&&eq(objValue,value))||value===undefined&&!(key in object)){object[key]=value;}}/**
4636
- * Gets the index at which the `key` is found in `array` of key-value pairs.
4637
- *
4638
- * @private
4639
- * @param {Array} array The array to inspect.
4640
- * @param {*} key The key to search for.
4641
- * @returns {number} Returns the index of the matched value, else `-1`.
4642
- */function assocIndexOf(array,key){var length=array.length;while(length--){if(eq(array[length][0],key)){return length;}}return -1;}/**
4643
- * The base implementation of `_.assign` without support for multiple sources
4644
- * or `customizer` functions.
4645
- *
4646
- * @private
4647
- * @param {Object} object The destination object.
4648
- * @param {Object} source The source object.
4649
- * @returns {Object} Returns `object`.
4650
- */function baseAssign(object,source){return object&&copyObject(source,keys(source),object);}/**
4651
- * The base implementation of `_.clone` and `_.cloneDeep` which tracks
4652
- * traversed objects.
4653
- *
4654
- * @private
4655
- * @param {*} value The value to clone.
4656
- * @param {boolean} [isDeep] Specify a deep clone.
4657
- * @param {boolean} [isFull] Specify a clone including symbols.
4658
- * @param {Function} [customizer] The function to customize cloning.
4659
- * @param {string} [key] The key of `value`.
4660
- * @param {Object} [object] The parent object of `value`.
4661
- * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
4662
- * @returns {*} Returns the cloned value.
4663
- */function baseClone(value,isDeep,isFull,customizer,key,object,stack){var result;if(customizer){result=object?customizer(value,key,object,stack):customizer(value);}if(result!==undefined){return result;}if(!isObject(value)){return value;}var isArr=isArray(value);if(isArr){result=initCloneArray(value);if(!isDeep){return copyArray(value,result);}}else {var tag=getTag(value),isFunc=tag==funcTag||tag==genTag;if(isBuffer(value)){return cloneBuffer(value,isDeep);}if(tag==objectTag||tag==argsTag||isFunc&&!object){if(isHostObject(value)){return object?value:{};}result=initCloneObject(isFunc?{}:value);if(!isDeep){return copySymbols(value,baseAssign(result,value));}}else {if(!cloneableTags[tag]){return object?value:{};}result=initCloneByTag(value,tag,baseClone,isDeep);}}// Check for circular references and return its corresponding clone.
4664
- stack||(stack=new Stack());var stacked=stack.get(value);if(stacked){return stacked;}stack.set(value,result);if(!isArr){var props=isFull?getAllKeys(value):keys(value);}arrayEach(props||value,function(subValue,key){if(props){key=subValue;subValue=value[key];}// Recursively populate clone (susceptible to call stack limits).
4665
- assignValue(result,key,baseClone(subValue,isDeep,isFull,customizer,key,value,stack));});return result;}/**
4666
- * The base implementation of `_.create` without support for assigning
4667
- * properties to the created object.
4668
- *
4669
- * @private
4670
- * @param {Object} prototype The object to inherit from.
4671
- * @returns {Object} Returns the new object.
4672
- */function baseCreate(proto){return isObject(proto)?objectCreate(proto):{};}/**
4673
- * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
4674
- * `keysFunc` and `symbolsFunc` to get the enumerable property names and
4675
- * symbols of `object`.
4676
- *
4677
- * @private
4678
- * @param {Object} object The object to query.
4679
- * @param {Function} keysFunc The function to get the keys of `object`.
4680
- * @param {Function} symbolsFunc The function to get the symbols of `object`.
4681
- * @returns {Array} Returns the array of property names and symbols.
4682
- */function baseGetAllKeys(object,keysFunc,symbolsFunc){var result=keysFunc(object);return isArray(object)?result:arrayPush(result,symbolsFunc(object));}/**
4683
- * The base implementation of `getTag`.
4684
- *
4685
- * @private
4686
- * @param {*} value The value to query.
4687
- * @returns {string} Returns the `toStringTag`.
4688
- */function baseGetTag(value){return objectToString.call(value);}/**
4689
- * The base implementation of `_.isNative` without bad shim checks.
4690
- *
4691
- * @private
4692
- * @param {*} value The value to check.
4693
- * @returns {boolean} Returns `true` if `value` is a native function,
4694
- * else `false`.
4695
- */function baseIsNative(value){if(!isObject(value)||isMasked(value)){return false;}var pattern=isFunction(value)||isHostObject(value)?reIsNative:reIsHostCtor;return pattern.test(toSource(value));}/**
4696
- * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
4697
- *
4698
- * @private
4699
- * @param {Object} object The object to query.
4700
- * @returns {Array} Returns the array of property names.
4701
- */function baseKeys(object){if(!isPrototype(object)){return nativeKeys(object);}var result=[];for(var key in Object(object)){if(hasOwnProperty.call(object,key)&&key!='constructor'){result.push(key);}}return result;}/**
4702
- * Creates a clone of `buffer`.
4703
- *
4704
- * @private
4705
- * @param {Buffer} buffer The buffer to clone.
4706
- * @param {boolean} [isDeep] Specify a deep clone.
4707
- * @returns {Buffer} Returns the cloned buffer.
4708
- */function cloneBuffer(buffer,isDeep){if(isDeep){return buffer.slice();}var result=new buffer.constructor(buffer.length);buffer.copy(result);return result;}/**
4709
- * Creates a clone of `arrayBuffer`.
4710
- *
4711
- * @private
4712
- * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
4713
- * @returns {ArrayBuffer} Returns the cloned array buffer.
4714
- */function cloneArrayBuffer(arrayBuffer){var result=new arrayBuffer.constructor(arrayBuffer.byteLength);new Uint8Array(result).set(new Uint8Array(arrayBuffer));return result;}/**
4715
- * Creates a clone of `dataView`.
4716
- *
4717
- * @private
4718
- * @param {Object} dataView The data view to clone.
4719
- * @param {boolean} [isDeep] Specify a deep clone.
4720
- * @returns {Object} Returns the cloned data view.
4721
- */function cloneDataView(dataView,isDeep){var buffer=isDeep?cloneArrayBuffer(dataView.buffer):dataView.buffer;return new dataView.constructor(buffer,dataView.byteOffset,dataView.byteLength);}/**
4722
- * Creates a clone of `map`.
4723
- *
4724
- * @private
4725
- * @param {Object} map The map to clone.
4726
- * @param {Function} cloneFunc The function to clone values.
4727
- * @param {boolean} [isDeep] Specify a deep clone.
4728
- * @returns {Object} Returns the cloned map.
4729
- */function cloneMap(map,isDeep,cloneFunc){var array=isDeep?cloneFunc(mapToArray(map),true):mapToArray(map);return arrayReduce(array,addMapEntry,new map.constructor());}/**
4730
- * Creates a clone of `regexp`.
4731
- *
4732
- * @private
4733
- * @param {Object} regexp The regexp to clone.
4734
- * @returns {Object} Returns the cloned regexp.
4735
- */function cloneRegExp(regexp){var result=new regexp.constructor(regexp.source,reFlags.exec(regexp));result.lastIndex=regexp.lastIndex;return result;}/**
4736
- * Creates a clone of `set`.
4737
- *
4738
- * @private
4739
- * @param {Object} set The set to clone.
4740
- * @param {Function} cloneFunc The function to clone values.
4741
- * @param {boolean} [isDeep] Specify a deep clone.
4742
- * @returns {Object} Returns the cloned set.
4743
- */function cloneSet(set,isDeep,cloneFunc){var array=isDeep?cloneFunc(setToArray(set),true):setToArray(set);return arrayReduce(array,addSetEntry,new set.constructor());}/**
4744
- * Creates a clone of the `symbol` object.
4745
- *
4746
- * @private
4747
- * @param {Object} symbol The symbol object to clone.
4748
- * @returns {Object} Returns the cloned symbol object.
4749
- */function cloneSymbol(symbol){return symbolValueOf?Object(symbolValueOf.call(symbol)):{};}/**
4750
- * Creates a clone of `typedArray`.
4751
- *
4752
- * @private
4753
- * @param {Object} typedArray The typed array to clone.
4754
- * @param {boolean} [isDeep] Specify a deep clone.
4755
- * @returns {Object} Returns the cloned typed array.
4756
- */function cloneTypedArray(typedArray,isDeep){var buffer=isDeep?cloneArrayBuffer(typedArray.buffer):typedArray.buffer;return new typedArray.constructor(buffer,typedArray.byteOffset,typedArray.length);}/**
4757
- * Copies the values of `source` to `array`.
4758
- *
4759
- * @private
4760
- * @param {Array} source The array to copy values from.
4761
- * @param {Array} [array=[]] The array to copy values to.
4762
- * @returns {Array} Returns `array`.
4763
- */function copyArray(source,array){var index=-1,length=source.length;array||(array=Array(length));while(++index<length){array[index]=source[index];}return array;}/**
4764
- * Copies properties of `source` to `object`.
4765
- *
4766
- * @private
4767
- * @param {Object} source The object to copy properties from.
4768
- * @param {Array} props The property identifiers to copy.
4769
- * @param {Object} [object={}] The object to copy properties to.
4770
- * @param {Function} [customizer] The function to customize copied values.
4771
- * @returns {Object} Returns `object`.
4772
- */function copyObject(source,props,object,customizer){object||(object={});var index=-1,length=props.length;while(++index<length){var key=props[index];var newValue=customizer?customizer(object[key],source[key],key,object,source):undefined;assignValue(object,key,newValue===undefined?source[key]:newValue);}return object;}/**
4773
- * Copies own symbol properties of `source` to `object`.
4774
- *
4775
- * @private
4776
- * @param {Object} source The object to copy symbols from.
4777
- * @param {Object} [object={}] The object to copy symbols to.
4778
- * @returns {Object} Returns `object`.
4779
- */function copySymbols(source,object){return copyObject(source,getSymbols(source),object);}/**
4780
- * Creates an array of own enumerable property names and symbols of `object`.
4781
- *
4782
- * @private
4783
- * @param {Object} object The object to query.
4784
- * @returns {Array} Returns the array of property names and symbols.
4785
- */function getAllKeys(object){return baseGetAllKeys(object,keys,getSymbols);}/**
4786
- * Gets the data for `map`.
4787
- *
4788
- * @private
4789
- * @param {Object} map The map to query.
4790
- * @param {string} key The reference key.
4791
- * @returns {*} Returns the map data.
4792
- */function getMapData(map,key){var data=map.__data__;return isKeyable(key)?data[typeof key=='string'?'string':'hash']:data.map;}/**
4793
- * Gets the native function at `key` of `object`.
4794
- *
4795
- * @private
4796
- * @param {Object} object The object to query.
4797
- * @param {string} key The key of the method to get.
4798
- * @returns {*} Returns the function if it's native, else `undefined`.
4799
- */function getNative(object,key){var value=getValue(object,key);return baseIsNative(value)?value:undefined;}/**
4800
- * Creates an array of the own enumerable symbol properties of `object`.
4801
- *
4802
- * @private
4803
- * @param {Object} object The object to query.
4804
- * @returns {Array} Returns the array of symbols.
4805
- */var getSymbols=nativeGetSymbols?overArg(nativeGetSymbols,Object):stubArray;/**
4806
- * Gets the `toStringTag` of `value`.
4807
- *
4808
- * @private
4809
- * @param {*} value The value to query.
4810
- * @returns {string} Returns the `toStringTag`.
4811
- */var getTag=baseGetTag;// Fallback for data views, maps, sets, and weak maps in IE 11,
4636
+ var result=isArray(value)||isArguments(value)?baseTimes(value.length,String):[];var length=result.length,skipIndexes=!!length;for(var key in value){if((inherited||hasOwnProperty.call(value,key))&&!(skipIndexes&&(key=='length'||isIndex(key,length)))){result.push(key);}}return result;}/**
4637
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
4638
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
4639
+ * for equality comparisons.
4640
+ *
4641
+ * @private
4642
+ * @param {Object} object The object to modify.
4643
+ * @param {string} key The key of the property to assign.
4644
+ * @param {*} value The value to assign.
4645
+ */function assignValue(object,key,value){var objValue=object[key];if(!(hasOwnProperty.call(object,key)&&eq(objValue,value))||value===undefined&&!(key in object)){object[key]=value;}}/**
4646
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
4647
+ *
4648
+ * @private
4649
+ * @param {Array} array The array to inspect.
4650
+ * @param {*} key The key to search for.
4651
+ * @returns {number} Returns the index of the matched value, else `-1`.
4652
+ */function assocIndexOf(array,key){var length=array.length;while(length--){if(eq(array[length][0],key)){return length;}}return -1;}/**
4653
+ * The base implementation of `_.assign` without support for multiple sources
4654
+ * or `customizer` functions.
4655
+ *
4656
+ * @private
4657
+ * @param {Object} object The destination object.
4658
+ * @param {Object} source The source object.
4659
+ * @returns {Object} Returns `object`.
4660
+ */function baseAssign(object,source){return object&&copyObject(source,keys(source),object);}/**
4661
+ * The base implementation of `_.clone` and `_.cloneDeep` which tracks
4662
+ * traversed objects.
4663
+ *
4664
+ * @private
4665
+ * @param {*} value The value to clone.
4666
+ * @param {boolean} [isDeep] Specify a deep clone.
4667
+ * @param {boolean} [isFull] Specify a clone including symbols.
4668
+ * @param {Function} [customizer] The function to customize cloning.
4669
+ * @param {string} [key] The key of `value`.
4670
+ * @param {Object} [object] The parent object of `value`.
4671
+ * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
4672
+ * @returns {*} Returns the cloned value.
4673
+ */function baseClone(value,isDeep,isFull,customizer,key,object,stack){var result;if(customizer){result=object?customizer(value,key,object,stack):customizer(value);}if(result!==undefined){return result;}if(!isObject(value)){return value;}var isArr=isArray(value);if(isArr){result=initCloneArray(value);if(!isDeep){return copyArray(value,result);}}else {var tag=getTag(value),isFunc=tag==funcTag||tag==genTag;if(isBuffer(value)){return cloneBuffer(value,isDeep);}if(tag==objectTag||tag==argsTag||isFunc&&!object){if(isHostObject(value)){return object?value:{};}result=initCloneObject(isFunc?{}:value);if(!isDeep){return copySymbols(value,baseAssign(result,value));}}else {if(!cloneableTags[tag]){return object?value:{};}result=initCloneByTag(value,tag,baseClone,isDeep);}}// Check for circular references and return its corresponding clone.
4674
+ stack||(stack=new Stack());var stacked=stack.get(value);if(stacked){return stacked;}stack.set(value,result);if(!isArr){var props=isFull?getAllKeys(value):keys(value);}arrayEach(props||value,function(subValue,key){if(props){key=subValue;subValue=value[key];}// Recursively populate clone (susceptible to call stack limits).
4675
+ assignValue(result,key,baseClone(subValue,isDeep,isFull,customizer,key,value,stack));});return result;}/**
4676
+ * The base implementation of `_.create` without support for assigning
4677
+ * properties to the created object.
4678
+ *
4679
+ * @private
4680
+ * @param {Object} prototype The object to inherit from.
4681
+ * @returns {Object} Returns the new object.
4682
+ */function baseCreate(proto){return isObject(proto)?objectCreate(proto):{};}/**
4683
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
4684
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
4685
+ * symbols of `object`.
4686
+ *
4687
+ * @private
4688
+ * @param {Object} object The object to query.
4689
+ * @param {Function} keysFunc The function to get the keys of `object`.
4690
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
4691
+ * @returns {Array} Returns the array of property names and symbols.
4692
+ */function baseGetAllKeys(object,keysFunc,symbolsFunc){var result=keysFunc(object);return isArray(object)?result:arrayPush(result,symbolsFunc(object));}/**
4693
+ * The base implementation of `getTag`.
4694
+ *
4695
+ * @private
4696
+ * @param {*} value The value to query.
4697
+ * @returns {string} Returns the `toStringTag`.
4698
+ */function baseGetTag(value){return objectToString.call(value);}/**
4699
+ * The base implementation of `_.isNative` without bad shim checks.
4700
+ *
4701
+ * @private
4702
+ * @param {*} value The value to check.
4703
+ * @returns {boolean} Returns `true` if `value` is a native function,
4704
+ * else `false`.
4705
+ */function baseIsNative(value){if(!isObject(value)||isMasked(value)){return false;}var pattern=isFunction(value)||isHostObject(value)?reIsNative:reIsHostCtor;return pattern.test(toSource(value));}/**
4706
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
4707
+ *
4708
+ * @private
4709
+ * @param {Object} object The object to query.
4710
+ * @returns {Array} Returns the array of property names.
4711
+ */function baseKeys(object){if(!isPrototype(object)){return nativeKeys(object);}var result=[];for(var key in Object(object)){if(hasOwnProperty.call(object,key)&&key!='constructor'){result.push(key);}}return result;}/**
4712
+ * Creates a clone of `buffer`.
4713
+ *
4714
+ * @private
4715
+ * @param {Buffer} buffer The buffer to clone.
4716
+ * @param {boolean} [isDeep] Specify a deep clone.
4717
+ * @returns {Buffer} Returns the cloned buffer.
4718
+ */function cloneBuffer(buffer,isDeep){if(isDeep){return buffer.slice();}var result=new buffer.constructor(buffer.length);buffer.copy(result);return result;}/**
4719
+ * Creates a clone of `arrayBuffer`.
4720
+ *
4721
+ * @private
4722
+ * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
4723
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
4724
+ */function cloneArrayBuffer(arrayBuffer){var result=new arrayBuffer.constructor(arrayBuffer.byteLength);new Uint8Array(result).set(new Uint8Array(arrayBuffer));return result;}/**
4725
+ * Creates a clone of `dataView`.
4726
+ *
4727
+ * @private
4728
+ * @param {Object} dataView The data view to clone.
4729
+ * @param {boolean} [isDeep] Specify a deep clone.
4730
+ * @returns {Object} Returns the cloned data view.
4731
+ */function cloneDataView(dataView,isDeep){var buffer=isDeep?cloneArrayBuffer(dataView.buffer):dataView.buffer;return new dataView.constructor(buffer,dataView.byteOffset,dataView.byteLength);}/**
4732
+ * Creates a clone of `map`.
4733
+ *
4734
+ * @private
4735
+ * @param {Object} map The map to clone.
4736
+ * @param {Function} cloneFunc The function to clone values.
4737
+ * @param {boolean} [isDeep] Specify a deep clone.
4738
+ * @returns {Object} Returns the cloned map.
4739
+ */function cloneMap(map,isDeep,cloneFunc){var array=isDeep?cloneFunc(mapToArray(map),true):mapToArray(map);return arrayReduce(array,addMapEntry,new map.constructor());}/**
4740
+ * Creates a clone of `regexp`.
4741
+ *
4742
+ * @private
4743
+ * @param {Object} regexp The regexp to clone.
4744
+ * @returns {Object} Returns the cloned regexp.
4745
+ */function cloneRegExp(regexp){var result=new regexp.constructor(regexp.source,reFlags.exec(regexp));result.lastIndex=regexp.lastIndex;return result;}/**
4746
+ * Creates a clone of `set`.
4747
+ *
4748
+ * @private
4749
+ * @param {Object} set The set to clone.
4750
+ * @param {Function} cloneFunc The function to clone values.
4751
+ * @param {boolean} [isDeep] Specify a deep clone.
4752
+ * @returns {Object} Returns the cloned set.
4753
+ */function cloneSet(set,isDeep,cloneFunc){var array=isDeep?cloneFunc(setToArray(set),true):setToArray(set);return arrayReduce(array,addSetEntry,new set.constructor());}/**
4754
+ * Creates a clone of the `symbol` object.
4755
+ *
4756
+ * @private
4757
+ * @param {Object} symbol The symbol object to clone.
4758
+ * @returns {Object} Returns the cloned symbol object.
4759
+ */function cloneSymbol(symbol){return symbolValueOf?Object(symbolValueOf.call(symbol)):{};}/**
4760
+ * Creates a clone of `typedArray`.
4761
+ *
4762
+ * @private
4763
+ * @param {Object} typedArray The typed array to clone.
4764
+ * @param {boolean} [isDeep] Specify a deep clone.
4765
+ * @returns {Object} Returns the cloned typed array.
4766
+ */function cloneTypedArray(typedArray,isDeep){var buffer=isDeep?cloneArrayBuffer(typedArray.buffer):typedArray.buffer;return new typedArray.constructor(buffer,typedArray.byteOffset,typedArray.length);}/**
4767
+ * Copies the values of `source` to `array`.
4768
+ *
4769
+ * @private
4770
+ * @param {Array} source The array to copy values from.
4771
+ * @param {Array} [array=[]] The array to copy values to.
4772
+ * @returns {Array} Returns `array`.
4773
+ */function copyArray(source,array){var index=-1,length=source.length;array||(array=Array(length));while(++index<length){array[index]=source[index];}return array;}/**
4774
+ * Copies properties of `source` to `object`.
4775
+ *
4776
+ * @private
4777
+ * @param {Object} source The object to copy properties from.
4778
+ * @param {Array} props The property identifiers to copy.
4779
+ * @param {Object} [object={}] The object to copy properties to.
4780
+ * @param {Function} [customizer] The function to customize copied values.
4781
+ * @returns {Object} Returns `object`.
4782
+ */function copyObject(source,props,object,customizer){object||(object={});var index=-1,length=props.length;while(++index<length){var key=props[index];var newValue=customizer?customizer(object[key],source[key],key,object,source):undefined;assignValue(object,key,newValue===undefined?source[key]:newValue);}return object;}/**
4783
+ * Copies own symbol properties of `source` to `object`.
4784
+ *
4785
+ * @private
4786
+ * @param {Object} source The object to copy symbols from.
4787
+ * @param {Object} [object={}] The object to copy symbols to.
4788
+ * @returns {Object} Returns `object`.
4789
+ */function copySymbols(source,object){return copyObject(source,getSymbols(source),object);}/**
4790
+ * Creates an array of own enumerable property names and symbols of `object`.
4791
+ *
4792
+ * @private
4793
+ * @param {Object} object The object to query.
4794
+ * @returns {Array} Returns the array of property names and symbols.
4795
+ */function getAllKeys(object){return baseGetAllKeys(object,keys,getSymbols);}/**
4796
+ * Gets the data for `map`.
4797
+ *
4798
+ * @private
4799
+ * @param {Object} map The map to query.
4800
+ * @param {string} key The reference key.
4801
+ * @returns {*} Returns the map data.
4802
+ */function getMapData(map,key){var data=map.__data__;return isKeyable(key)?data[typeof key=='string'?'string':'hash']:data.map;}/**
4803
+ * Gets the native function at `key` of `object`.
4804
+ *
4805
+ * @private
4806
+ * @param {Object} object The object to query.
4807
+ * @param {string} key The key of the method to get.
4808
+ * @returns {*} Returns the function if it's native, else `undefined`.
4809
+ */function getNative(object,key){var value=getValue(object,key);return baseIsNative(value)?value:undefined;}/**
4810
+ * Creates an array of the own enumerable symbol properties of `object`.
4811
+ *
4812
+ * @private
4813
+ * @param {Object} object The object to query.
4814
+ * @returns {Array} Returns the array of symbols.
4815
+ */var getSymbols=nativeGetSymbols?overArg(nativeGetSymbols,Object):stubArray;/**
4816
+ * Gets the `toStringTag` of `value`.
4817
+ *
4818
+ * @private
4819
+ * @param {*} value The value to query.
4820
+ * @returns {string} Returns the `toStringTag`.
4821
+ */var getTag=baseGetTag;// Fallback for data views, maps, sets, and weak maps in IE 11,
4812
4822
  // for data views in Edge < 14, and promises in Node.js.
4813
- if(DataView&&getTag(new DataView(new ArrayBuffer(1)))!=dataViewTag||Map&&getTag(new Map())!=mapTag||Promise&&getTag(Promise.resolve())!=promiseTag||Set&&getTag(new Set())!=setTag||WeakMap&&getTag(new WeakMap())!=weakMapTag){getTag=function getTag(value){var result=objectToString.call(value),Ctor=result==objectTag?value.constructor:undefined,ctorString=Ctor?toSource(Ctor):undefined;if(ctorString){switch(ctorString){case dataViewCtorString:return dataViewTag;case mapCtorString:return mapTag;case promiseCtorString:return promiseTag;case setCtorString:return setTag;case weakMapCtorString:return weakMapTag;}}return result;};}/**
4814
- * Initializes an array clone.
4815
- *
4816
- * @private
4817
- * @param {Array} array The array to clone.
4818
- * @returns {Array} Returns the initialized clone.
4819
- */function initCloneArray(array){var length=array.length,result=array.constructor(length);// Add properties assigned by `RegExp#exec`.
4820
- if(length&&typeof array[0]=='string'&&hasOwnProperty.call(array,'index')){result.index=array.index;result.input=array.input;}return result;}/**
4821
- * Initializes an object clone.
4822
- *
4823
- * @private
4824
- * @param {Object} object The object to clone.
4825
- * @returns {Object} Returns the initialized clone.
4826
- */function initCloneObject(object){return typeof object.constructor=='function'&&!isPrototype(object)?baseCreate(getPrototype(object)):{};}/**
4827
- * Initializes an object clone based on its `toStringTag`.
4828
- *
4829
- * **Note:** This function only supports cloning values with tags of
4830
- * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
4831
- *
4832
- * @private
4833
- * @param {Object} object The object to clone.
4834
- * @param {string} tag The `toStringTag` of the object to clone.
4835
- * @param {Function} cloneFunc The function to clone values.
4836
- * @param {boolean} [isDeep] Specify a deep clone.
4837
- * @returns {Object} Returns the initialized clone.
4838
- */function initCloneByTag(object,tag,cloneFunc,isDeep){var Ctor=object.constructor;switch(tag){case arrayBufferTag:return cloneArrayBuffer(object);case boolTag:case dateTag:return new Ctor(+object);case dataViewTag:return cloneDataView(object,isDeep);case float32Tag:case float64Tag:case int8Tag:case int16Tag:case int32Tag:case uint8Tag:case uint8ClampedTag:case uint16Tag:case uint32Tag:return cloneTypedArray(object,isDeep);case mapTag:return cloneMap(object,isDeep,cloneFunc);case numberTag:case stringTag:return new Ctor(object);case regexpTag:return cloneRegExp(object);case setTag:return cloneSet(object,isDeep,cloneFunc);case symbolTag:return cloneSymbol(object);}}/**
4839
- * Checks if `value` is a valid array-like index.
4840
- *
4841
- * @private
4842
- * @param {*} value The value to check.
4843
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
4844
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
4845
- */function isIndex(value,length){length=length==null?MAX_SAFE_INTEGER:length;return !!length&&(typeof value=='number'||reIsUint.test(value))&&value>-1&&value%1==0&&value<length;}/**
4846
- * Checks if `value` is suitable for use as unique object key.
4847
- *
4848
- * @private
4849
- * @param {*} value The value to check.
4850
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
4851
- */function isKeyable(value){var type=_typeof(value);return type=='string'||type=='number'||type=='symbol'||type=='boolean'?value!=='__proto__':value===null;}/**
4852
- * Checks if `func` has its source masked.
4853
- *
4854
- * @private
4855
- * @param {Function} func The function to check.
4856
- * @returns {boolean} Returns `true` if `func` is masked, else `false`.
4857
- */function isMasked(func){return !!maskSrcKey&&maskSrcKey in func;}/**
4858
- * Checks if `value` is likely a prototype object.
4859
- *
4860
- * @private
4861
- * @param {*} value The value to check.
4862
- * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
4863
- */function isPrototype(value){var Ctor=value&&value.constructor,proto=typeof Ctor=='function'&&Ctor.prototype||objectProto;return value===proto;}/**
4864
- * Converts `func` to its source code.
4865
- *
4866
- * @private
4867
- * @param {Function} func The function to process.
4868
- * @returns {string} Returns the source code.
4869
- */function toSource(func){if(func!=null){try{return funcToString.call(func);}catch(e){}try{return func+'';}catch(e){}}return '';}/**
4870
- * This method is like `_.clone` except that it recursively clones `value`.
4871
- *
4872
- * @static
4873
- * @memberOf _
4874
- * @since 1.0.0
4875
- * @category Lang
4876
- * @param {*} value The value to recursively clone.
4877
- * @returns {*} Returns the deep cloned value.
4878
- * @see _.clone
4879
- * @example
4880
- *
4881
- * var objects = [{ 'a': 1 }, { 'b': 2 }];
4882
- *
4883
- * var deep = _.cloneDeep(objects);
4884
- * console.log(deep[0] === objects[0]);
4885
- * // => false
4886
- */function cloneDeep(value){return baseClone(value,true,true);}/**
4887
- * Performs a
4888
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
4889
- * comparison between two values to determine if they are equivalent.
4890
- *
4891
- * @static
4892
- * @memberOf _
4893
- * @since 4.0.0
4894
- * @category Lang
4895
- * @param {*} value The value to compare.
4896
- * @param {*} other The other value to compare.
4897
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
4898
- * @example
4899
- *
4900
- * var object = { 'a': 1 };
4901
- * var other = { 'a': 1 };
4902
- *
4903
- * _.eq(object, object);
4904
- * // => true
4905
- *
4906
- * _.eq(object, other);
4907
- * // => false
4908
- *
4909
- * _.eq('a', 'a');
4910
- * // => true
4911
- *
4912
- * _.eq('a', Object('a'));
4913
- * // => false
4914
- *
4915
- * _.eq(NaN, NaN);
4916
- * // => true
4917
- */function eq(value,other){return value===other||value!==value&&other!==other;}/**
4918
- * Checks if `value` is likely an `arguments` object.
4919
- *
4920
- * @static
4921
- * @memberOf _
4922
- * @since 0.1.0
4923
- * @category Lang
4924
- * @param {*} value The value to check.
4925
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
4926
- * else `false`.
4927
- * @example
4928
- *
4929
- * _.isArguments(function() { return arguments; }());
4930
- * // => true
4931
- *
4932
- * _.isArguments([1, 2, 3]);
4933
- * // => false
4934
- */function isArguments(value){// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
4935
- return isArrayLikeObject(value)&&hasOwnProperty.call(value,'callee')&&(!propertyIsEnumerable.call(value,'callee')||objectToString.call(value)==argsTag);}/**
4936
- * Checks if `value` is classified as an `Array` object.
4937
- *
4938
- * @static
4939
- * @memberOf _
4940
- * @since 0.1.0
4941
- * @category Lang
4942
- * @param {*} value The value to check.
4943
- * @returns {boolean} Returns `true` if `value` is an array, else `false`.
4944
- * @example
4945
- *
4946
- * _.isArray([1, 2, 3]);
4947
- * // => true
4948
- *
4949
- * _.isArray(document.body.children);
4950
- * // => false
4951
- *
4952
- * _.isArray('abc');
4953
- * // => false
4954
- *
4955
- * _.isArray(_.noop);
4956
- * // => false
4957
- */var isArray=Array.isArray;/**
4958
- * Checks if `value` is array-like. A value is considered array-like if it's
4959
- * not a function and has a `value.length` that's an integer greater than or
4960
- * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
4961
- *
4962
- * @static
4963
- * @memberOf _
4964
- * @since 4.0.0
4965
- * @category Lang
4966
- * @param {*} value The value to check.
4967
- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
4968
- * @example
4969
- *
4970
- * _.isArrayLike([1, 2, 3]);
4971
- * // => true
4972
- *
4973
- * _.isArrayLike(document.body.children);
4974
- * // => true
4975
- *
4976
- * _.isArrayLike('abc');
4977
- * // => true
4978
- *
4979
- * _.isArrayLike(_.noop);
4980
- * // => false
4981
- */function isArrayLike(value){return value!=null&&isLength(value.length)&&!isFunction(value);}/**
4982
- * This method is like `_.isArrayLike` except that it also checks if `value`
4983
- * is an object.
4984
- *
4985
- * @static
4986
- * @memberOf _
4987
- * @since 4.0.0
4988
- * @category Lang
4989
- * @param {*} value The value to check.
4990
- * @returns {boolean} Returns `true` if `value` is an array-like object,
4991
- * else `false`.
4992
- * @example
4993
- *
4994
- * _.isArrayLikeObject([1, 2, 3]);
4995
- * // => true
4996
- *
4997
- * _.isArrayLikeObject(document.body.children);
4998
- * // => true
4999
- *
5000
- * _.isArrayLikeObject('abc');
5001
- * // => false
5002
- *
5003
- * _.isArrayLikeObject(_.noop);
5004
- * // => false
5005
- */function isArrayLikeObject(value){return isObjectLike(value)&&isArrayLike(value);}/**
5006
- * Checks if `value` is a buffer.
5007
- *
5008
- * @static
5009
- * @memberOf _
5010
- * @since 4.3.0
5011
- * @category Lang
5012
- * @param {*} value The value to check.
5013
- * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
5014
- * @example
5015
- *
5016
- * _.isBuffer(new Buffer(2));
5017
- * // => true
5018
- *
5019
- * _.isBuffer(new Uint8Array(2));
5020
- * // => false
5021
- */var isBuffer=nativeIsBuffer||stubFalse;/**
5022
- * Checks if `value` is classified as a `Function` object.
5023
- *
5024
- * @static
5025
- * @memberOf _
5026
- * @since 0.1.0
5027
- * @category Lang
5028
- * @param {*} value The value to check.
5029
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
5030
- * @example
5031
- *
5032
- * _.isFunction(_);
5033
- * // => true
5034
- *
5035
- * _.isFunction(/abc/);
5036
- * // => false
5037
- */function isFunction(value){// The use of `Object#toString` avoids issues with the `typeof` operator
4823
+ if(DataView&&getTag(new DataView(new ArrayBuffer(1)))!=dataViewTag||Map&&getTag(new Map())!=mapTag||Promise&&getTag(Promise.resolve())!=promiseTag||Set&&getTag(new Set())!=setTag||WeakMap&&getTag(new WeakMap())!=weakMapTag){getTag=function getTag(value){var result=objectToString.call(value),Ctor=result==objectTag?value.constructor:undefined,ctorString=Ctor?toSource(Ctor):undefined;if(ctorString){switch(ctorString){case dataViewCtorString:return dataViewTag;case mapCtorString:return mapTag;case promiseCtorString:return promiseTag;case setCtorString:return setTag;case weakMapCtorString:return weakMapTag;}}return result;};}/**
4824
+ * Initializes an array clone.
4825
+ *
4826
+ * @private
4827
+ * @param {Array} array The array to clone.
4828
+ * @returns {Array} Returns the initialized clone.
4829
+ */function initCloneArray(array){var length=array.length,result=array.constructor(length);// Add properties assigned by `RegExp#exec`.
4830
+ if(length&&typeof array[0]=='string'&&hasOwnProperty.call(array,'index')){result.index=array.index;result.input=array.input;}return result;}/**
4831
+ * Initializes an object clone.
4832
+ *
4833
+ * @private
4834
+ * @param {Object} object The object to clone.
4835
+ * @returns {Object} Returns the initialized clone.
4836
+ */function initCloneObject(object){return typeof object.constructor=='function'&&!isPrototype(object)?baseCreate(getPrototype(object)):{};}/**
4837
+ * Initializes an object clone based on its `toStringTag`.
4838
+ *
4839
+ * **Note:** This function only supports cloning values with tags of
4840
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
4841
+ *
4842
+ * @private
4843
+ * @param {Object} object The object to clone.
4844
+ * @param {string} tag The `toStringTag` of the object to clone.
4845
+ * @param {Function} cloneFunc The function to clone values.
4846
+ * @param {boolean} [isDeep] Specify a deep clone.
4847
+ * @returns {Object} Returns the initialized clone.
4848
+ */function initCloneByTag(object,tag,cloneFunc,isDeep){var Ctor=object.constructor;switch(tag){case arrayBufferTag:return cloneArrayBuffer(object);case boolTag:case dateTag:return new Ctor(+object);case dataViewTag:return cloneDataView(object,isDeep);case float32Tag:case float64Tag:case int8Tag:case int16Tag:case int32Tag:case uint8Tag:case uint8ClampedTag:case uint16Tag:case uint32Tag:return cloneTypedArray(object,isDeep);case mapTag:return cloneMap(object,isDeep,cloneFunc);case numberTag:case stringTag:return new Ctor(object);case regexpTag:return cloneRegExp(object);case setTag:return cloneSet(object,isDeep,cloneFunc);case symbolTag:return cloneSymbol(object);}}/**
4849
+ * Checks if `value` is a valid array-like index.
4850
+ *
4851
+ * @private
4852
+ * @param {*} value The value to check.
4853
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
4854
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
4855
+ */function isIndex(value,length){length=length==null?MAX_SAFE_INTEGER:length;return !!length&&(typeof value=='number'||reIsUint.test(value))&&value>-1&&value%1==0&&value<length;}/**
4856
+ * Checks if `value` is suitable for use as unique object key.
4857
+ *
4858
+ * @private
4859
+ * @param {*} value The value to check.
4860
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
4861
+ */function isKeyable(value){var type=_typeof(value);return type=='string'||type=='number'||type=='symbol'||type=='boolean'?value!=='__proto__':value===null;}/**
4862
+ * Checks if `func` has its source masked.
4863
+ *
4864
+ * @private
4865
+ * @param {Function} func The function to check.
4866
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
4867
+ */function isMasked(func){return !!maskSrcKey&&maskSrcKey in func;}/**
4868
+ * Checks if `value` is likely a prototype object.
4869
+ *
4870
+ * @private
4871
+ * @param {*} value The value to check.
4872
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
4873
+ */function isPrototype(value){var Ctor=value&&value.constructor,proto=typeof Ctor=='function'&&Ctor.prototype||objectProto;return value===proto;}/**
4874
+ * Converts `func` to its source code.
4875
+ *
4876
+ * @private
4877
+ * @param {Function} func The function to process.
4878
+ * @returns {string} Returns the source code.
4879
+ */function toSource(func){if(func!=null){try{return funcToString.call(func);}catch(e){}try{return func+'';}catch(e){}}return '';}/**
4880
+ * This method is like `_.clone` except that it recursively clones `value`.
4881
+ *
4882
+ * @static
4883
+ * @memberOf _
4884
+ * @since 1.0.0
4885
+ * @category Lang
4886
+ * @param {*} value The value to recursively clone.
4887
+ * @returns {*} Returns the deep cloned value.
4888
+ * @see _.clone
4889
+ * @example
4890
+ *
4891
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
4892
+ *
4893
+ * var deep = _.cloneDeep(objects);
4894
+ * console.log(deep[0] === objects[0]);
4895
+ * // => false
4896
+ */function cloneDeep(value){return baseClone(value,true,true);}/**
4897
+ * Performs a
4898
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
4899
+ * comparison between two values to determine if they are equivalent.
4900
+ *
4901
+ * @static
4902
+ * @memberOf _
4903
+ * @since 4.0.0
4904
+ * @category Lang
4905
+ * @param {*} value The value to compare.
4906
+ * @param {*} other The other value to compare.
4907
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
4908
+ * @example
4909
+ *
4910
+ * var object = { 'a': 1 };
4911
+ * var other = { 'a': 1 };
4912
+ *
4913
+ * _.eq(object, object);
4914
+ * // => true
4915
+ *
4916
+ * _.eq(object, other);
4917
+ * // => false
4918
+ *
4919
+ * _.eq('a', 'a');
4920
+ * // => true
4921
+ *
4922
+ * _.eq('a', Object('a'));
4923
+ * // => false
4924
+ *
4925
+ * _.eq(NaN, NaN);
4926
+ * // => true
4927
+ */function eq(value,other){return value===other||value!==value&&other!==other;}/**
4928
+ * Checks if `value` is likely an `arguments` object.
4929
+ *
4930
+ * @static
4931
+ * @memberOf _
4932
+ * @since 0.1.0
4933
+ * @category Lang
4934
+ * @param {*} value The value to check.
4935
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
4936
+ * else `false`.
4937
+ * @example
4938
+ *
4939
+ * _.isArguments(function() { return arguments; }());
4940
+ * // => true
4941
+ *
4942
+ * _.isArguments([1, 2, 3]);
4943
+ * // => false
4944
+ */function isArguments(value){// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
4945
+ return isArrayLikeObject(value)&&hasOwnProperty.call(value,'callee')&&(!propertyIsEnumerable.call(value,'callee')||objectToString.call(value)==argsTag);}/**
4946
+ * Checks if `value` is classified as an `Array` object.
4947
+ *
4948
+ * @static
4949
+ * @memberOf _
4950
+ * @since 0.1.0
4951
+ * @category Lang
4952
+ * @param {*} value The value to check.
4953
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
4954
+ * @example
4955
+ *
4956
+ * _.isArray([1, 2, 3]);
4957
+ * // => true
4958
+ *
4959
+ * _.isArray(document.body.children);
4960
+ * // => false
4961
+ *
4962
+ * _.isArray('abc');
4963
+ * // => false
4964
+ *
4965
+ * _.isArray(_.noop);
4966
+ * // => false
4967
+ */var isArray=Array.isArray;/**
4968
+ * Checks if `value` is array-like. A value is considered array-like if it's
4969
+ * not a function and has a `value.length` that's an integer greater than or
4970
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
4971
+ *
4972
+ * @static
4973
+ * @memberOf _
4974
+ * @since 4.0.0
4975
+ * @category Lang
4976
+ * @param {*} value The value to check.
4977
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
4978
+ * @example
4979
+ *
4980
+ * _.isArrayLike([1, 2, 3]);
4981
+ * // => true
4982
+ *
4983
+ * _.isArrayLike(document.body.children);
4984
+ * // => true
4985
+ *
4986
+ * _.isArrayLike('abc');
4987
+ * // => true
4988
+ *
4989
+ * _.isArrayLike(_.noop);
4990
+ * // => false
4991
+ */function isArrayLike(value){return value!=null&&isLength(value.length)&&!isFunction(value);}/**
4992
+ * This method is like `_.isArrayLike` except that it also checks if `value`
4993
+ * is an object.
4994
+ *
4995
+ * @static
4996
+ * @memberOf _
4997
+ * @since 4.0.0
4998
+ * @category Lang
4999
+ * @param {*} value The value to check.
5000
+ * @returns {boolean} Returns `true` if `value` is an array-like object,
5001
+ * else `false`.
5002
+ * @example
5003
+ *
5004
+ * _.isArrayLikeObject([1, 2, 3]);
5005
+ * // => true
5006
+ *
5007
+ * _.isArrayLikeObject(document.body.children);
5008
+ * // => true
5009
+ *
5010
+ * _.isArrayLikeObject('abc');
5011
+ * // => false
5012
+ *
5013
+ * _.isArrayLikeObject(_.noop);
5014
+ * // => false
5015
+ */function isArrayLikeObject(value){return isObjectLike(value)&&isArrayLike(value);}/**
5016
+ * Checks if `value` is a buffer.
5017
+ *
5018
+ * @static
5019
+ * @memberOf _
5020
+ * @since 4.3.0
5021
+ * @category Lang
5022
+ * @param {*} value The value to check.
5023
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
5024
+ * @example
5025
+ *
5026
+ * _.isBuffer(new Buffer(2));
5027
+ * // => true
5028
+ *
5029
+ * _.isBuffer(new Uint8Array(2));
5030
+ * // => false
5031
+ */var isBuffer=nativeIsBuffer||stubFalse;/**
5032
+ * Checks if `value` is classified as a `Function` object.
5033
+ *
5034
+ * @static
5035
+ * @memberOf _
5036
+ * @since 0.1.0
5037
+ * @category Lang
5038
+ * @param {*} value The value to check.
5039
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
5040
+ * @example
5041
+ *
5042
+ * _.isFunction(_);
5043
+ * // => true
5044
+ *
5045
+ * _.isFunction(/abc/);
5046
+ * // => false
5047
+ */function isFunction(value){// The use of `Object#toString` avoids issues with the `typeof` operator
5038
5048
  // in Safari 8-9 which returns 'object' for typed array and other constructors.
5039
- var tag=isObject(value)?objectToString.call(value):'';return tag==funcTag||tag==genTag;}/**
5040
- * Checks if `value` is a valid array-like length.
5041
- *
5042
- * **Note:** This method is loosely based on
5043
- * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
5044
- *
5045
- * @static
5046
- * @memberOf _
5047
- * @since 4.0.0
5048
- * @category Lang
5049
- * @param {*} value The value to check.
5050
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
5051
- * @example
5052
- *
5053
- * _.isLength(3);
5054
- * // => true
5055
- *
5056
- * _.isLength(Number.MIN_VALUE);
5057
- * // => false
5058
- *
5059
- * _.isLength(Infinity);
5060
- * // => false
5061
- *
5062
- * _.isLength('3');
5063
- * // => false
5064
- */function isLength(value){return typeof value=='number'&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER;}/**
5065
- * Checks if `value` is the
5066
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
5067
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
5068
- *
5069
- * @static
5070
- * @memberOf _
5071
- * @since 0.1.0
5072
- * @category Lang
5073
- * @param {*} value The value to check.
5074
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
5075
- * @example
5076
- *
5077
- * _.isObject({});
5078
- * // => true
5079
- *
5080
- * _.isObject([1, 2, 3]);
5081
- * // => true
5082
- *
5083
- * _.isObject(_.noop);
5084
- * // => true
5085
- *
5086
- * _.isObject(null);
5087
- * // => false
5088
- */function isObject(value){var type=_typeof(value);return !!value&&(type=='object'||type=='function');}/**
5089
- * Checks if `value` is object-like. A value is object-like if it's not `null`
5090
- * and has a `typeof` result of "object".
5091
- *
5092
- * @static
5093
- * @memberOf _
5094
- * @since 4.0.0
5095
- * @category Lang
5096
- * @param {*} value The value to check.
5097
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
5098
- * @example
5099
- *
5100
- * _.isObjectLike({});
5101
- * // => true
5102
- *
5103
- * _.isObjectLike([1, 2, 3]);
5104
- * // => true
5105
- *
5106
- * _.isObjectLike(_.noop);
5107
- * // => false
5108
- *
5109
- * _.isObjectLike(null);
5110
- * // => false
5111
- */function isObjectLike(value){return !!value&&_typeof(value)=='object';}/**
5112
- * Creates an array of the own enumerable property names of `object`.
5113
- *
5114
- * **Note:** Non-object values are coerced to objects. See the
5115
- * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
5116
- * for more details.
5117
- *
5118
- * @static
5119
- * @since 0.1.0
5120
- * @memberOf _
5121
- * @category Object
5122
- * @param {Object} object The object to query.
5123
- * @returns {Array} Returns the array of property names.
5124
- * @example
5125
- *
5126
- * function Foo() {
5127
- * this.a = 1;
5128
- * this.b = 2;
5129
- * }
5130
- *
5131
- * Foo.prototype.c = 3;
5132
- *
5133
- * _.keys(new Foo);
5134
- * // => ['a', 'b'] (iteration order is not guaranteed)
5135
- *
5136
- * _.keys('hi');
5137
- * // => ['0', '1']
5138
- */function keys(object){return isArrayLike(object)?arrayLikeKeys(object):baseKeys(object);}/**
5139
- * This method returns a new empty array.
5140
- *
5141
- * @static
5142
- * @memberOf _
5143
- * @since 4.13.0
5144
- * @category Util
5145
- * @returns {Array} Returns the new empty array.
5146
- * @example
5147
- *
5148
- * var arrays = _.times(2, _.stubArray);
5149
- *
5150
- * console.log(arrays);
5151
- * // => [[], []]
5152
- *
5153
- * console.log(arrays[0] === arrays[1]);
5154
- * // => false
5155
- */function stubArray(){return [];}/**
5156
- * This method returns `false`.
5157
- *
5158
- * @static
5159
- * @memberOf _
5160
- * @since 4.13.0
5161
- * @category Util
5162
- * @returns {boolean} Returns `false`.
5163
- * @example
5164
- *
5165
- * _.times(2, _.stubFalse);
5166
- * // => [false, false]
5167
- */function stubFalse(){return false;}module.exports=cloneDeep;})(lodash_clonedeep,lodash_clonedeep.exports);var lodash_clonedeepExports=lodash_clonedeep.exports;var cloneDeep = /*@__PURE__*/getDefaultExportFromCjs(lodash_clonedeepExports);
5168
-
5169
- /**
5170
- * - Create a request object
5171
- * - Get response body
5172
- * - Check if timeout
5173
- */function fetchAdapter(_x){return _fetchAdapter.apply(this,arguments);}/**
5174
- * Fetch API stage two is to get response body. This funtion tries to retrieve
5175
- * response body based on response's type
5176
- */function _fetchAdapter(){_fetchAdapter=_asyncToGenerator$1(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(config){var request,promiseChain,data;return _regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:request=createRequest(config);promiseChain=[getResponse(request,config)];if(config.timeout&&config.timeout>0){promiseChain.push(new Promise(function(res){setTimeout(function(){var message=config.timeoutErrorMessage?config.timeoutErrorMessage:'timeout of '+config.timeout+'ms exceeded';res(createError(message,config,'ECONNABORTED',request));},config.timeout);}));}_context.next=5;return Promise.race(promiseChain);case 5:data=_context.sent;return _context.abrupt("return",new Promise(function(resolve,reject){if(data instanceof Error){reject(data);}else {Object.prototype.toString.call(config.settle)==='[object Function]'?config.settle(resolve,reject,data):settle$1(resolve,reject,data);}}));case 7:case"end":return _context.stop();}},_callee);}));return _fetchAdapter.apply(this,arguments);}function getResponse(_x2,_x3){return _getResponse.apply(this,arguments);}/**
5177
- * This function will create a Request object based on configuration's axios
5049
+ var tag=isObject(value)?objectToString.call(value):'';return tag==funcTag||tag==genTag;}/**
5050
+ * Checks if `value` is a valid array-like length.
5051
+ *
5052
+ * **Note:** This method is loosely based on
5053
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
5054
+ *
5055
+ * @static
5056
+ * @memberOf _
5057
+ * @since 4.0.0
5058
+ * @category Lang
5059
+ * @param {*} value The value to check.
5060
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
5061
+ * @example
5062
+ *
5063
+ * _.isLength(3);
5064
+ * // => true
5065
+ *
5066
+ * _.isLength(Number.MIN_VALUE);
5067
+ * // => false
5068
+ *
5069
+ * _.isLength(Infinity);
5070
+ * // => false
5071
+ *
5072
+ * _.isLength('3');
5073
+ * // => false
5074
+ */function isLength(value){return typeof value=='number'&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER;}/**
5075
+ * Checks if `value` is the
5076
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
5077
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
5078
+ *
5079
+ * @static
5080
+ * @memberOf _
5081
+ * @since 0.1.0
5082
+ * @category Lang
5083
+ * @param {*} value The value to check.
5084
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
5085
+ * @example
5086
+ *
5087
+ * _.isObject({});
5088
+ * // => true
5089
+ *
5090
+ * _.isObject([1, 2, 3]);
5091
+ * // => true
5092
+ *
5093
+ * _.isObject(_.noop);
5094
+ * // => true
5095
+ *
5096
+ * _.isObject(null);
5097
+ * // => false
5098
+ */function isObject(value){var type=_typeof(value);return !!value&&(type=='object'||type=='function');}/**
5099
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
5100
+ * and has a `typeof` result of "object".
5101
+ *
5102
+ * @static
5103
+ * @memberOf _
5104
+ * @since 4.0.0
5105
+ * @category Lang
5106
+ * @param {*} value The value to check.
5107
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
5108
+ * @example
5109
+ *
5110
+ * _.isObjectLike({});
5111
+ * // => true
5112
+ *
5113
+ * _.isObjectLike([1, 2, 3]);
5114
+ * // => true
5115
+ *
5116
+ * _.isObjectLike(_.noop);
5117
+ * // => false
5118
+ *
5119
+ * _.isObjectLike(null);
5120
+ * // => false
5121
+ */function isObjectLike(value){return !!value&&_typeof(value)=='object';}/**
5122
+ * Creates an array of the own enumerable property names of `object`.
5123
+ *
5124
+ * **Note:** Non-object values are coerced to objects. See the
5125
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
5126
+ * for more details.
5127
+ *
5128
+ * @static
5129
+ * @since 0.1.0
5130
+ * @memberOf _
5131
+ * @category Object
5132
+ * @param {Object} object The object to query.
5133
+ * @returns {Array} Returns the array of property names.
5134
+ * @example
5135
+ *
5136
+ * function Foo() {
5137
+ * this.a = 1;
5138
+ * this.b = 2;
5139
+ * }
5140
+ *
5141
+ * Foo.prototype.c = 3;
5142
+ *
5143
+ * _.keys(new Foo);
5144
+ * // => ['a', 'b'] (iteration order is not guaranteed)
5145
+ *
5146
+ * _.keys('hi');
5147
+ * // => ['0', '1']
5148
+ */function keys(object){return isArrayLike(object)?arrayLikeKeys(object):baseKeys(object);}/**
5149
+ * This method returns a new empty array.
5150
+ *
5151
+ * @static
5152
+ * @memberOf _
5153
+ * @since 4.13.0
5154
+ * @category Util
5155
+ * @returns {Array} Returns the new empty array.
5156
+ * @example
5157
+ *
5158
+ * var arrays = _.times(2, _.stubArray);
5159
+ *
5160
+ * console.log(arrays);
5161
+ * // => [[], []]
5162
+ *
5163
+ * console.log(arrays[0] === arrays[1]);
5164
+ * // => false
5165
+ */function stubArray(){return [];}/**
5166
+ * This method returns `false`.
5167
+ *
5168
+ * @static
5169
+ * @memberOf _
5170
+ * @since 4.13.0
5171
+ * @category Util
5172
+ * @returns {boolean} Returns `false`.
5173
+ * @example
5174
+ *
5175
+ * _.times(2, _.stubFalse);
5176
+ * // => [false, false]
5177
+ */function stubFalse(){return false;}module.exports=cloneDeep;})(lodash_clonedeep,lodash_clonedeepExports);var cloneDeep = lodash_clonedeepExports;
5178
+
5179
+ /**
5180
+ * - Create a request object
5181
+ * - Get response body
5182
+ * - Check if timeout
5183
+ */function fetchAdapter(_x){return _fetchAdapter.apply(this,arguments);}/**
5184
+ * Fetch API stage two is to get response body. This funtion tries to retrieve
5185
+ * response body based on response's type
5186
+ */function _fetchAdapter(){_fetchAdapter=_asyncToGenerator$1(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(config){var request,promiseChain,data;return _regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:request=createRequest(config);promiseChain=[getResponse(request,config)];if(config.timeout&&config.timeout>0){promiseChain.push(new Promise(function(res){setTimeout(function(){var message=config.timeoutErrorMessage?config.timeoutErrorMessage:'timeout of '+config.timeout+'ms exceeded';res(createError(message,config,'ECONNABORTED',request));},config.timeout);}));}_context.next=5;return Promise.race(promiseChain);case 5:data=_context.sent;return _context.abrupt("return",new Promise(function(resolve,reject){if(data instanceof Error){reject(data);}else {Object.prototype.toString.call(config.settle)==='[object Function]'?config.settle(resolve,reject,data):settle(resolve,reject,data);}}));case 7:case"end":return _context.stop();}},_callee);}));return _fetchAdapter.apply(this,arguments);}function getResponse(_x2,_x3){return _getResponse.apply(this,arguments);}/**
5187
+ * This function will create a Request object based on configuration's axios
5178
5188
  */function _getResponse(){_getResponse=_asyncToGenerator$1(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(request,config){var stageOne,response;return _regeneratorRuntime().wrap(function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.prev=0;_context2.next=3;return fetch(request);case 3:stageOne=_context2.sent;_context2.next=9;break;case 6:_context2.prev=6;_context2.t0=_context2["catch"](0);return _context2.abrupt("return",createError('Network Error',config,'ERR_NETWORK',request));case 9:response={ok:stageOne.ok,status:stageOne.status,statusText:stageOne.statusText,headers:new Headers(stageOne.headers),// Make a copy of headers
5179
- config:config,request:request};if(!(stageOne.status>=200&&stageOne.status!==204)){_context2.next=34;break;}_context2.t1=config.responseType;_context2.next=_context2.t1==='arraybuffer'?14:_context2.t1==='blob'?18:_context2.t1==='json'?22:_context2.t1==='formData'?26:30;break;case 14:_context2.next=16;return stageOne.arrayBuffer();case 16:response.data=_context2.sent;return _context2.abrupt("break",34);case 18:_context2.next=20;return stageOne.blob();case 20:response.data=_context2.sent;return _context2.abrupt("break",34);case 22:_context2.next=24;return stageOne.json();case 24:response.data=_context2.sent;return _context2.abrupt("break",34);case 26:_context2.next=28;return stageOne.formData();case 28:response.data=_context2.sent;return _context2.abrupt("break",34);case 30:_context2.next=32;return stageOne.text();case 32:response.data=_context2.sent;return _context2.abrupt("break",34);case 34:return _context2.abrupt("return",response);case 35:case"end":return _context2.stop();}},_callee2,null,[[0,6]]);}));return _getResponse.apply(this,arguments);}function createRequest(config){var headers=new Headers(config.headers);// HTTP basic authentication
5180
- if(config.auth){var username=config.auth.username||'';var password=config.auth.password?decodeURI(encodeURIComponent(config.auth.password)):'';headers.set('Authorization',"Basic ".concat(btoa(username+':'+password)));}var method=config.method.toUpperCase();var options={headers:headers,method:method};if(method!=='GET'&&method!=='HEAD'){options.body=config.data;// In these cases the browser will automatically set the correct Content-Type,
5189
+ config:config,request:request};if(!(stageOne.status>=200&&stageOne.status!==204)){_context2.next=34;break;}_context2.t1=config.responseType;_context2.next=_context2.t1==='arraybuffer'?14:_context2.t1==='blob'?18:_context2.t1==='json'?22:_context2.t1==='formData'?26:30;break;case 14:_context2.next=16;return stageOne.arrayBuffer();case 16:response.data=_context2.sent;return _context2.abrupt("break",34);case 18:_context2.next=20;return stageOne.blob();case 20:response.data=_context2.sent;return _context2.abrupt("break",34);case 22:_context2.next=24;return stageOne.json();case 24:response.data=_context2.sent;return _context2.abrupt("break",34);case 26:_context2.next=28;return stageOne.formData();case 28:response.data=_context2.sent;return _context2.abrupt("break",34);case 30:_context2.next=32;return stageOne.text();case 32:response.data=_context2.sent;return _context2.abrupt("break",34);case 34:return _context2.abrupt("return",response);case 35:case"end":return _context2.stop();}},_callee2,null,[[0,6]]);}));return _getResponse.apply(this,arguments);}function createRequest(config){var headers=new Headers(config.headers);// HTTP basic authentication
5190
+ if(config.auth){var username=config.auth.username||'';var password=config.auth.password?decodeURI(encodeURIComponent(config.auth.password)):'';headers.set('Authorization',"Basic ".concat(btoa(username+':'+password)));}var method=config.method.toUpperCase();var options={headers:headers,method:method};if(method!=='GET'&&method!=='HEAD'){options.body=config.data;// In these cases the browser will automatically set the correct Content-Type,
5181
5191
  // but only if that header hasn't been set yet. So that's why we're deleting it.
5182
- if(utils$9.isFormData(options.body)&&utils$9.isStandardBrowserEnv()){headers.delete('Content-Type');}}if(config.mode){options.mode=config.mode;}if(config.cache){options.cache=config.cache;}if(config.integrity){options.integrity=config.integrity;}if(config.redirect){options.redirect=config.redirect;}if(config.referrer){options.referrer=config.referrer;}// This config is similar to XHR’s withCredentials flag, but with three available values instead of two.
5192
+ if(utils$9.isFormData(options.body)&&utils$9.isStandardBrowserEnv()){headers.delete('Content-Type');}}if(config.mode){options.mode=config.mode;}if(config.cache){options.cache=config.cache;}if(config.integrity){options.integrity=config.integrity;}if(config.redirect){options.redirect=config.redirect;}if(config.referrer){options.referrer=config.referrer;}// This config is similar to XHR’s withCredentials flag, but with three available values instead of two.
5183
5193
  // So if withCredentials is not set, default value 'same-origin' will be used
5184
- if(!utils$9.isUndefined(config.withCredentials)){options.credentials=config.withCredentials?'include':'omit';}var fullPath=buildFullPath$2(config.baseURL,config.url);var url=buildURL$2(fullPath,config.params,config.paramsSerializer);// Expected browser to throw error if there is any wrong configuration value
5185
- return new Request(url,options);}/**
5186
- * Note:
5187
- *
5188
- * From version >= 0.27.0, createError function is replaced by AxiosError class.
5189
- * So I copy the old createError function here for backward compatible.
5190
- *
5191
- *
5192
- *
5193
- * Create an Error with the specified message, config, error code, request and response.
5194
- *
5195
- * @param {string} message The error message.
5196
- * @param {Object} config The config.
5197
- * @param {string} [code] The error code (for example, 'ECONNABORTED').
5198
- * @param {Object} [request] The request.
5199
- * @param {Object} [response] The response.
5200
- * @returns {Error} The created error.
5201
- */function createError(message,config,code,request,response){if(axios$1.AxiosError&&typeof axios$1.AxiosError==='function'){return new axios$1.AxiosError(message,axios$1.AxiosError[code],config,request,response);}var error=new Error(message);return enhanceError(error,config,code,request,response);}/**
5202
- *
5203
- * Note:
5204
- *
5205
- * This function is for backward compatible.
5206
- *
5207
- *
5208
- * Update an Error with the specified config, error code, and response.
5209
- *
5210
- * @param {Error} error The error to update.
5211
- * @param {Object} config The config.
5212
- * @param {string} [code] The error code (for example, 'ECONNABORTED').
5213
- * @param {Object} [request] The request.
5214
- * @param {Object} [response] The response.
5215
- * @returns {Error} The error.
5194
+ if(!utils$9.isUndefined(config.withCredentials)){options.credentials=config.withCredentials?'include':'omit';}var fullPath=buildFullPath$1(config.baseURL,config.url);var url=buildURL$1(fullPath,config.params,config.paramsSerializer);// Expected browser to throw error if there is any wrong configuration value
5195
+ return new Request(url,options);}/**
5196
+ * Note:
5197
+ *
5198
+ * From version >= 0.27.0, createError function is replaced by AxiosError class.
5199
+ * So I copy the old createError function here for backward compatible.
5200
+ *
5201
+ *
5202
+ *
5203
+ * Create an Error with the specified message, config, error code, request and response.
5204
+ *
5205
+ * @param {string} message The error message.
5206
+ * @param {Object} config The config.
5207
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
5208
+ * @param {Object} [request] The request.
5209
+ * @param {Object} [response] The response.
5210
+ * @returns {Error} The created error.
5211
+ */function createError(message,config,code,request,response){if(axios.AxiosError&&typeof axios.AxiosError==='function'){return new axios.AxiosError(message,axios.AxiosError[code],config,request,response);}var error=new Error(message);return enhanceError(error,config,code,request,response);}/**
5212
+ *
5213
+ * Note:
5214
+ *
5215
+ * This function is for backward compatible.
5216
+ *
5217
+ *
5218
+ * Update an Error with the specified config, error code, and response.
5219
+ *
5220
+ * @param {Error} error The error to update.
5221
+ * @param {Object} config The config.
5222
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
5223
+ * @param {Object} [request] The request.
5224
+ * @param {Object} [response] The response.
5225
+ * @returns {Error} The error.
5216
5226
  */function enhanceError(error,config,code,request,response){error.config=config;if(code){error.code=code;}error.request=request;error.response=response;error.isAxiosError=true;error.toJSON=function toJSON(){return {// Standard
5217
- message:this.message,name:this.name,// Microsoft
5218
- description:this.description,number:this.number,// Mozilla
5219
- fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,// Axios
5220
- config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null};};return error;}
5221
-
5222
- var version='0.0.1';var removeTrailingSlashes=function removeTrailingSlashes(inURL){return inURL&&inURL.endsWith('/')?inURL.replace(/\/+$/,''):inURL;};var isFunction=function isFunction(value){return typeof value==='function'&&Boolean(value.constructor&&value.call&&value.apply);};var setImmediate=browser$1.nextTick.bind(browser$1);var noop=function noop(){};var Analytics=/*#__PURE__*/function(){/**
5223
- * Initialize a new `Analytics` with your RudderStack source's `writeKey` and an
5224
- * optional dictionary of `options`.
5225
- *
5226
- * @param {String} writeKey
5227
- * @param {String} dataPlaneURL
5228
- * @param {Object=} options (optional)
5229
- * @param {Number=20} options.flushAt (default: 20)
5230
- * @param {Number=20000} options.flushInterval (default: 20000)
5231
- * @param {Boolean=true} options.enable (default: true)
5232
- * @param {Number=20000} options.maxInternalQueueSize (default: 20000)
5233
- * @param {Number} options.timeout (default: false)
5234
- * @param {String=info} options.logLevel (default: info)
5235
- * @param {Function} options.flushOverride (optional)
5236
- */function Analytics(writeKey,dataPlaneURL,options){_classCallCheck(this,Analytics);options=options||{};if(!writeKey){throw new Error('You must pass your project\'s write key.');}if(!dataPlaneURL){throw new Error('You must pass our data plane url.');}this.queue=[];this.writeKey=writeKey;this.host=removeTrailingSlashes(dataPlaneURL);this.timeout=options.timeout||false;this.flushAt=Math.max(options.flushAt,1)||20;this.flushInterval=options.flushInterval||20000;this.maxInternalQueueSize=options.maxInternalQueueSize||20000;this.logLevel=options.logLevel||'info';this.flushOverride=options.flushOverride&&isFunction(options.flushOverride)?options.flushOverride:undefined;this.flushed=false;this.axiosInstance=axios$1.create({adapter:fetchAdapter});Object.defineProperty(this,'enable',{configurable:false,writable:false,enumerable:true,value:typeof options.enable==='boolean'?options.enable:true});this.logger={error:function error(message){if(this.logLevel!=='off'){var _console;for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key];}(_console=console).error.apply(_console,["".concat(new Date().toISOString()," [\"Rudder\"] error: ").concat(message)].concat(args));}},info:function info(message){if(['silly','debug','info'].includes(this.logLevel)){var _console2;for(var _len2=arguments.length,args=new Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++){args[_key2-1]=arguments[_key2];}(_console2=console).log.apply(_console2,["".concat(new Date().toISOString()," [\"Rudder\"] info: ").concat(message)].concat(args));}},debug:function debug(message){if(['silly','debug'].includes(this.logLevel)){var _console3;for(var _len3=arguments.length,args=new Array(_len3>1?_len3-1:0),_key3=1;_key3<_len3;_key3++){args[_key3-1]=arguments[_key3];}(_console3=console).debug.apply(_console3,["".concat(new Date().toISOString()," [\"Rudder\"] debug: ").concat(message)].concat(args));}},silly:function silly(message){if(['silly'].includes(this.logLevel)){var _console4;for(var _len4=arguments.length,args=new Array(_len4>1?_len4-1:0),_key4=1;_key4<_len4;_key4++){args[_key4-1]=arguments[_key4];}(_console4=console).info.apply(_console4,["".concat(new Date().toISOString()," [\"Rudder\"] silly: ").concat(message)].concat(args));}}};axiosRetry(this.axiosInstance,{retries:0});}_createClass(Analytics,[{key:"_validate",value:function _validate(message,type){try{looselyValidate(message,type);}catch(e){if(e.message==='Your message must be < 32kb.'){this.logger.info('Your message must be < 32kb. This is currently surfaced as a warning. Please update your code',message);return;}throw e;}}/**
5227
+ message:this.message,name:this.name,// Microsoft
5228
+ description:this.description,number:this.number,// Mozilla
5229
+ fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,// Axios
5230
+ config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null};};return error;}
5231
+
5232
+ var version='2.32.0';var removeTrailingSlashes=function removeTrailingSlashes(inURL){return inURL&&inURL.endsWith('/')?inURL.replace(/\/+$/,''):inURL;};var isFunction=function isFunction(value){return typeof value==='function'&&Boolean(value.constructor&&value.call&&value.apply);};var setImmediate=browser$1.nextTick.bind(browser$1);var noop=function noop(){};var Analytics=/*#__PURE__*/function(){/**
5233
+ * Initialize a new `Analytics` with your RudderStack source's `writeKey` and an
5234
+ * optional dictionary of `options`.
5235
+ *
5236
+ * @param {String} writeKey
5237
+ * @param {String} dataPlaneURL
5238
+ * @param {Object=} options (optional)
5239
+ * @param {Number=20} options.flushAt (default: 20)
5240
+ * @param {Number=20000} options.flushInterval (default: 20000)
5241
+ * @param {Boolean=true} options.enable (default: true)
5242
+ * @param {Number=20000} options.maxInternalQueueSize (default: 20000)
5243
+ * @param {Number} options.timeout (default: false)
5244
+ * @param {String=info} options.logLevel (default: info)
5245
+ */function Analytics(writeKey,dataPlaneURL,options){_classCallCheck(this,Analytics);options=options||{};if(!writeKey){throw new Error('You must pass your project\'s write key.');}if(!dataPlaneURL){throw new Error('You must pass our data plane url.');}this.queue=[];this.writeKey=writeKey;this.host=removeTrailingSlashes(dataPlaneURL);this.timeout=options.timeout||false;this.flushAt=Math.max(options.flushAt,1)||20;this.flushInterval=options.flushInterval||20000;this.maxInternalQueueSize=options.maxInternalQueueSize||20000;this.logLevel=options.logLevel||'info';this.flushOverride=options.flushOverride&&isFunction(options.flushOverride)?options.flushOverride:undefined;this.flushed=false;this.axiosInstance=axios.create({adapter:fetchAdapter});Object.defineProperty(this,'enable',{configurable:false,writable:false,enumerable:true,value:typeof options.enable==='boolean'?options.enable:true});this.logger={error:function error(message){if(this.logLevel!=='off'){var _console;for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key];}(_console=console).error.apply(_console,["".concat(new Date().toISOString()," [\"Rudder\"] error: ").concat(message)].concat(args));}},info:function info(message){if(['silly','debug','info'].includes(this.logLevel)){var _console2;for(var _len2=arguments.length,args=new Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++){args[_key2-1]=arguments[_key2];}(_console2=console).log.apply(_console2,["".concat(new Date().toISOString()," [\"Rudder\"] info: ").concat(message)].concat(args));}},debug:function debug(message){if(['silly','debug'].includes(this.logLevel)){var _console3;for(var _len3=arguments.length,args=new Array(_len3>1?_len3-1:0),_key3=1;_key3<_len3;_key3++){args[_key3-1]=arguments[_key3];}(_console3=console).debug.apply(_console3,["".concat(new Date().toISOString()," [\"Rudder\"] debug: ").concat(message)].concat(args));}},silly:function silly(message){if(['silly'].includes(this.logLevel)){var _console4;for(var _len4=arguments.length,args=new Array(_len4>1?_len4-1:0),_key4=1;_key4<_len4;_key4++){args[_key4-1]=arguments[_key4];}(_console4=console).info.apply(_console4,["".concat(new Date().toISOString()," [\"Rudder\"] silly: ").concat(message)].concat(args));}}};axiosRetry(this.axiosInstance,{retries:0});}_createClass(Analytics,[{key:"_validate",value:function _validate(message,type){try{looselyValidateEvent_1(message,type);}catch(e){if(e.message==='Your message must be < 32kb.'){this.logger.info('Your message must be < 32kb. This is currently surfaced as a warning. Please update your code',message);return;}throw e;}}/**
5237
5246
  * Send an identify `message`.
5238
5247
  *
5239
5248
  * @param {Object} message
@@ -5313,24 +5322,24 @@ var version='0.0.1';var removeTrailingSlashes=function removeTrailingSlashes(inU
5313
5322
  * @api private
5314
5323
  */},{key:"enqueue",value:function enqueue(type,message,callback){if(this.queue.length>=this.maxInternalQueueSize){this.logger.error("not adding events for processing as queue size ".concat(this.queue.length," >= than max configuration ").concat(this.maxInternalQueueSize));return;}// Clone the incoming message object
5315
5324
  // before altering the data
5316
- var lMessage=cloneDeep(message);callback=callback||noop;if(!this.enable){return setImmediate(callback);}if(type=='identify'){if(lMessage.traits){if(!lMessage.context){lMessage.context={};}lMessage.context.traits=lMessage.traits;}}lMessage=_objectSpread2({},lMessage);lMessage.type=type;lMessage.context=_objectSpread2({library:{name:'analytics-service-worker',version:version}},lMessage.context);lMessage.channel='service-worker';lMessage._metadata=_objectSpread2({serviceWorkerVersion:version},lMessage._metadata);if(!lMessage.originalTimestamp){lMessage.originalTimestamp=new Date();}if(!lMessage.messageId){lMessage.messageId=v4();}// Historically this library has accepted strings and numbers as IDs.
5325
+ var lMessage=cloneDeep(message);callback=callback||noop;if(!this.enable){return setImmediate(callback);}if(type=='identify'){if(lMessage.traits){if(!lMessage.context){lMessage.context={};}lMessage.context.traits=lMessage.traits;}}lMessage=_objectSpread2({},lMessage);lMessage.type=type;lMessage.context=_objectSpread2({library:{name:'analytics-service-worker',version:version}},lMessage.context);lMessage.channel='service-worker';lMessage._metadata=_objectSpread2({serviceWorkerVersion:version},lMessage._metadata);if(!lMessage.originalTimestamp){lMessage.originalTimestamp=new Date();}if(!lMessage.messageId){lMessage.messageId=v4();}// Historically this library has accepted strings and numbers as IDs.
5317
5326
  // However, our spec only allows strings. To avoid breaking compatibility,
5318
5327
  // we'll coerce these to strings if they aren't already.
5319
- if(lMessage.anonymousId&&!isString$1(lMessage.anonymousId)){lMessage.anonymousId=JSON.stringify(lMessage.anonymousId);}if(lMessage.userId&&!isString$1(lMessage.userId)){lMessage.userId=JSON.stringify(lMessage.userId);}this.queue.push({message:lMessage,callback:callback});if(!this.flushed){this.flushed=true;this.flush();return;}if(this.queue.length>=this.flushAt){this.logger.debug('flushAt reached, trying flush...');this.flush();}if(this.flushInterval&&!this.flushTimer){this.logger.debug('no existing flush timer, creating new one');this.flushTimer=setTimeout(this.flush.bind(this),this.flushInterval);}}/**
5328
+ if(lMessage.anonymousId&&!lodash_isstring(lMessage.anonymousId)){lMessage.anonymousId=JSON.stringify(lMessage.anonymousId);}if(lMessage.userId&&!lodash_isstring(lMessage.userId)){lMessage.userId=JSON.stringify(lMessage.userId);}this.queue.push({message:lMessage,callback:callback});if(!this.flushed){this.flushed=true;this.flush();return;}if(this.queue.length>=this.flushAt){this.logger.debug('flushAt reached, trying flush...');this.flush();}if(this.flushInterval&&!this.flushTimer){this.logger.debug('no existing flush timer, creating new one');this.flushTimer=setTimeout(this.flush.bind(this),this.flushInterval);}}/**
5320
5329
  * Flush the current queue
5321
5330
  *
5322
5331
  * @param {Function} [callback] (optional)
5323
5332
  * @return {Analytics}
5324
5333
  */},{key:"flush",value:function flush(callback){var _this=this;// check if earlier flush was pushed to queue
5325
- this.logger.debug('in flush');callback=callback||noop;if(!this.enable){return setImmediate(callback);}if(this.timer){this.logger.debug('cancelling existing timer...');clearTimeout(this.timer);this.timer=null;}if(this.flushTimer){this.logger.debug('cancelling existing flushTimer...');clearTimeout(this.flushTimer);this.flushTimer=null;}if(!this.queue.length){this.logger.debug('queue is empty, nothing to flush');return setImmediate(callback);}var items=this.queue.splice(0,this.flushAt);var callbacks=items.map(function(item){return item.callback;});var messages=items.map(function(item){// if someone mangles directly with queue
5326
- if(_typeof(item.message)==='object'){item.message.sentAt=new Date();}return item.message;});var data={batch:messages,sentAt:new Date()};this.logger.debug("batch size is ".concat(items.length));this.logger.silly('===data===',data);var done=function done(err){callbacks.forEach(function(callback_){callback_(err);});callback(err,data);};// Don't set the user agent if we're not on a browser. The latest spec allows
5334
+ this.logger.debug('in flush');callback=callback||noop;if(!this.enable){return setImmediate(callback);}if(this.timer){this.logger.debug('cancelling existing timer...');clearTimeout(this.timer);this.timer=null;}if(this.flushTimer){this.logger.debug('cancelling existing flushTimer...');clearTimeout(this.flushTimer);this.flushTimer=null;}if(!this.queue.length){this.logger.debug('queue is empty, nothing to flush');return setImmediate(callback);}var items=this.queue.splice(0,this.flushAt);var callbacks=items.map(function(item){return item.callback;});var messages=items.map(function(item){// if someone mangles directly with queue
5335
+ if(_typeof(item.message)==='object'){item.message.sentAt=new Date();}return item.message;});var data={batch:messages,sentAt:new Date()};this.logger.debug("batch size is ".concat(items.length));this.logger.silly('===data===',data);var done=function done(err){callbacks.forEach(function(callback_){callback_(err);});callback(err,data);};// Don't set the user agent if we're not on a browser. The latest spec allows
5327
5336
  // the User-Agent header (see https://fetch.spec.whatwg.org/#terminology-headers
5328
5337
  // and https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/setRequestHeader),
5329
5338
  // but browsers such as Chrome and Safari have not caught up.
5330
- var headers={};if(typeof window==='undefined'){headers['user-agent']="analytics-service-worker/".concat(version);headers['Content-Type']="application/json";}var reqTimeout=typeof this.timeout==='string'?ms$1(this.timeout):this.timeout;if(this.flushOverride){this.flushOverride({host:"".concat(this.host),writeKey:this.writeKey,data:data,headers:headers,reqTimeout:reqTimeout,flush:this.flush.bind(this),done:done,isErrorRetryable:this._isErrorRetryable.bind(this)});}else {var req={method:'POST',url:"".concat(this.host),auth:{username:this.writeKey},data:data,headers:headers};if(reqTimeout){req.timeout=reqTimeout;}this.axiosInstance(_objectSpread2(_objectSpread2({},req),{},{'axios-retry':{retries:3,retryCondition:this._isErrorRetryable.bind(this),retryDelay:axiosRetry.exponentialDelay}})).then(function(response){_this.timer=setTimeout(_this.flush.bind(_this),_this.flushInterval);done();}).catch(function(err){console.log(err);_this.logger.error("got error while attempting send for 3 times, dropping ".concat(items.length," events"));_this.timer=setTimeout(_this.flush.bind(_this),_this.flushInterval);if(err.response){var error=new Error(err.response.statusText);return done(error);}done(err);});}}},{key:"_isErrorRetryable",value:function _isErrorRetryable(error){// Retry Network Errors.
5331
- if(axiosRetry.isNetworkError(error)){return true;}if(!error.response){// Cannot determine if the request can be retried
5332
- return false;}this.logger.error("error status: ".concat(error.response.status));// Retry Server Errors (5xx).
5333
- if(error.response.status>=500&&error.response.status<=599){return true;}// Retry if rate limited.
5334
- if(error.response.status===429){return true;}return false;}}]);return Analytics;}();
5339
+ var headers={};if(typeof window==='undefined'){headers['user-agent']="analytics-service-worker/".concat(version);headers['Content-Type']="application/json";}var reqTimeout=typeof this.timeout==='string'?ms(this.timeout):this.timeout;if(this.flushOverride){this.flushOverride({host:"".concat(this.host),writeKey:this.writeKey,data:data,headers:headers,reqTimeout:reqTimeout,flush:this.flush.bind(this),done:done,isErrorRetryable:this._isErrorRetryable});}else {var req={method:'POST',url:"".concat(this.host),auth:{username:this.writeKey},data:data,headers:headers};if(reqTimeout){req.timeout=reqTimeout;}this.axiosInstance(_objectSpread2(_objectSpread2({},req),{},{'axios-retry':{retries:3,retryCondition:this._isErrorRetryable.bind(this),retryDelay:axiosRetry.exponentialDelay}})).then(function(response){_this.timer=setTimeout(_this.flush.bind(_this),_this.flushInterval);done();}).catch(function(err){console.log(err);_this.logger.error("got error while attempting send for 3 times, dropping ".concat(items.length," events"));_this.timer=setTimeout(_this.flush.bind(_this),_this.flushInterval);if(err.response){var error=new Error(err.response.statusText);return done(error);}done(err);});}}},{key:"_isErrorRetryable",value:function _isErrorRetryable(error){// Retry Network Errors.
5340
+ if(axiosRetry.isNetworkError(error)){return true;}if(!error.response){// Cannot determine if the request can be retried
5341
+ return false;}this.logger.error("error status: ".concat(error.response.status));// Retry Server Errors (5xx).
5342
+ if(error.response.status>=500&&error.response.status<=599){return true;}// Retry if rate limited.
5343
+ if(error.response.status===429){return true;}return false;}}]);return Analytics;}();
5335
5344
 
5336
5345
  export { Analytics };