mario-education 2.4.403-multi → 2.4.404-multi

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -44351,7 +44351,7 @@ module.exports = _defineProperty;
44351
44351
  module.exports["default"] = module.exports, module.exports.__esModule = true;
44352
44352
  });
44353
44353
 
44354
- unwrapExports(defineProperty);
44354
+ var _defineProperty$2 = unwrapExports(defineProperty);
44355
44355
 
44356
44356
  var compareOption = function compareOption() {
44357
44357
  var inputValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
@@ -50326,248 +50326,335 @@ var CustomTabComponent = function CustomTabComponent(_ref) {
50326
50326
 
50327
50327
  var style$2 = {"font-large":"_356Xx","table-border":"_3rVdM","Close":"_2Vs6W","Active":"_fISYg","row_name":"_2-4H1","bg-red":"_1G8nL","bg-green":"_ATqes","bg-yellow":"_U2Fov","row-status":"_2mAty","table-class-type":"_2KRfC","box-form-input":"_3bgU2","box-content":"_4h5aW","confirm_btn_title":"_3vU-q","content":"_2eddN","btn-favorite-text":"_3bpqI","description-template-left":"_3BhUP","name-template-left":"_2CA9Q","data-grid-content":"_697ao","select-right":"_1J-bu","content-confirm-model":"_2pqFa","input-title":"_1Dfbh","total-card-title":"_2-hXf","title-filter":"_36snY","form-input-title":"_1FINV","list-favorite":"_3EcML","title":"_2sFa5","title-block":"_18vbq","box-additional-title":"_NUXao","dialog-title":"_1oyCk","title-chart":"_2Yhd1","btn-send-survey":"_1xze5","btn-cancel":"_1bqU6","chip-email-default":"_2xKhD","chip-email-checked":"_ouqj6","title-content":"_2O3Tp","create-btn":"_3Cux8","general-chart-title":"_2Lxtl","action-wrapper":"_rEUU_","action-item":"_2n3hL","survey-detail":"_3vJ-g","header-survey-detail":"_Ri4lG","content-header":"_M7dFA","survey-title":"_2APad","responses-distribution":"_1I0XZ","description":"_1hw5e","list-check-question":"_1Ejsc","select-question":"_2t6cX","question":"_2cNmh","ratings-of-questions":"_3225G","show-result":"_3KDFH","chart-result-for-question":"_N5fxX","parameter":"_1NNB0","percent":"_-Fj2n","chart":"_1Qyn4","legend":"_1tBch","avr":"_2TsdE","legend-item":"_3YpJk","name":"_2W9F-","action":"_Ldh2m","header-conduct":"_1npo6","student-detail":"_1pKV2","student-name":"_1GBNs","survey-name":"_2qlBy","conduct-body":"_1dxHK","response-question":"_3IlYT","title-model":"_1UBEA","total-cards":"_38gNv","card":"_C2FoT","response-body":"_3XFlg","student":"_2fuBW","date":"_QH_aS","answer":"_3Rool","none-answer":"_l65o6","font-small":"_1mTdj","option-select":"_32CPv","icon-add-header":"_2tltH","sup-require":"_3IAjJ","span-title":"_2vOMh","checked-favorite":"_JL458","flag":"_1jRbU","filter-desktop":"_1ByZl","h-75":"_2bC49","filter-mobile":"_39EFp","d-flex":"_3ILHs","flex-between":"_1Dy7M","pointer":"_1G7Oj","ml-10":"_3pvOS","mt-20":"_3QSsx","select-type":"_1zeZ3","all-student-survey":"_2rp1M","box-input-csv":"_HGXSI","icon":"_2jqP8","model-confirm-publish":"_1DLAE","box-email-content":"_3aA8I","input-mail-content":"_3HfSn","list-chip-email":"_2mJew","box-chip-email":"_2fwdD","table-desktop":"_3_y0a","table-container":"_DFKYF","data-grid":"_3EcnW","MuiDataGrid-columnSeparator":"_3P0hc","table-mobile":"_1iMfJ","block-list-survey":"_EuZ8_","box-filter":"_3utMA","block-total":"_qlUFF","list-card-right":"_Epdgt","filter-select":"_20eFs","box-filter-left":"_MtBqD","filter-item":"_1WJAo","box-filter-right":"_2VDGv","search-input-icon":"_1FexU","inputInput":"_2JzR2","external-item":"_2iP6U","action-view":"_6y3DH","time-Date":"_17nC2","time-Hours-Minute":"_1vEXB","table-row":"_1jd05","arrow-icon":"_3Urdb","table-cell":"_qPEQy","btn-function":"_2xh2d","btn-action-text":"_2KfG4","avatar_user":"_2mUU4","innerHtml":"_2fgAa","btn-open":"_fLtnC","date-schedule":"_1amhM","pending":"_38Q73","replied":"_2mi_L","actionneeded":"_3qg29","actionneed":"_3XKeC","noscheduled":"_salNB","scheduled":"_3vFP4","completed":"_FoXPx","notstartyet":"_3bhI6","flex-item":"_36RRe","mr-10":"_2A5LB","session":"_33gcZ","schedule-now":"_2BiiZ","block-filter":"_3qVjM","block-filter-right":"_1C7WS","create-survey-container":"_2_bhv","box-create-survey":"_1h2_-","box-list-favorite":"_2Np-n","check-box-btn":"_2KGDK","stepper":"_AHiUZ","step-label":"_6O2vy","dialog-select-template":"_Vb5G5","icon-btn":"_1aD3k","icon-remove":"_rxvBN","title-btn":"_3BDjW","title-box-model":"_3V3hO","box-content-select":"_1p5SM","title-content-select":"_1wY14","description-content-select":"_3AYvl","box-function":"_1yo2i","cancel_btn":"_2q0h5","confirm_btn":"_1wniK","confirm_btn_icon":"_3rnyp","remove_btn":"_3WkIH","remove_btn_title":"_14_xL","remove_btn_icon":"_3VptO","mid_btn":"_Psdg4","box-function-flex":"_2K1MV","box-collapse":"_2-Sse","box-collapse-top":"_miLBv","box-collapse-right":"_2xNTI","collapse-chip":"_13im8","collapse-left-title":"_aft4S","box-collapse-content-item":"_26SCl","block-review-detail":"_1d4Lf","block-content-review":"_12S3I","block-template-review":"_36gKq","block-template-left":"_lw5Ox","additional-box":"_3_5ab","header-item":"_1Q3h9","header-title":"_1WGNT","space-content":"_36P3O","table-title":"_1FCFx","table-status":"_L_uPM","box-header-select":"_1k-yH","header-select-name":"_32KLh","header-select-icon":"_28PLI","header-select-detail":"_ZI06k","list-question-select":"_2EaBh","new-survey":"_SLI97","box-survey":"_dVgqi","avt-user":"_2oBnh","infor":"_3HNaN","content-text":"_SIfgw","time":"_1Sje8","card-item-mobile":"_UEtvP","card-item-left":"_1IKvD","item-name":"_2vyTL","item-detail":"_1bzAB","item-date":"_vw-CP","item-date-content":"_3tsha","table-status-mobile":"_2yS_O","button-mobile":"_1WcRD","box-detail":"_2Mctt","btn-duplicate":"_3Gz-M","box-input":"_3VFOh","item-answer":"_1zSJi","box-favorite":"_2o2b0","overview-survey":"_2sVJR","chart-view-dashboard":"_1doPS","block-chart-wrapper":"_1lkE3","block-chart-title":"_9mzcE","block-chart-top":"_QLUQO","chart-left":"_2c6UE","chart-right":"_1Pmw_","block-header-chart":"_14hBc","column-chart-percent":"_1Ml_a","chart-background":"_2AO5K","custom-marker":"_21lNI","item-legend":"_3BpNG","mark-custom":"_tnwFd","label-legend-custom":"_2juK0","mark-legend":"_13l-r","label-chart":"_3KJlm","listItem":"_1sU--","item":"_397kU","item-checkbox":"_33URL","check-box":"_X-D1i","pie-chart":"_2-TOd","box-chart-title":"_Gijux","box-chart":"_3G2tI","legend-pie-custom":"_sm5jY","color-box":"_3LqNl","generate-flag":"_24iDw","flag-item":"_V8630","count":"_39_gg","red":"_1Qdq3","yellow":"_1ukSp","green":"_Aj1d4","select-filter-top":"_3vD8W","filter-box":"_2WhAK","accordion":"_QOqG1","expanded-summary":"_oa9O2","expanded-title":"_1gxS6","expanded-detail":"_1Uklu","oveview-style":"_DU0s_","item-container":"_17V8B","note-external":"_1Mvjg","icon-back-page":"_3ckSJ","dot":"_1vzYS","table-wrapper":"_z0mjD","pagination":"_kn_xp","dot-response":"_2Nrxx","dot-not-response":"_6GUzQ","middle":"_2gw2z","table-dropdown":"_13mck","table-header":"_nxpHH","tbody-table":"_34MIA"};
50328
50328
 
50329
+ var classCallCheck = createCommonjsModule(function (module) {
50330
+ function _classCallCheck(instance, Constructor) {
50331
+ if (!(instance instanceof Constructor)) {
50332
+ throw new TypeError("Cannot call a class as a function");
50333
+ }
50334
+ }
50335
+
50336
+ module.exports = _classCallCheck;
50337
+ module.exports["default"] = module.exports, module.exports.__esModule = true;
50338
+ });
50339
+
50340
+ var _classCallCheck$1 = unwrapExports(classCallCheck);
50341
+
50342
+ var createClass = createCommonjsModule(function (module) {
50343
+ function _defineProperties(target, props) {
50344
+ for (var i = 0; i < props.length; i++) {
50345
+ var descriptor = props[i];
50346
+ descriptor.enumerable = descriptor.enumerable || false;
50347
+ descriptor.configurable = true;
50348
+ if ("value" in descriptor) descriptor.writable = true;
50349
+ Object.defineProperty(target, descriptor.key, descriptor);
50350
+ }
50351
+ }
50352
+
50353
+ function _createClass(Constructor, protoProps, staticProps) {
50354
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
50355
+ if (staticProps) _defineProperties(Constructor, staticProps);
50356
+ return Constructor;
50357
+ }
50358
+
50359
+ module.exports = _createClass;
50360
+ module.exports["default"] = module.exports, module.exports.__esModule = true;
50361
+ });
50362
+
50363
+ var _createClass$1 = unwrapExports(createClass);
50364
+
50365
+ var defaultOptions = {
50366
+ bindI18n: 'languageChanged',
50367
+ bindI18nStore: '',
50368
+ transEmptyNodeValue: '',
50369
+ transSupportBasicHtmlNodes: true,
50370
+ transKeepBasicHtmlNodesFor: ['br', 'strong', 'i', 'p'],
50371
+ useSuspense: true
50372
+ };
50373
+ var i18nInstance;
50374
+ var I18nContext = React__default.createContext();
50375
+ function getDefaults() {
50376
+ return defaultOptions;
50377
+ }
50378
+ var ReportNamespaces = function () {
50379
+ function ReportNamespaces() {
50380
+ _classCallCheck$1(this, ReportNamespaces);
50381
+
50382
+ this.usedNamespaces = {};
50383
+ }
50384
+
50385
+ _createClass$1(ReportNamespaces, [{
50386
+ key: "addUsedNamespaces",
50387
+ value: function addUsedNamespaces(namespaces) {
50388
+ var _this = this;
50389
+
50390
+ namespaces.forEach(function (ns) {
50391
+ if (!_this.usedNamespaces[ns]) _this.usedNamespaces[ns] = true;
50392
+ });
50393
+ }
50394
+ }, {
50395
+ key: "getUsedNamespaces",
50396
+ value: function getUsedNamespaces() {
50397
+ return Object.keys(this.usedNamespaces);
50398
+ }
50399
+ }]);
50400
+
50401
+ return ReportNamespaces;
50402
+ }();
50403
+ function getI18n() {
50404
+ return i18nInstance;
50405
+ }
50406
+
50329
50407
  function warn() {
50330
50408
  if (console && console.warn) {
50409
+ var _console;
50410
+
50331
50411
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
50332
50412
  args[_key] = arguments[_key];
50333
50413
  }
50334
- if (typeof args[0] === 'string') args[0] = `react-i18next:: ${args[0]}`;
50335
- console.warn(...args);
50414
+
50415
+ if (typeof args[0] === 'string') args[0] = "react-i18next:: ".concat(args[0]);
50416
+
50417
+ (_console = console).warn.apply(_console, args);
50336
50418
  }
50337
50419
  }
50338
- const alreadyWarned = {};
50420
+ var alreadyWarned = {};
50339
50421
  function warnOnce() {
50340
50422
  for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
50341
50423
  args[_key2] = arguments[_key2];
50342
50424
  }
50425
+
50343
50426
  if (typeof args[0] === 'string' && alreadyWarned[args[0]]) return;
50344
50427
  if (typeof args[0] === 'string') alreadyWarned[args[0]] = new Date();
50345
- warn(...args);
50428
+ warn.apply(void 0, args);
50346
50429
  }
