plutonium 0.64.0 → 0.65.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.claude/skills/plutonium/SKILL.md +4 -1
- data/.claude/skills/plutonium-app/SKILL.md +14 -0
- data/.claude/skills/plutonium-dashboard/SKILL.md +161 -0
- data/.claude/skills/plutonium-resource/SKILL.md +94 -14
- data/.claude/skills/plutonium-ui/SKILL.md +22 -1
- data/CHANGELOG.md +59 -0
- data/CLAUDE.md +282 -210
- data/SECURITY.md +1 -1
- data/app/assets/plutonium-charts.js +20604 -0
- data/app/assets/plutonium-charts.js.map +7 -0
- data/app/assets/plutonium-charts.min.js +41 -0
- data/app/assets/plutonium-charts.min.js.map +7 -0
- data/app/assets/plutonium.css +1 -1
- data/app/assets/plutonium.js +794 -629
- data/app/assets/plutonium.js.map +4 -4
- data/app/assets/plutonium.min.js +48 -48
- data/app/assets/plutonium.min.js.map +4 -4
- data/app/views/plutonium/_flash_alerts.html.erb +2 -2
- data/app/views/plutonium/_resource_header.html.erb +2 -2
- data/app/views/plutonium/_resource_sidebar.html.erb +11 -2
- data/app/views/plutonium/_toast.html.erb +2 -2
- data/app/views/rodauth/_login_form.html.erb +1 -1
- data/app/views/rodauth/_password_visibility.html.erb +1 -1
- data/app/views/rodauth/add_recovery_codes.html.erb +2 -2
- data/app/views/rodauth/change_login.html.erb +2 -2
- data/app/views/rodauth/create_account.html.erb +4 -4
- data/app/views/rodauth/reset_password_request.html.erb +1 -1
- data/app/views/rodauth/verify_account_resend.html.erb +1 -1
- data/app/views/rodauth/webauthn_remove.html.erb +1 -1
- data/config/brakeman.ignore +4 -4
- data/config/initializers/rabl.rb +0 -40
- data/config/locales/en/api_client.yml +22 -0
- data/config/locales/en/async.yml +34 -0
- data/config/locales/en/dashboard.yml +25 -0
- data/config/locales/en/invites.yml +37 -0
- data/config/locales/en/js.yml +40 -0
- data/config/locales/en/kanban.yml +28 -0
- data/config/locales/en/plutonium.yml +26 -0
- data/config/locales/en/positioning.yml +14 -0
- data/config/locales/en/profile.yml +29 -0
- data/config/locales/en/resource.yml +60 -0
- data/config/locales/en/ui.yml +93 -0
- data/config/locales/en/wizard.yml +46 -0
- data/docs/.vitepress/config.ts +34 -1
- data/docs/.vitepress/theme/components/HomeHero.vue +1 -1
- data/docs/.vitepress/theme/components/HomeInTheBox.vue +14 -0
- data/docs/.vitepress/theme/custom.css +34 -377
- data/docs/blog/introducing-plutonium-dashboards.md +175 -0
- data/docs/blog/introducing-plutonium-i18n.md +91 -0
- data/docs/blog/introducing-plutonium.md +4 -5
- data/docs/blog/whats-new-async-kanban-wizards.md +1 -1
- data/docs/guides/dashboards.md +300 -0
- data/docs/guides/index.md +1 -0
- data/docs/guides/kanban.md +2 -2
- data/docs/public/images/blog/dashboards-card-error.png +0 -0
- data/docs/public/images/blog/dashboards-loading.png +0 -0
- data/docs/public/images/blog/dashboards-overview.png +0 -0
- data/docs/public/images/blog/dashboards-sidebar.png +0 -0
- data/docs/public/images/blog/i18n-es-admin.png +0 -0
- data/docs/public/images/guides/dashboard-card-error.png +0 -0
- data/docs/public/images/guides/dashboard-loading.png +0 -0
- data/docs/public/images/guides/dashboard-overview.png +0 -0
- data/docs/public/images/guides/dashboard-sidebar.png +0 -0
- data/docs/reference/app/generators.md +2 -2
- data/docs/reference/app/portals.md +2 -0
- data/docs/reference/configuration.md +84 -27
- data/docs/reference/dashboard/dsl.md +123 -0
- data/docs/reference/dashboard/index.md +35 -0
- data/docs/reference/dashboard/registration.md +76 -0
- data/docs/reference/i18n.md +239 -0
- data/docs/reference/index.md +10 -1
- data/docs/reference/kanban/dsl.md +1 -1
- data/docs/reference/kanban/positioning.md +2 -2
- data/docs/reference/resource/actions.md +1 -1
- data/docs/reference/resource/definition.md +96 -18
- data/docs/reference/resource/export.md +5 -1
- data/docs/reference/resource/index.md +2 -0
- data/docs/reference/{positioning.md → resource/positioning.md} +2 -1
- data/docs/reference/resource/query.md +2 -0
- data/docs/reference/ui/assets.md +8 -0
- data/docs/reference/ui/displays.md +5 -8
- data/docs/reference/ui/index.md +1 -1
- data/docs/reference/wizard/dsl.md +2 -2
- data/esbuild.config.js +5 -2
- data/gemfiles/rails_7.gemfile.lock +2 -2
- data/gemfiles/rails_8.1.gemfile.lock +1 -1
- data/lib/active_model/validations/array_validator.rb +1 -1
- data/lib/active_model/validations/attached_validator.rb +1 -1
- data/lib/active_model/validations/url_validator.rb +2 -2
- data/lib/generators/pu/core/assets/assets_generator.rb +36 -21
- data/lib/generators/pu/core/assets/templates/postcss.config.js +1 -1
- data/lib/generators/pu/core/update/update_generator.rb +3 -2
- data/lib/generators/pu/dashboard/dashboard_generator.rb +96 -0
- data/lib/generators/pu/dashboard/templates/dashboard.rb.tt +25 -0
- data/lib/generators/pu/docker/install/install_generator.rb +58 -0
- data/lib/generators/pu/docker/install/templates/Dockerfile.dev.tt +18 -3
- data/lib/generators/pu/docker/install/templates/Dockerfile.tt +20 -5
- data/lib/generators/pu/docker/install/templates/{docker-compose.yml → docker-compose.yml.tt} +1 -1
- data/lib/generators/pu/gem/dotenv/dotenv_generator.rb +1 -1
- data/lib/generators/pu/invites/invitable_generator.rb +18 -1
- data/lib/generators/pu/lib/plutonium_generators/concerns/actions.rb +0 -95
- data/lib/generators/pu/lib/plutonium_generators/concerns/js_package_manager.rb +146 -0
- data/lib/generators/pu/lib/plutonium_generators/generator.rb +1 -17
- data/lib/generators/pu/pkg/package/package_generator.rb +1 -0
- data/lib/generators/pu/pkg/package/templates/config/locales/en.yml.tt +28 -0
- data/lib/generators/pu/pkg/portal/portal_generator.rb +1 -0
- data/lib/generators/pu/pkg/portal/templates/config/locales/en.yml.tt +30 -0
- data/lib/generators/pu/res/scaffold/scaffold_generator.rb +0 -8
- data/lib/generators/pu/rodauth/concerns/feature_selector.rb +0 -18
- data/lib/plutonium/action/base.rb +27 -3
- data/lib/plutonium/action/interactive.rb +17 -4
- data/lib/plutonium/api_client/concerns/create_api_client.rb +12 -11
- data/lib/plutonium/api_client/concerns/disable_api_client.rb +3 -3
- data/lib/plutonium/auth/sequel_adapter.rb +1 -1
- data/lib/plutonium/configuration.rb +5 -0
- data/lib/plutonium/core/controller.rb +25 -1
- data/lib/plutonium/core/controllers/authorizable.rb +1 -1
- data/lib/plutonium/dashboard/base.rb +114 -0
- data/lib/plutonium/dashboard/card.rb +200 -0
- data/lib/plutonium/dashboard/controller.rb +101 -0
- data/lib/plutonium/dashboard/dsl.rb +104 -0
- data/lib/plutonium/dashboard/register.rb +40 -0
- data/lib/plutonium/dashboard/route_resolution.rb +30 -0
- data/lib/plutonium/dashboard.rb +42 -0
- data/lib/plutonium/definition/actions.rb +6 -1
- data/lib/plutonium/definition/base.rb +41 -3
- data/lib/plutonium/definition/index_views.rb +1 -1
- data/lib/plutonium/definition/positioning.rb +1 -1
- data/lib/plutonium/definition/presentable.rb +2 -2
- data/lib/plutonium/helpers/assets_helper.rb +15 -2
- data/lib/plutonium/helpers/display_helper.rb +10 -2
- data/lib/plutonium/interaction/async/context.rb +6 -8
- data/lib/plutonium/interaction/async/executor.rb +6 -7
- data/lib/plutonium/interaction/async/run.rb +2 -2
- data/lib/plutonium/interaction/async/run_definition.rb +1 -1
- data/lib/plutonium/interaction/base.rb +2 -0
- data/lib/plutonium/interaction/concerns/dispatchable.rb +15 -3
- data/lib/plutonium/invites/concerns/cancel_invite.rb +3 -3
- data/lib/plutonium/invites/concerns/invite_token.rb +25 -7
- data/lib/plutonium/invites/concerns/invite_user.rb +10 -5
- data/lib/plutonium/invites/concerns/resend_invite.rb +4 -4
- data/lib/plutonium/invites/controller.rb +11 -11
- data/lib/plutonium/kanban/column.rb +13 -3
- data/lib/plutonium/kanban/dsl.rb +7 -4
- data/lib/plutonium/models/has_cents.rb +1 -1
- data/lib/plutonium/profile/security_section.rb +10 -18
- data/lib/plutonium/query/filter.rb +10 -1
- data/lib/plutonium/query/filters/association.rb +27 -2
- data/lib/plutonium/query/filters/boolean.rb +4 -4
- data/lib/plutonium/query/filters/date.rb +4 -17
- data/lib/plutonium/query/filters/date_range.rb +2 -2
- data/lib/plutonium/query/filters/select.rb +10 -1
- data/lib/plutonium/query/filters/text.rb +9 -12
- data/lib/plutonium/railtie.rb +17 -0
- data/lib/plutonium/resource/controller.rb +10 -5
- data/lib/plutonium/resource/controllers/crud_actions.rb +17 -20
- data/lib/plutonium/resource/controllers/export_csv.rb +19 -9
- data/lib/plutonium/resource/controllers/kanban_actions.rb +16 -16
- data/lib/plutonium/resource/controllers/position_actions.rb +5 -5
- data/lib/plutonium/resource/controllers/typeahead.rb +24 -1
- data/lib/plutonium/resource/query_object.rb +30 -3
- data/lib/plutonium/routing/dashboard_registration.rb +137 -0
- data/lib/plutonium/routing/resource_registration.rb +5 -0
- data/lib/plutonium/routing/route_set_extensions.rb +2 -1
- data/lib/plutonium/translation.rb +227 -0
- data/lib/plutonium/ui/actions_dropdown.rb +2 -2
- data/lib/plutonium/ui/breadcrumbs.rb +3 -3
- data/lib/plutonium/ui/color_mode_selector.rb +1 -1
- data/lib/plutonium/ui/component/behaviour.rb +46 -0
- data/lib/plutonium/ui/component/methods.rb +4 -0
- data/lib/plutonium/ui/dashboard/board.rb +80 -0
- data/lib/plutonium/ui/dashboard/card.rb +127 -0
- data/lib/plutonium/ui/dashboard/chart.rb +43 -0
- data/lib/plutonium/ui/dashboard/custom.rb +32 -0
- data/lib/plutonium/ui/dashboard/frame.rb +25 -0
- data/lib/plutonium/ui/dashboard/metric.rb +137 -0
- data/lib/plutonium/ui/dashboard/skeleton.rb +40 -0
- data/lib/plutonium/ui/display/components/attachment.rb +1 -1
- data/lib/plutonium/ui/display/components/badge.rb +7 -1
- data/lib/plutonium/ui/display/components/boolean.rb +2 -2
- data/lib/plutonium/ui/display/resource.rb +23 -16
- data/lib/plutonium/ui/export_button.rb +3 -3
- data/lib/plutonium/ui/form/components/key_value_store.rb +5 -5
- data/lib/plutonium/ui/form/components/password.rb +2 -2
- data/lib/plutonium/ui/form/components/resource_select.rb +27 -0
- data/lib/plutonium/ui/form/components/secure_association.rb +2 -0
- data/lib/plutonium/ui/form/components/uppy.rb +11 -3
- data/lib/plutonium/ui/form/concerns/renders_nested_resource_fields.rb +1 -1
- data/lib/plutonium/ui/form/concerns/renders_repeater_row_controls.rb +5 -4
- data/lib/plutonium/ui/form/concerns/renders_structured_inputs.rb +1 -1
- data/lib/plutonium/ui/form/query.rb +8 -8
- data/lib/plutonium/ui/form/resource.rb +54 -26
- data/lib/plutonium/ui/frame_navigator_panel.rb +4 -4
- data/lib/plutonium/ui/grid/card.rb +3 -3
- data/lib/plutonium/ui/grid/resource.rb +3 -3
- data/lib/plutonium/ui/interaction/async/run_progress.rb +6 -6
- data/lib/plutonium/ui/interaction/async/running_banner.rb +2 -2
- data/lib/plutonium/ui/kanban/column.rb +6 -6
- data/lib/plutonium/ui/layout/base.rb +19 -1
- data/lib/plutonium/ui/layout/header.rb +1 -1
- data/lib/plutonium/ui/layout/icon_rail.rb +4 -4
- data/lib/plutonium/ui/layout/rodauth_layout.rb +1 -1
- data/lib/plutonium/ui/layout/sidebar.rb +1 -1
- data/lib/plutonium/ui/layout/topbar.rb +2 -2
- data/lib/plutonium/ui/modal/base.rb +4 -4
- data/lib/plutonium/ui/nav_grid_menu.rb +1 -1
- data/lib/plutonium/ui/nav_user.rb +2 -2
- data/lib/plutonium/ui/page/base.rb +10 -2
- data/lib/plutonium/ui/page/dashboard.rb +54 -0
- data/lib/plutonium/ui/page/edit.rb +3 -3
- data/lib/plutonium/ui/page/interactive_action.rb +2 -2
- data/lib/plutonium/ui/page/new.rb +3 -3
- data/lib/plutonium/ui/page/show.rb +2 -2
- data/lib/plutonium/ui/page/wizard.rb +22 -16
- data/lib/plutonium/ui/page/wizard_chooser.rb +10 -10
- data/lib/plutonium/ui/page/wizard_completed.rb +2 -2
- data/lib/plutonium/ui/skeleton_table.rb +1 -1
- data/lib/plutonium/ui/table/base.rb +2 -2
- data/lib/plutonium/ui/table/components/attachment.rb +1 -1
- data/lib/plutonium/ui/table/components/bulk_actions_toolbar.rb +19 -3
- data/lib/plutonium/ui/table/components/drag_handle.rb +3 -3
- data/lib/plutonium/ui/table/components/filter_form.rb +11 -10
- data/lib/plutonium/ui/table/components/filter_pills.rb +4 -4
- data/lib/plutonium/ui/table/components/pagy_info.rb +61 -17
- data/lib/plutonium/ui/table/components/pagy_pagination.rb +9 -5
- data/lib/plutonium/ui/table/components/row_actions_dropdown.rb +1 -1
- data/lib/plutonium/ui/table/components/scopes_bar.rb +6 -2
- data/lib/plutonium/ui/table/components/scopes_pills.rb +3 -3
- data/lib/plutonium/ui/table/components/selection_column.rb +1 -1
- data/lib/plutonium/ui/table/components/toolbar.rb +2 -2
- data/lib/plutonium/ui/table/components/view_switcher.rb +12 -8
- data/lib/plutonium/ui/table/resource.rb +53 -17
- data/lib/plutonium/ui/wizard/review.rb +7 -7
- data/lib/plutonium/ui/wizard/stepper.rb +1 -1
- data/lib/plutonium/ui/wizard/summary_display.rb +6 -0
- data/lib/plutonium/version.rb +1 -1
- data/lib/plutonium/wizard/base.rb +2 -0
- data/lib/plutonium/wizard/driving.rb +8 -2
- data/lib/plutonium/wizard/dsl.rb +4 -2
- data/lib/plutonium/wizard/field_importer.rb +1 -8
- data/lib/plutonium/wizard/review_step.rb +8 -1
- data/lib/plutonium/wizard/step.rb +14 -3
- data/package.json +4 -2
- data/plutonium.gemspec +4 -1
- data/postcss-gem-import.cjs +34 -0
- data/postcss-gem-import.js +3 -28
- data/src/css/components.css +91 -0
- data/src/css/slim_select.css +0 -38
- data/src/css/tokens.css +24 -0
- data/src/js/controllers/attachment_input_controller.js +15 -6
- data/src/js/controllers/chart_controller.js +162 -0
- data/src/js/controllers/clipboard_controller.js +3 -2
- data/src/js/controllers/dirty_form_guard_controller.js +4 -3
- data/src/js/controllers/easymde_controller.js +3 -0
- data/src/js/controllers/filter_panel_controller.js +15 -6
- data/src/js/controllers/flatpickr_controller.js +8 -0
- data/src/js/controllers/frame_refresh_controller.js +59 -0
- data/src/js/controllers/intl_tel_input_controller.js +5 -0
- data/src/js/controllers/register_controllers.js +4 -0
- data/src/js/controllers/slim_select_controller.js +79 -176
- data/src/js/core.js +9 -1
- data/src/js/i18n.js +69 -0
- data/src/js/plutonium-charts.js +15 -0
- data/src/js/turbo/turbo_confirm.js +5 -3
- metadata +64 -16
- data/.yarnrc.yml +0 -8
- data/config/initializers/hotwire_turbo_monkey_patches.rb +0 -12
- data/lib/generators/pu/field/input/input_generator.rb +0 -32
- data/lib/generators/pu/field/input/templates/input.rb.tt +0 -15
- data/lib/generators/pu/lib/plutonium_generators/concerns/config.rb +0 -39
- data/lib/generators/pu/lib/plutonium_generators/concerns/serializer.rb +0 -39
- data/lib/generators/pu/lib/plutonium_generators/installer.rb +0 -205
- data/lib/generators/pu/res/scaffold/templates/presenter.rb.tt +0 -13
- data/lib/generators/pu/res/scaffold/templates/query_object.rb.tt +0 -17
- data/public/plutonium-assets/application.js +0 -31419
- data/public/plutonium-assets/plutonium.ico +0 -0
- data/yarn.lock +0 -6858
data/app/assets/plutonium.js
CHANGED
|
@@ -740,38 +740,38 @@
|
|
|
740
740
|
})(exports, (function() {
|
|
741
741
|
"use strict";
|
|
742
742
|
function ownKeys(e4, r4) {
|
|
743
|
-
var
|
|
743
|
+
var t5 = Object.keys(e4);
|
|
744
744
|
if (Object.getOwnPropertySymbols) {
|
|
745
745
|
var o4 = Object.getOwnPropertySymbols(e4);
|
|
746
746
|
r4 && (o4 = o4.filter(function(r5) {
|
|
747
747
|
return Object.getOwnPropertyDescriptor(e4, r5).enumerable;
|
|
748
|
-
})),
|
|
748
|
+
})), t5.push.apply(t5, o4);
|
|
749
749
|
}
|
|
750
|
-
return
|
|
750
|
+
return t5;
|
|
751
751
|
}
|
|
752
752
|
function _objectSpread2(e4) {
|
|
753
753
|
for (var r4 = 1; r4 < arguments.length; r4++) {
|
|
754
|
-
var
|
|
755
|
-
r4 % 2 ? ownKeys(Object(
|
|
756
|
-
_defineProperty(e4, r5,
|
|
757
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e4, Object.getOwnPropertyDescriptors(
|
|
758
|
-
Object.defineProperty(e4, r5, Object.getOwnPropertyDescriptor(
|
|
754
|
+
var t5 = null != arguments[r4] ? arguments[r4] : {};
|
|
755
|
+
r4 % 2 ? ownKeys(Object(t5), true).forEach(function(r5) {
|
|
756
|
+
_defineProperty(e4, r5, t5[r5]);
|
|
757
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e4, Object.getOwnPropertyDescriptors(t5)) : ownKeys(Object(t5)).forEach(function(r5) {
|
|
758
|
+
Object.defineProperty(e4, r5, Object.getOwnPropertyDescriptor(t5, r5));
|
|
759
759
|
});
|
|
760
760
|
}
|
|
761
761
|
return e4;
|
|
762
762
|
}
|
|
763
|
-
function _toPrimitive(
|
|
764
|
-
if ("object" != typeof
|
|
765
|
-
var e4 =
|
|
763
|
+
function _toPrimitive(t5, r4) {
|
|
764
|
+
if ("object" != typeof t5 || !t5) return t5;
|
|
765
|
+
var e4 = t5[Symbol.toPrimitive];
|
|
766
766
|
if (void 0 !== e4) {
|
|
767
|
-
var i4 = e4.call(
|
|
767
|
+
var i4 = e4.call(t5, r4 || "default");
|
|
768
768
|
if ("object" != typeof i4) return i4;
|
|
769
769
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
770
770
|
}
|
|
771
|
-
return ("string" === r4 ? String : Number)(
|
|
771
|
+
return ("string" === r4 ? String : Number)(t5);
|
|
772
772
|
}
|
|
773
|
-
function _toPropertyKey(
|
|
774
|
-
var i4 = _toPrimitive(
|
|
773
|
+
function _toPropertyKey(t5) {
|
|
774
|
+
var i4 = _toPrimitive(t5, "string");
|
|
775
775
|
return "symbol" == typeof i4 ? i4 : i4 + "";
|
|
776
776
|
}
|
|
777
777
|
function _typeof(o4) {
|
|
@@ -981,7 +981,7 @@
|
|
|
981
981
|
return _typeof(value) === "object" && value !== null;
|
|
982
982
|
}
|
|
983
983
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
984
|
-
function
|
|
984
|
+
function isPlainObject2(value) {
|
|
985
985
|
if (!isObject(value)) {
|
|
986
986
|
return false;
|
|
987
987
|
}
|
|
@@ -2731,7 +2731,7 @@
|
|
|
2731
2731
|
};
|
|
2732
2732
|
canvasData.left -= (newWidth - width) * ((center.pageX - offset2.left - canvasData.left) / width);
|
|
2733
2733
|
canvasData.top -= (newHeight - height) * ((center.pageY - offset2.top - canvasData.top) / height);
|
|
2734
|
-
} else if (
|
|
2734
|
+
} else if (isPlainObject2(pivot) && isNumber(pivot.x) && isNumber(pivot.y)) {
|
|
2735
2735
|
canvasData.left -= (newWidth - width) * ((pivot.x - canvasData.left) / width);
|
|
2736
2736
|
canvasData.top -= (newHeight - height) * ((pivot.y - canvasData.top) / height);
|
|
2737
2737
|
} else {
|
|
@@ -2863,7 +2863,7 @@
|
|
|
2863
2863
|
setData: function setData2(data) {
|
|
2864
2864
|
var options2 = this.options, imageData = this.imageData, canvasData = this.canvasData;
|
|
2865
2865
|
var cropBoxData = {};
|
|
2866
|
-
if (this.ready && !this.disabled &&
|
|
2866
|
+
if (this.ready && !this.disabled && isPlainObject2(data)) {
|
|
2867
2867
|
var transformed = false;
|
|
2868
2868
|
if (options2.rotatable) {
|
|
2869
2869
|
if (isNumber(data.rotate) && data.rotate !== imageData.rotate) {
|
|
@@ -2937,7 +2937,7 @@
|
|
|
2937
2937
|
setCanvasData: function setCanvasData(data) {
|
|
2938
2938
|
var canvasData = this.canvasData;
|
|
2939
2939
|
var aspectRatio = canvasData.aspectRatio;
|
|
2940
|
-
if (this.ready && !this.disabled &&
|
|
2940
|
+
if (this.ready && !this.disabled && isPlainObject2(data)) {
|
|
2941
2941
|
if (isNumber(data.left)) {
|
|
2942
2942
|
canvasData.left = data.left;
|
|
2943
2943
|
}
|
|
@@ -2982,7 +2982,7 @@
|
|
|
2982
2982
|
var aspectRatio = this.options.aspectRatio;
|
|
2983
2983
|
var widthChanged;
|
|
2984
2984
|
var heightChanged;
|
|
2985
|
-
if (this.ready && this.cropped && !this.disabled &&
|
|
2985
|
+
if (this.ready && this.cropped && !this.disabled && isPlainObject2(data)) {
|
|
2986
2986
|
if (isNumber(data.left)) {
|
|
2987
2987
|
cropBoxData.left = data.left;
|
|
2988
2988
|
}
|
|
@@ -3161,7 +3161,7 @@
|
|
|
3161
3161
|
throw new Error("The first argument is required and must be an <img> or <canvas> element.");
|
|
3162
3162
|
}
|
|
3163
3163
|
this.element = element;
|
|
3164
|
-
this.options = assign2({}, DEFAULTS,
|
|
3164
|
+
this.options = assign2({}, DEFAULTS, isPlainObject2(options2) && options2);
|
|
3165
3165
|
this.cropped = false;
|
|
3166
3166
|
this.disabled = false;
|
|
3167
3167
|
this.pointers = {};
|
|
@@ -3197,7 +3197,7 @@
|
|
|
3197
3197
|
}
|
|
3198
3198
|
}, {
|
|
3199
3199
|
key: "load",
|
|
3200
|
-
value: function
|
|
3200
|
+
value: function load2(url) {
|
|
3201
3201
|
var _this = this;
|
|
3202
3202
|
if (!url) {
|
|
3203
3203
|
return;
|
|
@@ -3461,7 +3461,7 @@
|
|
|
3461
3461
|
}, {
|
|
3462
3462
|
key: "setDefaults",
|
|
3463
3463
|
value: function setDefaults(options2) {
|
|
3464
|
-
assign2(DEFAULTS,
|
|
3464
|
+
assign2(DEFAULTS, isPlainObject2(options2) && options2);
|
|
3465
3465
|
}
|
|
3466
3466
|
}]);
|
|
3467
3467
|
})();
|
|
@@ -13431,17 +13431,17 @@
|
|
|
13431
13431
|
if (Array.isArray(r4)) return r4;
|
|
13432
13432
|
}
|
|
13433
13433
|
function _iterableToArrayLimit(r4, l4) {
|
|
13434
|
-
var
|
|
13435
|
-
if (null !=
|
|
13434
|
+
var t5 = null == r4 ? null : "undefined" != typeof Symbol && r4[Symbol.iterator] || r4["@@iterator"];
|
|
13435
|
+
if (null != t5) {
|
|
13436
13436
|
var e4, n3, i4, u5, a4 = [], f5 = true, o4 = false;
|
|
13437
13437
|
try {
|
|
13438
|
-
if (i4 = (
|
|
13439
|
-
else for (; !(f5 = (e4 = i4.call(
|
|
13438
|
+
if (i4 = (t5 = t5.call(r4)).next, 0 === l4) ;
|
|
13439
|
+
else for (; !(f5 = (e4 = i4.call(t5)).done) && (a4.push(e4.value), a4.length !== l4); f5 = true) ;
|
|
13440
13440
|
} catch (r5) {
|
|
13441
13441
|
o4 = true, n3 = r5;
|
|
13442
13442
|
} finally {
|
|
13443
13443
|
try {
|
|
13444
|
-
if (!f5 && null !=
|
|
13444
|
+
if (!f5 && null != t5.return && (u5 = t5.return(), Object(u5) !== u5)) return;
|
|
13445
13445
|
} finally {
|
|
13446
13446
|
if (o4) throw n3;
|
|
13447
13447
|
}
|
|
@@ -13458,8 +13458,8 @@
|
|
|
13458
13458
|
function _unsupportedIterableToArray(r4, a4) {
|
|
13459
13459
|
if (r4) {
|
|
13460
13460
|
if ("string" == typeof r4) return _arrayLikeToArray(r4, a4);
|
|
13461
|
-
var
|
|
13462
|
-
return "Object" ===
|
|
13461
|
+
var t5 = {}.toString.call(r4).slice(8, -1);
|
|
13462
|
+
return "Object" === t5 && r4.constructor && (t5 = r4.constructor.name), "Map" === t5 || "Set" === t5 ? Array.from(r4) : "Arguments" === t5 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t5) ? _arrayLikeToArray(r4, a4) : void 0;
|
|
13463
13463
|
}
|
|
13464
13464
|
}
|
|
13465
13465
|
var entries = Object.entries;
|
|
@@ -15536,7 +15536,7 @@ ${currentText}` : currentText;
|
|
|
15536
15536
|
}
|
|
15537
15537
|
raw = cap[0];
|
|
15538
15538
|
src = src.substring(raw.length);
|
|
15539
|
-
let line = cap[2].split("\n", 1)[0].replace(this.rules.other.listReplaceTabs, (
|
|
15539
|
+
let line = cap[2].split("\n", 1)[0].replace(this.rules.other.listReplaceTabs, (t5) => " ".repeat(3 * t5.length));
|
|
15540
15540
|
let nextLine = src.split("\n", 1)[0];
|
|
15541
15541
|
let blankLine = !line.trim();
|
|
15542
15542
|
let indent = 0;
|
|
@@ -15654,8 +15654,8 @@ ${currentText}` : currentText;
|
|
|
15654
15654
|
this.lexer.state.top = false;
|
|
15655
15655
|
list2.items[i4].tokens = this.lexer.blockTokens(list2.items[i4].text, []);
|
|
15656
15656
|
if (!list2.loose) {
|
|
15657
|
-
const spacers = list2.items[i4].tokens.filter((
|
|
15658
|
-
const hasMultipleLineBreaks = spacers.length > 0 && spacers.some((
|
|
15657
|
+
const spacers = list2.items[i4].tokens.filter((t5) => t5.type === "space");
|
|
15658
|
+
const hasMultipleLineBreaks = spacers.length > 0 && spacers.some((t5) => this.rules.other.anyLine.test(t5.raw));
|
|
15659
15659
|
list2.loose = hasMultipleLineBreaks;
|
|
15660
15660
|
}
|
|
15661
15661
|
}
|
|
@@ -17201,6 +17201,51 @@ ${text2}</tr>
|
|
|
17201
17201
|
}
|
|
17202
17202
|
};
|
|
17203
17203
|
|
|
17204
|
+
// src/js/i18n.js
|
|
17205
|
+
var PREFIX = "plutonium.js.";
|
|
17206
|
+
var BLOB_SELECTOR = 'meta[name="pu-i18n"]';
|
|
17207
|
+
var dictionary = null;
|
|
17208
|
+
function load() {
|
|
17209
|
+
if (typeof document === "undefined") return {};
|
|
17210
|
+
const el = document.querySelector(BLOB_SELECTOR);
|
|
17211
|
+
if (!el) return {};
|
|
17212
|
+
try {
|
|
17213
|
+
return JSON.parse(el.content) || {};
|
|
17214
|
+
} catch (e4) {
|
|
17215
|
+
console.warn("[plutonium] could not parse the pu-i18n locale blob", e4);
|
|
17216
|
+
return {};
|
|
17217
|
+
}
|
|
17218
|
+
}
|
|
17219
|
+
function lookup(key) {
|
|
17220
|
+
if (dictionary === null) dictionary = load();
|
|
17221
|
+
const path = key.startsWith(PREFIX) ? key.slice(PREFIX.length) : key;
|
|
17222
|
+
return path.split(".").reduce(
|
|
17223
|
+
(node, part) => node != null && typeof node === "object" ? node[part] : void 0,
|
|
17224
|
+
dictionary
|
|
17225
|
+
);
|
|
17226
|
+
}
|
|
17227
|
+
function interpolate2(text2, params) {
|
|
17228
|
+
return text2.replace(
|
|
17229
|
+
/%\{(\w+)\}/g,
|
|
17230
|
+
(match2, name) => Object.prototype.hasOwnProperty.call(params, name) ? String(params[name]) : match2
|
|
17231
|
+
);
|
|
17232
|
+
}
|
|
17233
|
+
function t(key, params = {}) {
|
|
17234
|
+
let value = lookup(key);
|
|
17235
|
+
if (value != null && typeof value === "object" && "count" in params) {
|
|
17236
|
+
value = params.count === 1 ? value.one : value.other;
|
|
17237
|
+
}
|
|
17238
|
+
if (typeof value === "string") return interpolate2(value, params);
|
|
17239
|
+
return value === void 0 ? key : value;
|
|
17240
|
+
}
|
|
17241
|
+
if (typeof document !== "undefined") {
|
|
17242
|
+
const reset = () => {
|
|
17243
|
+
dictionary = null;
|
|
17244
|
+
};
|
|
17245
|
+
document.addEventListener("turbo:load", reset);
|
|
17246
|
+
document.addEventListener("turbo:render", reset);
|
|
17247
|
+
}
|
|
17248
|
+
|
|
17204
17249
|
// src/js/controllers/slim_select_controller.js
|
|
17205
17250
|
var slim_select_controller_default = class extends Controller {
|
|
17206
17251
|
static values = {
|
|
@@ -17222,21 +17267,15 @@ ${text2}</tr>
|
|
|
17222
17267
|
}
|
|
17223
17268
|
#setupSlimSelect() {
|
|
17224
17269
|
const settings = {};
|
|
17225
|
-
const
|
|
17226
|
-
if (
|
|
17227
|
-
|
|
17228
|
-
|
|
17229
|
-
|
|
17230
|
-
|
|
17231
|
-
|
|
17232
|
-
|
|
17233
|
-
|
|
17234
|
-
}
|
|
17235
|
-
this.element.parentNode.insertBefore(
|
|
17236
|
-
this.dropdownContainer,
|
|
17237
|
-
this.element.nextSibling
|
|
17238
|
-
);
|
|
17239
|
-
settings.contentLocation = this.dropdownContainer;
|
|
17270
|
+
const strings = t("plutonium.js.libraries.slim_select");
|
|
17271
|
+
if (strings && typeof strings === "object") {
|
|
17272
|
+
const { placeholderText, searchText, searchPlaceholder, searchingText } = strings;
|
|
17273
|
+
Object.assign(settings, { placeholderText, searchText, searchPlaceholder, searchingText });
|
|
17274
|
+
Object.keys(settings).forEach((k4) => settings[k4] === void 0 && delete settings[k4]);
|
|
17275
|
+
}
|
|
17276
|
+
this.modal = this.element.closest('[data-controller="remote-modal"]');
|
|
17277
|
+
if (this.modal) {
|
|
17278
|
+
settings.contentLocation = this.modal;
|
|
17240
17279
|
settings.contentPosition = "absolute";
|
|
17241
17280
|
settings.openPosition = "auto";
|
|
17242
17281
|
}
|
|
@@ -17249,88 +17288,48 @@ ${text2}</tr>
|
|
|
17249
17288
|
settings,
|
|
17250
17289
|
events
|
|
17251
17290
|
});
|
|
17252
|
-
this.
|
|
17253
|
-
|
|
17254
|
-
|
|
17255
|
-
|
|
17256
|
-
|
|
17257
|
-
|
|
17258
|
-
|
|
17259
|
-
|
|
17260
|
-
|
|
17261
|
-
|
|
17262
|
-
|
|
17263
|
-
|
|
17264
|
-
|
|
17265
|
-
|
|
17266
|
-
|
|
17267
|
-
|
|
17268
|
-
|
|
17269
|
-
|
|
17270
|
-
|
|
17271
|
-
|
|
17272
|
-
|
|
17273
|
-
|
|
17274
|
-
|
|
17275
|
-
|
|
17276
|
-
|
|
17277
|
-
|
|
17278
|
-
|
|
17279
|
-
|
|
17280
|
-
|
|
17281
|
-
|
|
17282
|
-
|
|
17283
|
-
|
|
17284
|
-
|
|
17285
|
-
|
|
17286
|
-
|
|
17287
|
-
|
|
17288
|
-
|
|
17289
|
-
|
|
17290
|
-
|
|
17291
|
-
this.dropdownContainer.style.zIndex = "10000";
|
|
17292
|
-
}
|
|
17293
|
-
}
|
|
17294
|
-
handleDropdownClose() {
|
|
17295
|
-
if (this.dropdownContainer) {
|
|
17296
|
-
this.dropdownContainer.classList.remove("ss-active");
|
|
17297
|
-
}
|
|
17298
|
-
}
|
|
17299
|
-
setupAriaObserver() {
|
|
17300
|
-
if (this.element) {
|
|
17301
|
-
this.ariaObserver = new MutationObserver((mutations) => {
|
|
17302
|
-
mutations.forEach((mutation) => {
|
|
17303
|
-
if (mutation.attributeName === "aria-expanded") {
|
|
17304
|
-
const expanded = mutation.target.getAttribute("aria-expanded") === "true";
|
|
17305
|
-
if (expanded) {
|
|
17306
|
-
this.handleDropdownOpen();
|
|
17307
|
-
} else {
|
|
17308
|
-
this.handleDropdownClose();
|
|
17309
|
-
}
|
|
17310
|
-
}
|
|
17311
|
-
});
|
|
17312
|
-
});
|
|
17313
|
-
const possibleTargets = [
|
|
17314
|
-
this.element,
|
|
17315
|
-
this.element.parentNode.querySelector(".ss-main"),
|
|
17316
|
-
this.element.parentNode.querySelector("[aria-expanded]")
|
|
17317
|
-
];
|
|
17318
|
-
const target = possibleTargets.find(
|
|
17319
|
-
(el) => el && el.hasAttribute && el.hasAttribute("aria-expanded")
|
|
17320
|
-
);
|
|
17321
|
-
if (target) {
|
|
17322
|
-
this.ariaObserver.observe(target, {
|
|
17323
|
-
attributes: true,
|
|
17324
|
-
attributeFilter: ["aria-expanded"]
|
|
17325
|
-
});
|
|
17326
|
-
const expanded = target.getAttribute("aria-expanded") === "true";
|
|
17327
|
-
if (expanded) {
|
|
17328
|
-
this.handleDropdownOpen();
|
|
17329
|
-
} else {
|
|
17330
|
-
this.handleDropdownClose();
|
|
17331
|
-
}
|
|
17291
|
+
if (this.modal) {
|
|
17292
|
+
this.#applyModalPositioning();
|
|
17293
|
+
}
|
|
17294
|
+
}
|
|
17295
|
+
// Re-base SlimSelect's dropdown positioning onto the modal's coordinate
|
|
17296
|
+
// system. SlimSelect computes document coordinates (rect + window scroll),
|
|
17297
|
+
// which are wrong for content parented to a transform-animated <dialog>:
|
|
17298
|
+
// an absolutely-positioned child is placed relative to the dialog's box,
|
|
17299
|
+
// not the document. We override the two leaf positioners so SlimSelect
|
|
17300
|
+
// keeps deciding up-vs-down (and its own open/scroll/resize triggers keep
|
|
17301
|
+
// firing), but the actual offsets are measured against the dialog. A
|
|
17302
|
+
// capture-phase scroll listener covers scrolls of the dialog's own
|
|
17303
|
+
// content, which never reach SlimSelect's window-level scroll listener.
|
|
17304
|
+
#applyModalPositioning() {
|
|
17305
|
+
const render = this.slimSelect.render;
|
|
17306
|
+
const openAbove = render.classes.openAbove;
|
|
17307
|
+
const openBelow = render.classes.openBelow;
|
|
17308
|
+
const place = (above) => {
|
|
17309
|
+
const mainEl = render.main.main;
|
|
17310
|
+
const content = render.content.main;
|
|
17311
|
+
const mainHeight = mainEl.offsetHeight;
|
|
17312
|
+
const contentHeight = content.offsetHeight;
|
|
17313
|
+
mainEl.classList.remove(openAbove, openBelow);
|
|
17314
|
+
content.classList.remove(openAbove, openBelow);
|
|
17315
|
+
mainEl.classList.add(above ? openAbove : openBelow);
|
|
17316
|
+
content.classList.add(above ? openAbove : openBelow);
|
|
17317
|
+
const inputRect = mainEl.getBoundingClientRect();
|
|
17318
|
+
const modalRect = this.modal.getBoundingClientRect();
|
|
17319
|
+
content.style.margin = above ? "-" + (mainHeight + contentHeight - 1) + "px 0px 0px 0px" : "-1px 0px 0px 0px";
|
|
17320
|
+
content.style.top = inputRect.top + inputRect.height - modalRect.top + "px";
|
|
17321
|
+
content.style.left = inputRect.left - modalRect.left + "px";
|
|
17322
|
+
content.style.width = inputRect.width + "px";
|
|
17323
|
+
};
|
|
17324
|
+
render.moveContentAbove = () => place(true);
|
|
17325
|
+
render.moveContentBelow = () => place(false);
|
|
17326
|
+
this.boundModalReposition = () => {
|
|
17327
|
+
if (!this.slimSelect) return;
|
|
17328
|
+
if (this.slimSelect.settings.isOpen || this.slimSelect.settings.isFullOpen) {
|
|
17329
|
+
this.slimSelect.render.moveContent();
|
|
17332
17330
|
}
|
|
17333
|
-
}
|
|
17331
|
+
};
|
|
17332
|
+
document.addEventListener("scroll", this.boundModalReposition, true);
|
|
17334
17333
|
}
|
|
17335
17334
|
disconnect() {
|
|
17336
17335
|
this.#cleanupSlimSelect();
|
|
@@ -17358,7 +17357,7 @@ ${text2}</tr>
|
|
|
17358
17357
|
headers: { Accept: "application/json" },
|
|
17359
17358
|
signal
|
|
17360
17359
|
});
|
|
17361
|
-
if (!res.ok) return "
|
|
17360
|
+
if (!res.ok) return t("plutonium.js.slim_select.search_failed");
|
|
17362
17361
|
const json = await res.json();
|
|
17363
17362
|
const results = Array.isArray(json.results) ? json.results : [];
|
|
17364
17363
|
return results.map((row) => ({
|
|
@@ -17368,7 +17367,7 @@ ${text2}</tr>
|
|
|
17368
17367
|
} catch (e4) {
|
|
17369
17368
|
if (e4.name === "AbortError") return [];
|
|
17370
17369
|
console.warn("[slim-select] typeahead error", e4);
|
|
17371
|
-
return "
|
|
17370
|
+
return t("plutonium.js.slim_select.search_failed");
|
|
17372
17371
|
}
|
|
17373
17372
|
}
|
|
17374
17373
|
#handleMorph() {
|
|
@@ -17377,41 +17376,14 @@ ${text2}</tr>
|
|
|
17377
17376
|
this.#setupSlimSelect();
|
|
17378
17377
|
}
|
|
17379
17378
|
#cleanupSlimSelect() {
|
|
17380
|
-
if (this.
|
|
17381
|
-
|
|
17382
|
-
|
|
17383
|
-
"ss:open",
|
|
17384
|
-
this.boundHandleDropdownOpen
|
|
17385
|
-
);
|
|
17386
|
-
}
|
|
17387
|
-
if (this.boundHandleDropdownClose) {
|
|
17388
|
-
this.element.removeEventListener(
|
|
17389
|
-
"ss:close",
|
|
17390
|
-
this.boundHandleDropdownClose
|
|
17391
|
-
);
|
|
17392
|
-
}
|
|
17393
|
-
}
|
|
17394
|
-
if (this.ariaObserver) {
|
|
17395
|
-
this.ariaObserver.disconnect();
|
|
17396
|
-
this.ariaObserver = null;
|
|
17379
|
+
if (this.boundModalReposition) {
|
|
17380
|
+
document.removeEventListener("scroll", this.boundModalReposition, true);
|
|
17381
|
+
this.boundModalReposition = null;
|
|
17397
17382
|
}
|
|
17398
17383
|
if (this.slimSelect) {
|
|
17399
17384
|
this.slimSelect.destroy();
|
|
17400
17385
|
this.slimSelect = null;
|
|
17401
17386
|
}
|
|
17402
|
-
if (this.repositionDropdown) {
|
|
17403
|
-
window.removeEventListener("resize", this.repositionDropdown);
|
|
17404
|
-
window.removeEventListener("scroll", this.repositionDropdown);
|
|
17405
|
-
this.repositionDropdown = null;
|
|
17406
|
-
}
|
|
17407
|
-
if (this.dropdownContainer && this.dropdownContainer.parentNode) {
|
|
17408
|
-
this.dropdownContainer.parentNode.removeChild(this.dropdownContainer);
|
|
17409
|
-
this.dropdownContainer = null;
|
|
17410
|
-
}
|
|
17411
|
-
if (this.modifiedSelectWrapper) {
|
|
17412
|
-
this.modifiedSelectWrapper.style.position = "";
|
|
17413
|
-
this.modifiedSelectWrapper = null;
|
|
17414
|
-
}
|
|
17415
17387
|
}
|
|
17416
17388
|
};
|
|
17417
17389
|
|
|
@@ -17448,6 +17420,8 @@ ${text2}</tr>
|
|
|
17448
17420
|
}
|
|
17449
17421
|
#buildOptions() {
|
|
17450
17422
|
let options2 = { altInput: true };
|
|
17423
|
+
const locale = lookup("plutonium.js.libraries.flatpickr.locale");
|
|
17424
|
+
if (typeof locale === "string") options2.locale = locale;
|
|
17451
17425
|
if (this.element.attributes.type.value == "datetime-local") {
|
|
17452
17426
|
options2.enableTime = true;
|
|
17453
17427
|
} else if (this.element.attributes.type.value == "time") {
|
|
@@ -17513,7 +17487,9 @@ ${text2}</tr>
|
|
|
17513
17487
|
this.iti = window.intlTelInput(this.inputTarget, this.#buildOptions());
|
|
17514
17488
|
}
|
|
17515
17489
|
#buildOptions() {
|
|
17490
|
+
const i18n = t("plutonium.js.libraries.intl_tel_input");
|
|
17516
17491
|
return {
|
|
17492
|
+
...i18n && typeof i18n === "object" ? { i18n } : {},
|
|
17517
17493
|
strictMode: true,
|
|
17518
17494
|
hiddenInput: () => ({ phone: this.inputTarget.attributes.name.value }),
|
|
17519
17495
|
loadUtilsOnInit: "https://cdn.jsdelivr.net/npm/intl-tel-input@24.8.1/build/js/utils.js",
|
|
@@ -17634,7 +17610,7 @@ ${text2}</tr>
|
|
|
17634
17610
|
});
|
|
17635
17611
|
return newParts;
|
|
17636
17612
|
}
|
|
17637
|
-
function
|
|
17613
|
+
function interpolate3(phrase, options2) {
|
|
17638
17614
|
const dollarRegex = /\$/g;
|
|
17639
17615
|
const dollarBillsYall = "$$$$";
|
|
17640
17616
|
let interpolated = [phrase];
|
|
@@ -17709,14 +17685,14 @@ ${text2}</tr>
|
|
|
17709
17685
|
if (hasPluralForms) {
|
|
17710
17686
|
if (options2 && typeof options2.smart_count !== "undefined") {
|
|
17711
17687
|
const plural = this.locale.pluralize(options2.smart_count);
|
|
17712
|
-
return
|
|
17688
|
+
return interpolate3(string[plural], options2);
|
|
17713
17689
|
}
|
|
17714
17690
|
throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}");
|
|
17715
17691
|
}
|
|
17716
17692
|
if (typeof string !== "string") {
|
|
17717
17693
|
throw new Error(`string was not a string`);
|
|
17718
17694
|
}
|
|
17719
|
-
return
|
|
17695
|
+
return interpolate3(string, options2);
|
|
17720
17696
|
}
|
|
17721
17697
|
};
|
|
17722
17698
|
|
|
@@ -17845,7 +17821,7 @@ ${text2}</tr>
|
|
|
17845
17821
|
var n;
|
|
17846
17822
|
var l;
|
|
17847
17823
|
var u;
|
|
17848
|
-
var
|
|
17824
|
+
var t2;
|
|
17849
17825
|
var i;
|
|
17850
17826
|
var o;
|
|
17851
17827
|
var r;
|
|
@@ -17866,14 +17842,14 @@ ${text2}</tr>
|
|
|
17866
17842
|
function g(n3) {
|
|
17867
17843
|
n3 && n3.parentNode && n3.parentNode.removeChild(n3);
|
|
17868
17844
|
}
|
|
17869
|
-
function _(l4, u5,
|
|
17845
|
+
function _(l4, u5, t5) {
|
|
17870
17846
|
var i4, o4, r4, e4 = {};
|
|
17871
17847
|
for (r4 in u5) "key" == r4 ? i4 = u5[r4] : "ref" == r4 ? o4 = u5[r4] : e4[r4] = u5[r4];
|
|
17872
|
-
if (arguments.length > 2 && (e4.children = arguments.length > 3 ? n.call(arguments, 2) :
|
|
17848
|
+
if (arguments.length > 2 && (e4.children = arguments.length > 3 ? n.call(arguments, 2) : t5), "function" == typeof l4 && null != l4.defaultProps) for (r4 in l4.defaultProps) void 0 === e4[r4] && (e4[r4] = l4.defaultProps[r4]);
|
|
17873
17849
|
return m(l4, e4, i4, o4, null);
|
|
17874
17850
|
}
|
|
17875
|
-
function m(n3,
|
|
17876
|
-
var e4 = { type: n3, props:
|
|
17851
|
+
function m(n3, t5, i4, o4, r4) {
|
|
17852
|
+
var e4 = { type: n3, props: t5, key: i4, ref: o4, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: null == r4 ? ++u : r4, __i: -1, __u: 0 };
|
|
17877
17853
|
return null == r4 && null != l.vnode && l.vnode(e4), e4;
|
|
17878
17854
|
}
|
|
17879
17855
|
function b() {
|
|
@@ -17904,27 +17880,27 @@ ${text2}</tr>
|
|
|
17904
17880
|
(!n3.__d && (n3.__d = true) && i.push(n3) && !$.__r++ || o != l.debounceRendering) && ((o = l.debounceRendering) || r)($);
|
|
17905
17881
|
}
|
|
17906
17882
|
function $() {
|
|
17907
|
-
for (var n3, u5,
|
|
17883
|
+
for (var n3, u5, t5, o4, r4, f5, c4, s4 = 1; i.length; ) i.length > s4 && i.sort(e), n3 = i.shift(), s4 = i.length, n3.__d && (t5 = void 0, o4 = void 0, r4 = (o4 = (u5 = n3).__v).__e, f5 = [], c4 = [], u5.__P && ((t5 = w({}, o4)).__v = o4.__v + 1, l.vnode && l.vnode(t5), O(u5.__P, t5, o4, u5.__n, u5.__P.namespaceURI, 32 & o4.__u ? [r4] : null, f5, null == r4 ? S(o4) : r4, !!(32 & o4.__u), c4), t5.__v = o4.__v, t5.__.__k[t5.__i] = t5, N(f5, t5, c4), o4.__e = o4.__ = null, t5.__e != r4 && C(t5)));
|
|
17908
17884
|
$.__r = 0;
|
|
17909
17885
|
}
|
|
17910
|
-
function I(n3, l4, u5,
|
|
17911
|
-
var a4, h4, y4, d4, w4, g5, _4, m4 =
|
|
17886
|
+
function I(n3, l4, u5, t5, i4, o4, r4, e4, f5, c4, s4) {
|
|
17887
|
+
var a4, h4, y4, d4, w4, g5, _4, m4 = t5 && t5.__k || v, b3 = l4.length;
|
|
17912
17888
|
for (f5 = P(u5, l4, m4, f5, b3), a4 = 0; a4 < b3; a4++) null != (y4 = u5.__k[a4]) && (h4 = -1 == y4.__i ? p : m4[y4.__i] || p, y4.__i = a4, g5 = O(n3, y4, h4, i4, o4, r4, e4, f5, c4, s4), d4 = y4.__e, y4.ref && h4.ref != y4.ref && (h4.ref && B(h4.ref, null, y4), s4.push(y4.ref, y4.__c || d4, y4)), null == w4 && null != d4 && (w4 = d4), (_4 = !!(4 & y4.__u)) || h4.__k === y4.__k ? f5 = A(y4, f5, n3, _4) : "function" == typeof y4.type && void 0 !== g5 ? f5 = g5 : d4 && (f5 = d4.nextSibling), y4.__u &= -7);
|
|
17913
17889
|
return u5.__e = w4, f5;
|
|
17914
17890
|
}
|
|
17915
|
-
function P(n3, l4, u5,
|
|
17891
|
+
function P(n3, l4, u5, t5, i4) {
|
|
17916
17892
|
var o4, r4, e4, f5, c4, s4 = u5.length, a4 = s4, h4 = 0;
|
|
17917
17893
|
for (n3.__k = new Array(i4), o4 = 0; o4 < i4; o4++) null != (r4 = l4[o4]) && "boolean" != typeof r4 && "function" != typeof r4 ? ("string" == typeof r4 || "number" == typeof r4 || "bigint" == typeof r4 || r4.constructor == String ? r4 = n3.__k[o4] = m(null, r4, null, null, null) : d(r4) ? r4 = n3.__k[o4] = m(k, { children: r4 }, null, null, null) : void 0 === r4.constructor && r4.__b > 0 ? r4 = n3.__k[o4] = m(r4.type, r4.props, r4.key, r4.ref ? r4.ref : null, r4.__v) : n3.__k[o4] = r4, f5 = o4 + h4, r4.__ = n3, r4.__b = n3.__b + 1, e4 = null, -1 != (c4 = r4.__i = L(r4, u5, f5, a4)) && (a4--, (e4 = u5[c4]) && (e4.__u |= 2)), null == e4 || null == e4.__v ? (-1 == c4 && (i4 > s4 ? h4-- : i4 < s4 && h4++), "function" != typeof r4.type && (r4.__u |= 4)) : c4 != f5 && (c4 == f5 - 1 ? h4-- : c4 == f5 + 1 ? h4++ : (c4 > f5 ? h4-- : h4++, r4.__u |= 4))) : n3.__k[o4] = null;
|
|
17918
|
-
if (a4) for (o4 = 0; o4 < s4; o4++) null != (e4 = u5[o4]) && 0 == (2 & e4.__u) && (e4.__e ==
|
|
17919
|
-
return
|
|
17894
|
+
if (a4) for (o4 = 0; o4 < s4; o4++) null != (e4 = u5[o4]) && 0 == (2 & e4.__u) && (e4.__e == t5 && (t5 = S(e4)), D(e4, e4));
|
|
17895
|
+
return t5;
|
|
17920
17896
|
}
|
|
17921
|
-
function A(n3, l4, u5,
|
|
17897
|
+
function A(n3, l4, u5, t5) {
|
|
17922
17898
|
var i4, o4;
|
|
17923
17899
|
if ("function" == typeof n3.type) {
|
|
17924
|
-
for (i4 = n3.__k, o4 = 0; i4 && o4 < i4.length; o4++) i4[o4] && (i4[o4].__ = n3, l4 = A(i4[o4], l4, u5,
|
|
17900
|
+
for (i4 = n3.__k, o4 = 0; i4 && o4 < i4.length; o4++) i4[o4] && (i4[o4].__ = n3, l4 = A(i4[o4], l4, u5, t5));
|
|
17925
17901
|
return l4;
|
|
17926
17902
|
}
|
|
17927
|
-
n3.__e != l4 && (
|
|
17903
|
+
n3.__e != l4 && (t5 && (l4 && n3.type && !l4.parentNode && (l4 = S(n3)), u5.insertBefore(n3.__e, l4 || null)), l4 = n3.__e);
|
|
17928
17904
|
do {
|
|
17929
17905
|
l4 = l4 && l4.nextSibling;
|
|
17930
17906
|
} while (null != l4 && 8 == l4.nodeType);
|
|
@@ -17935,10 +17911,10 @@ ${text2}</tr>
|
|
|
17935
17911
|
H(n4, l4);
|
|
17936
17912
|
}) : l4.push(n3)), l4;
|
|
17937
17913
|
}
|
|
17938
|
-
function L(n3, l4, u5,
|
|
17914
|
+
function L(n3, l4, u5, t5) {
|
|
17939
17915
|
var i4, o4, r4, e4 = n3.key, f5 = n3.type, c4 = l4[u5], s4 = null != c4 && 0 == (2 & c4.__u);
|
|
17940
17916
|
if (null === c4 && null == e4 || s4 && e4 == c4.key && f5 == c4.type) return u5;
|
|
17941
|
-
if (
|
|
17917
|
+
if (t5 > (s4 ? 1 : 0)) {
|
|
17942
17918
|
for (i4 = u5 - 1, o4 = u5 + 1; i4 >= 0 || o4 < l4.length; ) if (null != (c4 = l4[r4 = i4 >= 0 ? i4-- : o4++]) && 0 == (2 & c4.__u) && e4 == c4.key && f5 == c4.type) return r4;
|
|
17943
17919
|
}
|
|
17944
17920
|
return -1;
|
|
@@ -17946,14 +17922,14 @@ ${text2}</tr>
|
|
|
17946
17922
|
function T(n3, l4, u5) {
|
|
17947
17923
|
"-" == l4[0] ? n3.setProperty(l4, null == u5 ? "" : u5) : n3[l4] = null == u5 ? "" : "number" != typeof u5 || y.test(l4) ? u5 : u5 + "px";
|
|
17948
17924
|
}
|
|
17949
|
-
function j(n3, l4, u5,
|
|
17925
|
+
function j(n3, l4, u5, t5, i4) {
|
|
17950
17926
|
var o4, r4;
|
|
17951
17927
|
n: if ("style" == l4) if ("string" == typeof u5) n3.style.cssText = u5;
|
|
17952
17928
|
else {
|
|
17953
|
-
if ("string" == typeof
|
|
17954
|
-
if (u5) for (l4 in u5)
|
|
17929
|
+
if ("string" == typeof t5 && (n3.style.cssText = t5 = ""), t5) for (l4 in t5) u5 && l4 in u5 || T(n3.style, l4, "");
|
|
17930
|
+
if (u5) for (l4 in u5) t5 && u5[l4] == t5[l4] || T(n3.style, l4, u5[l4]);
|
|
17955
17931
|
}
|
|
17956
|
-
else if ("o" == l4[0] && "n" == l4[1]) o4 = l4 != (l4 = l4.replace(f, "$1")), r4 = l4.toLowerCase(), l4 = r4 in n3 || "onFocusOut" == l4 || "onFocusIn" == l4 ? r4.slice(2) : l4.slice(2), n3.l || (n3.l = {}), n3.l[l4 + o4] = u5, u5 ?
|
|
17932
|
+
else if ("o" == l4[0] && "n" == l4[1]) o4 = l4 != (l4 = l4.replace(f, "$1")), r4 = l4.toLowerCase(), l4 = r4 in n3 || "onFocusOut" == l4 || "onFocusIn" == l4 ? r4.slice(2) : l4.slice(2), n3.l || (n3.l = {}), n3.l[l4 + o4] = u5, u5 ? t5 ? u5.u = t5.u : (u5.u = c, n3.addEventListener(l4, o4 ? a : s, o4)) : n3.removeEventListener(l4, o4 ? a : s, o4);
|
|
17957
17933
|
else {
|
|
17958
17934
|
if ("http://www.w3.org/2000/svg" == i4) l4 = l4.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
|
|
17959
17935
|
else if ("width" != l4 && "height" != l4 && "href" != l4 && "list" != l4 && "form" != l4 && "tabIndex" != l4 && "download" != l4 && "rowSpan" != l4 && "colSpan" != l4 && "role" != l4 && "popover" != l4 && l4 in n3) try {
|
|
@@ -17967,22 +17943,22 @@ ${text2}</tr>
|
|
|
17967
17943
|
function F(n3) {
|
|
17968
17944
|
return function(u5) {
|
|
17969
17945
|
if (this.l) {
|
|
17970
|
-
var
|
|
17946
|
+
var t5 = this.l[u5.type + n3];
|
|
17971
17947
|
if (null == u5.t) u5.t = c++;
|
|
17972
|
-
else if (u5.t <
|
|
17973
|
-
return
|
|
17948
|
+
else if (u5.t < t5.u) return;
|
|
17949
|
+
return t5(l.event ? l.event(u5) : u5);
|
|
17974
17950
|
}
|
|
17975
17951
|
};
|
|
17976
17952
|
}
|
|
17977
|
-
function O(n3, u5,
|
|
17953
|
+
function O(n3, u5, t5, i4, o4, r4, e4, f5, c4, s4) {
|
|
17978
17954
|
var a4, h4, p4, v4, y4, _4, m4, b3, S3, C4, M3, $3, P5, A5, H4, L3, T5, j5 = u5.type;
|
|
17979
17955
|
if (void 0 !== u5.constructor) return null;
|
|
17980
|
-
128 &
|
|
17956
|
+
128 & t5.__u && (c4 = !!(32 & t5.__u), r4 = [f5 = u5.__e = t5.__e]), (a4 = l.__b) && a4(u5);
|
|
17981
17957
|
n: if ("function" == typeof j5) try {
|
|
17982
|
-
if (b3 = u5.props, S3 = "prototype" in j5 && j5.prototype.render, C4 = (a4 = j5.contextType) && i4[a4.__c], M3 = a4 ? C4 ? C4.props.value : a4.__ : i4,
|
|
17958
|
+
if (b3 = u5.props, S3 = "prototype" in j5 && j5.prototype.render, C4 = (a4 = j5.contextType) && i4[a4.__c], M3 = a4 ? C4 ? C4.props.value : a4.__ : i4, t5.__c ? m4 = (h4 = u5.__c = t5.__c).__ = h4.__E : (S3 ? u5.__c = h4 = new j5(b3, M3) : (u5.__c = h4 = new x(b3, M3), h4.constructor = j5, h4.render = E), C4 && C4.sub(h4), h4.state || (h4.state = {}), h4.__n = i4, p4 = h4.__d = true, h4.__h = [], h4._sb = []), S3 && null == h4.__s && (h4.__s = h4.state), S3 && null != j5.getDerivedStateFromProps && (h4.__s == h4.state && (h4.__s = w({}, h4.__s)), w(h4.__s, j5.getDerivedStateFromProps(b3, h4.__s))), v4 = h4.props, y4 = h4.state, h4.__v = u5, p4) S3 && null == j5.getDerivedStateFromProps && null != h4.componentWillMount && h4.componentWillMount(), S3 && null != h4.componentDidMount && h4.__h.push(h4.componentDidMount);
|
|
17983
17959
|
else {
|
|
17984
|
-
if (S3 && null == j5.getDerivedStateFromProps && b3 !== v4 && null != h4.componentWillReceiveProps && h4.componentWillReceiveProps(b3, M3), u5.__v ==
|
|
17985
|
-
for (u5.__v !=
|
|
17960
|
+
if (S3 && null == j5.getDerivedStateFromProps && b3 !== v4 && null != h4.componentWillReceiveProps && h4.componentWillReceiveProps(b3, M3), u5.__v == t5.__v || !h4.__e && null != h4.shouldComponentUpdate && false === h4.shouldComponentUpdate(b3, h4.__s, M3)) {
|
|
17961
|
+
for (u5.__v != t5.__v && (h4.props = b3, h4.state = h4.__s, h4.__d = false), u5.__e = t5.__e, u5.__k = t5.__k, u5.__k.some(function(n4) {
|
|
17986
17962
|
n4 && (n4.__ = u5);
|
|
17987
17963
|
}), $3 = 0; $3 < h4._sb.length; $3++) h4.__h.push(h4._sb[$3]);
|
|
17988
17964
|
h4._sb = [], h4.__h.length && e4.push(h4);
|
|
@@ -17998,7 +17974,7 @@ ${text2}</tr>
|
|
|
17998
17974
|
} else do {
|
|
17999
17975
|
h4.__d = false, P5 && P5(u5), a4 = h4.render(h4.props, h4.state, h4.context), h4.state = h4.__s;
|
|
18000
17976
|
} while (h4.__d && ++A5 < 25);
|
|
18001
|
-
h4.state = h4.__s, null != h4.getChildContext && (i4 = w(w({}, i4), h4.getChildContext())), S3 && !p4 && null != h4.getSnapshotBeforeUpdate && (_4 = h4.getSnapshotBeforeUpdate(v4, y4)), L3 = a4, null != a4 && a4.type === k && null == a4.key && (L3 = V(a4.props.children)), f5 = I(n3, d(L3) ? L3 : [L3], u5,
|
|
17977
|
+
h4.state = h4.__s, null != h4.getChildContext && (i4 = w(w({}, i4), h4.getChildContext())), S3 && !p4 && null != h4.getSnapshotBeforeUpdate && (_4 = h4.getSnapshotBeforeUpdate(v4, y4)), L3 = a4, null != a4 && a4.type === k && null == a4.key && (L3 = V(a4.props.children)), f5 = I(n3, d(L3) ? L3 : [L3], u5, t5, i4, o4, r4, e4, f5, c4, s4), h4.base = u5.__e, u5.__u &= -161, h4.__h.length && e4.push(h4), m4 && (h4.__E = h4.__ = null);
|
|
18002
17978
|
} catch (n4) {
|
|
18003
17979
|
if (u5.__v = null, c4 || null != r4) if (n4.then) {
|
|
18004
17980
|
for (u5.__u |= c4 ? 160 : 128; f5 && 8 == f5.nodeType && f5.nextSibling; ) f5 = f5.nextSibling;
|
|
@@ -18007,17 +17983,17 @@ ${text2}</tr>
|
|
|
18007
17983
|
for (T5 = r4.length; T5--; ) g(r4[T5]);
|
|
18008
17984
|
z(u5);
|
|
18009
17985
|
}
|
|
18010
|
-
else u5.__e =
|
|
18011
|
-
l.__e(n4, u5,
|
|
17986
|
+
else u5.__e = t5.__e, u5.__k = t5.__k, n4.then || z(u5);
|
|
17987
|
+
l.__e(n4, u5, t5);
|
|
18012
17988
|
}
|
|
18013
|
-
else null == r4 && u5.__v ==
|
|
17989
|
+
else null == r4 && u5.__v == t5.__v ? (u5.__k = t5.__k, u5.__e = t5.__e) : f5 = u5.__e = q(t5.__e, u5, t5, i4, o4, r4, e4, c4, s4);
|
|
18014
17990
|
return (a4 = l.diffed) && a4(u5), 128 & u5.__u ? void 0 : f5;
|
|
18015
17991
|
}
|
|
18016
17992
|
function z(n3) {
|
|
18017
17993
|
n3 && n3.__c && (n3.__c.__e = true), n3 && n3.__k && n3.__k.forEach(z);
|
|
18018
17994
|
}
|
|
18019
|
-
function N(n3, u5,
|
|
18020
|
-
for (var i4 = 0; i4 <
|
|
17995
|
+
function N(n3, u5, t5) {
|
|
17996
|
+
for (var i4 = 0; i4 < t5.length; i4++) B(t5[i4], t5[++i4], t5[++i4]);
|
|
18021
17997
|
l.__c && l.__c(u5, n3), n3.some(function(u6) {
|
|
18022
17998
|
try {
|
|
18023
17999
|
n3 = u6.__h, u6.__h = [], n3.some(function(n4) {
|
|
@@ -18031,8 +18007,8 @@ ${text2}</tr>
|
|
|
18031
18007
|
function V(n3) {
|
|
18032
18008
|
return "object" != typeof n3 || null == n3 || n3.__b && n3.__b > 0 ? n3 : d(n3) ? n3.map(V) : w({}, n3);
|
|
18033
18009
|
}
|
|
18034
|
-
function q(u5,
|
|
18035
|
-
var a4, h4, v4, y4, w4, _4, m4, b3 = i4.props || p, k4 =
|
|
18010
|
+
function q(u5, t5, i4, o4, r4, e4, f5, c4, s4) {
|
|
18011
|
+
var a4, h4, v4, y4, w4, _4, m4, b3 = i4.props || p, k4 = t5.props, x4 = t5.type;
|
|
18036
18012
|
if ("svg" == x4 ? r4 = "http://www.w3.org/2000/svg" : "math" == x4 ? r4 = "http://www.w3.org/1998/Math/MathML" : r4 || (r4 = "http://www.w3.org/1999/xhtml"), null != e4) {
|
|
18037
18013
|
for (a4 = 0; a4 < e4.length; a4++) if ((w4 = e4[a4]) && "setAttribute" in w4 == !!x4 && (x4 ? w4.localName == x4 : 3 == w4.nodeType)) {
|
|
18038
18014
|
u5 = w4, e4[a4] = null;
|
|
@@ -18041,7 +18017,7 @@ ${text2}</tr>
|
|
|
18041
18017
|
}
|
|
18042
18018
|
if (null == u5) {
|
|
18043
18019
|
if (null == x4) return document.createTextNode(k4);
|
|
18044
|
-
u5 = document.createElementNS(r4, x4, k4.is && k4), c4 && (l.__m && l.__m(
|
|
18020
|
+
u5 = document.createElementNS(r4, x4, k4.is && k4), c4 && (l.__m && l.__m(t5, e4), c4 = false), e4 = null;
|
|
18045
18021
|
}
|
|
18046
18022
|
if (null == x4) b3 === k4 || c4 && u5.data == k4 || (u5.data = k4);
|
|
18047
18023
|
else {
|
|
@@ -18053,23 +18029,23 @@ ${text2}</tr>
|
|
|
18053
18029
|
j(u5, a4, null, w4, r4);
|
|
18054
18030
|
}
|
|
18055
18031
|
for (a4 in k4) w4 = k4[a4], "children" == a4 ? y4 = w4 : "dangerouslySetInnerHTML" == a4 ? h4 = w4 : "value" == a4 ? _4 = w4 : "checked" == a4 ? m4 = w4 : c4 && "function" != typeof w4 || b3[a4] === w4 || j(u5, a4, w4, b3[a4], r4);
|
|
18056
|
-
if (h4) c4 || v4 && (h4.__html == v4.__html || h4.__html == u5.innerHTML) || (u5.innerHTML = h4.__html),
|
|
18057
|
-
else if (v4 && (u5.innerHTML = ""), I("template" ==
|
|
18032
|
+
if (h4) c4 || v4 && (h4.__html == v4.__html || h4.__html == u5.innerHTML) || (u5.innerHTML = h4.__html), t5.__k = [];
|
|
18033
|
+
else if (v4 && (u5.innerHTML = ""), I("template" == t5.type ? u5.content : u5, d(y4) ? y4 : [y4], t5, i4, o4, "foreignObject" == x4 ? "http://www.w3.org/1999/xhtml" : r4, e4, f5, e4 ? e4[0] : i4.__k && S(i4, 0), c4, s4), null != e4) for (a4 = e4.length; a4--; ) g(e4[a4]);
|
|
18058
18034
|
c4 || (a4 = "value", "progress" == x4 && null == _4 ? u5.removeAttribute("value") : null != _4 && (_4 !== u5[a4] || "progress" == x4 && !_4 || "option" == x4 && _4 != b3[a4]) && j(u5, a4, _4, b3[a4], r4), a4 = "checked", null != m4 && m4 != u5[a4] && j(u5, a4, m4, b3[a4], r4));
|
|
18059
18035
|
}
|
|
18060
18036
|
return u5;
|
|
18061
18037
|
}
|
|
18062
|
-
function B(n3, u5,
|
|
18038
|
+
function B(n3, u5, t5) {
|
|
18063
18039
|
try {
|
|
18064
18040
|
if ("function" == typeof n3) {
|
|
18065
18041
|
var i4 = "function" == typeof n3.__u;
|
|
18066
18042
|
i4 && n3.__u(), i4 && null == u5 || (n3.__u = n3(u5));
|
|
18067
18043
|
} else n3.current = u5;
|
|
18068
18044
|
} catch (n4) {
|
|
18069
|
-
l.__e(n4,
|
|
18045
|
+
l.__e(n4, t5);
|
|
18070
18046
|
}
|
|
18071
18047
|
}
|
|
18072
|
-
function D(n3, u5,
|
|
18048
|
+
function D(n3, u5, t5) {
|
|
18073
18049
|
var i4, o4;
|
|
18074
18050
|
if (l.unmount && l.unmount(n3), (i4 = n3.ref) && (i4.current && i4.current != n3.__e || B(i4, null, u5)), null != (i4 = n3.__c)) {
|
|
18075
18051
|
if (i4.componentWillUnmount) try {
|
|
@@ -18079,29 +18055,29 @@ ${text2}</tr>
|
|
|
18079
18055
|
}
|
|
18080
18056
|
i4.base = i4.__P = null;
|
|
18081
18057
|
}
|
|
18082
|
-
if (i4 = n3.__k) for (o4 = 0; o4 < i4.length; o4++) i4[o4] && D(i4[o4], u5,
|
|
18083
|
-
|
|
18058
|
+
if (i4 = n3.__k) for (o4 = 0; o4 < i4.length; o4++) i4[o4] && D(i4[o4], u5, t5 || "function" != typeof n3.type);
|
|
18059
|
+
t5 || g(n3.__e), n3.__c = n3.__ = n3.__e = void 0;
|
|
18084
18060
|
}
|
|
18085
18061
|
function E(n3, l4, u5) {
|
|
18086
18062
|
return this.constructor(n3, u5);
|
|
18087
18063
|
}
|
|
18088
|
-
function G(u5,
|
|
18064
|
+
function G(u5, t5, i4) {
|
|
18089
18065
|
var o4, r4, e4, f5;
|
|
18090
|
-
|
|
18066
|
+
t5 == document && (t5 = document.documentElement), l.__ && l.__(u5, t5), r4 = (o4 = "function" == typeof i4) ? null : i4 && i4.__k || t5.__k, e4 = [], f5 = [], O(t5, u5 = (!o4 && i4 || t5).__k = _(k, null, [u5]), r4 || p, p, t5.namespaceURI, !o4 && i4 ? [i4] : r4 ? null : t5.firstChild ? n.call(t5.childNodes) : null, e4, !o4 && i4 ? i4 : r4 ? r4.__e : t5.firstChild, o4, f5), N(e4, u5, f5);
|
|
18091
18067
|
}
|
|
18092
|
-
function K(l4, u5,
|
|
18068
|
+
function K(l4, u5, t5) {
|
|
18093
18069
|
var i4, o4, r4, e4, f5 = w({}, l4.props);
|
|
18094
18070
|
for (r4 in l4.type && l4.type.defaultProps && (e4 = l4.type.defaultProps), u5) "key" == r4 ? i4 = u5[r4] : "ref" == r4 ? o4 = u5[r4] : f5[r4] = void 0 === u5[r4] && null != e4 ? e4[r4] : u5[r4];
|
|
18095
|
-
return arguments.length > 2 && (f5.children = arguments.length > 3 ? n.call(arguments, 2) :
|
|
18071
|
+
return arguments.length > 2 && (f5.children = arguments.length > 3 ? n.call(arguments, 2) : t5), m(l4.type, f5, i4 || l4.key, o4 || l4.ref, null);
|
|
18096
18072
|
}
|
|
18097
|
-
n = v.slice, l = { __e: function(n3, l4, u5,
|
|
18073
|
+
n = v.slice, l = { __e: function(n3, l4, u5, t5) {
|
|
18098
18074
|
for (var i4, o4, r4; l4 = l4.__; ) if ((i4 = l4.__c) && !i4.__) try {
|
|
18099
|
-
if ((o4 = i4.constructor) && null != o4.getDerivedStateFromError && (i4.setState(o4.getDerivedStateFromError(n3)), r4 = i4.__d), null != i4.componentDidCatch && (i4.componentDidCatch(n3,
|
|
18075
|
+
if ((o4 = i4.constructor) && null != o4.getDerivedStateFromError && (i4.setState(o4.getDerivedStateFromError(n3)), r4 = i4.__d), null != i4.componentDidCatch && (i4.componentDidCatch(n3, t5 || {}), r4 = i4.__d), r4) return i4.__E = i4;
|
|
18100
18076
|
} catch (l5) {
|
|
18101
18077
|
n3 = l5;
|
|
18102
18078
|
}
|
|
18103
18079
|
throw n3;
|
|
18104
|
-
} }, u = 0,
|
|
18080
|
+
} }, u = 0, t2 = function(n3) {
|
|
18105
18081
|
return null != n3 && void 0 === n3.constructor;
|
|
18106
18082
|
}, x.prototype.setState = function(n3, l4) {
|
|
18107
18083
|
var u5;
|
|
@@ -18113,7 +18089,7 @@ ${text2}</tr>
|
|
|
18113
18089
|
}, $.__r = 0, f = /(PointerCapture)$|Capture$/i, c = 0, s = F(false), a = F(true), h = 0;
|
|
18114
18090
|
|
|
18115
18091
|
// node_modules/preact/hooks/dist/hooks.module.js
|
|
18116
|
-
var
|
|
18092
|
+
var t3;
|
|
18117
18093
|
var r2;
|
|
18118
18094
|
var u2;
|
|
18119
18095
|
var i2;
|
|
@@ -18126,8 +18102,8 @@ ${text2}</tr>
|
|
|
18126
18102
|
var l2 = c2.__c;
|
|
18127
18103
|
var m2 = c2.unmount;
|
|
18128
18104
|
var s2 = c2.__;
|
|
18129
|
-
function p2(n3,
|
|
18130
|
-
c2.__h && c2.__h(r2, n3, o2 ||
|
|
18105
|
+
function p2(n3, t5) {
|
|
18106
|
+
c2.__h && c2.__h(r2, n3, o2 || t5), o2 = 0;
|
|
18131
18107
|
var u5 = r2.__H || (r2.__H = { __: [], __h: [] });
|
|
18132
18108
|
return n3 >= u5.__.length && u5.__.push({}), u5.__[n3];
|
|
18133
18109
|
}
|
|
@@ -18135,41 +18111,41 @@ ${text2}</tr>
|
|
|
18135
18111
|
return o2 = 1, h2(D2, n3);
|
|
18136
18112
|
}
|
|
18137
18113
|
function h2(n3, u5, i4) {
|
|
18138
|
-
var o4 = p2(
|
|
18114
|
+
var o4 = p2(t3++, 2);
|
|
18139
18115
|
if (o4.t = n3, !o4.__c && (o4.__ = [i4 ? i4(u5) : D2(void 0, u5), function(n4) {
|
|
18140
|
-
var
|
|
18141
|
-
|
|
18116
|
+
var t5 = o4.__N ? o4.__N[0] : o4.__[0], r4 = o4.t(t5, n4);
|
|
18117
|
+
t5 !== r4 && (o4.__N = [r4, o4.__[1]], o4.__c.setState({}));
|
|
18142
18118
|
}], o4.__c = r2, !r2.__f)) {
|
|
18143
|
-
var f5 = function(n4,
|
|
18119
|
+
var f5 = function(n4, t5, r4) {
|
|
18144
18120
|
if (!o4.__c.__H) return true;
|
|
18145
18121
|
var u6 = o4.__c.__H.__.filter(function(n5) {
|
|
18146
18122
|
return !!n5.__c;
|
|
18147
18123
|
});
|
|
18148
18124
|
if (u6.every(function(n5) {
|
|
18149
18125
|
return !n5.__N;
|
|
18150
|
-
})) return !c4 || c4.call(this, n4,
|
|
18126
|
+
})) return !c4 || c4.call(this, n4, t5, r4);
|
|
18151
18127
|
var i5 = o4.__c.props !== n4;
|
|
18152
18128
|
return u6.forEach(function(n5) {
|
|
18153
18129
|
if (n5.__N) {
|
|
18154
|
-
var
|
|
18155
|
-
n5.__ = n5.__N, n5.__N = void 0,
|
|
18130
|
+
var t6 = n5.__[0];
|
|
18131
|
+
n5.__ = n5.__N, n5.__N = void 0, t6 !== n5.__[0] && (i5 = true);
|
|
18156
18132
|
}
|
|
18157
|
-
}), c4 && c4.call(this, n4,
|
|
18133
|
+
}), c4 && c4.call(this, n4, t5, r4) || i5;
|
|
18158
18134
|
};
|
|
18159
18135
|
r2.__f = true;
|
|
18160
18136
|
var c4 = r2.shouldComponentUpdate, e4 = r2.componentWillUpdate;
|
|
18161
|
-
r2.componentWillUpdate = function(n4,
|
|
18137
|
+
r2.componentWillUpdate = function(n4, t5, r4) {
|
|
18162
18138
|
if (this.__e) {
|
|
18163
18139
|
var u6 = c4;
|
|
18164
|
-
c4 = void 0, f5(n4,
|
|
18140
|
+
c4 = void 0, f5(n4, t5, r4), c4 = u6;
|
|
18165
18141
|
}
|
|
18166
|
-
e4 && e4.call(this, n4,
|
|
18142
|
+
e4 && e4.call(this, n4, t5, r4);
|
|
18167
18143
|
}, r2.shouldComponentUpdate = f5;
|
|
18168
18144
|
}
|
|
18169
18145
|
return o4.__N || o4.__;
|
|
18170
18146
|
}
|
|
18171
18147
|
function y2(n3, u5) {
|
|
18172
|
-
var i4 = p2(
|
|
18148
|
+
var i4 = p2(t3++, 3);
|
|
18173
18149
|
!c2.__s && C2(i4.__H, u5) && (i4.__ = n3, i4.u = u5, r2.__H.__h.push(i4));
|
|
18174
18150
|
}
|
|
18175
18151
|
function A2(n3) {
|
|
@@ -18178,99 +18154,99 @@ ${text2}</tr>
|
|
|
18178
18154
|
}, []);
|
|
18179
18155
|
}
|
|
18180
18156
|
function T2(n3, r4) {
|
|
18181
|
-
var u5 = p2(
|
|
18157
|
+
var u5 = p2(t3++, 7);
|
|
18182
18158
|
return C2(u5.__H, r4) && (u5.__ = n3(), u5.__H = r4, u5.__h = n3), u5.__;
|
|
18183
18159
|
}
|
|
18184
|
-
function q2(n3,
|
|
18160
|
+
function q2(n3, t5) {
|
|
18185
18161
|
return o2 = 8, T2(function() {
|
|
18186
18162
|
return n3;
|
|
18187
|
-
},
|
|
18163
|
+
}, t5);
|
|
18188
18164
|
}
|
|
18189
18165
|
function j2() {
|
|
18190
18166
|
for (var n3; n3 = f2.shift(); ) if (n3.__P && n3.__H) try {
|
|
18191
18167
|
n3.__H.__h.forEach(z2), n3.__H.__h.forEach(B2), n3.__H.__h = [];
|
|
18192
|
-
} catch (
|
|
18193
|
-
n3.__H.__h = [], c2.__e(
|
|
18168
|
+
} catch (t5) {
|
|
18169
|
+
n3.__H.__h = [], c2.__e(t5, n3.__v);
|
|
18194
18170
|
}
|
|
18195
18171
|
}
|
|
18196
18172
|
c2.__b = function(n3) {
|
|
18197
18173
|
r2 = null, e2 && e2(n3);
|
|
18198
|
-
}, c2.__ = function(n3,
|
|
18199
|
-
n3 &&
|
|
18174
|
+
}, c2.__ = function(n3, t5) {
|
|
18175
|
+
n3 && t5.__k && t5.__k.__m && (n3.__m = t5.__k.__m), s2 && s2(n3, t5);
|
|
18200
18176
|
}, c2.__r = function(n3) {
|
|
18201
|
-
a2 && a2(n3),
|
|
18177
|
+
a2 && a2(n3), t3 = 0;
|
|
18202
18178
|
var i4 = (r2 = n3.__c).__H;
|
|
18203
18179
|
i4 && (u2 === r2 ? (i4.__h = [], r2.__h = [], i4.__.forEach(function(n4) {
|
|
18204
18180
|
n4.__N && (n4.__ = n4.__N), n4.u = n4.__N = void 0;
|
|
18205
|
-
})) : (i4.__h.forEach(z2), i4.__h.forEach(B2), i4.__h = [],
|
|
18181
|
+
})) : (i4.__h.forEach(z2), i4.__h.forEach(B2), i4.__h = [], t3 = 0)), u2 = r2;
|
|
18206
18182
|
}, c2.diffed = function(n3) {
|
|
18207
18183
|
v2 && v2(n3);
|
|
18208
|
-
var
|
|
18209
|
-
|
|
18184
|
+
var t5 = n3.__c;
|
|
18185
|
+
t5 && t5.__H && (t5.__H.__h.length && (1 !== f2.push(t5) && i2 === c2.requestAnimationFrame || ((i2 = c2.requestAnimationFrame) || w2)(j2)), t5.__H.__.forEach(function(n4) {
|
|
18210
18186
|
n4.u && (n4.__H = n4.u), n4.u = void 0;
|
|
18211
18187
|
})), u2 = r2 = null;
|
|
18212
|
-
}, c2.__c = function(n3,
|
|
18213
|
-
|
|
18188
|
+
}, c2.__c = function(n3, t5) {
|
|
18189
|
+
t5.some(function(n4) {
|
|
18214
18190
|
try {
|
|
18215
18191
|
n4.__h.forEach(z2), n4.__h = n4.__h.filter(function(n5) {
|
|
18216
18192
|
return !n5.__ || B2(n5);
|
|
18217
18193
|
});
|
|
18218
18194
|
} catch (r4) {
|
|
18219
|
-
|
|
18195
|
+
t5.some(function(n5) {
|
|
18220
18196
|
n5.__h && (n5.__h = []);
|
|
18221
|
-
}),
|
|
18197
|
+
}), t5 = [], c2.__e(r4, n4.__v);
|
|
18222
18198
|
}
|
|
18223
|
-
}), l2 && l2(n3,
|
|
18199
|
+
}), l2 && l2(n3, t5);
|
|
18224
18200
|
}, c2.unmount = function(n3) {
|
|
18225
18201
|
m2 && m2(n3);
|
|
18226
|
-
var
|
|
18202
|
+
var t5, r4 = n3.__c;
|
|
18227
18203
|
r4 && r4.__H && (r4.__H.__.forEach(function(n4) {
|
|
18228
18204
|
try {
|
|
18229
18205
|
z2(n4);
|
|
18230
18206
|
} catch (n5) {
|
|
18231
|
-
|
|
18207
|
+
t5 = n5;
|
|
18232
18208
|
}
|
|
18233
|
-
}), r4.__H = void 0,
|
|
18209
|
+
}), r4.__H = void 0, t5 && c2.__e(t5, r4.__v));
|
|
18234
18210
|
};
|
|
18235
18211
|
var k2 = "function" == typeof requestAnimationFrame;
|
|
18236
18212
|
function w2(n3) {
|
|
18237
|
-
var
|
|
18238
|
-
clearTimeout(u5), k2 && cancelAnimationFrame(
|
|
18213
|
+
var t5, r4 = function() {
|
|
18214
|
+
clearTimeout(u5), k2 && cancelAnimationFrame(t5), setTimeout(n3);
|
|
18239
18215
|
}, u5 = setTimeout(r4, 35);
|
|
18240
|
-
k2 && (
|
|
18216
|
+
k2 && (t5 = requestAnimationFrame(r4));
|
|
18241
18217
|
}
|
|
18242
18218
|
function z2(n3) {
|
|
18243
|
-
var
|
|
18244
|
-
"function" == typeof u5 && (n3.__c = void 0, u5()), r2 =
|
|
18219
|
+
var t5 = r2, u5 = n3.__c;
|
|
18220
|
+
"function" == typeof u5 && (n3.__c = void 0, u5()), r2 = t5;
|
|
18245
18221
|
}
|
|
18246
18222
|
function B2(n3) {
|
|
18247
|
-
var
|
|
18248
|
-
n3.__c = n3.__(), r2 =
|
|
18223
|
+
var t5 = r2;
|
|
18224
|
+
n3.__c = n3.__(), r2 = t5;
|
|
18249
18225
|
}
|
|
18250
|
-
function C2(n3,
|
|
18251
|
-
return !n3 || n3.length !==
|
|
18252
|
-
return
|
|
18226
|
+
function C2(n3, t5) {
|
|
18227
|
+
return !n3 || n3.length !== t5.length || t5.some(function(t6, r4) {
|
|
18228
|
+
return t6 !== n3[r4];
|
|
18253
18229
|
});
|
|
18254
18230
|
}
|
|
18255
|
-
function D2(n3,
|
|
18256
|
-
return "function" == typeof
|
|
18231
|
+
function D2(n3, t5) {
|
|
18232
|
+
return "function" == typeof t5 ? t5(n3) : t5;
|
|
18257
18233
|
}
|
|
18258
18234
|
|
|
18259
18235
|
// node_modules/preact/compat/dist/compat.module.js
|
|
18260
|
-
function g3(n3,
|
|
18261
|
-
for (var e4 in
|
|
18236
|
+
function g3(n3, t5) {
|
|
18237
|
+
for (var e4 in t5) n3[e4] = t5[e4];
|
|
18262
18238
|
return n3;
|
|
18263
18239
|
}
|
|
18264
|
-
function E2(n3,
|
|
18265
|
-
for (var e4 in n3) if ("__source" !== e4 && !(e4 in
|
|
18266
|
-
for (var r4 in
|
|
18240
|
+
function E2(n3, t5) {
|
|
18241
|
+
for (var e4 in n3) if ("__source" !== e4 && !(e4 in t5)) return true;
|
|
18242
|
+
for (var r4 in t5) if ("__source" !== r4 && n3[r4] !== t5[r4]) return true;
|
|
18267
18243
|
return false;
|
|
18268
18244
|
}
|
|
18269
|
-
function N2(n3,
|
|
18270
|
-
this.props = n3, this.context =
|
|
18245
|
+
function N2(n3, t5) {
|
|
18246
|
+
this.props = n3, this.context = t5;
|
|
18271
18247
|
}
|
|
18272
|
-
(N2.prototype = new x()).isPureReactComponent = true, N2.prototype.shouldComponentUpdate = function(n3,
|
|
18273
|
-
return E2(this.props, n3) || E2(this.state,
|
|
18248
|
+
(N2.prototype = new x()).isPureReactComponent = true, N2.prototype.shouldComponentUpdate = function(n3, t5) {
|
|
18249
|
+
return E2(this.props, n3) || E2(this.state, t5);
|
|
18274
18250
|
};
|
|
18275
18251
|
var T3 = l.__b;
|
|
18276
18252
|
l.__b = function(n3) {
|
|
@@ -18278,40 +18254,40 @@ ${text2}</tr>
|
|
|
18278
18254
|
};
|
|
18279
18255
|
var A3 = "undefined" != typeof Symbol && Symbol.for && /* @__PURE__ */ Symbol.for("react.forward_ref") || 3911;
|
|
18280
18256
|
var F3 = l.__e;
|
|
18281
|
-
l.__e = function(n3,
|
|
18257
|
+
l.__e = function(n3, t5, e4, r4) {
|
|
18282
18258
|
if (n3.then) {
|
|
18283
|
-
for (var u5, o4 =
|
|
18259
|
+
for (var u5, o4 = t5; o4 = o4.__; ) if ((u5 = o4.__c) && u5.__c) return null == t5.__e && (t5.__e = e4.__e, t5.__k = e4.__k), u5.__c(n3, t5);
|
|
18284
18260
|
}
|
|
18285
|
-
F3(n3,
|
|
18261
|
+
F3(n3, t5, e4, r4);
|
|
18286
18262
|
};
|
|
18287
18263
|
var U = l.unmount;
|
|
18288
|
-
function V2(n3,
|
|
18264
|
+
function V2(n3, t5, e4) {
|
|
18289
18265
|
return n3 && (n3.__c && n3.__c.__H && (n3.__c.__H.__.forEach(function(n4) {
|
|
18290
18266
|
"function" == typeof n4.__c && n4.__c();
|
|
18291
|
-
}), n3.__c.__H = null), null != (n3 = g3({}, n3)).__c && (n3.__c.__P === e4 && (n3.__c.__P =
|
|
18292
|
-
return V2(n4,
|
|
18267
|
+
}), n3.__c.__H = null), null != (n3 = g3({}, n3)).__c && (n3.__c.__P === e4 && (n3.__c.__P = t5), n3.__c.__e = true, n3.__c = null), n3.__k = n3.__k && n3.__k.map(function(n4) {
|
|
18268
|
+
return V2(n4, t5, e4);
|
|
18293
18269
|
})), n3;
|
|
18294
18270
|
}
|
|
18295
|
-
function W(n3,
|
|
18271
|
+
function W(n3, t5, e4) {
|
|
18296
18272
|
return n3 && e4 && (n3.__v = null, n3.__k = n3.__k && n3.__k.map(function(n4) {
|
|
18297
|
-
return W(n4,
|
|
18298
|
-
}), n3.__c && n3.__c.__P ===
|
|
18273
|
+
return W(n4, t5, e4);
|
|
18274
|
+
}), n3.__c && n3.__c.__P === t5 && (n3.__e && e4.appendChild(n3.__e), n3.__c.__e = true, n3.__c.__P = e4)), n3;
|
|
18299
18275
|
}
|
|
18300
18276
|
function P3() {
|
|
18301
18277
|
this.__u = 0, this.o = null, this.__b = null;
|
|
18302
18278
|
}
|
|
18303
18279
|
function j3(n3) {
|
|
18304
|
-
var
|
|
18305
|
-
return
|
|
18280
|
+
var t5 = n3.__.__c;
|
|
18281
|
+
return t5 && t5.__a && t5.__a(n3);
|
|
18306
18282
|
}
|
|
18307
18283
|
function B3() {
|
|
18308
18284
|
this.i = null, this.l = null;
|
|
18309
18285
|
}
|
|
18310
18286
|
l.unmount = function(n3) {
|
|
18311
|
-
var
|
|
18312
|
-
|
|
18313
|
-
}, (P3.prototype = new x()).__c = function(n3,
|
|
18314
|
-
var e4 =
|
|
18287
|
+
var t5 = n3.__c;
|
|
18288
|
+
t5 && t5.__R && t5.__R(), t5 && 32 & n3.__u && (n3.type = null), U && U(n3);
|
|
18289
|
+
}, (P3.prototype = new x()).__c = function(n3, t5) {
|
|
18290
|
+
var e4 = t5.__c, r4 = this;
|
|
18315
18291
|
null == r4.o && (r4.o = []), r4.o.push(e4);
|
|
18316
18292
|
var u5 = j3(r4.__v), o4 = false, i4 = function() {
|
|
18317
18293
|
o4 || (o4 = true, e4.__R = null, u5 ? u5(l4) : l4());
|
|
@@ -18323,11 +18299,11 @@ ${text2}</tr>
|
|
|
18323
18299
|
var n4 = r4.state.__a;
|
|
18324
18300
|
r4.__v.__k[0] = W(n4, n4.__c.__P, n4.__c.__O);
|
|
18325
18301
|
}
|
|
18326
|
-
var
|
|
18327
|
-
for (r4.setState({ __a: r4.__b = null });
|
|
18302
|
+
var t6;
|
|
18303
|
+
for (r4.setState({ __a: r4.__b = null }); t6 = r4.o.pop(); ) t6.forceUpdate();
|
|
18328
18304
|
}
|
|
18329
18305
|
};
|
|
18330
|
-
r4.__u++ || 32 &
|
|
18306
|
+
r4.__u++ || 32 & t5.__u || r4.setState({ __a: r4.__b = r4.__v.__k[0] }), n3.then(i4, i4);
|
|
18331
18307
|
}, P3.prototype.componentWillUnmount = function() {
|
|
18332
18308
|
this.o = [];
|
|
18333
18309
|
}, P3.prototype.render = function(n3, e4) {
|
|
@@ -18341,31 +18317,31 @@ ${text2}</tr>
|
|
|
18341
18317
|
var i4 = e4.__a && _(k, null, n3.fallback);
|
|
18342
18318
|
return i4 && (i4.__u &= -33), [_(k, null, e4.__a ? null : n3.children), i4];
|
|
18343
18319
|
};
|
|
18344
|
-
var H2 = function(n3,
|
|
18345
|
-
if (++e4[1] === e4[0] && n3.l.delete(
|
|
18320
|
+
var H2 = function(n3, t5, e4) {
|
|
18321
|
+
if (++e4[1] === e4[0] && n3.l.delete(t5), n3.props.revealOrder && ("t" !== n3.props.revealOrder[0] || !n3.l.size)) for (e4 = n3.i; e4; ) {
|
|
18346
18322
|
for (; e4.length > 3; ) e4.pop()();
|
|
18347
18323
|
if (e4[1] < e4[0]) break;
|
|
18348
18324
|
n3.i = e4 = e4[2];
|
|
18349
18325
|
}
|
|
18350
18326
|
};
|
|
18351
18327
|
(B3.prototype = new x()).__a = function(n3) {
|
|
18352
|
-
var
|
|
18328
|
+
var t5 = this, e4 = j3(t5.__v), r4 = t5.l.get(n3);
|
|
18353
18329
|
return r4[0]++, function(u5) {
|
|
18354
18330
|
var o4 = function() {
|
|
18355
|
-
|
|
18331
|
+
t5.props.revealOrder ? (r4.push(u5), H2(t5, n3, r4)) : u5();
|
|
18356
18332
|
};
|
|
18357
18333
|
e4 ? e4(o4) : o4();
|
|
18358
18334
|
};
|
|
18359
18335
|
}, B3.prototype.render = function(n3) {
|
|
18360
18336
|
this.i = null, this.l = /* @__PURE__ */ new Map();
|
|
18361
|
-
var
|
|
18362
|
-
n3.revealOrder && "b" === n3.revealOrder[0] &&
|
|
18363
|
-
for (var e4 =
|
|
18337
|
+
var t5 = H(n3.children);
|
|
18338
|
+
n3.revealOrder && "b" === n3.revealOrder[0] && t5.reverse();
|
|
18339
|
+
for (var e4 = t5.length; e4--; ) this.l.set(t5[e4], this.i = [1, 0, this.i]);
|
|
18364
18340
|
return n3.children;
|
|
18365
18341
|
}, B3.prototype.componentDidUpdate = B3.prototype.componentDidMount = function() {
|
|
18366
18342
|
var n3 = this;
|
|
18367
|
-
this.l.forEach(function(
|
|
18368
|
-
H2(n3, e4,
|
|
18343
|
+
this.l.forEach(function(t5, e4) {
|
|
18344
|
+
H2(n3, e4, t5);
|
|
18369
18345
|
});
|
|
18370
18346
|
};
|
|
18371
18347
|
var q3 = "undefined" != typeof Symbol && Symbol.for && /* @__PURE__ */ Symbol.for("react.element") || 60103;
|
|
@@ -18376,14 +18352,14 @@ ${text2}</tr>
|
|
|
18376
18352
|
var X = function(n3) {
|
|
18377
18353
|
return ("undefined" != typeof Symbol && "symbol" == typeof /* @__PURE__ */ Symbol() ? /fil|che|rad/ : /fil|che|ra/).test(n3);
|
|
18378
18354
|
};
|
|
18379
|
-
function nn(n3,
|
|
18380
|
-
return null ==
|
|
18355
|
+
function nn(n3, t5, e4) {
|
|
18356
|
+
return null == t5.__k && (t5.textContent = ""), G(n3, t5), "function" == typeof e4 && e4(), n3 ? n3.__c : null;
|
|
18381
18357
|
}
|
|
18382
|
-
x.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(
|
|
18383
|
-
Object.defineProperty(x.prototype,
|
|
18384
|
-
return this["UNSAFE_" +
|
|
18358
|
+
x.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(t5) {
|
|
18359
|
+
Object.defineProperty(x.prototype, t5, { configurable: true, get: function() {
|
|
18360
|
+
return this["UNSAFE_" + t5];
|
|
18385
18361
|
}, set: function(n3) {
|
|
18386
|
-
Object.defineProperty(this,
|
|
18362
|
+
Object.defineProperty(this, t5, { configurable: true, writable: true, value: n3 });
|
|
18387
18363
|
} });
|
|
18388
18364
|
});
|
|
18389
18365
|
var en = l.event;
|
|
@@ -18405,19 +18381,19 @@ ${text2}</tr>
|
|
|
18405
18381
|
var fn2 = l.vnode;
|
|
18406
18382
|
l.vnode = function(n3) {
|
|
18407
18383
|
"string" == typeof n3.type && (function(n4) {
|
|
18408
|
-
var
|
|
18409
|
-
for (var i4 in
|
|
18410
|
-
var l4 =
|
|
18411
|
-
if (!("value" === i4 && "defaultValue" in
|
|
18384
|
+
var t5 = n4.props, e4 = n4.type, u5 = {}, o4 = -1 === e4.indexOf("-");
|
|
18385
|
+
for (var i4 in t5) {
|
|
18386
|
+
var l4 = t5[i4];
|
|
18387
|
+
if (!("value" === i4 && "defaultValue" in t5 && null == l4 || Q2 && "children" === i4 && "noscript" === e4 || "class" === i4 || "className" === i4)) {
|
|
18412
18388
|
var c4 = i4.toLowerCase();
|
|
18413
|
-
"defaultValue" === i4 && "value" in
|
|
18389
|
+
"defaultValue" === i4 && "value" in t5 && null == t5.value ? i4 = "value" : "download" === i4 && true === l4 ? l4 = "" : "translate" === c4 && "no" === l4 ? l4 = false : "o" === c4[0] && "n" === c4[1] ? "ondoubleclick" === c4 ? i4 = "ondblclick" : "onchange" !== c4 || "input" !== e4 && "textarea" !== e4 || X(t5.type) ? "onfocus" === c4 ? i4 = "onfocusin" : "onblur" === c4 ? i4 = "onfocusout" : J2.test(i4) && (i4 = c4) : c4 = i4 = "oninput" : o4 && G2.test(i4) ? i4 = i4.replace(K2, "-$&").toLowerCase() : null === l4 && (l4 = void 0), "oninput" === c4 && u5[i4 = c4] && (i4 = "oninputCapture"), u5[i4] = l4;
|
|
18414
18390
|
}
|
|
18415
18391
|
}
|
|
18416
|
-
"select" == e4 && u5.multiple && Array.isArray(u5.value) && (u5.value = H(
|
|
18392
|
+
"select" == e4 && u5.multiple && Array.isArray(u5.value) && (u5.value = H(t5.children).forEach(function(n5) {
|
|
18417
18393
|
n5.props.selected = -1 != u5.value.indexOf(n5.props.value);
|
|
18418
|
-
})), "select" == e4 && null != u5.defaultValue && (u5.value = H(
|
|
18394
|
+
})), "select" == e4 && null != u5.defaultValue && (u5.value = H(t5.children).forEach(function(n5) {
|
|
18419
18395
|
n5.props.selected = u5.multiple ? -1 != u5.defaultValue.indexOf(n5.props.value) : u5.defaultValue == n5.props.value;
|
|
18420
|
-
})),
|
|
18396
|
+
})), t5.class && !t5.className ? (u5.class = t5.class, Object.defineProperty(u5, "className", cn)) : (t5.className && !t5.class || t5.class && t5.className) && (u5.class = u5.className = t5.className), n4.props = u5;
|
|
18421
18397
|
})(n3), n3.$$typeof = q3, fn2 && fn2(n3);
|
|
18422
18398
|
};
|
|
18423
18399
|
var an = l.__r;
|
|
@@ -18427,8 +18403,8 @@ ${text2}</tr>
|
|
|
18427
18403
|
var sn = l.diffed;
|
|
18428
18404
|
l.diffed = function(n3) {
|
|
18429
18405
|
sn && sn(n3);
|
|
18430
|
-
var
|
|
18431
|
-
null != e4 && "textarea" === n3.type && "value" in
|
|
18406
|
+
var t5 = n3.props, e4 = n3.__e;
|
|
18407
|
+
null != e4 && "textarea" === n3.type && "value" in t5 && t5.value !== e4.value && (e4.value = null == t5.value ? "" : t5.value), ln = null;
|
|
18432
18408
|
};
|
|
18433
18409
|
|
|
18434
18410
|
// node_modules/@uppy/core/lib/UIPlugin.js
|
|
@@ -20421,10 +20397,10 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
20421
20397
|
|
|
20422
20398
|
// node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js
|
|
20423
20399
|
var f3 = 0;
|
|
20424
|
-
function u3(e4,
|
|
20425
|
-
|
|
20426
|
-
var a4, c4, p4 =
|
|
20427
|
-
if ("ref" in p4) for (c4 in p4 = {},
|
|
20400
|
+
function u3(e4, t5, n3, o4, i4, u5) {
|
|
20401
|
+
t5 || (t5 = {});
|
|
20402
|
+
var a4, c4, p4 = t5;
|
|
20403
|
+
if ("ref" in p4) for (c4 in p4 = {}, t5) "ref" == c4 ? a4 = t5[c4] : p4[c4] = t5[c4];
|
|
20428
20404
|
var l4 = { type: e4, props: p4, key: n3, ref: a4, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --f3, __i: -1, __u: 0, __source: i4, __self: u5 };
|
|
20429
20405
|
if ("function" == typeof e4 && (a4 = e4.defaultProps)) for (c4 in a4) void 0 === p4[c4] && (p4[c4] = a4[c4]);
|
|
20430
20406
|
return l.vnode && l.vnode(l4), l4;
|
|
@@ -22939,49 +22915,49 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
22939
22915
|
}
|
|
22940
22916
|
|
|
22941
22917
|
// node_modules/exifr/dist/mini.esm.mjs
|
|
22942
|
-
function e3(e4,
|
|
22943
|
-
return
|
|
22918
|
+
function e3(e4, t5, s4) {
|
|
22919
|
+
return t5 in e4 ? Object.defineProperty(e4, t5, { value: s4, enumerable: true, configurable: true, writable: true }) : e4[t5] = s4, e4;
|
|
22944
22920
|
}
|
|
22945
|
-
var
|
|
22921
|
+
var t4 = "undefined" != typeof self ? self : global;
|
|
22946
22922
|
var s3 = "undefined" != typeof navigator;
|
|
22947
22923
|
var i3 = s3 && "undefined" == typeof HTMLImageElement;
|
|
22948
22924
|
var n2 = !("undefined" == typeof global || "undefined" == typeof process || !process.versions || !process.versions.node);
|
|
22949
|
-
var r3 =
|
|
22925
|
+
var r3 = t4.Buffer;
|
|
22950
22926
|
var a3 = !!r3;
|
|
22951
22927
|
var h3 = (e4) => void 0 !== e4;
|
|
22952
22928
|
function f4(e4) {
|
|
22953
22929
|
return void 0 === e4 || (e4 instanceof Map ? 0 === e4.size : 0 === Object.values(e4).filter(h3).length);
|
|
22954
22930
|
}
|
|
22955
22931
|
function l3(e4) {
|
|
22956
|
-
let
|
|
22957
|
-
throw delete
|
|
22932
|
+
let t5 = new Error(e4);
|
|
22933
|
+
throw delete t5.stack, t5;
|
|
22958
22934
|
}
|
|
22959
22935
|
function o3(e4) {
|
|
22960
|
-
let
|
|
22961
|
-
let
|
|
22962
|
-
return e5.ifd0.enabled && (
|
|
22936
|
+
let t5 = (function(e5) {
|
|
22937
|
+
let t6 = 0;
|
|
22938
|
+
return e5.ifd0.enabled && (t6 += 1024), e5.exif.enabled && (t6 += 2048), e5.makerNote && (t6 += 2048), e5.userComment && (t6 += 1024), e5.gps.enabled && (t6 += 512), e5.interop.enabled && (t6 += 100), e5.ifd1.enabled && (t6 += 1024), t6 + 2048;
|
|
22963
22939
|
})(e4);
|
|
22964
|
-
return e4.jfif.enabled && (
|
|
22940
|
+
return e4.jfif.enabled && (t5 += 50), e4.xmp.enabled && (t5 += 2e4), e4.iptc.enabled && (t5 += 14e3), e4.icc.enabled && (t5 += 6e3), t5;
|
|
22965
22941
|
}
|
|
22966
22942
|
var u4 = (e4) => String.fromCharCode.apply(null, e4);
|
|
22967
22943
|
var d3 = "undefined" != typeof TextDecoder ? new TextDecoder("utf-8") : void 0;
|
|
22968
22944
|
var c3 = class _c {
|
|
22969
|
-
static from(e4,
|
|
22970
|
-
return e4 instanceof this && e4.le ===
|
|
22945
|
+
static from(e4, t5) {
|
|
22946
|
+
return e4 instanceof this && e4.le === t5 ? e4 : new _c(e4, void 0, void 0, t5);
|
|
22971
22947
|
}
|
|
22972
|
-
constructor(e4,
|
|
22948
|
+
constructor(e4, t5 = 0, s4, i4) {
|
|
22973
22949
|
if ("boolean" == typeof i4 && (this.le = i4), Array.isArray(e4) && (e4 = new Uint8Array(e4)), 0 === e4) this.byteOffset = 0, this.byteLength = 0;
|
|
22974
22950
|
else if (e4 instanceof ArrayBuffer) {
|
|
22975
|
-
void 0 === s4 && (s4 = e4.byteLength -
|
|
22976
|
-
let i5 = new DataView(e4,
|
|
22951
|
+
void 0 === s4 && (s4 = e4.byteLength - t5);
|
|
22952
|
+
let i5 = new DataView(e4, t5, s4);
|
|
22977
22953
|
this._swapDataView(i5);
|
|
22978
22954
|
} else if (e4 instanceof Uint8Array || e4 instanceof DataView || e4 instanceof _c) {
|
|
22979
|
-
void 0 === s4 && (s4 = e4.byteLength -
|
|
22980
|
-
let i5 = new DataView(e4.buffer,
|
|
22955
|
+
void 0 === s4 && (s4 = e4.byteLength - t5), (t5 += e4.byteOffset) + s4 > e4.byteOffset + e4.byteLength && l3("Creating view outside of available memory in ArrayBuffer");
|
|
22956
|
+
let i5 = new DataView(e4.buffer, t5, s4);
|
|
22981
22957
|
this._swapDataView(i5);
|
|
22982
22958
|
} else if ("number" == typeof e4) {
|
|
22983
|
-
let
|
|
22984
|
-
this._swapDataView(
|
|
22959
|
+
let t6 = new DataView(new ArrayBuffer(e4));
|
|
22960
|
+
this._swapDataView(t6);
|
|
22985
22961
|
} else l3("Invalid input argument for BufferView: " + e4);
|
|
22986
22962
|
}
|
|
22987
22963
|
_swapArrayBuffer(e4) {
|
|
@@ -22996,30 +22972,30 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
22996
22972
|
_lengthToEnd(e4) {
|
|
22997
22973
|
return this.byteLength - e4;
|
|
22998
22974
|
}
|
|
22999
|
-
set(e4,
|
|
23000
|
-
return e4 instanceof DataView || e4 instanceof _c ? e4 = new Uint8Array(e4.buffer, e4.byteOffset, e4.byteLength) : e4 instanceof ArrayBuffer && (e4 = new Uint8Array(e4)), e4 instanceof Uint8Array || l3("BufferView.set(): Invalid data argument."), this.toUint8().set(e4,
|
|
22975
|
+
set(e4, t5, s4 = _c) {
|
|
22976
|
+
return e4 instanceof DataView || e4 instanceof _c ? e4 = new Uint8Array(e4.buffer, e4.byteOffset, e4.byteLength) : e4 instanceof ArrayBuffer && (e4 = new Uint8Array(e4)), e4 instanceof Uint8Array || l3("BufferView.set(): Invalid data argument."), this.toUint8().set(e4, t5), new s4(this, t5, e4.byteLength);
|
|
23001
22977
|
}
|
|
23002
|
-
subarray(e4,
|
|
23003
|
-
return
|
|
22978
|
+
subarray(e4, t5) {
|
|
22979
|
+
return t5 = t5 || this._lengthToEnd(e4), new _c(this, e4, t5);
|
|
23004
22980
|
}
|
|
23005
22981
|
toUint8() {
|
|
23006
22982
|
return new Uint8Array(this.buffer, this.byteOffset, this.byteLength);
|
|
23007
22983
|
}
|
|
23008
|
-
getUint8Array(e4,
|
|
23009
|
-
return new Uint8Array(this.buffer, this.byteOffset + e4,
|
|
22984
|
+
getUint8Array(e4, t5) {
|
|
22985
|
+
return new Uint8Array(this.buffer, this.byteOffset + e4, t5);
|
|
23010
22986
|
}
|
|
23011
|
-
getString(e4 = 0,
|
|
23012
|
-
let s4 = this.getUint8Array(e4,
|
|
22987
|
+
getString(e4 = 0, t5 = this.byteLength) {
|
|
22988
|
+
let s4 = this.getUint8Array(e4, t5);
|
|
23013
22989
|
return i4 = s4, d3 ? d3.decode(i4) : a3 ? Buffer.from(i4).toString("utf8") : decodeURIComponent(escape(u4(i4)));
|
|
23014
22990
|
var i4;
|
|
23015
22991
|
}
|
|
23016
|
-
getLatin1String(e4 = 0,
|
|
23017
|
-
let s4 = this.getUint8Array(e4,
|
|
22992
|
+
getLatin1String(e4 = 0, t5 = this.byteLength) {
|
|
22993
|
+
let s4 = this.getUint8Array(e4, t5);
|
|
23018
22994
|
return u4(s4);
|
|
23019
22995
|
}
|
|
23020
|
-
getUnicodeString(e4 = 0,
|
|
22996
|
+
getUnicodeString(e4 = 0, t5 = this.byteLength) {
|
|
23021
22997
|
const s4 = [];
|
|
23022
|
-
for (let i4 = 0; i4 <
|
|
22998
|
+
for (let i4 = 0; i4 < t5 && e4 + i4 < this.byteLength; i4 += 2) s4.push(this.getUint16(e4 + i4));
|
|
23023
22999
|
return u4(s4);
|
|
23024
23000
|
}
|
|
23025
23001
|
getInt8(e4) {
|
|
@@ -23028,32 +23004,32 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
23028
23004
|
getUint8(e4) {
|
|
23029
23005
|
return this.dataView.getUint8(e4);
|
|
23030
23006
|
}
|
|
23031
|
-
getInt16(e4,
|
|
23032
|
-
return this.dataView.getInt16(e4,
|
|
23007
|
+
getInt16(e4, t5 = this.le) {
|
|
23008
|
+
return this.dataView.getInt16(e4, t5);
|
|
23033
23009
|
}
|
|
23034
|
-
getInt32(e4,
|
|
23035
|
-
return this.dataView.getInt32(e4,
|
|
23010
|
+
getInt32(e4, t5 = this.le) {
|
|
23011
|
+
return this.dataView.getInt32(e4, t5);
|
|
23036
23012
|
}
|
|
23037
|
-
getUint16(e4,
|
|
23038
|
-
return this.dataView.getUint16(e4,
|
|
23013
|
+
getUint16(e4, t5 = this.le) {
|
|
23014
|
+
return this.dataView.getUint16(e4, t5);
|
|
23039
23015
|
}
|
|
23040
|
-
getUint32(e4,
|
|
23041
|
-
return this.dataView.getUint32(e4,
|
|
23016
|
+
getUint32(e4, t5 = this.le) {
|
|
23017
|
+
return this.dataView.getUint32(e4, t5);
|
|
23042
23018
|
}
|
|
23043
|
-
getFloat32(e4,
|
|
23044
|
-
return this.dataView.getFloat32(e4,
|
|
23019
|
+
getFloat32(e4, t5 = this.le) {
|
|
23020
|
+
return this.dataView.getFloat32(e4, t5);
|
|
23045
23021
|
}
|
|
23046
|
-
getFloat64(e4,
|
|
23047
|
-
return this.dataView.getFloat64(e4,
|
|
23022
|
+
getFloat64(e4, t5 = this.le) {
|
|
23023
|
+
return this.dataView.getFloat64(e4, t5);
|
|
23048
23024
|
}
|
|
23049
|
-
getFloat(e4,
|
|
23050
|
-
return this.dataView.getFloat32(e4,
|
|
23025
|
+
getFloat(e4, t5 = this.le) {
|
|
23026
|
+
return this.dataView.getFloat32(e4, t5);
|
|
23051
23027
|
}
|
|
23052
|
-
getDouble(e4,
|
|
23053
|
-
return this.dataView.getFloat64(e4,
|
|
23028
|
+
getDouble(e4, t5 = this.le) {
|
|
23029
|
+
return this.dataView.getFloat64(e4, t5);
|
|
23054
23030
|
}
|
|
23055
|
-
getUintBytes(e4,
|
|
23056
|
-
switch (
|
|
23031
|
+
getUintBytes(e4, t5, s4) {
|
|
23032
|
+
switch (t5) {
|
|
23057
23033
|
case 1:
|
|
23058
23034
|
return this.getUint8(e4, s4);
|
|
23059
23035
|
case 2:
|
|
@@ -23064,8 +23040,8 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
23064
23040
|
return this.getUint64 && this.getUint64(e4, s4);
|
|
23065
23041
|
}
|
|
23066
23042
|
}
|
|
23067
|
-
getUint(e4,
|
|
23068
|
-
switch (
|
|
23043
|
+
getUint(e4, t5, s4) {
|
|
23044
|
+
switch (t5) {
|
|
23069
23045
|
case 8:
|
|
23070
23046
|
return this.getUint8(e4, s4);
|
|
23071
23047
|
case 16:
|
|
@@ -23082,17 +23058,17 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
23082
23058
|
ensureChunk() {
|
|
23083
23059
|
}
|
|
23084
23060
|
};
|
|
23085
|
-
function p3(e4,
|
|
23086
|
-
l3(`${e4} '${
|
|
23061
|
+
function p3(e4, t5) {
|
|
23062
|
+
l3(`${e4} '${t5}' was not loaded, try using full build of exifr.`);
|
|
23087
23063
|
}
|
|
23088
23064
|
var g4 = class extends Map {
|
|
23089
23065
|
constructor(e4) {
|
|
23090
23066
|
super(), this.kind = e4;
|
|
23091
23067
|
}
|
|
23092
|
-
get(e4,
|
|
23093
|
-
return this.has(e4) || p3(this.kind, e4),
|
|
23094
|
-
l3(`Unknown ${e5} '${
|
|
23095
|
-
})(this.kind, e4),
|
|
23068
|
+
get(e4, t5) {
|
|
23069
|
+
return this.has(e4) || p3(this.kind, e4), t5 && (e4 in t5 || (function(e5, t6) {
|
|
23070
|
+
l3(`Unknown ${e5} '${t6}'.`);
|
|
23071
|
+
})(this.kind, e4), t5[e4].enabled || p3(this.kind, e4)), super.get(e4);
|
|
23096
23072
|
}
|
|
23097
23073
|
keyList() {
|
|
23098
23074
|
return Array.from(this.keys());
|
|
@@ -23101,25 +23077,25 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
23101
23077
|
var m3 = new g4("file parser");
|
|
23102
23078
|
var y3 = new g4("segment parser");
|
|
23103
23079
|
var b2 = new g4("file reader");
|
|
23104
|
-
var w3 =
|
|
23105
|
-
function k3(e4,
|
|
23106
|
-
return (i4 = e4).startsWith("data:") || i4.length > 1e4 ? v3(e4,
|
|
23080
|
+
var w3 = t4.fetch;
|
|
23081
|
+
function k3(e4, t5) {
|
|
23082
|
+
return (i4 = e4).startsWith("data:") || i4.length > 1e4 ? v3(e4, t5, "base64") : n2 && e4.includes("://") ? O2(e4, t5, "url", S2) : n2 ? v3(e4, t5, "fs") : s3 ? O2(e4, t5, "url", S2) : void l3("Invalid input argument");
|
|
23107
23083
|
var i4;
|
|
23108
23084
|
}
|
|
23109
|
-
async function O2(e4,
|
|
23110
|
-
return b2.has(s4) ? v3(e4,
|
|
23111
|
-
let s5 = await
|
|
23085
|
+
async function O2(e4, t5, s4, i4) {
|
|
23086
|
+
return b2.has(s4) ? v3(e4, t5, s4) : i4 ? (async function(e5, t6) {
|
|
23087
|
+
let s5 = await t6(e5);
|
|
23112
23088
|
return new c3(s5);
|
|
23113
23089
|
})(e4, i4) : void l3(`Parser ${s4} is not loaded`);
|
|
23114
23090
|
}
|
|
23115
|
-
async function v3(e4,
|
|
23116
|
-
let i4 = new (b2.get(s4))(e4,
|
|
23091
|
+
async function v3(e4, t5, s4) {
|
|
23092
|
+
let i4 = new (b2.get(s4))(e4, t5);
|
|
23117
23093
|
return await i4.read(), i4;
|
|
23118
23094
|
}
|
|
23119
23095
|
var S2 = (e4) => w3(e4).then(((e5) => e5.arrayBuffer()));
|
|
23120
|
-
var A4 = (e4) => new Promise(((
|
|
23096
|
+
var A4 = (e4) => new Promise(((t5, s4) => {
|
|
23121
23097
|
let i4 = new FileReader();
|
|
23122
|
-
i4.onloadend = () =>
|
|
23098
|
+
i4.onloadend = () => t5(i4.result || new ArrayBuffer()), i4.onerror = s4, i4.readAsArrayBuffer(e4);
|
|
23123
23099
|
}));
|
|
23124
23100
|
var U2 = class extends Map {
|
|
23125
23101
|
get tagKeys() {
|
|
@@ -23129,15 +23105,15 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
23129
23105
|
return this.allValues || (this.allValues = Array.from(this.values())), this.allValues;
|
|
23130
23106
|
}
|
|
23131
23107
|
};
|
|
23132
|
-
function x3(e4,
|
|
23108
|
+
function x3(e4, t5, s4) {
|
|
23133
23109
|
let i4 = new U2();
|
|
23134
|
-
for (let [e5,
|
|
23135
|
-
if (Array.isArray(
|
|
23136
|
-
else e4.set(
|
|
23110
|
+
for (let [e5, t6] of s4) i4.set(e5, t6);
|
|
23111
|
+
if (Array.isArray(t5)) for (let s5 of t5) e4.set(s5, i4);
|
|
23112
|
+
else e4.set(t5, i4);
|
|
23137
23113
|
return i4;
|
|
23138
23114
|
}
|
|
23139
|
-
function C3(e4,
|
|
23140
|
-
let i4, n3 = e4.get(
|
|
23115
|
+
function C3(e4, t5, s4) {
|
|
23116
|
+
let i4, n3 = e4.get(t5);
|
|
23141
23117
|
for (i4 of s4) n3.set(i4[0], i4[1]);
|
|
23142
23118
|
}
|
|
23143
23119
|
var B4 = /* @__PURE__ */ new Map();
|
|
@@ -23160,25 +23136,25 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
23160
23136
|
get needed() {
|
|
23161
23137
|
return this.enabled || this.deps.size > 0;
|
|
23162
23138
|
}
|
|
23163
|
-
constructor(
|
|
23164
|
-
if (super(), e3(this, "enabled", false), e3(this, "skip", /* @__PURE__ */ new Set()), e3(this, "pick", /* @__PURE__ */ new Set()), e3(this, "deps", /* @__PURE__ */ new Set()), e3(this, "translateKeys", false), e3(this, "translateValues", false), e3(this, "reviveValues", false), this.key =
|
|
23139
|
+
constructor(t5, s4, i4, n3) {
|
|
23140
|
+
if (super(), e3(this, "enabled", false), e3(this, "skip", /* @__PURE__ */ new Set()), e3(this, "pick", /* @__PURE__ */ new Set()), e3(this, "deps", /* @__PURE__ */ new Set()), e3(this, "translateKeys", false), e3(this, "translateValues", false), e3(this, "reviveValues", false), this.key = t5, this.enabled = s4, this.parse = this.enabled, this.applyInheritables(n3), this.canBeFiltered = P4.includes(t5), this.canBeFiltered && (this.dict = B4.get(t5)), void 0 !== i4) if (Array.isArray(i4)) this.parse = this.enabled = true, this.canBeFiltered && i4.length > 0 && this.translateTagSet(i4, this.pick);
|
|
23165
23141
|
else if ("object" == typeof i4) {
|
|
23166
23142
|
if (this.enabled = true, this.parse = false !== i4.parse, this.canBeFiltered) {
|
|
23167
|
-
let { pick: e4, skip:
|
|
23168
|
-
e4 && e4.length > 0 && this.translateTagSet(e4, this.pick),
|
|
23143
|
+
let { pick: e4, skip: t6 } = i4;
|
|
23144
|
+
e4 && e4.length > 0 && this.translateTagSet(e4, this.pick), t6 && t6.length > 0 && this.translateTagSet(t6, this.skip);
|
|
23169
23145
|
}
|
|
23170
23146
|
this.applyInheritables(i4);
|
|
23171
23147
|
} else true === i4 || false === i4 ? this.parse = this.enabled = i4 : l3(`Invalid options argument: ${i4}`);
|
|
23172
23148
|
}
|
|
23173
23149
|
applyInheritables(e4) {
|
|
23174
|
-
let
|
|
23175
|
-
for (
|
|
23150
|
+
let t5, s4;
|
|
23151
|
+
for (t5 of E3) s4 = e4[t5], void 0 !== s4 && (this[t5] = s4);
|
|
23176
23152
|
}
|
|
23177
|
-
translateTagSet(e4,
|
|
23153
|
+
translateTagSet(e4, t5) {
|
|
23178
23154
|
if (this.dict) {
|
|
23179
23155
|
let s4, i4, { tagKeys: n3, tagValues: r4 } = this.dict;
|
|
23180
|
-
for (s4 of e4) "string" == typeof s4 ? (i4 = r4.indexOf(s4), -1 === i4 && (i4 = n3.indexOf(Number(s4))), -1 !== i4 &&
|
|
23181
|
-
} else for (let s4 of e4)
|
|
23156
|
+
for (s4 of e4) "string" == typeof s4 ? (i4 = r4.indexOf(s4), -1 === i4 && (i4 = n3.indexOf(Number(s4))), -1 !== i4 && t5.add(Number(n3[i4]))) : t5.add(s4);
|
|
23157
|
+
} else for (let s4 of e4) t5.add(s4);
|
|
23182
23158
|
}
|
|
23183
23159
|
finalizeFilters() {
|
|
23184
23160
|
!this.enabled && this.deps.size > 0 ? (this.enabled = true, X2(this.pick, this.deps)) : this.enabled && this.pick.size > 0 && X2(this.pick, this.deps);
|
|
@@ -23188,8 +23164,8 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
23188
23164
|
var $2 = /* @__PURE__ */ new Map();
|
|
23189
23165
|
var R = class extends _3 {
|
|
23190
23166
|
static useCached(e4) {
|
|
23191
|
-
let
|
|
23192
|
-
return void 0 !==
|
|
23167
|
+
let t5 = $2.get(e4);
|
|
23168
|
+
return void 0 !== t5 || (t5 = new this(e4), $2.set(e4, t5)), t5;
|
|
23193
23169
|
}
|
|
23194
23170
|
constructor(e4) {
|
|
23195
23171
|
super(), true === e4 ? this.setupFromTrue() : void 0 === e4 ? this.setupFromUndefined() : Array.isArray(e4) ? this.setupFromArray(e4) : "object" == typeof e4 ? this.setupFromObject(e4) : l3(`Invalid options argument ${e4}`), void 0 === this.firstChunkSize && (this.firstChunkSize = s3 ? this.firstChunkSizeBrowser : this.firstChunkSizeNode), this.mergeOutput && (this.ifd1.enabled = false), this.filterNestedSegmentTags(), this.traverseTiffDependencyTree(), this.checkLoadedPlugins();
|
|
@@ -23209,48 +23185,48 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
23209
23185
|
for (e4 of F4) this[e4] = new D3(e4, true, void 0, this);
|
|
23210
23186
|
}
|
|
23211
23187
|
setupFromArray(e4) {
|
|
23212
|
-
let
|
|
23213
|
-
for (
|
|
23214
|
-
for (
|
|
23215
|
-
for (
|
|
23216
|
-
for (
|
|
23188
|
+
let t5;
|
|
23189
|
+
for (t5 of L2) this[t5] = N3[t5];
|
|
23190
|
+
for (t5 of M2) this[t5] = N3[t5];
|
|
23191
|
+
for (t5 of j4) this[t5] = N3[t5];
|
|
23192
|
+
for (t5 of F4) this[t5] = new D3(t5, false, void 0, this);
|
|
23217
23193
|
this.setupGlobalFilters(e4, void 0, P4);
|
|
23218
23194
|
}
|
|
23219
23195
|
setupFromObject(e4) {
|
|
23220
|
-
let
|
|
23221
|
-
for (
|
|
23222
|
-
for (
|
|
23223
|
-
for (
|
|
23224
|
-
for (
|
|
23225
|
-
for (
|
|
23196
|
+
let t5;
|
|
23197
|
+
for (t5 of (P4.ifd0 = P4.ifd0 || P4.image, P4.ifd1 = P4.ifd1 || P4.thumbnail, Object.assign(this, e4), L2)) this[t5] = W2(e4[t5], N3[t5]);
|
|
23198
|
+
for (t5 of M2) this[t5] = W2(e4[t5], N3[t5]);
|
|
23199
|
+
for (t5 of j4) this[t5] = W2(e4[t5], N3[t5]);
|
|
23200
|
+
for (t5 of z3) this[t5] = new D3(t5, N3[t5], e4[t5], this);
|
|
23201
|
+
for (t5 of P4) this[t5] = new D3(t5, N3[t5], e4[t5], this.tiff);
|
|
23226
23202
|
this.setupGlobalFilters(e4.pick, e4.skip, P4, F4), true === e4.tiff ? this.batchEnableWithBool(P4, true) : false === e4.tiff ? this.batchEnableWithUserValue(P4, e4) : Array.isArray(e4.tiff) ? this.setupGlobalFilters(e4.tiff, void 0, P4) : "object" == typeof e4.tiff && this.setupGlobalFilters(e4.tiff.pick, e4.tiff.skip, P4);
|
|
23227
23203
|
}
|
|
23228
|
-
batchEnableWithBool(e4,
|
|
23229
|
-
for (let s4 of e4) this[s4].enabled =
|
|
23204
|
+
batchEnableWithBool(e4, t5) {
|
|
23205
|
+
for (let s4 of e4) this[s4].enabled = t5;
|
|
23230
23206
|
}
|
|
23231
|
-
batchEnableWithUserValue(e4,
|
|
23207
|
+
batchEnableWithUserValue(e4, t5) {
|
|
23232
23208
|
for (let s4 of e4) {
|
|
23233
|
-
let e5 =
|
|
23209
|
+
let e5 = t5[s4];
|
|
23234
23210
|
this[s4].enabled = false !== e5 && void 0 !== e5;
|
|
23235
23211
|
}
|
|
23236
23212
|
}
|
|
23237
|
-
setupGlobalFilters(e4,
|
|
23213
|
+
setupGlobalFilters(e4, t5, s4, i4 = s4) {
|
|
23238
23214
|
if (e4 && e4.length) {
|
|
23239
23215
|
for (let e5 of i4) this[e5].enabled = false;
|
|
23240
|
-
let
|
|
23241
|
-
for (let [e5, s5] of
|
|
23242
|
-
} else if (
|
|
23243
|
-
let e5 = K3(
|
|
23244
|
-
for (let [
|
|
23216
|
+
let t6 = K3(e4, s4);
|
|
23217
|
+
for (let [e5, s5] of t6) X2(this[e5].pick, s5), this[e5].enabled = true;
|
|
23218
|
+
} else if (t5 && t5.length) {
|
|
23219
|
+
let e5 = K3(t5, s4);
|
|
23220
|
+
for (let [t6, s5] of e5) X2(this[t6].skip, s5);
|
|
23245
23221
|
}
|
|
23246
23222
|
}
|
|
23247
23223
|
filterNestedSegmentTags() {
|
|
23248
|
-
let { ifd0: e4, exif:
|
|
23249
|
-
this.makerNote ?
|
|
23224
|
+
let { ifd0: e4, exif: t5, xmp: s4, iptc: i4, icc: n3 } = this;
|
|
23225
|
+
this.makerNote ? t5.deps.add(37500) : t5.skip.add(37500), this.userComment ? t5.deps.add(37510) : t5.skip.add(37510), s4.enabled || e4.skip.add(700), i4.enabled || e4.skip.add(33723), n3.enabled || e4.skip.add(34675);
|
|
23250
23226
|
}
|
|
23251
23227
|
traverseTiffDependencyTree() {
|
|
23252
|
-
let { ifd0: e4, exif:
|
|
23253
|
-
i4.needed && (
|
|
23228
|
+
let { ifd0: e4, exif: t5, gps: s4, interop: i4 } = this;
|
|
23229
|
+
i4.needed && (t5.deps.add(40965), e4.deps.add(40965)), t5.needed && e4.deps.add(34665), s4.needed && e4.deps.add(34853), this.tiff.enabled = P4.some(((e5) => true === this[e5].enabled)) || this.makerNote || this.userComment;
|
|
23254
23230
|
for (let e5 of P4) this[e5].finalizeFilters();
|
|
23255
23231
|
}
|
|
23256
23232
|
get onlyTiff() {
|
|
@@ -23260,80 +23236,80 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
23260
23236
|
for (let e4 of z3) this[e4].enabled && !y3.has(e4) && p3("segment parser", e4);
|
|
23261
23237
|
}
|
|
23262
23238
|
};
|
|
23263
|
-
function K3(e4,
|
|
23239
|
+
function K3(e4, t5) {
|
|
23264
23240
|
let s4, i4, n3, r4, a4 = [];
|
|
23265
|
-
for (n3 of
|
|
23241
|
+
for (n3 of t5) {
|
|
23266
23242
|
for (r4 of (s4 = B4.get(n3), i4 = [], s4)) (e4.includes(r4[0]) || e4.includes(r4[1])) && i4.push(r4[0]);
|
|
23267
23243
|
i4.length && a4.push([n3, i4]);
|
|
23268
23244
|
}
|
|
23269
23245
|
return a4;
|
|
23270
23246
|
}
|
|
23271
|
-
function W2(e4,
|
|
23272
|
-
return void 0 !== e4 ? e4 : void 0 !==
|
|
23247
|
+
function W2(e4, t5) {
|
|
23248
|
+
return void 0 !== e4 ? e4 : void 0 !== t5 ? t5 : void 0;
|
|
23273
23249
|
}
|
|
23274
|
-
function X2(e4,
|
|
23275
|
-
for (let s4 of
|
|
23250
|
+
function X2(e4, t5) {
|
|
23251
|
+
for (let s4 of t5) e4.add(s4);
|
|
23276
23252
|
}
|
|
23277
23253
|
e3(R, "default", N3);
|
|
23278
23254
|
var H3 = class {
|
|
23279
|
-
constructor(
|
|
23280
|
-
e3(this, "parsers", {}), e3(this, "output", {}), e3(this, "errors", []), e3(this, "pushToErrors", ((e4) => this.errors.push(e4))), this.options = R.useCached(
|
|
23255
|
+
constructor(t5) {
|
|
23256
|
+
e3(this, "parsers", {}), e3(this, "output", {}), e3(this, "errors", []), e3(this, "pushToErrors", ((e4) => this.errors.push(e4))), this.options = R.useCached(t5);
|
|
23281
23257
|
}
|
|
23282
23258
|
async read(e4) {
|
|
23283
|
-
this.file = await (function(e5,
|
|
23284
|
-
return "string" == typeof e5 ? k3(e5,
|
|
23259
|
+
this.file = await (function(e5, t5) {
|
|
23260
|
+
return "string" == typeof e5 ? k3(e5, t5) : s3 && !i3 && e5 instanceof HTMLImageElement ? k3(e5.src, t5) : e5 instanceof Uint8Array || e5 instanceof ArrayBuffer || e5 instanceof DataView ? new c3(e5) : s3 && e5 instanceof Blob ? O2(e5, t5, "blob", A4) : void l3("Invalid input argument");
|
|
23285
23261
|
})(e4, this.options);
|
|
23286
23262
|
}
|
|
23287
23263
|
setup() {
|
|
23288
23264
|
if (this.fileParser) return;
|
|
23289
|
-
let { file: e4 } = this,
|
|
23290
|
-
for (let [s4, i4] of m3) if (i4.canHandle(e4,
|
|
23265
|
+
let { file: e4 } = this, t5 = e4.getUint16(0);
|
|
23266
|
+
for (let [s4, i4] of m3) if (i4.canHandle(e4, t5)) return this.fileParser = new i4(this.options, this.file, this.parsers), e4[s4] = true;
|
|
23291
23267
|
this.file.close && this.file.close(), l3("Unknown file format");
|
|
23292
23268
|
}
|
|
23293
23269
|
async parse() {
|
|
23294
|
-
let { output: e4, errors:
|
|
23295
|
-
return this.setup(), this.options.silentErrors ? (await this.executeParsers().catch(this.pushToErrors),
|
|
23270
|
+
let { output: e4, errors: t5 } = this;
|
|
23271
|
+
return this.setup(), this.options.silentErrors ? (await this.executeParsers().catch(this.pushToErrors), t5.push(...this.fileParser.errors)) : await this.executeParsers(), this.file.close && this.file.close(), this.options.silentErrors && t5.length > 0 && (e4.errors = t5), f4(s4 = e4) ? void 0 : s4;
|
|
23296
23272
|
var s4;
|
|
23297
23273
|
}
|
|
23298
23274
|
async executeParsers() {
|
|
23299
23275
|
let { output: e4 } = this;
|
|
23300
23276
|
await this.fileParser.parse();
|
|
23301
|
-
let
|
|
23302
|
-
let s4 = await
|
|
23303
|
-
|
|
23277
|
+
let t5 = Object.values(this.parsers).map((async (t6) => {
|
|
23278
|
+
let s4 = await t6.parse();
|
|
23279
|
+
t6.assignToOutput(e4, s4);
|
|
23304
23280
|
}));
|
|
23305
|
-
this.options.silentErrors && (
|
|
23281
|
+
this.options.silentErrors && (t5 = t5.map(((e5) => e5.catch(this.pushToErrors)))), await Promise.all(t5);
|
|
23306
23282
|
}
|
|
23307
23283
|
async extractThumbnail() {
|
|
23308
23284
|
this.setup();
|
|
23309
|
-
let { options: e4, file:
|
|
23285
|
+
let { options: e4, file: t5 } = this, s4 = y3.get("tiff", e4);
|
|
23310
23286
|
var i4;
|
|
23311
|
-
if (
|
|
23312
|
-
let n3 = await this.fileParser.ensureSegmentChunk(i4), r4 = this.parsers.tiff = new s4(n3, e4,
|
|
23313
|
-
return
|
|
23287
|
+
if (t5.tiff ? i4 = { start: 0, type: "tiff" } : t5.jpeg && (i4 = await this.fileParser.getOrFindSegment("tiff")), void 0 === i4) return;
|
|
23288
|
+
let n3 = await this.fileParser.ensureSegmentChunk(i4), r4 = this.parsers.tiff = new s4(n3, e4, t5), a4 = await r4.extractThumbnail();
|
|
23289
|
+
return t5.close && t5.close(), a4;
|
|
23314
23290
|
}
|
|
23315
23291
|
};
|
|
23316
|
-
async function Y(e4,
|
|
23317
|
-
let s4 = new H3(
|
|
23292
|
+
async function Y(e4, t5) {
|
|
23293
|
+
let s4 = new H3(t5);
|
|
23318
23294
|
return await s4.read(e4), s4.parse();
|
|
23319
23295
|
}
|
|
23320
23296
|
var G3 = Object.freeze({ __proto__: null, parse: Y, Exifr: H3, fileParsers: m3, segmentParsers: y3, fileReaders: b2, tagKeys: B4, tagValues: V3, tagRevivers: I2, createDictionary: x3, extendDictionary: C3, fetchUrlAsArrayBuffer: S2, readBlobAsArrayBuffer: A4, chunkedProps: L2, otherSegments: T4, segments: z3, tiffBlocks: P4, segmentsAndBlocks: F4, tiffExtractables: j4, inheritables: E3, allFormatters: M2, Options: R });
|
|
23321
23297
|
var J3 = class {
|
|
23322
|
-
static findPosition(e4,
|
|
23323
|
-
let s4 = e4.getUint16(
|
|
23324
|
-
return { offset:
|
|
23298
|
+
static findPosition(e4, t5) {
|
|
23299
|
+
let s4 = e4.getUint16(t5 + 2) + 2, i4 = "function" == typeof this.headerLength ? this.headerLength(e4, t5, s4) : this.headerLength, n3 = t5 + i4, r4 = s4 - i4;
|
|
23300
|
+
return { offset: t5, length: s4, headerLength: i4, start: n3, size: r4, end: n3 + r4 };
|
|
23325
23301
|
}
|
|
23326
|
-
static parse(e4,
|
|
23327
|
-
return new this(e4, new R({ [this.type]:
|
|
23302
|
+
static parse(e4, t5 = {}) {
|
|
23303
|
+
return new this(e4, new R({ [this.type]: t5 }), e4).parse();
|
|
23328
23304
|
}
|
|
23329
23305
|
normalizeInput(e4) {
|
|
23330
23306
|
return e4 instanceof c3 ? e4 : new c3(e4);
|
|
23331
23307
|
}
|
|
23332
|
-
constructor(
|
|
23308
|
+
constructor(t5, s4 = {}, i4) {
|
|
23333
23309
|
e3(this, "errors", []), e3(this, "raw", /* @__PURE__ */ new Map()), e3(this, "handleError", ((e4) => {
|
|
23334
23310
|
if (!this.options.silentErrors) throw e4;
|
|
23335
23311
|
this.errors.push(e4.message);
|
|
23336
|
-
})), this.chunk = this.normalizeInput(
|
|
23312
|
+
})), this.chunk = this.normalizeInput(t5), this.file = i4, this.type = this.constructor.type, this.globalOptions = this.options = s4, this.localOptions = s4[this.type], this.canTranslate = this.localOptions && this.localOptions.translate;
|
|
23337
23313
|
}
|
|
23338
23314
|
translate() {
|
|
23339
23315
|
this.canTranslate && (this.translated = this.translateBlock(this.raw, this.type));
|
|
@@ -23341,20 +23317,20 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
23341
23317
|
get output() {
|
|
23342
23318
|
return this.translated ? this.translated : this.raw ? Object.fromEntries(this.raw) : void 0;
|
|
23343
23319
|
}
|
|
23344
|
-
translateBlock(e4,
|
|
23345
|
-
let s4 = I2.get(
|
|
23346
|
-
for (let [
|
|
23320
|
+
translateBlock(e4, t5) {
|
|
23321
|
+
let s4 = I2.get(t5), i4 = V3.get(t5), n3 = B4.get(t5), r4 = this.options[t5], a4 = r4.reviveValues && !!s4, h4 = r4.translateValues && !!i4, f5 = r4.translateKeys && !!n3, l4 = {};
|
|
23322
|
+
for (let [t6, r5] of e4) a4 && s4.has(t6) ? r5 = s4.get(t6)(r5) : h4 && i4.has(t6) && (r5 = this.translateValue(r5, i4.get(t6))), f5 && n3.has(t6) && (t6 = n3.get(t6) || t6), l4[t6] = r5;
|
|
23347
23323
|
return l4;
|
|
23348
23324
|
}
|
|
23349
|
-
translateValue(e4,
|
|
23350
|
-
return
|
|
23325
|
+
translateValue(e4, t5) {
|
|
23326
|
+
return t5[e4] || t5.DEFAULT || e4;
|
|
23351
23327
|
}
|
|
23352
|
-
assignToOutput(e4,
|
|
23353
|
-
this.assignObjectToOutput(e4, this.constructor.type,
|
|
23328
|
+
assignToOutput(e4, t5) {
|
|
23329
|
+
this.assignObjectToOutput(e4, this.constructor.type, t5);
|
|
23354
23330
|
}
|
|
23355
|
-
assignObjectToOutput(e4,
|
|
23331
|
+
assignObjectToOutput(e4, t5, s4) {
|
|
23356
23332
|
if (this.globalOptions.mergeOutput) return Object.assign(e4, s4);
|
|
23357
|
-
e4[
|
|
23333
|
+
e4[t5] ? Object.assign(e4[t5], s4) : e4[t5] = s4;
|
|
23358
23334
|
}
|
|
23359
23335
|
};
|
|
23360
23336
|
e3(J3, "headerLength", 4), e3(J3, "type", void 0), e3(J3, "multiSegment", false), e3(J3, "canHandle", (() => false));
|
|
@@ -23364,49 +23340,49 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
23364
23340
|
function Q3(e4) {
|
|
23365
23341
|
return e4 >= 224 && e4 <= 239;
|
|
23366
23342
|
}
|
|
23367
|
-
function Z(e4,
|
|
23368
|
-
for (let [i4, n3] of y3) if (n3.canHandle(e4,
|
|
23343
|
+
function Z(e4, t5, s4) {
|
|
23344
|
+
for (let [i4, n3] of y3) if (n3.canHandle(e4, t5, s4)) return i4;
|
|
23369
23345
|
}
|
|
23370
23346
|
var ee2 = class extends class {
|
|
23371
|
-
constructor(
|
|
23347
|
+
constructor(t5, s4, i4) {
|
|
23372
23348
|
e3(this, "errors", []), e3(this, "ensureSegmentChunk", (async (e4) => {
|
|
23373
|
-
let
|
|
23374
|
-
if (this.file.chunked) if (this.file.available(
|
|
23349
|
+
let t6 = e4.start, s5 = e4.size || 65536;
|
|
23350
|
+
if (this.file.chunked) if (this.file.available(t6, s5)) e4.chunk = this.file.subarray(t6, s5);
|
|
23375
23351
|
else try {
|
|
23376
|
-
e4.chunk = await this.file.readChunk(
|
|
23377
|
-
} catch (
|
|
23378
|
-
l3(`Couldn't read segment: ${JSON.stringify(e4)}. ${
|
|
23352
|
+
e4.chunk = await this.file.readChunk(t6, s5);
|
|
23353
|
+
} catch (t7) {
|
|
23354
|
+
l3(`Couldn't read segment: ${JSON.stringify(e4)}. ${t7.message}`);
|
|
23379
23355
|
}
|
|
23380
|
-
else this.file.byteLength >
|
|
23356
|
+
else this.file.byteLength > t6 + s5 ? e4.chunk = this.file.subarray(t6, s5) : void 0 === e4.size ? e4.chunk = this.file.subarray(t6) : l3("Segment unreachable: " + JSON.stringify(e4));
|
|
23381
23357
|
return e4.chunk;
|
|
23382
|
-
})), this.extendOptions && this.extendOptions(
|
|
23358
|
+
})), this.extendOptions && this.extendOptions(t5), this.options = t5, this.file = s4, this.parsers = i4;
|
|
23383
23359
|
}
|
|
23384
|
-
injectSegment(e4,
|
|
23385
|
-
this.options[e4].enabled && this.createParser(e4,
|
|
23360
|
+
injectSegment(e4, t5) {
|
|
23361
|
+
this.options[e4].enabled && this.createParser(e4, t5);
|
|
23386
23362
|
}
|
|
23387
|
-
createParser(e4,
|
|
23388
|
-
let s4 = new (y3.get(e4))(
|
|
23363
|
+
createParser(e4, t5) {
|
|
23364
|
+
let s4 = new (y3.get(e4))(t5, this.options, this.file);
|
|
23389
23365
|
return this.parsers[e4] = s4;
|
|
23390
23366
|
}
|
|
23391
23367
|
createParsers(e4) {
|
|
23392
|
-
for (let
|
|
23393
|
-
let { type: e5, chunk: s4 } =
|
|
23368
|
+
for (let t5 of e4) {
|
|
23369
|
+
let { type: e5, chunk: s4 } = t5, i4 = this.options[e5];
|
|
23394
23370
|
if (i4 && i4.enabled) {
|
|
23395
|
-
let
|
|
23396
|
-
|
|
23371
|
+
let t6 = this.parsers[e5];
|
|
23372
|
+
t6 && t6.append || t6 || this.createParser(e5, s4);
|
|
23397
23373
|
}
|
|
23398
23374
|
}
|
|
23399
23375
|
}
|
|
23400
23376
|
async readSegments(e4) {
|
|
23401
|
-
let
|
|
23402
|
-
await Promise.all(
|
|
23377
|
+
let t5 = e4.map(this.ensureSegmentChunk);
|
|
23378
|
+
await Promise.all(t5);
|
|
23403
23379
|
}
|
|
23404
23380
|
} {
|
|
23405
|
-
constructor(...
|
|
23406
|
-
super(...
|
|
23381
|
+
constructor(...t5) {
|
|
23382
|
+
super(...t5), e3(this, "appSegments", []), e3(this, "jpegSegments", []), e3(this, "unknownSegments", []);
|
|
23407
23383
|
}
|
|
23408
|
-
static canHandle(e4,
|
|
23409
|
-
return 65496 ===
|
|
23384
|
+
static canHandle(e4, t5) {
|
|
23385
|
+
return 65496 === t5;
|
|
23410
23386
|
}
|
|
23411
23387
|
async parse() {
|
|
23412
23388
|
await this.findAppSegments(), await this.readSegments(this.appSegments), this.mergeMultiSegments(), this.createParsers(this.mergedAppSegments || this.appSegments);
|
|
@@ -23414,24 +23390,24 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
23414
23390
|
setupSegmentFinderArgs(e4) {
|
|
23415
23391
|
true === e4 ? (this.findAll = true, this.wanted = new Set(y3.keyList())) : (e4 = void 0 === e4 ? y3.keyList().filter(((e5) => this.options[e5].enabled)) : e4.filter(((e5) => this.options[e5].enabled && y3.has(e5))), this.findAll = false, this.remaining = new Set(e4), this.wanted = new Set(e4)), this.unfinishedMultiSegment = false;
|
|
23416
23392
|
}
|
|
23417
|
-
async findAppSegments(e4 = 0,
|
|
23418
|
-
this.setupSegmentFinderArgs(
|
|
23393
|
+
async findAppSegments(e4 = 0, t5) {
|
|
23394
|
+
this.setupSegmentFinderArgs(t5);
|
|
23419
23395
|
let { file: s4, findAll: i4, wanted: n3, remaining: r4 } = this;
|
|
23420
23396
|
if (!i4 && this.file.chunked && (i4 = Array.from(n3).some(((e5) => {
|
|
23421
|
-
let
|
|
23422
|
-
return
|
|
23397
|
+
let t6 = y3.get(e5), s5 = this.options[e5];
|
|
23398
|
+
return t6.multiSegment && s5.multiSegment;
|
|
23423
23399
|
})), i4 && await this.file.readWhole()), e4 = this.findAppSegmentsInRange(e4, s4.byteLength), !this.options.onlyTiff && s4.chunked) {
|
|
23424
|
-
let
|
|
23425
|
-
for (; r4.size > 0 && !
|
|
23400
|
+
let t6 = false;
|
|
23401
|
+
for (; r4.size > 0 && !t6 && (s4.canReadNextChunk || this.unfinishedMultiSegment); ) {
|
|
23426
23402
|
let { nextChunkOffset: i5 } = s4, n4 = this.appSegments.some(((e5) => !this.file.available(e5.offset || e5.start, e5.length || e5.size)));
|
|
23427
|
-
if (
|
|
23403
|
+
if (t6 = e4 > i5 && !n4 ? !await s4.readNextChunk(e4) : !await s4.readNextChunk(i5), void 0 === (e4 = this.findAppSegmentsInRange(e4, s4.byteLength))) return;
|
|
23428
23404
|
}
|
|
23429
23405
|
}
|
|
23430
23406
|
}
|
|
23431
|
-
findAppSegmentsInRange(e4,
|
|
23432
|
-
|
|
23407
|
+
findAppSegmentsInRange(e4, t5) {
|
|
23408
|
+
t5 -= 2;
|
|
23433
23409
|
let s4, i4, n3, r4, a4, h4, { file: f5, findAll: l4, wanted: o4, remaining: u5, options: d4 } = this;
|
|
23434
|
-
for (; e4 <
|
|
23410
|
+
for (; e4 < t5; e4++) if (255 === f5.getUint8(e4)) {
|
|
23435
23411
|
if (s4 = f5.getUint8(e4 + 1), Q3(s4)) {
|
|
23436
23412
|
if (i4 = f5.getUint16(e4 + 2), n3 = Z(f5, e4, i4), n3 && o4.has(n3) && (r4 = y3.get(n3), a4 = r4.findPosition(f5, e4), h4 = d4[n3], a4.type = n3, this.appSegments.push(a4), !l4 && (r4.multiSegment && h4.multiSegment ? (this.unfinishedMultiSegment = a4.chunkNumber < a4.chunkCount, this.unfinishedMultiSegment || u5.delete(n3)) : u5.delete(n3), 0 === u5.size))) break;
|
|
23437
23413
|
d4.recordUnknownSegments && (a4 = J3.findPosition(f5, e4), a4.marker = s4, this.unknownSegments.push(a4)), e4 += i4 + 1;
|
|
@@ -23444,25 +23420,25 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
23444
23420
|
}
|
|
23445
23421
|
mergeMultiSegments() {
|
|
23446
23422
|
if (!this.appSegments.some(((e5) => e5.multiSegment))) return;
|
|
23447
|
-
let e4 = (function(e5,
|
|
23423
|
+
let e4 = (function(e5, t5) {
|
|
23448
23424
|
let s4, i4, n3, r4 = /* @__PURE__ */ new Map();
|
|
23449
|
-
for (let a4 = 0; a4 < e5.length; a4++) s4 = e5[a4], i4 = s4[
|
|
23425
|
+
for (let a4 = 0; a4 < e5.length; a4++) s4 = e5[a4], i4 = s4[t5], r4.has(i4) ? n3 = r4.get(i4) : r4.set(i4, n3 = []), n3.push(s4);
|
|
23450
23426
|
return Array.from(r4);
|
|
23451
23427
|
})(this.appSegments, "type");
|
|
23452
|
-
this.mergedAppSegments = e4.map((([e5,
|
|
23428
|
+
this.mergedAppSegments = e4.map((([e5, t5]) => {
|
|
23453
23429
|
let s4 = y3.get(e5, this.options);
|
|
23454
23430
|
if (s4.handleMultiSegments) {
|
|
23455
|
-
return { type: e5, chunk: s4.handleMultiSegments(
|
|
23431
|
+
return { type: e5, chunk: s4.handleMultiSegments(t5) };
|
|
23456
23432
|
}
|
|
23457
|
-
return
|
|
23433
|
+
return t5[0];
|
|
23458
23434
|
}));
|
|
23459
23435
|
}
|
|
23460
23436
|
getSegment(e4) {
|
|
23461
|
-
return this.appSegments.find(((
|
|
23437
|
+
return this.appSegments.find(((t5) => t5.type === e4));
|
|
23462
23438
|
}
|
|
23463
23439
|
async getOrFindSegment(e4) {
|
|
23464
|
-
let
|
|
23465
|
-
return void 0 ===
|
|
23440
|
+
let t5 = this.getSegment(e4);
|
|
23441
|
+
return void 0 === t5 && (await this.findAppSegments(0, [e4]), t5 = this.getSegment(e4)), t5;
|
|
23466
23442
|
}
|
|
23467
23443
|
};
|
|
23468
23444
|
e3(ee2, "type", "jpeg"), m3.set("jpeg", ee2);
|
|
@@ -23472,23 +23448,23 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
23472
23448
|
var e4 = this.chunk.getUint16();
|
|
23473
23449
|
18761 === e4 ? this.le = true : 19789 === e4 && (this.le = false), this.chunk.le = this.le, this.headerParsed = true;
|
|
23474
23450
|
}
|
|
23475
|
-
parseTags(e4,
|
|
23476
|
-
let { pick: i4, skip: n3 } = this.options[
|
|
23451
|
+
parseTags(e4, t5, s4 = /* @__PURE__ */ new Map()) {
|
|
23452
|
+
let { pick: i4, skip: n3 } = this.options[t5];
|
|
23477
23453
|
i4 = new Set(i4);
|
|
23478
23454
|
let r4 = i4.size > 0, a4 = 0 === n3.size, h4 = this.chunk.getUint16(e4);
|
|
23479
23455
|
e4 += 2;
|
|
23480
23456
|
for (let f5 = 0; f5 < h4; f5++) {
|
|
23481
23457
|
let h5 = this.chunk.getUint16(e4);
|
|
23482
23458
|
if (r4) {
|
|
23483
|
-
if (i4.has(h5) && (s4.set(h5, this.parseTag(e4, h5,
|
|
23484
|
-
} else !a4 && n3.has(h5) || s4.set(h5, this.parseTag(e4, h5,
|
|
23459
|
+
if (i4.has(h5) && (s4.set(h5, this.parseTag(e4, h5, t5)), i4.delete(h5), 0 === i4.size)) break;
|
|
23460
|
+
} else !a4 && n3.has(h5) || s4.set(h5, this.parseTag(e4, h5, t5));
|
|
23485
23461
|
e4 += 12;
|
|
23486
23462
|
}
|
|
23487
23463
|
return s4;
|
|
23488
23464
|
}
|
|
23489
|
-
parseTag(e4,
|
|
23465
|
+
parseTag(e4, t5, s4) {
|
|
23490
23466
|
let { chunk: i4 } = this, n3 = i4.getUint16(e4 + 2), r4 = i4.getUint32(e4 + 4), a4 = te[n3];
|
|
23491
|
-
if (a4 * r4 <= 4 ? e4 += 8 : e4 = i4.getUint32(e4 + 8), (n3 < 1 || n3 > 13) && l3(`Invalid TIFF value type. block: ${s4.toUpperCase()}, tag: ${
|
|
23467
|
+
if (a4 * r4 <= 4 ? e4 += 8 : e4 = i4.getUint32(e4 + 8), (n3 < 1 || n3 > 13) && l3(`Invalid TIFF value type. block: ${s4.toUpperCase()}, tag: ${t5.toString(16)}, type: ${n3}, offset ${e4}`), e4 > i4.byteLength && l3(`Invalid TIFF value offset. block: ${s4.toUpperCase()}, tag: ${t5.toString(16)}, type: ${n3}, offset ${e4} is outside of chunk size ${i4.byteLength}`), 1 === n3) return i4.getUint8Array(e4, r4);
|
|
23492
23468
|
if (2 === n3) return "" === (h4 = (function(e5) {
|
|
23493
23469
|
for (; e5.endsWith("\0"); ) e5 = e5.slice(0, -1);
|
|
23494
23470
|
return e5;
|
|
@@ -23497,7 +23473,7 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
23497
23473
|
if (7 === n3) return i4.getUint8Array(e4, r4);
|
|
23498
23474
|
if (1 === r4) return this.parseTagValue(n3, e4);
|
|
23499
23475
|
{
|
|
23500
|
-
let
|
|
23476
|
+
let t6 = new ((function(e5) {
|
|
23501
23477
|
switch (e5) {
|
|
23502
23478
|
case 1:
|
|
23503
23479
|
return Uint8Array;
|
|
@@ -23523,43 +23499,43 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
23523
23499
|
return Array;
|
|
23524
23500
|
}
|
|
23525
23501
|
})(n3))(r4), s5 = a4;
|
|
23526
|
-
for (let i5 = 0; i5 < r4; i5++)
|
|
23527
|
-
return
|
|
23502
|
+
for (let i5 = 0; i5 < r4; i5++) t6[i5] = this.parseTagValue(n3, e4), e4 += s5;
|
|
23503
|
+
return t6;
|
|
23528
23504
|
}
|
|
23529
23505
|
}
|
|
23530
|
-
parseTagValue(e4,
|
|
23506
|
+
parseTagValue(e4, t5) {
|
|
23531
23507
|
let { chunk: s4 } = this;
|
|
23532
23508
|
switch (e4) {
|
|
23533
23509
|
case 1:
|
|
23534
|
-
return s4.getUint8(
|
|
23510
|
+
return s4.getUint8(t5);
|
|
23535
23511
|
case 3:
|
|
23536
|
-
return s4.getUint16(
|
|
23512
|
+
return s4.getUint16(t5);
|
|
23537
23513
|
case 4:
|
|
23538
|
-
return s4.getUint32(
|
|
23514
|
+
return s4.getUint32(t5);
|
|
23539
23515
|
case 5:
|
|
23540
|
-
return s4.getUint32(
|
|
23516
|
+
return s4.getUint32(t5) / s4.getUint32(t5 + 4);
|
|
23541
23517
|
case 6:
|
|
23542
|
-
return s4.getInt8(
|
|
23518
|
+
return s4.getInt8(t5);
|
|
23543
23519
|
case 8:
|
|
23544
|
-
return s4.getInt16(
|
|
23520
|
+
return s4.getInt16(t5);
|
|
23545
23521
|
case 9:
|
|
23546
|
-
return s4.getInt32(
|
|
23522
|
+
return s4.getInt32(t5);
|
|
23547
23523
|
case 10:
|
|
23548
|
-
return s4.getInt32(
|
|
23524
|
+
return s4.getInt32(t5) / s4.getInt32(t5 + 4);
|
|
23549
23525
|
case 11:
|
|
23550
|
-
return s4.getFloat(
|
|
23526
|
+
return s4.getFloat(t5);
|
|
23551
23527
|
case 12:
|
|
23552
|
-
return s4.getDouble(
|
|
23528
|
+
return s4.getDouble(t5);
|
|
23553
23529
|
case 13:
|
|
23554
|
-
return s4.getUint32(
|
|
23530
|
+
return s4.getUint32(t5);
|
|
23555
23531
|
default:
|
|
23556
23532
|
l3(`Invalid tiff type ${e4}`);
|
|
23557
23533
|
}
|
|
23558
23534
|
}
|
|
23559
23535
|
};
|
|
23560
23536
|
var ie = class extends se {
|
|
23561
|
-
static canHandle(e4,
|
|
23562
|
-
return 225 === e4.getUint8(
|
|
23537
|
+
static canHandle(e4, t5) {
|
|
23538
|
+
return 225 === e4.getUint8(t5 + 1) && 1165519206 === e4.getUint32(t5 + 4) && 0 === e4.getUint16(t5 + 8);
|
|
23563
23539
|
}
|
|
23564
23540
|
async parse() {
|
|
23565
23541
|
this.parseHeader();
|
|
@@ -23567,8 +23543,8 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
23567
23543
|
return e4.ifd0.enabled && await this.parseIfd0Block(), e4.exif.enabled && await this.safeParse("parseExifBlock"), e4.gps.enabled && await this.safeParse("parseGpsBlock"), e4.interop.enabled && await this.safeParse("parseInteropBlock"), e4.ifd1.enabled && await this.safeParse("parseThumbnailBlock"), this.createOutput();
|
|
23568
23544
|
}
|
|
23569
23545
|
safeParse(e4) {
|
|
23570
|
-
let
|
|
23571
|
-
return void 0 !==
|
|
23546
|
+
let t5 = this[e4]();
|
|
23547
|
+
return void 0 !== t5.catch && (t5 = t5.catch(this.handleError)), t5;
|
|
23572
23548
|
}
|
|
23573
23549
|
findIfd0Offset() {
|
|
23574
23550
|
void 0 === this.ifd0Offset && (this.ifd0Offset = this.chunk.getUint32(4));
|
|
@@ -23576,21 +23552,21 @@ Uppy plugins must have unique \`id\` options.`;
|
|
|
23576
23552
|
findIfd1Offset() {
|
|
23577
23553
|
if (void 0 === this.ifd1Offset) {
|
|
23578
23554
|
this.findIfd0Offset();
|
|
23579
|
-
let e4 = this.chunk.getUint16(this.ifd0Offset),
|
|
23580
|
-
this.ifd1Offset = this.chunk.getUint32(
|
|
23555
|
+
let e4 = this.chunk.getUint16(this.ifd0Offset), t5 = this.ifd0Offset + 2 + 12 * e4;
|
|
23556
|
+
this.ifd1Offset = this.chunk.getUint32(t5);
|
|
23581
23557
|
}
|
|
23582
23558
|
}
|
|
23583
|
-
parseBlock(e4,
|
|
23559
|
+
parseBlock(e4, t5) {
|
|
23584
23560
|
let s4 = /* @__PURE__ */ new Map();
|
|
23585
|
-
return this[
|
|
23561
|
+
return this[t5] = s4, this.parseTags(e4, t5, s4), s4;
|
|
23586
23562
|
}
|
|
23587
23563
|
async parseIfd0Block() {
|
|
23588
23564
|
if (this.ifd0) return;
|
|
23589
23565
|
let { file: e4 } = this;
|
|
23590
23566
|
this.findIfd0Offset(), this.ifd0Offset < 8 && l3("Malformed EXIF data"), !e4.chunked && this.ifd0Offset > e4.byteLength && l3(`IFD0 offset points to outside of file.
|
|
23591
23567
|
this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tiff && await e4.ensureChunk(this.ifd0Offset, o3(this.options));
|
|
23592
|
-
let
|
|
23593
|
-
return 0 !==
|
|
23568
|
+
let t5 = this.parseBlock(this.ifd0Offset, "ifd0");
|
|
23569
|
+
return 0 !== t5.size ? (this.exifOffset = t5.get(34665), this.interopOffset = t5.get(40965), this.gpsOffset = t5.get(34853), this.xmp = t5.get(700), this.iptc = t5.get(33723), this.icc = t5.get(34675), this.options.sanitize && (t5.delete(34665), t5.delete(40965), t5.delete(34853), t5.delete(700), t5.delete(33723), t5.delete(34675)), t5) : void 0;
|
|
23594
23570
|
}
|
|
23595
23571
|
async parseExifBlock() {
|
|
23596
23572
|
if (this.exif) return;
|
|
@@ -23599,9 +23575,9 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
23599
23575
|
let e4 = this.parseBlock(this.exifOffset, "exif");
|
|
23600
23576
|
return this.interopOffset || (this.interopOffset = e4.get(40965)), this.makerNote = e4.get(37500), this.userComment = e4.get(37510), this.options.sanitize && (e4.delete(40965), e4.delete(37500), e4.delete(37510)), this.unpack(e4, 41728), this.unpack(e4, 41729), e4;
|
|
23601
23577
|
}
|
|
23602
|
-
unpack(e4,
|
|
23603
|
-
let s4 = e4.get(
|
|
23604
|
-
s4 && 1 === s4.length && e4.set(
|
|
23578
|
+
unpack(e4, t5) {
|
|
23579
|
+
let s4 = e4.get(t5);
|
|
23580
|
+
s4 && 1 === s4.length && e4.set(t5, s4[0]);
|
|
23605
23581
|
}
|
|
23606
23582
|
async parseGpsBlock() {
|
|
23607
23583
|
if (this.gps) return;
|
|
@@ -23617,8 +23593,8 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
23617
23593
|
}
|
|
23618
23594
|
async extractThumbnail() {
|
|
23619
23595
|
if (this.headerParsed || this.parseHeader(), this.ifd1Parsed || await this.parseThumbnailBlock(true), void 0 === this.ifd1) return;
|
|
23620
|
-
let e4 = this.ifd1.get(513),
|
|
23621
|
-
return this.chunk.getUint8Array(e4,
|
|
23596
|
+
let e4 = this.ifd1.get(513), t5 = this.ifd1.get(514);
|
|
23597
|
+
return this.chunk.getUint8Array(e4, t5);
|
|
23622
23598
|
}
|
|
23623
23599
|
get image() {
|
|
23624
23600
|
return this.ifd0;
|
|
@@ -23627,20 +23603,20 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
23627
23603
|
return this.ifd1;
|
|
23628
23604
|
}
|
|
23629
23605
|
createOutput() {
|
|
23630
|
-
let e4,
|
|
23631
|
-
for (
|
|
23632
|
-
if ("ifd1" ===
|
|
23606
|
+
let e4, t5, s4, i4 = {};
|
|
23607
|
+
for (t5 of P4) if (e4 = this[t5], !f4(e4)) if (s4 = this.canTranslate ? this.translateBlock(e4, t5) : Object.fromEntries(e4), this.options.mergeOutput) {
|
|
23608
|
+
if ("ifd1" === t5) continue;
|
|
23633
23609
|
Object.assign(i4, s4);
|
|
23634
|
-
} else i4[
|
|
23610
|
+
} else i4[t5] = s4;
|
|
23635
23611
|
return this.makerNote && (i4.makerNote = this.makerNote), this.userComment && (i4.userComment = this.userComment), i4;
|
|
23636
23612
|
}
|
|
23637
|
-
assignToOutput(e4,
|
|
23638
|
-
if (this.globalOptions.mergeOutput) Object.assign(e4,
|
|
23639
|
-
else for (let [s4, i4] of Object.entries(
|
|
23613
|
+
assignToOutput(e4, t5) {
|
|
23614
|
+
if (this.globalOptions.mergeOutput) Object.assign(e4, t5);
|
|
23615
|
+
else for (let [s4, i4] of Object.entries(t5)) this.assignObjectToOutput(e4, s4, i4);
|
|
23640
23616
|
}
|
|
23641
23617
|
};
|
|
23642
|
-
function ne(e4,
|
|
23643
|
-
var n3 = e4 +
|
|
23618
|
+
function ne(e4, t5, s4, i4) {
|
|
23619
|
+
var n3 = e4 + t5 / 60 + s4 / 3600;
|
|
23644
23620
|
return "S" !== i4 && "W" !== i4 || (n3 *= -1), n3;
|
|
23645
23621
|
}
|
|
23646
23622
|
e3(ie, "type", "tiff"), e3(ie, "headerLength", 10), y3.set("tiff", ie);
|
|
@@ -23650,9 +23626,9 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
23650
23626
|
var le = Object.assign({}, ae, { tiff: false, ifd1: true, mergeOutput: false });
|
|
23651
23627
|
var de = Object.assign({}, ae, { firstChunkSize: 4e4, ifd0: [274] });
|
|
23652
23628
|
async function ce(e4) {
|
|
23653
|
-
let
|
|
23654
|
-
await
|
|
23655
|
-
let s4 = await
|
|
23629
|
+
let t5 = new H3(de);
|
|
23630
|
+
await t5.read(e4);
|
|
23631
|
+
let s4 = await t5.parse();
|
|
23656
23632
|
if (s4 && s4.ifd0) return s4.ifd0[274];
|
|
23657
23633
|
}
|
|
23658
23634
|
var pe = Object.freeze({ 1: { dimensionSwapped: false, scaleX: 1, scaleY: 1, deg: 0, rad: 0 }, 2: { dimensionSwapped: false, scaleX: -1, scaleY: 1, deg: 0, rad: 0 }, 3: { dimensionSwapped: false, scaleX: 1, scaleY: 1, deg: 180, rad: 180 * Math.PI / 180 }, 4: { dimensionSwapped: false, scaleX: -1, scaleY: 1, deg: 180, rad: 180 * Math.PI / 180 }, 5: { dimensionSwapped: true, scaleX: 1, scaleY: -1, deg: 90, rad: 90 * Math.PI / 180 }, 6: { dimensionSwapped: true, scaleX: 1, scaleY: 1, deg: 90, rad: 90 * Math.PI / 180 }, 7: { dimensionSwapped: true, scaleX: 1, scaleY: -1, deg: 270, rad: 270 * Math.PI / 180 }, 8: { dimensionSwapped: true, scaleX: 1, scaleY: 1, deg: 270, rad: 270 * Math.PI / 180 } });
|
|
@@ -23661,37 +23637,37 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
23661
23637
|
if ("object" == typeof navigator) {
|
|
23662
23638
|
let e4 = navigator.userAgent;
|
|
23663
23639
|
if (e4.includes("iPad") || e4.includes("iPhone")) {
|
|
23664
|
-
let
|
|
23665
|
-
if (
|
|
23666
|
-
let [, e5, s4] =
|
|
23640
|
+
let t5 = e4.match(/OS (\d+)_(\d+)/);
|
|
23641
|
+
if (t5) {
|
|
23642
|
+
let [, e5, s4] = t5, i4 = Number(e5) + 0.1 * Number(s4);
|
|
23667
23643
|
ge = i4 < 13.4, me = false;
|
|
23668
23644
|
}
|
|
23669
23645
|
} else if (e4.includes("OS X 10")) {
|
|
23670
|
-
let [,
|
|
23671
|
-
ge = me = Number(
|
|
23646
|
+
let [, t5] = e4.match(/OS X 10[_.](\d+)/);
|
|
23647
|
+
ge = me = Number(t5) < 15;
|
|
23672
23648
|
}
|
|
23673
23649
|
if (e4.includes("Chrome/")) {
|
|
23674
|
-
let [,
|
|
23675
|
-
ge = me = Number(
|
|
23650
|
+
let [, t5] = e4.match(/Chrome\/(\d+)/);
|
|
23651
|
+
ge = me = Number(t5) < 81;
|
|
23676
23652
|
} else if (e4.includes("Firefox/")) {
|
|
23677
|
-
let [,
|
|
23678
|
-
ge = me = Number(
|
|
23653
|
+
let [, t5] = e4.match(/Firefox\/(\d+)/);
|
|
23654
|
+
ge = me = Number(t5) < 77;
|
|
23679
23655
|
}
|
|
23680
23656
|
}
|
|
23681
23657
|
async function ye(e4) {
|
|
23682
|
-
let
|
|
23683
|
-
return Object.assign({ canvas: ge, css: me }, pe[
|
|
23658
|
+
let t5 = await ce(e4);
|
|
23659
|
+
return Object.assign({ canvas: ge, css: me }, pe[t5]);
|
|
23684
23660
|
}
|
|
23685
23661
|
var be = class extends c3 {
|
|
23686
|
-
constructor(...
|
|
23687
|
-
super(...
|
|
23662
|
+
constructor(...t5) {
|
|
23663
|
+
super(...t5), e3(this, "ranges", new we()), 0 !== this.byteLength && this.ranges.add(0, this.byteLength);
|
|
23688
23664
|
}
|
|
23689
|
-
_tryExtend(e4,
|
|
23665
|
+
_tryExtend(e4, t5, s4) {
|
|
23690
23666
|
if (0 === e4 && 0 === this.byteLength && s4) {
|
|
23691
23667
|
let e5 = new DataView(s4.buffer || s4, s4.byteOffset, s4.byteLength);
|
|
23692
23668
|
this._swapDataView(e5);
|
|
23693
23669
|
} else {
|
|
23694
|
-
let s5 = e4 +
|
|
23670
|
+
let s5 = e4 + t5;
|
|
23695
23671
|
if (s5 > this.byteLength) {
|
|
23696
23672
|
let { dataView: e5 } = this._extend(s5);
|
|
23697
23673
|
this._swapDataView(e5);
|
|
@@ -23699,24 +23675,24 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
23699
23675
|
}
|
|
23700
23676
|
}
|
|
23701
23677
|
_extend(e4) {
|
|
23702
|
-
let
|
|
23703
|
-
|
|
23704
|
-
let s4 = new DataView(
|
|
23705
|
-
return
|
|
23678
|
+
let t5;
|
|
23679
|
+
t5 = a3 ? r3.allocUnsafe(e4) : new Uint8Array(e4);
|
|
23680
|
+
let s4 = new DataView(t5.buffer, t5.byteOffset, t5.byteLength);
|
|
23681
|
+
return t5.set(new Uint8Array(this.buffer, this.byteOffset, this.byteLength), 0), { uintView: t5, dataView: s4 };
|
|
23706
23682
|
}
|
|
23707
|
-
subarray(e4,
|
|
23708
|
-
return
|
|
23683
|
+
subarray(e4, t5, s4 = false) {
|
|
23684
|
+
return t5 = t5 || this._lengthToEnd(e4), s4 && this._tryExtend(e4, t5), this.ranges.add(e4, t5), super.subarray(e4, t5);
|
|
23709
23685
|
}
|
|
23710
|
-
set(e4,
|
|
23711
|
-
s4 && this._tryExtend(
|
|
23712
|
-
let i4 = super.set(e4,
|
|
23713
|
-
return this.ranges.add(
|
|
23686
|
+
set(e4, t5, s4 = false) {
|
|
23687
|
+
s4 && this._tryExtend(t5, e4.byteLength, e4);
|
|
23688
|
+
let i4 = super.set(e4, t5);
|
|
23689
|
+
return this.ranges.add(t5, i4.byteLength), i4;
|
|
23714
23690
|
}
|
|
23715
|
-
async ensureChunk(e4,
|
|
23716
|
-
this.chunked && (this.ranges.available(e4,
|
|
23691
|
+
async ensureChunk(e4, t5) {
|
|
23692
|
+
this.chunked && (this.ranges.available(e4, t5) || await this.readChunk(e4, t5));
|
|
23717
23693
|
}
|
|
23718
|
-
available(e4,
|
|
23719
|
-
return this.ranges.available(e4,
|
|
23694
|
+
available(e4, t5) {
|
|
23695
|
+
return this.ranges.available(e4, t5);
|
|
23720
23696
|
}
|
|
23721
23697
|
};
|
|
23722
23698
|
var we = class {
|
|
@@ -23726,25 +23702,25 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
23726
23702
|
get length() {
|
|
23727
23703
|
return this.list.length;
|
|
23728
23704
|
}
|
|
23729
|
-
add(e4,
|
|
23730
|
-
let i4 = e4 +
|
|
23705
|
+
add(e4, t5, s4 = 0) {
|
|
23706
|
+
let i4 = e4 + t5, n3 = this.list.filter(((t6) => ke(e4, t6.offset, i4) || ke(e4, t6.end, i4)));
|
|
23731
23707
|
if (n3.length > 0) {
|
|
23732
|
-
e4 = Math.min(e4, ...n3.map(((e5) => e5.offset))), i4 = Math.max(i4, ...n3.map(((e5) => e5.end))),
|
|
23708
|
+
e4 = Math.min(e4, ...n3.map(((e5) => e5.offset))), i4 = Math.max(i4, ...n3.map(((e5) => e5.end))), t5 = i4 - e4;
|
|
23733
23709
|
let s5 = n3.shift();
|
|
23734
|
-
s5.offset = e4, s5.length =
|
|
23735
|
-
} else this.list.push({ offset: e4, length:
|
|
23710
|
+
s5.offset = e4, s5.length = t5, s5.end = i4, this.list = this.list.filter(((e5) => !n3.includes(e5)));
|
|
23711
|
+
} else this.list.push({ offset: e4, length: t5, end: i4 });
|
|
23736
23712
|
}
|
|
23737
|
-
available(e4,
|
|
23738
|
-
let s4 = e4 +
|
|
23739
|
-
return this.list.some(((
|
|
23713
|
+
available(e4, t5) {
|
|
23714
|
+
let s4 = e4 + t5;
|
|
23715
|
+
return this.list.some(((t6) => t6.offset <= e4 && s4 <= t6.end));
|
|
23740
23716
|
}
|
|
23741
23717
|
};
|
|
23742
|
-
function ke(e4,
|
|
23743
|
-
return e4 <=
|
|
23718
|
+
function ke(e4, t5, s4) {
|
|
23719
|
+
return e4 <= t5 && t5 <= s4;
|
|
23744
23720
|
}
|
|
23745
23721
|
var Oe = class extends be {
|
|
23746
|
-
constructor(
|
|
23747
|
-
super(0), e3(this, "chunksRead", 0), this.input =
|
|
23722
|
+
constructor(t5, s4) {
|
|
23723
|
+
super(0), e3(this, "chunksRead", 0), this.input = t5, this.options = s4;
|
|
23748
23724
|
}
|
|
23749
23725
|
async readWhole() {
|
|
23750
23726
|
this.chunked = false, await this.readChunk(this.nextChunkOffset);
|
|
@@ -23754,14 +23730,14 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
23754
23730
|
}
|
|
23755
23731
|
async readNextChunk(e4 = this.nextChunkOffset) {
|
|
23756
23732
|
if (this.fullyRead) return this.chunksRead++, false;
|
|
23757
|
-
let
|
|
23758
|
-
return !!s4 && s4.byteLength ===
|
|
23733
|
+
let t5 = this.options.chunkSize, s4 = await this.readChunk(e4, t5);
|
|
23734
|
+
return !!s4 && s4.byteLength === t5;
|
|
23759
23735
|
}
|
|
23760
|
-
async readChunk(e4,
|
|
23761
|
-
if (this.chunksRead++, 0 !== (
|
|
23736
|
+
async readChunk(e4, t5) {
|
|
23737
|
+
if (this.chunksRead++, 0 !== (t5 = this.safeWrapAddress(e4, t5))) return this._readChunk(e4, t5);
|
|
23762
23738
|
}
|
|
23763
|
-
safeWrapAddress(e4,
|
|
23764
|
-
return void 0 !== this.size && e4 +
|
|
23739
|
+
safeWrapAddress(e4, t5) {
|
|
23740
|
+
return void 0 !== this.size && e4 + t5 > this.size ? Math.max(0, this.size - e4) : t5;
|
|
23765
23741
|
}
|
|
23766
23742
|
get nextChunkOffset() {
|
|
23767
23743
|
if (0 !== this.ranges.list.length) return this.ranges.list[0].length;
|
|
@@ -23787,8 +23763,8 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
23787
23763
|
readChunked() {
|
|
23788
23764
|
return this.chunked = true, this.size = this.input.size, super.readChunked();
|
|
23789
23765
|
}
|
|
23790
|
-
async _readChunk(e4,
|
|
23791
|
-
let s4 =
|
|
23766
|
+
async _readChunk(e4, t5) {
|
|
23767
|
+
let s4 = t5 ? e4 + t5 : void 0, i4 = this.input.slice(e4, s4), n3 = await A4(i4);
|
|
23792
23768
|
return this.set(n3, e4, true);
|
|
23793
23769
|
}
|
|
23794
23770
|
});
|
|
@@ -27305,8 +27281,8 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
27305
27281
|
};
|
|
27306
27282
|
|
|
27307
27283
|
// node_modules/@uppy/xhr-upload/lib/index.js
|
|
27308
|
-
function _classPrivateFieldLooseBase(e4,
|
|
27309
|
-
if (!{}.hasOwnProperty.call(e4,
|
|
27284
|
+
function _classPrivateFieldLooseBase(e4, t5) {
|
|
27285
|
+
if (!{}.hasOwnProperty.call(e4, t5)) throw new TypeError("attempted to use private field on non-instance");
|
|
27310
27286
|
return e4;
|
|
27311
27287
|
}
|
|
27312
27288
|
var id = 0;
|
|
@@ -27799,7 +27775,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
27799
27775
|
const dashboardOptions = { inline: false, closeAfterFinish: true };
|
|
27800
27776
|
const dialog2 = this.element.closest("dialog");
|
|
27801
27777
|
if (dialog2) dashboardOptions.target = dialog2;
|
|
27802
|
-
|
|
27778
|
+
const uppyOptions = {
|
|
27803
27779
|
restrictions: {
|
|
27804
27780
|
maxFileSize: this.maxFileSizeValue,
|
|
27805
27781
|
minFileSize: this.minFileSizeValue,
|
|
@@ -27809,7 +27785,10 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
27809
27785
|
allowedFileTypes: this.allowedFileTypesValue,
|
|
27810
27786
|
requiredMetaFields: this.requiredMetaFieldsValue
|
|
27811
27787
|
}
|
|
27812
|
-
}
|
|
27788
|
+
};
|
|
27789
|
+
const strings = t("plutonium.js.libraries.uppy.strings");
|
|
27790
|
+
if (strings && typeof strings === "object") uppyOptions.locale = { strings };
|
|
27791
|
+
this.uppy = new Uppy_default(uppyOptions).use(Dashboard2, dashboardOptions).use(ImageEditor, { target: Dashboard2 });
|
|
27813
27792
|
this.#configureUploader();
|
|
27814
27793
|
this.#configureEventHandlers();
|
|
27815
27794
|
}
|
|
@@ -27844,7 +27823,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
27844
27823
|
const len = this.attachmentPreviewOutlets.length;
|
|
27845
27824
|
if (len > 1) {
|
|
27846
27825
|
this.deleteAllTrigger.style["display"] = "initial";
|
|
27847
|
-
this.deleteAllTrigger.textContent =
|
|
27826
|
+
this.deleteAllTrigger.textContent = t("plutonium.js.attachment_input.delete_all", { count: this.attachmentPreviewOutlets.length });
|
|
27848
27827
|
} else {
|
|
27849
27828
|
this.deleteAllTrigger.style["display"] = "none";
|
|
27850
27829
|
}
|
|
@@ -27859,7 +27838,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
27859
27838
|
if (this.deleteAllTrigger) this.triggerContainer.append(this.deleteAllTrigger);
|
|
27860
27839
|
}
|
|
27861
27840
|
#buildUploadTrigger() {
|
|
27862
|
-
const triggerPrompt = this.multiple ?
|
|
27841
|
+
const triggerPrompt = t("plutonium.js.attachment_input.choose_file", { count: this.multiple ? 2 : 1 });
|
|
27863
27842
|
this.uploadTrigger = dom_element_default.fromTemplate(
|
|
27864
27843
|
`<button type="button" class="text-gray-900 bg-white border border-gray-300 focus:outline-none hover:bg-gray-100 focus:ring-4 focus:ring-gray-200 font-medium rounded-lg text-sm px-5 py-2.5 dark:bg-gray-800 dark:text-white dark:border-gray-600 dark:hover:bg-gray-700 dark:hover:border-gray-600 dark:focus:ring-gray-700 inline-flex items-center">
|
|
27865
27844
|
<svg class="w-4 h-4 mr-2" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 16">
|
|
@@ -27874,12 +27853,12 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
27874
27853
|
#buildDeleteAllTrigger() {
|
|
27875
27854
|
this.deleteAllTrigger = dom_element_default.fromTemplate(
|
|
27876
27855
|
`<button type="button" class="text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 font-medium rounded-lg text-sm px-5 py-2.5 dark:bg-red-600 dark:hover:bg-red-700 focus:outline-none dark:focus:ring-red-800 inline-flex items-center">
|
|
27877
|
-
|
|
27856
|
+
${t("plutonium.js.attachment_input.delete_all", { count: this.attachmentPreviewOutlets.length })}
|
|
27878
27857
|
</button>`,
|
|
27879
27858
|
false
|
|
27880
27859
|
);
|
|
27881
27860
|
this.deleteAllTrigger.addEventListener("click", () => {
|
|
27882
|
-
if (confirm("
|
|
27861
|
+
if (confirm(t("plutonium.js.are_you_sure"))) this.attachmentPreviewContainerOutlet.clear();
|
|
27883
27862
|
});
|
|
27884
27863
|
}
|
|
27885
27864
|
#buildPreview(data, url) {
|
|
@@ -28440,10 +28419,19 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
28440
28419
|
document.body.style.overflow = this._previousBodyOverflow;
|
|
28441
28420
|
this._previousBodyOverflow = null;
|
|
28442
28421
|
}
|
|
28443
|
-
// Reset every input
|
|
28444
|
-
//
|
|
28422
|
+
// Reset every input in the FILTER form, then submit it so the collection
|
|
28423
|
+
// reflects the cleared filters immediately.
|
|
28424
|
+
//
|
|
28425
|
+
// Scoped to #filter-form, NOT the whole controller element: the toolbar's
|
|
28426
|
+
// search box is a separate <form> that lives in the same scope but before
|
|
28427
|
+
// this one. Submitting that bare form (or clearing its inputs) would drop the
|
|
28428
|
+
// view / sort / scope state the filter form preserves via hidden inputs —
|
|
28429
|
+
// which on the kanban board bounced the user back to the table (the dropped
|
|
28430
|
+
// ?view=kanban fell through to the default view).
|
|
28445
28431
|
clear() {
|
|
28446
|
-
this.element.
|
|
28432
|
+
const form = this.element.querySelector("#filter-form");
|
|
28433
|
+
if (!form) return;
|
|
28434
|
+
form.querySelectorAll("input, select, textarea").forEach((input) => {
|
|
28447
28435
|
if (input.type === "checkbox" || input.type === "radio") {
|
|
28448
28436
|
input.checked = false;
|
|
28449
28437
|
} else if (input.tagName === "SELECT") {
|
|
@@ -28454,12 +28442,11 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
28454
28442
|
input.value = "";
|
|
28455
28443
|
}
|
|
28456
28444
|
});
|
|
28457
|
-
|
|
28445
|
+
form.querySelectorAll('[data-controller="flatpickr"]').forEach((input) => {
|
|
28458
28446
|
const controller = this.application.getControllerForElementAndIdentifier(input, "flatpickr");
|
|
28459
28447
|
if (controller?.picker) controller.picker.clear();
|
|
28460
28448
|
});
|
|
28461
|
-
|
|
28462
|
-
if (form) form.requestSubmit();
|
|
28449
|
+
form.requestSubmit();
|
|
28463
28450
|
}
|
|
28464
28451
|
get isOpen() {
|
|
28465
28452
|
return this.hasPanelTarget && this.panelTarget.hasAttribute("data-open");
|
|
@@ -28521,14 +28508,14 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
28521
28508
|
const button = event.currentTarget;
|
|
28522
28509
|
const originalText = button.textContent;
|
|
28523
28510
|
navigator.clipboard.writeText(text2).then(() => {
|
|
28524
|
-
button.textContent = "
|
|
28511
|
+
button.textContent = t("plutonium.js.clipboard.copied");
|
|
28525
28512
|
setTimeout(() => {
|
|
28526
28513
|
button.textContent = originalText;
|
|
28527
28514
|
}, 2e3);
|
|
28528
28515
|
}).catch((err) => {
|
|
28529
28516
|
console.warn("Clipboard API failed, using fallback:", err);
|
|
28530
28517
|
this.fallbackCopy(text2);
|
|
28531
|
-
button.textContent = "
|
|
28518
|
+
button.textContent = t("plutonium.js.clipboard.copied");
|
|
28532
28519
|
setTimeout(() => {
|
|
28533
28520
|
button.textContent = originalText;
|
|
28534
28521
|
}, 2e3);
|
|
@@ -28901,7 +28888,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
28901
28888
|
if (!this.#isDirty()) return;
|
|
28902
28889
|
event.preventDefault();
|
|
28903
28890
|
event.stopPropagation();
|
|
28904
|
-
const message = trigger.getAttribute("data-dirty-form-guard-leave") || "
|
|
28891
|
+
const message = trigger.getAttribute("data-dirty-form-guard-leave") || t("plutonium.js.dirty_form_guard.unsaved_changes");
|
|
28905
28892
|
const confirmed = await this.#confirm(message);
|
|
28906
28893
|
if (!confirmed) return;
|
|
28907
28894
|
this.forceClose = true;
|
|
@@ -28996,7 +28983,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
28996
28983
|
requestAnimationFrame(() => {
|
|
28997
28984
|
requestAnimationFrame(() => d4.setAttribute("data-open", ""));
|
|
28998
28985
|
});
|
|
28999
|
-
} else if (window.confirm("
|
|
28986
|
+
} else if (window.confirm(t("plutonium.js.dirty_form_guard.discard_changes"))) {
|
|
29000
28987
|
this.forceClose = true;
|
|
29001
28988
|
this.dialog.dispatchEvent(new CustomEvent("modal:request-close"));
|
|
29002
28989
|
}
|
|
@@ -29277,9 +29264,9 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
29277
29264
|
// the end (so it tracks late width changes), otherwise to the exact offset.
|
|
29278
29265
|
// No-op when nothing meaningful was saved so it can't yank a fresh board to 0.
|
|
29279
29266
|
#pinScroll() {
|
|
29280
|
-
const
|
|
29281
|
-
if (!
|
|
29282
|
-
this.element.scrollLeft =
|
|
29267
|
+
const t5 = this.scrollTarget;
|
|
29268
|
+
if (!t5 || !t5.l && !t5.e) return;
|
|
29269
|
+
this.element.scrollLeft = t5.e ? this.element.scrollWidth : t5.l;
|
|
29283
29270
|
}
|
|
29284
29271
|
// Re-apply the saved horizontal scroll across a window that extends with each
|
|
29285
29272
|
// column render, because renders (morph on nav, replace on move, lazy load on
|
|
@@ -29955,6 +29942,176 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
29955
29942
|
}
|
|
29956
29943
|
};
|
|
29957
29944
|
|
|
29945
|
+
// src/js/controllers/chart_controller.js
|
|
29946
|
+
var PALETTE_SIZE = 8;
|
|
29947
|
+
var libraryPromise = null;
|
|
29948
|
+
function loadLibrary(src) {
|
|
29949
|
+
if (window.Chartkick && window.Chartkick.adapters.length > 0) return Promise.resolve(window.Chartkick);
|
|
29950
|
+
if (libraryPromise) return libraryPromise;
|
|
29951
|
+
libraryPromise = new Promise((resolve, reject) => {
|
|
29952
|
+
const existing = document.querySelector(`script[src="${src}"]`);
|
|
29953
|
+
const script = existing || document.createElement("script");
|
|
29954
|
+
const settle = () => {
|
|
29955
|
+
if (window.Chartkick) resolve(window.Chartkick);
|
|
29956
|
+
else reject(new Error("[plutonium] the charts bundle loaded but defined no Chartkick"));
|
|
29957
|
+
};
|
|
29958
|
+
script.addEventListener("load", settle, { once: true });
|
|
29959
|
+
script.addEventListener("error", () => {
|
|
29960
|
+
libraryPromise = null;
|
|
29961
|
+
reject(new Error(`[plutonium] could not load the charts bundle from ${src}`));
|
|
29962
|
+
}, { once: true });
|
|
29963
|
+
if (!existing) {
|
|
29964
|
+
script.src = src;
|
|
29965
|
+
script.async = true;
|
|
29966
|
+
script.dataset.turboTrack = "reload";
|
|
29967
|
+
document.head.appendChild(script);
|
|
29968
|
+
}
|
|
29969
|
+
});
|
|
29970
|
+
return libraryPromise;
|
|
29971
|
+
}
|
|
29972
|
+
function cssVar(name) {
|
|
29973
|
+
return getComputedStyle(document.documentElement).getPropertyValue(name).trim();
|
|
29974
|
+
}
|
|
29975
|
+
function themeColors() {
|
|
29976
|
+
const colors = [];
|
|
29977
|
+
for (let i4 = 1; i4 <= PALETTE_SIZE; i4++) {
|
|
29978
|
+
const color = cssVar(`--pu-chart-${i4}`);
|
|
29979
|
+
if (color) colors.push(color);
|
|
29980
|
+
}
|
|
29981
|
+
return colors;
|
|
29982
|
+
}
|
|
29983
|
+
function isPlainObject(value) {
|
|
29984
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
29985
|
+
}
|
|
29986
|
+
function deepMerge(base, extra) {
|
|
29987
|
+
const out = { ...base };
|
|
29988
|
+
for (const [key, value] of Object.entries(extra || {})) {
|
|
29989
|
+
out[key] = isPlainObject(value) && isPlainObject(out[key]) ? deepMerge(out[key], value) : value;
|
|
29990
|
+
}
|
|
29991
|
+
return out;
|
|
29992
|
+
}
|
|
29993
|
+
var chart_controller_default = class extends Controller {
|
|
29994
|
+
static values = {
|
|
29995
|
+
type: { type: String, default: "LineChart" },
|
|
29996
|
+
data: String,
|
|
29997
|
+
options: Object,
|
|
29998
|
+
script: String
|
|
29999
|
+
};
|
|
30000
|
+
connect() {
|
|
30001
|
+
this.render = this.render.bind(this);
|
|
30002
|
+
this.observer = new MutationObserver((mutations) => {
|
|
30003
|
+
if (mutations.some((m4) => m4.attributeName === "class")) this.render();
|
|
30004
|
+
});
|
|
30005
|
+
this.observer.observe(document.documentElement, { attributes: true, attributeFilter: ["class"] });
|
|
30006
|
+
this.element.addEventListener("turbo:morph-element", this.render);
|
|
30007
|
+
loadLibrary(this.scriptValue).then(() => this.render()).catch((error2) => {
|
|
30008
|
+
console.error(error2);
|
|
30009
|
+
this.element.textContent = t("plutonium.js.charts.failed");
|
|
30010
|
+
});
|
|
30011
|
+
}
|
|
30012
|
+
disconnect() {
|
|
30013
|
+
this.observer?.disconnect();
|
|
30014
|
+
this.element.removeEventListener("turbo:morph-element", this.render);
|
|
30015
|
+
this.#destroy();
|
|
30016
|
+
}
|
|
30017
|
+
dataValueChanged() {
|
|
30018
|
+
this.render();
|
|
30019
|
+
}
|
|
30020
|
+
optionsValueChanged() {
|
|
30021
|
+
this.render();
|
|
30022
|
+
}
|
|
30023
|
+
render() {
|
|
30024
|
+
const Chartkick = window.Chartkick;
|
|
30025
|
+
if (!Chartkick || !this.element.isConnected) return;
|
|
30026
|
+
const Klass = Chartkick[this.typeValue];
|
|
30027
|
+
if (!Klass) {
|
|
30028
|
+
console.error(`[plutonium] unknown chart type ${this.typeValue}`);
|
|
30029
|
+
return;
|
|
30030
|
+
}
|
|
30031
|
+
this.#destroy();
|
|
30032
|
+
this.element.replaceChildren();
|
|
30033
|
+
this.chart = new Klass(this.element, this.#data(), this.#options());
|
|
30034
|
+
}
|
|
30035
|
+
#destroy() {
|
|
30036
|
+
if (this.chart) {
|
|
30037
|
+
this.chart.destroy();
|
|
30038
|
+
this.chart = null;
|
|
30039
|
+
}
|
|
30040
|
+
}
|
|
30041
|
+
#data() {
|
|
30042
|
+
try {
|
|
30043
|
+
return JSON.parse(this.dataValue || "[]");
|
|
30044
|
+
} catch (error2) {
|
|
30045
|
+
console.error("[plutonium] chart data is not valid JSON", error2);
|
|
30046
|
+
return [];
|
|
30047
|
+
}
|
|
30048
|
+
}
|
|
30049
|
+
// Plutonium's defaults, with the card's own options merged over them.
|
|
30050
|
+
// Axis styling only applies to cartesian charts: handing a pie chart
|
|
30051
|
+
// `scales` makes Chart.js draw axes around it.
|
|
30052
|
+
#options() {
|
|
30053
|
+
const text2 = cssVar("--pu-text-muted");
|
|
30054
|
+
const grid = cssVar("--pu-border");
|
|
30055
|
+
const surface = cssVar("--pu-card-bg");
|
|
30056
|
+
const library = { color: text2 };
|
|
30057
|
+
if (this.typeValue === "PieChart") {
|
|
30058
|
+
library.elements = { arc: { borderColor: surface } };
|
|
30059
|
+
} else {
|
|
30060
|
+
library.scales = {
|
|
30061
|
+
x: { ticks: { color: text2 }, grid: { color: grid }, border: { color: grid } },
|
|
30062
|
+
y: { ticks: { color: text2 }, grid: { color: grid }, border: { color: grid } }
|
|
30063
|
+
};
|
|
30064
|
+
}
|
|
30065
|
+
const defaults = { colors: themeColors(), empty: t("plutonium.js.charts.empty"), library };
|
|
30066
|
+
return deepMerge(defaults, this.optionsValue);
|
|
30067
|
+
}
|
|
30068
|
+
};
|
|
30069
|
+
|
|
30070
|
+
// src/js/controllers/frame_refresh_controller.js
|
|
30071
|
+
var frame_refresh_controller_default = class extends Controller {
|
|
30072
|
+
static values = { interval: Number };
|
|
30073
|
+
connect() {
|
|
30074
|
+
this.tick = this.tick.bind(this);
|
|
30075
|
+
this.onVisibility = this.onVisibility.bind(this);
|
|
30076
|
+
document.addEventListener("visibilitychange", this.onVisibility);
|
|
30077
|
+
this.#start();
|
|
30078
|
+
}
|
|
30079
|
+
disconnect() {
|
|
30080
|
+
document.removeEventListener("visibilitychange", this.onVisibility);
|
|
30081
|
+
this.#stop();
|
|
30082
|
+
}
|
|
30083
|
+
intervalValueChanged() {
|
|
30084
|
+
this.#stop();
|
|
30085
|
+
this.#start();
|
|
30086
|
+
}
|
|
30087
|
+
tick() {
|
|
30088
|
+
if (document.hidden) {
|
|
30089
|
+
this.missed = true;
|
|
30090
|
+
return;
|
|
30091
|
+
}
|
|
30092
|
+
this.reload();
|
|
30093
|
+
}
|
|
30094
|
+
reload() {
|
|
30095
|
+
this.missed = false;
|
|
30096
|
+
if (typeof this.element.reload === "function" && this.element.getAttribute("src")) {
|
|
30097
|
+
this.element.reload();
|
|
30098
|
+
}
|
|
30099
|
+
}
|
|
30100
|
+
onVisibility() {
|
|
30101
|
+
if (!document.hidden && this.missed) this.reload();
|
|
30102
|
+
}
|
|
30103
|
+
#start() {
|
|
30104
|
+
if (!(this.intervalValue > 0)) return;
|
|
30105
|
+
this.timer = setInterval(this.tick, this.intervalValue * 1e3);
|
|
30106
|
+
}
|
|
30107
|
+
#stop() {
|
|
30108
|
+
if (this.timer) {
|
|
30109
|
+
clearInterval(this.timer);
|
|
30110
|
+
this.timer = null;
|
|
30111
|
+
}
|
|
30112
|
+
}
|
|
30113
|
+
};
|
|
30114
|
+
|
|
29958
30115
|
// src/js/controllers/register_controllers.js
|
|
29959
30116
|
function register_controllers_default(application2) {
|
|
29960
30117
|
application2.register("password-visibility", password_visibility_controller_default);
|
|
@@ -29999,6 +30156,8 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
29999
30156
|
application2.register("currency-input", currency_input_controller_default);
|
|
30000
30157
|
application2.register("breadcrumbs", breadcrumbs_controller_default);
|
|
30001
30158
|
application2.register("run-progress", run_progress_controller_default);
|
|
30159
|
+
application2.register("chart", chart_controller_default);
|
|
30160
|
+
application2.register("frame-refresh", frame_refresh_controller_default);
|
|
30002
30161
|
}
|
|
30003
30162
|
|
|
30004
30163
|
// src/js/turbo/turbo_actions.js
|
|
@@ -30067,11 +30226,11 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
30067
30226
|
cancelButton = document.createElement("button");
|
|
30068
30227
|
cancelButton.type = "button";
|
|
30069
30228
|
cancelButton.className = "pu-btn pu-btn-md pu-btn-outline";
|
|
30070
|
-
cancelButton.textContent = "
|
|
30229
|
+
cancelButton.textContent = t("plutonium.js.turbo_confirm.cancel");
|
|
30071
30230
|
confirmButton = document.createElement("button");
|
|
30072
30231
|
confirmButton.type = "button";
|
|
30073
30232
|
confirmButton.className = "pu-btn pu-btn-md pu-btn-primary";
|
|
30074
|
-
confirmButton.textContent = "
|
|
30233
|
+
confirmButton.textContent = t("plutonium.js.turbo_confirm.confirm");
|
|
30075
30234
|
footer.appendChild(cancelButton);
|
|
30076
30235
|
footer.appendChild(confirmButton);
|
|
30077
30236
|
dialog.appendChild(header);
|
|
@@ -30086,7 +30245,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
30086
30245
|
}
|
|
30087
30246
|
function themedConfirm(message) {
|
|
30088
30247
|
ensureDialog();
|
|
30089
|
-
messageEl.textContent = message || "
|
|
30248
|
+
messageEl.textContent = message || t("plutonium.js.are_you_sure");
|
|
30090
30249
|
return new Promise((resolve) => {
|
|
30091
30250
|
let settled = false;
|
|
30092
30251
|
const settle = (value) => {
|
|
@@ -30122,6 +30281,12 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
|
30122
30281
|
}
|
|
30123
30282
|
}
|
|
30124
30283
|
|
|
30284
|
+
// src/js/core.js
|
|
30285
|
+
if (typeof window !== "undefined") {
|
|
30286
|
+
window.Plutonium = window.Plutonium || {};
|
|
30287
|
+
window.Plutonium.t = t;
|
|
30288
|
+
}
|
|
30289
|
+
|
|
30125
30290
|
// src/js/plutonium.js
|
|
30126
30291
|
var application = Application.start();
|
|
30127
30292
|
register_controllers_default(application);
|