@formatjs/intl-segmenter 11.7.7 → 11.7.9

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.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/polyfill.iife.js +109 -114
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formatjs/intl-segmenter",
3
- "version": "11.7.7",
3
+ "version": "11.7.9",
4
4
  "description": "Polyfill for Intl.Segmenter",
5
5
  "keywords": [
6
6
  "intl",
@@ -20,8 +20,8 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "tslib": "2",
23
- "@formatjs/intl-localematcher": "0.5.9",
24
- "@formatjs/ecma402-abstract": "2.3.1"
23
+ "@formatjs/intl-localematcher": "0.6.0",
24
+ "@formatjs/ecma402-abstract": "2.3.3"
25
25
  },
26
26
  "main": "index.js",
27
27
  "types": "index.d.ts",
package/polyfill.iife.js CHANGED
@@ -2380,113 +2380,6 @@
2380
2380
  var ZERO = new decimal_default(0);
2381
2381
  var NEGATIVE_ZERO = new decimal_default(-0);
2382
2382
 
2383
- // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/262.js
2384
- function ToString(o) {
2385
- if (typeof o === "symbol") {
2386
- throw TypeError("Cannot convert a Symbol value to a string");
2387
- }
2388
- return String(o);
2389
- }
2390
- function ToObject(arg) {
2391
- if (arg == null) {
2392
- throw new TypeError("undefined/null cannot be converted to object");
2393
- }
2394
- return Object(arg);
2395
- }
2396
- var MINUTES_PER_HOUR = 60;
2397
- var SECONDS_PER_MINUTE = 60;
2398
- var MS_PER_SECOND = 1e3;
2399
- var MS_PER_MINUTE = MS_PER_SECOND * SECONDS_PER_MINUTE;
2400
- var MS_PER_HOUR = MS_PER_MINUTE * MINUTES_PER_HOUR;
2401
-
2402
- // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/GetOption.js
2403
- function GetOption(opts, prop, type, values, fallback) {
2404
- if (typeof opts !== "object") {
2405
- throw new TypeError("Options must be an object");
2406
- }
2407
- var value = opts[prop];
2408
- if (value !== void 0) {
2409
- if (type !== "boolean" && type !== "string") {
2410
- throw new TypeError("invalid type");
2411
- }
2412
- if (type === "boolean") {
2413
- value = Boolean(value);
2414
- }
2415
- if (type === "string") {
2416
- value = ToString(value);
2417
- }
2418
- if (values !== void 0 && !values.filter(function(val) {
2419
- return val == value;
2420
- }).length) {
2421
- throw new RangeError("".concat(value, " is not within ").concat(values.join(", ")));
2422
- }
2423
- return value;
2424
- }
2425
- return fallback;
2426
- }
2427
-
2428
- // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/GetOptionsObject.js
2429
- function GetOptionsObject(options) {
2430
- if (typeof options === "undefined") {
2431
- return /* @__PURE__ */ Object.create(null);
2432
- }
2433
- if (typeof options === "object") {
2434
- return options;
2435
- }
2436
- throw new TypeError("Options must be an object");
2437
- }
2438
-
2439
- // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/IsSanctionedSimpleUnitIdentifier.js
2440
- var SANCTIONED_UNITS = [
2441
- "angle-degree",
2442
- "area-acre",
2443
- "area-hectare",
2444
- "concentr-percent",
2445
- "digital-bit",
2446
- "digital-byte",
2447
- "digital-gigabit",
2448
- "digital-gigabyte",
2449
- "digital-kilobit",
2450
- "digital-kilobyte",
2451
- "digital-megabit",
2452
- "digital-megabyte",
2453
- "digital-petabyte",
2454
- "digital-terabit",
2455
- "digital-terabyte",
2456
- "duration-day",
2457
- "duration-hour",
2458
- "duration-millisecond",
2459
- "duration-minute",
2460
- "duration-month",
2461
- "duration-second",
2462
- "duration-week",
2463
- "duration-year",
2464
- "length-centimeter",
2465
- "length-foot",
2466
- "length-inch",
2467
- "length-kilometer",
2468
- "length-meter",
2469
- "length-mile-scandinavian",
2470
- "length-mile",
2471
- "length-millimeter",
2472
- "length-yard",
2473
- "mass-gram",
2474
- "mass-kilogram",
2475
- "mass-ounce",
2476
- "mass-pound",
2477
- "mass-stone",
2478
- "temperature-celsius",
2479
- "temperature-fahrenheit",
2480
- "volume-fluid-ounce",
2481
- "volume-gallon",
2482
- "volume-liter",
2483
- "volume-milliliter"
2484
- ];
2485
- function removeUnitNamespace(unit) {
2486
- return unit.slice(unit.indexOf("-") + 1);
2487
- }
2488
- var SIMPLE_UNITS = SANCTIONED_UNITS.map(removeUnitNamespace);
2489
-
2490
2383
  // node_modules/.aspect_rules_js/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs
2491
2384
  var extendStatics = function(d, b) {
2492
2385
  extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
@@ -2668,6 +2561,113 @@
2668
2561
  strategy: strategies.variadic
2669
2562
  });
2670
2563
 