50347
- const loadedClb = (i18n, cb) => () => {
50348
- if (i18n.isInitialized) {
50349
- cb();
50350
- } else {
50351
- const initialized = () => {
50352
- setTimeout(() => {
50353
- i18n.off('initialized', initialized);
50354
- }, 0);
50355
- cb();
50356
- };
50357
- i18n.on('initialized', initialized);
50358
- }
50359
- };
50360
50430
  function loadNamespaces(i18n, ns, cb) {
50361
- i18n.loadNamespaces(ns, loadedClb(i18n, cb));
50362
- }
50363
- function loadLanguages(i18n, lng, ns, cb) {
50364
- if (typeof ns === 'string') ns = [ns];
50365
- ns.forEach(n => {
50366
- if (i18n.options.ns.indexOf(n) < 0) i18n.options.ns.push(n);
50431
+ i18n.loadNamespaces(ns, function () {
50432
+ if (i18n.isInitialized) {
50433
+ cb();
50434
+ } else {
50435
+ var initialized = function initialized() {
50436
+ setTimeout(function () {
50437
+ i18n.off('initialized', initialized);
50438
+ }, 0);
50439
+ cb();
50440
+ };
50441
+
50442
+ i18n.on('initialized', initialized);
50443
+ }
50367
50444
  });
50368
- i18n.loadLanguages(lng, loadedClb(i18n, cb));
50369
50445
  }
50370
- function oldI18nextHasLoadedNamespace(ns, i18n) {
50371
- let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
50372
- const lng = i18n.languages[0];
50373
- const fallbackLng = i18n.options ? i18n.options.fallbackLng : false;
50374
- const lastLng = i18n.languages[i18n.languages.length - 1];
50446
+ function hasLoadedNamespace(ns, i18n) {
50447
+ var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
50448
+
50449
+ if (!i18n.languages || !i18n.languages.length) {
50450
+ warnOnce('i18n.languages were undefined or empty', i18n.languages);
50451
+ return true;
50452
+ }
50453
+
50454
+ var lng = i18n.languages[0];
50455
+ var fallbackLng = i18n.options ? i18n.options.fallbackLng : false;
50456
+ var lastLng = i18n.languages[i18n.languages.length - 1];
50375
50457
  if (lng.toLowerCase() === 'cimode') return true;
50376
- const loadNotPending = (l, n) => {
50377
- const loadState = i18n.services.backendConnector.state[`${l}|${n}`];
50458
+
50459
+ var loadNotPending = function loadNotPending(l, n) {
50460
+ var loadState = i18n.services.backendConnector.state["".concat(l, "|").concat(n)];
50378
50461
  return loadState === -1 || loadState === 2;
50379
50462
  };
50463
+
50380
50464
  if (options.bindI18n && options.bindI18n.indexOf('languageChanging') > -1 && i18n.services.backendConnector.backend && i18n.isLanguageChangingTo && !loadNotPending(i18n.isLanguageChangingTo, ns)) return false;
50381
50465
  if (i18n.hasResourceBundle(lng, ns)) return true;
50382
- if (!i18n.services.backendConnector.backend || i18n.options.resources && !i18n.options.partialBundledLanguages) return true;
50466
+ if (!i18n.services.backendConnector.backend) return true;
50383
50467
  if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns))) return true;
50384
50468
  return false;
50385
50469
  }
50386
- function hasLoadedNamespace(ns, i18n) {
50387
- let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
50388
- if (!i18n.languages || !i18n.languages.length) {
50389
- warnOnce('i18n.languages were undefined or empty', i18n.languages);
50390
- return true;
50391
- }
50392
- const isNewerI18next = i18n.options.ignoreJSONStructure !== undefined;
50393
- if (!isNewerI18next) {
50394
- return oldI18nextHasLoadedNamespace(ns, i18n, options);
50395
- }
50396
- return i18n.hasLoadedNamespace(ns, {
50397
- lng: options.lng,
50398
- precheck: (i18nInstance, loadNotPending) => {
50399
- if (options.bindI18n && options.bindI18n.indexOf('languageChanging') > -1 && i18nInstance.services.backendConnector.backend && i18nInstance.isLanguageChangingTo && !loadNotPending(i18nInstance.isLanguageChangingTo, ns)) return false;
50400
- }
50401
- });
50402
- }
50403
50470
 
50404
- const matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
50405
- const htmlEntities = {
50406
- '&amp;': '&',
50407
- '&#38;': '&',
50408
- '&lt;': '<',
50409
- '&#60;': '<',
50410
- '&gt;': '>',
50411
- '&#62;': '>',
50412
- '&apos;': "'",
50413
- '&#39;': "'",
50414
- '&quot;': '"',
50415
- '&#34;': '"',
50416
- '&nbsp;': ' ',
50417
- '&#160;': ' ',
50418
- '&copy;': '©',
50419
- '&#169;': '©',
50420
- '&reg;': '®',
50421
- '&#174;': '®',
50422
- '&hellip;': '…',
50423
- '&#8230;': '…',
50424
- '&#x2F;': '/',
50425
- '&#47;': '/'
50426
- };
50427
- const unescapeHtmlEntity = m => htmlEntities[m];
50428
- const unescape = text => text.replace(matchHtmlEntity, unescapeHtmlEntity);
50429
-
50430
- let defaultOptions = {
50431
- bindI18n: 'languageChanged',
50432
- bindI18nStore: '',
50433
- transEmptyNodeValue: '',
50434
- transSupportBasicHtmlNodes: true,
50435
- transWrapTextNodes: '',
50436
- transKeepBasicHtmlNodesFor: ['br', 'strong', 'i', 'p'],
50437
- useSuspense: true,
50438
- unescape
50439
- };
50440
- function getDefaults() {
50441
- return defaultOptions;
50471
+ var arrayWithHoles = createCommonjsModule(function (module) {
50472
+ function _arrayWithHoles(arr) {
50473
+ if (Array.isArray(arr)) return arr;
50442
50474
  }
50443
50475
 
50444
- let i18nInstance;
50445
- function getI18n() {
50446
- return i18nInstance;
50447
- }
50476
+ module.exports = _arrayWithHoles;
50477
+ module.exports["default"] = module.exports, module.exports.__esModule = true;
50478
+ });
50448
50479
 
50449
- const I18nContext = createContext();
50450
- class ReportNamespaces {
50451
- constructor() {
50452
- this.usedNamespaces = {};
50453
- }
50454
- addUsedNamespaces(namespaces) {
50455
- namespaces.forEach(ns => {
50456
- if (!this.usedNamespaces[ns]) this.usedNamespaces[ns] = true;
50457
- });
50480
+ unwrapExports(arrayWithHoles);
50481
+
50482
+ var iterableToArrayLimit = createCommonjsModule(function (module) {
50483
+ function _iterableToArrayLimit(arr, i) {
50484
+ if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
50485
+ var _arr = [];
50486
+ var _n = true;
50487
+ var _d = false;
50488
+ var _e = undefined;
50489
+
50490
+ try {
50491
+ for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
50492
+ _arr.push(_s.value);
50493
+
50494
+ if (i && _arr.length === i) break;
50495
+ }
50496
+ } catch (err) {
50497
+ _d = true;
50498
+ _e = err;
50499
+ } finally {
50500
+ try {
50501
+ if (!_n && _i["return"] != null) _i["return"]();
50502
+ } finally {
50503
+ if (_d) throw _e;
50504
+ }
50458
50505
  }
50459
- getUsedNamespaces() {
50460
- return Object.keys(this.usedNamespaces);
50506
+
50507
+ return _arr;
50508
+ }
50509
+
50510
+ module.exports = _iterableToArrayLimit;
50511
+ module.exports["default"] = module.exports, module.exports.__esModule = true;
50512
+ });
50513
+
50514
+ unwrapExports(iterableToArrayLimit);
50515
+
50516
+ var arrayLikeToArray = createCommonjsModule(function (module) {
50517
+ function _arrayLikeToArray(arr, len) {
50518
+ if (len == null || len > arr.length) len = arr.length;
50519
+
50520
+ for (var i = 0, arr2 = new Array(len); i < len; i++) {
50521
+ arr2[i] = arr[i];
50461
50522
  }
50523
+
50524
+ return arr2;
50462
50525
  }
50463
50526
 
50464
- const usePrevious = (value, ignore) => {
50465
- const ref = useRef();
50466
- useEffect(() => {
50467
- ref.current = ignore ? ref.current : value;
50468
- }, [value, ignore]);
50469
- return ref.current;
50470
- };
50471
- function alwaysNewT(i18n, language, namespace, keyPrefix) {
50472
- return i18n.getFixedT(language, namespace, keyPrefix);
50527
+ module.exports = _arrayLikeToArray;
50528
+ module.exports["default"] = module.exports, module.exports.__esModule = true;
50529
+ });
50530
+
50531
+ unwrapExports(arrayLikeToArray);
50532
+
50533
+ var unsupportedIterableToArray = createCommonjsModule(function (module) {
50534
+ function _unsupportedIterableToArray(o, minLen) {
50535
+ if (!o) return;
50536
+ if (typeof o === "string") return arrayLikeToArray(o, minLen);
50537
+ var n = Object.prototype.toString.call(o).slice(8, -1);
50538
+ if (n === "Object" && o.constructor) n = o.constructor.name;
50539
+ if (n === "Map" || n === "Set") return Array.from(o);
50540
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
50541
+ }
50542
+
50543
+ module.exports = _unsupportedIterableToArray;
50544
+ module.exports["default"] = module.exports, module.exports.__esModule = true;
50545
+ });
50546
+
50547
+ unwrapExports(unsupportedIterableToArray);
50548
+
50549
+ var nonIterableRest = createCommonjsModule(function (module) {
50550
+ function _nonIterableRest() {
50551
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
50473
50552
  }
50474
- function useMemoizedT(i18n, language, namespace, keyPrefix) {
50475
- return useCallback(alwaysNewT(i18n, language, namespace, keyPrefix), [i18n, language, namespace, keyPrefix]);
50553
+
50554
+ module.exports = _nonIterableRest;
50555
+ module.exports["default"] = module.exports, module.exports.__esModule = true;
50556
+ });
50557
+
50558
+ unwrapExports(nonIterableRest);
50559
+
50560
+ var slicedToArray = createCommonjsModule(function (module) {
50561
+ function _slicedToArray(arr, i) {
50562
+ return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
50476
50563
  }
50564
+
50565
+ module.exports = _slicedToArray;
50566
+ module.exports["default"] = module.exports, module.exports.__esModule = true;
50567
+ });
50568
+
50569
+ var _slicedToArray = unwrapExports(slicedToArray);
50570
+
50571
+ function ownKeys$1(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; }
50572
+
50573
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { _defineProperty$2(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
50477
50574
  function useTranslation(ns) {
50478
- let props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
50479
- const {
50480
- i18n: i18nFromProps
50481
- } = props;
50482
- const {
50483
- i18n: i18nFromContext,
50484
- defaultNS: defaultNSFromContext
50485
- } = useContext(I18nContext) || {};
50486
- const i18n = i18nFromProps || i18nFromContext || getI18n();
50575
+ var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
50576
+ var i18nFromProps = props.i18n;
50577
+
50578
+ var _ref = useContext(I18nContext) || {},
50579
+ i18nFromContext = _ref.i18n,
50580
+ defaultNSFromContext = _ref.defaultNS;
50581
+
50582
+ var i18n = i18nFromProps || i18nFromContext || getI18n();
50487
50583
  if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();
50584
+
50488
50585
  if (!i18n) {
50489
50586
  warnOnce('You will need to pass in an i18next instance by using initReactI18next');
50490
- const notReadyT = (k, optsOrDefaultValue) => {
50491
- if (typeof optsOrDefaultValue === 'string') return optsOrDefaultValue;
50492
- if (optsOrDefaultValue && typeof optsOrDefaultValue === 'object' && typeof optsOrDefaultValue.defaultValue === 'string') return optsOrDefaultValue.defaultValue;
50587
+
50588
+ var notReadyT = function notReadyT(k) {
50493
50589
  return Array.isArray(k) ? k[k.length - 1] : k;
50494
50590
  };
50495
- const retNotReady = [notReadyT, {}, false];
50591
+
50592
+ var retNotReady = [notReadyT, {}, false];
50496
50593
  retNotReady.t = notReadyT;
50497
50594
  retNotReady.i18n = {};
50498
50595
  retNotReady.ready = false;
50499
50596
  return retNotReady;
50500
50597
  }
50501
- if (i18n.options.react && i18n.options.react.wait !== undefined) warnOnce('It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.');
50502
- const i18nOptions = {
50503
- ...getDefaults(),
50504
- ...i18n.options.react,
50505
- ...props
50506
- };
50507
- const {
50508
- useSuspense,
50509
- keyPrefix
50510
- } = i18nOptions;
50511
- let namespaces = ns || defaultNSFromContext || i18n.options && i18n.options.defaultNS;
50598
+
50599
+ var i18nOptions = _objectSpread(_objectSpread(_objectSpread({}, getDefaults()), i18n.options.react), props);
50600
+
50601
+ var useSuspense = i18nOptions.useSuspense;
50602
+ var namespaces = ns || defaultNSFromContext || i18n.options && i18n.options.defaultNS;
50512
50603
  namespaces = typeof namespaces === 'string' ? [namespaces] : namespaces || ['translation'];
50513
50604
  if (i18n.reportNamespaces.addUsedNamespaces) i18n.reportNamespaces.addUsedNamespaces(namespaces);
50514
- const ready = (i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every(n => hasLoadedNamespace(n, i18n, i18nOptions));
50515
- const memoGetT = useMemoizedT(i18n, props.lng || null, i18nOptions.nsMode === 'fallback' ? namespaces : namespaces[0], keyPrefix);
50516
- const getT = () => memoGetT;
50517
- const getNewT = () => alwaysNewT(i18n, props.lng || null, i18nOptions.nsMode === 'fallback' ? namespaces : namespaces[0], keyPrefix);
50518
- const [t, setT] = useState(getT);
50519
- let joinedNS = namespaces.join();
50520
- if (props.lng) joinedNS = `${props.lng}${joinedNS}`;
50521
- const previousJoinedNS = usePrevious(joinedNS);
50522
- const isMounted = useRef(true);
50523
- useEffect(() => {
50524
- const {
50525
- bindI18n,
50526
- bindI18nStore
50527
- } = i18nOptions;
50605
+ var ready = (i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every(function (n) {
50606
+ return hasLoadedNamespace(n, i18n, i18nOptions);
50607
+ });
50608
+
50609
+ function getT() {
50610
+ return {
50611
+ t: i18n.getFixedT(null, i18nOptions.nsMode === 'fallback' ? namespaces : namespaces[0])
50612
+ };
50613
+ }
50614
+
50615
+ var _useState = useState(getT()),
50616
+ _useState2 = _slicedToArray(_useState, 2),
50617
+ t = _useState2[0],
50618
+ setT = _useState2[1];
50619
+
50620
+ var isMounted = useRef(true);
50621
+ useEffect(function () {
50622
+ var bindI18n = i18nOptions.bindI18n,
50623
+ bindI18nStore = i18nOptions.bindI18nStore;
50528
50624
  isMounted.current = true;
50625
+
50529
50626
  if (!ready && !useSuspense) {
50530
- if (props.lng) {
50531
- loadLanguages(i18n, props.lng, namespaces, () => {
50532
- if (isMounted.current) setT(getNewT);
50533
- });
50534
- } else {
50535
- loadNamespaces(i18n, namespaces, () => {
50536
- if (isMounted.current) setT(getNewT);
50537
- });
50538
- }
50539
- }
50540
- if (ready && previousJoinedNS && previousJoinedNS !== joinedNS && isMounted.current) {
50541
- setT(getNewT);
50627
+ loadNamespaces(i18n, namespaces, function () {
50628
+ if (isMounted.current) setT(getT());
50629
+ });
50542
50630
  }
50631
+
50543
50632
  function boundReset() {
50544
- if (isMounted.current) setT(getNewT);
50633
+ if (isMounted.current) setT(getT());
50545
50634
  }
50635
+
50546
50636
  if (bindI18n && i18n) i18n.on(bindI18n, boundReset);
50547
50637
  if (bindI18nStore && i18n) i18n.store.on(bindI18nStore, boundReset);
50548
- return () => {
50638
+ return function () {
50549
50639
  isMounted.current = false;
50550
- if (bindI18n && i18n) bindI18n.split(' ').forEach(e => i18n.off(e, boundReset));
50551
- if (bindI18nStore && i18n) bindI18nStore.split(' ').forEach(e => i18n.store.off(e, boundReset));
50640
+ if (bindI18n && i18n) bindI18n.split(' ').forEach(function (e) {
50641
+ return i18n.off(e, boundReset);
50642
+ });
50643
+ if (bindI18nStore && i18n) bindI18nStore.split(' ').forEach(function (e) {
50644
+ return i18n.store.off(e, boundReset);
50645
+ });
50552
50646
  };
50553
- }, [i18n, joinedNS]);
50554
- useEffect(() => {
50555
- if (isMounted.current && ready) {
50556
- setT(getT);
50557
- }
50558
- }, [i18n, keyPrefix, ready]);
50559
- const ret = [t, i18n, ready];
50560
- ret.t = t;
50647
+ }, [namespaces.join()]);
50648
+ var ret = [t.t, i18n, ready];
50649
+ ret.t = t.t;
50561
50650
  ret.i18n = i18n;
50562
50651
  ret.ready = ready;
50563
50652
  if (ready) return ret;
50564
50653
  if (!ready && !useSuspense) return ret;
50565
- throw new Promise(resolve => {
50566
- if (props.lng) {
50567
- loadLanguages(i18n, props.lng, namespaces, () => resolve());
50568
- } else {
50569
- loadNamespaces(i18n, namespaces, () => resolve());
50570
- }
50654
+ throw new Promise(function (resolve) {
50655
+ loadNamespaces(i18n, namespaces, function () {
50656
+ resolve();
50657
+ });
50571
50658
  });
50572
50659
  }
50573
50660
 
@@ -66767,23 +66854,6 @@ module.exports["default"] = module.exports, module.exports.__esModule = true;
66767
66854
 
66768
66855
  unwrapExports(_extends_1$1);
66769
66856
 
66770
- var arrayLikeToArray = createCommonjsModule(function (module) {
66771
- function _arrayLikeToArray(arr, len) {
66772
- if (len == null || len > arr.length) len = arr.length;
66773
-
66774
- for (var i = 0, arr2 = new Array(len); i < len; i++) {
66775
- arr2[i] = arr[i];
66776
- }
66777
-
66778
- return arr2;
66779
- }
66780
-
66781
- module.exports = _arrayLikeToArray;
66782
- module.exports["default"] = module.exports, module.exports.__esModule = true;
66783
- });
66784
-
66785
- unwrapExports(arrayLikeToArray);
66786
-
66787
66857
  var arrayWithoutHoles = createCommonjsModule(function (module) {
66788
66858
  function _arrayWithoutHoles(arr) {
66789
66859
  if (Array.isArray(arr)) return arrayLikeToArray(arr);
@@ -66806,22 +66876,6 @@ module.exports["default"] = module.exports, module.exports.__esModule = true;
66806
66876
 
66807
66877
  unwrapExports(iterableToArray);
66808
66878
 
66809
- var unsupportedIterableToArray = createCommonjsModule(function (module) {
66810
- function _unsupportedIterableToArray(o, minLen) {
66811
- if (!o) return;
66812
- if (typeof o === "string") return arrayLikeToArray(o, minLen);
66813
- var n = Object.prototype.toString.call(o).slice(8, -1);
66814
- if (n === "Object" && o.constructor) n = o.constructor.name;
66815
- if (n === "Map" || n === "Set") return Array.from(o);
66816
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
66817
- }
66818
-
66819
- module.exports = _unsupportedIterableToArray;
66820
- module.exports["default"] = module.exports, module.exports.__esModule = true;
66821
- });
66822
-
66823
- unwrapExports(unsupportedIterableToArray);
66824
-
66825
66879
  var nonIterableSpread = createCommonjsModule(function (module) {
66826
66880
  function _nonIterableSpread() {
66827
66881
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");