feat: Passwordless cross-device authentication

- Arkitektur: docs/auth/passwordless-architecture.md
- Backend: iom/quixzoom-auth-service/ (FastAPI + Redis)
- Webb: quixzoom-market-pages/se/login/ (QR-kod + polling)
- App: iom/quixzoom-app/src/features/auth/ (push + deep links)

Flöde: QR-kod → app-godkännande → webb-inloggad
This commit is contained in:
Bernt
2026-07-07 07:11:50 +00:00
parent 4aa984ad74
commit 6989a98d75
61843 changed files with 5491611 additions and 872231 deletions
+201
View File
@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2024 SWC contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_apply_decorated_descriptor.cjs",
"module": "../../esm/_apply_decorated_descriptor.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_apply_decs_2203_r.cjs",
"module": "../../esm/_apply_decs_2203_r.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_apply_decs_2311.cjs",
"module": "../../esm/_apply_decs_2311.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_array_like_to_array.cjs",
"module": "../../esm/_array_like_to_array.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_array_with_holes.cjs",
"module": "../../esm/_array_with_holes.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_array_without_holes.cjs",
"module": "../../esm/_array_without_holes.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_assert_this_initialized.cjs",
"module": "../../esm/_assert_this_initialized.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_async_generator.cjs",
"module": "../../esm/_async_generator.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_async_generator_delegate.cjs",
"module": "../../esm/_async_generator_delegate.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_async_iterator.cjs",
"module": "../../esm/_async_iterator.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_async_to_generator.cjs",
"module": "../../esm/_async_to_generator.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_await_async_generator.cjs",
"module": "../../esm/_await_async_generator.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_await_value.cjs",
"module": "../../esm/_await_value.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_call_super.cjs",
"module": "../../esm/_call_super.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_check_private_redeclaration.cjs",
"module": "../../esm/_check_private_redeclaration.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_class_apply_descriptor_destructure.cjs",
"module": "../../esm/_class_apply_descriptor_destructure.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_class_apply_descriptor_get.cjs",
"module": "../../esm/_class_apply_descriptor_get.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_class_apply_descriptor_set.cjs",
"module": "../../esm/_class_apply_descriptor_set.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_class_apply_descriptor_update.cjs",
"module": "../../esm/_class_apply_descriptor_update.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_class_call_check.cjs",
"module": "../../esm/_class_call_check.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_class_check_private_static_access.cjs",
"module": "../../esm/_class_check_private_static_access.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_class_check_private_static_field_descriptor.cjs",
"module": "../../esm/_class_check_private_static_field_descriptor.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_class_extract_field_descriptor.cjs",
"module": "../../esm/_class_extract_field_descriptor.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_class_name_tdz_error.cjs",
"module": "../../esm/_class_name_tdz_error.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_class_private_field_destructure.cjs",
"module": "../../esm/_class_private_field_destructure.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_class_private_field_get.cjs",
"module": "../../esm/_class_private_field_get.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_class_private_field_init.cjs",
"module": "../../esm/_class_private_field_init.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_class_private_field_loose_base.cjs",
"module": "../../esm/_class_private_field_loose_base.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_class_private_field_loose_key.cjs",
"module": "../../esm/_class_private_field_loose_key.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_class_private_field_set.cjs",
"module": "../../esm/_class_private_field_set.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_class_private_field_update.cjs",
"module": "../../esm/_class_private_field_update.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_class_private_method_get.cjs",
"module": "../../esm/_class_private_method_get.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_class_private_method_init.cjs",
"module": "../../esm/_class_private_method_init.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_class_private_method_set.cjs",
"module": "../../esm/_class_private_method_set.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_class_static_private_field_destructure.cjs",
"module": "../../esm/_class_static_private_field_destructure.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_class_static_private_field_spec_get.cjs",
"module": "../../esm/_class_static_private_field_spec_get.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_class_static_private_field_spec_set.cjs",
"module": "../../esm/_class_static_private_field_spec_set.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_class_static_private_field_update.cjs",
"module": "../../esm/_class_static_private_field_update.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_class_static_private_method_get.cjs",
"module": "../../esm/_class_static_private_method_get.js"
}
+4
View File
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_construct.cjs",
"module": "../../esm/_construct.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_create_class.cjs",
"module": "../../esm/_create_class.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_create_for_of_iterator_helper_loose.cjs",
"module": "../../esm/_create_for_of_iterator_helper_loose.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_create_super.cjs",
"module": "../../esm/_create_super.js"
}
+4
View File
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_decorate.cjs",
"module": "../../esm/_decorate.js"
}
+4
View File
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_defaults.cjs",
"module": "../../esm/_defaults.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_define_enumerable_properties.cjs",
"module": "../../esm/_define_enumerable_properties.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_define_property.cjs",
"module": "../../esm/_define_property.js"
}
+4
View File
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_dispose.cjs",
"module": "../../esm/_dispose.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_export_star.cjs",
"module": "../../esm/_export_star.js"
}
+4
View File
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_extends.cjs",
"module": "../../esm/_extends.js"
}
+4
View File
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_get.cjs",
"module": "../../esm/_get.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_get_prototype_of.cjs",
"module": "../../esm/_get_prototype_of.js"
}
+4
View File
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_identity.cjs",
"module": "../../esm/_identity.js"
}
+4
View File
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_inherits.cjs",
"module": "../../esm/_inherits.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_inherits_loose.cjs",
"module": "../../esm/_inherits_loose.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_initializer_define_property.cjs",
"module": "../../esm/_initializer_define_property.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_initializer_warning_helper.cjs",
"module": "../../esm/_initializer_warning_helper.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_instanceof.cjs",
"module": "../../esm/_instanceof.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_interop_require_default.cjs",
"module": "../../esm/_interop_require_default.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_interop_require_wildcard.cjs",
"module": "../../esm/_interop_require_wildcard.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_is_native_function.cjs",
"module": "../../esm/_is_native_function.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_is_native_reflect_construct.cjs",
"module": "../../esm/_is_native_reflect_construct.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_iterable_to_array.cjs",
"module": "../../esm/_iterable_to_array.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_iterable_to_array_limit.cjs",
"module": "../../esm/_iterable_to_array_limit.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_iterable_to_array_limit_loose.cjs",
"module": "../../esm/_iterable_to_array_limit_loose.js"
}
+4
View File
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_jsx.cjs",
"module": "../../esm/_jsx.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_new_arrow_check.cjs",
"module": "../../esm/_new_arrow_check.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_non_iterable_rest.cjs",
"module": "../../esm/_non_iterable_rest.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_non_iterable_spread.cjs",
"module": "../../esm/_non_iterable_spread.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_object_destructuring_empty.cjs",
"module": "../../esm/_object_destructuring_empty.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_object_spread.cjs",
"module": "../../esm/_object_spread.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_object_spread_props.cjs",
"module": "../../esm/_object_spread_props.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_object_without_properties.cjs",
"module": "../../esm/_object_without_properties.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_object_without_properties_loose.cjs",
"module": "../../esm/_object_without_properties_loose.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_overload_yield.cjs",
"module": "../../esm/_overload_yield.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_possible_constructor_return.cjs",
"module": "../../esm/_possible_constructor_return.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_read_only_error.cjs",
"module": "../../esm/_read_only_error.js"
}
+4
View File
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_set.cjs",
"module": "../../esm/_set.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_set_prototype_of.cjs",
"module": "../../esm/_set_prototype_of.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_skip_first_generator_next.cjs",
"module": "../../esm/_skip_first_generator_next.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_sliced_to_array.cjs",
"module": "../../esm/_sliced_to_array.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_sliced_to_array_loose.cjs",
"module": "../../esm/_sliced_to_array_loose.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_super_prop_base.cjs",
"module": "../../esm/_super_prop_base.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_tagged_template_literal.cjs",
"module": "../../esm/_tagged_template_literal.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_tagged_template_literal_loose.cjs",
"module": "../../esm/_tagged_template_literal_loose.js"
}
+4
View File
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_throw.cjs",
"module": "../../esm/_throw.js"
}
+4
View File
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_to_array.cjs",
"module": "../../esm/_to_array.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_to_consumable_array.cjs",
"module": "../../esm/_to_consumable_array.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_to_primitive.cjs",
"module": "../../esm/_to_primitive.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_to_property_key.cjs",
"module": "../../esm/_to_property_key.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_ts_add_disposable_resource.cjs",
"module": "../../esm/_ts_add_disposable_resource.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_ts_decorate.cjs",
"module": "../../esm/_ts_decorate.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_ts_dispose_resources.cjs",
"module": "../../esm/_ts_dispose_resources.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_ts_generator.cjs",
"module": "../../esm/_ts_generator.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_ts_metadata.cjs",
"module": "../../esm/_ts_metadata.js"
}
+4
View File
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_ts_param.cjs",
"module": "../../esm/_ts_param.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_ts_rewrite_relative_import_extension.cjs",
"module": "../../esm/_ts_rewrite_relative_import_extension.js"
}
+4
View File
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_ts_values.cjs",
"module": "../../esm/_ts_values.js"
}
+4
View File
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_type_of.cjs",
"module": "../../esm/_type_of.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_unsupported_iterable_to_array.cjs",
"module": "../../esm/_unsupported_iterable_to_array.js"
}
+4
View File
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_update.cjs",
"module": "../../esm/_update.js"
}
+4
View File
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_using.cjs",
"module": "../../esm/_using.js"
}
+4
View File
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_using_ctx.cjs",
"module": "../../esm/_using_ctx.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_wrap_async_generator.cjs",
"module": "../../esm/_wrap_async_generator.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_wrap_native_super.cjs",
"module": "../../esm/_wrap_native_super.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_wrap_reg_exp.cjs",
"module": "../../esm/_wrap_reg_exp.js"
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_write_only_error.cjs",
"module": "../../esm/_write_only_error.js"
}
+4
View File
@@ -0,0 +1,4 @@
{
"main": "../../cjs/index.cjs",
"module": "../../esm/index.js"
}
@@ -0,0 +1,35 @@
"use strict";
function _apply_decorated_descriptor(target, property, decorators, descriptor, context) {
var desc = {};
Object["ke" + "ys"](descriptor).forEach(function(key) {
desc[key] = descriptor[key];
});
desc.enumerable = !!desc.enumerable;
desc.configurable = !!desc.configurable;
if ("value" in desc || desc.initializer) desc.writable = true;
desc = decorators.slice().reverse().reduce(function(desc, decorator) {
return decorator ? decorator(target, property, desc) || desc : desc;
}, desc);
var hasAccessor = Object.prototype.hasOwnProperty.call(desc, "get") || Object.prototype.hasOwnProperty.call(desc, "set");
if (context && desc.initializer !== void 0 && !hasAccessor) {
desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
desc.initializer = undefined;
}
if (hasAccessor) {
delete desc.writable;
delete desc.initializer;
delete desc.value;
}
if (desc.initializer === void 0) {
Object["define" + "Property"](target, property, desc);
desc = null;
}
return desc;
}
exports._ = _apply_decorated_descriptor;
+574
View File
@@ -0,0 +1,574 @@
"use strict";
/* @minVersion 7.20.0 */
/**
Enums are used in this file, but not assigned to vars to avoid non-hoistable values
CONSTRUCTOR = 0;
PUBLIC = 1;
PRIVATE = 2;
FIELD = 0;
ACCESSOR = 1;
METHOD = 2;
GETTER = 3;
SETTER = 4;
STATIC = 5;
CLASS = 10; // only used in assertValidReturnValue
*/
function _apply_decs_2203_r(targetClass, memberDecs, classDecs, parentClass) {
function createAddInitializerMethod(initializers, decoratorFinishedRef) {
return function addInitializer(initializer) {
assertNotFinished(decoratorFinishedRef, "addInitializer");
assertCallable(initializer, "An initializer");
initializers.push(initializer);
};
}
function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value) {
var kindStr;
switch (kind) {
case 1 /* ACCESSOR */:
kindStr = "accessor";
break;
case 2 /* METHOD */:
kindStr = "method";
break;
case 3 /* GETTER */:
kindStr = "getter";
break;
case 4 /* SETTER */:
kindStr = "setter";
break;
default:
kindStr = "field";
}
var ctx = { kind: kindStr, name: isPrivate ? "#" + name : name, static: isStatic, private: isPrivate, metadata: metadata };
var decoratorFinishedRef = { v: false };
ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef);
var get, set;
if (kind === 0 /* FIELD */) {
if (isPrivate) {
get = desc.get;
set = desc.set;
} else {
get = function() {
return this[name];
};
set = function(v) {
this[name] = v;
};
}
} else if (kind === 2 /* METHOD */) {
get = function() {
return desc.value;
};
} else {
// replace with values that will go through the final getter and setter
if (kind === 1 /* ACCESSOR */ || kind === 3 /* GETTER */) {
get = function() {
return desc.get.call(this);
};
}
if (kind === 1 /* ACCESSOR */ || kind === 4 /* SETTER */) {
set = function(v) {
desc.set.call(this, v);
};
}
}
if (get) {
var originalGet = get;
get = function(target) {
if (arguments.length === 0) {
target = this;
}
return originalGet.call(target);
};
}
if (set) {
var originalSet = set;
set = function(target, value) {
if (arguments.length === 1) {
value = target;
target = this;
}
return originalSet.call(target, value);
};
}
if (isPrivate) {
ctx.access = get && set ? { get: get, set: set } : get ? { get: get } : { set: set };
} else {
var has = function(target) {
return name in target;
};
ctx.access = get && set ? { has: has, get: get, set: set } : get ? { has: has, get: get } : { has: has, set: set };
}
var newValue = dec(value, ctx);
decoratorFinishedRef.v = true;
return newValue;
}
function assertNotFinished(decoratorFinishedRef, fnName) {
if (decoratorFinishedRef.v) {
throw new Error("attempted to call " + fnName + " after decoration was finished");
}
}
function assertCallable(fn, hint) {
if (typeof fn !== "function") {
throw new TypeError(hint + " must be a function");
}
}
function assertValidReturnValue(kind, value) {
var type = typeof value;
if (kind === 1 /* ACCESSOR */) {
if (type !== "object" || value === null) {
throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
}
if (value.get !== undefined) {
assertCallable(value.get, "accessor.get");
}
if (value.set !== undefined) {
assertCallable(value.set, "accessor.set");
}
if (value.init !== undefined) {
assertCallable(value.init, "accessor.init");
}
} else if (type !== "function") {
var hint;
if (kind === 0 /* FIELD */) {
hint = "field";
} else if (kind === 10 /* CLASS */) {
hint = "class";
} else {
hint = "method";
}
throw new TypeError(hint + " decorators must return a function or void 0");
}
}
function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata) {
var decs = decInfo[0];
var desc, init, value;
if (isPrivate) {
if (kind === 0 /* FIELD */ || kind === 1 /* ACCESSOR */) {
desc = { get: decInfo[3], set: decInfo[4] };
} else if (kind === 3 /* GETTER */) {
desc = { get: decInfo[3] };
} else if (kind === 4 /* SETTER */) {
desc = { set: decInfo[3] };
} else {
desc = { value: decInfo[3] };
}
} else if (kind !== 0 /* FIELD */) {
desc = Object.getOwnPropertyDescriptor(base, name);
}
if (kind === 1 /* ACCESSOR */) {
value = { get: desc.get, set: desc.set };
} else if (kind === 2 /* METHOD */) {
value = desc.value;
} else if (kind === 3 /* GETTER */) {
value = desc.get;
} else if (kind === 4 /* SETTER */) {
value = desc.set;
}
var newValue, get, set;
if (typeof decs === "function") {
newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, metadata, value);
if (newValue !== void 0) {
assertValidReturnValue(kind, newValue);
if (kind === 0 /* FIELD */) {
init = newValue;
} else if (kind === 1 /* ACCESSOR */) {
init = newValue.init;
get = newValue.get || value.get;
set = newValue.set || value.set;
value = { get: get, set: set };
} else {
value = newValue;
}
}
} else {
for (var i = decs.length - 1; i >= 0; i--) {
var dec = decs[i];
newValue = memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value);
if (newValue !== void 0) {
assertValidReturnValue(kind, newValue);
var newInit;
if (kind === 0 /* FIELD */) {
newInit = newValue;
} else if (kind === 1 /* ACCESSOR */) {
newInit = newValue.init;
get = newValue.get || value.get;
set = newValue.set || value.set;
value = { get: get, set: set };
} else {
value = newValue;
}
if (newInit !== void 0) {
if (init === void 0) {
init = newInit;
} else if (typeof init === "function") {
init = [init, newInit];
} else {
init.push(newInit);
}
}
}
}
}
if (kind === 0 /* FIELD */ || kind === 1 /* ACCESSOR */) {
if (init === void 0) {
// If the initializer was void 0, sub in a dummy initializer
init = function(instance, init) {
return init;
};
} else if (typeof init !== "function") {
var ownInitializers = init;
init = function(instance, init) {
var value = init;
for (var i = 0; i < ownInitializers.length; i++) value = ownInitializers[i].call(instance, value);
return value;
};
} else {
var originalInitializer = init;
init = function(instance, init) {
return originalInitializer.call(instance, init);
};
}
ret.push(init);
}
if (kind !== 0 /* FIELD */) {
if (kind === 1 /* ACCESSOR */) {
desc.get = value.get;
desc.set = value.set;
} else if (kind === 2 /* METHOD */) {
desc.value = value;
} else if (kind === 3 /* GETTER */) {
desc.get = value;
} else if (kind === 4 /* SETTER */) {
desc.set = value;
}
if (isPrivate) {
if (kind === 1 /* ACCESSOR */) {
ret.push(function(instance, args) {
return value.get.call(instance, args);
});
ret.push(function(instance, args) {
return value.set.call(instance, args);
});
} else if (kind === 2 /* METHOD */) {
ret.push(value);
} else {
ret.push(function(instance, args) {
return value.call(instance, args);
});
}
} else {
Object.defineProperty(base, name, desc);
}
}
}
function applyMemberDecs(Class, decInfos, metadata) {
var ret = [];
var protoInitializers;
var staticInitializers;
var existingProtoNonFields = new Map();
var existingStaticNonFields = new Map();
for (var i = 0; i < decInfos.length; i++) {
var decInfo = decInfos[i];
// skip computed property names
if (!Array.isArray(decInfo)) continue;
var kind = decInfo[1];
var name = decInfo[2];
var isPrivate = decInfo.length > 3;
var isStatic = kind >= 5; /* STATIC */
var base;
var initializers;
if (isStatic) {
base = Class;
kind = kind - 5 /* STATIC */;
// initialize staticInitializers when we see a non-field static member
staticInitializers = staticInitializers || [];
initializers = staticInitializers;
} else {
base = Class.prototype;
// initialize protoInitializers when we see a non-field member
protoInitializers = protoInitializers || [];
initializers = protoInitializers;
}
if (kind !== 0 /* FIELD */ && !isPrivate) {
var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields;
var existingKind = existingNonFields.get(name) || 0;
if (existingKind === true || (existingKind === 3 /* GETTER */ && kind !== 4) /* SETTER */ || (existingKind === 4 /* SETTER */ && kind !== 3) /* GETTER */) {
throw new Error(
"Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "
+ name
);
} else if (!existingKind && kind > 2 /* METHOD */) {
existingNonFields.set(name, kind);
} else {
existingNonFields.set(name, true);
}
}
applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata);
}
pushInitializers(ret, protoInitializers);
pushInitializers(ret, staticInitializers);
return ret;
}
function pushInitializers(ret, initializers) {
if (initializers) {
ret.push(function(instance) {
for (var i = 0; i < initializers.length; i++) initializers[i].call(instance);
return instance;
});
}
}
function applyClassDecs(targetClass, classDecs, metadata) {
if (classDecs.length > 0) {
var initializers = [];
var newClass = targetClass;
var name = targetClass.name;
for (var i = classDecs.length - 1; i >= 0; i--) {
var decoratorFinishedRef = { v: false };
var nextNewClass = classDecs[i](newClass, { kind: "class", name: name, addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef), metadata });
decoratorFinishedRef.v = true;
if (nextNewClass !== undefined) {
assertValidReturnValue(10, /* CLASS */ nextNewClass);
newClass = nextNewClass;
}
}
return [defineMetadata(newClass, metadata), function() {
for (var i = 0; i < initializers.length; i++) initializers[i].call(newClass);
}];
}
// The transformer will not emit assignment when there are no class decorators,
// so we don't have to return an empty array here.
}
function defineMetadata(Class, metadata) {
return Object.defineProperty(Class, Symbol.metadata || Symbol.for("Symbol.metadata"), { configurable: true, enumerable: true, value: metadata });
}
/**
Basic usage:
applyDecs(
Class,
[
// member decorators
[
dec, // dec or array of decs
0, // kind of value being decorated
'prop', // name of public prop on class containing the value being decorated,
'#p', // the name of the private property (if is private, void 0 otherwise),
]
],
[
// class decorators
dec1, dec2
]
)
```
Fully transpiled example:
```js
@dec
class Class {
@dec
a = 123;
@dec
#a = 123;
@dec
@dec2
accessor b = 123;
@dec
accessor #b = 123;
@dec
c() { console.log('c'); }
@dec
#c() { console.log('privC'); }
@dec
get d() { console.log('d'); }
@dec
get #d() { console.log('privD'); }
@dec
set e(v) { console.log('e'); }
@dec
set #e(v) { console.log('privE'); }
}
// becomes
let initializeInstance;
let initializeClass;
let initA;
let initPrivA;
let initB;
let initPrivB, getPrivB, setPrivB;
let privC;
let privD;
let privE;
let Class;
class _Class {
static {
let ret = applyDecs(
this,
[
[dec, 0, 'a'],
[dec, 0, 'a', (i) => i.#a, (i, v) => i.#a = v],
[[dec, dec2], 1, 'b'],
[dec, 1, 'b', (i) => i.#privBData, (i, v) => i.#privBData = v],
[dec, 2, 'c'],
[dec, 2, 'c', () => console.log('privC')],
[dec, 3, 'd'],
[dec, 3, 'd', () => console.log('privD')],
[dec, 4, 'e'],
[dec, 4, 'e', () => console.log('privE')],
],
[
dec
]
)
initA = ret[0];
initPrivA = ret[1];
initB = ret[2];
initPrivB = ret[3];
getPrivB = ret[4];
setPrivB = ret[5];
privC = ret[6];
privD = ret[7];
privE = ret[8];
initializeInstance = ret[9];
Class = ret[10]
initializeClass = ret[11];
}
a = (initializeInstance(this), initA(this, 123));
#a = initPrivA(this, 123);
#bData = initB(this, 123);
get b() { return this.#bData }
set b(v) { this.#bData = v }
#privBData = initPrivB(this, 123);
get #b() { return getPrivB(this); }
set #b(v) { setPrivB(this, v); }
c() { console.log('c'); }
#c(...args) { return privC(this, ...args) }
get d() { console.log('d'); }
get #d() { return privD(this); }
set e(v) { console.log('e'); }
set #e(v) { privE(this, v); }
}
initializeClass(Class);
*/
exports._ = _apply_decs_2203_r = function(targetClass, memberDecs, classDecs, parentClass) {
if (parentClass !== void 0) {
var parentMetadata = parentClass[Symbol.metadata || Symbol.for("Symbol.metadata")];
}
var metadata = Object.create(parentMetadata === void 0 ? null : parentMetadata);
var e = applyMemberDecs(targetClass, memberDecs, metadata);
if (!classDecs.length) defineMetadata(targetClass, metadata);
return {
e: e,
// Lazily apply class decorations so that member init locals can be properly bound.
get c() {
return applyClassDecs(targetClass, classDecs, metadata);
}
};
};
return _apply_decs_2203_r(targetClass, memberDecs, classDecs, parentClass);
}
exports._ = _apply_decs_2203_r;
+346
View File
@@ -0,0 +1,346 @@
"use strict";
/* @minVersion 7.24.0 */
function toPrimitive(input, hint) {
if (typeof input !== "object" || input === null) {
return input;
}
var prim = input[Symbol.toPrimitive];
if (prim !== undefined) {
var res = prim.call(input, hint || "default");
if (typeof res !== "object") {
return res;
}
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return (hint === "string" ? String : Number)(input);
}
function toPropertyKey(arg) {
var key = toPrimitive(arg, "string");
return typeof key === "symbol" ? key : String(key);
}
function checkInRHS(value) {
if (Object(value) !== value) {
throw TypeError("right-hand side of 'in' should be an object, got " + (value !== null ? typeof value : "null"));
}
return value;
}
function setFunctionName(fn, name, prefix) {
if (typeof name === "symbol") {
name = name.description;
name = name ? "[" + name + "]" : "";
}
try {
Object.defineProperty(fn, "name", { configurable: true, value: prefix ? prefix + " " + name : name });
} catch (_) {}
return fn;
}
/**
kind bit layout
FIELD = 0
ACCESSOR = 1
METHOD = 2
GETTER = 3
SETTER = 4
CLASS = 5
STATIC = 8
DECORATORS_HAVE_THIS = 16
*/
function _apply_decs_2311(targetClass, classDecs, memberDecs, classDecsHaveThis, instanceBrand, parentClass) {
var symbolMetadata = Symbol.metadata || Symbol.for("Symbol.metadata");
var defineProperty = Object.defineProperty;
var create = Object.create;
var metadata;
var existingNonFields = [create(null), create(null)];
var hasClassDecs = classDecs.length;
var _;
function createRunInitializers(initializers, useStaticThis, hasValue) {
return function(thisArg, value) {
if (useStaticThis) {
value = thisArg;
thisArg = targetClass;
}
for (var i = 0; i < initializers.length; i++) value = initializers[i].apply(thisArg, hasValue ? [value] : []);
return hasValue ? value : thisArg;
};
}
function assertCallable(fn, hint1, hint2, throwUndefined) {
if (typeof fn !== "function") {
if (throwUndefined || fn !== void 0) {
throw new TypeError(hint1 + " must " + (hint2 || "be") + " a function" + (throwUndefined ? "" : " or undefined"));
}
}
return fn;
}
function applyDec(Class, decInfo, decoratorsHaveThis, name, kind, initializers, ret, isStatic, isPrivate, isField, hasPrivateBrand) {
function assertInstanceIfPrivate(target) {
if (!hasPrivateBrand(target)) {
throw new TypeError("Attempted to access private element on non-instance");
}
}
var decs = [].concat(decInfo[0]);
var decVal = decInfo[3];
var isClass = !ret;
var isAccessor = kind === 1;
var isGetter = kind === 3;
var isSetter = kind === 4;
var isMethod = kind === 2;
function bindPropCall(name, useStaticThis, before) {
return function(_this, value) {
if (useStaticThis) {
value = _this;
_this = Class;
}
if (before) {
before(_this);
}
return desc[name].call(_this, value);
};
}
var desc = {};
var init = [];
var key = isGetter ? "get" : isSetter || isAccessor ? "set" : "value";
if (!isClass) {
if (isPrivate) {
if (isField || isAccessor) {
desc = {
get: setFunctionName(
function() {
return decVal(this);
},
name,
"get"
),
set: function(value) {
decInfo[4](this, value);
}
};
} else {
desc[key] = decVal;
}
if (!isField) {
setFunctionName(desc[key], name, isMethod ? "" : key);
}
} else if (!isField) {
desc = Object.getOwnPropertyDescriptor(Class, name);
}
if (!isField && !isPrivate) {
_ = existingNonFields[+isStatic][name];
if (_ && (_ ^ kind) !== 7) {
throw new Error("Decorating two elements with the same name (" + desc[key].name + ") is not supported yet");
}
existingNonFields[+isStatic][name] = kind < 3 ? 1 : kind;
}
}
var newValue = Class;
for (var i = decs.length - 1; i >= 0; i -= decoratorsHaveThis ? 2 : 1) {
var dec = assertCallable(decs[i], "A decorator", "be", true);
var decThis = decoratorsHaveThis ? decs[i - 1] : void 0;
var decoratorFinishedRef = {};
var ctx = {
kind: ["field", "accessor", "method", "getter", "setter", "class"][kind],
name: name,
metadata: metadata,
addInitializer: function(decoratorFinishedRef, initializer) {
if (decoratorFinishedRef.v) {
throw new TypeError("attempted to call addInitializer after decoration was finished");
}
assertCallable(initializer, "An initializer", "be", true);
initializers.push(initializer);
}
.bind(null, decoratorFinishedRef)
};
if (isClass) {
_ = dec.call(decThis, newValue, ctx);
decoratorFinishedRef.v = 1;
if (assertCallable(_, "class decorators", "return")) {
newValue = _;
}
continue;
}
ctx.static = isStatic;
ctx.private = isPrivate;
_ = ctx.access = {
has: isPrivate ? hasPrivateBrand.bind() : function(target) {
return name in target;
}
};
if (!isSetter) {
_.get = isPrivate
? isMethod
? function(_this) {
assertInstanceIfPrivate(_this);
return desc.value;
}
: bindPropCall("get", 0, assertInstanceIfPrivate)
: function(target) {
return target[name];
};
}
if (!isMethod && !isGetter) {
_.set = isPrivate ? bindPropCall("set", 0, assertInstanceIfPrivate) : function(target, value) {
target[name] = value;
};
}
newValue = dec.call(decThis, isAccessor ? { get: desc.get, set: desc.set } : desc[key], ctx);
decoratorFinishedRef.v = 1;
if (isAccessor) {
if (typeof newValue === "object" && newValue) {
if ((_ = assertCallable(newValue.get, "accessor.get"))) {
desc.get = _;
}
if ((_ = assertCallable(newValue.set, "accessor.set"))) {
desc.set = _;
}
if ((_ = assertCallable(newValue.init, "accessor.init"))) {
init.unshift(_);
}
} else if (newValue !== void 0) {
throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined");
}
} else if (assertCallable(newValue, (isField ? "field" : "method") + " decorators", "return")) {
if (isField) {
init.unshift(newValue);
} else {
desc[key] = newValue;
}
}
}
if (kind < 2) {
ret.push(createRunInitializers(init, isStatic, 1), createRunInitializers(initializers, isStatic, 0));
}
if (!isField && !isClass) {
if (isPrivate) {
if (isAccessor) {
ret.splice(-1, 0, bindPropCall("get", isStatic), bindPropCall("set", isStatic));
} else {
ret.push(isMethod ? desc[key] : assertCallable.call.bind(desc[key]));
}
} else {
defineProperty(Class, name, desc);
}
}
return newValue;
}
function applyMemberDecs() {
var ret = [];
var protoInitializers;
var staticInitializers;
var pushInitializers = function(initializers) {
if (initializers) {
ret.push(createRunInitializers(initializers));
}
};
var applyMemberDecsOfKind = function(isStatic, isField) {
for (var i = 0; i < memberDecs.length; i++) {
var decInfo = memberDecs[i];
var kind = decInfo[1];
var kindOnly = kind & 7;
if ((kind & 8) == isStatic && !kindOnly == isField) {
var name = decInfo[2];
var isPrivate = !!decInfo[3];
var decoratorsHaveThis = kind & 16;
applyDec(
isStatic ? targetClass : targetClass.prototype,
decInfo,
decoratorsHaveThis,
isPrivate ? "#" + name : toPropertyKey(name),
kindOnly,
kindOnly < 2 ? [] : isStatic ? (staticInitializers = staticInitializers || []) : (protoInitializers = protoInitializers || []),
ret,
!!isStatic,
isPrivate,
isField,
isStatic && isPrivate
? function(_) {
return checkInRHS(_) === targetClass;
}
: instanceBrand
);
}
}
};
applyMemberDecsOfKind(8, 0);
applyMemberDecsOfKind(0, 0);
applyMemberDecsOfKind(8, 1);
applyMemberDecsOfKind(0, 1);
pushInitializers(protoInitializers);
pushInitializers(staticInitializers);
return ret;
}
function defineMetadata(Class) {
return defineProperty(Class, symbolMetadata, { configurable: true, enumerable: true, value: metadata });
}
if (parentClass !== undefined) {
metadata = parentClass[symbolMetadata];
}
metadata = create(metadata == null ? null : metadata);
_ = applyMemberDecs();
if (!hasClassDecs) {
defineMetadata(targetClass);
}
return {
e: _,
get c() {
var initializers = [];
return (hasClassDecs && [defineMetadata(targetClass = applyDec(targetClass, [classDecs], classDecsHaveThis, targetClass.name, 5, initializers)), createRunInitializers(initializers, 1)]);
}
};
}
exports._ = _apply_decs_2311;
@@ -0,0 +1,10 @@
"use strict";
function _array_like_to_array(arr, len) {
if (len == null || len > arr.length) len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
return arr2;
}
exports._ = _array_like_to_array;
+6
View File
@@ -0,0 +1,6 @@
"use strict";
function _array_with_holes(arr) {
if (Array.isArray(arr)) return arr;
}
exports._ = _array_with_holes;
@@ -0,0 +1,8 @@
"use strict";
var _array_like_to_array = require("./_array_like_to_array.cjs");
function _array_without_holes(arr) {
if (Array.isArray(arr)) return _array_like_to_array._(arr);
}
exports._ = _array_without_holes;
@@ -0,0 +1,8 @@
"use strict";
function _assert_this_initialized(self) {
if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return self;
}
exports._ = _assert_this_initialized;
+76
View File
@@ -0,0 +1,76 @@
"use strict";
var _overload_yield = require("./_overload_yield.cjs");
function _async_generator(gen) {
var front, back;
function send(key, arg) {
return new Promise(function(resolve, reject) {
var request = { key: key, arg: arg, resolve: resolve, reject: reject, next: null };
if (back) back = back.next = request;
else {
front = back = request;
resume(key, arg);
}
});
}
function resume(key, arg) {
try {
var result = gen[key](arg);
var value = result.value;
var overloaded = value instanceof _overload_yield._;
Promise.resolve(overloaded ? value.v : value).then(function(arg) {
if (overloaded) {
var nextKey = key === "return" ? "return" : "next";
if (!value.k || arg.done) return resume(nextKey, arg);
else arg = gen[nextKey](arg).value;
}
settle(result.done ? "return" : "normal", arg);
}, function(err) {
resume("throw", err);
});
} catch (err) {
settle("throw", err);
}
}
function settle(type, value) {
switch (type) {
case "return":
front.resolve({ value: value, done: true });
break;
case "throw":
front.reject(value);
break;
default:
front.resolve({ value: value, done: false });
break;
}
front = front.next;
if (front) resume(front.key, front.arg);
else back = null;
}
this._invoke = send;
if (typeof gen.return !== "function") this.return = undefined;
}
_async_generator.prototype[(typeof Symbol === "function" && Symbol.asyncIterator) || "@@asyncIterator"] = function() {
return this;
};
_async_generator.prototype.next = function(arg) {
return this._invoke("next", arg);
};
_async_generator.prototype.throw = function(arg) {
return this._invoke("throw", arg);
};
_async_generator.prototype.return = function(arg) {
return this._invoke("return", arg);
};
exports._ = _async_generator;
@@ -0,0 +1,53 @@
"use strict";
var _overload_yield = require("./_overload_yield.cjs");
function _async_generator_delegate(inner) {
var iter = {}, waiting = false;
function pump(key, value) {
waiting = true;
value = new Promise(function(resolve) {
resolve(inner[key](value));
});
return { done: false, value: new _overload_yield._(value, /* kind: delegate */ 1) };
}
iter[(typeof Symbol !== "undefined" && Symbol.iterator) || "@@iterator"] = function() {
return this;
};
iter.next = function(value) {
if (waiting) {
waiting = false;
return value;
}
return pump("next", value);
};
if (typeof inner.throw === "function") {
iter.throw = function(value) {
if (waiting) {
waiting = false;
throw value;
}
return pump("throw", value);
};
}
if (typeof inner.return === "function") {
iter.return = function(value) {
if (waiting) {
waiting = false;
return value;
}
return pump("return", value);
};
}
return iter;
}
exports._ = _async_generator_delegate;
+46
View File
@@ -0,0 +1,46 @@
"use strict";
function _async_iterator(iterable) {
var method, async, sync, retry = 2;
for ("undefined" != typeof Symbol && (async = Symbol.asyncIterator, sync = Symbol.iterator); retry--;) {
if (async && null != (method = iterable[async])) return method.call(iterable);
if (sync && null != (method = iterable[sync])) return new AsyncFromSyncIterator(method.call(iterable));
async = "@@asyncIterator", sync = "@@iterator";
}
throw new TypeError("Object is not async iterable");
}
function AsyncFromSyncIterator(s) {
function AsyncFromSyncIteratorContinuation(r) {
if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object."));
var done = r.done;
return Promise.resolve(r.value).then(function(value) {
return { value: value, done: done };
});
}
return AsyncFromSyncIterator = function(s) {
this.s = s, this.n = s.next;
},
AsyncFromSyncIterator.prototype = {
s: null,
n: null,
next: function() {
return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments));
},
return: function(value) {
var ret = this.s.return;
return void 0 === ret ? Promise.resolve({ value: value, done: !0 }) : AsyncFromSyncIteratorContinuation(ret.apply(this.s, arguments));
},
throw: function(value) {
var thr = this.s.return;
return void 0 === thr ? Promise.reject(value) : AsyncFromSyncIteratorContinuation(thr.apply(this.s, arguments));
}
},
new AsyncFromSyncIterator(s);
}
exports._ = _async_iterator;
+33
View File
@@ -0,0 +1,33 @@
"use strict";
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 _async_to_generator(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);
});
};
}
exports._ = _async_to_generator;
@@ -0,0 +1,8 @@
"use strict";
var _overload_yield = require("./_overload_yield.cjs");
function _await_async_generator(value) {
return new _overload_yield._(value, /* kind: await */ 0);
}
exports._ = _await_async_generator;
+6
View File
@@ -0,0 +1,6 @@
"use strict";
function _await_value(value) {
this.wrapped = value;
}
exports._ = _await_value;
+19
View File
@@ -0,0 +1,19 @@
"use strict";
var _get_prototype_of = require("./_get_prototype_of.cjs");
var _is_native_reflect_construct = require("./_is_native_reflect_construct.cjs");
var _possible_constructor_return = require("./_possible_constructor_return.cjs");
function _call_super(_this, derived, args) {
// Super
derived = _get_prototype_of._(derived);
return _possible_constructor_return._(
_this,
_is_native_reflect_construct._()
// NOTE: This doesn't work if this.__proto__.constructor has been modified.
? Reflect.construct(derived, args || [], _get_prototype_of._(_this).constructor)
: derived.apply(_this, args)
);
}
exports._ = _call_super;
@@ -0,0 +1,8 @@
"use strict";
function _check_private_redeclaration(obj, privateCollection) {
if (privateCollection.has(obj)) {
throw new TypeError("Cannot initialize the same private elements twice on an object");
}
}
exports._ = _check_private_redeclaration;
@@ -0,0 +1,25 @@
"use strict";
function _class_apply_descriptor_destructure(receiver, descriptor) {
if (descriptor.set) {
if (!("__destrObj" in descriptor)) {
descriptor.__destrObj = {
set value(v) {
descriptor.set.call(receiver, v);
}
};
}
return descriptor.__destrObj;
} else {
if (!descriptor.writable) {
// This should only throw in strict mode, but class bodies are
// always strict and private fields can only be used inside
// class bodies.
throw new TypeError("attempted to set read only private field");
}
return descriptor;
}
}
exports._ = _class_apply_descriptor_destructure;
@@ -0,0 +1,8 @@
"use strict";
function _class_apply_descriptor_get(receiver, descriptor) {
if (descriptor.get) return descriptor.get.call(receiver);
return descriptor.value;
}
exports._ = _class_apply_descriptor_get;
@@ -0,0 +1,15 @@
"use strict";
function _class_apply_descriptor_set(receiver, descriptor, value) {
if (descriptor.set) descriptor.set.call(receiver, value);
else {
if (!descriptor.writable) {
// This should only throw in strict mode, but class bodies are
// always strict and private fields can only be used inside
// class bodies.
throw new TypeError("attempted to set read only private field");
}
descriptor.value = value;
}
}
exports._ = _class_apply_descriptor_set;
@@ -0,0 +1,30 @@
"use strict";
function _class_apply_descriptor_update(receiver, descriptor) {
if (descriptor.set) {
if (!descriptor.get) throw new TypeError("attempted to read set only private field");
if (!("__destrWrapper" in descriptor)) {
descriptor.__destrWrapper = {
set value(v) {
descriptor.set.call(receiver, v);
},
get value() {
return descriptor.get.call(receiver);
}
};
}
return descriptor.__destrWrapper;
} else {
if (!descriptor.writable) {
// This should only throw in strict mode, but class bodies are
// always strict and private fields can only be used inside
// class bodies.
throw new TypeError("attempted to set read only private field");
}
return descriptor;
}
}
exports._ = _class_apply_descriptor_update;
+6
View File
@@ -0,0 +1,6 @@
"use strict";
function _class_call_check(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
exports._ = _class_call_check;
@@ -0,0 +1,6 @@
"use strict";
function _class_check_private_static_access(receiver, classConstructor) {
if (receiver !== classConstructor) throw new TypeError("Private static access of wrong provenance");
}
exports._ = _class_check_private_static_access;
@@ -0,0 +1,8 @@
"use strict";
function _class_check_private_static_field_descriptor(descriptor, action) {
if (descriptor === undefined) {
throw new TypeError("attempted to " + action + " private static field before its declaration");
}
}
exports._ = _class_check_private_static_field_descriptor;
@@ -0,0 +1,8 @@
"use strict";
function _class_extract_field_descriptor(receiver, privateMap, action) {
if (!privateMap.has(receiver)) throw new TypeError("attempted to " + action + " private field on non-instance");
return privateMap.get(receiver);
}
exports._ = _class_extract_field_descriptor;
@@ -0,0 +1,6 @@
"use strict";
function _class_name_tdz_error(name) {
throw new ReferenceError("Class \"" + name + "\" cannot be referenced in computed property keys.");
}
exports._ = _class_name_tdz_error;
@@ -0,0 +1,10 @@
"use strict";
var _class_apply_descriptor_destructure = require("./_class_apply_descriptor_destructure.cjs");
var _class_extract_field_descriptor = require("./_class_extract_field_descriptor.cjs");
function _class_private_field_destructure(receiver, privateMap) {
var descriptor = _class_extract_field_descriptor._(receiver, privateMap, "set");
return _class_apply_descriptor_destructure._(receiver, descriptor);
}
exports._ = _class_private_field_destructure;
@@ -0,0 +1,10 @@
"use strict";
var _class_apply_descriptor_get = require("./_class_apply_descriptor_get.cjs");
var _class_extract_field_descriptor = require("./_class_extract_field_descriptor.cjs");
function _class_private_field_get(receiver, privateMap) {
var descriptor = _class_extract_field_descriptor._(receiver, privateMap, "get");
return _class_apply_descriptor_get._(receiver, descriptor);
}
exports._ = _class_private_field_get;
@@ -0,0 +1,9 @@
"use strict";
var _check_private_redeclaration = require("./_check_private_redeclaration.cjs");
function _class_private_field_init(obj, privateMap, value) {
_check_private_redeclaration._(obj, privateMap);
privateMap.set(obj, value);
}
exports._ = _class_private_field_init;
@@ -0,0 +1,10 @@
"use strict";
function _class_private_field_loose_base(receiver, privateKey) {
if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) {
throw new TypeError("attempted to use private field on non-instance");
}
return receiver;
}
exports._ = _class_private_field_loose_base;
@@ -0,0 +1,8 @@
"use strict";
var id = 0;
function _class_private_field_loose_key(name) {
return "__private_" + id++ + "_" + name;
}
exports._ = _class_private_field_loose_key;
@@ -0,0 +1,11 @@
"use strict";
var _class_apply_descriptor_set = require("./_class_apply_descriptor_set.cjs");
var _class_extract_field_descriptor = require("./_class_extract_field_descriptor.cjs");
function _class_private_field_set(receiver, privateMap, value) {
var descriptor = _class_extract_field_descriptor._(receiver, privateMap, "set");
_class_apply_descriptor_set._(receiver, descriptor, value);
return value;
}
exports._ = _class_private_field_set;
@@ -0,0 +1,10 @@
"use strict";
var _class_apply_descriptor_update = require("./_class_apply_descriptor_update.cjs");
var _class_extract_field_descriptor = require("./_class_extract_field_descriptor.cjs");
function _class_private_field_update(receiver, privateMap) {
var descriptor = _class_extract_field_descriptor._(receiver, privateMap, "update");
return _class_apply_descriptor_update._(receiver, descriptor);
}
exports._ = _class_private_field_update;
@@ -0,0 +1,8 @@
"use strict";
function _class_private_method_get(receiver, privateSet, fn) {
if (!privateSet.has(receiver)) throw new TypeError("attempted to get private field on non-instance");
return fn;
}
exports._ = _class_private_method_get;
@@ -0,0 +1,9 @@
"use strict";
var _check_private_redeclaration = require("./_check_private_redeclaration.cjs");
function _class_private_method_init(obj, privateSet) {
_check_private_redeclaration._(obj, privateSet);
privateSet.add(obj);
}
exports._ = _class_private_method_init;
@@ -0,0 +1,6 @@
"use strict";
function _class_private_method_set() {
throw new TypeError("attempted to reassign private method");
}
exports._ = _class_private_method_set;
@@ -0,0 +1,13 @@
"use strict";
var _class_apply_descriptor_destructure = require("./_class_apply_descriptor_destructure.cjs");
var _class_check_private_static_access = require("./_class_check_private_static_access.cjs");
var _class_check_private_static_field_descriptor = require("./_class_check_private_static_field_descriptor.cjs");
function _class_static_private_field_destructure(receiver, classConstructor, descriptor) {
_class_check_private_static_access._(receiver, classConstructor);
_class_check_private_static_field_descriptor._(descriptor, "set");
return _class_apply_descriptor_destructure._(receiver, descriptor);
}
exports._ = _class_static_private_field_destructure;
@@ -0,0 +1,13 @@
"use strict";
var _class_apply_descriptor_get = require("./_class_apply_descriptor_get.cjs");
var _class_check_private_static_access = require("./_class_check_private_static_access.cjs");
var _class_check_private_static_field_descriptor = require("./_class_check_private_static_field_descriptor.cjs");
function _class_static_private_field_spec_get(receiver, classConstructor, descriptor) {
_class_check_private_static_access._(receiver, classConstructor);
_class_check_private_static_field_descriptor._(descriptor, "get");
return _class_apply_descriptor_get._(receiver, descriptor);
}
exports._ = _class_static_private_field_spec_get;
@@ -0,0 +1,14 @@
"use strict";
var _class_apply_descriptor_set = require("./_class_apply_descriptor_set.cjs");
var _class_check_private_static_access = require("./_class_check_private_static_access.cjs");
var _class_check_private_static_field_descriptor = require("./_class_check_private_static_field_descriptor.cjs");
function _class_static_private_field_spec_set(receiver, classConstructor, descriptor, value) {
_class_check_private_static_access._(receiver, classConstructor);
_class_check_private_static_field_descriptor._(descriptor, "set");
_class_apply_descriptor_set._(receiver, descriptor, value);
return value;
}
exports._ = _class_static_private_field_spec_set;
@@ -0,0 +1,13 @@
"use strict";
var _class_apply_descriptor_update = require("./_class_apply_descriptor_update.cjs");
var _class_check_private_static_access = require("./_class_check_private_static_access.cjs");
var _class_check_private_static_field_descriptor = require("./_class_check_private_static_field_descriptor.cjs");
function _class_static_private_field_update(receiver, classConstructor, descriptor) {
_class_check_private_static_access._(receiver, classConstructor);
_class_check_private_static_field_descriptor._(descriptor, "update");
return _class_apply_descriptor_update._(receiver, descriptor);
}
exports._ = _class_static_private_field_update;
@@ -0,0 +1,10 @@
"use strict";
var _class_check_private_static_access = require("./_class_check_private_static_access.cjs");
function _class_static_private_method_get(receiver, classConstructor, method) {
_class_check_private_static_access._(receiver, classConstructor);
return method;
}
exports._ = _class_static_private_method_get;
+22
View File
@@ -0,0 +1,22 @@
"use strict";
var _is_native_reflect_construct = require("./_is_native_reflect_construct.cjs");
var _set_prototype_of = require("./_set_prototype_of.cjs");
function _construct(Parent, args, Class) {
if (_is_native_reflect_construct._()) exports._ = _construct = Reflect.construct;
else {
exports._ = _construct = function construct(Parent, args, Class) {
var a = [null];
a.push.apply(a, args);
var Constructor = Function.bind.apply(Parent, a);
var instance = new Constructor();
if (Class) _set_prototype_of._(instance, Class.prototype);
return instance;
};
}
return _construct.apply(null, arguments);
}
exports._ = _construct;
+20
View File
@@ -0,0 +1,20 @@
"use strict";
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
function _create_class(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
return Constructor;
}
exports._ = _create_class;
@@ -0,0 +1,24 @@
"use strict";
var _unsupported_iterable_to_array = require("./_unsupported_iterable_to_array.cjs");
function _create_for_of_iterator_helper_loose(o, allowArrayLike) {
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
if (it) return (it = it.call(o)).next.bind(it);
// Fallback for engines without symbol support
if (Array.isArray(o) || (it = _unsupported_iterable_to_array._(o)) || allowArrayLike && o && typeof o.length === "number") {
if (it) o = it;
var i = 0;
return function() {
if (i >= o.length) return { done: true };
return { done: false, value: o[i++] };
};
}
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
exports._ = _create_for_of_iterator_helper_loose;
+23
View File
@@ -0,0 +1,23 @@
"use strict";
var _get_prototype_of = require("./_get_prototype_of.cjs");
var _is_native_reflect_construct = require("./_is_native_reflect_construct.cjs");
var _possible_constructor_return = require("./_possible_constructor_return.cjs");
function _create_super(Derived) {
var hasNativeReflectConstruct = _is_native_reflect_construct._();
return function _createSuperInternal() {
var Super = _get_prototype_of._(Derived), result;
if (hasNativeReflectConstruct) {
var NewTarget = _get_prototype_of._(this).constructor;
result = Reflect.construct(Super, arguments, NewTarget);
} else {
result = Super.apply(this, arguments);
}
return _possible_constructor_return._(this, result);
};
}
exports._ = _create_super;
+270
View File
@@ -0,0 +1,270 @@
"use strict";
var _to_array = require("./_to_array.cjs");
var _to_property_key = require("./_to_property_key.cjs");
var _type_of = require("./_type_of.cjs");
function _decorate(decorators, factory, superClass) {
var r = factory(function initialize(O) {
_initializeInstanceElements(O, decorated.elements);
}, superClass);
var decorated = _decorateClass(_coalesceClassElements(r.d.map(_createElementDescriptor)), decorators);
_initializeClassElements(r.F, decorated.elements);
return _runClassFinishers(r.F, decorated.finishers);
}
function _createElementDescriptor(def) {
var key = _to_property_key._(def.key);
var descriptor;
if (def.kind === "method") {
descriptor = { value: def.value, writable: true, configurable: true, enumerable: false };
Object.defineProperty(def.value, "name", { value: _type_of._(key) === "symbol" ? "" : key, configurable: true });
} else if (def.kind === "get") descriptor = { get: def.value, configurable: true, enumerable: false };
else if (def.kind === "set") descriptor = { set: def.value, configurable: true, enumerable: false };
else if (def.kind === "field") descriptor = { configurable: true, writable: true, enumerable: true };
var element = { kind: def.kind === "field" ? "field" : "method", key: key, placement: def.static ? "static" : def.kind === "field" ? "own" : "prototype", descriptor: descriptor };
if (def.decorators) element.decorators = def.decorators;
if (def.kind === "field") element.initializer = def.value;
return element;
}
function _coalesceGetterSetter(element, other) {
if (element.descriptor.get !== undefined) other.descriptor.get = element.descriptor.get;
else other.descriptor.set = element.descriptor.set;
}
function _coalesceClassElements(elements) {
var newElements = [];
var isSameElement = function isSameElement(other) {
return other.kind === "method" && other.key === element.key && other.placement === element.placement;
};
for (var i = 0; i < elements.length; i++) {
var element = elements[i];
var other;
if (element.kind === "method" && (other = newElements.find(isSameElement))) {
if (_isDataDescriptor(element.descriptor) || _isDataDescriptor(other.descriptor)) {
if (_hasDecorators(element) || _hasDecorators(other)) {
throw new ReferenceError("Duplicated methods (" + element.key + ") can't be decorated.");
}
other.descriptor = element.descriptor;
} else {
if (_hasDecorators(element)) {
if (_hasDecorators(other)) {
throw new ReferenceError("Decorators can't be placed on different accessors with for " + "the same property (" + element.key + ").");
}
other.decorators = element.decorators;
}
_coalesceGetterSetter(element, other);
}
} else {
newElements.push(element);
}
}
return newElements;
}
function _hasDecorators(element) {
return element.decorators && element.decorators.length;
}
function _isDataDescriptor(desc) {
return desc !== undefined && !(desc.value === undefined && desc.writable === undefined);
}
function _initializeClassElements(F, elements) {
var proto = F.prototype;
["method", "field"].forEach(function(kind) {
elements.forEach(function(element) {
var placement = element.placement;
if (element.kind === kind && (placement === "static" || placement === "prototype")) {
var receiver = placement === "static" ? F : proto;
_defineClassElement(receiver, element);
}
});
});
}
function _initializeInstanceElements(O, elements) {
["method", "field"].forEach(function(kind) {
elements.forEach(function(element) {
if (element.kind === kind && element.placement === "own") _defineClassElement(O, element);
});
});
}
function _defineClassElement(receiver, element) {
var descriptor = element.descriptor;
if (element.kind === "field") {
var initializer = element.initializer;
descriptor = { enumerable: descriptor.enumerable, writable: descriptor.writable, configurable: descriptor.configurable, value: initializer === void 0 ? void 0 : initializer.call(receiver) };
}
Object.defineProperty(receiver, element.key, descriptor);
}
function _decorateClass(elements, decorators) {
var newElements = [];
var finishers = [];
var placements = { static: [], prototype: [], own: [] };
elements.forEach(function(element) {
_addElementPlacement(element, placements);
});
elements.forEach(function(element) {
if (!_hasDecorators(element)) return newElements.push(element);
var elementFinishersExtras = _decorateElement(element, placements);
newElements.push(elementFinishersExtras.element);
newElements.push.apply(newElements, elementFinishersExtras.extras);
finishers.push.apply(finishers, elementFinishersExtras.finishers);
});
if (!decorators) return { elements: newElements, finishers: finishers };
var result = _decorateConstructor(newElements, decorators);
finishers.push.apply(finishers, result.finishers);
result.finishers = finishers;
return result;
}
function _addElementPlacement(element, placements, silent) {
var keys = placements[element.placement];
if (!silent && keys.indexOf(element.key) !== -1) throw new TypeError("Duplicated element (" + element.key + ")");
keys.push(element.key);
}
function _decorateElement(element, placements) {
var extras = [];
var finishers = [];
for (var decorators = element.decorators, i = decorators.length - 1; i >= 0; i--) {
var keys = placements[element.placement];
keys.splice(keys.indexOf(element.key), 1);
var elementObject = _fromElementDescriptor(element);
var elementFinisherExtras = _toElementFinisherExtras((0, decorators[i])(elementObject) || elementObject);
element = elementFinisherExtras.element;
_addElementPlacement(element, placements);
if (elementFinisherExtras.finisher) finishers.push(elementFinisherExtras.finisher);
var newExtras = elementFinisherExtras.extras;
if (newExtras) {
for (var j = 0; j < newExtras.length; j++) _addElementPlacement(newExtras[j], placements);
extras.push.apply(extras, newExtras);
}
}
return { element: element, finishers: finishers, extras: extras };
}
function _decorateConstructor(elements, decorators) {
var finishers = [];
for (var i = decorators.length - 1; i >= 0; i--) {
var obj = _fromClassDescriptor(elements);
var elementsAndFinisher = _toClassDescriptor((0, decorators[i])(obj) || obj);
if (elementsAndFinisher.finisher !== undefined) finishers.push(elementsAndFinisher.finisher);
if (elementsAndFinisher.elements !== undefined) {
elements = elementsAndFinisher.elements;
for (var j = 0; j < elements.length - 1; j++) {
for (var k = j + 1; k < elements.length; k++) {
if (elements[j].key === elements[k].key && elements[j].placement === elements[k].placement) {
throw new TypeError("Duplicated element (" + elements[j].key + ")");
}
}
}
}
}
return { elements: elements, finishers: finishers };
}
function _fromElementDescriptor(element) {
var obj = { kind: element.kind, key: element.key, placement: element.placement, descriptor: element.descriptor };
var desc = { value: "Descriptor", configurable: true };
Object.defineProperty(obj, Symbol.toStringTag, desc);
if (element.kind === "field") obj.initializer = element.initializer;
return obj;
}
function _toElementDescriptors(elementObjects) {
if (elementObjects === undefined) return;
return _to_array._(elementObjects).map(function(elementObject) {
var element = _toElementDescriptor(elementObject);
_disallowProperty(elementObject, "finisher", "An element descriptor");
_disallowProperty(elementObject, "extras", "An element descriptor");
return element;
});
}
function _toElementDescriptor(elementObject) {
var kind = String(elementObject.kind);
if (kind !== "method" && kind !== "field") {
throw new TypeError("An element descriptor's .kind property must be either \"method\" or" + " \"field\", but a decorator created an element descriptor with" + " .kind \"" + kind + "\"");
}
var key = _to_property_key._(elementObject.key);
var placement = String(elementObject.placement);
if (placement !== "static" && placement !== "prototype" && placement !== "own") {
throw new TypeError(
"An element descriptor's .placement property must be one of \"static\","
+ " \"prototype\" or \"own\", but a decorator created an element descriptor"
+ " with .placement \""
+ placement
+ "\""
);
}
var descriptor = elementObject.descriptor;
_disallowProperty(elementObject, "elements", "An element descriptor");
var element = { kind: kind, key: key, placement: placement, descriptor: Object.assign({}, descriptor) };
if (kind !== "field") _disallowProperty(elementObject, "initializer", "A method descriptor");
else {
_disallowProperty(descriptor, "get", "The property descriptor of a field descriptor");
_disallowProperty(descriptor, "set", "The property descriptor of a field descriptor");
_disallowProperty(descriptor, "value", "The property descriptor of a field descriptor");
element.initializer = elementObject.initializer;
}
return element;
}
function _toElementFinisherExtras(elementObject) {
var element = _toElementDescriptor(elementObject);
var finisher = _optionalCallableProperty(elementObject, "finisher");
var extras = _toElementDescriptors(elementObject.extras);
return { element: element, finisher: finisher, extras: extras };
}
function _fromClassDescriptor(elements) {
var obj = { kind: "class", elements: elements.map(_fromElementDescriptor) };
var desc = { value: "Descriptor", configurable: true };
Object.defineProperty(obj, Symbol.toStringTag, desc);
return obj;
}
function _toClassDescriptor(obj) {
var kind = String(obj.kind);
if (kind !== "class") {
throw new TypeError("A class descriptor's .kind property must be \"class\", but a decorator" + " created a class descriptor with .kind \"" + kind + "\"");
}
_disallowProperty(obj, "key", "A class descriptor");
_disallowProperty(obj, "placement", "A class descriptor");
_disallowProperty(obj, "descriptor", "A class descriptor");
_disallowProperty(obj, "initializer", "A class descriptor");
_disallowProperty(obj, "extras", "A class descriptor");
var finisher = _optionalCallableProperty(obj, "finisher");
var elements = _toElementDescriptors(obj.elements);
return { elements: elements, finisher: finisher };
}
function _disallowProperty(obj, name, objectType) {
if (obj[name] !== undefined) throw new TypeError(objectType + " can't have a ." + name + " property.");
}
function _optionalCallableProperty(obj, name) {
var value = obj[name];
if (value !== undefined && typeof value !== "function") {
throw new TypeError("Expected '" + name + "' to be a function");
}
return value;
}
function _runClassFinishers(constructor, finishers) {
for (var i = 0; i < finishers.length; i++) {
var newConstructor = (0, finishers[i])(constructor);
if (newConstructor !== undefined) {
if (typeof newConstructor !== "function") throw new TypeError("Finishers must return a constructor.");
constructor = newConstructor;
}
}
return constructor;
}
exports._ = _decorate;
+15
View File
@@ -0,0 +1,15 @@
"use strict";
function _defaults(obj, defaults) {
var keys = Object.getOwnPropertyNames(defaults);
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
var value = Object.getOwnPropertyDescriptor(defaults, key);
if (value && value.configurable && obj[key] === undefined) Object.defineProperty(obj, key, value);
}
return obj;
}
exports._ = _defaults;
@@ -0,0 +1,26 @@
"use strict";
function _define_enumerable_properties(obj, descs) {
for (var key in descs) {
var desc = descs[key];
desc.configurable = desc.enumerable = true;
if ("value" in desc) desc.writable = true;
Object.defineProperty(obj, key, desc);
}
if (Object.getOwnPropertySymbols) {
var objectSymbols = Object.getOwnPropertySymbols(descs);
for (var i = 0; i < objectSymbols.length; i++) {
var sym = objectSymbols[i];
var desc = descs[sym];
desc.configurable = desc.enumerable = true;
if ("value" in desc) desc.writable = true;
Object.defineProperty(obj, sym, desc);
}
}
return obj;
}
exports._ = _define_enumerable_properties;
+10
View File
@@ -0,0 +1,10 @@
"use strict";
function _define_property(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;
}
exports._ = _define_property;
+43
View File
@@ -0,0 +1,43 @@
"use strict";
/* @minVersion 7.22.0 */
function dispose_SuppressedError(error, suppressed) {
if (typeof SuppressedError !== "undefined") {
// eslint-disable-next-line no-undef
dispose_SuppressedError = SuppressedError;
} else {
dispose_SuppressedError = function SuppressedError(error, suppressed) {
this.suppressed = suppressed;
this.error = error;
this.stack = new Error().stack;
};
dispose_SuppressedError.prototype = Object.create(Error.prototype, { constructor: { value: dispose_SuppressedError, writable: true, configurable: true } });
}
return new dispose_SuppressedError(error, suppressed);
}
function _dispose(stack, error, hasError) {
function next() {
while (stack.length > 0) {
try {
var r = stack.pop();
var p = r.d.call(r.v);
if (r.a) return Promise.resolve(p).then(next, err);
} catch (e) {
return err(e);
}
}
if (hasError) throw error;
}
function err(e) {
error = hasError ? new dispose_SuppressedError(e, error) : e;
hasError = true;
return next();
}
return next();
}
exports._ = _dispose;
+17
View File
@@ -0,0 +1,17 @@
"use strict";
function _export_star(from, to) {
Object.keys(from).forEach(function(k) {
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
Object.defineProperty(to, k, {
enumerable: true,
get: function() {
return from[k];
}
});
}
});
return from;
}
exports._ = _export_star;
+15
View File
@@ -0,0 +1,15 @@
"use strict";
function _extends() {
exports._ = _extends = Object.assign || function assign(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
}
return target;
};
return _extends.apply(this, arguments);
}
exports._ = _extends;
+23
View File
@@ -0,0 +1,23 @@
"use strict";
var _super_prop_base = require("./_super_prop_base.cjs");
function _get(target, property, receiver) {
if (typeof Reflect !== "undefined" && Reflect.get) exports._ = _get = Reflect.get;
else {
exports._ = _get = function get(target, property, receiver) {
var base = _super_prop_base._(target, property);
if (!base) return;
var desc = Object.getOwnPropertyDescriptor(base, property);
if (desc.get) return desc.get.call(receiver || target);
return desc.value;
};
}
return _get(target, property, receiver || target);
}
exports._ = _get;
+10
View File
@@ -0,0 +1,10 @@
"use strict";
function _get_prototype_of(o) {
exports._ = _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
return o.__proto__ || Object.getPrototypeOf(o);
};
return _get_prototype_of(o);
}
exports._ = _get_prototype_of;
+7
View File
@@ -0,0 +1,7 @@
"use strict";
function _identity(x) {
return x;
}
exports._ = _identity;
+14
View File
@@ -0,0 +1,14 @@
"use strict";
var _set_prototype_of = require("./_set_prototype_of.cjs");
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function");
}
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
if (superClass) _set_prototype_of._(subClass, superClass);
}
exports._ = _inherits;
+8
View File
@@ -0,0 +1,8 @@
"use strict";
function _inherits_loose(subClass, superClass) {
subClass.prototype = Object.create(superClass.prototype);
subClass.prototype.constructor = subClass;
subClass.__proto__ = superClass;
}
exports._ = _inherits_loose;
@@ -0,0 +1,13 @@
"use strict";
function _initializer_define_property(target, property, descriptor, context) {
if (!descriptor) return;
Object.defineProperty(target, property, {
enumerable: descriptor.enumerable,
configurable: descriptor.configurable,
writable: descriptor.writable,
value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
});
}
exports._ = _initializer_define_property;
@@ -0,0 +1,11 @@
"use strict";
function _initializer_warning_helper(descriptor, context) {
throw new Error(
"Decorating class property failed. Please ensure that "
+ "proposal-class-properties is enabled and set to use loose mode. "
+ "To use proposal-class-properties in spec mode with decorators, wait for "
+ "the next major version of decorators in stage 2."
);
}
exports._ = _initializer_warning_helper;
+10
View File
@@ -0,0 +1,10 @@
"use strict";
function _instanceof(left, right) {
"@swc/helpers - instanceof";
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
return !!right[Symbol.hasInstance](left);
} else return left instanceof right;
}
exports._ = _instanceof;
@@ -0,0 +1,6 @@
"use strict";
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
exports._ = _interop_require_default;
@@ -0,0 +1,38 @@
"use strict";
function _getRequireWildcardCache(nodeInterop) {
if (typeof WeakMap !== "function") return null;
var cacheBabelInterop = new WeakMap();
var cacheNodeInterop = new WeakMap();
return (_getRequireWildcardCache = function(nodeInterop) {
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
})(nodeInterop);
}
function _interop_require_wildcard(obj, nodeInterop) {
if (!nodeInterop && obj && obj.__esModule) return obj;
if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { default: obj };
var cache = _getRequireWildcardCache(nodeInterop);
if (cache && cache.has(obj)) return cache.get(obj);
var newObj = { __proto__: null };
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
for (var key in obj) {
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
else newObj[key] = obj[key];
}
}
newObj.default = obj;
if (cache) cache.set(obj, newObj);
return newObj;
}
exports._ = _interop_require_wildcard;
@@ -0,0 +1,6 @@
"use strict";
function _is_native_function(fn) {
return Function.toString.call(fn).indexOf("[native code]") !== -1;
}
exports._ = _is_native_function;
@@ -0,0 +1,18 @@
"use strict";
function _is_native_reflect_construct() {
// Since Reflect.construct can't be properly polyfilled, some
// implementations (e.g. core-js@2) don't set the correct internal slots.
// Those polyfills don't allow us to subclass built-ins, so we need to
// use our fallback implementation.
try {
// If the internal slots aren't set, this throws an error similar to
// TypeError: this is not a Boolean object.
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
} catch (_) {}
return (exports._ = _is_native_reflect_construct = function() {
return !!result;
})();
}
exports._ = _is_native_reflect_construct;
@@ -0,0 +1,8 @@
"use strict";
function _iterable_to_array(iter) {
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
return Array.from(iter);
}
}
exports._ = _iterable_to_array;
@@ -0,0 +1,31 @@
"use strict";
function _iterable_to_array_limit(arr, i) {
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
if (_i == null) return;
var _arr = [];
var _n = true;
var _d = false;
var _s, _e;
try {
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
_arr.push(_s.value);
if (i && _arr.length === i) break;
}
} catch (err) {
_d = true;
_e = err;
} finally {
try {
if (!_n && _i["return"] != null) _i["return"]();
} finally {
if (_d) throw _e;
}
}
return _arr;
}
exports._ = _iterable_to_array_limit;
@@ -0,0 +1,17 @@
"use strict";
function _iterable_to_array_limit_loose(arr, i) {
var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]);
if (_i == null) return;
var _arr = [];
for (_i = _i.call(arr), _step; !(_step = _i.next()).done;) {
_arr.push(_step.value);
if (i && _arr.length === i) break;
}
return _arr;
}
exports._ = _iterable_to_array_limit_loose;
+28
View File
@@ -0,0 +1,28 @@
"use strict";
var REACT_ELEMENT_TYPE;
function _jsx(type, props, key, children) {
if (!REACT_ELEMENT_TYPE) {
REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7;
}
var defaultProps = type && type.defaultProps;
var childrenLength = arguments.length - 3;
if (!props && childrenLength !== 0) props = { children: void 0 };
if (props && defaultProps) {
for (var propName in defaultProps) {
if (props[propName] === void 0) props[propName] = defaultProps[propName];
else if (!props) props = defaultProps || {};
}
}
if (childrenLength === 1) props.children = children;
else if (childrenLength > 1) {
var childArray = new Array(childrenLength);
for (var i = 0; i < childrenLength; i++) childArray[i] = arguments[i + 3];
props.children = childArray;
}
return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : "" + key, ref: null, props: props, _owner: null };
}
exports._ = _jsx;
+6
View File
@@ -0,0 +1,6 @@
"use strict";
function _new_arrow_check(innerThis, boundThis) {
if (innerThis !== boundThis) throw new TypeError("Cannot instantiate an arrow function");
}
exports._ = _new_arrow_check;
@@ -0,0 +1,6 @@
"use strict";
function _non_iterable_rest() {
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
exports._ = _non_iterable_rest;
@@ -0,0 +1,6 @@
"use strict";
function _non_iterable_spread() {
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
exports._ = _non_iterable_spread;
@@ -0,0 +1,8 @@
"use strict";
function _object_destructuring_empty(o) {
if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o);
return o;
}
exports._ = _object_destructuring_empty;
+25
View File
@@ -0,0 +1,25 @@
"use strict";
var _define_property = require("./_define_property.cjs");
function _object_spread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
var ownKeys = Object.keys(source);
if (typeof Object.getOwnPropertySymbols === "function") {
ownKeys = ownKeys.concat(
Object.getOwnPropertySymbols(source).filter(function(sym) {
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
})
);
}
ownKeys.forEach(function(key) {
_define_property._(target, key, source[key]);
});
}
return target;
}
exports._ = _object_spread;
@@ -0,0 +1,30 @@
"use strict";
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 _object_spread_props(target, source) {
source = source != null ? source : {};
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;
}
exports._ = _object_spread_props;
@@ -0,0 +1,35 @@
"use strict";
var _object_without_properties_loose = require("./_object_without_properties_loose.cjs");
function _object_without_properties(source, excluded) {
if (source == null) return {};
var target = {}, sourceKeys, key, i;
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
sourceKeys = Reflect.ownKeys(Object(source));
for (i = 0; i < sourceKeys.length; i++) {
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
target[key] = source[key];
}
return target;
}
target = _object_without_properties_loose._(source, excluded);
if (Object.getOwnPropertySymbols) {
sourceKeys = Object.getOwnPropertySymbols(source);
for (i = 0; i < sourceKeys.length; i++) {
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
target[key] = source[key];
}
}
return target;
}
exports._ = _object_without_properties;
@@ -0,0 +1,16 @@
"use strict";
function _object_without_properties_loose(source, excluded) {
if (source == null) return {};
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
for (i = 0; i < sourceKeys.length; i++) {
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
target[key] = source[key];
}
return target;
}
exports._ = _object_without_properties_loose;
+8
View File
@@ -0,0 +1,8 @@
"use strict";
function _overload_yield(value, /** 0: await 1: delegate */ kind) {
this.v = value;
this.k = kind;
}
exports._ = _overload_yield;
@@ -0,0 +1,11 @@
"use strict";
var _assert_this_initialized = require("./_assert_this_initialized.cjs");
var _type_of = require("./_type_of.cjs");
function _possible_constructor_return(self, call) {
if (call && (_type_of._(call) === "object" || typeof call === "function")) return call;
return _assert_this_initialized._(self);
}
exports._ = _possible_constructor_return;
+6
View File
@@ -0,0 +1,6 @@
"use strict";
function _read_only_error(name) {
throw new TypeError("\"" + name + "\" is read-only");
}
exports._ = _read_only_error;
+44
View File
@@ -0,0 +1,44 @@
"use strict";
var _define_property = require("./_define_property.cjs");
var _super_prop_base = require("./_super_prop_base.cjs");
function set(target, property, value, receiver) {
if (typeof Reflect !== "undefined" && Reflect.set) set = Reflect.set;
else {
set = function set(target, property, value, receiver) {
var base = _super_prop_base._(target, property);
var desc;
if (base) {
desc = Object.getOwnPropertyDescriptor(base, property);
if (desc.set) {
desc.set.call(receiver, value);
return true;
} else if (!desc.writable) {
return false;
}
}
desc = Object.getOwnPropertyDescriptor(receiver, property);
if (desc) {
if (!desc.writable) return false;
desc.value = value;
Object.defineProperty(receiver, property, desc);
} else {
_define_property._(receiver, property, value);
}
return true;
};
}
return set(target, property, value, receiver);
}
function _set(target, property, value, receiver, isStrict) {
var s = set(target, property, value, receiver || target);
if (!s && isStrict) throw new Error("failed to set property");
return value;
}
exports._ = _set;
+12
View File
@@ -0,0 +1,12 @@
"use strict";
function _set_prototype_of(o, p) {
exports._ = _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
return _set_prototype_of(o, p);
}
exports._ = _set_prototype_of;
@@ -0,0 +1,11 @@
"use strict";
function _skip_first_generator_next(fn) {
return function() {
var it = fn.apply(this, arguments);
it.next();
return it;
};
}
exports._ = _skip_first_generator_next;
+11
View File
@@ -0,0 +1,11 @@
"use strict";
var _array_with_holes = require("./_array_with_holes.cjs");
var _iterable_to_array_limit = require("./_iterable_to_array_limit.cjs");
var _non_iterable_rest = require("./_non_iterable_rest.cjs");
var _unsupported_iterable_to_array = require("./_unsupported_iterable_to_array.cjs");
function _sliced_to_array(arr, i) {
return _array_with_holes._(arr) || _iterable_to_array_limit._(arr, i) || _unsupported_iterable_to_array._(arr, i) || _non_iterable_rest._();
}
exports._ = _sliced_to_array;
@@ -0,0 +1,11 @@
"use strict";
var _array_with_holes = require("./_array_with_holes.cjs");
var _iterable_to_array_limit_loose = require("./_iterable_to_array_limit_loose.cjs");
var _non_iterable_rest = require("./_non_iterable_rest.cjs");
var _unsupported_iterable_to_array = require("./_unsupported_iterable_to_array.cjs");
function _sliced_to_array_loose(arr, i) {
return _array_with_holes._(arr) || _iterable_to_array_limit_loose._(arr, i) || _unsupported_iterable_to_array._(arr, i) || _non_iterable_rest._();
}
exports._ = _sliced_to_array_loose;
+13
View File
@@ -0,0 +1,13 @@
"use strict";
var _get_prototype_of = require("./_get_prototype_of.cjs");
function _super_prop_base(object, property) {
while (!Object.prototype.hasOwnProperty.call(object, property)) {
object = _get_prototype_of._(object);
if (object === null) break;
}
return object;
}
exports._ = _super_prop_base;
@@ -0,0 +1,8 @@
"use strict";
function _tagged_template_literal(strings, raw) {
if (!raw) raw = strings.slice(0);
return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } }));
}
exports._ = _tagged_template_literal;
@@ -0,0 +1,10 @@
"use strict";
function _tagged_template_literal_loose(strings, raw) {
if (!raw) raw = strings.slice(0);
strings.raw = raw;
return strings;
}
exports._ = _tagged_template_literal_loose;
+6
View File
@@ -0,0 +1,6 @@
"use strict";
function _throw(e) {
throw e;
}
exports._ = _throw;
+11
View File
@@ -0,0 +1,11 @@
"use strict";
var _array_with_holes = require("./_array_with_holes.cjs");
var _iterable_to_array = require("./_iterable_to_array.cjs");
var _non_iterable_rest = require("./_non_iterable_rest.cjs");
var _unsupported_iterable_to_array = require("./_unsupported_iterable_to_array.cjs");
function _to_array(arr) {
return _array_with_holes._(arr) || _iterable_to_array._(arr) || _unsupported_iterable_to_array._(arr) || _non_iterable_rest._();
}
exports._ = _to_array;
@@ -0,0 +1,11 @@
"use strict";
var _array_without_holes = require("./_array_without_holes.cjs");
var _iterable_to_array = require("./_iterable_to_array.cjs");
var _non_iterable_spread = require("./_non_iterable_spread.cjs");
var _unsupported_iterable_to_array = require("./_unsupported_iterable_to_array.cjs");
function _to_consumable_array(arr) {
return _array_without_holes._(arr) || _iterable_to_array._(arr) || _unsupported_iterable_to_array._(arr) || _non_iterable_spread._();
}
exports._ = _to_consumable_array;
+18
View File
@@ -0,0 +1,18 @@
"use strict";
var _type_of = require("./_type_of.cjs");
function _to_primitive(input, hint) {
if (_type_of._(input) !== "object" || input === null) return input;
var prim = input[Symbol.toPrimitive];
if (prim !== undefined) {
var res = prim.call(input, hint || "default");
if (_type_of._(res) !== "object") return res;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return (hint === "string" ? String : Number)(input);
}
exports._ = _to_primitive;
+11
View File
@@ -0,0 +1,11 @@
"use strict";
var _to_primitive = require("./_to_primitive.cjs");
var _type_of = require("./_type_of.cjs");
function _to_property_key(arg) {
var key = _to_primitive._(arg, "string");
return _type_of._(key) === "symbol" ? key : String(key);
}
exports._ = _to_property_key;
@@ -0,0 +1,3 @@
"use strict";
exports._ = require("tslib").__addDisposableResource;

Some files were not shown because too many files have changed in this diff Show More