2564
+ // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/262.js
2565
+ function ToString(o) {
2566
+ if (typeof o === "symbol") {
2567
+ throw TypeError("Cannot convert a Symbol value to a string");
2568
+ }
2569
+ return String(o);
2570
+ }
2571
+ function ToObject(arg) {
2572
+ if (arg == null) {
2573
+ throw new TypeError("undefined/null cannot be converted to object");
2574
+ }
2575
+ return Object(arg);
2576
+ }
2577
+ var MINUTES_PER_HOUR = 60;
2578
+ var SECONDS_PER_MINUTE = 60;
2579
+ var MS_PER_SECOND = 1e3;
2580
+ var MS_PER_MINUTE = MS_PER_SECOND * SECONDS_PER_MINUTE;
2581
+ var MS_PER_HOUR = MS_PER_MINUTE * MINUTES_PER_HOUR;
2582
+
2583
+ // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/GetOption.js
2584
+ function GetOption(opts, prop, type, values, fallback) {
2585
+ if (typeof opts !== "object") {
2586
+ throw new TypeError("Options must be an object");
2587
+ }
2588
+ var value = opts[prop];
2589
+ if (value !== void 0) {
2590
+ if (type !== "boolean" && type !== "string") {
2591
+ throw new TypeError("invalid type");
2592
+ }
2593
+ if (type === "boolean") {
2594
+ value = Boolean(value);
2595
+ }
2596
+ if (type === "string") {
2597
+ value = ToString(value);
2598
+ }
2599
+ if (values !== void 0 && !values.filter(function(val) {
2600
+ return val == value;
2601
+ }).length) {
2602
+ throw new RangeError("".concat(value, " is not within ").concat(values.join(", ")));
2603
+ }
2604
+ return value;
2605
+ }
2606
+ return fallback;
2607
+ }
2608
+
2609
+ // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/GetOptionsObject.js
2610
+ function GetOptionsObject(options) {
2611
+ if (typeof options === "undefined") {
2612
+ return /* @__PURE__ */ Object.create(null);
2613
+ }
2614
+ if (typeof options === "object") {
2615
+ return options;
2616
+ }
2617
+ throw new TypeError("Options must be an object");
2618
+ }
2619
+
2620
+ // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/IsSanctionedSimpleUnitIdentifier.js
2621
+ var SANCTIONED_UNITS = [
2622
+ "angle-degree",
2623
+ "area-acre",
2624
+ "area-hectare",
2625
+ "concentr-percent",
2626
+ "digital-bit",
2627
+ "digital-byte",
2628
+ "digital-gigabit",
2629
+ "digital-gigabyte",
2630
+ "digital-kilobit",
2631
+ "digital-kilobyte",
2632
+ "digital-megabit",
2633
+ "digital-megabyte",
2634
+ "digital-petabyte",
2635
+ "digital-terabit",
2636
+ "digital-terabyte",
2637
+ "duration-day",
2638
+ "duration-hour",
2639
+ "duration-millisecond",
2640
+ "duration-minute",
2641
+ "duration-month",
2642
+ "duration-second",
2643
+ "duration-week",
2644
+ "duration-year",
2645
+ "length-centimeter",
2646
+ "length-foot",
2647
+ "length-inch",
2648
+ "length-kilometer",
2649
+ "length-meter",
2650
+ "length-mile-scandinavian",
2651
+ "length-mile",
2652
+ "length-millimeter",
2653
+ "length-yard",
2654
+ "mass-gram",
2655
+ "mass-kilogram",
2656
+ "mass-ounce",
2657
+ "mass-pound",
2658
+ "mass-stone",
2659
+ "temperature-celsius",
2660
+ "temperature-fahrenheit",
2661
+ "volume-fluid-ounce",
2662
+ "volume-gallon",
2663
+ "volume-liter",
2664
+ "volume-milliliter"
2665
+ ];
2666
+ function removeUnitNamespace(unit) {
2667
+ return unit.slice(unit.indexOf("-") + 1);
2668
+ }
2669
+ var SIMPLE_UNITS = SANCTIONED_UNITS.map(removeUnitNamespace);
2670
+
2671
2671
  // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/ComputeExponentForMagnitude.js
2672
2672
  decimal_default.set({
2673
2673
  toExpPos: 100
@@ -2678,11 +2678,6 @@
2678
2678
  toExpPos: 100
2679
2679
  });
2680
2680
 
2681
- // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/ToRawPrecision.js
2682
- decimal_default.set({
2683
- toExpPos: 100
2684
- });
2685
-
2686
2681
  // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/regex.generated.js
2687
2682
  var S_UNICODE_REGEX = /[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20BF\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC1\uFDFC\uFDFD\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEE0-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDD78\uDD7A-\uDDCB\uDDCD-\uDE53\uDE60-\uDE6D\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6\uDF00-\uDF92\uDF94-\uDFCA]/;
2688
2683
 
@@ -6701,7 +6696,7 @@
6701
6696
  }).reduce(function(all, list) {
6702
6697
  return __spreadArray(__spreadArray([], all, true), list, true);
6703
6698
  }, []);
6704
- matches && (matches = !(expandedMatchedRegions.indexOf(locale.region || "") > 1 != shouldInclude));
6699
+ matches && (matches = !(expandedMatchedRegions.indexOf(locale.region || "") > -1 != shouldInclude));
6705
6700
  } else {
6706
6701
  matches && (matches = locale.region ? region === "*" || region === locale.region : true);
6707
6702
  }
@@ -6762,7 +6757,7 @@
6762
6757
  region: ""
6763
6758
  }, {
6764
6759
  language: supportedLocale.language,
6765
- script: desiredLSR.script,
6760
+ script: supportedLSR.script,
6766
6761
  region: ""
6767
6762
  }, data2);
6768
6763
  }