@supersoniks/concorde 4.9.96 → 4.9.97-visual-stack.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.
- package/README.md +34 -17
- package/build-infos.json +1 -1
- package/concorde-3d.bundle.js +3911 -0
- package/concorde-3d.es.js +32635 -0
- package/concorde-core.bundle.js +147 -147
- package/concorde-core.es.js +4375 -4282
- package/concorde-hugging-face-infer.bundle.js +32 -0
- package/concorde-hugging-face-infer.es.js +2952 -0
- package/concorde-shader.bundle.js +105 -0
- package/concorde-shader.es.js +7982 -0
- package/concorde-webgpu.bundle.js +296 -0
- package/concorde-webgpu.es.js +8268 -0
- package/dist/concorde-3d.bundle.js +3911 -0
- package/dist/concorde-3d.es.js +32635 -0
- package/dist/concorde-core.bundle.js +147 -147
- package/dist/concorde-core.es.js +4375 -4282
- package/dist/concorde-hugging-face-infer.bundle.js +32 -0
- package/dist/concorde-hugging-face-infer.es.js +2952 -0
- package/dist/concorde-shader.bundle.js +105 -0
- package/dist/concorde-shader.es.js +7982 -0
- package/dist/concorde-webgpu.bundle.js +296 -0
- package/dist/concorde-webgpu.es.js +8268 -0
- package/dist/docs/hf-samples/beach.jpg +0 -0
- package/dist/docs/hf-samples/cats.jpg +0 -0
- package/dist/docs/hf-samples/corgi.jpg +0 -0
- package/dist/docs/hf-samples/portrait.jpg +0 -0
- package/dist/docs/hf-samples/scene.jpg +0 -0
- package/dist/docs/hf-samples/singer.jpg +0 -0
- package/dist/docs/shader-samples/color.jpg +0 -0
- package/dist/docs/shader-samples/depth.png +0 -0
- package/dist/docs/shader-samples/impact.jpg +0 -0
- package/dist/docs/shader-samples/video.webm +0 -0
- package/dist/js/addons/3d.js +6 -0
- package/dist/js/addons/3d.js.map +1 -0
- package/dist/js/addons/hugging-face-infer.js +8 -0
- package/dist/js/addons/hugging-face-infer.js.map +1 -0
- package/dist/js/addons/shader.js +6 -0
- package/dist/js/addons/shader.js.map +1 -0
- package/dist/js/addons/webgpu.js +7 -0
- package/dist/js/addons/webgpu.js.map +1 -0
- package/dist/js/components.js +12 -0
- package/dist/js/components.js.map +1 -0
- package/dist/js/concorde-loaded.js +5 -0
- package/dist/js/concorde-loaded.js.map +1 -0
- package/dist/js/core/_types/endpoint.js +5 -0
- package/dist/js/core/_types/endpoint.js.map +1 -0
- package/dist/js/core/_types/key.js +2 -0
- package/dist/js/core/_types/key.js.map +1 -0
- package/dist/js/core/_types/types.js +3 -0
- package/dist/js/core/_types/types.js.map +1 -0
- package/dist/js/core/components/functional/3d/3d.js +151 -0
- package/dist/js/core/components/functional/3d/3d.js.map +1 -0
- package/dist/js/core/components/functional/3d/asset.js +20 -0
- package/dist/js/core/components/functional/3d/asset.js.map +1 -0
- package/dist/js/core/components/functional/3d/boot.js +47 -0
- package/dist/js/core/components/functional/3d/boot.js.map +1 -0
- package/dist/js/core/components/functional/3d/constants.js +88 -0
- package/dist/js/core/components/functional/3d/constants.js.map +1 -0
- package/dist/js/core/components/functional/3d/demo-content.js +38 -0
- package/dist/js/core/components/functional/3d/demo-content.js.map +1 -0
- package/dist/js/core/components/functional/3d/ensure.js +73 -0
- package/dist/js/core/components/functional/3d/ensure.js.map +1 -0
- package/dist/js/core/components/functional/3d/form-bind.js +25 -0
- package/dist/js/core/components/functional/3d/form-bind.js.map +1 -0
- package/dist/js/core/components/functional/3d/form-fields.js +76 -0
- package/dist/js/core/components/functional/3d/form-fields.js.map +1 -0
- package/dist/js/core/components/functional/3d/form-params.js +67 -0
- package/dist/js/core/components/functional/3d/form-params.js.map +1 -0
- package/dist/js/core/components/functional/3d/frame-capture.js +108 -0
- package/dist/js/core/components/functional/3d/frame-capture.js.map +1 -0
- package/dist/js/core/components/functional/3d/gl.js +34 -0
- package/dist/js/core/components/functional/3d/gl.js.map +1 -0
- package/dist/js/core/components/functional/3d/life.js +55 -0
- package/dist/js/core/components/functional/3d/life.js.map +1 -0
- package/dist/js/core/components/functional/3d/load.js +109 -0
- package/dist/js/core/components/functional/3d/load.js.map +1 -0
- package/dist/js/core/components/functional/3d/ops.js +78 -0
- package/dist/js/core/components/functional/3d/ops.js.map +1 -0
- package/dist/js/core/components/functional/3d/opts.js +2 -0
- package/dist/js/core/components/functional/3d/opts.js.map +1 -0
- package/dist/js/core/components/functional/3d/orbit.js +136 -0
- package/dist/js/core/components/functional/3d/orbit.js.map +1 -0
- package/dist/js/core/components/functional/3d/out-publish.js +103 -0
- package/dist/js/core/components/functional/3d/out-publish.js.map +1 -0
- package/dist/js/core/components/functional/3d/parse.js +95 -0
- package/dist/js/core/components/functional/3d/parse.js.map +1 -0
- package/dist/js/core/components/functional/3d/pick.js +62 -0
- package/dist/js/core/components/functional/3d/pick.js.map +1 -0
- package/dist/js/core/components/functional/3d/playback.js +56 -0
- package/dist/js/core/components/functional/3d/playback.js.map +1 -0
- package/dist/js/core/components/functional/3d/pointer.js +58 -0
- package/dist/js/core/components/functional/3d/pointer.js.map +1 -0
- package/dist/js/core/components/functional/3d/props.js +105 -0
- package/dist/js/core/components/functional/3d/props.js.map +1 -0
- package/dist/js/core/components/functional/3d/publisher-listen.js +6 -0
- package/dist/js/core/components/functional/3d/publisher-listen.js.map +1 -0
- package/dist/js/core/components/functional/3d/reload.js +60 -0
- package/dist/js/core/components/functional/3d/reload.js.map +1 -0
- package/dist/js/core/components/functional/3d/runtime.js +116 -0
- package/dist/js/core/components/functional/3d/runtime.js.map +1 -0
- package/dist/js/core/components/functional/3d/scene-runtime.js +6 -0
- package/dist/js/core/components/functional/3d/scene-runtime.js.map +1 -0
- package/dist/js/core/components/functional/3d/snapshot.js +47 -0
- package/dist/js/core/components/functional/3d/snapshot.js.map +1 -0
- package/dist/js/core/components/functional/3d/styles.js +38 -0
- package/dist/js/core/components/functional/3d/styles.js.map +1 -0
- package/dist/js/core/components/functional/3d/tune.js +42 -0
- package/dist/js/core/components/functional/3d/tune.js.map +1 -0
- package/dist/js/core/components/functional/3d/types.js +8 -0
- package/dist/js/core/components/functional/3d/types.js.map +1 -0
- package/dist/js/core/components/functional/3d/updated.js +58 -0
- package/dist/js/core/components/functional/3d/updated.js.map +1 -0
- package/dist/js/core/components/functional/3d/view.js +40 -0
- package/dist/js/core/components/functional/3d/view.js.map +1 -0
- package/dist/js/core/components/functional/3d/wire.js +34 -0
- package/dist/js/core/components/functional/3d/wire.js.map +1 -0
- package/dist/js/core/components/functional/date/date.js +272 -0
- package/dist/js/core/components/functional/date/date.js.map +1 -0
- package/dist/js/core/components/functional/example/example.js +44 -0
- package/dist/js/core/components/functional/example/example.js.map +1 -0
- package/dist/js/core/components/functional/fetch/fetch.js +79 -0
- package/dist/js/core/components/functional/fetch/fetch.js.map +1 -0
- package/dist/js/core/components/functional/functional.js +18 -0
- package/dist/js/core/components/functional/functional.js.map +1 -0
- package/dist/js/core/components/functional/if/if.js +39 -0
- package/dist/js/core/components/functional/if/if.js.map +1 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-cache.js +183 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-cache.js.map +1 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-config.js +50 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-config.js.map +1 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-controller.js +460 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-controller.js.map +1 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-engine.js +116 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-engine.js.map +1 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-input.js +170 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-input.js.map +1 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-protocol.js +2 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-protocol.js.map +1 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-registry.js +367 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-registry.js.map +1 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-schema.js +288 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-schema.js.map +1 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-worker-runtime.js +309 -0
- package/dist/js/core/components/functional/infer/hugging-face/hf-worker-runtime.js.map +1 -0
- package/dist/js/core/components/functional/infer/hugging-face/hugging-face-infer.js +213 -0
- package/dist/js/core/components/functional/infer/hugging-face/hugging-face-infer.js.map +1 -0
- package/dist/js/core/components/functional/infer/hugging-face/hugging-face.js +76 -0
- package/dist/js/core/components/functional/infer/hugging-face/hugging-face.js.map +1 -0
- package/dist/js/core/components/functional/infer/hugging-face/types.js +62 -0
- package/dist/js/core/components/functional/infer/hugging-face/types.js.map +1 -0
- package/dist/js/core/components/functional/jsonata/jsonata.js +119 -0
- package/dist/js/core/components/functional/jsonata/jsonata.js.map +1 -0
- package/dist/js/core/components/functional/list/list.js +341 -0
- package/dist/js/core/components/functional/list/list.js.map +1 -0
- package/dist/js/core/components/functional/mix/mix.js +103 -0
- package/dist/js/core/components/functional/mix/mix.js.map +1 -0
- package/dist/js/core/components/functional/queue/queue.js +450 -0
- package/dist/js/core/components/functional/queue/queue.js.map +1 -0
- package/dist/js/core/components/functional/router/redirect.js +54 -0
- package/dist/js/core/components/functional/router/redirect.js.map +1 -0
- package/dist/js/core/components/functional/router/router.js +179 -0
- package/dist/js/core/components/functional/router/router.js.map +1 -0
- package/dist/js/core/components/functional/sdui/SDUIDescriptorTransformer.js +216 -0
- package/dist/js/core/components/functional/sdui/SDUIDescriptorTransformer.js.map +1 -0
- package/dist/js/core/components/functional/sdui/default-library.json +108 -0
- package/dist/js/core/components/functional/sdui/sdui-utils.js +64 -0
- package/dist/js/core/components/functional/sdui/sdui-utils.js.map +1 -0
- package/dist/js/core/components/functional/sdui/sdui.js +271 -0
- package/dist/js/core/components/functional/sdui/sdui.js.map +1 -0
- package/dist/js/core/components/functional/sdui/types.js +2 -0
- package/dist/js/core/components/functional/sdui/types.js.map +1 -0
- package/dist/js/core/components/functional/shader/gl-runtime.js +603 -0
- package/dist/js/core/components/functional/shader/gl-runtime.js.map +1 -0
- package/dist/js/core/components/functional/shader/shader.js +1593 -0
- package/dist/js/core/components/functional/shader/shader.js.map +1 -0
- package/dist/js/core/components/functional/shader/shadertoy-prelude.js +48 -0
- package/dist/js/core/components/functional/shader/shadertoy-prelude.js.map +1 -0
- package/dist/js/core/components/functional/shader/types.js +179 -0
- package/dist/js/core/components/functional/shader/types.js.map +1 -0
- package/dist/js/core/components/functional/sonic-scope/sonic-scope.js +22 -0
- package/dist/js/core/components/functional/sonic-scope/sonic-scope.js.map +1 -0
- package/dist/js/core/components/functional/states/states.js +172 -0
- package/dist/js/core/components/functional/states/states.js.map +1 -0
- package/dist/js/core/components/functional/submit/submit.js +284 -0
- package/dist/js/core/components/functional/submit/submit.js.map +1 -0
- package/dist/js/core/components/functional/subscriber/subscriber.js +39 -0
- package/dist/js/core/components/functional/subscriber/subscriber.js.map +1 -0
- package/dist/js/core/components/functional/translation/translation.js +28 -0
- package/dist/js/core/components/functional/translation/translation.js.map +1 -0
- package/dist/js/core/components/functional/value/value.js +28 -0
- package/dist/js/core/components/functional/value/value.js.map +1 -0
- package/dist/js/core/components/functional/webgpu/canvas2d-fallback.js +117 -0
- package/dist/js/core/components/functional/webgpu/canvas2d-fallback.js.map +1 -0
- package/dist/js/core/components/functional/webgpu/form-bind.js +92 -0
- package/dist/js/core/components/functional/webgpu/form-bind.js.map +1 -0
- package/dist/js/core/components/functional/webgpu/gl-fallback.js +135 -0
- package/dist/js/core/components/functional/webgpu/gl-fallback.js.map +1 -0
- package/dist/js/core/components/functional/webgpu/gpu-runtime.js +305 -0
- package/dist/js/core/components/functional/webgpu/gpu-runtime.js.map +1 -0
- package/dist/js/core/components/functional/webgpu/helpers.js +44 -0
- package/dist/js/core/components/functional/webgpu/helpers.js.map +1 -0
- package/dist/js/core/components/functional/webgpu/out-frame.js +117 -0
- package/dist/js/core/components/functional/webgpu/out-frame.js.map +1 -0
- package/dist/js/core/components/functional/webgpu/particles-runtime.js +407 -0
- package/dist/js/core/components/functional/webgpu/particles-runtime.js.map +1 -0
- package/dist/js/core/components/functional/webgpu/pointer.js +56 -0
- package/dist/js/core/components/functional/webgpu/pointer.js.map +1 -0
- package/dist/js/core/components/functional/webgpu/types.js +24 -0
- package/dist/js/core/components/functional/webgpu/types.js.map +1 -0
- package/dist/js/core/components/functional/webgpu/webgpu.js +667 -0
- package/dist/js/core/components/functional/webgpu/webgpu.js.map +1 -0
- package/dist/js/core/components/functional/webgpu/wgsl-prelude.js +77 -0
- package/dist/js/core/components/functional/webgpu/wgsl-prelude.js.map +1 -0
- package/dist/js/core/components/ui/_css/scroll.js +27 -0
- package/dist/js/core/components/ui/_css/scroll.js.map +1 -0
- package/dist/js/core/components/ui/_css/shadow.js +22 -0
- package/dist/js/core/components/ui/_css/shadow.js.map +1 -0
- package/dist/js/core/components/ui/_css/size.js +36 -0
- package/dist/js/core/components/ui/_css/size.js.map +1 -0
- package/dist/js/core/components/ui/_css/type.js +92 -0
- package/dist/js/core/components/ui/_css/type.js.map +1 -0
- package/dist/js/core/components/ui/alert/alert.js +213 -0
- package/dist/js/core/components/ui/alert/alert.js.map +1 -0
- package/dist/js/core/components/ui/alert-messages/alert-messages.js +68 -0
- package/dist/js/core/components/ui/alert-messages/alert-messages.js.map +1 -0
- package/dist/js/core/components/ui/badge/badge.js +199 -0
- package/dist/js/core/components/ui/badge/badge.js.map +1 -0
- package/dist/js/core/components/ui/button/button.js +697 -0
- package/dist/js/core/components/ui/button/button.js.map +1 -0
- package/dist/js/core/components/ui/captcha/altchaStyles.js +226 -0
- package/dist/js/core/components/ui/captcha/altchaStyles.js.map +1 -0
- package/dist/js/core/components/ui/captcha/captcha.js +167 -0
- package/dist/js/core/components/ui/captcha/captcha.js.map +1 -0
- package/dist/js/core/components/ui/card/card-footer.js +26 -0
- package/dist/js/core/components/ui/card/card-footer.js.map +1 -0
- package/dist/js/core/components/ui/card/card-header-descripton.js +30 -0
- package/dist/js/core/components/ui/card/card-header-descripton.js.map +1 -0
- package/dist/js/core/components/ui/card/card-header.js +79 -0
- package/dist/js/core/components/ui/card/card-header.js.map +1 -0
- package/dist/js/core/components/ui/card/card-main.js +26 -0
- package/dist/js/core/components/ui/card/card-main.js.map +1 -0
- package/dist/js/core/components/ui/card/card.js +67 -0
- package/dist/js/core/components/ui/card/card.js.map +1 -0
- package/dist/js/core/components/ui/divider/divider.js +200 -0
- package/dist/js/core/components/ui/divider/divider.js.map +1 -0
- package/dist/js/core/components/ui/form/checkbox/checkbox.js +257 -0
- package/dist/js/core/components/ui/form/checkbox/checkbox.js.map +1 -0
- package/dist/js/core/components/ui/form/css/form-control.js +393 -0
- package/dist/js/core/components/ui/form/css/form-control.js.map +1 -0
- package/dist/js/core/components/ui/form/fieldset/fieldset.js +124 -0
- package/dist/js/core/components/ui/form/fieldset/fieldset.js.map +1 -0
- package/dist/js/core/components/ui/form/fieldset/legend-description.js +38 -0
- package/dist/js/core/components/ui/form/fieldset/legend-description.js.map +1 -0
- package/dist/js/core/components/ui/form/fieldset/legend.js +130 -0
- package/dist/js/core/components/ui/form/fieldset/legend.js.map +1 -0
- package/dist/js/core/components/ui/form/form-actions/form-actions.js +47 -0
- package/dist/js/core/components/ui/form/form-actions/form-actions.js.map +1 -0
- package/dist/js/core/components/ui/form/form-layout/form-layout.js +84 -0
- package/dist/js/core/components/ui/form/form-layout/form-layout.js.map +1 -0
- package/dist/js/core/components/ui/form/input/input.js +316 -0
- package/dist/js/core/components/ui/form/input/input.js.map +1 -0
- package/dist/js/core/components/ui/form/input/password-helper.js +134 -0
- package/dist/js/core/components/ui/form/input/password-helper.js.map +1 -0
- package/dist/js/core/components/ui/form/input/same-value-helper.js +85 -0
- package/dist/js/core/components/ui/form/input/same-value-helper.js.map +1 -0
- package/dist/js/core/components/ui/form/input-autocomplete/input-autocomplete.js +405 -0
- package/dist/js/core/components/ui/form/input-autocomplete/input-autocomplete.js.map +1 -0
- package/dist/js/core/components/ui/form/radio/radio.js +63 -0
- package/dist/js/core/components/ui/form/radio/radio.js.map +1 -0
- package/dist/js/core/components/ui/form/select/select.js +323 -0
- package/dist/js/core/components/ui/form/select/select.js.map +1 -0
- package/dist/js/core/components/ui/form/switch/switch.js +90 -0
- package/dist/js/core/components/ui/form/switch/switch.js.map +1 -0
- package/dist/js/core/components/ui/form/textarea/textarea.js +162 -0
- package/dist/js/core/components/ui/form/textarea/textarea.js.map +1 -0
- package/dist/js/core/components/ui/group/group.js +128 -0
- package/dist/js/core/components/ui/group/group.js.map +1 -0
- package/dist/js/core/components/ui/icon/icon.js +145 -0
- package/dist/js/core/components/ui/icon/icon.js.map +1 -0
- package/dist/js/core/components/ui/icon/icons.js +184 -0
- package/dist/js/core/components/ui/icon/icons.js.map +1 -0
- package/dist/js/core/components/ui/icon/icons.json +1 -0
- package/dist/js/core/components/ui/image/image.js +160 -0
- package/dist/js/core/components/ui/image/image.js.map +1 -0
- package/dist/js/core/components/ui/link/link.js +125 -0
- package/dist/js/core/components/ui/link/link.js.map +1 -0
- package/dist/js/core/components/ui/loader/loader.js +106 -0
- package/dist/js/core/components/ui/loader/loader.js.map +1 -0
- package/dist/js/core/components/ui/loader/styles/fixed.js +56 -0
- package/dist/js/core/components/ui/loader/styles/fixed.js.map +1 -0
- package/dist/js/core/components/ui/loader/styles/inline.js +70 -0
- package/dist/js/core/components/ui/loader/styles/inline.js.map +1 -0
- package/dist/js/core/components/ui/menu/menu-item.js +35 -0
- package/dist/js/core/components/ui/menu/menu-item.js.map +1 -0
- package/dist/js/core/components/ui/menu/menu.js +436 -0
- package/dist/js/core/components/ui/menu/menu.js.map +1 -0
- package/dist/js/core/components/ui/modal/modal-actions.js +44 -0
- package/dist/js/core/components/ui/modal/modal-actions.js.map +1 -0
- package/dist/js/core/components/ui/modal/modal-close.js +56 -0
- package/dist/js/core/components/ui/modal/modal-close.js.map +1 -0
- package/dist/js/core/components/ui/modal/modal-content.js +27 -0
- package/dist/js/core/components/ui/modal/modal-content.js.map +1 -0
- package/dist/js/core/components/ui/modal/modal-subtitle.js +34 -0
- package/dist/js/core/components/ui/modal/modal-subtitle.js.map +1 -0
- package/dist/js/core/components/ui/modal/modal-title.js +35 -0
- package/dist/js/core/components/ui/modal/modal-title.js.map +1 -0
- package/dist/js/core/components/ui/modal/modal-utils.js +32 -0
- package/dist/js/core/components/ui/modal/modal-utils.js.map +1 -0
- package/dist/js/core/components/ui/modal/modal.js +568 -0
- package/dist/js/core/components/ui/modal/modal.js.map +1 -0
- package/dist/js/core/components/ui/pop/pop.js +337 -0
- package/dist/js/core/components/ui/pop/pop.js.map +1 -0
- package/dist/js/core/components/ui/progress/progress.js +164 -0
- package/dist/js/core/components/ui/progress/progress.js.map +1 -0
- package/dist/js/core/components/ui/table/table-caption.js +29 -0
- package/dist/js/core/components/ui/table/table-caption.js.map +1 -0
- package/dist/js/core/components/ui/table/table-tbody.js +41 -0
- package/dist/js/core/components/ui/table/table-tbody.js.map +1 -0
- package/dist/js/core/components/ui/table/table-td.js +69 -0
- package/dist/js/core/components/ui/table/table-td.js.map +1 -0
- package/dist/js/core/components/ui/table/table-tfoot.js +28 -0
- package/dist/js/core/components/ui/table/table-tfoot.js.map +1 -0
- package/dist/js/core/components/ui/table/table-th.js +80 -0
- package/dist/js/core/components/ui/table/table-th.js.map +1 -0
- package/dist/js/core/components/ui/table/table-thead.js +26 -0
- package/dist/js/core/components/ui/table/table-thead.js.map +1 -0
- package/dist/js/core/components/ui/table/table-tr.js +67 -0
- package/dist/js/core/components/ui/table/table-tr.js.map +1 -0
- package/dist/js/core/components/ui/table/table.js +106 -0
- package/dist/js/core/components/ui/table/table.js.map +1 -0
- package/dist/js/core/components/ui/theme/theme-collection/core-variables.js +74 -0
- package/dist/js/core/components/ui/theme/theme-collection/core-variables.js.map +1 -0
- package/dist/js/core/components/ui/theme/theme-collection/dark.js +39 -0
- package/dist/js/core/components/ui/theme/theme-collection/dark.js.map +1 -0
- package/dist/js/core/components/ui/theme/theme-collection/light.js +32 -0
- package/dist/js/core/components/ui/theme/theme-collection/light.js.map +1 -0
- package/dist/js/core/components/ui/theme/theme.js +150 -0
- package/dist/js/core/components/ui/theme/theme.js.map +1 -0
- package/dist/js/core/components/ui/toast/message-subscriber.js +41 -0
- package/dist/js/core/components/ui/toast/message-subscriber.js.map +1 -0
- package/dist/js/core/components/ui/toast/toast-item.js +379 -0
- package/dist/js/core/components/ui/toast/toast-item.js.map +1 -0
- package/dist/js/core/components/ui/toast/toast.js +269 -0
- package/dist/js/core/components/ui/toast/toast.js.map +1 -0
- package/dist/js/core/components/ui/toast/types.js +2 -0
- package/dist/js/core/components/ui/toast/types.js.map +1 -0
- package/dist/js/core/components/ui/tooltip/tooltip.js +219 -0
- package/dist/js/core/components/ui/tooltip/tooltip.js.map +1 -0
- package/dist/js/core/components/ui/ui.js +41 -0
- package/dist/js/core/components/ui/ui.js.map +1 -0
- package/dist/js/core/core.js +14 -0
- package/dist/js/core/core.js.map +1 -0
- package/dist/js/core/decorators/Subscriber.js +10 -0
- package/dist/js/core/decorators/Subscriber.js.map +1 -0
- package/dist/js/core/decorators/api.js +806 -0
- package/dist/js/core/decorators/api.js.map +1 -0
- package/dist/js/core/decorators/lifecycle.js +67 -0
- package/dist/js/core/decorators/lifecycle.js.map +1 -0
- package/dist/js/core/decorators/subscriber/ancestorAttribute.js +27 -0
- package/dist/js/core/decorators/subscriber/ancestorAttribute.js.map +1 -0
- package/dist/js/core/decorators/subscriber/autoFill.js +26 -0
- package/dist/js/core/decorators/subscriber/autoFill.js.map +1 -0
- package/dist/js/core/decorators/subscriber/autoSubscribe.js +46 -0
- package/dist/js/core/decorators/subscriber/autoSubscribe.js.map +1 -0
- package/dist/js/core/decorators/subscriber/bind.js +150 -0
- package/dist/js/core/decorators/subscriber/bind.js.map +1 -0
- package/dist/js/core/decorators/subscriber/common.js +44 -0
- package/dist/js/core/decorators/subscriber/common.js.map +1 -0
- package/dist/js/core/decorators/subscriber/derive.js +60 -0
- package/dist/js/core/decorators/subscriber/derive.js.map +1 -0
- package/dist/js/core/decorators/subscriber/dynamicPath.js +75 -0
- package/dist/js/core/decorators/subscriber/dynamicPath.js.map +1 -0
- package/dist/js/core/decorators/subscriber/dynamicPropertyWatch.js +138 -0
- package/dist/js/core/decorators/subscriber/dynamicPropertyWatch.js.map +1 -0
- package/dist/js/core/decorators/subscriber/handle.js +22 -0
- package/dist/js/core/decorators/subscriber/handle.js.map +1 -0
- package/dist/js/core/decorators/subscriber/onAssign.js +199 -0
- package/dist/js/core/decorators/subscriber/onAssign.js.map +1 -0
- package/dist/js/core/decorators/subscriber/publish.js +108 -0
- package/dist/js/core/decorators/subscriber/publish.js.map +1 -0
- package/dist/js/core/decorators/subscriber/publisherPath.js +16 -0
- package/dist/js/core/decorators/subscriber/publisherPath.js.map +1 -0
- package/dist/js/core/decorators/subscriber/subscribe.js +20 -0
- package/dist/js/core/decorators/subscriber/subscribe.js.map +1 -0
- package/dist/js/core/directives/DataProvider.js +127 -0
- package/dist/js/core/directives/DataProvider.js.map +1 -0
- package/dist/js/core/directives/Wording.js +221 -0
- package/dist/js/core/directives/Wording.js.map +1 -0
- package/dist/js/core/mixins/Fetcher.js +325 -0
- package/dist/js/core/mixins/Fetcher.js.map +1 -0
- package/dist/js/core/mixins/FormCheckable.js +313 -0
- package/dist/js/core/mixins/FormCheckable.js.map +1 -0
- package/dist/js/core/mixins/FormElement.js +304 -0
- package/dist/js/core/mixins/FormElement.js.map +1 -0
- package/dist/js/core/mixins/FormInput.js +82 -0
- package/dist/js/core/mixins/FormInput.js.map +1 -0
- package/dist/js/core/mixins/Subscriber.js +354 -0
- package/dist/js/core/mixins/Subscriber.js.map +1 -0
- package/dist/js/core/mixins/TemplatesContainer.js +70 -0
- package/dist/js/core/mixins/TemplatesContainer.js.map +1 -0
- package/dist/js/core/mixins/mixins.js +7 -0
- package/dist/js/core/mixins/mixins.js.map +1 -0
- package/dist/js/core/utils/AncestorAttributeObserver.js +140 -0
- package/dist/js/core/utils/AncestorAttributeObserver.js.map +1 -0
- package/dist/js/core/utils/Arrays.js +141 -0
- package/dist/js/core/utils/Arrays.js.map +1 -0
- package/dist/js/core/utils/DataBindObserver.js +265 -0
- package/dist/js/core/utils/DataBindObserver.js.map +1 -0
- package/dist/js/core/utils/Electron.js +14 -0
- package/dist/js/core/utils/Electron.js.map +1 -0
- package/dist/js/core/utils/Format.js +43 -0
- package/dist/js/core/utils/Format.js.map +1 -0
- package/dist/js/core/utils/HTML.js +307 -0
- package/dist/js/core/utils/HTML.js.map +1 -0
- package/dist/js/core/utils/LocationHandler.js +143 -0
- package/dist/js/core/utils/LocationHandler.js.map +1 -0
- package/dist/js/core/utils/Objects.js +111 -0
- package/dist/js/core/utils/Objects.js.map +1 -0
- package/dist/js/core/utils/PublisherProxy.js +970 -0
- package/dist/js/core/utils/PublisherProxy.js.map +1 -0
- package/dist/js/core/utils/SafariScrollGuard.js +384 -0
- package/dist/js/core/utils/SafariScrollGuard.js.map +1 -0
- package/dist/js/core/utils/Utils.js +19 -0
- package/dist/js/core/utils/Utils.js.map +1 -0
- package/dist/js/core/utils/aesCrypto.js +98 -0
- package/dist/js/core/utils/aesCrypto.js.map +1 -0
- package/dist/js/core/utils/api.js +595 -0
- package/dist/js/core/utils/api.js.map +1 -0
- package/dist/js/core/utils/dataProviderKey.js +64 -0
- package/dist/js/core/utils/dataProviderKey.js.map +1 -0
- package/dist/js/core/utils/derive.js +246 -0
- package/dist/js/core/utils/derive.js.map +1 -0
- package/dist/js/core/utils/endpoint.js +74 -0
- package/dist/js/core/utils/endpoint.js.map +1 -0
- package/dist/js/core/utils/jsonataHelpers.js +84 -0
- package/dist/js/core/utils/jsonataHelpers.js.map +1 -0
- package/dist/js/core/utils/jsonataRuntime.js +75 -0
- package/dist/js/core/utils/jsonataRuntime.js.map +1 -0
- package/dist/js/core/utils/mediaRef.js +120 -0
- package/dist/js/core/utils/mediaRef.js.map +1 -0
- package/dist/js/core/utils/route.js +149 -0
- package/dist/js/core/utils/route.js.map +1 -0
- package/dist/js/core/utils/similarity.js +44 -0
- package/dist/js/core/utils/similarity.js.map +1 -0
- package/dist/js/core/utils/url-pattern.js +3 -0
- package/dist/js/core/utils/url-pattern.js.map +1 -0
- package/dist/js/dataprovider.js +2 -0
- package/dist/js/dataprovider.js.map +1 -0
- package/dist/js/decorators.js +43 -0
- package/dist/js/decorators.js.map +1 -0
- package/dist/js/directives.js +30 -0
- package/dist/js/directives.js.map +1 -0
- package/dist/js/index.js +8 -0
- package/dist/js/index.js.map +1 -0
- package/dist/js/mixins.js +23 -0
- package/dist/js/mixins.js.map +1 -0
- package/dist/js/test-utils/TestUtils.js +10 -0
- package/dist/js/test-utils/TestUtils.js.map +1 -0
- package/dist/js/utils.js +46 -0
- package/dist/js/utils.js.map +1 -0
- package/dist/types/addons/3d.d.ts +6 -0
- package/dist/types/addons/3d.d.ts.map +1 -0
- package/dist/types/addons/hugging-face-infer.d.ts +8 -0
- package/dist/types/addons/hugging-face-infer.d.ts.map +1 -0
- package/dist/types/addons/shader.d.ts +6 -0
- package/dist/types/addons/shader.d.ts.map +1 -0
- package/dist/types/addons/webgpu.d.ts +7 -0
- package/dist/types/addons/webgpu.d.ts.map +1 -0
- package/dist/types/components.d.ts +5 -0
- package/dist/types/components.d.ts.map +1 -0
- package/dist/types/concorde-loaded.d.ts +2 -0
- package/dist/types/concorde-loaded.d.ts.map +1 -0
- package/dist/types/core/_types/endpoint.d.ts +5 -0
- package/dist/types/core/_types/endpoint.d.ts.map +1 -0
- package/dist/types/core/_types/key.d.ts +2 -0
- package/dist/types/core/_types/key.d.ts.map +1 -0
- package/dist/types/core/_types/types.d.ts +28 -0
- package/dist/types/core/_types/types.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/3d.d.ts +66 -0
- package/dist/types/core/components/functional/3d/3d.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/asset.d.ts +12 -0
- package/dist/types/core/components/functional/3d/asset.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/boot.d.ts +23 -0
- package/dist/types/core/components/functional/3d/boot.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/constants.d.ts +43 -0
- package/dist/types/core/components/functional/3d/constants.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/demo-content.d.ts +10 -0
- package/dist/types/core/components/functional/3d/demo-content.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/ensure.d.ts +36 -0
- package/dist/types/core/components/functional/3d/ensure.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/form-bind.d.ts +20 -0
- package/dist/types/core/components/functional/3d/form-bind.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/form-fields.d.ts +14 -0
- package/dist/types/core/components/functional/3d/form-fields.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/form-params.d.ts +37 -0
- package/dist/types/core/components/functional/3d/form-params.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/frame-capture.d.ts +33 -0
- package/dist/types/core/components/functional/3d/frame-capture.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/gl.d.ts +4 -0
- package/dist/types/core/components/functional/3d/gl.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/life.d.ts +41 -0
- package/dist/types/core/components/functional/3d/life.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/load.d.ts +36 -0
- package/dist/types/core/components/functional/3d/load.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/ops.d.ts +48 -0
- package/dist/types/core/components/functional/3d/ops.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/opts.d.ts +16 -0
- package/dist/types/core/components/functional/3d/opts.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/orbit.d.ts +55 -0
- package/dist/types/core/components/functional/3d/orbit.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/out-publish.d.ts +47 -0
- package/dist/types/core/components/functional/3d/out-publish.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/parse.d.ts +23 -0
- package/dist/types/core/components/functional/3d/parse.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/pick.d.ts +32 -0
- package/dist/types/core/components/functional/3d/pick.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/playback.d.ts +26 -0
- package/dist/types/core/components/functional/3d/playback.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/pointer.d.ts +27 -0
- package/dist/types/core/components/functional/3d/pointer.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/props.d.ts +30 -0
- package/dist/types/core/components/functional/3d/props.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/publisher-listen.d.ts +8 -0
- package/dist/types/core/components/functional/3d/publisher-listen.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/reload.d.ts +35 -0
- package/dist/types/core/components/functional/3d/reload.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/runtime.d.ts +75 -0
- package/dist/types/core/components/functional/3d/runtime.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/scene-runtime.d.ts +6 -0
- package/dist/types/core/components/functional/3d/scene-runtime.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/snapshot.d.ts +29 -0
- package/dist/types/core/components/functional/3d/snapshot.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/styles.d.ts +2 -0
- package/dist/types/core/components/functional/3d/styles.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/tune.d.ts +32 -0
- package/dist/types/core/components/functional/3d/tune.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/types.d.ts +133 -0
- package/dist/types/core/components/functional/3d/types.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/updated.d.ts +7 -0
- package/dist/types/core/components/functional/3d/updated.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/view.d.ts +25 -0
- package/dist/types/core/components/functional/3d/view.d.ts.map +1 -0
- package/dist/types/core/components/functional/3d/wire.d.ts +32 -0
- package/dist/types/core/components/functional/3d/wire.d.ts.map +1 -0
- package/dist/types/core/components/functional/date/date.d.ts +52 -0
- package/dist/types/core/components/functional/date/date.d.ts.map +1 -0
- package/dist/types/core/components/functional/example/example.d.ts +15 -0
- package/dist/types/core/components/functional/example/example.d.ts.map +1 -0
- package/dist/types/core/components/functional/fetch/fetch.d.ts +102 -0
- package/dist/types/core/components/functional/fetch/fetch.d.ts.map +1 -0
- package/dist/types/core/components/functional/functional.d.ts +18 -0
- package/dist/types/core/components/functional/functional.d.ts.map +1 -0
- package/dist/types/core/components/functional/if/if.d.ts +13 -0
- package/dist/types/core/components/functional/if/if.d.ts.map +1 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-cache.d.ts +21 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-cache.d.ts.map +1 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-config.d.ts +133 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-config.d.ts.map +1 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-controller.d.ts +79 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-controller.d.ts.map +1 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-engine.d.ts +43 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-engine.d.ts.map +1 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-input.d.ts +47 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-input.d.ts.map +1 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-protocol.d.ts +95 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-protocol.d.ts.map +1 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-registry.d.ts +77 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-registry.d.ts.map +1 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-schema.d.ts +1251 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-schema.d.ts.map +1 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-worker-runtime.d.ts +56 -0
- package/dist/types/core/components/functional/infer/hugging-face/hf-worker-runtime.d.ts.map +1 -0
- package/dist/types/core/components/functional/infer/hugging-face/hugging-face-infer.d.ts +67 -0
- package/dist/types/core/components/functional/infer/hugging-face/hugging-face-infer.d.ts.map +1 -0
- package/dist/types/core/components/functional/infer/hugging-face/hugging-face.d.ts +116 -0
- package/dist/types/core/components/functional/infer/hugging-face/hugging-face.d.ts.map +1 -0
- package/dist/types/core/components/functional/infer/hugging-face/types.d.ts +167 -0
- package/dist/types/core/components/functional/infer/hugging-face/types.d.ts.map +1 -0
- package/dist/types/core/components/functional/jsonata/jsonata.d.ts +29 -0
- package/dist/types/core/components/functional/jsonata/jsonata.d.ts.map +1 -0
- package/dist/types/core/components/functional/list/list.d.ts +149 -0
- package/dist/types/core/components/functional/list/list.d.ts.map +1 -0
- package/dist/types/core/components/functional/mix/mix.d.ts +23 -0
- package/dist/types/core/components/functional/mix/mix.d.ts.map +1 -0
- package/dist/types/core/components/functional/queue/queue.d.ts +93 -0
- package/dist/types/core/components/functional/queue/queue.d.ts.map +1 -0
- package/dist/types/core/components/functional/router/redirect.d.ts +19 -0
- package/dist/types/core/components/functional/router/redirect.d.ts.map +1 -0
- package/dist/types/core/components/functional/router/router.d.ts +46 -0
- package/dist/types/core/components/functional/router/router.d.ts.map +1 -0
- package/dist/types/core/components/functional/sdui/SDUIDescriptorTransformer.d.ts +59 -0
- package/dist/types/core/components/functional/sdui/SDUIDescriptorTransformer.d.ts.map +1 -0
- package/dist/types/core/components/functional/sdui/sdui-utils.d.ts +6 -0
- package/dist/types/core/components/functional/sdui/sdui-utils.d.ts.map +1 -0
- package/dist/types/core/components/functional/sdui/sdui.d.ts +148 -0
- package/dist/types/core/components/functional/sdui/sdui.d.ts.map +1 -0
- package/dist/types/core/components/functional/sdui/types.d.ts +38 -0
- package/dist/types/core/components/functional/sdui/types.d.ts.map +1 -0
- package/dist/types/core/components/functional/shader/gl-runtime.d.ts +71 -0
- package/dist/types/core/components/functional/shader/gl-runtime.d.ts.map +1 -0
- package/dist/types/core/components/functional/shader/shader.d.ts +274 -0
- package/dist/types/core/components/functional/shader/shader.d.ts.map +1 -0
- package/dist/types/core/components/functional/shader/shadertoy-prelude.d.ts +6 -0
- package/dist/types/core/components/functional/shader/shadertoy-prelude.d.ts.map +1 -0
- package/dist/types/core/components/functional/shader/types.d.ts +256 -0
- package/dist/types/core/components/functional/shader/types.d.ts.map +1 -0
- package/dist/types/core/components/functional/sonic-scope/sonic-scope.d.ts +6 -0
- package/dist/types/core/components/functional/sonic-scope/sonic-scope.d.ts.map +1 -0
- package/dist/types/core/components/functional/states/states.d.ts +42 -0
- package/dist/types/core/components/functional/states/states.d.ts.map +1 -0
- package/dist/types/core/components/functional/submit/submit.d.ts +37 -0
- package/dist/types/core/components/functional/submit/submit.d.ts.map +1 -0
- package/dist/types/core/components/functional/subscriber/subscriber.d.ts +13 -0
- package/dist/types/core/components/functional/subscriber/subscriber.d.ts.map +1 -0
- package/dist/types/core/components/functional/translation/translation.d.ts +7 -0
- package/dist/types/core/components/functional/translation/translation.d.ts.map +1 -0
- package/dist/types/core/components/functional/value/value.d.ts +8 -0
- package/dist/types/core/components/functional/value/value.d.ts.map +1 -0
- package/dist/types/core/components/functional/webgpu/canvas2d-fallback.d.ts +29 -0
- package/dist/types/core/components/functional/webgpu/canvas2d-fallback.d.ts.map +1 -0
- package/dist/types/core/components/functional/webgpu/form-bind.d.ts +43 -0
- package/dist/types/core/components/functional/webgpu/form-bind.d.ts.map +1 -0
- package/dist/types/core/components/functional/webgpu/gl-fallback.d.ts +31 -0
- package/dist/types/core/components/functional/webgpu/gl-fallback.d.ts.map +1 -0
- package/dist/types/core/components/functional/webgpu/gpu-runtime.d.ts +53 -0
- package/dist/types/core/components/functional/webgpu/gpu-runtime.d.ts.map +1 -0
- package/dist/types/core/components/functional/webgpu/helpers.d.ts +9 -0
- package/dist/types/core/components/functional/webgpu/helpers.d.ts.map +1 -0
- package/dist/types/core/components/functional/webgpu/out-frame.d.ts +29 -0
- package/dist/types/core/components/functional/webgpu/out-frame.d.ts.map +1 -0
- package/dist/types/core/components/functional/webgpu/particles-runtime.d.ts +37 -0
- package/dist/types/core/components/functional/webgpu/particles-runtime.d.ts.map +1 -0
- package/dist/types/core/components/functional/webgpu/pointer.d.ts +41 -0
- package/dist/types/core/components/functional/webgpu/pointer.d.ts.map +1 -0
- package/dist/types/core/components/functional/webgpu/types.d.ts +75 -0
- package/dist/types/core/components/functional/webgpu/types.d.ts.map +1 -0
- package/dist/types/core/components/functional/webgpu/webgpu.d.ts +123 -0
- package/dist/types/core/components/functional/webgpu/webgpu.d.ts.map +1 -0
- package/dist/types/core/components/functional/webgpu/wgsl-prelude.d.ts +8 -0
- package/dist/types/core/components/functional/webgpu/wgsl-prelude.d.ts.map +1 -0
- package/dist/types/core/components/ui/_css/scroll.d.ts +2 -0
- package/dist/types/core/components/ui/_css/scroll.d.ts.map +1 -0
- package/dist/types/core/components/ui/_css/shadow.d.ts +3 -0
- package/dist/types/core/components/ui/_css/shadow.d.ts.map +1 -0
- package/dist/types/core/components/ui/_css/size.d.ts +3 -0
- package/dist/types/core/components/ui/_css/size.d.ts.map +1 -0
- package/dist/types/core/components/ui/_css/type.d.ts +3 -0
- package/dist/types/core/components/ui/_css/type.d.ts.map +1 -0
- package/dist/types/core/components/ui/alert/alert.d.ts +37 -0
- package/dist/types/core/components/ui/alert/alert.d.ts.map +1 -0
- package/dist/types/core/components/ui/alert-messages/alert-messages.d.ts +15 -0
- package/dist/types/core/components/ui/alert-messages/alert-messages.d.ts.map +1 -0
- package/dist/types/core/components/ui/badge/badge.d.ts +27 -0
- package/dist/types/core/components/ui/badge/badge.d.ts.map +1 -0
- package/dist/types/core/components/ui/button/button.d.ts +180 -0
- package/dist/types/core/components/ui/button/button.d.ts.map +1 -0
- package/dist/types/core/components/ui/captcha/altchaStyles.d.ts +2 -0
- package/dist/types/core/components/ui/captcha/altchaStyles.d.ts.map +1 -0
- package/dist/types/core/components/ui/captcha/captcha.d.ts +30 -0
- package/dist/types/core/components/ui/captcha/captcha.d.ts.map +1 -0
- package/dist/types/core/components/ui/card/card-footer.d.ts +6 -0
- package/dist/types/core/components/ui/card/card-footer.d.ts.map +1 -0
- package/dist/types/core/components/ui/card/card-header-descripton.d.ts +6 -0
- package/dist/types/core/components/ui/card/card-header-descripton.d.ts.map +1 -0
- package/dist/types/core/components/ui/card/card-header.d.ts +9 -0
- package/dist/types/core/components/ui/card/card-header.d.ts.map +1 -0
- package/dist/types/core/components/ui/card/card-main.d.ts +6 -0
- package/dist/types/core/components/ui/card/card-main.d.ts.map +1 -0
- package/dist/types/core/components/ui/card/card.d.ts +13 -0
- package/dist/types/core/components/ui/card/card.d.ts.map +1 -0
- package/dist/types/core/components/ui/divider/divider.d.ts +16 -0
- package/dist/types/core/components/ui/divider/divider.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/checkbox/checkbox.d.ts +176 -0
- package/dist/types/core/components/ui/form/checkbox/checkbox.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/css/form-control.d.ts +5 -0
- package/dist/types/core/components/ui/form/css/form-control.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/fieldset/fieldset.d.ts +24 -0
- package/dist/types/core/components/ui/form/fieldset/fieldset.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/fieldset/legend-description.d.ts +6 -0
- package/dist/types/core/components/ui/form/fieldset/legend-description.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/fieldset/legend.d.ts +17 -0
- package/dist/types/core/components/ui/form/fieldset/legend.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/form-actions/form-actions.d.ts +8 -0
- package/dist/types/core/components/ui/form/form-actions/form-actions.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/form-layout/form-layout.d.ts +13 -0
- package/dist/types/core/components/ui/form/form-layout/form-layout.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/input/input.d.ts +123 -0
- package/dist/types/core/components/ui/form/input/input.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/input/password-helper.d.ts +26 -0
- package/dist/types/core/components/ui/form/input/password-helper.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/input/same-value-helper.d.ts +17 -0
- package/dist/types/core/components/ui/form/input/same-value-helper.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +155 -0
- package/dist/types/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/radio/radio.d.ts +15 -0
- package/dist/types/core/components/ui/form/radio/radio.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/select/select.d.ts +59 -0
- package/dist/types/core/components/ui/form/select/select.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/switch/switch.d.ts +6 -0
- package/dist/types/core/components/ui/form/switch/switch.d.ts.map +1 -0
- package/dist/types/core/components/ui/form/textarea/textarea.d.ts +94 -0
- package/dist/types/core/components/ui/form/textarea/textarea.d.ts.map +1 -0
- package/dist/types/core/components/ui/group/group.d.ts +17 -0
- package/dist/types/core/components/ui/group/group.d.ts.map +1 -0
- package/dist/types/core/components/ui/icon/icon.d.ts +30 -0
- package/dist/types/core/components/ui/icon/icon.d.ts.map +1 -0
- package/dist/types/core/components/ui/icon/icons.d.ts +13 -0
- package/dist/types/core/components/ui/icon/icons.d.ts.map +1 -0
- package/dist/types/core/components/ui/image/image.d.ts +16 -0
- package/dist/types/core/components/ui/image/image.d.ts.map +1 -0
- package/dist/types/core/components/ui/link/link.d.ts +30 -0
- package/dist/types/core/components/ui/link/link.d.ts.map +1 -0
- package/dist/types/core/components/ui/loader/loader.d.ts +24 -0
- package/dist/types/core/components/ui/loader/loader.d.ts.map +1 -0
- package/dist/types/core/components/ui/loader/styles/fixed.d.ts +2 -0
- package/dist/types/core/components/ui/loader/styles/fixed.d.ts.map +1 -0
- package/dist/types/core/components/ui/loader/styles/inline.d.ts +2 -0
- package/dist/types/core/components/ui/loader/styles/inline.d.ts.map +1 -0
- package/dist/types/core/components/ui/menu/menu-item.d.ts +6 -0
- package/dist/types/core/components/ui/menu/menu-item.d.ts.map +1 -0
- package/dist/types/core/components/ui/menu/menu.d.ts +52 -0
- package/dist/types/core/components/ui/menu/menu.d.ts.map +1 -0
- package/dist/types/core/components/ui/modal/modal-actions.d.ts +9 -0
- package/dist/types/core/components/ui/modal/modal-actions.d.ts.map +1 -0
- package/dist/types/core/components/ui/modal/modal-close.d.ts +11 -0
- package/dist/types/core/components/ui/modal/modal-close.d.ts.map +1 -0
- package/dist/types/core/components/ui/modal/modal-content.d.ts +6 -0
- package/dist/types/core/components/ui/modal/modal-content.d.ts.map +1 -0
- package/dist/types/core/components/ui/modal/modal-subtitle.d.ts +6 -0
- package/dist/types/core/components/ui/modal/modal-subtitle.d.ts.map +1 -0
- package/dist/types/core/components/ui/modal/modal-title.d.ts +6 -0
- package/dist/types/core/components/ui/modal/modal-title.d.ts.map +1 -0
- package/dist/types/core/components/ui/modal/modal-utils.d.ts +4 -0
- package/dist/types/core/components/ui/modal/modal-utils.d.ts.map +1 -0
- package/dist/types/core/components/ui/modal/modal.d.ts +79 -0
- package/dist/types/core/components/ui/modal/modal.d.ts.map +1 -0
- package/dist/types/core/components/ui/pop/pop.d.ts +42 -0
- package/dist/types/core/components/ui/pop/pop.d.ts.map +1 -0
- package/dist/types/core/components/ui/progress/progress.d.ts +12 -0
- package/dist/types/core/components/ui/progress/progress.d.ts.map +1 -0
- package/dist/types/core/components/ui/table/table-caption.d.ts +6 -0
- package/dist/types/core/components/ui/table/table-caption.d.ts.map +1 -0
- package/dist/types/core/components/ui/table/table-tbody.d.ts +6 -0
- package/dist/types/core/components/ui/table/table-tbody.d.ts.map +1 -0
- package/dist/types/core/components/ui/table/table-td.d.ts +13 -0
- package/dist/types/core/components/ui/table/table-td.d.ts.map +1 -0
- package/dist/types/core/components/ui/table/table-tfoot.d.ts +6 -0
- package/dist/types/core/components/ui/table/table-tfoot.d.ts.map +1 -0
- package/dist/types/core/components/ui/table/table-th.d.ts +12 -0
- package/dist/types/core/components/ui/table/table-th.d.ts.map +1 -0
- package/dist/types/core/components/ui/table/table-thead.d.ts +6 -0
- package/dist/types/core/components/ui/table/table-thead.d.ts.map +1 -0
- package/dist/types/core/components/ui/table/table-tr.d.ts +14 -0
- package/dist/types/core/components/ui/table/table-tr.d.ts.map +1 -0
- package/dist/types/core/components/ui/table/table.d.ts +18 -0
- package/dist/types/core/components/ui/table/table.d.ts.map +1 -0
- package/dist/types/core/components/ui/theme/theme-collection/core-variables.d.ts +2 -0
- package/dist/types/core/components/ui/theme/theme-collection/core-variables.d.ts.map +1 -0
- package/dist/types/core/components/ui/theme/theme-collection/dark.d.ts +2 -0
- package/dist/types/core/components/ui/theme/theme-collection/dark.d.ts.map +1 -0
- package/dist/types/core/components/ui/theme/theme-collection/light.d.ts +2 -0
- package/dist/types/core/components/ui/theme/theme-collection/light.d.ts.map +1 -0
- package/dist/types/core/components/ui/theme/theme.d.ts +20 -0
- package/dist/types/core/components/ui/theme/theme.d.ts.map +1 -0
- package/dist/types/core/components/ui/toast/message-subscriber.d.ts +19 -0
- package/dist/types/core/components/ui/toast/message-subscriber.d.ts.map +1 -0
- package/dist/types/core/components/ui/toast/toast-item.d.ts +41 -0
- package/dist/types/core/components/ui/toast/toast-item.d.ts.map +1 -0
- package/dist/types/core/components/ui/toast/toast.d.ts +28 -0
- package/dist/types/core/components/ui/toast/toast.d.ts.map +1 -0
- package/dist/types/core/components/ui/toast/types.d.ts +12 -0
- package/dist/types/core/components/ui/toast/types.d.ts.map +1 -0
- package/dist/types/core/components/ui/tooltip/tooltip.d.ts +21 -0
- package/dist/types/core/components/ui/tooltip/tooltip.d.ts.map +1 -0
- package/dist/types/core/components/ui/ui.d.ts +35 -0
- package/dist/types/core/components/ui/ui.d.ts.map +1 -0
- package/dist/types/core/core.d.ts +5 -0
- package/dist/types/core/core.d.ts.map +1 -0
- package/dist/types/core/decorators/Subscriber.d.ts +13 -0
- package/dist/types/core/decorators/Subscriber.d.ts.map +1 -0
- package/dist/types/core/decorators/api.d.ts +155 -0
- package/dist/types/core/decorators/api.d.ts.map +1 -0
- package/dist/types/core/decorators/lifecycle.d.ts +19 -0
- package/dist/types/core/decorators/lifecycle.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/ancestorAttribute.d.ts +11 -0
- package/dist/types/core/decorators/subscriber/ancestorAttribute.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/autoFill.d.ts +2 -0
- package/dist/types/core/decorators/subscriber/autoFill.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/autoSubscribe.d.ts +2 -0
- package/dist/types/core/decorators/subscriber/autoSubscribe.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/bind.d.ts +28 -0
- package/dist/types/core/decorators/subscriber/bind.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/common.d.ts +14 -0
- package/dist/types/core/decorators/subscriber/common.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/derive.d.ts +30 -0
- package/dist/types/core/decorators/subscriber/derive.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/dynamicPath.d.ts +23 -0
- package/dist/types/core/decorators/subscriber/dynamicPath.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/dynamicPropertyWatch.d.ts +42 -0
- package/dist/types/core/decorators/subscriber/dynamicPropertyWatch.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/handle.d.ts +74 -0
- package/dist/types/core/decorators/subscriber/handle.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/onAssign.d.ts +53 -0
- package/dist/types/core/decorators/subscriber/onAssign.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/publish.d.ts +23 -0
- package/dist/types/core/decorators/subscriber/publish.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/publisherPath.d.ts +3 -0
- package/dist/types/core/decorators/subscriber/publisherPath.d.ts.map +1 -0
- package/dist/types/core/decorators/subscriber/subscribe.d.ts +20 -0
- package/dist/types/core/decorators/subscriber/subscribe.d.ts.map +1 -0
- package/dist/types/core/directives/DataProvider.d.ts +45 -0
- package/dist/types/core/directives/DataProvider.d.ts.map +1 -0
- package/dist/types/core/directives/Wording.d.ts +44 -0
- package/dist/types/core/directives/Wording.d.ts.map +1 -0
- package/dist/types/core/mixins/Fetcher.d.ts +108 -0
- package/dist/types/core/mixins/Fetcher.d.ts.map +1 -0
- package/dist/types/core/mixins/FormCheckable.d.ts +95 -0
- package/dist/types/core/mixins/FormCheckable.d.ts.map +1 -0
- package/dist/types/core/mixins/FormElement.d.ts +37 -0
- package/dist/types/core/mixins/FormElement.d.ts.map +1 -0
- package/dist/types/core/mixins/FormInput.d.ts +79 -0
- package/dist/types/core/mixins/FormInput.d.ts.map +1 -0
- package/dist/types/core/mixins/Subscriber.d.ts +38 -0
- package/dist/types/core/mixins/Subscriber.d.ts.map +1 -0
- package/dist/types/core/mixins/TemplatesContainer.d.ts +14 -0
- package/dist/types/core/mixins/TemplatesContainer.d.ts.map +1 -0
- package/dist/types/core/mixins/mixins.d.ts +7 -0
- package/dist/types/core/mixins/mixins.d.ts.map +1 -0
- package/dist/types/core/utils/AncestorAttributeObserver.d.ts +38 -0
- package/dist/types/core/utils/AncestorAttributeObserver.d.ts.map +1 -0
- package/dist/types/core/utils/Arrays.d.ts +98 -0
- package/dist/types/core/utils/Arrays.d.ts.map +1 -0
- package/dist/types/core/utils/DataBindObserver.d.ts +84 -0
- package/dist/types/core/utils/DataBindObserver.d.ts.map +1 -0
- package/dist/types/core/utils/Electron.d.ts +8 -0
- package/dist/types/core/utils/Electron.d.ts.map +1 -0
- package/dist/types/core/utils/Format.d.ts +13 -0
- package/dist/types/core/utils/Format.d.ts.map +1 -0
- package/dist/types/core/utils/HTML.d.ts +59 -0
- package/dist/types/core/utils/HTML.d.ts.map +1 -0
- package/dist/types/core/utils/LocationHandler.d.ts +48 -0
- package/dist/types/core/utils/LocationHandler.d.ts.map +1 -0
- package/dist/types/core/utils/Objects.d.ts +31 -0
- package/dist/types/core/utils/Objects.d.ts.map +1 -0
- package/dist/types/core/utils/PublisherProxy.d.ts +230 -0
- package/dist/types/core/utils/PublisherProxy.d.ts.map +1 -0
- package/dist/types/core/utils/SafariScrollGuard.d.ts +36 -0
- package/dist/types/core/utils/SafariScrollGuard.d.ts.map +1 -0
- package/dist/types/core/utils/Utils.d.ts +6 -0
- package/dist/types/core/utils/Utils.d.ts.map +1 -0
- package/dist/types/core/utils/aesCrypto.d.ts +53 -0
- package/dist/types/core/utils/aesCrypto.d.ts.map +1 -0
- package/dist/types/core/utils/api.d.ts +173 -0
- package/dist/types/core/utils/api.d.ts.map +1 -0
- package/dist/types/core/utils/dataProviderKey.d.ts +56 -0
- package/dist/types/core/utils/dataProviderKey.d.ts.map +1 -0
- package/dist/types/core/utils/derive.d.ts +40 -0
- package/dist/types/core/utils/derive.d.ts.map +1 -0
- package/dist/types/core/utils/endpoint.d.ts +37 -0
- package/dist/types/core/utils/endpoint.d.ts.map +1 -0
- package/dist/types/core/utils/jsonataHelpers.d.ts +15 -0
- package/dist/types/core/utils/jsonataHelpers.d.ts.map +1 -0
- package/dist/types/core/utils/jsonataRuntime.d.ts +13 -0
- package/dist/types/core/utils/jsonataRuntime.d.ts.map +1 -0
- package/dist/types/core/utils/mediaRef.d.ts +34 -0
- package/dist/types/core/utils/mediaRef.d.ts.map +1 -0
- package/dist/types/core/utils/route.d.ts +41 -0
- package/dist/types/core/utils/route.d.ts.map +1 -0
- package/dist/types/core/utils/similarity.d.ts +15 -0
- package/dist/types/core/utils/similarity.d.ts.map +1 -0
- package/dist/types/core/utils/url-pattern.d.ts +3 -0
- package/dist/types/core/utils/url-pattern.d.ts.map +1 -0
- package/dist/types/dataprovider.d.ts +2 -0
- package/dist/types/dataprovider.d.ts.map +1 -0
- package/dist/types/decorators.d.ts +30 -0
- package/dist/types/decorators.d.ts.map +1 -0
- package/dist/types/directives.d.ts +21 -0
- package/dist/types/directives.d.ts.map +1 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/mixins.d.ts +204 -0
- package/dist/types/mixins.d.ts.map +1 -0
- package/dist/types/test-utils/TestUtils.d.ts +4 -0
- package/dist/types/test-utils/TestUtils.d.ts.map +1 -0
- package/dist/types/utils.d.ts +20 -0
- package/dist/types/utils.d.ts.map +1 -0
- package/package.json +1780 -382
- package/public/docs/hf-samples/beach.jpg +0 -0
- package/public/docs/hf-samples/cats.jpg +0 -0
- package/public/docs/hf-samples/corgi.jpg +0 -0
- package/public/docs/hf-samples/portrait.jpg +0 -0
- package/public/docs/hf-samples/scene.jpg +0 -0
- package/public/docs/hf-samples/singer.jpg +0 -0
- package/public/docs/shader-samples/color.jpg +0 -0
- package/public/docs/shader-samples/depth.png +0 -0
- package/public/docs/shader-samples/impact.jpg +0 -0
- package/public/docs/shader-samples/video.webm +0 -0
- package/scripts/build-addons.mjs +26 -0
- package/scripts/gen-shader-depth.mjs +85 -0
- package/scripts/gen-shader-harris-video.mjs +17 -0
- package/scripts/gen-shader-harris-video.py +84 -0
- package/scripts/hf-vendor.mjs +154 -0
- package/scripts/post-build.mjs +116 -10
- package/scripts/pre-build.mjs +119 -36
- package/scripts/pre-publish.mjs +76 -54
- package/src/addons/3d.ts +5 -0
- package/src/addons/hugging-face-infer.ts +11 -0
- package/src/addons/shader.ts +5 -0
- package/src/addons/webgpu.ts +15 -0
- package/src/core/components/functional/3d/3d.md +118 -0
- package/src/core/components/functional/3d/3d.spec.ts +171 -0
- package/src/core/components/functional/3d/3d.ts +175 -0
- package/src/core/components/functional/3d/asset.ts +22 -0
- package/src/core/components/functional/3d/boot.ts +77 -0
- package/src/core/components/functional/3d/constants.ts +98 -0
- package/src/core/components/functional/3d/demo-content.ts +45 -0
- package/src/core/components/functional/3d/ensure.ts +99 -0
- package/src/core/components/functional/3d/form-bind.ts +40 -0
- package/src/core/components/functional/3d/form-fields.ts +80 -0
- package/src/core/components/functional/3d/form-params.ts +97 -0
- package/src/core/components/functional/3d/frame-capture.spec.ts +72 -0
- package/src/core/components/functional/3d/frame-capture.ts +135 -0
- package/src/core/components/functional/3d/gl.ts +35 -0
- package/src/core/components/functional/3d/life.ts +101 -0
- package/src/core/components/functional/3d/load.ts +129 -0
- package/src/core/components/functional/3d/ops.ts +126 -0
- package/src/core/components/functional/3d/opts.ts +16 -0
- package/src/core/components/functional/3d/orbit.ts +185 -0
- package/src/core/components/functional/3d/out-publish.ts +140 -0
- package/src/core/components/functional/3d/parse.ts +95 -0
- package/src/core/components/functional/3d/pick.ts +92 -0
- package/src/core/components/functional/3d/playback.ts +70 -0
- package/src/core/components/functional/3d/pointer.ts +79 -0
- package/src/core/components/functional/3d/props.ts +50 -0
- package/src/core/components/functional/3d/publisher-listen.ts +13 -0
- package/src/core/components/functional/3d/reload.ts +88 -0
- package/src/core/components/functional/3d/runtime.ts +148 -0
- package/src/core/components/functional/3d/scene-runtime.ts +9 -0
- package/src/core/components/functional/3d/snapshot.ts +73 -0
- package/src/core/components/functional/3d/styles.ts +38 -0
- package/src/core/components/functional/3d/tune.ts +72 -0
- package/src/core/components/functional/3d/types.ts +145 -0
- package/src/core/components/functional/3d/updated.ts +70 -0
- package/src/core/components/functional/3d/view.ts +63 -0
- package/src/core/components/functional/3d/wire.ts +65 -0
- package/src/core/components/functional/infer/hugging-face/hf-cache.ts +198 -0
- package/src/core/components/functional/infer/hugging-face/hf-config.ts +188 -0
- package/src/core/components/functional/infer/hugging-face/hf-controller.spec.ts +350 -0
- package/src/core/components/functional/infer/hugging-face/hf-controller.ts +622 -0
- package/src/core/components/functional/infer/hugging-face/hf-engine.ts +178 -0
- package/src/core/components/functional/infer/hugging-face/hf-input.spec.ts +99 -0
- package/src/core/components/functional/infer/hugging-face/hf-input.ts +218 -0
- package/src/core/components/functional/infer/hugging-face/hf-protocol.ts +76 -0
- package/src/core/components/functional/infer/hugging-face/hf-registry.ts +457 -0
- package/src/core/components/functional/infer/hugging-face/hf-schema.spec.ts +124 -0
- package/src/core/components/functional/infer/hugging-face/hf-schema.ts +390 -0
- package/src/core/components/functional/infer/hugging-face/hf-worker-runtime.spec.ts +147 -0
- package/src/core/components/functional/infer/hugging-face/hf-worker-runtime.ts +381 -0
- package/src/core/components/functional/infer/hugging-face/hugging-face-infer.md +304 -0
- package/src/core/components/functional/infer/hugging-face/hugging-face-infer.ts +202 -0
- package/src/core/components/functional/infer/hugging-face/hugging-face.ts +282 -0
- package/src/core/components/functional/infer/hugging-face/types.ts +325 -0
- package/src/core/components/functional/jsonata/jsonata.md +4 -2
- package/src/core/components/functional/sdui/sdui.md +2 -2
- package/src/core/components/functional/sdui/sdui.ts +40 -29
- package/src/core/components/functional/shader/gl-runtime.ts +782 -0
- package/src/core/components/functional/shader/shader.md +207 -0
- package/src/core/components/functional/shader/shader.spec.ts +288 -0
- package/src/core/components/functional/shader/shader.ts +1569 -0
- package/src/core/components/functional/shader/shadertoy-prelude.ts +52 -0
- package/src/core/components/functional/shader/types.ts +446 -0
- package/src/core/components/functional/webgpu/canvas2d-fallback.ts +125 -0
- package/src/core/components/functional/webgpu/form-bind.ts +116 -0
- package/src/core/components/functional/webgpu/gl-fallback.ts +158 -0
- package/src/core/components/functional/webgpu/gpu-runtime.ts +349 -0
- package/src/core/components/functional/webgpu/helpers.ts +47 -0
- package/src/core/components/functional/webgpu/out-frame.ts +137 -0
- package/src/core/components/functional/webgpu/particles-runtime.ts +426 -0
- package/src/core/components/functional/webgpu/pointer.ts +85 -0
- package/src/core/components/functional/webgpu/types.ts +96 -0
- package/src/core/components/functional/webgpu/webgpu.md +75 -0
- package/src/core/components/functional/webgpu/webgpu.spec.ts +141 -0
- package/src/core/components/functional/webgpu/webgpu.ts +659 -0
- package/src/core/components/functional/webgpu/wgsl-prelude.ts +81 -0
- package/src/core/mixins/Fetcher.ts +1 -1
- package/src/core/utils/HTML.ts +107 -74
- package/src/core/utils/PublisherProxy.ts +29 -6
- package/src/core/utils/jsonataHelpers.ts +36 -0
- package/src/core/utils/mediaRef.spec.ts +85 -0
- package/src/core/utils/mediaRef.ts +130 -0
- package/src/core/utils/similarity.spec.ts +34 -0
- package/src/core/utils/similarity.ts +54 -0
- package/src/docs/_core-concept/dataFlow.md +2 -0
- package/src/docs/_getting-started/cdn-addons.md +73 -0
- package/src/docs/_getting-started/create-a-component.md +1 -1
- package/src/docs/_misc/visual-stack.md +49 -0
- package/src/docs/components/docs-demo-sources.ts +359 -39
- package/src/docs/docs.ts +6 -0
- package/src/docs/example/docs-3d-demos.ts +8 -0
- package/src/docs/example/docs-3d-form.ts +95 -0
- package/src/docs/example/docs-3d-orbit.ts +44 -0
- package/src/docs/example/docs-3d-out.ts +56 -0
- package/src/docs/example/docs-3d-shared.ts +15 -0
- package/src/docs/example/docs-harris-webgpu-demo.ts +482 -0
- package/src/docs/example/docs-hugging-face-demos.ts +516 -0
- package/src/docs/example/docs-shader-demos.ts +357 -0
- package/src/docs/example/docs-visual-stack-demo.ts +394 -0
- package/src/docs/example/docs-webgpu-demo.ts +77 -0
- package/src/docs/navigation/navigation.ts +25 -0
- package/src/docs/search/docs-search.json +899 -2319
- package/src/tsconfig.json +481 -301
- package/src/tsconfig.tsbuildinfo +1 -1
- package/vite/config.js +42 -30
- package/vite.config.mts +51 -12
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
(function(){"use strict";/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/var de,Re;const Yt=globalThis,pr=Yt.ShadowRoot&&(Yt.ShadyCSS===void 0||Yt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,mr=Symbol(),Ir=new WeakMap;let jr=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==mr)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(pr&&e===void 0){const r=t!==void 0&&t.length===1;r&&(e=Ir.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&Ir.set(t,e))}return e}toString(){return this.cssText}};const Dn=n=>new jr(typeof n=="string"?n:n+"",void 0,mr),Rn=(n,...e)=>{const t=n.length===1?n[0]:e.reduce(((r,s,u)=>r+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+n[u+1]),n[0]);return new jr(t,n,mr)},Ln=(n,e)=>{if(pr)n.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const t of e){const r=document.createElement("style"),s=Yt.litNonce;s!==void 0&&r.setAttribute("nonce",s),r.textContent=t.cssText,n.appendChild(r)}},Br=pr?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return Dn(t)})(n):n;/**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright 2017 Google LLC
|
|
8
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
+
*/const{is:Mn,defineProperty:On,getOwnPropertyDescriptor:Un,getOwnPropertyNames:Fn,getOwnPropertySymbols:$n,getPrototypeOf:Nn}=Object,Xt=globalThis,qr=Xt.trustedTypes,In=qr?qr.emptyScript:"",jn=Xt.reactiveElementPolyfillSupport,Lt=(n,e)=>n,Jt={toAttribute(n,e){switch(e){case Boolean:n=n?In:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,e){let t=n;switch(e){case Boolean:t=n!==null;break;case Number:t=n===null?null:Number(n);break;case Object:case Array:try{t=JSON.parse(n)}catch{t=null}}return t}},vr=(n,e)=>!Mn(n,e),zr={attribute:!0,type:String,converter:Jt,reflect:!1,useDefault:!1,hasChanged:vr};Symbol.metadata??=Symbol("metadata"),Xt.litPropertyMetadata??=new WeakMap;let Et=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=zr){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const r=Symbol(),s=this.getPropertyDescriptor(e,r,t);s!==void 0&&On(this.prototype,e,s)}}static getPropertyDescriptor(e,t,r){const{get:s,set:u}=Un(this.prototype,e)??{get(){return this[t]},set(o){this[t]=o}};return{get:s,set(o){const p=s?.call(this);u?.call(this,o),this.requestUpdate(e,p,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??zr}static _$Ei(){if(this.hasOwnProperty(Lt("elementProperties")))return;const e=Nn(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Lt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Lt("properties"))){const t=this.properties,r=[...Fn(t),...$n(t)];for(const s of r)this.createProperty(s,t[s])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[r,s]of t)this.elementProperties.set(r,s)}this._$Eh=new Map;for(const[t,r]of this.elementProperties){const s=this._$Eu(t,r);s!==void 0&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const s of r)t.unshift(Br(s))}else e!==void 0&&t.push(Br(e));return t}static _$Eu(e,t){const r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ln(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$ET(e,t){const r=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,r);if(s!==void 0&&r.reflect===!0){const u=(r.converter?.toAttribute!==void 0?r.converter:Jt).toAttribute(t,r.type);this._$Em=e,u==null?this.removeAttribute(s):this.setAttribute(s,u),this._$Em=null}}_$AK(e,t){const r=this.constructor,s=r._$Eh.get(e);if(s!==void 0&&this._$Em!==s){const u=r.getPropertyOptions(s),o=typeof u.converter=="function"?{fromAttribute:u.converter}:u.converter?.fromAttribute!==void 0?u.converter:Jt;this._$Em=s;const p=o.fromAttribute(t,u.type);this[s]=p??this._$Ej?.get(s)??p,this._$Em=null}}requestUpdate(e,t,r){if(e!==void 0){const s=this.constructor,u=this[e];if(r??=s.getPropertyOptions(e),!((r.hasChanged??vr)(u,t)||r.useDefault&&r.reflect&&u===this._$Ej?.get(e)&&!this.hasAttribute(s._$Eu(e,r))))return;this.C(e,t,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:r,reflect:s,wrapped:u},o){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,o??t??this[e]),u!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||r||(t=void 0),this._$AL.set(e,t)),s===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[s,u]of this._$Ep)this[s]=u;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[s,u]of r){const{wrapped:o}=u,p=this[s];o!==!0||this._$AL.has(s)||p===void 0||this.C(s,void 0,u,p)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((r=>r.hostUpdate?.())),this.update(t)):this._$EM()}catch(r){throw e=!1,this._$EM(),r}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(e){}firstUpdated(e){}};Et.elementStyles=[],Et.shadowRootOptions={mode:"open"},Et[Lt("elementProperties")]=new Map,Et[Lt("finalized")]=new Map,jn?.({ReactiveElement:Et}),(Xt.reactiveElementVersions??=[]).push("2.1.1");/**
|
|
10
|
+
* @license
|
|
11
|
+
* Copyright 2017 Google LLC
|
|
12
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
+
*/const gr=globalThis,Kt=gr.trustedTypes,Hr=Kt?Kt.createPolicy("lit-html",{createHTML:n=>n}):void 0,Gr="$lit$",lt=`lit$${Math.random().toFixed(9).slice(2)}$`,Vr="?"+lt,Bn=`<${Vr}>`,vt=document,Mt=()=>vt.createComment(""),Ot=n=>n===null||typeof n!="object"&&typeof n!="function",br=Array.isArray,qn=n=>br(n)||typeof n?.[Symbol.iterator]=="function",yr=`[
|
|
14
|
+
\f\r]`,Ut=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Wr=/-->/g,Yr=/>/g,gt=RegExp(`>|${yr}(?:([^\\s"'>=/]+)(${yr}*=${yr}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Xr=/'/g,Jr=/"/g,Kr=/^(?:script|style|textarea|title)$/i,zn=n=>(e,...t)=>({_$litType$:n,strings:e,values:t}),Zr=zn(1),_t=Symbol.for("lit-noChange"),Fe=Symbol.for("lit-nothing"),Qr=new WeakMap,bt=vt.createTreeWalker(vt,129);function en(n,e){if(!br(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Hr!==void 0?Hr.createHTML(e):e}const Hn=(n,e)=>{const t=n.length-1,r=[];let s,u=e===2?"<svg>":e===3?"<math>":"",o=Ut;for(let p=0;p<t;p++){const y=n[p];let P,M,k=-1,w=0;for(;w<y.length&&(o.lastIndex=w,M=o.exec(y),M!==null);)w=o.lastIndex,o===Ut?M[1]==="!--"?o=Wr:M[1]!==void 0?o=Yr:M[2]!==void 0?(Kr.test(M[2])&&(s=RegExp("</"+M[2],"g")),o=gt):M[3]!==void 0&&(o=gt):o===gt?M[0]===">"?(o=s??Ut,k=-1):M[1]===void 0?k=-2:(k=o.lastIndex-M[2].length,P=M[1],o=M[3]===void 0?gt:M[3]==='"'?Jr:Xr):o===Jr||o===Xr?o=gt:o===Wr||o===Yr?o=Ut:(o=gt,s=void 0);const C=o===gt&&n[p+1].startsWith("/>")?" ":"";u+=o===Ut?y+Bn:k>=0?(r.push(P),y.slice(0,k)+Gr+y.slice(k)+lt+C):y+lt+(k===-2?p:C)}return[en(n,u+(n[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]};class Ft{constructor({strings:e,_$litType$:t},r){let s;this.parts=[];let u=0,o=0;const p=e.length-1,y=this.parts,[P,M]=Hn(e,t);if(this.el=Ft.createElement(P,r),bt.currentNode=this.el.content,t===2||t===3){const k=this.el.content.firstChild;k.replaceWith(...k.childNodes)}for(;(s=bt.nextNode())!==null&&y.length<p;){if(s.nodeType===1){if(s.hasAttributes())for(const k of s.getAttributeNames())if(k.endsWith(Gr)){const w=M[o++],C=s.getAttribute(k).split(lt),R=/([.?@])?(.*)/.exec(w);y.push({type:1,index:u,name:R[2],strings:C,ctor:R[1]==="."?Vn:R[1]==="?"?Wn:R[1]==="@"?Yn:Zt}),s.removeAttribute(k)}else k.startsWith(lt)&&(y.push({type:6,index:u}),s.removeAttribute(k));if(Kr.test(s.tagName)){const k=s.textContent.split(lt),w=k.length-1;if(w>0){s.textContent=Kt?Kt.emptyScript:"";for(let C=0;C<w;C++)s.append(k[C],Mt()),bt.nextNode(),y.push({type:2,index:++u});s.append(k[w],Mt())}}}else if(s.nodeType===8)if(s.data===Vr)y.push({type:2,index:u});else{let k=-1;for(;(k=s.data.indexOf(lt,k+1))!==-1;)y.push({type:7,index:u}),k+=lt.length-1}u++}}static createElement(e,t){const r=vt.createElement("template");return r.innerHTML=e,r}}function xt(n,e,t=n,r){if(e===_t)return e;let s=r!==void 0?t._$Co?.[r]:t._$Cl;const u=Ot(e)?void 0:e._$litDirective$;return s?.constructor!==u&&(s?._$AO?.(!1),u===void 0?s=void 0:(s=new u(n),s._$AT(n,t,r)),r!==void 0?(t._$Co??=[])[r]=s:t._$Cl=s),s!==void 0&&(e=xt(n,s._$AS(n,e.values),s,r)),e}class Gn{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:r}=this._$AD,s=(e?.creationScope??vt).importNode(t,!0);bt.currentNode=s;let u=bt.nextNode(),o=0,p=0,y=r[0];for(;y!==void 0;){if(o===y.index){let P;y.type===2?P=new $t(u,u.nextSibling,this,e):y.type===1?P=new y.ctor(u,y.name,y.strings,this,e):y.type===6&&(P=new Xn(u,this,e)),this._$AV.push(P),y=r[++p]}o!==y?.index&&(u=bt.nextNode(),o++)}return bt.currentNode=vt,s}p(e){let t=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}}class $t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,s){this.type=2,this._$AH=Fe,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=xt(this,e,t),Ot(e)?e===Fe||e==null||e===""?(this._$AH!==Fe&&this._$AR(),this._$AH=Fe):e!==this._$AH&&e!==_t&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):qn(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==Fe&&Ot(this._$AH)?this._$AA.nextSibling.data=e:this.T(vt.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:r}=e,s=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=Ft.createElement(en(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===s)this._$AH.p(t);else{const u=new Gn(s,this),o=u.u(this.options);u.p(t),this.T(o),this._$AH=u}}_$AC(e){let t=Qr.get(e.strings);return t===void 0&&Qr.set(e.strings,t=new Ft(e)),t}k(e){br(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,s=0;for(const u of e)s===t.length?t.push(r=new $t(this.O(Mt()),this.O(Mt()),this,this.options)):r=t[s],r._$AI(u),s++;s<t.length&&(this._$AR(r&&r._$AB.nextSibling,s),t.length=s)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const r=e.nextSibling;e.remove(),e=r}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}}class Zt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,s,u){this.type=1,this._$AH=Fe,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=u,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=Fe}_$AI(e,t=this,r,s){const u=this.strings;let o=!1;if(u===void 0)e=xt(this,e,t,0),o=!Ot(e)||e!==this._$AH&&e!==_t,o&&(this._$AH=e);else{const p=e;let y,P;for(e=u[0],y=0;y<u.length-1;y++)P=xt(this,p[r+y],t,y),P===_t&&(P=this._$AH[y]),o||=!Ot(P)||P!==this._$AH[y],P===Fe?e=Fe:e!==Fe&&(e+=(P??"")+u[y+1]),this._$AH[y]=P}o&&!s&&this.j(e)}j(e){e===Fe?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Vn extends Zt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Fe?void 0:e}}class Wn extends Zt{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==Fe)}}class Yn extends Zt{constructor(e,t,r,s,u){super(e,t,r,s,u),this.type=5}_$AI(e,t=this){if((e=xt(this,e,t,0)??Fe)===_t)return;const r=this._$AH,s=e===Fe&&r!==Fe||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,u=e!==Fe&&(r===Fe||s);s&&this.element.removeEventListener(this.name,this,r),u&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class Xn{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){xt(this,e)}}const Jn=gr.litHtmlPolyfillSupport;Jn?.(Ft,$t),(gr.litHtmlVersions??=[]).push("3.3.1");const Kn=(n,e,t)=>{const r=t?.renderBefore??e;let s=r._$litPart$;if(s===void 0){const u=t?.renderBefore??null;r._$litPart$=s=new $t(e.insertBefore(Mt(),u),u,void 0,t??{})}return s._$AI(n),s};/**
|
|
16
|
+
* @license
|
|
17
|
+
* Copyright 2017 Google LLC
|
|
18
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
+
*/const wr=globalThis;class Nt extends Et{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Kn(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return _t}}Nt._$litElement$=!0,Nt.finalized=!0,wr.litElementHydrateSupport?.({LitElement:Nt});const Zn=wr.litElementPolyfillSupport;Zn?.({LitElement:Nt}),(wr.litElementVersions??=[]).push("4.2.1");/**
|
|
20
|
+
* @license
|
|
21
|
+
* Copyright 2017 Google LLC
|
|
22
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
+
*/const Qn=n=>(e,t)=>{t!==void 0?t.addInitializer((()=>{customElements.define(n,e)})):customElements.define(n,e)};/**
|
|
24
|
+
* @license
|
|
25
|
+
* Copyright 2017 Google LLC
|
|
26
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
+
*/const ei={attribute:!0,type:String,converter:Jt,reflect:!1,hasChanged:vr},ti=(n=ei,e,t)=>{const{kind:r,metadata:s}=t;let u=globalThis.litPropertyMetadata.get(s);if(u===void 0&&globalThis.litPropertyMetadata.set(s,u=new Map),r==="setter"&&((n=Object.create(n)).wrapped=!0),u.set(t.name,n),r==="accessor"){const{name:o}=t;return{set(p){const y=e.get.call(this);e.set.call(this,p),this.requestUpdate(o,y,n)},init(p){return p!==void 0&&this.C(o,void 0,n,p),p}}}if(r==="setter"){const{name:o}=t;return function(p){const y=this[o];e.call(this,p),this.requestUpdate(o,y,n)}}throw Error("Unsupported decorator location: "+r)};function X(n){return(e,t)=>typeof t=="object"?ti(n,e,t):((r,s,u)=>{const o=s.hasOwnProperty(u);return s.constructor.createProperty(u,r),o?Object.getOwnPropertyDescriptor(s,u):void 0})(n,e,t)}/**
|
|
28
|
+
* @license
|
|
29
|
+
* Copyright 2017 Google LLC
|
|
30
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
+
*/function ri(n){return X({...n,state:!0,attribute:!1})}const Ar="1";function ni(n){const e=n.trim();if(!e)return!1;try{const t=new URL(e,"https://example.invalid/");return t.protocol==="http:"||t.protocol==="https:"||t.protocol==="blob:"}catch{return!1}}let at=class Ge{static getLanguage(){const e=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||e}static getCookies(){return document.cookie.split(";").reduce((e,t)=>{const r=t.indexOf("=");return e[t.substring(0,r).trim()]=t.substring(r+1),e},{})}static nextComposedAncestor(e){return e instanceof Element&&e.assignedSlot?e.assignedSlot:e.parentNode||e.host||null}static everyAncestors(e,t){let r=e;for(;r;){if(!t(r))return;r=r.parentNode||r.host}}static overflowMatches(e,t){return t.includes(e.overflowY)||t.includes(e.overflowX)}static findAncestorByOverflow(e,t){let r=e;for(;r;){if(r instanceof Element&&r.nodeType===1){const s=window.getComputedStyle(r);if(Ge.overflowMatches(s,t))return r}r=Ge.nextComposedAncestor(r)}return null}static getScrollableAncestor(e){return Ge.findAncestorByOverflow(e,["auto","scroll","hidden","overlay"])}static getScrollingAncestor(e){return Ge.findAncestorByOverflow(e,["auto","scroll","overlay"])}static scopeAttributeNames(e){const t=e.toLowerCase();return t===e?[e]:[e,t]}static readScopeAttributeOnElement(e,t){for(const r of Ge.scopeAttributeNames(t))if(e.hasAttribute(r))return e.getAttribute(r)??"";return null}static getAncestorAttributeValue(e,t){if(!e)return null;let r=e;for(;r;){if(r instanceof HTMLElement){const u=Ge.readScopeAttributeOnElement(r,t);if(u!=null)return u}const s=r.parentNode||r.host;if(!s)break;r=s}return null}static getApiConfiguration(e){const t=Ge.getAncestorAttributeValue(e,"token"),r=Ge.getAncestorAttributeValue(e,"addHTTPResponse")!=null,s=Ge.getAncestorAttributeValue(e,"serviceURL");let u=null,o=null;const p=Ge.getAncestorAttributeValue(e,"tokenProvider"),y=Ge.getAncestorAttributeValue(e,"eventsApiToken");t||(u=Ge.getAncestorAttributeValue(e,"userName"),o=Ge.getAncestorAttributeValue(e,"password"));const P=Ge.getAncestorAttributeValue(e,"credentials")||void 0,M=e.getAttribute("cache"),k=e.hasAttribute("blockUntilDone"),w=e.hasAttribute("keepAlive");return{serviceURL:s,token:t,userName:u,password:o,authToken:y,tokenProvider:p,addHTTPResponse:r,credentials:P,cache:M,blockUntilDone:k,keepAlive:w}}static getClosestElement(e,t){let r=e;for(;r&&!(r.nodeName&&r.nodeName.toLowerCase()===t);){const s=r.parentNode||r.host;if(!s){r=null;break}r=s}return r?.nodeName?r:null}static getClosestForm(e){return Ge.getClosestElement(e,"form")}static getAncestorsByTagNames(e,t){const r=new Set(t.map(o=>o.toLowerCase())),s=[];let u=e.parentNode||e.host;for(;u;)u instanceof Element&&r.has(u.tagName.toLowerCase())&&s.push(u),u=u.parentNode||u.host;return s}static getAncestorsBySelectors(e,t){const r=[];let s=e.parentNode||e.host;for(;s;){if(s instanceof Element)for(const u of t)try{if(s.matches(u)){r.push(s);break}}catch{}s=s.parentNode||s.host}return r}static async loadJS(e){if(!ni(e))return!1;const t=typeof document<"u"?new URL(e,document.baseURI).href:e,r=Array.from(document.scripts).find(u=>u.src===t);if(r)return r.dataset.concordeLoaded===Ar?!0:new Promise(u=>{let o=!1;const p=P=>{o||(o=!0,P&&(r.dataset.concordeLoaded=Ar),u(P))};r.addEventListener("load",()=>p(!0),{once:!0}),r.addEventListener("error",()=>p(!1),{once:!0});const y=r.readyState;if(y==="complete"||y==="loaded"){p(!0);return}Promise.resolve().then(()=>{Promise.resolve().then(()=>{o||p(!0)})})});const s=/\.es\.js(\?|#|$)/.test(e)||/[?&]module(?:&|=|$)/.test(e);return new Promise(u=>{const o=document.createElement("script");o.src=e,s&&(o.type="module"),o.onload=()=>{o.dataset.concordeLoaded=Ar,u(!0)},o.onerror=()=>u(!1),document.head.appendChild(o)})}static async loadCSS(e){return new Promise(t=>{const r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=e,r.onload=()=>t(!0),r.onerror=()=>t(!0),document.head.appendChild(r)})}};function Er(n){return typeof n!="string"?null:n.trim()||null}function ii(n){if(n==null||n==="")return null;if(typeof n=="string")return Er(n);if(typeof n!="object")return null;const e=n;return Er(e.url)??Er(e.blobUrl)}function It(n){for(const e of n)try{URL.revokeObjectURL(e)}catch{}}let si=class{static async queueTaskPromise(){return new Promise(e=>{window.queueMicrotask(()=>e(null))})}static async delayPromise(e){return new Promise(t=>{setTimeout(t,e)})}},tn="sonic";typeof __SONIC_PREFIX__<"u"&&(tn=__SONIC_PREFIX__);let rn=tn.replace(/-([a-z])/g,n=>n[1].toUpperCase());const ai=rn.charAt(0).toUpperCase()+rn.slice(1);let oi=class At{static areEqual(e,t){return e.length===t.length?e.every((r,s)=>r===t[s]):!1}static from2d(e){return{to1D:()=>{let t=[];return e.forEach(r=>t=t.concat(r)),this.from(t)}}}static from(e){return{get:()=>e||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:t=>{if(e.length<1)return!0;const r=(e[0]||{})[t];return e.every(s=>(s||{})[t]==r)}})})}),value:()=>({forKey:t=>At.from(e.map(r=>r[t]))}),copy:()=>({fromKey:t=>({toKey:r=>{e.forEach(s=>{s[r]=Array.isArray(s[t])?[...s[t]]:typeof s[t]=="object"&&s[t]!=null?{...s[t]}:s[t]})}})})}),map:t=>At.from(e.map(t)),filter:t=>At.from(e.filter(t)),find:t=>e.find(t),some:t=>e.some(t),every:t=>e.every(t),group:()=>({byKey:t=>{const r=[],s=new Map;for(const u of e){const o=u[t];if(!s.has(o)){const p=r.length;s.set(o,p);const y={items:[]};y[t]=o,r.push(y)}r[s.get(o)].items.push(u)}return At.from(r)}}),without:()=>({duplicates:()=>({forKey:t=>{const r=[...new Set(e.map(s=>s[t]))];return At.from(r.map(s=>e.find(u=>u[t]==s)))}}),itemsIn:t=>({havingSameValue:()=>({forKey:r=>{const s=(u,o)=>p=>u[o]!=p[o];return At.from(e.filter(u=>t.every(s(u,r))))}})})})}}},_r=class{static ucFirst(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.substring(1)}static minutesDuration(e,t="",r="long"){t||(t=at.getLanguage());const s=(P,M)=>[Math.floor(P/M),P%M];function u(P,M,k){return new Intl.NumberFormat(P,{style:"unit",unit:M,unitDisplay:k}).format}const[o,p]=s(e,60),y=[];return o&&y.push(u(t,"hour",r)(o)),p&&y.push(u(t,"minute",r)(p)),new Intl.ListFormat(t,{style:"long",type:"conjunction"}).format(y)}static js(e){try{return Function("return "+e)()}catch{return""}}};class nn{constructor(e){this.path=e}toString(){return this.path}}function sn(n){return new Proxy(n,{get(e,t){if(t==="path")return e.path;if(t==="toString")return e.toString.bind(e);if(t===Symbol.toStringTag)return"DataProviderKey";if(typeof t=="symbol")return e[t];const r=e.path?`${e.path}.${String(t)}`:String(t);return sn(new nn(r))}})}const ui=/\$\{|\{\$/;function ci(n){return ui.test(n)}function li(n){const e=n;if(ci(e))throw new Error("Static publisher path required for get/set/dp. Use @subscribe, @publish, or @handle for dynamic DataProviderKey paths.");return e}const Qt=function(n){return this instanceof Qt?sn(new nn(n)):new Qt(n)};let er=class ct{static shallowEqual(e,t,r=!0){const s=Object.keys(e),u=Object.keys(t);if(s.length!==u.length&&r)return!1;for(const o of s){const p=e[o],y=t[o];if(r?p!==y:p!=y)return!1}return!0}static deepEqual(e,t,r=!0){const s=Object.keys(e),u=Object.keys(t);if(s.length!==u.length&&r)return!1;for(const o of s){const p=e[o],y=t[o],P=ct.isObject(p)&&ct.isObject(y),M=r?p!==y:p!=y;if(P&&!ct.deepEqual(p,y)||!P&&M)return!1}return!0}static isObject(e){return e!=null&&typeof e=="object"}static isUndefindOrNull(e){return e==null}static isEmpty(e){return ct.isUndefindOrNull(e)?!0:Object.keys(e).length===0}static traverse(e,t,r=!1){for(const s of t){const u=e[s];if(u===void 0)return;r&&ct.isObject(u)?e=Object.assign(Array.isArray(u)?[]:{},e,u):e=e[s]}return e}static traverseDotNotation(e,t,r=!1){return ct.traverse(e,t.split("."),r)}static getURLSearchArray(e,t=""){let r=[];for(let s in e){const u=e[s];t&&(s=t+"["+s+"]"),ct.isObject(u)?r=[...r,...this.getURLSearchArray(u,s)]:r.push(`${s}=${u}`)}return r}static getURLSearchString(e){return ct.getURLSearchArray(e,"").join("&")}};er.traverseDotNotation;function fi(n){return!1}function tr(n){return Object.prototype.hasOwnProperty.call(n,"__value")}function ft(n){return typeof n=="object"&&n!==null}let kt="sonic";typeof __SONIC_PREFIX__>"u"&&(kt="sonic");const xr=kt=="sonic"?"publisher-proxies-data":kt+"-publisher-proxies-data",dt=class dt{constructor(e,t,r){for(this._proxies_=new Map,this._is_savable_=!1,this._expiration_delay_=1e3*60*60*12,this._invalidate_on_page_show_=!1,this._invalidateListeners_=new Set,this._formInvalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=e,this.parent=t||null,this._parentKey_=r,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){for(const e in this._proxies_.keys())e!="_parent_"&&this._proxies_.get(e)?.delete();this._invalidateListeners_.clear(),this._formInvalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),dt.instances.delete(this._instanceCounter_)}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._formInvalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(e=!1){if(this._mutationListeners_.forEach(t=>t()),this._is_savable_&&!$e.changed){$e.changed=!0,$e.saveId++;const t=$e.saveId;setTimeout(()=>$e.getInstance().saveToLocalStorage(t),1e3)}e||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(e=!1){if(this._assignmentId_++,this._assignmentId_!==this._assignmentId_)return;const r=this.get();this._assignListeners_.forEach(s=>{s(r)}),this._publishInternalMutation_(e)}_publishInvalidation_(){this._invalidateListeners_.forEach(e=>e())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(e=>e())}_publishDynamicFilling_(e,t){this._fillListeners_.forEach(r=>{r[e]!==t&&(r[e]=t)}),this._publishTemplateFilling_(e,t)}_publishTemplateFilling_(e,t){this._templateFillListeners_.forEach(r=>{const s=Object.getOwnPropertyDescriptor(r,e);s&&!s.set&&!s.writable||(r.propertyMap&&r.propertyMap[e]&&(e=r.propertyMap[e]),typeof r[e]<"u"&&r[e]!==t&&(r[e]=t))})}onAssign(e,t=!0){typeof e=="function"&&(this._assignListeners_.has(e)||(this._assignListeners_.add(e),t&&e(this.get())))}offAssign(e){this._assignListeners_.delete(e)}onInvalidate(e){typeof e=="function"&&this._invalidateListeners_.add(e)}offInvalidate(e){typeof e=="function"&&this._invalidateListeners_.delete(e)}invalidate(){this._publishInvalidation_()}onFormInvalidate(e){typeof e=="function"&&this._formInvalidateListeners_.add(e)}offFormInvalidate(e){typeof e=="function"&&this._formInvalidateListeners_.delete(e)}invalidateForm(){this._publishFormInvalidation_()}onInternalMutation(e){typeof e=="function"&&(this._mutationListeners_.add(e),e())}offInternalMutation(e){typeof e=="function"&&this._mutationListeners_.delete(e)}startTemplateFilling(e){if(this._templateFillListeners_.add(e),typeof this._value_=="object")for(const t in this._value_){let r=t;const s=this._value_[t];e.propertyMap&&e.propertyMap[t]&&(r=e.propertyMap[t]),typeof e[t]<"u"&&e[t]!==s&&(e[r]=s)}}stopTemplateFilling(e){this._templateFillListeners_.delete(e)}startDynamicFilling(e){this._fillListeners_.add(e);for(const t in this._value_){const r=this._value_[t];e[t]!==r&&(e[t]=r)}}stopDynamicFilling(e){this._fillListeners_.delete(e)}set(e,t=!1){if(this._value_===e||ft(this._value_)&&ft(e)&&e&&tr(this._value_)&&tr(e)&&this._value_.__value===e.__value||!ft(e)&&e===this._value_.__value)return!0;this._value_=ft(e)?e:{__value:e},this._cachedGet_=void 0;const r=tr(this._value_);if(this._parentKey_&&this.parent){const s=tr(this._value_)?this._value_.__value:this._value_;if(this.parent?.get()==null&&this.parent?.get()==null)if(isNaN(Number(this._parentKey_)))this.parent.set({[this._parentKey_]:s});else{const u=[];u[Number(this._parentKey_)]=s,this.parent.set(u)}else this.parent._value_[this._parentKey_]=s}if(r)return this._proxies_.forEach((s,u)=>{u!="_parent_"&&(s.set(null),this._publishDynamicFilling_(u,null))}),this._publishAssignement_(t),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const s in this._value_)this._value_[s]===void 0&&delete this._value_[s];if(this._proxies_.forEach((s,u)=>{const o=this._value_[u];u!="_parent_"&&o===void 0&&o!==null&&isNaN(Number(u))&&(s.set(null),this._publishDynamicFilling_(u,null))}),this._publishAssignement_(),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),ft(this._value_))for(const s in this._value_){const u=e[s],p=ft(u)?u:{__value:u};if(!this._proxies_.has(s)){this._publishDynamicFilling_(s,u);continue}this._proxies_.get(s)?.set(p,!0),this._publishDynamicFilling_(s,u)}return!0}get(){if(hi(this),this._cachedGet_!==void 0)return this._cachedGet_;if(Object.prototype.hasOwnProperty.call(this._value_,"__value")){const e=this._value_.__value;return this._cachedGet_=e??null}return this._cachedGet_=this._value_!=null?this._value_:null}get $tag(){return this._instanceCounter_||(dt.instancesCounter++,this._instanceCounter_=dt.instancesCounter),dt.instances.set(this._instanceCounter_,this),"<"+kt+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+kt+"-publisher-proxy>"}};dt.instances=new Map,dt.instancesCounter=0;let rr=dt;const an=[];function hi(n){an.length>0&&an[0].add(n)}const ge=class ge{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],ge.instance!=null)throw"Singleton / use getInstance";ge.instance=this,this.isLocalStrorageReady=this.cleanStorageData(),ge.initPageShowHandler()}static initPageShowHandler(){ge.pageShowHandlerInitialized||(ge.pageShowHandlerInitialized=!0,window.addEventListener("pageshow",e=>{e.persisted&&ge.getInstance().invalidateAll()}))}invalidateAll(){this.publishers.forEach(e=>{e._invalidate_on_page_show_&&e.invalidate()})}async cleanStorageData(){return new Promise(e=>{(async()=>{try{let r=localStorage.getItem(xr),s=null;if(r&&(s=await this.decompress(r,"gzip")),s)try{this.localStorageData=JSON.parse(s)}catch{this.localStorageData={}}else r=await this.compress("{}","gzip"),localStorage.setItem(xr,r),this.localStorageData={};const u=1e3*60*60*12;for(const o in this.localStorageData){const p=this.localStorageData[o],y=new Date().getTime()-(p.expirationDelayMs||u);p.lastModifiationMS<y&&delete this.localStorageData[o]}e(!0)}catch{window.requestAnimationFrame(()=>{e(!1)}),console.warn("no publisher cache in this browser")}})()})}static getInstance(e){if(e){const t=ge.instances.get(e);return t||(console.warn("No PublisherManager instance registered with id:",e,"creating new one"),new ge)}return ge.instance==null?new ge:ge.instance}static get(e,t){return ge.getInstance().get(e,t)}async setLocalData(e,t){await this.isLocalStrorageReady,e.set(this.localStorageData[t+"¤lang_"+at.getLanguage()]?.data||e.get())}get(e,t){const r=t?.localStorageMode==="enabled",s=t?.invalidateOnPageShow===!0;if(!this.publishers.has(e)){const p=kr({});this.set(e,p)}const u=this.publishers.get(e);return r&&this.initialisedData.indexOf(e)===-1&&(t?.expirationDelayMs&&(u._expiration_delay_=t.expirationDelayMs),u._is_savable_=!0,this.initialisedData.push(e),this.setLocalData(u,e)),s&&(u._invalidate_on_page_show_=s),this.publishers.get(e)}set(e,t){this.publishers.set(e,t)}delete(e){return this.publishers.has(e)?(this.publishers.delete(e),!0):!1}async saveToLocalStorage(e=0){if(!(e!==ge.saveId&&e%10!=0))try{if(!ge.changed||ge.saving)return;ge.saving=!0,ge.changed=!1;const t=Array.from(this.publishers.keys());let r=!1;for(const s of t){const u=this.publishers.get(s);if(!u?._is_savable_)continue;const o=u?.get();o&&(this.localStorageData[s+"¤lang_"+at.getLanguage()]={lastModifiationMS:new Date().getTime(),expirationDelayMs:u._expiration_delay_,data:o},r=!0)}if(r){const s=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(xr,s)}if(ge.saving=!1,ge.changed){ge.saveId++;const s=ge.saveId;setTimeout(()=>this.saveToLocalStorage(s),1e3)}}catch{ge.saving=!1}}async compress(e,t){const r=new TextEncoder().encode(e),s=window,u=new s.CompressionStream(t),o=u.writable.getWriter();o.write(r),o.close();const p=await new Response(u.readable).arrayBuffer(),y=new Uint8Array(p);let P="";for(let M=0;M<y.length;M++)P+=String.fromCharCode(y[M]);return btoa(P)}async decompress(e,t){const r=atob(e),u=Uint8Array.from(r,M=>M.charCodeAt(0)).buffer,o=window,p=new o.DecompressionStream(t),y=p.writable.getWriter();y.write(u),y.close();const P=await new Response(p.readable).arrayBuffer();return new TextDecoder().decode(P)}};ge.buildDate="Tue Sep 29 2026 17:50:57 GMT+0200 (Central European Summer Time)",ge.changed=!1,ge.saving=!1,ge.saveId=0,ge.instance=null,ge.instances=new Map,ge.pageShowHandlerInitialized=!1;let $e=ge;if(typeof window<"u"){const n=window,e=ai+"PublisherManager",t=n[e]||$e;if(n[e]||(n[e]=$e),t!==$e){const r=["instance","instances","changed","saving","saveId","pageShowHandlerInitialized"];for(const s of r)Object.defineProperty($e,s,{configurable:!0,get(){return t[s]},set(u){t[s]=u}})}}const di=new Set(["invalidate","onInvalidate","offInvalidate","invalidateForm","onFormInvalidate","offFormInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_formInvalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishFormInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_parentKey_","_value_","_is_savable_","_expiration_delay_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_","_invalidate_on_page_show_"]);function pi(n,e){return{get:function(t,r){if(typeof r=="string"&&di.has(r))return n[r];if(r==Symbol.toPrimitive)return()=>e().get();if(!n._proxies_.has(r)){const s=n._value_[r],u=kr(ft(s)?s:{__value:s},n,r);u._proxies_.set("_parent_",e()),n._proxies_.set(r,u)}return n._proxies_.get(r)},set:function(t,r,s){if(r=="_value_")return n._value_=s,!0;if(r=="_cachedGet_")return n._cachedGet_=s,!0;if(r=="_assignmentId_")return n._assignmentId_=s,!0;if(r=="_is_savable_")return n._is_savable_=s,!0;if(r=="_expiration_delay_")return n._expiration_delay_=s,!0;if(r=="_invalidate_on_page_show_")return n._invalidate_on_page_show_=s,!0;if(r=="_instanceCounter_")return n._instanceCounter_=s,!0;if(!n._proxies_.has(r)){const o=kr({},n,r);o._proxies_.set("_parent_",e()),n._proxies_.set(r,o)}return n._value_[r]!==s&&(n._value_[r]=s,n._publishDynamicFilling_(r,s),n._proxies_.get(r)?.set(ft(s)?s:{__value:s})),!0},deleteProperty:function(t,r){return n._publishDynamicFilling_(r,null),n._proxies_.get(r)?.set(null),delete n._value_[r]},has:function(t,r){return r in n._value_&&r!="_lockInternalMutationPublishing_"},defineProperty:function(t,r,s){return s&&"value"in s&&(n._value_[r]=s.value),!0},getOwnPropertyDescriptor:function(t,r){return{enumerable:!0,configurable:!0}},ownKeys:function(t){return n._value_.__value?Object.keys(n._value_.__value):Object.keys(n._value_)}}}function kr(n,e=null,t){const r=new rr(n,e,t);let s=null;const u=pi(r,()=>s);return s=new Proxy(r,u),s}class mi extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=e=>{this.innerHTML=e.toString()}}connectedCallback(){this.publisherId=this.getAttribute("publisher")||"",this.publisher=rr.instances.get(parseInt(this.publisherId)),this.publisher?.onAssign(this.onAssign)}disconnectedCallback(){this.publisher?.offAssign(this.onAssign)}}try{customElements.define(kt+"-publisher-proxy",mi)}catch{}const vi=(n,e)=>{{const t=n.split("."),r=t.shift()||"";let s=$e.get(r,e);s=er.traverse(s,t);const u=new Set;return u.add(s),u}};function on(n,e,t){const r=li(n);return vi(r,t).values().next().value}function gi(n,e){return fi()?on(n,void 0,e):on(n)}let Sr=(de=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(de.observedElements.keys()).forEach(e=>de.unObserve(e)))}static observe(e){if(!e||!de.enabled||de.observedElements.has(e))return;const t=new MutationObserver(de.onMutation),r={};r.childList=!0,r.subtree=!0,r.attributes=!0,r.attributeFilter=["data-bind"],t.observe(e,r),e.querySelectorAll("[data-bind]").forEach(s=>de.addPublisherListeners(s)),de.observedElements.set(e,t)}static unObserve(e){if(!e)return;const t=this.observedElements.get(e);t&&(t.disconnect(),e.querySelectorAll("[data-bind]").forEach(r=>de.removePublisherListeners(r)))}static onAdded(e){e.hasAttribute&&e.hasAttribute("data-bind")&&de.addPublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(t=>de.addPublisherListeners(t)):e.childNodes.forEach(t=>de.onAdded(t))}static onRemoved(e){e.hasAttribute&&e.hasAttribute("data-bind")&&de.removePublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(t=>de.removePublisherListeners(t)):e.childNodes.forEach(t=>de.onRemoved(t))}static onMutation(e){for(const t of e)switch(t.type){case"attributes":de.addPublisherListeners(t.target);break;case"childList":t.addedNodes.forEach(r=>{de.onAdded(r)}),t.removedNodes.forEach(r=>{de.onRemoved(r)});break}}static removePublisherListeners(e){const t=de.publisherListeners.get(e);t&&(de.publisherListeners.delete(e),t.forEach(r=>{r.publisher?.offAssign(r.onAssign)}))}static getVariablesDescriptor(e){let t=e.match(/(\$(?:\w+\\?\.?)+)/g);return t?t=t.map(r=>r.replace("$","")):t=[e],t=t.filter(r=>r.length>0),{expression:e.replace("\\",""),variables:t.map(r=>r.split(/\b\.\b/).map(s=>s.replace("\\","")))}}static getDataBindItems(e){return"attributes"in e?Array.from(e.attributes).filter(t=>t.name.indexOf("::")==0).map(t=>({propertyToUpdate:t.name.substring(2).replace(/-((html)|\w)/g,s=>s.substring(1).toUpperCase()),bindedVariablesDescriptor:de.getVariablesDescriptor(t.value)})):[]}static getSubPublisher(e,t){if(!t)return e;for(const r of t)if(r!="_self_"){if(!e)return null;e=e[r]}return e}static addPublisherListeners(e){de.removePublisherListeners(e);const t=at.getAncestorAttributeValue(e.parentNode||e.host||e,"dataProvider");if(!t)return;const r=$e.getInstance().get(t),s=de.getDataBindItems(e),u=[];s.forEach(o=>{const p=o.bindedVariablesDescriptor,y=o.propertyToUpdate;for(const P of p.variables){const M=P;let k=r;k=de.getSubPublisher(r,M);const w=e,C={publisher:k,onAssign:()=>{const R=p.variables.map(J=>de.getSubPublisher(r,J)?.get());let N=p.expression,ee=!1;if(R.length==1&&p.variables[0].join(".")==N.substring(1)){let J=R[0];J===null&&(J=""),w[y]=J;return}for(let J=0;J<R.length;J++){let E=R[J];const v=p.variables[J];E===null&&(ee=!0,E=void 0),N=N.replace("$"+v.join("."),E)}if(N.indexOf("|")!=-1){const J=N.indexOf("|");if(J==0)N=_r.js(N.substring(1));else{const E=N.substring(0,J),v=N.substring(J+1),O=_r[E];N=ee?"":O?O(v):N}}else N=ee?"":N;w[y]=N}};k?.onAssign(C.onAssign),u.push(C)}}),de.publisherListeners.set(e,u)}},de.observedElements=new Map,de.enabled=!0,de.publisherListeners=new Map,de);Sr.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=Sr);let bi=(Re=class{static listen(){if(!Re.listening)return;const e=document.location?.href.replace(document.location.origin,"");Re.prevURL&&Re.prevURL!=e&&(Re.prevURL=e,Re.listeners.forEach(t=>{t.location=e})),window.requestAnimationFrame(Re.listen)}static offChange(e){const t=Re.listeners.indexOf(e);t!=-1&&(Re.listeners.splice(t,1),Re.listeners.length==0&&(Re.listening=!1))}static onChange(e){Re.listening||(Re.listening=!0,Re.listen()),Re.listeners.push(e),e.location=this.prevURL}static changeFromComponent(e){const t=e.goBack,r=document.referrer;if(t!=null){const P=document.location.origin,M=(t||P).toString(),w=r.indexOf("http")==0?new URL(r).origin!=P:!1,C=r=="",R=history.length<3,N=C&&R,ee=M!=document.location.href;if(w&&ee||N){const E=history.state||{};E.concorde=E.concorde||{},E.concorde.hasDoneHistoryBack=!0,history.pushState(E,document.title),history.back(),document.location.replace(M)}else history.back();return}let s=e.getAttribute("to")||"";if(s||(s=e.href?.toString()||""),!s)return;if(s.indexOf("#")==0){document.location.hash=s.substring(1);return}const u=new URL(s,document.location.href),o=u.pathname.split("/"),p=[];let y="";for(const P of o)P!=y&&p.push(P),y=P;s="/"+p.join("/")+u.search+(u.hash?+u.hash:""),e.hasAttribute("pushState")?history.pushState(null,"",s):e.hasAttribute("replaceState")?history.replaceState(null,"",s):document.location.href=s}static updateComponentActiveState(e){if(e.autoActive=="disabled")return;const t=e.href?.toString()||"";if(e.href&&t.indexOf("http")!=0){const r=new URL(t,document.location.href),s=new URL(e.location||"",document.location.origin);let u=!1;e.autoActive=="strict"?u=r.pathname==s.pathname&&r.hash==s.hash&&r.search==s.search:e.autoActive=="strict-path-only"?u=r.pathname==s.pathname&&r.hash==s.hash:u=s.href.indexOf(r.href)==0,u?e.setAttribute("active","true"):e.removeAttribute("active")}}},Re.listeners=[],Re.listening=!1,Re.prevURL=document.location?.href.replace(document.location.origin,""),Re);function un(n){if(n==null||typeof n!="object"||Array.isArray(n))return n;const e={...n};return delete e._sonic_http_response_,e}const ye=class ye{constructor(e){this.addHTTPResponse=!1,this.cache="default",this.isServiceSimulated=!1,this.blockUntilDone=!1,this.keepAlive=!1,this.serviceURL=e.serviceURL,this.blockUntilDone=e.blockUntilDone||!1,this.serviceURL=="publisher://"&&(this.isServiceSimulated=!0),this.serviceURL||(this.serviceURL=document.location.origin),this.userName=e.userName,this.password=e.password,e.token&&(this.token=e.token),this.tokenProvider=e.tokenProvider,this.authToken=e.authToken,this.addHTTPResponse=e.addHTTPResponse||!1,this.credentials=e.credentials,this.cache=e.cache||"default",this.keepAlive=e.keepAlive||!1}set token(e){if(this._token=e,!e){ye.tokens.delete(this.serviceURL);return}ye.invalidTokens.includes(e)||ye.tokens.set(this.serviceURL,e)}get token(){return ye.invalidTokens.includes(this._token)?ye.tokens.get(this.serviceURL):this._token}handleInvalidToken(e){e&&(ye.invalidTokens.includes(e)||(ye.invalidTokens.push(e),this.token=null))}async handleResult(e,t){ye.firstCallDoneFlags.set(this.serviceURL,"done"),this.lastResult=e;const r=e.headers.get("content-type")?.toLowerCase(),s=e.status;let u={};if(!r||r.indexOf("text/")==0)u={text:await e.text()};else try{u=await e.json()}catch{u={}}if(this.addHTTPResponse&&er.isObject(u)&&(u._sonic_http_response_=e),s===498&&!ye.failledTokenUpdates.has(this.serviceURL))if(this.handleInvalidToken(this.token),t.apiMethod==="get"){const p=await this.get(t.path,t.additionalHeaders);if(p==null)throw new Error("GET retry failed after token refresh");u=p}else u=await this[t.apiMethod](t.path,t.data,t.method,t.additionalHeaders);return gi("sonic-api").lastResponse.set({http:e,processed:u}),u}async auth(){if(this.token)return;if(ye.tokens.has(this.serviceURL)){this.token=ye.tokens.get(this.serviceURL);return}if(!this.tokenProvider)return;let e={};this.userName&&this.password?e={Authorization:"Basic "+window.btoa(unescape(encodeURIComponent(this.userName+":"+this.password)))}:this.authToken&&(e={Authorization:"Bearer "+this.authToken});const t=new URL(this.serviceURL),r=t.protocol+"//"+t.host,s=await fetch(this.computeURL(this.tokenProvider,{serviceHost:r}),{headers:e,credentials:this.credentials,keepalive:this.keepAlive});try{const u=await s.json();u.token?this.token=u.token:ye.failledTokenUpdates.set(this.serviceURL,!0)}catch{ye.failledTokenUpdates.set(this.serviceURL,!0)}}async localGet(e,t){const r=$e.get(e),s=new URLSearchParams(t.split("?")[1]||""),u=r.get();let o=[];Array.isArray(u)?o=u:o=[u];const p=[];let y=Number.POSITIVE_INFINITY,P=0,M=0;if(s.has("limit")&&(y=parseInt(s.get("limit")||"0"),M++),s.has("offset")&&(P=parseInt(s.get("offset")||"0"),M++),M>0&&(s.delete("limit"),s.delete("offset")),s.size===0)return o.slice(P,P+y);for(const[k,w]of s.entries()){const C=w.split(",").map(R=>R.trim());for(const R of C)for(const N of o)if(typeof N!="object")isNaN(+N)?N.toString().toLowerCase().includes(w.toLowerCase())&&p.push(N):N===w&&p.push(N);else{const ee=N;if(!ee[k])continue;isNaN(+ee[k])?ee[k]?.toString().toLowerCase().includes(R.toLowerCase())&&p.push(N):ee[k]===R&&p.push(N)}}return p.slice(P,P+y)}firstCallDone(){return new Promise(e=>{if(!ye.firstCallDoneFlags.has(this.serviceURL))ye.firstCallDoneFlags.set(this.serviceURL,"loading"),e(!0);else{const t=()=>{[void 0,"loading"].includes(ye.firstCallDoneFlags.get(this.serviceURL))?window.requestAnimationFrame(t):e(!0)};t()}})}async get(e,t){const r=/dataProvider\((.*?)\)(.*?)$/;if(r.test(e)){this.blockUntilDone&&(await this.firstCallDone(),ye.firstCallDoneFlags.set(this.serviceURL,"loading"));const P=e.match(r);if(!P)throw new Error("dataProvider path is not valid");return await this.localGet(P[1],P[2])}const s={apiMethod:"get",path:e,additionalHeaders:t},u=await this.createHeaders(t),o=this.computeURL(e),p=JSON.stringify({url:o,headers:u,credentials:this.credentials,cache:this.cache,keepAlive:this.keepAlive});if(this.blockUntilDone&&(await this.firstCallDone(),ye.firstCallDoneFlags.set(this.serviceURL,"loading")),!ye.loadingGetPromises.has(p)){const P=new Promise(async M=>{try{const k=await fetch(o,{headers:u,credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),w=await this.handleResult(k,s);M({processed:w,response:this.lastResult})}catch{ye.firstCallDoneFlags.set(this.serviceURL,"error"),M(null)}});ye.loadingGetPromises.set(p,P)}const y=await ye.loadingGetPromises.get(p);return ye.loadingGetPromises.delete(p),y?(this.lastResult=y.response,y.processed):null}async getDetailed(e,t){const r=/dataProvider\((.*?)\)(.*?)$/.test(e),s=await this.get(e,t);if(s==null)return;const u=un(s),o=this.computeURL(e);if(r)return{request:new Request(o,{method:"GET"}),result:u};const p=await this.createHeaders(t);return{request:new Request(o,{method:"GET",headers:new Headers(p),credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),response:this.lastResult,result:u}}async sendDetailed(e,t,r,s){const u=await this.send(e,t,r,s);if(u==null)return;const o=un(u),p=this.computeURL(e),y=await this.createHeaders({Accept:"application/json","Content-Type":"application/json",...s});return{request:new Request(p,{method:r,headers:new Headers(y),credentials:this.credentials,body:JSON.stringify(t),keepalive:this.keepAlive}),response:this.lastResult,result:o}}async postDetailed(e,t,r){return this.sendDetailed(e,t,"POST",r)}async putDetailed(e,t,r){return this.sendDetailed(e,t,"PUT",r)}async patchDetailed(e,t,r){return this.sendDetailed(e,t,"PATCH",r)}async createHeaders(e){await this.auth();const t={};return this.token&&(t.Authorization="Bearer "+this.token),t["Accept-Language"]=at.getLanguage(),e&&Object.assign(t,e),t}computeURL(e,t={}){let r="";e.startsWith("http")?r=e:r=this.serviceURL+"/"+e,r.startsWith("http")||(r=window.location.origin+r);const s=new URL(r);for(const u in t)s.searchParams.set(u,t[u]);return s.toString().replace(/([^(https?:)])\/{2,}/g,"$1/")}async send(e,t,r="POST",s){const u={apiMethod:"send",path:e,additionalHeaders:s,method:r,data:t},o=await this.createHeaders(s);o.Accept="application/json",o["Content-Type"]="application/json";const p=await fetch(this.computeURL(e),{headers:o,credentials:this.credentials,method:r,body:JSON.stringify(t),keepalive:this.keepAlive});return await this.handleResult(p,u)}async submitFormData(e,t,r="POST",s){const u={apiMethod:"submitFormData",path:e,additionalHeaders:s,method:r,data:t},o=await this.createHeaders(s);o.Accept="application/json";const p=new FormData,y=t;for(const M in y)p.set(M,y[M]);const P=await fetch(this.computeURL(e),{headers:o,credentials:this.credentials,method:r,body:p,keepalive:this.keepAlive});return await this.handleResult(P,u)}async put(e,t,r){return this.send(e,t,"PUT",r)}async post(e,t,r){return this.send(e,t,"POST",r)}async patch(e,t,r){return this.send(e,t,"PATCH",r)}async delete(e,t,r){return this.send(e,t,"delete",r)}};ye.loadingGetPromises=new Map,ye.tokens=new Map,ye.invalidTokens=[],ye.failledTokenUpdates=new Map,ye.firstCallDoneFlags=new Map;let Pr=ye;at.getApiConfiguration(document.body||document.documentElement);var cn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yi(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var jt={exports:{}},wi=jt.exports,ln;function Ai(){return ln||(ln=1,(function(n,e){var t=[].slice;(function(r,s){return e!==null?n.exports=s():r.UrlPattern=s()})(wi,function(){var r,s,u,o,p,y,P,M,k,w,C,R,N,ee,J;return k=function(E){return E.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},P=function(E,v){var O,A,T;for(T=[],O=-1,A=E.length;++O<A;)T=T.concat(v(E[O]));return T},ee=function(E,v){var O,A,T;for(T="",O=-1,A=E.length;++O<A;)T+=v(E[O]);return T},N=function(E){return new RegExp(E.toString()+"|").exec("").length-1},C=function(E,v){var O,A,T,H,F;for(H={},O=-1,T=E.length;++O<T;)A=E[O],F=v[O],F!=null&&(H[A]!=null?(Array.isArray(H[A])||(H[A]=[H[A]]),H[A].push(F)):H[A]=F);return H},r={},r.Result=function(E,v){this.value=E,this.rest=v},r.Tagged=function(E,v){this.tag=E,this.value=v},r.tag=function(E,v){return function(O){var A,T;if(A=v(O),A!=null)return T=new r.Tagged(E,A.value),new r.Result(T,A.rest)}},r.regex=function(E){return function(v){var O,A;if(O=E.exec(v),O!=null)return A=O[0],new r.Result(A,v.slice(A.length))}},r.sequence=function(){var E;return E=1<=arguments.length?t.call(arguments,0):[],function(v){var O,A,T,H,F,re;for(O=-1,A=E.length,re=[],H=v;++O<A;){if(T=E[O],F=T(H),F==null)return;re.push(F.value),H=F.rest}return new r.Result(re,H)}},r.pick=function(){var E,v;return E=arguments[0],v=2<=arguments.length?t.call(arguments,1):[],function(O){var A,T;if(T=r.sequence.apply(r,v)(O),T!=null)return A=T.value,T.value=A[E],T}},r.string=function(E){var v;return v=E.length,function(O){if(O.slice(0,v)===E)return new r.Result(E,O.slice(v))}},r.lazy=function(E){var v;return v=null,function(O){return v==null&&(v=E()),v(O)}},r.baseMany=function(E,v,O,A,T){var H,F,re,ae;for(re=T,ae=O?"":[];!(v!=null&&(H=v(re),H!=null)||(F=E(re),F==null));)O?ae+=F.value:ae.push(F.value),re=F.rest;if(!(A&&ae.length===0))return new r.Result(ae,re)},r.many1=function(E){return function(v){return r.baseMany(E,null,!1,!0,v)}},r.concatMany1Till=function(E,v){return function(O){return r.baseMany(E,v,!0,!0,O)}},r.firstChoice=function(){var E;return E=1<=arguments.length?t.call(arguments,0):[],function(v){var O,A,T,H;for(O=-1,A=E.length;++O<A;)if(T=E[O],H=T(v),H!=null)return H}},R=function(E){var v;return v={},v.wildcard=r.tag("wildcard",r.string(E.wildcardChar)),v.optional=r.tag("optional",r.pick(1,r.string(E.optionalSegmentStartChar),r.lazy(function(){return v.pattern}),r.string(E.optionalSegmentEndChar))),v.name=r.regex(new RegExp("^["+E.segmentNameCharset+"]+")),v.named=r.tag("named",r.pick(1,r.string(E.segmentNameStartChar),r.lazy(function(){return v.name}))),v.escapedChar=r.pick(1,r.string(E.escapeChar),r.regex(/^./)),v.static=r.tag("static",r.concatMany1Till(r.firstChoice(r.lazy(function(){return v.escapedChar}),r.regex(/^./)),r.firstChoice(r.string(E.segmentNameStartChar),r.string(E.optionalSegmentStartChar),r.string(E.optionalSegmentEndChar),v.wildcard))),v.token=r.lazy(function(){return r.firstChoice(v.wildcard,v.optional,v.named,v.static)}),v.pattern=r.many1(r.lazy(function(){return v.token})),v},M={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},y=function(E,v){if(Array.isArray(E))return ee(E,function(O){return y(O,v)});switch(E.tag){case"wildcard":return"(.*?)";case"named":return"(["+v+"]+)";case"static":return k(E.value);case"optional":return"(?:"+y(E.value,v)+")?"}},p=function(E,v){return v==null&&(v=M.segmentValueCharset),"^"+y(E,v)+"$"},o=function(E){if(Array.isArray(E))return P(E,o);switch(E.tag){case"wildcard":return["_"];case"named":return[E.value];case"static":return[];case"optional":return o(E.value)}},w=function(E,v,O,A){var T,H,F,re;if(A==null&&(A=!1),re=E[v],re==null){if(A)throw new Error("no values provided for key `"+v+"`");return}if(T=O[v]||0,H=Array.isArray(re)?re.length-1:0,T>H){if(A)throw new Error("too few values provided for key `"+v+"`");return}return F=Array.isArray(re)?re[T]:re,A&&(O[v]=T+1),F},u=function(E,v,O){var A,T;if(Array.isArray(E)){for(A=-1,T=E.length;++A<T;)if(u(E[A],v,O))return!0;return!1}switch(E.tag){case"wildcard":return w(v,"_",O,!1)!=null;case"named":return w(v,E.value,O,!1)!=null;case"static":return!1;case"optional":return u(E.value,v,O)}},J=function(E,v,O){if(Array.isArray(E))return ee(E,function(A){return J(A,v,O)});switch(E.tag){case"wildcard":return w(v,"_",O,!0);case"named":return w(v,E.value,O,!0);case"static":return E.value;case"optional":return u(E.value,v,O)?J(E.value,v,O):""}},s=function(E,v){var O,A,T,H,F;if(E instanceof s){this.isRegex=E.isRegex,this.regex=E.regex,this.ast=E.ast,this.names=E.names;return}if(this.isRegex=E instanceof RegExp,!(typeof E=="string"||this.isRegex))throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=E,v!=null){if(!Array.isArray(v))throw new Error("if first argument is a regex the second argument may be an array of group names but you provided something else");if(O=N(this.regex),v.length!==O)throw new Error("regex contains "+O+" groups but array of group names contains "+v.length);this.names=v}return}if(E==="")throw new Error("argument must not be the empty string");if(F=E.replace(/\s+/g,""),F!==E)throw new Error("argument must not contain whitespace");if(A={escapeChar:v?.escapeChar||M.escapeChar,segmentNameStartChar:v?.segmentNameStartChar||M.segmentNameStartChar,segmentNameCharset:v?.segmentNameCharset||M.segmentNameCharset,segmentValueCharset:v?.segmentValueCharset||M.segmentValueCharset,optionalSegmentStartChar:v?.optionalSegmentStartChar||M.optionalSegmentStartChar,optionalSegmentEndChar:v?.optionalSegmentEndChar||M.optionalSegmentEndChar,wildcardChar:v?.wildcardChar||M.wildcardChar},H=R(A),T=H.pattern(E),T==null)throw new Error("couldn't parse pattern");if(T.rest!=="")throw new Error("could only partially parse pattern");this.ast=T.value,this.regex=new RegExp(p(this.ast,A.segmentValueCharset)),this.names=o(this.ast)},s.prototype.match=function(E){var v,O;return O=this.regex.exec(E),O==null?null:(v=O.slice(1),this.names?C(this.names,v):v)},s.prototype.stringify=function(E){if(E==null&&(E={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(E!==Object(E))throw new Error("argument must be an object or undefined");return J(this.ast,E,{})},s.escapeForRegex=k,s.concatMap=P,s.stringConcatMap=ee,s.regexGroupCount=N,s.keysAndValuesToObject=C,s.P=r,s.newParser=R,s.defaultOptions=M,s.astNodeToRegexString=p,s.astNodeToNames=o,s.getParam=w,s.astNodeContainsSegmentsForProvidedParams=u,s.stringify=J,s})})(jt,jt.exports)),jt.exports}var Ei=Ai();const _i=yi(Ei);class Tr{constructor(e){this.path=Tr.normalizePath(e)}getDataProviderKey(){return new Qt(this.path)}static normalizePath(e){const t=String(e).trim();if(!t)throw new RangeError("Endpoint: path cannot be empty");if(/^https?:\/\//i.test(t)){let y;try{y=new URL(t)}catch{throw new RangeError("Endpoint: invalid absolute URL")}return y.pathname=y.pathname.replace(/\/+/g,"/"),y.href}const r=t.indexOf("?"),s=t.indexOf("#");let u=t.length;r>=0&&(u=Math.min(u,r)),s>=0&&(u=Math.min(u,s));let o=t.slice(0,u);const p=t.slice(u);if(o=o.replace(/^\/+/,""),o=o.replace(/\/+/g,"/"),!o&&p)throw new RangeError("Endpoint: path cannot be empty");return o+p}static isNonEmpty(e){return String(e).trim().length>0}static looksLikeDataProviderPath(e){return/^\s*dataProvider\s*\(/i.test(String(e))}toString(){return this.path}}function nr(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Cr={exports:{}},fn;function xi(){return fn||(fn=1,(function(n,e){(function(t){n.exports=t()})(function(){return(function(){function t(r,s,u){function o(P,M){if(!s[P]){if(!r[P]){var k=typeof nr=="function"&&nr;if(!M&&k)return k(P,!0);if(p)return p(P,!0);var w=new Error("Cannot find module '"+P+"'");throw w.code="MODULE_NOT_FOUND",w}var C=s[P]={exports:{}};r[P][0].call(C.exports,function(R){var N=r[P][1][R];return o(N||R)},C,C.exports,t,r,s,u)}return s[P].exports}for(var p=typeof nr=="function"&&nr,y=0;y<u.length;y++)o(u[y]);return o}return t})()({1:[function(t,r,s){const u=t("./utils"),o=(function(){const p=u.stringToArray,y=["Zero","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"],P=["Zeroth","First","Second","Third","Fourth","Fifth","Sixth","Seventh","Eighth","Ninth","Tenth","Eleventh","Twelfth","Thirteenth","Fourteenth","Fifteenth","Sixteenth","Seventeenth","Eighteenth","Nineteenth"],M=["Twenty","Thirty","Forty","Fifty","Sixty","Seventy","Eighty","Ninety","Hundred"],k=["Thousand","Million","Billion","Trillion"];function w(_,D){var S=function(B,I,L){var q="";if(B<=19)q=(I?" and ":"")+(L?P[B]:y[B]);else if(B<100){const he=Math.floor(B/10),ue=B%10;q=(I?" and ":"")+M[he-2],ue>0?q+="-"+S(ue,!1,L):L&&(q=q.substring(0,q.length-1)+"ieth")}else if(B<1e3){const he=Math.floor(B/100),ue=B%100;q=(I?", ":"")+y[he]+" Hundred",ue>0?q+=S(ue,!0,L):L&&(q+="th")}else{var K=Math.floor(Math.log10(B)/3);K>k.length&&(K=k.length);const he=Math.pow(10,K*3),ue=Math.floor(B/he),te=B-ue*he;q=(I?", ":"")+S(ue,!1,!1)+" "+k[K-1],te>0?q+=S(te,!0,L):L&&(q+="th")}return q},U=S(_,!1,D);return U}const C=Object.create(null);y.forEach(function(_,D){C[_.toLowerCase()]=D}),P.forEach(function(_,D){C[_.toLowerCase()]=D}),M.forEach(function(_,D){const S=_.toLowerCase();C[S]=(D+2)*10,C[S.substring(0,_.length-1)+"ieth"]=C[S]}),C.hundredth=100,k.forEach(function(_,D){const S=_.toLowerCase(),U=Math.pow(10,(D+1)*3);C[S]=U,C[S+"th"]=U});function R(_){const S=_.split(/,\s|\sand\s|[\s\\-]/).map(I=>C[I]);let U=[0];return S.forEach(I=>{if(I<100){let L=U.pop();L>=1e3&&(U.push(L),L=0),U.push(L+I)}else U.push(U.pop()*I)}),U.reduce((I,L)=>I+L,0)}const N=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],ee={M:1e3,D:500,C:100,L:50,X:10,V:5,I:1};function J(_){for(var D=0;D<N.length;D++){const S=N[D];if(_>=S[0])return S[1]+J(_-S[0])}return""}function E(_){for(var D=0,S=1,U=_.length-1;U>=0;U--){const B=_[U],I=ee[B];I<S?D-=I:(S=I,D+=I)}return D}function v(_,D){for(var S=[],U=D.charCodeAt(0);_>0;)S.unshift(String.fromCharCode((_-1)%26+U)),_=Math.floor((_-1)/26);return S.join("")}function O(_,D){for(var S=D.charCodeAt(0),U=0,B=0;B<_.length;B++)U+=(_.charCodeAt(_.length-B-1)-S+1)*Math.pow(26,B);return U}function A(_,D){if(typeof _>"u")return;_=Math.floor(_);const S=ae(D);return F(_,S)}const T={DECIMAL:"decimal",LETTERS:"letters",ROMAN:"roman",WORDS:"words",SEQUENCE:"sequence"},H={UPPER:"upper",LOWER:"lower",TITLE:"title"};function F(_,D){let S;const U=_<0;switch(_=Math.abs(_),D.primary){case T.LETTERS:S=v(_,D.case===H.UPPER?"A":"a");break;case T.ROMAN:S=J(_),D.case===H.UPPER&&(S=S.toUpperCase());break;case T.WORDS:S=w(_,D.ordinal),D.case===H.UPPER?S=S.toUpperCase():D.case===H.LOWER&&(S=S.toLowerCase());break;case T.DECIMAL:S=""+_;var B=D.mandatoryDigits-S.length;if(B>0){var I=new Array(B+1).join("0");S=I+S}if(D.zeroCode!==48&&(S=p(S).map(he=>String.fromCodePoint(he.codePointAt(0)+D.zeroCode-48)).join("")),D.regular){const he=Math.floor((S.length-1)/D.groupingSeparators.position);for(let ue=he;ue>0;ue--){const te=S.length-ue*D.groupingSeparators.position;S=S.substr(0,te)+D.groupingSeparators.character+S.substr(te)}}else D.groupingSeparators.reverse().forEach(he=>{const ue=S.length-he.position;S=S.substr(0,ue)+he.character+S.substr(ue)});if(D.ordinal){var L={1:"st",2:"nd",3:"rd"},q=S[S.length-1],K=L[q];(!K||S.length>1&&S[S.length-2]==="1")&&(K="th"),S=S+K}break;case T.SEQUENCE:throw{code:"D3130",value:D.token}}return U&&(S="-"+S),S}const re=[48,1632,1776,1984,2406,2534,2662,2790,2918,3046,3174,3302,3430,3558,3664,3792,3872,4160,4240,6112,6160,6470,6608,6784,6800,6992,7088,7232,7248,42528,43216,43264,43472,43504,43600,44016,65296];function ae(_){const D={type:"integer",primary:T.DECIMAL,case:H.LOWER,ordinal:!1};let S,U;const B=_.lastIndexOf(";");switch(B===-1?S=_:(S=_.substring(0,B),U=_.substring(B+1),U[0]==="o"&&(D.ordinal=!0)),S){case"A":D.case=H.UPPER;case"a":D.primary=T.LETTERS;break;case"I":D.case=H.UPPER;case"i":D.primary=T.ROMAN;break;case"W":D.case=H.UPPER,D.primary=T.WORDS;break;case"Ww":D.case=H.TITLE,D.primary=T.WORDS;break;case"w":D.primary=T.WORDS;break;default:{let I=null,L=0,q=0,K=[],he=0;if(p(S).map(te=>te.codePointAt(0)).reverse().forEach(te=>{let Z=!1;for(let le=0;le<re.length;le++){const Q=re[le];if(te>=Q&&te<=Q+9){if(Z=!0,L++,he++,I===null)I=Q;else if(Q!==I)throw{code:"D3131"};break}}Z||(te===35?(he++,q++):K.push({position:he,character:String.fromCodePoint(te)}))}),L>0){D.primary=T.DECIMAL,D.zeroCode=I,D.mandatoryDigits=L,D.optionalDigits=q;const Z=function(le){if(le.length===0)return 0;const Q=le[0].character;for(let Le=1;Le<le.length;Le++)if(le[Le].character!==Q)return 0;const Ne=le.map(Le=>Le.position),Qe=function(Le,Be){return Be===0?Le:Qe(Be,Le%Be)},je=Ne.reduce(Qe);for(let Le=1;Le<=Ne.length;Le++)if(Ne.indexOf(Le*je)===-1)return 0;return je}(K);Z>0?(D.regular=!0,D.groupingSeparators={position:Z,character:K[0].character}):(D.regular=!1,D.groupingSeparators=K)}else D.primary=T.SEQUENCE,D.token=S}}return D}const Ee={Y:"1",M:"1",D:"1",d:"1",F:"n",W:"1",w:"1",X:"1",x:"1",H:"1",h:"1",P:"n",m:"01",s:"01",f:"1",Z:"01:01",z:"01:01",C:"n",E:"n"};function ve(_){var D=[];const S={type:"datetime",parts:D},U=function(Z,le){if(le>Z){let Q=_.substring(Z,le);Q=Q.split("]]").join("]"),D.push({type:"literal",value:Q})}};for(var B=0,I=0;I<_.length;){if(_.charAt(I)==="["){if(_.charAt(I+1)==="["){U(B,I),D.push({type:"literal",value:"["}),I+=2,B=I;continue}if(U(B,I),B=I,I=_.indexOf("]",B),I===-1)throw{code:"D3135"};let Z=_.substring(B+1,I);Z=Z.split(/\s+/).join("");var L={type:"marker",component:Z.charAt(0)},q=Z.lastIndexOf(","),K;if(q!==-1){const le=Z.substring(q+1),Q=le.indexOf("-");let Ne,Qe;const je=function(Be){if(!(typeof Be>"u"||Be==="*"))return parseInt(Be)};Q===-1?Ne=le:(Ne=le.substring(0,Q),Qe=le.substring(Q+1));const Le={min:je(Ne),max:je(Qe)};L.width=Le,K=Z.substring(1,q)}else K=Z.substring(1);if(K.length===1)L.presentation1=K;else if(K.length>1){var he=K.charAt(K.length-1);"atco".indexOf(he)!==-1?(L.presentation2=he,he==="o"&&(L.ordinal=!0),L.presentation1=K.substring(0,K.length-1)):L.presentation1=K}else L.presentation1=Ee[L.component];if(typeof L.presentation1>"u")throw{code:"D3132",value:L.component};if(L.presentation1[0]==="n")L.names=H.LOWER;else if(L.presentation1[0]==="N")L.presentation1[1]==="n"?L.names=H.TITLE:L.names=H.UPPER;else if("YMDdFWwXxHhmsf".indexOf(L.component)!==-1){var ue=L.presentation1;if(L.presentation2&&(ue+=";"+L.presentation2),L.integerFormat=ae(ue),L.width&&L.width.min!==void 0&&L.integerFormat.mandatoryDigits<L.width.min&&(L.integerFormat.mandatoryDigits=L.width.min),L.component==="Y")if(L.n=-1,L.width&&L.width.max!==void 0)L.n=L.width.max,L.integerFormat.mandatoryDigits=L.n;else{var te=L.integerFormat.mandatoryDigits+L.integerFormat.optionalDigits;te>=2&&(L.n=te)}const le=D[D.length-1];le&&le.integerFormat&&(le.integerFormat.parseWidth=le.integerFormat.mandatoryDigits)}(L.component==="Z"||L.component==="z")&&(L.integerFormat=ae(L.presentation1)),D.push(L),B=I+1}I++}return U(B,I),S}const pe=["","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Te=["January","February","March","April","May","June","July","August","September","October","November","December"],Je=1e3*60*60*24,ce=function(_){const D=Date.UTC(_.year,_.month);var S=new Date(D).getUTCDay();return S===0&&(S=7),S>4?D+(8-S)*Je:D-(S-1)*Je},me=function(_,D){return{year:_,month:D,nextMonth:function(){return D===11?me(_+1,0):me(_,D+1)},previousMonth:function(){return D===0?me(_-1,11):me(_,D-1)},nextYear:function(){return me(_+1,D)},previousYear:function(){return me(_-1,D)}}},We=function(_,D){return(D-_)/(Je*7)+1},ie=(_,D)=>{let S;switch(D){case"Y":S=_.getUTCFullYear();break;case"M":S=_.getUTCMonth()+1;break;case"D":S=_.getUTCDate();break;case"d":{const U=Date.UTC(_.getUTCFullYear(),_.getUTCMonth(),_.getUTCDate()),B=Date.UTC(_.getUTCFullYear(),0);S=(U-B)/Je+1;break}case"F":S=_.getUTCDay(),S===0&&(S=7);break;case"W":{const U=me(_.getUTCFullYear(),0),B=ce(U),I=Date.UTC(U.year,_.getUTCMonth(),_.getUTCDate());let L=We(B,I);if(L>52){const q=ce(U.nextYear());I>=q&&(L=1)}else if(L<1){const q=ce(U.previousYear());L=We(q,I)}S=Math.floor(L);break}case"w":{const U=me(_.getUTCFullYear(),_.getUTCMonth()),B=ce(U),I=Date.UTC(U.year,U.month,_.getUTCDate());let L=We(B,I);if(L>4){const q=ce(U.nextMonth());I>=q&&(L=1)}else if(L<1){const q=ce(U.previousMonth());L=We(q,I)}S=Math.floor(L);break}case"X":{const U=me(_.getUTCFullYear(),0),B=ce(U),I=ce(U.nextYear()),L=_.getTime();L<B?S=U.year-1:L>=I?S=U.year+1:S=U.year;break}case"x":{const U=me(_.getUTCFullYear(),_.getUTCMonth()),B=ce(U),I=U.nextMonth(),L=ce(I),q=_.getTime();q<B?S=U.previousMonth().month+1:q>=L?S=I.month+1:S=U.month+1;break}case"H":S=_.getUTCHours();break;case"h":S=_.getUTCHours(),S=S%12,S===0&&(S=12);break;case"P":S=_.getUTCHours()>=12?"pm":"am";break;case"m":S=_.getUTCMinutes();break;case"s":S=_.getUTCSeconds();break;case"f":S=_.getUTCMilliseconds();break;case"Z":case"z":break;case"C":S="ISO";break;case"E":S="ISO";break}return S};let Ce=null;function nt(_,D,S){var U=0,B=0;if(typeof S<"u"){const ue=parseInt(S);U=Math.floor(ue/100),B=ue%100}var I=function(ue,te){var Z=ie(ue,te.component);if("YMDdFWwXxHhms".indexOf(te.component)!==-1)if(te.component==="Y"&&te.n!==-1&&(Z=Z%Math.pow(10,te.n)),te.names){if(te.component==="M"||te.component==="x")Z=Te[Z-1];else if(te.component==="F")Z=pe[Z];else throw{code:"D3133",value:te.component};te.names===H.UPPER?Z=Z.toUpperCase():te.names===H.LOWER&&(Z=Z.toLowerCase()),te.width&&Z.length>te.width.max&&(Z=Z.substring(0,te.width.max))}else Z=F(Z,te.integerFormat);else if(te.component==="f")Z=F(Z,te.integerFormat);else if(te.component==="Z"||te.component==="z"){const le=U*100+B;if(te.integerFormat.regular)Z=F(le,te.integerFormat);else{const Q=te.integerFormat.mandatoryDigits;if(Q===1||Q===2)Z=F(U,te.integerFormat),B!==0&&(Z+=":"+A(B,"00"));else if(Q===3||Q===4)Z=F(le,te.integerFormat);else throw{code:"D3134",value:Q}}le>=0&&(Z="+"+Z),te.component==="z"&&(Z="GMT"+Z),le===0&&te.presentation2==="t"&&(Z="Z")}else te.component==="P"&&te.names===H.UPPER&&(Z=Z.toUpperCase());return Z};let L;typeof D>"u"?(Ce===null&&(Ce=ve("[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f001][Z01:01t]")),L=Ce):L=ve(D);const q=(60*U+B)*60*1e3,K=new Date(_+q);let he="";return L.parts.forEach(function(ue){ue.type==="literal"?he+=ue.value:he+=I(K,ue)}),he}function h(_){var D=Object.create(null);if(_.type==="datetime")D.type="datetime",D.parts=_.parts.map(function(S){var U=Object.create(null);if(S.type==="literal")U.regex=S.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");else if(S.component==="Z"||S.component==="z"){let I;Array.isArray(S.integerFormat.groupingSeparators)||(I=S.integerFormat.groupingSeparators),U.regex="",S.component==="z"&&(U.regex="GMT"),U.regex+="[-+][0-9]+",I&&(U.regex+=I.character+"[0-9]+"),U.parse=function(L){S.component==="z"&&(L=L.substring(3));let q=0,K=0;return I?(q=Number.parseInt(L.substring(0,L.indexOf(I.character))),K=Number.parseInt(L.substring(L.indexOf(I.character)+1))):L.length-1<=2?q=Number.parseInt(L):(q=Number.parseInt(L.substring(0,3)),K=Number.parseInt(L.substring(3))),q*60+K}}else if(S.component==="f")U.regex="[0-9]+",U.parse=function(I){return parseFloat("0."+I.substring(0,3))*1e3};else if(S.integerFormat)U=h(S.integerFormat);else{U.regex="[a-zA-Z]+";var B=Object.create(null);if(S.component==="M"||S.component==="x")Te.forEach(function(I,L){S.width&&S.width.max?B[I.substring(0,S.width.max)]=L+1:B[I]=L+1});else if(S.component==="F")pe.forEach(function(I,L){L>0&&(S.width&&S.width.max?B[I.substring(0,S.width.max)]=L:B[I]=L)});else if(S.component==="P")B={am:0,AM:0,pm:1,PM:1};else throw{code:"D3133",value:S.component};U.parse=function(I){return B[I]}}return U.component=S.component,U});else{D.type="integer";const S=_.case===H.UPPER;switch(_.primary){case T.LETTERS:D.regex=S?"[A-Z]+":"[a-z]+",D.parse=function(U){return O(U,S?"A":"a")};break;case T.ROMAN:D.regex=S?"[MDCLXVI]+":"[mdclxvi]+",D.parse=function(U){return E(S?U:U.toUpperCase())};break;case T.WORDS:D.regex="(?:"+u.keys(C).concat("and","[\\-, ]").join("|")+")+",D.parse=function(U){return R(U.toLowerCase())};break;case T.DECIMAL:D.regex="[0-9]",_.parseWidth?D.regex+=`{${_.parseWidth}}`:D.regex+="+",_.ordinal&&(D.regex+="(?:th|st|nd|rd)"),D.parse=function(U){let B=U;return _.ordinal&&(B=U.substring(0,U.length-2)),_.regular?B=B.split(",").join(""):_.groupingSeparators.forEach(I=>{B=B.split(I.character).join("")}),_.zeroCode!==48&&(B=B.split("").map(I=>String.fromCodePoint(I.codePointAt(0)-_.zeroCode+48)).join("")),parseInt(B)};break;case T.SEQUENCE:throw{code:"D3130",value:_.token}}}return D}function b(_,D){if(typeof _>"u")return;const S=ae(D);return h(S).parse(_)}function G(_,D){const S=ve(D),U=h(S),B="^"+U.parts.map(K=>"("+K.regex+")").join("")+"$";var L=new RegExp(B,"i").exec(_);if(L!==null){const Q=Object.create(null);for(let c=1;c<L.length;c++){const f=U.parts[c-1];f.parse&&(Q[f.component]=f.parse(L[c]))}if(Object.getOwnPropertyNames(Q).length===0)return;let Ne=0;const Qe=c=>{Ne<<=1,Ne+=c?1:0},je=c=>!(~c&Ne)&&!!(c&Ne);"YXMxWwdD".split("").forEach(c=>Qe(Q[c]));const Be=!je(161)&&je(130),ot=je(84),Tt=!ot&&je(72);Ne=0,"PHhmsf".split("").forEach(c=>Qe(Q[c]));const z=!je(23)&&je(47),tt=(Be?"YD":ot?"XxwF":Tt?"XWF":"YMD")+(z?"Phmsf":"Hmsf"),Ht=this.environment.timestamp;let it=!1,yt=!1;if(tt.split("").forEach(c=>{if(typeof Q[c]>"u")it?(Q[c]="MDd".indexOf(c)!==-1?1:0,yt=!0):Q[c]=ie(Ht,c);else if(it=!0,yt)throw{code:"D3136"}}),Q.M>0?Q.M-=1:Q.M=0,Be){const c=Date.UTC(Q.Y,0),f=(Q.d-1)*1e3*60*60*24,d=new Date(c+f);Q.M=d.getUTCMonth(),Q.D=d.getUTCDate()}if(ot)throw{code:"D3136"};if(Tt)throw{code:"D3136"};z&&(Q.H=Q.h===12?0:Q.h,Q.P===1&&(Q.H+=12));var q=Date.UTC(Q.Y,Q.M,Q.D,Q.H,Q.m,Q.s,Q.f);return(Q.Z||Q.z)&&(q-=(Q.Z||Q.z)*60*1e3),q}}var fe=new RegExp("^\\d{4}(-[01]\\d)?(-[0-3]\\d)?(T[0-2]\\d:[0-5]\\d:[0-5]\\d)?(\\.\\d+)?([+-][0-2]\\d:?[0-5]\\d|Z)?$");function _e(_,D){if(!(typeof _>"u"))if(typeof D>"u"){if(!fe.test(_))throw{stack:new Error().stack,code:"D3110",value:_};return Date.parse(_)}else return G.call(this,_,D)}function we(_,D,S){if(!(typeof _>"u"))return nt.call(this,_,D,S)}return{formatInteger:A,parseInteger:b,fromMillis:we,toMillis:_e}})();r.exports=o},{"./utils":6}],2:[function(t,r,s){(function(u){(function(){var o=t("./utils");const p=(()=>{var y=o.isNumeric,P=o.isArrayOfStrings,M=o.isArrayOfNumbers,k=o.isSequence,w=o.isFunction,C=o.isLambda,R=o.isPromise,N=o.getFunctionArity,ee=o.isDeepEqual,J=o.stringToArray;function E(i){if(!(typeof i>"u")){var a=0;return i.forEach(function(l){a+=l}),a}}function v(i){return typeof i>"u"?0:i.length}function O(i){if(!(typeof i>"u"||i.length===0))return Math.max.apply(Math,i)}function A(i){if(!(typeof i>"u"||i.length===0))return Math.min.apply(Math,i)}function T(i){if(!(typeof i>"u"||i.length===0)){var a=0;return i.forEach(function(l){a+=l}),a/i.length}}function H(i,a=!1){if(!(typeof i>"u")){var l;if(typeof i=="string")l=i;else if(w(i))l="";else{if(typeof i=="number"&&!isFinite(i))throw{code:"D3001",value:i,stack:new Error().stack};var g=a?2:0;Array.isArray(i)&&i.outerWrapper&&(i=i[0]),l=JSON.stringify(i,function(m,x){return typeof x<"u"&&x!==null&&y(x)?x.toPrecision&&!Number.isInteger(x)?Number(x.toPrecision(15)):x:x&&w(x)?"":x},g)}return l}}function F(i,a,l){if(!(typeof i>"u")){var g=J(i),m=g.length;if(m+a<0&&(a=0),typeof l<"u"){if(l<=0)return"";var x=a>=0?a+l:m+a+l;return g.slice(a,x).join("")}return g.slice(a).join("")}}function re(i,a){if(!(typeof i>"u")){var l=i.indexOf(a);return l>-1?i.substr(0,l):i}}function ae(i,a){if(!(typeof i>"u")){var l=i.indexOf(a);return l>-1?i.substr(l+a.length):i}}function Ee(i){if(!(typeof i>"u"))return i.toLowerCase()}function ve(i){if(!(typeof i>"u"))return i.toUpperCase()}function pe(i){if(!(typeof i>"u"))return J(i).length}function Te(i){if(!(typeof i>"u")){var a=i.replace(/[ \t\n\r]+/gm," ");return a.charAt(0)===" "&&(a=a.substring(1)),a.charAt(a.length-1)===" "&&(a=a.substring(0,a.length-1)),a}}function Je(i,a,l){if(!(typeof i>"u")){(typeof l>"u"||l.length===0)&&(l=" ");var g;a=Math.trunc(a);var m=Math.abs(a)-pe(i);if(m>0){var x=new Array(m+1).join(l);l.length>1&&(x=F(x,0,m)),a>0?g=i+x:g=x+i}else g=i;return g}}async function ce(i,a){var l=i.apply(this,[a]);if(R(l)&&(l=await l),l&&!(typeof l.start=="number"||l.end==="number"||Array.isArray(l.groups)||w(l.next)))throw{code:"T1010",stack:new Error().stack};return l}async function me(i,a){if(!(typeof i>"u"||typeof a>"u")){var l;if(typeof a=="string")l=i.indexOf(a)!==-1;else{var g=await ce(a,i);l=typeof g<"u"}return l}}async function We(i,a,l){if(!(typeof i>"u")){if(l<0)throw{stack:new Error().stack,value:l,code:"D3040",index:3};var g=this.createSequence();if(typeof l>"u"||l>0){var m=0,x=await ce(a,i);if(typeof x<"u")for(;typeof x<"u"&&(typeof l>"u"||m<l);)g.push({match:x.match,index:x.start,groups:x.groups}),x=await ce(x.next),m++}return g}}async function ie(i,a,l,g){if(!(typeof i>"u")){var m=this;if(a==="")throw{code:"D3010",stack:new Error().stack,value:a,index:2};if(g<0)throw{code:"D3011",stack:new Error().stack,value:g,index:4};var x;typeof l=="string"?x=function(ke){for(var Me="",be=0,De=l.indexOf("$",be);De!==-1&&be<l.length;){Me+=l.substring(be,De),be=De+1;var et=l.charAt(be);if(et==="$")Me+="$",be++;else if(et==="0")Me+=ke.match,be++;else{var qe;if(ke.groups.length===0?qe=1:qe=Math.floor(Math.log(ke.groups.length)*Math.LOG10E)+1,De=parseInt(l.substring(be,be+qe),10),qe>1&&De>ke.groups.length&&(De=parseInt(l.substring(be,be+qe-1),10)),isNaN(De))Me+="$";else{if(ke.groups.length>0){var st=ke.groups[De-1];typeof st<"u"&&(Me+=st)}be+=De.toString().length}}De=l.indexOf("$",be)}return Me+=l.substring(be),Me}:x=l;var $="",j=0;if(typeof g>"u"||g>0){var se=0;if(typeof a=="string"){for(var W=i.indexOf(a,j);W!==-1&&(typeof g>"u"||se<g);)$+=i.substring(j,W),$+=l,j=W+a.length,se++,W=i.indexOf(a,j);$+=i.substring(j)}else{var Ae=await ce(a,i);if(typeof Ae<"u"){for(;typeof Ae<"u"&&(typeof g>"u"||se<g);){$+=i.substring(j,Ae.start);var xe=x.apply(m,[Ae]);if(R(xe)&&(xe=await xe),typeof xe=="string")$+=xe;else throw{code:"D3012",stack:new Error().stack,value:xe};j=Ae.start+Ae.match.length,se++,Ae=await ce(Ae.next)}$+=i.substring(j)}else $=i}}else $=i;return $}}function Ce(i){if(!(typeof i>"u")){var a=typeof window<"u"?window.btoa:function(l){return new u.Buffer.from(l,"binary").toString("base64")};return a(i)}}function nt(i){if(!(typeof i>"u")){var a=typeof window<"u"?window.atob:function(l){return new u.Buffer.from(l,"base64").toString("binary")};return a(i)}}function h(i){if(!(typeof i>"u")){var a;try{a=encodeURIComponent(i)}catch{throw{code:"D3140",stack:new Error().stack,value:i,functionName:"encodeUrlComponent"}}return a}}function b(i){if(!(typeof i>"u")){var a;try{a=encodeURI(i)}catch{throw{code:"D3140",stack:new Error().stack,value:i,functionName:"encodeUrl"}}return a}}function G(i){if(!(typeof i>"u")){var a;try{a=decodeURIComponent(i)}catch{throw{code:"D3140",stack:new Error().stack,value:i,functionName:"decodeUrlComponent"}}return a}}function fe(i){if(!(typeof i>"u")){var a;try{a=decodeURI(i)}catch{throw{code:"D3140",stack:new Error().stack,value:i,functionName:"decodeUrl"}}return a}}async function _e(i,a,l){if(!(typeof i>"u")){if(l<0)throw{code:"D3020",stack:new Error().stack,value:l,index:3};var g=[];if(typeof l>"u"||l>0)if(typeof a=="string")g=i.split(a,l);else{var m=0,x=await ce(a,i);if(typeof x<"u"){for(var $=0;typeof x<"u"&&(typeof l>"u"||m<l);)g.push(i.substring($,x.start)),$=x.end,x=await ce(x.next),m++;(typeof l>"u"||m<l)&&g.push(i.substring($))}else g.push(i)}return g}}function we(i,a){if(!(typeof i>"u"))return typeof a>"u"&&(a=""),i.join(a)}function _(i,a,l){if(!(typeof i>"u")){var g={"decimal-separator":".","grouping-separator":",","exponent-separator":"e",infinity:"Infinity","minus-sign":"-",NaN:"NaN",percent:"%","per-mille":"‰","zero-digit":"0",digit:"#","pattern-separator":";"},m=g;typeof l<"u"&&o.keys(l).forEach(function(ne){m[ne]=l[ne]});for(var x=[],$=m["zero-digit"].charCodeAt(0),j=$;j<$+10;j++)x.push(String.fromCharCode(j));var se=x.concat([m["decimal-separator"],m["exponent-separator"],m["grouping-separator"],m.digit,m["pattern-separator"]]),W=a.split(m["pattern-separator"]);if(W.length>2)throw{code:"D3080",stack:new Error().stack};var Ae=function(ne){var Pe=(function(){for(var Ue,Ze=0;Ze<ne.length;Ze++)if(Ue=ne.charAt(Ze),se.indexOf(Ue)!==-1&&Ue!==m["exponent-separator"])return ne.substring(0,Ze);return""})(),He=(function(){for(var Ue,Ze=ne.length-1;Ze>=0;Ze--)if(Ue=ne.charAt(Ze),se.indexOf(Ue)!==-1&&Ue!==m["exponent-separator"])return ne.substring(Ze+1);return""})(),Se=ne.substring(Pe.length,ne.length-He.length),Ye,mt,Xe,wt,Ke=ne.indexOf(m["exponent-separator"],Pe.length);Ke===-1||Ke>ne.length-He.length?(Ye=Se,mt=void 0):(Ye=Se.substring(0,Ke),mt=Se.substring(Ke+1));var rt=Ye.indexOf(m["decimal-separator"]);return rt===-1?(Xe=Ye,wt=He):(Xe=Ye.substring(0,rt),wt=Ye.substring(rt+1)),{prefix:Pe,suffix:He,activePart:Se,mantissaPart:Ye,exponentPart:mt,integerPart:Xe,fractionalPart:wt,subpicture:ne}},xe=function(ne){var Pe,He,Se=ne.subpicture,Ye=Se.indexOf(m["decimal-separator"]);Ye!==Se.lastIndexOf(m["decimal-separator"])&&(Pe="D3081"),Se.indexOf(m.percent)!==Se.lastIndexOf(m.percent)&&(Pe="D3082"),Se.indexOf(m["per-mille"])!==Se.lastIndexOf(m["per-mille"])&&(Pe="D3083"),Se.indexOf(m.percent)!==-1&&Se.indexOf(m["per-mille"])!==-1&&(Pe="D3084");var mt=!1;for(He=0;He<ne.mantissaPart.length;He++){var Xe=ne.mantissaPart.charAt(He);if(x.indexOf(Xe)!==-1||Xe===m.digit){mt=!0;break}}mt||(Pe="D3085");var wt=ne.activePart.split("").map(function(Ue){return se.indexOf(Ue)===-1?"p":"a"}).join("");wt.indexOf("p")!==-1&&(Pe="D3086"),Ye!==-1?(Se.charAt(Ye-1)===m["grouping-separator"]||Se.charAt(Ye+1)===m["grouping-separator"])&&(Pe="D3087"):ne.integerPart.charAt(ne.integerPart.length-1)===m["grouping-separator"]&&(Pe="D3088"),Se.indexOf(m["grouping-separator"]+m["grouping-separator"])!==-1&&(Pe="D3089");var Ke=ne.integerPart.indexOf(m.digit);Ke!==-1&&ne.integerPart.substring(0,Ke).split("").filter(function(Ue){return x.indexOf(Ue)>-1}).length>0&&(Pe="D3090"),Ke=ne.fractionalPart.lastIndexOf(m.digit),Ke!==-1&&ne.fractionalPart.substring(Ke).split("").filter(function(Ue){return x.indexOf(Ue)>-1}).length>0&&(Pe="D3091");var rt=typeof ne.exponentPart=="string";if(rt&&ne.exponentPart.length>0&&(Se.indexOf(m.percent)!==-1||Se.indexOf(m["per-mille"])!==-1)&&(Pe="D3092"),rt&&(ne.exponentPart.length===0||ne.exponentPart.split("").filter(function(Ue){return x.indexOf(Ue)===-1}).length>0)&&(Pe="D3093"),Pe)throw{code:Pe,stack:new Error().stack}},ke=function(ne){var Pe=function(Ie,hr){for(var Wt=[],ut=Ie.indexOf(m["grouping-separator"]);ut!==-1;){var dr=(hr?Ie.substring(0,ut):Ie.substring(ut)).split("").filter(function(Rt){return x.indexOf(Rt)!==-1||Rt===m.digit}).length;Wt.push(dr),ut=ne.integerPart.indexOf(m["grouping-separator"],ut+1)}return Wt},He=Pe(ne.integerPart),Se=function(Ie){if(Ie.length===0)return 0;for(var hr=function(dr,Rt){return Rt===0?dr:hr(Rt,dr%Rt)},Wt=Ie.reduce(hr),ut=1;ut<=Ie.length;ut++)if(Ie.indexOf(ut*Wt)===-1)return 0;return Wt},Ye=Se(He),mt=Pe(ne.fractionalPart,!0),Xe=ne.integerPart.split("").filter(function(Ie){return x.indexOf(Ie)!==-1}).length,wt=Xe,Ke=ne.fractionalPart.split(""),rt=Ke.filter(function(Ie){return x.indexOf(Ie)!==-1}).length,Ue=Ke.filter(function(Ie){return x.indexOf(Ie)!==-1||Ie===m.digit}).length,Ze=typeof ne.exponentPart=="string";Xe===0&&Ue===0&&(Ze?(rt=1,Ue=1):Xe=1),Ze&&Xe===0&&ne.integerPart.indexOf(m.digit)!==-1&&(Xe=1),Xe===0&&rt===0&&(rt=1);var Cn=0;return Ze&&(Cn=ne.exponentPart.split("").filter(function(Ie){return x.indexOf(Ie)!==-1}).length),{integerPartGroupingPositions:He,regularGrouping:Ye,minimumIntegerPartSize:Xe,scalingFactor:wt,prefix:ne.prefix,fractionalPartGroupingPositions:mt,minimumFactionalPartSize:rt,maximumFactionalPartSize:Ue,minimumExponentSize:Cn,suffix:ne.suffix,picture:ne.subpicture}},Me=W.map(Ae);Me.forEach(xe);var be=Me.map(ke),De=m["minus-sign"],et=m["zero-digit"],qe=m["decimal-separator"],st=m["grouping-separator"];be.length===1&&(be.push(JSON.parse(JSON.stringify(be[0]))),be[1].prefix=De+be[1].prefix);var Oe;i>=0?Oe=be[0]:Oe=be[1];var Gt;Oe.picture.indexOf(m.percent)!==-1?Gt=i*100:Oe.picture.indexOf(m["per-mille"])!==-1?Gt=i*1e3:Gt=i;var pt,Dt;if(Oe.minimumExponentSize===0)pt=Gt;else{var ls=Math.pow(10,Oe.scalingFactor),fs=Math.pow(10,Oe.scalingFactor-1);if(pt=Gt,Dt=0,pt!==0){for(;Math.abs(pt)<fs;)pt*=10,Dt-=1;for(;Math.abs(pt)>ls;)pt/=10,Dt+=1}}var hs=L(pt,Oe.maximumFactionalPartSize),Pn=function(ne,Pe){var He=Math.abs(ne).toFixed(Pe);return et!=="0"&&(He=He.split("").map(function(Se){return Se>="0"&&Se<="9"?x[Se.charCodeAt(0)-48]:Se}).join("")),He},oe=Pn(hs,Oe.maximumFactionalPartSize),ze=oe.indexOf(".");for(ze===-1?oe=oe+qe:oe=oe.replace(".",qe);oe.charAt(0)===et;)oe=oe.substring(1);for(;oe.charAt(oe.length-1)===et;)oe=oe.substring(0,oe.length-1);ze=oe.indexOf(qe);var Vt=Oe.minimumIntegerPartSize-ze,Tn=Oe.minimumFactionalPartSize-(oe.length-ze-1);if(oe=(Vt>0?new Array(Vt+1).join(et):"")+oe,oe=oe+(Tn>0?new Array(Tn+1).join(et):""),ze=oe.indexOf(qe),Oe.regularGrouping>0)for(var ds=Math.floor((ze-1)/Oe.regularGrouping),lr=1;lr<=ds;lr++)oe=[oe.slice(0,ze-lr*Oe.regularGrouping),st,oe.slice(ze-lr*Oe.regularGrouping)].join("");else Oe.integerPartGroupingPositions.forEach(function(ne){oe=[oe.slice(0,ze-ne),st,oe.slice(ze-ne)].join(""),ze++});if(ze=oe.indexOf(qe),Oe.fractionalPartGroupingPositions.forEach(function(ne){oe=[oe.slice(0,ne+ze+1),st,oe.slice(ne+ze+1)].join("")}),ze=oe.indexOf(qe),(Oe.picture.indexOf(qe)===-1||ze===oe.length-1)&&(oe=oe.substring(0,oe.length-1)),typeof Dt<"u"){var fr=Pn(Dt,0);Vt=Oe.minimumExponentSize-fr.length,Vt>0&&(fr=new Array(Vt+1).join(et)+fr),oe=oe+m["exponent-separator"]+(Dt<0?De:"")+fr}return oe=Oe.prefix+oe+Oe.suffix,oe}}function D(i,a){if(!(typeof i>"u")){if(i=L(i),typeof a>"u"?a=10:a=L(a),a<2||a>36)throw{code:"D3100",stack:new Error().stack,value:a};var l=i.toString(a);return l}}function S(i){var a;if(!(typeof i>"u")){if(typeof i=="number")a=i;else if(typeof i=="string"&&/^-?[0-9]+(\.[0-9]+)?([Ee][-+]?[0-9]+)?$/.test(i)&&!isNaN(parseFloat(i))&&isFinite(i))a=parseFloat(i);else if(typeof i=="string"&&/^(0[xX][0-9A-Fa-f]+)|(0[oO][0-7]+)|(0[bB][0-1]+)$/.test(i))a=Number(i);else if(i===!0)a=1;else if(i===!1)a=0;else throw{code:"D3030",value:i,stack:new Error().stack,index:1};return a}}function U(i){var a;if(!(typeof i>"u"))return a=Math.abs(i),a}function B(i){var a;if(!(typeof i>"u"))return a=Math.floor(i),a}function I(i){var a;if(!(typeof i>"u"))return a=Math.ceil(i),a}function L(i,a){var l;if(!(typeof i>"u")){if(a){var g=i.toString().split("e");i=+(g[0]+"e"+(g[1]?+g[1]+a:a))}l=Math.round(i);var m=l-i;return Math.abs(m)===.5&&Math.abs(l%2)===1&&(l=l-1),a&&(g=l.toString().split("e"),l=+(g[0]+"e"+(g[1]?+g[1]-a:-a))),Object.is(l,-0)&&(l=0),l}}function q(i){var a;if(!(typeof i>"u")){if(i<0)throw{stack:new Error().stack,code:"D3060",index:1,value:i};return a=Math.sqrt(i),a}}function K(i,a){var l;if(!(typeof i>"u")){if(l=Math.pow(i,a),!isFinite(l))throw{stack:new Error().stack,code:"D3061",index:1,value:i,exp:a};return l}}function he(){return Math.random()}function ue(i){if(!(typeof i>"u")){var a=!1;if(Array.isArray(i)){if(i.length===1)a=ue(i[0]);else if(i.length>1){var l=i.filter(function(g){return ue(g)});a=l.length>0}}else typeof i=="string"?i.length>0&&(a=!0):y(i)?i!==0&&(a=!0):i!==null&&typeof i=="object"&&!w(i)?o.keys(i).length>0&&(a=!0):typeof i=="boolean"&&i===!0&&(a=!0);return a}}function te(i){if(!(typeof i>"u"))return!ue(i)}function Z(i,a,l,g){var m=[a],x=N(i);return x>=2&&m.push(l),x>=3&&m.push(g),m}async function le(i,a){if(!(typeof i>"u")){for(var l=this.createSequence(),g=0;g<i.length;g++){var m=Z(a,i[g],g,i),x=await a.apply(this,m);typeof x<"u"&&l.push(x)}return l}}async function Q(i,a){if(!(typeof i>"u")){for(var l=this.createSequence(),g=0;g<i.length;g++){var m=i[g],x=Z(a,m,g,i),$=await a.apply(this,x);ue($)&&l.push(m)}return l}}async function Ne(i,a){if(!(typeof i>"u")){for(var l=!1,g,m=0;m<i.length;m++){var x=i[m],$=!0;if(typeof a<"u"){var j=Z(a,x,m,i),se=await a.apply(this,j);$=ue(se)}if($)if(!l)g=x,l=!0;else throw{stack:new Error().stack,code:"D3138",index:m}}if(!l)throw{stack:new Error().stack,code:"D3139"};return g}}function Qe(){for(var i=[],a=Array.prototype.slice.call(arguments),l=Math.min.apply(Math,a.map(function(x){return Array.isArray(x)?x.length:0})),g=0;g<l;g++){var m=a.map(x=>x[g]);i.push(m)}return i}async function je(i,a,l){if(!(typeof i>"u")){var g,m=N(a);if(m<2)throw{stack:new Error().stack,code:"D3050",index:1};var x;for(typeof l>"u"&&i.length>0?(g=i[0],x=1):(g=l,x=0);x<i.length;){var $=[g,i[x]];m>=3&&$.push(x),m>=4&&$.push(i),g=await a.apply(this,$),x++}return g}}function Le(i){var a=this.createSequence();if(Array.isArray(i)){for(var l=Object.create(null),g=0;g<i.length;g++){var m=Le.call(this,i[g]);m.forEach(function(x){l[x]=!0})}a=Le.call(this,l)}else i!==null&&typeof i=="object"&&!w(i)&&o.keys(i).forEach(x=>a.push(x));return a}function Be(i,a){var l;if(Array.isArray(i)){l=this.createSequence();for(var g=0;g<i.length;g++){var m=Be.call(this,i[g],a);typeof m<"u"&&(Array.isArray(m)?m.forEach(x=>l.push(x)):l.push(m))}}else i!==null&&typeof i=="object"&&Object.prototype.hasOwnProperty.call(i,a)&&!w(i)&&(l=i[a]);return l}function ot(i,a){if(typeof i>"u")return a;if(typeof a>"u")return i;Array.isArray(i)||(i=this.createSequence(i)),Array.isArray(a)||(a=[a]);const l=i.length+a.length;if(this.options&&l>this.options.sequence)throw{code:"D2015",stack:new Error().stack,value:l};return i.concat(a)}function Tt(i){return!(typeof i>"u")}function Ct(i){var a=this.createSequence();if(Array.isArray(i))for(var l=0;l<i.length;l++)a=ot.call(this,a,Ct.call(this,i[l]));else if(i!==null&&typeof i=="object"&&!C(i))for(const m of o.keys(i)){var g=Object.create(null);g[m]=i[m],a.push(g)}else a=i;return a}function z(i){if(!(typeof i>"u")){var a=Object.create(null);return i.forEach(function(l){for(const g of o.keys(l))a[g]=l[g]}),a}}function ur(i){if(!(typeof i>"u")){if(i.length<=1)return i;for(var a=i.length,l=new Array(a),g=0;g<a;g++)l[a-g-1]=i[g];return l}}async function cr(i,a){var l=this.createSequence();for(const x of o.keys(i)){var g=Z(a,i[x],x,i),m=await a.apply(this,g);typeof m<"u"&&l.push(m)}return l}function tt(i){throw{code:"D3137",stack:new Error().stack,message:i||"$error() function evaluated"}}function Ht(i,a){if(!i)throw{code:"D3141",stack:new Error().stack,message:a||"$assert() statement failed"}}function it(i){if(i!==void 0)return i===null?"null":y(i)?"number":typeof i=="string"?"string":typeof i=="boolean"?"boolean":Array.isArray(i)?"array":w(i)?"function":"object"}async function yt(i,a){if(!(typeof i>"u")){if(i.length<=1)return i;var l;if(typeof a>"u"){if(!M(i)&&!P(i))throw{stack:new Error().stack,code:"D3070",index:1};l=async function($,j){return $>j}}else l=a;var g=async function($,j){var se=async function(Ae,xe,ke){xe.length===0?Array.prototype.push.apply(Ae,ke):ke.length===0?Array.prototype.push.apply(Ae,xe):await l(xe[0],ke[0])?(Ae.push(ke[0]),await se(Ae,xe,ke.slice(1))):(Ae.push(xe[0]),await se(Ae,xe.slice(1),ke))},W=[];return await se(W,$,j),W},m=async function($){if(!Array.isArray($)||$.length<=1)return $;var j=Math.floor($.length/2),se=$.slice(0,j),W=$.slice(j);return se=await m(se),W=await m(W),await g(se,W)},x=await m(i);return x}}function c(i){if(!(typeof i>"u")){if(i.length<=1)return i;for(var a=new Array(i.length),l=0;l<i.length;l++){var g=Math.floor(Math.random()*(l+1));l!==g&&(a[l]=a[g]),a[g]=i[l]}return a}}function f(i){if(!(typeof i>"u")){if(!Array.isArray(i)||i.length<=1)return i;for(var a=k(i)?this.createSequence():[],l=0;l<i.length;l++){for(var g=i[l],m=!1,x=0;x<a.length;x++)if(ee(g,a[x])){m=!0;break}m||a.push(g)}return a}}async function d(i,a){var l=Object.create(null);for(const $ of o.keys(i)){var g=i[$],m=Z(a,g,$,i),x=await a.apply(this,m);ue(x)&&(l[$]=g)}return o.keys(l).length===0&&(l=void 0),l}return{sum:E,count:v,max:O,min:A,average:T,string:H,substring:F,substringBefore:re,substringAfter:ae,lowercase:Ee,uppercase:ve,length:pe,trim:Te,pad:Je,match:We,contains:me,replace:ie,split:_e,join:we,formatNumber:_,formatBase:D,number:S,floor:B,ceil:I,round:L,abs:U,sqrt:q,power:K,random:he,boolean:ue,not:te,map:le,zip:Qe,filter:Q,single:Ne,foldLeft:je,sift:d,keys:Le,lookup:Be,append:ot,exists:Tt,spread:Ct,merge:z,reverse:ur,each:cr,error:tt,assert:Ht,type:it,sort:yt,shuffle:c,distinct:f,base64encode:Ce,base64decode:nt,encodeUrlComponent:h,encodeUrl:b,decodeUrlComponent:G,decodeUrl:fe}})();r.exports=p}).call(this)}).call(this,typeof cn<"u"?cn:typeof self<"u"?self:typeof window<"u"?window:{})},{"./utils":6}],3:[function(t,r,s){var u=t("./datetime"),o=t("./functions"),p=t("./utils"),y=t("./parser"),P=t("./signature"),M=(function(){var k=p.isNumeric,w=p.isArrayOfStrings,C=p.isArrayOfNumbers,R=p.isSequence,N=p.isFunction,ee=p.isLambda,J=p.isIterable,E=p.isPromise,v=p.getFunctionArity,O=p.isDeepEqual,A=tt(null);async function T(c,f,d){var i;d.base.depth++,d.base.guardrails();var a=d.lookup(Symbol.for("jsonata.__evaluate_entry"));switch(a&&await a(c,f,d),c.type){case"path":i=await H(c,f,d);break;case"binary":i=await pe(c,f,d);break;case"unary":i=await Te(c,f,d);break;case"name":i=Je(c,f,d);break;case"string":case"number":case"value":i=ce(c);break;case"wildcard":i=me(c,f,d);break;case"descendant":i=ie(c,f,d);break;case"parent":i=d.lookup(c.slot.label);break;case"condition":i=await B(c,f,d);break;case"block":i=await I(c,f,d);break;case"bind":i=await U(c,f,d);break;case"regex":i=L(c,f,d);break;case"function":i=await Z(c,f,d);break;case"variable":i=q(c,f,d);break;case"lambda":i=Ne(c,f,d);break;case"partial":i=await Qe(c,f,d);break;case"apply":i=await te(c,f,d);break;case"transform":i=he(c,f,d);break}if(Object.prototype.hasOwnProperty.call(c,"predicate"))for(var l=0;l<c.predicate.length;l++)i=await ve(c.predicate[l].expr,i,d);c.type!=="path"&&Object.prototype.hasOwnProperty.call(c,"group")&&(i=await _(c.group,i,d));var g=d.lookup(Symbol.for("jsonata.__evaluate_exit"));return g&&await g(c,f,d,i),i&&R(i)&&!i.tupleStream&&(c.keepArray&&(i.keepSingleton=!0),i.length===0?i=void 0:i.length===1&&(i=i.keepSingleton?i:i[0])),d.base.depth--,i}async function H(c,f,d){var i;Array.isArray(f)&&c.steps[0].type!=="variable"?i=f:i=d.base.createSequence(f);for(var a,l=!1,g=void 0,m=0;m<c.steps.length;m++){var x=c.steps[m];if(x.tuple&&(l=!0),m===0&&x.consarray?a=await T(x,i,d):l?g=await Ee(x,i,g,d):a=await re(x,i,d,m===c.steps.length-1),!l&&(typeof a>"u"||a.length===0))break;typeof x.focus>"u"&&(i=a)}if(l)if(c.tuple)a=g;else for(a=d.base.createSequence(),m=0;m<g.length;m++)a.push(g[m]["@"]);return c.keepSingletonArray&&(Array.isArray(a)&&a.cons&&!a.sequence&&(a=d.base.createSequence(a)),a.keepSingleton=!0),Object.prototype.hasOwnProperty.call(c,"group")&&(a=await _(c.group,l?g:a,d)),a}function F(c,f){var d=tt(c);for(const i of p.keys(f))d.bind(i,f[i]);return d}async function re(c,f,d,i){var a;if(c.type==="sort")return a=await K(c,f,d),c.stages&&(a=await ae(c.stages,a,d)),a;a=d.base.createSequence();for(var l=0;l<f.length;l++){var g=await T(c,f[l],d);if(c.stages)for(var m=0;m<c.stages.length;m++)g=await ve(c.stages[m].expr,g,d);typeof g<"u"&&a.push(g)}var x=d.base.createSequence();return i&&a.length===1&&Array.isArray(a[0])&&!R(a[0])?x=a[0]:Array.prototype.forEach.call(a,function($){!Array.isArray($)||$.cons?x.push($):Array.prototype.forEach.call($,j=>x.push(j))}),x}async function ae(c,f,d){for(var i=f,a=0;a<c.length;a++){var l=c[a];switch(l.type){case"filter":i=await ve(l.expr,i,d);break;case"index":for(var g=0;g<i.length;g++){var m=i[g];m[l.value]=g}break}}return i}async function Ee(c,f,d,i){var a;if(c.type==="sort"){if(d)a=await K(c,d,i);else{var l=await K(c,f,i);a=i.base.createSequence(),a.tupleStream=!0;for(var g=0;g<l.length;g++){var m={"@":l[g]};m[c.index]=g,a.push(m)}}return c.stages&&(a=await ae(c.stages,a,i)),a}a=i.base.createSequence(),a.tupleStream=!0;var x=i;d===void 0&&(d=f.map(W=>({"@":W})));for(var $=0;$<d.length;$++){x=F(i,d[$]);var j=await T(c,d[$]["@"],x);if(typeof j<"u"){Array.isArray(j)||(j=[j]);for(var se=0;se<j.length;se++)m=Object.create(null),Object.assign(m,d[$]),j.tupleStream?Object.assign(m,j[se]):(c.focus?(m[c.focus]=j[se],m["@"]=d[$]["@"]):m["@"]=j[se],c.index&&(m[c.index]=se),c.ancestor&&(m[c.ancestor.label]=d[$]["@"])),a.push(m)}}return c.stages&&(a=await ae(c.stages,a,i)),a}async function ve(c,f,d){var i=d.base.createSequence();if(f&&f.tupleStream&&(i.tupleStream=!0),Array.isArray(f)||(f=d.base.createSequence(f)),c.type==="number"){var a=Math.floor(c.value);a<0&&(a=f.length+a);var l=await f[a];typeof l<"u"&&(Array.isArray(l)?i=l:i.push(l))}else for(a=0;a<f.length;a++){var l=f[a],g=l,m=d;f.tupleStream&&(g=l["@"],m=F(d,l));var x=await T(c,g,m);k(x)&&(x=[x]),C(x)?Array.prototype.forEach.call(x,function(j){var se=Math.floor(j);se<0&&(se=f.length+se),se===a&&i.push(l)}):o.boolean(x)&&i.push(l)}return i}async function pe(c,f,d){var i,a=await T(c.lhs,f,d),l=c.value,g=async()=>await T(c.rhs,f,d);if(l==="and"||l==="or")try{return await fe(a,g,l)}catch(x){throw x.position=c.position,x.token=l,x}var m=await g();try{switch(l){case"+":case"-":case"*":case"/":case"%":i=nt(a,m,l);break;case"=":case"!=":i=h(a,m,l);break;case"<":case"<=":case">":case">=":i=b(a,m,l);break;case"&":i=we(a,m);break;case"..":i=S(a,m,d);break;case"in":i=G(a,m);break}}catch(x){throw x.position=c.position,x.token=l,x}return i}async function Te(c,f,d){var i,a={options:d.base.options,createSequence:d.base.createSequence};switch(c.value){case"-":if(i=await T(c.expression,f,d),typeof i>"u")i=void 0;else if(k(i))i=-i;else throw{code:"D1002",stack:new Error().stack,position:c.position,token:c.value,value:i};break;case"[":i=[];let m=await Promise.all(c.expressions.map(async(x,$)=>(d.isParallelCall=$>0,[x,await T(x,f,d)])));for(let x of m){var[l,g]=x;typeof g<"u"&&(l.value==="["?i.push(g):i=o.append.call(a,i,g))}c.consarray&&Object.defineProperty(i,"cons",{enumerable:!1,configurable:!1,value:!0});break;case"{":i=await _(c,f,d);break}return i}function Je(c,f,d){var i={createSequence:d.base.createSequence};return o.lookup.call(i,f,c.value)}function ce(c){return c.value}function me(c,f,d){var i={options:d.base.options,createSequence:d.base.createSequence},a=i.createSequence();return Array.isArray(f)&&f.outerWrapper&&f.length>0&&(f=f[0]),f!==null&&typeof f=="object"&&!N(f)&&p.keys(f).forEach(function(l){var g=f[l];Array.isArray(g)?(g=We(g),a=o.append.call(i,a,g)):a.push(g)}),a}function We(c,f){return typeof f>"u"&&(f=[]),Array.isArray(c)?Array.prototype.forEach.call(c,function(d){We(d,f)}):f.push(c),f}function ie(c,f,d){var i,a=d.base.createSequence();return typeof f<"u"&&(Ce(f,a),a.length===1?i=a[0]:i=a),i}function Ce(c,f){Array.isArray(c)||f.push(c),Array.isArray(c)?Array.prototype.forEach.call(c,function(d){Ce(d,f)}):c!==null&&typeof c=="object"&&!N(c)&&p.keys(c).forEach(function(d){Ce(c[d],f)})}function nt(c,f,d){var i;if(typeof c<"u"&&!k(c))throw{code:"T2001",stack:new Error().stack,value:c};if(typeof f<"u"&&!k(f))throw{code:"T2002",stack:new Error().stack,value:f};if(typeof c>"u"||typeof f>"u")return i;switch(d){case"+":i=c+f;break;case"-":i=c-f;break;case"*":i=c*f;break;case"/":i=c/f;break;case"%":i=c%f;break}return i}function h(c,f,d){var i,a=typeof c,l=typeof f;if(a==="undefined"||l==="undefined")return!1;switch(d){case"=":i=O(c,f);break;case"!=":i=!O(c,f);break}return i}function b(c,f,d){var i,a=typeof c,l=typeof f,g=a==="undefined"||a==="string"||a==="number",m=l==="undefined"||l==="string"||l==="number";if(!g||!m)throw{code:"T2010",stack:new Error().stack,value:a==="string"||a==="number"?f:c};if(!(a==="undefined"||l==="undefined")){if(a!==l)throw{code:"T2009",stack:new Error().stack,value:c,value2:f};switch(d){case"<":i=c<f;break;case"<=":i=c<=f;break;case">":i=c>f;break;case">=":i=c>=f;break}return i}}function G(c,f){var d=!1;if(typeof c>"u"||typeof f>"u")return!1;Array.isArray(f)||(f=[f]);for(var i=0;i<f.length;i++)if(f[i]===c){d=!0;break}return d}async function fe(c,f,d){var i,a=_e(c);switch(d){case"and":i=a&&_e(await f());break;case"or":i=a||_e(await f());break}return i}function _e(c){var f=o.boolean(c);return typeof f>"u"?!1:f}function we(c,f){var d,i="",a="";return typeof c<"u"&&(i=o.string(c)),typeof f<"u"&&(a=o.string(f)),d=i.concat(a),d}async function _(c,f,d){var i=Object.create(null),a=Object.create(null),l=!!(f&&f.tupleStream),g={options:d.base.options,createSequence:d.base.createSequence};Array.isArray(f)||(d.base.options,f=g.createSequence(f)),f.length===0&&!l&&f.push(void 0);for(var m=0;m<f.length;m++)for(var x=f[m],$=l?F(d,x):d,j=0;j<c.lhs.length;j++){var se=c.lhs[j],W=await T(se[0],l?x["@"]:x,$);if(typeof W!="string"&&W!==void 0)throw{code:"T1003",stack:new Error().stack,position:c.position,value:W};if(W!==void 0){if(W==="_jsonata_lambda"||W==="_jsonata_function")throw{code:"D1013",stack:new Error().stack,position:c.position,value:W};var Ae={data:x,exprIndex:j};if(Object.prototype.hasOwnProperty.call(a,W)){if(a[W].exprIndex!==j)throw{code:"D1009",stack:new Error().stack,position:c.position,value:W};a[W].data=o.append.call(g,a[W].data,x)}else a[W]=Ae}}let xe=await Promise.all(p.keys(a).map(async(Me,be)=>{let De=a[Me];var et=De.data,qe=d;if(l){var st=D(De.data,d);et=st["@"],delete st["@"],qe=F(d,st)}return d.isParallelCall=be>0,[Me,await T(c.lhs[De.exprIndex][1],et,qe)]}));for(let Me of xe){var[W,ke]=await Me;typeof ke<"u"&&(i[W]=ke)}return i}function D(c,f){if(!Array.isArray(c))return c;var d=Object.create(null),i={options:f.base.options,createSequence:f.base.createSequence};Object.assign(d,c[0]);for(var a=1;a<c.length;a++)for(const l of p.keys(c[a]))d[l]=o.append.call(i,d[l],c[a][l]);return d}function S(c,f,d){var i;if(typeof c<"u"&&!Number.isInteger(c))throw{code:"T2003",stack:new Error().stack,value:c};if(typeof f<"u"&&!Number.isInteger(f))throw{code:"T2004",stack:new Error().stack,value:f};if(typeof c>"u"||typeof f>"u"||c>f)return i;var a=f-c+1;if(a>1e7)throw{code:"D2014",stack:new Error().stack,value:a};if(d.base.options&&a>d.base.options.sequence)throw{code:"D2015",stack:new Error().stack,value:a};i=new Array(a);for(var l=c,g=0;l<=f;l++,g++)i[g]=l;return i.sequence=!0,i}async function U(c,f,d){var i=await T(c.rhs,f,d);return d.bind(c.lhs.value,i),i}async function B(c,f,d){var i,a=await T(c.condition,f,d);return o.boolean(a)?i=await T(c.then,f,d):typeof c.else<"u"&&(i=await T(c.else,f,d)),i}async function I(c,f,d){for(var i,a=tt(d),l=0;l<c.expressions.length;l++)i=await T(c.expressions[l],f,a);return i}function L(c,f,d){var i=new d.base.RegexEngine(c.value),a=function(l,g){var m;i.lastIndex=g||0;var x=i.exec(l);if(x!==null){if(m={match:x[0],start:x.index,end:x.index+x[0].length,groups:[]},x.length>1)for(var $=1;$<x.length;$++)m.groups.push(x[$]);m.next=function(){if(!(i.lastIndex>=l.length)){var j=a(l,i.lastIndex);if(j&&j.match==="")throw{code:"D1004",stack:new Error().stack,position:c.position,value:c.value.source};return j}}}return m};return a}function q(c,f,d){var i;return c.value===""?i=f&&f.outerWrapper?f[0]:f:i=d.lookup(c.value),i}async function K(c,f,d){var i,a=f,l=!!f.tupleStream,g=async function(x,$){for(var j=0,se=0;j===0&&se<c.terms.length;se++){var W=c.terms[se],Ae=x,xe=d;l&&(Ae=x["@"],xe=F(d,x));var ke=await T(W.expression,Ae,xe);Ae=$,xe=d,l&&(Ae=$["@"],xe=F(d,$));var Me=await T(W.expression,Ae,xe),be=typeof ke,De=typeof Me;if(be==="undefined"){j=De==="undefined"?0:1;continue}if(De==="undefined"){j=-1;continue}if(!(be==="string"||be==="number")||!(De==="string"||De==="number"))throw{code:"T2008",stack:new Error().stack,position:c.position,value:be==="string"||be==="number"?Me:ke};if(be!==De)throw{code:"T2007",stack:new Error().stack,position:c.position,value:ke,value2:Me};ke!==Me&&(ke<Me?j=-1:j=1,W.descending===!0&&(j=-j))}return j===1},m={environment:d,input:f};return i=await o.sort.apply(m,[a,g]),i}function he(c,f,d){var i=async function(a){if(!(typeof a>"u")){var l=d.lookup("clone");if(!N(l))throw{code:"T2013",stack:new Error().stack,position:c.position};var g=await le(l,[a],null,d),m=await T(c.pattern,g,d);if(typeof m<"u"){Array.isArray(m)||(m=[m]);for(var x=0;x<m.length;x++){var $=m[x],j=await T(c.update,$,d),se=typeof j;if(se!=="undefined"){if(se!=="object"||j===null||Array.isArray(j))throw{code:"T2011",stack:new Error().stack,position:c.update.position,value:j};for(const ke of p.keys(j))$[ke]=j[ke]}if(typeof c.delete<"u"){var W=await T(c.delete,$,d);if(typeof W<"u"){var Ae=W;if(Array.isArray(W)||(W=[W]),!w(W))throw{code:"T2012",stack:new Error().stack,position:c.delete.position,value:Ae};for(var xe=0;xe<W.length;xe++)typeof $=="object"&&$!==null&&delete $[W[xe]]}}}}return g}};return z(i,"<(oa):o>")}var ue=y("function($f, $g) { function($x){ $g($f($x)) } }");async function te(c,f,d){var i,a=await T(c.lhs,f,d);if(c.rhs.type==="function")i=await Z(c.rhs,f,d,{context:a});else{var l=await T(c.rhs,f,d);if(!N(l))throw{code:"T2006",stack:new Error().stack,position:c.position,value:l};if(N(a)){var g=await T(ue,null,d);i=await le(g,[a,l],null,d)}else i=await le(l,[a],null,d)}return i}async function Z(c,f,d,i){var a,l=await T(c.procedure,f,d);if(typeof l>"u"&&c.procedure.type==="path"&&d.lookup(c.procedure.steps[0].value))throw{code:"T1005",stack:new Error().stack,position:c.position,token:c.procedure.steps[0].value};var g=[];typeof i<"u"&&g.push(i.context);for(var m=0;m<c.arguments.length;m++){const $=await T(c.arguments[m],f,d);if(N($)){const j=async function(...se){return await le($,se,null,d)};j.arity=v($),g.push(j)}else g.push($)}var x=c.procedure.type==="path"?c.procedure.steps[0].value:c.procedure.value;try{typeof l=="object"&&(l.token=x,l.position=c.position),a=await le(l,g,f,d)}catch($){throw $.position||($.position=c.position),$.token||($.token=x),$}return a}async function le(c,f,d,i){var a;for(a=await Q(c,f,d,i);ee(a)&&a.thunk===!0;){var l=await T(a.body.procedure,a.input,a.environment);a.body.procedure.type==="variable"&&(l.token=a.body.procedure.value),l.position=a.body.procedure.position;for(var g=[],m=0;m<a.body.arguments.length;m++)g.push(await T(a.body.arguments[m],a.input,a.environment));a=await Q(l,g,d,i)}return a}async function Q(c,f,d,i){var a;try{var l=f;if(c&&(l=je(c.signature,f,d)),ee(c))a=await Le(c,l);else if(c&&c._jsonata_function===!0){var g={environment:i,input:d,options:i.base.options,createSequence:i.base.createSequence};a=c.implementation.apply(g,l),J(a)&&(a=a.next().value),E(a)&&(a=await a)}else if(typeof c=="function")a=c.apply(d,l),E(a)&&(a=await a);else throw{code:"T1006",stack:new Error().stack}}catch(m){throw c&&(typeof m.token>"u"&&typeof c.token<"u"&&(m.token=c.token),m.position=c.position||m.position),m}return a}function Ne(c,f,d){var i={_jsonata_lambda:!0,input:f,environment:d,arguments:c.arguments,signature:c.signature,body:c.body};return c.thunk===!0&&(i.thunk=!0),i.apply=async function(a,l){return await le(i,l,f,a?a.environment:d)},i}async function Qe(c,f,d){for(var i,a=[],l=0;l<c.arguments.length;l++){var g=c.arguments[l];g.type==="operator"&&g.value==="?"?a.push(g):a.push(await T(g,f,d))}var m=await T(c.procedure,f,d);if(typeof m>"u"&&c.procedure.type==="path"&&d.lookup(c.procedure.steps[0].value))throw{code:"T1007",stack:new Error().stack,position:c.position,token:c.procedure.steps[0].value};if(ee(m))i=Be(m,a,d);else if(m&&m._jsonata_function===!0)i=ot(m.implementation,a,d);else if(typeof m=="function")i=ot(m,a,d);else throw{code:"T1008",stack:new Error().stack,position:c.position,token:c.procedure.type==="path"?c.procedure.steps[0].value:c.procedure.value};return i}function je(c,f,d){if(typeof c>"u")return f;var i=c.validate(f,d);return i}async function Le(c,f){var d,i=tt(c.environment);return Array.prototype.forEach.call(c.arguments,function(a,l){i.bind(a.value,f[l])}),typeof c.body=="function"?d=await Tt(c.body,i):d=await T(c.body,c.input,i),d}function Be(c,f,d){var i=tt(c.environment||d),a=[];Array.prototype.forEach.call(c.arguments,function(g,m){var x=f[m];x&&x.type==="operator"&&x.value==="?"?a.push(g):i.bind(g.value,x)});var l={_jsonata_lambda:!0,input:c.input,environment:i,arguments:a,body:c.body};return l}function ot(c,f,d){var i=Ct(c);i=i.map(function(m){return"$"+m.trim()});var a="function("+i.join(", ")+"){ _ }",l=y(a);l.body=c;var g=Be(l,f,d);return g}async function Tt(c,f){var d=Ct(c),i=d.map(function(g){return f.lookup(g.trim())}),a={environment:f,createSequence:f.base.createSequence},l=c.apply(a,i);return E(l)&&(l=await l),l}function Ct(c){var f=c.toString(),d=/\(([^)]*)\)/.exec(f)[1],i=d.split(",");return i}function z(c,f){var d={_jsonata_function:!0,implementation:c};return typeof f<"u"&&(d.signature=P(f)),d}async function ur(c,f){if(!(typeof c>"u")){var d=this.input;typeof f<"u"&&(d=f,Array.isArray(d)&&!R(d)&&(d=this.createSequence(d),d.outerWrapper=!0));try{var i=y(c,!1)}catch(l){throw it(l),{stack:new Error().stack,code:"D3120",value:l.message,error:l}}try{var a=await T(i,d,this.environment)}catch(l){throw it(l),{stack:new Error().stack,code:"D3121",value:l.message,error:l}}return a}}function cr(c){if(!(typeof c>"u"))return JSON.parse(o.string(c))}function tt(c){var f=Object.create(null);const d={bind:function(a,l){f[a]=l},lookup:function(a){var l;return Object.prototype.hasOwnProperty.call(f,a)?l=f[a]:c&&(l=c.lookup(a)),l},timestamp:c?c.timestamp:null,async:c?c.async:!1,isParallelCall:c?c.isParallelCall:!1,global:c?c.global:{ancestry:[null]}};if(c){var i=c.lookup(Symbol.for("jsonata.__createFrame_push"));i&&i(c,d),d.base=c.base}return d}A.bind("sum",z(o.sum,"<a<n>:n>")),A.bind("count",z(o.count,"<a:n>")),A.bind("max",z(o.max,"<a<n>:n>")),A.bind("min",z(o.min,"<a<n>:n>")),A.bind("average",z(o.average,"<a<n>:n>")),A.bind("string",z(o.string,"<x-b?:s>")),A.bind("substring",z(o.substring,"<s-nn?:s>")),A.bind("substringBefore",z(o.substringBefore,"<s-s:s>")),A.bind("substringAfter",z(o.substringAfter,"<s-s:s>")),A.bind("lowercase",z(o.lowercase,"<s-:s>")),A.bind("uppercase",z(o.uppercase,"<s-:s>")),A.bind("length",z(o.length,"<s-:n>")),A.bind("trim",z(o.trim,"<s-:s>")),A.bind("pad",z(o.pad,"<s-ns?:s>")),A.bind("match",z(o.match,"<s-f<s:o>n?:a<o>>")),A.bind("contains",z(o.contains,"<s-(sf):b>")),A.bind("replace",z(o.replace,"<s-(sf)(sf)n?:s>")),A.bind("split",z(o.split,"<s-(sf)n?:a<s>>")),A.bind("join",z(o.join,"<a<s>s?:s>")),A.bind("formatNumber",z(o.formatNumber,"<n-so?:s>")),A.bind("formatBase",z(o.formatBase,"<n-n?:s>")),A.bind("formatInteger",z(u.formatInteger,"<n-s:s>")),A.bind("parseInteger",z(u.parseInteger,"<s-s:n>")),A.bind("number",z(o.number,"<(nsb)-:n>")),A.bind("floor",z(o.floor,"<n-:n>")),A.bind("ceil",z(o.ceil,"<n-:n>")),A.bind("round",z(o.round,"<n-n?:n>")),A.bind("abs",z(o.abs,"<n-:n>")),A.bind("sqrt",z(o.sqrt,"<n-:n>")),A.bind("power",z(o.power,"<n-n:n>")),A.bind("random",z(o.random,"<:n>")),A.bind("boolean",z(o.boolean,"<x-:b>")),A.bind("not",z(o.not,"<x-:b>")),A.bind("map",z(o.map,"<af>")),A.bind("zip",z(o.zip,"<a+>")),A.bind("filter",z(o.filter,"<af>")),A.bind("single",z(o.single,"<af?>")),A.bind("reduce",z(o.foldLeft,"<afj?:j>")),A.bind("sift",z(o.sift,"<o-f?:o>")),A.bind("keys",z(o.keys,"<x-:a<s>>")),A.bind("lookup",z(o.lookup,"<x-s:x>")),A.bind("append",z(o.append,"<xx:a>")),A.bind("exists",z(o.exists,"<x:b>")),A.bind("spread",z(o.spread,"<x-:a<o>>")),A.bind("merge",z(o.merge,"<a<o>:o>")),A.bind("reverse",z(o.reverse,"<a:a>")),A.bind("each",z(o.each,"<o-f:a>")),A.bind("error",z(o.error,"<s?:x>")),A.bind("assert",z(o.assert,"<bs?:x>")),A.bind("type",z(o.type,"<x:s>")),A.bind("sort",z(o.sort,"<af?:a>")),A.bind("shuffle",z(o.shuffle,"<a:a>")),A.bind("distinct",z(o.distinct,"<x:x>")),A.bind("base64encode",z(o.base64encode,"<s-:s>")),A.bind("base64decode",z(o.base64decode,"<s-:s>")),A.bind("encodeUrlComponent",z(o.encodeUrlComponent,"<s-:s>")),A.bind("encodeUrl",z(o.encodeUrl,"<s-:s>")),A.bind("decodeUrlComponent",z(o.decodeUrlComponent,"<s-:s>")),A.bind("decodeUrl",z(o.decodeUrl,"<s-:s>")),A.bind("eval",z(ur,"<sx?:x>")),A.bind("toMillis",z(u.toMillis,"<s-s?:n>")),A.bind("fromMillis",z(u.fromMillis,"<n-s?s?:s>")),A.bind("clone",z(cr,"<(oa)-:o>"));var Ht={S0101:"String literal must be terminated by a matching quote",S0102:"Number out of range: {{token}}",S0103:"Unsupported escape sequence: \\{{token}}",S0104:"The escape sequence \\u must be followed by 4 hex digits",S0105:"Quoted property name must be terminated with a backquote (`)",S0106:"Comment has no closing tag",S0201:"Syntax error: {{token}}",S0202:"Expected {{value}}, got {{token}}",S0203:"Expected {{value}} before end of expression",S0204:"Unknown operator: {{token}}",S0205:"Unexpected token: {{token}}",S0206:"Unknown expression type: {{token}}",S0207:"Unexpected end of expression",S0208:"Parameter {{value}} of function definition must be a variable name (start with $)",S0209:"A predicate cannot follow a grouping expression in a step",S0210:"Each step can only have one grouping expression",S0211:"The symbol {{token}} cannot be used as a unary operator",S0212:"The left side of := must be a variable name (start with $)",S0213:"The literal value {{value}} cannot be used as a step within a path expression",S0214:"The right side of {{token}} must be a variable name (start with $)",S0215:"A context variable binding must precede any predicates on a step",S0216:"A context variable binding must precede the 'order-by' clause on a step",S0217:"The object representing the 'parent' cannot be derived from this expression",S0301:"Empty regular expressions are not allowed",S0302:"No terminating / in regular expression",S0402:"Choice groups containing parameterized types are not supported",S0401:"Type parameters can only be applied to functions and arrays",S0500:"Attempted to evaluate an expression containing syntax error(s)",T0410:"Argument {{index}} of function {{token}} does not match function signature",T0411:"Context value is not a compatible type with argument {{index}} of function {{token}}",T0412:"Argument {{index}} of function {{token}} must be an array of {{type}}",D1001:"Number out of range: {{value}}",D1002:"Cannot negate a non-numeric value: {{value}}",T1003:"Key in object structure must evaluate to a string; got: {{value}}",D1004:"Regular expression matches zero length string",T1005:"Attempted to invoke a non-function. Did you mean ${{{token}}}?",T1006:"Attempted to invoke a non-function",T1007:"Attempted to partially apply a non-function. Did you mean ${{{token}}}?",T1008:"Attempted to partially apply a non-function",D1009:"Multiple key definitions evaluate to same key: {{value}}",T1010:"The matcher function argument passed to function {{token}} does not return the correct object structure",D1011:"Stack overflow. Check for non-terminating recursive function. Consider rewriting as tail-recursive",D1012:"Evaluation timeout after {{value}} milliseconds. Check for infinite loop",D1013:"Object property names starting with _jsonata_ are reserved for internal use: {{value}}",T2001:"The left side of the {{token}} operator must evaluate to a number",T2002:"The right side of the {{token}} operator must evaluate to a number",T2003:"The left side of the range operator (..) must evaluate to an integer",T2004:"The right side of the range operator (..) must evaluate to an integer",D2005:"The left side of := must be a variable name (start with $)",T2006:"The right side of the function application operator ~> must be a function",T2007:"Type mismatch when comparing values {{value}} and {{value2}} in order-by clause",T2008:"The expressions within an order-by clause must evaluate to numeric or string values",T2009:"The values {{value}} and {{value2}} either side of operator {{token}} must be of the same data type",T2010:"The expressions either side of operator {{token}} must evaluate to numeric or string values",T2011:"The insert/update clause of the transform expression must evaluate to an object: {{value}}",T2012:"The delete clause of the transform expression must evaluate to a string or array of strings: {{value}}",T2013:"The transform expression clones the input object using the $clone() function. This has been overridden in the current scope by a non-function.",D2014:"The size of the sequence allocated by the range operator (..) must not exceed 1e7. Attempted to allocate {{value}}.",D2015:"The maximum sequence length of {{value}} was exceeded.",D3001:"Attempting to invoke string function on Infinity or NaN",D3010:"Second argument of replace function cannot be an empty string",D3011:"Fourth argument of replace function must evaluate to a positive number",D3012:"Attempted to replace a matched string with a non-string value",D3020:"Third argument of split function must evaluate to a positive number",D3030:"Unable to cast value to a number: {{value}}",D3040:"Third argument of match function must evaluate to a positive number",D3050:"The second argument of reduce function must be a function with at least two arguments",D3060:"The sqrt function cannot be applied to a negative number: {{value}}",D3061:"The power function has resulted in a value that cannot be represented as a JSON number: base={{value}}, exponent={{exp}}",D3070:"The single argument form of the sort function can only be applied to an array of strings or an array of numbers. Use the second argument to specify a comparison function",D3080:"The picture string must only contain a maximum of two sub-pictures",D3081:"The sub-picture must not contain more than one instance of the 'decimal-separator' character",D3082:"The sub-picture must not contain more than one instance of the 'percent' character",D3083:"The sub-picture must not contain more than one instance of the 'per-mille' character",D3084:"The sub-picture must not contain both a 'percent' and a 'per-mille' character",D3085:"The mantissa part of a sub-picture must contain at least one character that is either an 'optional digit character' or a member of the 'decimal digit family'",D3086:"The sub-picture must not contain a passive character that is preceded by an active character and that is followed by another active character",D3087:"The sub-picture must not contain a 'grouping-separator' character that appears adjacent to a 'decimal-separator' character",D3088:"The sub-picture must not contain a 'grouping-separator' at the end of the integer part",D3089:"The sub-picture must not contain two adjacent instances of the 'grouping-separator' character",D3090:"The integer part of the sub-picture must not contain a member of the 'decimal digit family' that is followed by an instance of the 'optional digit character'",D3091:"The fractional part of the sub-picture must not contain an instance of the 'optional digit character' that is followed by a member of the 'decimal digit family'",D3092:"A sub-picture that contains a 'percent' or 'per-mille' character must not contain a character treated as an 'exponent-separator'",D3093:"The exponent part of the sub-picture must comprise only of one or more characters that are members of the 'decimal digit family'",D3100:"The radix of the formatBase function must be between 2 and 36. It was given {{value}}",D3110:"The argument of the toMillis function must be an ISO 8601 formatted timestamp. Given {{value}}",D3120:"Syntax error in expression passed to function eval: {{value}}",D3121:"Dynamic error evaluating the expression passed to function eval: {{value}}",D3130:"Formatting or parsing an integer as a sequence starting with {{value}} is not supported by this implementation",D3131:"In a decimal digit pattern, all digits must be from the same decimal group",D3132:"Unknown component specifier {{value}} in date/time picture string",D3133:"The 'name' modifier can only be applied to months and days in the date/time picture string, not {{value}}",D3134:"The timezone integer format specifier cannot have more than four digits",D3135:"No matching closing bracket ']' in date/time picture string",D3136:"The date/time picture string is missing specifiers required to parse the timestamp",D3137:"{{{message}}}",D3138:"The $single() function expected exactly 1 matching result. Instead it matched more.",D3139:"The $single() function expected exactly 1 matching result. Instead it matched 0.",D3140:"Malformed URL passed to ${{{functionName}}}(): {{value}}",D3141:"{{{message}}}"};function it(c){var f=Ht[c.code];if(typeof f<"u"){var d=f.replace(/\{\{\{([^}]+)}}}/g,function(){return c[arguments[1]]});d=d.replace(/\{\{([^}]+)}}/g,function(){return JSON.stringify(c[arguments[1]])}),c.message=d}}function yt(c,f){var d,i;try{d=y(c,f&&f.recover),i=d.errors,delete d.errors}catch(g){throw it(g),g}var a=tt(A),l=new Date;return a.bind("now",z(function(g,m){return u.fromMillis(l.getTime(),g,m)},"<s?s?:s>")),a.bind("millis",z(function(){return l.getTime()},"<:n>")),{evaluate:async function(g,m,x){if(typeof i<"u"){var $={code:"S0500",position:0};throw it($),$}const j=tt(a);for(const W of p.keys(m))j.bind(W,m[W]);if(j.bind("$",g),l=new Date,j.timestamp=l,j.options=f,j.createSequence=function(){var W=[];return f&&f.sequence&&(W.push=function(...Ae){if(W.length+Ae.length>f.sequence)throw{code:"D2015",stack:new Error().stack,value:f.sequence};return Array.prototype.push.apply(W,Ae)}),W.sequence=!0,arguments.length===1&&W.push(arguments[0]),W},Array.isArray(g)&&!R(g)&&(g=j.createSequence(g),g.outerWrapper=!0),f&&(f.timeout||f.stack)){const W=Date.now();j.guardrails=function(){if(f.stack>0&&j.depth>f.stack)throw{code:"D1011",value:f.stack,stack:new Error().stack};if(f.timeout>0&&Date.now()-W>f.timeout)throw{code:"D1012",value:f.timeout,stack:new Error().stack}}}else j.guardrails=function(){};j.base=j,j.depth=0,f&&f.RegexEngine?j.RegexEngine=f.RegexEngine:j.RegexEngine=RegExp;var se;try{return se=await T(d,g,j),typeof x=="function"&&x(null,se),se}catch(W){throw it(W),W}},assign:function(g,m){a.bind(g,m)},registerFunction:function(g,m,x){var $=z(m,x);a.bind(g,$)},ast:function(){return d},errors:function(){return i}}}return yt.parser=y,yt})();r.exports=M},{"./datetime":1,"./functions":2,"./parser":4,"./signature":5,"./utils":6}],4:[function(t,r,s){var u=t("./signature");const o=(()=>{var p={".":75,"[":80,"]":0,"{":70,"}":0,"(":80,")":0,",":0,"@":80,"#":80,";":80,":":80,"?":20,"+":50,"-":50,"*":60,"/":60,"%":60,"|":20,"=":40,"<":40,">":40,"^":40,"**":60,"..":20,":=":10,"!=":40,"<=":40,">=":40,"~>":40,"?:":40,"??":40,and:30,or:25,in:40,"&":50,"!":0,"~":0},y={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
32
|
+
`,r:"\r",t:" "},P=function(k){var w=0,C=k.length,R=function(J,E){var v={type:J,value:E,position:w};return v},N=function(){for(var J=w,E=0,v,O,A=function(H){if(k.charAt(H)==="/"&&E===0){for(var F=0;k.charAt(H-(F+1))==="\\";)F++;if(F%2===0)return!0}return!1};w<C;){var T=k.charAt(w);if(A(w)){if(v=k.substring(J,w),v==="")throw{code:"S0301",stack:new Error().stack,position:w};for(w++,T=k.charAt(w),J=w;T==="i"||T==="m";)w++,T=k.charAt(w);return O=k.substring(J,w)+"g",new RegExp(v,O)}(T==="("||T==="["||T==="{")&&k.charAt(w-1)!=="\\"&&E++,(T===")"||T==="]"||T==="}")&&k.charAt(w-1)!=="\\"&&E--,w++}throw{code:"S0302",stack:new Error().stack,position:w}},ee=function(J){if(w>=C)return null;for(var E=k.charAt(w);w<C&&`
|
|
33
|
+
\r\v`.indexOf(E)>-1;)w++,E=k.charAt(w);if(E==="/"&&k.charAt(w+1)==="*"){var v=w;for(w+=2,E=k.charAt(w);!(E==="*"&&k.charAt(w+1)==="/");)if(E=k.charAt(++w),w>=C)throw{code:"S0106",stack:new Error().stack,position:v};return w+=2,E=k.charAt(w),ee(J)}if(J!==!0&&E==="/")return w++,R("regex",N());if(E==="."&&k.charAt(w+1)===".")return w+=2,R("operator","..");if(E===":"&&k.charAt(w+1)==="=")return w+=2,R("operator",":=");if(E==="!"&&k.charAt(w+1)==="=")return w+=2,R("operator","!=");if(E===">"&&k.charAt(w+1)==="=")return w+=2,R("operator",">=");if(E==="<"&&k.charAt(w+1)==="=")return w+=2,R("operator","<=");if(E==="*"&&k.charAt(w+1)==="*")return w+=2,R("operator","**");if(E==="~"&&k.charAt(w+1)===">")return w+=2,R("operator","~>");if(E==="?"&&k.charAt(w+1)===":")return w+=2,R("operator","?:");if(E==="?"&&k.charAt(w+1)==="?")return w+=2,R("operator","??");if(Object.prototype.hasOwnProperty.call(p,E))return w++,R("operator",E);if(E==='"'||E==="'"){var O=E;w++;for(var A="";w<C;){if(E=k.charAt(w),E==="\\")if(w++,E=k.charAt(w),Object.prototype.hasOwnProperty.call(y,E))A+=y[E];else if(E==="u"){var T=k.substr(w+1,4);if(/^[0-9a-fA-F]+$/.test(T)){var H=parseInt(T,16);A+=String.fromCharCode(H),w+=4}else throw{code:"S0104",stack:new Error().stack,position:w}}else throw{code:"S0103",stack:new Error().stack,position:w,token:E};else{if(E===O)return w++,R("string",A);A+=E}w++}throw{code:"S0101",stack:new Error().stack,position:w}}var F=/^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?/,re=F.exec(k.substring(w));if(re!==null){var ae=parseFloat(re[0]);if(!isNaN(ae)&&isFinite(ae))return w+=re[0].length,R("number",ae);throw{code:"S0102",stack:new Error().stack,position:w,token:re[0]}}var Ee;if(E==="`"){w++;var ve=k.indexOf("`",w);if(ve!==-1)return Ee=k.substring(w,ve),w=ve+1,R("name",Ee);throw w=C,{code:"S0105",stack:new Error().stack,position:w}}for(var pe=w,Te;;)if(Te=k.charAt(pe),pe===C||`
|
|
34
|
+
\r\v`.indexOf(Te)>-1||Object.prototype.hasOwnProperty.call(p,Te)){if(k.charAt(w)==="$")return Ee=k.substring(w+1,pe),w=pe,R("variable",Ee);switch(Ee=k.substring(w,pe),w=pe,Ee){case"or":case"in":case"and":return R("operator",Ee);case"true":return R("value",!0);case"false":return R("value",!1);case"null":return R("value",null);default:return w===C&&Ee===""?null:R("name",Ee)}}else pe++};return ee},M=function(k,w){var C,R,N=Object.create(null),ee=[],J=function(){var h=[];C.id!=="(end)"&&h.push({type:C.type,value:C.value,position:C.position});for(var b=R();b!==null;)h.push(b),b=R();return h},E={nud:function(){var h={code:"S0211",token:this.value,position:this.position};if(w)return h.remaining=J(),h.type="error",ee.push(h),h;throw h.stack=new Error().stack,h}},v=function(h,b){var G=N[h];return b=b||0,G?b>=G.lbp&&(G.lbp=b):(G=Object.create(E),G.id=G.value=h,G.lbp=b,N[h]=G),G},O=function(h){if(w){h.remaining=J(),ee.push(h);var b=N["(error)"];return C=Object.create(b),C.error=h,C.type="(error)",C}else throw h.stack=new Error().stack,h},A=function(h,b){if(h&&C.id!==h){var G;C.id==="(end)"?G="S0203":G="S0202";var fe={code:G,position:C.position,token:C.value,value:h};return O(fe)}var _e=R(b);if(_e===null)return C=N["(end)"],C.position=k.length,C;var we=_e.value,_=_e.type,D;switch(_){case"name":case"variable":D=N["(name)"];break;case"operator":if(D=N[we],!D)return O({code:"S0204",stack:new Error().stack,position:_e.position,token:we});break;case"string":case"number":case"value":D=N["(literal)"];break;case"regex":_="regex",D=N["(regex)"];break;default:return O({code:"S0205",stack:new Error().stack,position:_e.position,token:we})}return C=Object.create(D),C.value=we,C.type=_,C.position=_e.position,C},T=function(h){var b,G=C;for(A(null,!0),b=G.nud();h<C.lbp;)G=C,A(),b=G.led(b);return b},H=function(h){var b=v(h,0);b.nud=function(){return this}},F=function(h,b,G){var fe=b||p[h],_e=v(h,fe);return _e.led=G||function(we){return this.lhs=we,this.rhs=T(fe),this.type="binary",this},_e},re=function(h,b,G){var fe=v(h,b);return fe.led=G,fe},ae=function(h,b){var G=v(h);return G.nud=b||function(){return this.expression=T(70),this.type="unary",this},G};H("(end)"),H("(name)"),H("(literal)"),H("(regex)"),v(":"),v(";"),v(","),v(")"),v("]"),v("}"),v(".."),F("."),F("+"),F("-"),F("*"),F("/"),F("%"),F("="),F("<"),F(">"),F("!="),F("<="),F(">="),F("&"),F("and"),F("or"),F("in"),H("and"),H("or"),H("in"),ae("-"),F("~>"),F("??",p["??"],function(h){return this.type="condition",this.condition={type:"function",value:"(",procedure:{type:"variable",value:"exists"},arguments:[JSON.parse(JSON.stringify(h))]},this.then=h,this.else=T(0),this}),re("(error)",10,function(h){return this.lhs=h,this.error=C.error,this.remaining=J(),this.type="error",this}),ae("*",function(){return this.type="wildcard",this}),ae("**",function(){return this.type="descendant",this}),ae("%",function(){return this.type="parent",this}),F("(",p["("],function(h){if(this.procedure=h,this.type="function",this.arguments=[],C.id!==")")for(;C.type==="operator"&&C.id==="?"?(this.type="partial",this.arguments.push(C),A("?")):this.arguments.push(T(0)),C.id===",";)A(",");if(A(")",!0),h.type==="name"&&(h.value==="function"||h.value==="λ")){if(this.arguments.forEach(function(we,_){if(we.type!=="variable")return O({code:"S0208",stack:new Error().stack,position:we.position,token:we.value,value:_+1})}),this.type="lambda",C.id==="<"){for(var b=C.position,G=1,fe="<";G>0&&C.id!=="{"&&C.id!=="(end)";){var _e=A();_e.id===">"?G--:_e.id==="<"&&G++,fe+=_e.value}A(">");try{this.signature=u(fe)}catch(we){return we.position=b+we.offset,O(we)}}A("{"),this.body=T(0),A("}")}return this}),ae("(",function(){for(var h=[];C.id!==")"&&(h.push(T(0)),C.id===";");)A(";");return A(")",!0),this.type="block",this.expressions=h,this}),ae("[",function(){var h=[];if(C.id!=="]")for(;;){var b=T(0);if(C.id===".."){var G={type:"binary",value:"..",position:C.position,lhs:b};A(".."),G.rhs=T(0),b=G}if(h.push(b),C.id!==",")break;A(",")}return A("]",!0),this.expressions=h,this.type="unary",this}),F("[",p["["],function(h){if(C.id==="]"){for(var b=h;b&&b.type==="binary"&&b.value==="[";)b=b.lhs;return b.keepArray=!0,A("]"),h}else return this.lhs=h,this.rhs=T(p["]"]),this.type="binary",A("]",!0),this}),F("^",p["^"],function(h){A("(");for(var b=[];;){var G={descending:!1};if(C.id==="<"?A("<"):C.id===">"&&(G.descending=!0,A(">")),G.expression=T(0),b.push(G),C.id!==",")break;A(",")}return A(")"),this.lhs=h,this.rhs=b,this.type="binary",this});var Ee=function(h){var b=[];if(C.id!=="}")for(;;){var G=T(0);A(":");var fe=T(0);if(b.push([G,fe]),C.id!==",")break;A(",")}return A("}",!0),typeof h>"u"?(this.lhs=b,this.type="unary"):(this.lhs=h,this.rhs=b,this.type="binary"),this};ae("{",Ee),F("{",p["{"],Ee),re(":=",p[":="],function(h){return h.type!=="variable"?O({code:"S0212",stack:new Error().stack,position:h.position,token:h.value}):(this.lhs=h,this.rhs=T(p[":="]-1),this.type="binary",this)}),F("@",p["@"],function(h){return this.lhs=h,this.rhs=T(p["@"]),this.rhs.type!=="variable"?O({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"@"}):(this.type="binary",this)}),F("#",p["#"],function(h){return this.lhs=h,this.rhs=T(p["#"]),this.rhs.type!=="variable"?O({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"#"}):(this.type="binary",this)}),F("?",p["?"],function(h){return this.type="condition",this.condition=h,this.then=T(0),C.id===":"&&(A(":"),this.else=T(0)),this}),F("?:",p["?:"],function(h){return this.type="condition",this.condition=JSON.parse(JSON.stringify(h)),this.then=h,this.else=T(0),this}),ae("|",function(){return this.type="transform",this.pattern=T(0),A("|"),this.update=T(0),C.id===","&&(A(","),this.delete=T(0)),A("|"),this});var ve=function(h){var b;if(h.type==="function"&&!h.predicate){var G={type:"lambda",thunk:!0,arguments:[],position:h.position};G.body=h,b=G}else if(h.type==="condition")h.then=ve(h.then),typeof h.else<"u"&&(h.else=ve(h.else)),b=h;else if(h.type==="block"){var fe=h.expressions.length;fe>0&&(h.expressions[fe-1]=ve(h.expressions[fe-1])),b=h}else b=h;return b},pe=0,Te=0,Je=[],ce=function(h,b){switch(h.type){case"name":case"wildcard":b.level--,b.level===0&&(typeof h.ancestor>"u"||(Je[b.index].slot.label=h.ancestor.label),h.ancestor=b,h.tuple=!0);break;case"parent":b.level++;break;case"block":h.expressions.length>0&&(h.tuple=!0,b=ce(h.expressions[h.expressions.length-1],b));break;case"path":h.tuple=!0;var G=h.steps.length-1;for(b=ce(h.steps[G--],b);b.level>0&&G>=0;)b=ce(h.steps[G--],b);break;default:throw{code:"S0217",token:h.type,position:h.position}}return b},me=function(h,b){if(typeof b.seekingParent<"u"||b.type==="parent"){var G=typeof b.seekingParent<"u"?b.seekingParent:[];b.type==="parent"&&G.push(b.slot),typeof h.seekingParent>"u"?h.seekingParent=G:Array.prototype.push.apply(h.seekingParent,G)}},We=function(h){var b=h.steps.length-1,G=h.steps[b],fe=typeof G.seekingParent<"u"?G.seekingParent:[];G.type==="parent"&&fe.push(G.slot);for(var _e=0;_e<fe.length;_e++){var we=fe[_e];for(b=h.steps.length-2;we.level>0;){if(b<0){typeof h.seekingParent>"u"?h.seekingParent=[we]:h.seekingParent.push(we);break}for(var _=h.steps[b--];b>=0&&_.focus&&h.steps[b].focus;)_=h.steps[b--];we=ce(_,we)}}},ie=function(h){var b;switch(h.type){case"binary":switch(h.value){case".":var G=ie(h.lhs);G.type==="path"?b=G:b={type:"path",steps:[G]},G.type==="parent"&&(b.seekingParent=[G.slot]);var fe=ie(h.rhs);fe.type==="path"?Array.prototype.push.apply(b.steps,fe.steps):(typeof fe.predicate<"u"&&(fe.stages=fe.predicate,delete fe.predicate),b.steps.push(fe)),b.steps.filter(function(q){if(q.type==="number"||q.type==="value")throw{code:"S0213",stack:new Error().stack,position:q.position,value:q.value};return q.type==="string"}).forEach(function(q){q.type="name"}),b.steps.filter(function(q){return q.keepArray===!0}).length>0&&(b.keepSingletonArray=!0);var _e=b.steps[0];_e.type==="unary"&&_e.value==="["&&(_e.consarray=!0);var we=b.steps[b.steps.length-1];we.type==="unary"&&we.value==="["&&(we.consarray=!0),We(b);break;case"[":b=ie(h.lhs);var _=b,D="predicate";if(b.type==="path"&&(_=b.steps[b.steps.length-1],D="stages"),typeof _.group<"u")throw{code:"S0209",stack:new Error().stack,position:h.position};typeof _[D]>"u"&&(_[D]=[]);var S=ie(h.rhs);typeof S.seekingParent<"u"&&(S.seekingParent.forEach(q=>{q.level===1?ce(_,q):q.level--}),me(_,S)),_[D].push({type:"filter",expr:S,position:h.position});break;case"{":if(b=ie(h.lhs),typeof b.group<"u")throw{code:"S0210",stack:new Error().stack,position:h.position};b.group={lhs:h.rhs.map(function(q){return[ie(q[0]),ie(q[1])]}),position:h.position};break;case"^":b=ie(h.lhs),b.type!=="path"&&(b={type:"path",steps:[b]});var U={type:"sort",position:h.position};U.terms=h.rhs.map(function(q){var K=ie(q.expression);return me(U,K),{descending:q.descending,expression:K}}),b.steps.push(U),We(b);break;case":=":b={type:"bind",value:h.value,position:h.position},b.lhs=ie(h.lhs),b.rhs=ie(h.rhs),me(b,b.rhs);break;case"@":if(b=ie(h.lhs),_=b,b.type==="path"&&(_=b.steps[b.steps.length-1]),typeof _.stages<"u"||typeof _.predicate<"u")throw{code:"S0215",stack:new Error().stack,position:h.position};if(_.type==="sort")throw{code:"S0216",stack:new Error().stack,position:h.position};h.keepArray&&(_.keepArray=!0),_.focus=h.rhs.value,_.tuple=!0;break;case"#":b=ie(h.lhs),_=b,b.type==="path"?_=b.steps[b.steps.length-1]:(b={type:"path",steps:[b]},typeof _.predicate<"u"&&(_.stages=_.predicate,delete _.predicate)),typeof _.stages>"u"?_.index=h.rhs.value:_.stages.push({type:"index",value:h.rhs.value,position:h.position}),_.tuple=!0;break;case"~>":b={type:"apply",value:h.value,position:h.position},b.lhs=ie(h.lhs),b.rhs=ie(h.rhs),b.keepArray=b.lhs.keepArray||b.rhs.keepArray;break;default:b={type:h.type,value:h.value,position:h.position},b.lhs=ie(h.lhs),b.rhs=ie(h.rhs),me(b,b.lhs),me(b,b.rhs)}break;case"unary":b={type:h.type,value:h.value,position:h.position},h.value==="["?b.expressions=h.expressions.map(function(q){var K=ie(q);return me(b,K),K}):h.value==="{"?b.lhs=h.lhs.map(function(q){var K=ie(q[0]);me(b,K);var he=ie(q[1]);return me(b,he),[K,he]}):(b.expression=ie(h.expression),h.value==="-"&&b.expression.type==="number"?(b=b.expression,b.value=-b.value):me(b,b.expression));break;case"function":case"partial":b={type:h.type,name:h.name,value:h.value,position:h.position},b.arguments=h.arguments.map(function(q){var K=ie(q);return me(b,K),K}),b.procedure=ie(h.procedure);break;case"lambda":b={type:h.type,arguments:h.arguments,signature:h.signature,position:h.position};var B=ie(h.body);b.body=ve(B);break;case"condition":b={type:h.type,position:h.position},b.condition=ie(h.condition),me(b,b.condition),b.then=ie(h.then),me(b,b.then),typeof h.else<"u"&&(b.else=ie(h.else),me(b,b.else));break;case"transform":b={type:h.type,position:h.position},b.pattern=ie(h.pattern),b.update=ie(h.update),typeof h.delete<"u"&&(b.delete=ie(h.delete));break;case"block":b={type:h.type,position:h.position},b.expressions=h.expressions.map(function(q){var K=ie(q);return me(b,K),(K.consarray||K.type==="path"&&K.steps[0].consarray)&&(b.consarray=!0),K});break;case"name":b={type:"path",steps:[h]},h.keepArray&&(b.keepSingletonArray=!0);break;case"parent":b={type:"parent",slot:{label:"!"+pe++,level:1,index:Te++}},Je.push(b);break;case"string":case"number":case"value":case"wildcard":case"descendant":case"variable":case"regex":b=h;break;case"operator":if(h.value==="and"||h.value==="or"||h.value==="in")h.type="name",b=ie(h);else if(h.value==="?")b=h;else throw{code:"S0201",stack:new Error().stack,position:h.position,token:h.value};break;case"error":b=h,h.lhs&&(b=ie(h.lhs));break;default:var I="S0206";h.id==="(end)"&&(I="S0207");var L={code:I,position:h.position,token:h.value};if(w)return ee.push(L),{type:"error",error:L};throw L.stack=new Error().stack,L}return h.keepArray&&(b.keepArray=!0),b};R=P(k),A();var Ce=T(0);if(C.id!=="(end)"){var nt={code:"S0201",position:C.position,token:C.value};O(nt)}if(Ce=ie(Ce),Ce.type==="parent"||typeof Ce.seekingParent<"u")throw{code:"S0217",token:Ce.type,position:Ce.position};return ee.length>0&&(Ce.errors=ee),Ce};return M})();r.exports=o},{"./signature":5}],5:[function(t,r,s){var u=t("./utils");const o=(()=>{var p={a:"arrays",b:"booleans",f:"functions",n:"numbers",o:"objects",s:"strings"};function y(P){for(var M=1,k=[],w=Object.create(null),C=w;M<P.length;){var R=P.charAt(M);if(R===":")break;var N=function(){k.push(w),C=w,w=Object.create(null)},ee=function(F,re,ae,Ee){for(var ve=1,pe=re;pe<F.length;)if(pe++,R=F.charAt(pe),R===Ee){if(ve--,ve===0)break}else R===ae&&ve++;return pe};switch(R){case"s":case"n":case"b":case"l":case"o":w.regex="["+R+"m]",w.type=R,N();break;case"a":w.regex="[asnblfom]",w.type=R,w.array=!0,N();break;case"f":w.regex="f",w.type=R,N();break;case"j":w.regex="[asnblom]",w.type=R,N();break;case"x":w.regex="[asnblfom]",w.type=R,N();break;case"-":C.context=!0,C.contextRegex=new RegExp(C.regex),C.regex+="?";break;case"?":case"+":C.regex+=R;break;case"(":var J=ee(P,M,"(",")"),E=P.substring(M+1,J);if(E.indexOf("<")===-1)w.regex="["+E+"m]";else throw{code:"S0402",stack:new Error().stack,value:E,offset:M};w.type="("+E+")",M=J,N();break;case"<":if(C.type==="a"||C.type==="f"){var v=ee(P,M,"<",">");C.subtype=P.substring(M+1,v),M=v}else throw{code:"S0401",stack:new Error().stack,value:C.type,offset:M};break}M++}var O="^"+k.map(function(F){return"("+F.regex+")"}).join("")+"$",A=new RegExp(O),T=function(F){var re;if(u.isFunction(F))re="f";else{var ae=typeof F;switch(ae){case"string":re="s";break;case"number":re="n";break;case"boolean":re="b";break;case"object":F===null?re="l":Array.isArray(F)?re="a":re="o";break;case"undefined":default:re="m"}}return re},H=function(F,re){for(var ae="^",Ee=0,ve=0;ve<k.length;ve++){ae+=k[ve].regex;var pe=re.match(ae);if(pe===null)throw{code:"T0410",stack:new Error().stack,value:F[Ee],index:Ee+1};Ee=pe[0].length}throw{code:"T0410",stack:new Error().stack,value:F[Ee],index:Ee+1}};return{definition:P,validate:function(F,re){var ae="";F.forEach(function(Te){ae+=T(Te)});var Ee=A.exec(ae);if(Ee){var ve=[],pe=0;return k.forEach(function(Te,Je){var ce=F[pe],me=Ee[Je+1];if(me==="")if(Te.context&&Te.contextRegex){var We=T(re);if(Te.contextRegex.test(We))ve.push(re);else throw{code:"T0411",stack:new Error().stack,value:re,index:pe+1}}else ve.push(ce),pe++;else me.split("").forEach(function(ie){if(ce=F[pe],Te.type==="a"){if(ie==="m")ce=void 0;else{var Ce=!0;if(typeof Te.subtype<"u"){if(ie!=="a"&&me!==Te.subtype)Ce=!1;else if(ie==="a"&&ce.length>0){var nt=T(ce[0]);if(nt!==Te.subtype.charAt(0))Ce=!1;else{var h=ce.filter(function(b){return T(b)!==nt});Ce=h.length===0}}}if(!Ce)throw{code:"T0412",stack:new Error().stack,value:ce,index:pe+1,type:p[Te.subtype]};ie!=="a"&&(ce=[ce])}ve.push(ce),pe++}else ve.push(ce),pe++})}),ve}H(F,ae)}}}return y})();r.exports=o},{"./utils":6}],6:[function(t,r,s){const u=(()=>{function o(v){var O=!1;if(typeof v=="number"&&(O=!isNaN(v),O&&!isFinite(v)))throw{code:"D1001",value:v,stack:new Error().stack};return O}function p(v){var O=!1;return Array.isArray(v)&&(O=v.filter(function(A){return typeof A!="string"}).length===0),O}function y(v){var O=!1;return Array.isArray(v)&&(O=v.filter(function(A){return!o(A)}).length===0),O}function P(v){return v.sequence===!0&&Array.isArray(v)}function M(v){return v&&(v._jsonata_function===!0||v._jsonata_lambda===!0)||typeof v=="function"}function k(v){var O=typeof v.arity=="number"?v.arity:typeof v.implementation=="function"?v.implementation.length:typeof v.length=="number"?v.length:v.arguments.length;return O}function w(v){return v&&v._jsonata_lambda===!0}var C=(typeof Symbol=="function"?Symbol:{}).iterator||"@@iterator";function R(v){return typeof v=="object"&&v!==null&&C in v&&"next"in v&&typeof v.next=="function"}function N(v,O){if(v===O)return!0;if(typeof v=="object"&&typeof O=="object"&&v!==null&&O!==null){if(Array.isArray(v)&&Array.isArray(O)){if(v.length!==O.length)return!1;for(var A=0;A<v.length;A++)if(!N(v[A],O[A]))return!1;return!0}var T=Object.getOwnPropertyNames(v),H=Object.getOwnPropertyNames(O);if(T.length!==H.length)return!1;for(T=T.sort(),H=H.sort(),A=0;A<T.length;A++)if(T[A]!==H[A])return!1;for(A=0;A<T.length;A++){var F=T[A];if(!N(v[F],O[F]))return!1}return!0}return!1}function ee(v){return typeof v=="object"&&v!==null&&"then"in v&&typeof v.then=="function"}function J(v){var O=[];for(let A of v)O.push(A);return O}function E(v){return typeof v=="object"&&v!==null?Object.keys(v):[]}return{isNumeric:o,isArrayOfStrings:p,isArrayOfNumbers:y,isSequence:P,isFunction:M,isLambda:w,isIterable:R,getFunctionArity:k,isDeepEqual:N,stringToArray:J,isPromise:ee,keys:E}})();r.exports=u},{}]},{},[3])(3)})})(Cr)),Cr.exports}xi();const ki=150,hn=10,Si=200,Pi=16,dn=new WeakMap;let pn=!1;function ir(){return typeof navigator>"u"?!1:/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function Bt(n){if(n===window)return{x:window.scrollX,y:window.scrollY};const e=n;return{x:e.scrollLeft,y:e.scrollTop}}function Ti(n,e,t){if(n===window){window.scrollTo(e,t);return}const r=n;typeof r.scrollTo=="function"?r.scrollTo(e,t):(r.scrollLeft=e,r.scrollTop=t)}function Ci(n){if(n===window){const t=document.documentElement;return Math.max(0,t.scrollHeight-window.innerHeight)}const e=n;return Math.max(0,e.scrollHeight-e.clientHeight)}function St(n){let e=dn.get(n);if(!e){const t=Bt(n);e={x:t.x,y:t.y,restoring:!1,watching:!1,userEngaged:!1,raf:0,stickyFrames:0},dn.set(n,e)}return e}function sr(n){St(n).userEngaged=!0}function ar(n){const e=St(n);clearTimeout(e.settleTimer),e.settleTimer=setTimeout(()=>{e.userEngaged=!1,e.settleTimer=void 0},ki)}function mn(n,e){return e-n>=Si}function Pt(n){if(!ir())return;const e=St(n);if(e.restoring)return;const t=Bt(n);if(mn(t.y,e.y)){Dr(n);return}e.x=t.x,e.y=t.y}function Di(n){if(!ir())return;const e=St(n),t=Ci(n),r=e.x,s=t>0?Math.min(e.y,t):e.y,{x:u,y:o}=Bt(n);if(!(Math.abs(r-u)<=hn&&Math.abs(s-o)<=hn)){e.restoring=!0;try{Ti(n,r,s)}finally{requestAnimationFrame(()=>{e.restoring=!1})}}}function Dr(n){const e=St(n);if(e.stickyFrames=Pi,e.raf)return;const t=()=>{e.raf=0,Di(n),e.stickyFrames>0&&(e.stickyFrames--,e.raf=requestAnimationFrame(t))};e.raf=requestAnimationFrame(t)}function Rr(n){Dr(n)}function qt(n){if(!ir())return;const e=St(n);if(e.watching)return;e.watching=!0;const t=n===window?window:n,r=()=>{if(e.restoring)return;const{y:R}=Bt(n);if(mn(R,e.y)){Dr(n);return}if(e.userEngaged){Pt(n),ar(n);return}Pt(n)},s=R=>vn(R)===n,u=R=>{s(R)&&(Pt(n),sr(n))},o=R=>{s(R)&&ar(n)},p=R=>{s(R)&&(Pt(n),sr(n),ar(n))};t.addEventListener("scroll",r,{passive:!0}),t.addEventListener("touchstart",u,{passive:!0}),t.addEventListener("touchend",o,{passive:!0}),t.addEventListener("touchcancel",o,{passive:!0}),t.addEventListener("wheel",p,{passive:!0}),t.addEventListener("pointerdown",u,{passive:!0}),t.addEventListener("pointerup",o,{passive:!0}),t.addEventListener("pointercancel",o,{passive:!0});const y=Bt(n);if(e.x=y.x,e.y=y.y,n===window){const R=new ResizeObserver(()=>Rr(window));R.observe(document.documentElement),e.resizeObserver=R;return}const P=n,M=new ResizeObserver(()=>Rr(P));M.observe(P);for(const R of Array.from(P.children))M.observe(R);e.resizeObserver=M;const k=()=>Rr(P),w=new MutationObserver(R=>{for(const N of R)if(N.type==="childList")for(const ee of Array.from(N.addedNodes))ee instanceof Element&&M.observe(ee);k()});w.observe(P,{childList:!0,subtree:!0,characterData:!0});const C=P.getRootNode();C instanceof ShadowRoot&&C.host&&w.observe(C.host,{childList:!0,subtree:!0,characterData:!0}),e.mutationObserver=w}function vn(n){for(const e of n.composedPath())if(!(e===window||e===document)&&e instanceof HTMLElement&&gn(e))return e;return window}function gn(n){if(!(n instanceof HTMLElement)||n===document.documentElement||n===document.body)return!1;const e=getComputedStyle(n).overflowY;return e==="auto"||e==="scroll"||e==="overlay"}function Lr(n){for(const t of n.composedPath())t===window||t===document||t instanceof HTMLElement&&gn(t)&&qt(t);const e=vn(n);qt(e),n.type==="wheel"?(Pt(e),sr(e),ar(e)):(n.type==="touchstart"||n.type==="pointerdown")&&(Pt(e),sr(e))}function or(n){n instanceof Element&&n.classList?.contains("custom-scroll")&&qt(n),n.querySelectorAll?.(".custom-scroll").forEach(e=>{e instanceof HTMLElement&&qt(e)})}function Mr(n){or(n),new MutationObserver(t=>{for(const r of t)for(const s of Array.from(r.addedNodes))s instanceof Element&&or(s)}).observe(n,{childList:!0,subtree:!0})}function Or(n){n.querySelectorAll?.("*").forEach(e=>{e.shadowRoot&&(Mr(e.shadowRoot),Or(e.shadowRoot))})}function Ri(){const n=Element.prototype;if(n.__safariScrollGuardPatched)return;n.__safariScrollGuardPatched=!0;const e=n.attachShadow;n.attachShadow=function(r){const s=e.call(this,r);return Mr(s),s}}function Li(){if(typeof window>"u"||pn||(pn=!0,!ir()))return;qt(window),Ri();const n={capture:!0,passive:!0};window.addEventListener("wheel",Lr,n),window.addEventListener("touchstart",Lr,n),window.addEventListener("pointerdown",Lr,n);const e=()=>{or(document),Or(document)};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e,{once:!0}):e(),new MutationObserver(r=>{for(const s of r)for(const u of Array.from(s.addedNodes))u instanceof Element&&(or(u),u.shadowRoot&&Mr(u.shadowRoot),Or(u))}).observe(document.documentElement,{childList:!0,subtree:!0})}const Mi=si,Oi=oi,Ui=Sr,Fi=_r,$i=at,Ni=bi,Ii=er,ji=Pr,Bi=_i;Li(),window["concorde-utils"]=window["concorde-utils"]||{},window["concorde-utils"]={Utils:Mi,Arrays:Oi,DataBindObserver:Ui,Format:Fi,HTML:$i,LocationHandler:Ni,Objects:Ii,PublisherManager:$e,api:ji,URLPattern:Bi,Endpoint:Tr,DataProviderKey:Qt};const qi=`#version 300 es
|
|
35
|
+
precision highp float;
|
|
36
|
+
precision highp int;
|
|
37
|
+
precision mediump sampler2D;
|
|
38
|
+
|
|
39
|
+
uniform vec3 iResolution;
|
|
40
|
+
uniform float iTime;
|
|
41
|
+
uniform float iTimeDelta;
|
|
42
|
+
uniform float iFrameRate;
|
|
43
|
+
uniform int iFrame;
|
|
44
|
+
uniform float iChannelTime[4];
|
|
45
|
+
uniform vec3 iChannelResolution[4];
|
|
46
|
+
uniform vec4 iMouse;
|
|
47
|
+
uniform vec4 iDate;
|
|
48
|
+
uniform float iSampleRate;
|
|
49
|
+
uniform sampler2D iChannel0;
|
|
50
|
+
uniform sampler2D iChannel1;
|
|
51
|
+
uniform sampler2D iChannel2;
|
|
52
|
+
uniform sampler2D iChannel3;
|
|
53
|
+
uniform float uParam0;
|
|
54
|
+
uniform float uParam1;
|
|
55
|
+
uniform float uParam2;
|
|
56
|
+
uniform float uParam3;
|
|
57
|
+
|
|
58
|
+
out vec4 sonicFragColor;
|
|
59
|
+
|
|
60
|
+
`,zi=`
|
|
61
|
+
void main() {
|
|
62
|
+
mainImage(sonicFragColor, gl_FragCoord.xy);
|
|
63
|
+
}
|
|
64
|
+
`,Hi=`#version 300 es
|
|
65
|
+
precision highp float;
|
|
66
|
+
layout(location = 0) in vec2 aPos;
|
|
67
|
+
void main() {
|
|
68
|
+
gl_Position = vec4(aPos, 0.0, 1.0);
|
|
69
|
+
}
|
|
70
|
+
`;function Gi(n,e){return qi+(n?n+`
|
|
71
|
+
`:"")+e+`
|
|
72
|
+
`+zi}function zt(n){if(n===""||n===null||n===void 0)return null;if(typeof n=="number")return n===0||n===1||n===2||n===3?n:null;const e=n.trim().toLowerCase();return e==="0"||e==="param0"?0:e==="1"||e==="param1"?1:e==="2"||e==="param2"?2:e==="3"||e==="param3"?3:null}function Ur(n){if(n===""||n===null||n===void 0)return null;const e=n.trim().toLowerCase();return e==="none"||e==="off"||e==="false"?null:e==="image"?"image":e==="buffer-a"||e==="buffera"||e==="a"?"bufferA":e==="buffer-b"||e==="bufferb"||e==="b"?"bufferB":e==="buffer-c"||e==="bufferc"||e==="c"?"bufferC":e==="buffer-d"||e==="bufferd"||e==="d"?"bufferD":null}function Vi(n,e,t,r={}){const s=Math.max(0,Math.min(1,r.threshold??.5)),u=Math.max(0,Math.floor(r.maxCount??8)),o=Math.max(1,Math.floor(r.minDistance??16));if(u===0||e<1||t<1||n.length<e*t*4)return[];const p=s*255,y=[];for(let k=1;k<t-1;k++)for(let w=1;w<e-1;w++){const C=(k*e+w)*4,R=n[C];if(R<p)continue;let N=!0;for(let ee=-1;ee<=1&&N;ee++)for(let J=-1;J<=1;J++){if(J===0&&ee===0)continue;const E=((k+ee)*e+(w+J))*4;if(n[E]>R){N=!1;break}}N&&y.push({x:w,y:k,score:R/255})}y.sort((k,w)=>w.score-k.score);const P=[],M=o*o;for(const k of y){if(P.length>=u)break;let w=!0;for(const C of P){const R=k.x-C.x,N=k.y-C.y;if(R*R+N*N<M){w=!1;break}}w&&P.push(k)}return P}function bn(n,e,t,r,s=128){if(e<1||t<1)return null;const u=typeof n.w=="number"&&typeof n.h=="number"&&Number.isFinite(n.w)&&Number.isFinite(n.h)&&n.w>0&&n.h>0;let o,p,y,P;if(u)o=Math.floor(n.x*e),p=Math.floor(n.y*t),y=Math.max(1,Math.round(n.w*e)),P=Math.max(1,Math.round(n.h*t));else{const M=Math.min(s,Math.max(1,Math.floor(n.patch??r))),k=n.x*e,w=n.y*t;y=M,P=M,o=Math.floor(k-M/2),p=Math.floor(w-M/2)}return o<0&&(y+=o,o=0),p<0&&(P+=p,p=0),o+y>e&&(y=e-o),p+P>t&&(P=t-p),y<1||P<1?null:(y=Math.min(y,s),P=Math.min(P,s),{x:o,y:p,w:y,h:P})}function yn(n){const e=Math.floor(n.length/4);if(e<1)return{r:0,g:0,b:0,a:0,luma:0};let t=0,r=0,s=0,u=0;for(let o=0;o<e;o++){const p=o*4;t+=n[p],r+=n[p+1],s+=n[p+2],u+=n[p+3]}return t/=e*255,r/=e*255,s/=e*255,u/=e*255,{r:t,g:r,b:s,a:u,luma:.2126*t+.7152*r+.0722*s}}class ht extends Error{constructor(e,t,r){super(e),this.pass=t,this.infoLog=r,this.name="ShaderCompileError"}}const Wi=["bufferA","bufferB","bufferC","bufferD","image"],Yi=["bufferA","bufferB","bufferC","bufferD"];function Xi(n){return/\.(webm|mp4|ogg|mov)(\?|#|$)/i.test(n)}function wn(n,e,t,r){const s=n.createShader(e);if(!s)throw new ht("Unable to create shader",r,"");if(n.shaderSource(s,t),n.compileShader(s),!n.getShaderParameter(s,n.COMPILE_STATUS)){const u=n.getShaderInfoLog(s)||"";throw n.deleteShader(s),new ht(`Compile error (${r}): ${u}`,r,u)}return s}function Ji(n,e,t,r){const s=n.createProgram();if(!s)throw new ht("Unable to create program","link","");if(n.attachShader(s,e),n.attachShader(s,t),n.linkProgram(s),!n.getProgramParameter(s,n.LINK_STATUS)){const u=n.getProgramInfoLog(s)||"";throw n.deleteProgram(s),new ht(`Link error (${r}): ${u}`,"link",u)}return s}function Ki(n,e){return{iResolution:n.getUniformLocation(e,"iResolution"),iTime:n.getUniformLocation(e,"iTime"),iTimeDelta:n.getUniformLocation(e,"iTimeDelta"),iFrameRate:n.getUniformLocation(e,"iFrameRate"),iFrame:n.getUniformLocation(e,"iFrame"),iMouse:n.getUniformLocation(e,"iMouse"),iDate:n.getUniformLocation(e,"iDate"),iSampleRate:n.getUniformLocation(e,"iSampleRate"),iChannelTime:n.getUniformLocation(e,"iChannelTime[0]")||n.getUniformLocation(e,"iChannelTime"),iChannelResolution:n.getUniformLocation(e,"iChannelResolution[0]")||n.getUniformLocation(e,"iChannelResolution"),iChannel:[0,1,2,3].map(t=>n.getUniformLocation(e,`iChannel${t}`)),uParam:[0,1,2,3].map(t=>n.getUniformLocation(e,`uParam${t}`))}}function Fr(n,e,t){const r=n.createTexture();if(!r)throw new Error("Unable to create texture");return n.bindTexture(n.TEXTURE_2D,r),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),n.texImage2D(n.TEXTURE_2D,0,n.RGBA8,e,t,0,n.RGBA,n.UNSIGNED_BYTE,null),r}function An(n,e){const t=n.createFramebuffer();if(!t)throw new Error("Unable to create framebuffer");n.bindFramebuffer(n.FRAMEBUFFER,t),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,e,0);const r=n.checkFramebufferStatus(n.FRAMEBUFFER);if(r!==n.FRAMEBUFFER_COMPLETE)throw new Error(`Incomplete framebuffer: ${r}`);return n.bindFramebuffer(n.FRAMEBUFFER,null),t}function En(n,e,t){const r=[Fr(n,e,t),Fr(n,e,t)],s=[An(n,r[0]),An(n,r[1])];return{textures:r,framebuffers:s,index:0}}function $r(n,e){for(const t of e.textures)n.deleteTexture(t);for(const t of e.framebuffers)n.deleteFramebuffer(t)}function Zi(n,e){const t=(n??"").trim();if(!t)return e?{kind:"url",url:e}:{kind:"none"};const r=t.toLowerCase();return r==="self"?{kind:"self"}:r==="buffer-a"||r==="buffera"||r==="a"?{kind:"buffer",buffer:"bufferA"}:r==="buffer-b"||r==="bufferb"||r==="b"?{kind:"buffer",buffer:"bufferB"}:r==="buffer-c"||r==="bufferc"||r==="c"?{kind:"buffer",buffer:"bufferC"}:r==="buffer-d"||r==="bufferd"||r==="d"?{kind:"buffer",buffer:"bufferD"}:r==="none"||r==="null"?{kind:"none"}:{kind:"url",url:t}}class Qi{constructor(e){this.vao=null,this.vertexShader=null,this.programs=new Map,this.buffers=new Map,this.external=new Map,this.width=0,this.height=0,this.passChannels=new Map,this.activePasses=[],this.blackTexture=null;const t=e.getContext("webgl2",{antialias:!1,alpha:!0,premultipliedAlpha:!1,preserveDrawingBuffer:!0,powerPreference:"default"});if(!t||t.isContextLost())throw new Error("WebGL2 not available");this.canvas=e,this.gl=t,this.initGeometry(),this.blackTexture=Fr(t,1,1),t.bindTexture(t.TEXTURE_2D,this.blackTexture),t.texImage2D(t.TEXTURE_2D,0,t.RGBA8,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array([0,0,0,255]))}get isLost(){return this.gl.isContextLost()}initGeometry(){const e=this.gl,t=e.createVertexArray();if(!t)throw new Error("Unable to create VAO");this.vao=t,e.bindVertexArray(t);const r=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,r),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,3,-1,-1,3]),e.STATIC_DRAW),e.enableVertexAttribArray(0),e.vertexAttribPointer(0,2,e.FLOAT,!1,0,0),e.bindVertexArray(null)}resize(e,t){const r=Math.max(1,Math.floor(e)),s=Math.max(1,Math.floor(t));if(!(r===this.width&&s===this.height)){this.width=r,this.height=s,this.canvas.width=r,this.canvas.height=s;for(const u of Yi){const o=this.buffers.get(u);o&&$r(this.gl,o),this.programs.has(u)&&this.buffers.set(u,En(this.gl,r,s))}}}setSources(e,t){if(this.gl.isContextLost())throw new Error("WebGL context lost");this.disposePrograms(),this.passChannels=t,this.activePasses=[],this.vertexShader=wn(this.gl,this.gl.VERTEX_SHADER,Hi,"vertex");for(const r of Wi){const s=r==="image"?e.image:e[r];if(!s?.trim())continue;const u=Gi(e.common||"",s),o=wn(this.gl,this.gl.FRAGMENT_SHADER,u,r),p=Ji(this.gl,this.vertexShader,o,r);if(this.gl.deleteShader(o),this.programs.set(r,{program:p,uniforms:Ki(this.gl,p)}),this.activePasses.push(r),r!=="image"&&this.width>0){const y=this.buffers.get(r);y&&$r(this.gl,y),this.buffers.set(r,En(this.gl,this.width,this.height))}}if(!this.programs.has("image"))throw new ht("image pass is required","image","Missing image shader source")}async ensureTextures(e){const t=[...new Set(e.filter(Boolean))];await Promise.all(t.map(r=>this.loadTexture(r)))}updateVideoTextures(){const e=this.gl;for(const t of this.external.values()){const r=t.video;!r||r.readyState<2||(e.bindTexture(e.TEXTURE_2D,t.texture),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,1),e.texImage2D(e.TEXTURE_2D,0,e.RGBA8,e.RGBA,e.UNSIGNED_BYTE,r),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,0),t.width=r.videoWidth||t.width,t.height=r.videoHeight||t.height)}}setVideosPlaying(e){for(const t of this.external.values())t.video&&(e?t.video.play().catch(()=>{}):t.video.pause())}getTextureSize(e){const t=this.external.get(e);return!t||t.width<1||t.height<1?null:{width:t.width,height:t.height}}loadTexture(e){return this.external.get(e)?Promise.resolve():Xi(e)?this.loadVideoTexture(e):new Promise((r,s)=>{const u=new Image;u.crossOrigin="anonymous",u.onload=()=>{const o=this.gl,p=o.createTexture();if(!p){s(new Error("Unable to create texture"));return}o.bindTexture(o.TEXTURE_2D,p),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,1),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,o.LINEAR),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_S,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_T,o.CLAMP_TO_EDGE),o.texImage2D(o.TEXTURE_2D,0,o.RGBA8,o.RGBA,o.UNSIGNED_BYTE,u),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,0),this.external.set(e,{texture:p,width:u.naturalWidth||u.width,height:u.naturalHeight||u.height,url:e}),r()},u.onerror=()=>s(new Error(`Failed to load texture: ${e}`)),u.src=e})}loadVideoTexture(e){return new Promise((t,r)=>{const s=document.createElement("video");s.crossOrigin="anonymous",s.muted=!0,s.loop=!0,s.playsInline=!0,s.preload="auto";let u=!1;const o=()=>{u||(u=!0,r(new Error(`Failed to load video: ${e}`)))},p=()=>{if(u||!s.videoWidth)return;u=!0;const y=this.gl,P=y.createTexture();if(!P){r(new Error("Unable to create texture"));return}y.bindTexture(y.TEXTURE_2D,P),y.pixelStorei(y.UNPACK_FLIP_Y_WEBGL,1),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_MIN_FILTER,y.LINEAR),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_MAG_FILTER,y.LINEAR),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_WRAP_S,y.CLAMP_TO_EDGE),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_WRAP_T,y.CLAMP_TO_EDGE),y.texImage2D(y.TEXTURE_2D,0,y.RGBA8,y.RGBA,y.UNSIGNED_BYTE,s),y.pixelStorei(y.UNPACK_FLIP_Y_WEBGL,0),this.external.set(e,{texture:P,width:s.videoWidth,height:s.videoHeight,url:e,video:s}),s.play().catch(()=>{}),t()};s.addEventListener("loadeddata",p),s.addEventListener("error",o),s.src=e,s.load()})}resolveChannel(e,t){const r={texture:this.blackTexture,width:1,height:1};if(t.kind==="none")return r;if(t.kind==="url"){const o=this.external.get(t.url);return o?{texture:o.texture,width:o.width,height:o.height}:r}const s=t.kind==="self"?e==="image"?null:e:t.buffer;if(!s)return r;const u=this.buffers.get(s);return u?{texture:u.textures[u.index],width:this.width,height:this.height}:r}bindChannels(e,t){const r=this.gl,s=this.passChannels.get(e)||[{kind:"none"},{kind:"none"},{kind:"none"},{kind:"none"}],u=[];for(let o=0;o<4;o++){const p=this.resolveChannel(e,s[o]);r.activeTexture(r.TEXTURE0+o),r.bindTexture(r.TEXTURE_2D,p.texture),t.iChannel[o]&&r.uniform1i(t.iChannel[o],o),u.push(p.width,p.height,1)}t.iChannelResolution&&r.uniform3fv(t.iChannelResolution,u),t.iChannelTime&&r.uniform1fv(t.iChannelTime,[0,0,0,0])}setCommonUniforms(e,t){const r=this.gl,s=this.width,u=this.height;if(e.iResolution&&r.uniform3f(e.iResolution,s,u,1),e.iTime&&r.uniform1f(e.iTime,t.time),e.iTimeDelta&&r.uniform1f(e.iTimeDelta,t.timeDelta),e.iFrameRate&&r.uniform1f(e.iFrameRate,t.timeDelta>0?1/t.timeDelta:60),e.iFrame&&r.uniform1i(e.iFrame,t.frame),e.iMouse&&r.uniform4f(e.iMouse,t.mouse[0],t.mouse[1],t.mouse[2],t.mouse[3]),e.iDate){const o=new Date;r.uniform4f(e.iDate,o.getFullYear(),o.getMonth(),o.getDate(),o.getHours()*3600+o.getMinutes()*60+o.getSeconds()+o.getMilliseconds()*.001)}e.iSampleRate&&r.uniform1f(e.iSampleRate,44100);for(let o=0;o<4;o++)e.uParam[o]&&r.uniform1f(e.uParam[o],t.params[o])}render(e){const t=this.gl;if(!this.vao||this.width<1||this.height<1)return;this.updateVideoTextures(),t.bindVertexArray(this.vao),t.viewport(0,0,this.width,this.height),t.disable(t.DEPTH_TEST),t.disable(t.BLEND);for(const s of this.activePasses){if(s==="image")continue;const u=this.programs.get(s),o=this.buffers.get(s);if(!u||!o)continue;const p=1-o.index;t.bindFramebuffer(t.FRAMEBUFFER,o.framebuffers[p]),t.viewport(0,0,this.width,this.height),t.useProgram(u.program),this.setCommonUniforms(u.uniforms,e),this.bindChannels(s,u.uniforms),t.drawArrays(t.TRIANGLES,0,3),o.index=p}const r=this.programs.get("image");r&&(t.bindFramebuffer(t.FRAMEBUFFER,null),t.viewport(0,0,this.width,this.height),t.useProgram(r.program),this.setCommonUniforms(r.uniforms,e),this.bindChannels("image",r.uniforms),t.drawArrays(t.TRIANGLES,0,3),t.bindVertexArray(null))}readRect(e,t,r,s){return this.readFramebufferRect(null,e,t,r,s)}readBufferRect(e,t,r,s,u){if(e==="image")return this.readRect(t,r,s,u);const o=this.buffers.get(e);return o?this.readFramebufferRect(o.framebuffers[o.index],t,r,s,u):null}readPixel(e,t){const r=this.readRect(Math.floor(e),Math.floor(t),1,1);return!r||r.data.length<4?[0,0,0,0]:[r.data[0],r.data[1],r.data[2],r.data[3]]}readFramebufferRect(e,t,r,s,u){const o=this.gl;if(o.isContextLost()||this.width<1||this.height<1)return null;let p=Math.floor(t),y=Math.floor(r),P=Math.floor(s),M=Math.floor(u);if(P<1||M<1||(p<0&&(P+=p,p=0),y<0&&(M+=y,y=0),p+P>this.width&&(P=this.width-p),y+M>this.height&&(M=this.height-y),P<1||M<1))return null;const k=new Uint8Array(P*M*4);return o.bindFramebuffer(o.FRAMEBUFFER,e),o.readPixels(p,y,P,M,o.RGBA,o.UNSIGNED_BYTE,k),o.bindFramebuffer(o.FRAMEBUFFER,null),{x:p,y,width:P,height:M,data:k}}get size(){return{width:this.width,height:this.height}}disposePrograms(){for(const e of this.programs.values())this.gl.deleteProgram(e.program);this.programs.clear(),this.activePasses=[],this.vertexShader&&(this.gl.deleteShader(this.vertexShader),this.vertexShader=null)}dispose(e=!0){if(this.gl.isContextLost())this.programs.clear(),this.buffers.clear(),this.external.clear(),this.blackTexture=null,this.vao=null,this.vertexShader=null;else{this.disposePrograms();for(const t of this.buffers.values())$r(this.gl,t);this.buffers.clear();for(const t of this.external.values())t.video&&(t.video.pause(),t.video.removeAttribute("src"),t.video.load()),this.gl.deleteTexture(t.texture);this.external.clear(),this.blackTexture&&(this.gl.deleteTexture(this.blackTexture),this.blackTexture=null),this.vao&&(this.gl.deleteVertexArray(this.vao),this.vao=null),e&&this.gl.getExtension("WEBGL_lose_context")?.loseContext()}}}var es=Object.defineProperty,ts=Object.getOwnPropertyDescriptor,Y=(n,e,t,r)=>{for(var s=r>1?void 0:r?ts(e,t):e,u=n.length-1,o;u>=0;u--)(o=n[u])&&(s=(r?o(e,t,s):o(s))||s);return r&&s&&es(e,t,s),s};const rs="sonic-shader",_n=128,ns=["time","frame","mouseX","mouseY","hovering"],is=["param0","param1","param2","param3"],ss=["channel0","channel1","channel2","channel3","imageCh0","imageCh1","imageCh2","imageCh3","bufferACh0","bufferACh1","bufferACh2","bufferACh3","bufferBCh0","bufferBCh1","bufferBCh2","bufferBCh3","bufferCCh0","bufferCCh1","bufferCCh2","bufferCCh3","bufferDCh0","bufferDCh1","bufferDCh2","bufferDCh3"],as=["sampleR","sampleG","sampleB","sampleA","sampleLuma"],os=["extracts","extractCount","extractSeq"];function us(){return typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches}function Ve(n,e){if(typeof n=="number"&&Number.isFinite(n))return n;if(typeof n=="string"&&n.trim()!==""){const t=Number(n);if(Number.isFinite(t))return t}return e}function cs(n){if(n===null||n==="")return"";if(typeof n=="string")return n.trim();const e=ii(n);if(e)return e;if(!(n&&typeof n=="object"))return""}function xn(n){if(!Array.isArray(n))return[];const e=[];for(const t of n){if(!t||typeof t!="object")continue;const r=t,s=Ve(r.x,NaN),u=Ve(r.y,NaN);if(!Number.isFinite(s)||!Number.isFinite(u))continue;const o={x:s,y:u,source:"manual"};typeof r.id=="string"&&r.id&&(o.id=r.id),"w"in r&&(o.w=Ve(r.w,0)),"h"in r&&(o.h=Ve(r.h,0)),"patch"in r&&(o.patch=Ve(r.patch,16)),e.push(o)}return e}const Nr=4;async function kn(n,e,t){if(typeof document>"u"||e<1||t<1)return null;try{const r=document.createElement("canvas");r.width=e,r.height=t;const s=r.getContext("2d");if(!s)return null;const u=s.createImageData(e,t),o=u.data;for(let P=0;P<t;P++){const M=(t-1-P)*e*Nr,k=P*e*Nr;for(let w=0;w<e*Nr;w++)o[k+w]=n[M+w]}s.putImageData(u,0,0);const p=await new Promise(P=>{try{r.toBlob(M=>P(M),"image/png")}catch{P(null)}});return p?URL.createObjectURL(p):r.toDataURL("image/png")||null}catch{return null}}function Sn(n,e){n.blobUrl=e,n.url=e}let V=class extends Nt{constructor(){super(...arguments),this.image="",this.bufferA="",this.bufferB="",this.bufferC="",this.bufferD="",this.common="",this.channel0="",this.channel1="",this.channel2="",this.channel3="",this.imageCh0="",this.imageCh1="",this.imageCh2="",this.imageCh3="",this.bufferACh0="",this.bufferACh1="",this.bufferACh2="",this.bufferACh3="",this.bufferBCh0="",this.bufferBCh1="",this.bufferBCh2="",this.bufferBCh3="",this.bufferCCh0="",this.bufferCCh1="",this.bufferCCh2="",this.bufferCCh3="",this.bufferDCh0="",this.bufferDCh1="",this.bufferDCh2="",this.bufferDCh3="",this.play=!0,this.playOnHover=!1,this.mouse=!0,this.mouseMode="direct",this.mouseSpeed=8,this.hoverParam="",this.hoverSpeed=10,this.releaseOffscreen=!0,this.dprMax=2,this.param0=0,this.param1=0,this.param2=0,this.param3=0,this.dataProvider="",this.outDataProvider="",this.sample=!1,this.outInterval=80,this.extract=!1,this.extractInterval=0,this.extractSource="image",this.extractMask="none",this.extractThreshold=.5,this.extractMax=8,this.extractPatch=16,this.extractBitmaps=!1,this.extractDataProvider="",this.aspectRatio="",this.errorMessage="",this.runtime=null,this.raf=0,this.startTime=0,this.lastTime=0,this.frame=0,this.mouseVec=[0,0,0,0],this.mouseTarget=[0,0],this.mouseFollow=[0,0],this.mouseHasPointer=!1,this.pointerDown=!1,this.hovering=!1,this.hoverGoal=0,this.hoverMix=0,this.leaveRaf=0,this.outEventListeners=0,this.extractEventListeners=0,this.releasing=!1,this.inView=!0,this.resizeObserver=null,this.intersectionObserver=null,this.rebuildToken=0,this.ready=!1,this.formPublisher=null,this.outPublisher=null,this.extractPublisher=null,this.lastOutAt=0,this.lastExtractAt=0,this.manualRois=[],this.lastBlobUrls=[],this.pendingRevokeUrls=[],this.extractRunning=!1,this.extractSeq=0,this.onFormMutation=()=>{const n=this.formPublisher?.get()??{};this.applyFormParams(n)},this.onContextLost=n=>{n.preventDefault(),!this.releasing&&(this.rebuildToken++,this.stopLoop(),this.ready=!1,this.runtime=null)},this.onContextRestored=()=>{this.releasing||!this.inView||this.ensureRuntime()},this.loop=()=>{this.raf=requestAnimationFrame(this.loop),this.drawFrame(performance.now()),this.playOnHover&&!this.hovering&&this.hoverSettled()&&(this.stopLoop(),this.runtime?.setVideosPlaying(!1))},this.onPointerMove=n=>{if(!this.mouse)return;const{x:e,y:t}=this.localPointer(n);this.setPointerTarget(e,t),this.pointerDown&&(this.mouseVec[2]=e,this.mouseVec[3]=t)},this.onPointerDown=n=>{if(!this.mouse)return;this.pointerDown=!0,this.setPointerCapture?.(n.pointerId);const{x:e,y:t}=this.localPointer(n);this.setPointerTarget(e,t,!0),this.mouseVec[2]=e,this.mouseVec[3]=t},this.onPointerUp=n=>{if(!this.mouse)return;this.pointerDown=!1;const{x:e,y:t}=this.localPointer(n);this.setPointerTarget(e,t),this.mouseVec[2]=-Math.abs(this.mouseVec[2]),this.mouseVec[3]=-Math.abs(this.mouseVec[3])},this.onPointerEnter=()=>{this.leaveRaf&&(cancelAnimationFrame(this.leaveRaf),this.leaveRaf=0),this.hovering=!0,this.hoverGoal=1,this.syncPlayback()},this.onPointerLeave=()=>{this.leaveRaf&&cancelAnimationFrame(this.leaveRaf),this.leaveRaf=requestAnimationFrame(()=>{this.leaveRaf=0,!(!this.isConnected||this.matches(":hover"))&&(this.hovering=!1,this.hoverGoal=0,this.pointerDown=!1,this.syncPlayback())})}}connectedCallback(){super.connectedCallback(),this.addEventListener("pointermove",this.onPointerMove),this.addEventListener("pointerdown",this.onPointerDown),this.addEventListener("pointerup",this.onPointerUp),this.addEventListener("pointerleave",this.onPointerLeave),this.addEventListener("pointerenter",this.onPointerEnter),this.bindFormProvider(),this.bindOutPublisher(),this.bindExtractPublisher()}addEventListener(n,e,t){n==="out"&&e&&this.outEventListeners++,n==="extract"&&e&&this.extractEventListeners++,super.addEventListener(n,e,t)}removeEventListener(n,e,t){n==="out"&&e&&(this.outEventListeners=Math.max(0,this.outEventListeners-1)),n==="extract"&&e&&(this.extractEventListeners=Math.max(0,this.extractEventListeners-1)),super.removeEventListener(n,e,t)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("pointermove",this.onPointerMove),this.removeEventListener("pointerdown",this.onPointerDown),this.removeEventListener("pointerup",this.onPointerUp),this.removeEventListener("pointerleave",this.onPointerLeave),this.removeEventListener("pointerenter",this.onPointerEnter),this.leaveRaf&&(cancelAnimationFrame(this.leaveRaf),this.leaveRaf=0),this.unbindFormProvider(),this.unbindContextEvents(),this.revokeBlobUrls();for(const n of this.pendingRevokeUrls)try{URL.revokeObjectURL(n)}catch{}this.pendingRevokeUrls=[],this.stopLoop(),this.resizeObserver?.disconnect(),this.intersectionObserver?.disconnect(),this.rebuildToken++,this.ready=!1,this.releasing=!0,this.runtime?.dispose(!0),this.runtime=null,this.outPublisher=null,this.releasing=!1}firstUpdated(){this.resizeObserver=new ResizeObserver(()=>this.syncSize()),this.resizeObserver.observe(this),this.intersectionObserver=new IntersectionObserver(n=>{this.inView=n.some(e=>e.isIntersecting),this.syncVisibility()},{threshold:0}),this.intersectionObserver.observe(this),this.bindFormProvider(),this.bindOutPublisher(),this.bindExtractPublisher(),requestAnimationFrame(()=>{(this.inView||!this.releaseOffscreen)&&this.ensureRuntime()})}updated(n){if(!this.runtime)return;["image","bufferA","bufferB","bufferC","bufferD","common","channel0","channel1","channel2","channel3","imageCh0","imageCh1","imageCh2","imageCh3","bufferACh0","bufferACh1","bufferACh2","bufferACh3","bufferBCh0","bufferBCh1","bufferBCh2","bufferBCh3","bufferCCh0","bufferCCh1","bufferCCh2","bufferCCh3","bufferDCh0","bufferDCh1","bufferDCh2","bufferDCh3"].some(t=>n.has(t))&&this.rebuild(),n.has("play")&&this.syncPlayback(),(n.has("dataProvider")||n.has("outDataProvider")||n.has("extractDataProvider"))&&(this.bindFormProvider(),this.bindOutPublisher(),this.bindExtractPublisher()),n.has("aspectRatio")&&this.applyAspectRatio()}applyAspectRatio(n){const e=this.aspectRatio.trim();if(e){this.style.setProperty("--sonic-shader-ar",e.includes("/")?e:e.replace(":"," / "));return}const t=n||this.channel0,r=t?this.runtime?.getTextureSize(t):null;if(r){this.style.setProperty("--sonic-shader-ar",`${r.width} / ${r.height}`);return}this.style.removeProperty("--sonic-shader-ar")}resolveFormProviderId(){const n=this.dataProvider?.trim();return n||at.getAncestorAttributeValue(this,"dataProvider")||at.getAncestorAttributeValue(this,"formDataProvider")||""}unbindFormProvider(){this.formPublisher&&(this.formPublisher.offInternalMutation(this.onFormMutation),this.formPublisher=null)}bindFormProvider(){this.unbindFormProvider();const n=this.resolveFormProviderId();n&&(this.formPublisher=$e.get(n),this.formPublisher.onInternalMutation(this.onFormMutation),this.onFormMutation())}resolveOutProviderId(){const n=this.outDataProvider?.trim();return n||this.resolveFormProviderId()}bindOutPublisher(){const n=this.resolveOutProviderId();this.outPublisher=n?$e.get(n):null}resolveExtractProviderId(){const n=this.extractDataProvider?.trim();return n||this.resolveOutProviderId()}bindExtractPublisher(){const n=this.resolveExtractProviderId();this.extractPublisher=n?$e.get(n):null}applyFormParams(n){const e=n&&typeof n=="object"?n:{},t=zt(this.hoverParam);t!==0&&(this.param0=Ve(e.param0,this.param0)),t!==1&&(this.param1=Ve(e.param1,this.param1)),t!==2&&(this.param2=Ve(e.param2,this.param2)),t!==3&&(this.param3=Ve(e.param3,this.param3)),"mouseSpeed"in e&&(this.mouseSpeed=Ve(e.mouseSpeed,this.mouseSpeed)),"hoverSpeed"in e&&(this.hoverSpeed=Ve(e.hoverSpeed,this.hoverSpeed)),"extractThreshold"in e&&(this.extractThreshold=Ve(e.extractThreshold,this.extractThreshold)),"extractMax"in e&&(this.extractMax=Ve(e.extractMax,this.extractMax)),"extractPatch"in e&&(this.extractPatch=Ve(e.extractPatch,this.extractPatch)),"rois"in e&&(this.manualRois=xn(e.rois));for(const r of ss){if(!(r in e))continue;const s=cs(e[r]);s!==void 0&&this[r]!==s&&(this[r]=s)}}effectiveParams(){const n=[this.param0,this.param1,this.param2,this.param3],e=zt(this.hoverParam);return e!==null&&(n[e]=this.hoverMix),n}releaseRuntime(){this.rebuildToken++,this.stopLoop(),this.ready=!1,this.releasing=!0,this.unbindContextEvents(),this.runtime?.dispose(!1),this.runtime=null,this.releasing=!1}getCanvas(){return this.renderRoot?.querySelector("canvas")??null}bindContextEvents(){const n=this.getCanvas();n?.addEventListener("webglcontextlost",this.onContextLost),n?.addEventListener("webglcontextrestored",this.onContextRestored)}unbindContextEvents(){const n=this.getCanvas();n?.removeEventListener("webglcontextlost",this.onContextLost),n?.removeEventListener("webglcontextrestored",this.onContextRestored)}async ensureRuntime(){if(this.runtime&&!this.runtime.isLost||(this.runtime=null,await this.updateComplete,!this.isConnected||!this.inView&&this.releaseOffscreen))return;const n=this.getCanvas();if(n)try{this.errorMessage="",this.runtime=new Qi(n),this.bindContextEvents(),this.syncSize(),await this.rebuild()}catch(e){this.emitError(e)}}syncVisibility(){if(!this.inView&&this.releaseOffscreen){this.releaseRuntime();return}if(this.inView&&(!this.runtime||this.runtime.isLost)){this.ensureRuntime();return}this.syncPlayback()}syncSize(){if(!this.runtime)return;const n=this.getBoundingClientRect(),e=Math.max(n.width,this.clientWidth,1),t=Math.max(n.height,this.clientHeight,1),r=Math.min(window.devicePixelRatio||1,this.dprMax);this.runtime.resize(e*r,t*r),this.ready&&this.drawFrame(performance.now())}buildChannels(n){const e=[this.channel0,this.channel1,this.channel2,this.channel3],t=n==="image"?[this.imageCh0,this.imageCh1,this.imageCh2,this.imageCh3]:n==="bufferA"?[this.bufferACh0,this.bufferACh1,this.bufferACh2,this.bufferACh3]:n==="bufferB"?[this.bufferBCh0,this.bufferBCh1,this.bufferBCh2,this.bufferBCh3]:n==="bufferC"?[this.bufferCCh0,this.bufferCCh1,this.bufferCCh2,this.bufferCCh3]:[this.bufferDCh0,this.bufferDCh1,this.bufferDCh2,this.bufferDCh3];return[0,1,2,3].map(r=>Zi(t[r],e[r]))}collectUrls(n){const e=[];for(const t of n.values())for(const r of t)r.kind==="url"&&e.push(r.url);return e}async rebuild(){if(!this.runtime||this.runtime.isLost||!this.image.trim())return;const n=++this.rebuildToken;this.errorMessage="";const e={common:this.common,image:this.image,bufferA:this.bufferA,bufferB:this.bufferB,bufferC:this.bufferC,bufferD:this.bufferD},t=new Map;for(const r of["bufferA","bufferB","bufferC","bufferD","image"])t.set(r,this.buildChannels(r));try{this.syncSize();const r=this.collectUrls(t);if(await this.runtime.ensureTextures(r),n!==this.rebuildToken||!this.runtime||this.runtime.isLost||(this.applyAspectRatio(this.channel0||r[0]),this.syncSize(),this.runtime.setSources(e,t),n!==this.rebuildToken||!this.runtime||this.runtime.isLost))return;this.ready=!0,this.startTime=performance.now(),this.lastTime=this.startTime,this.frame=0,this.drawFrame(this.startTime),this.syncPlayback()}catch(r){if(n!==this.rebuildToken)return;this.ready=!1,this.stopLoop(),this.emitError(r)}}emitError(n){const e=n instanceof ht||n instanceof Error?n.message:String(n);this.errorMessage=e,this.dispatchEvent(new CustomEvent("error",{detail:{message:e,pass:n instanceof ht?n.pass:void 0,infoLog:n instanceof ht?n.infoLog:void 0},bubbles:!0,composed:!0}))}shouldAnimate(){return!this.play||!this.ready||!this.inView||us()||!this.runtime?!1:this.playOnHover?this.hovering||!this.hoverSettled():!0}hoverSettled(){return zt(this.hoverParam)===null?!0:Math.abs(this.hoverMix-this.hoverGoal)<.002}syncPlayback(){this.shouldAnimate()?(this.runtime?.setVideosPlaying(!0),this.raf||(this.lastTime=performance.now(),this.loop())):(this.stopLoop(),this.runtime?.setVideosPlaying(!1),this.ready&&this.drawFrame(performance.now()))}stopLoop(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=0)}drawFrame(n){if(!this.runtime||!this.ready)return;const e=(n-this.startTime)/1e3,t=Math.max(0,(n-this.lastTime)/1e3);this.lastTime=n,this.advanceMouseFollow(t),this.advanceHover(t);const r=this.effectiveParams();this.runtime.render({time:e,timeDelta:t,frame:this.frame++,mouse:this.mouseVec,params:r}),this.maybePublishOut(n,e,r),this.maybeExtract(n,e)}round3(n){return Math.round(n*1e3)/1e3}buildOutput(n,e,t=!1){const{width:r,height:s}=this.runtime?.size??{width:1,height:1},u=this.mouseHasPointer,o=u&&r>0?this.mouseVec[0]/r:.5,p=u&&s>0?this.mouseVec[1]/s:.5,y=e??this.effectiveParams(),P={time:this.round3(n),frame:this.frame,mouseX:this.round3(o),mouseY:this.round3(p),hovering:this.hovering?1:0,param0:this.round3(y[0]),param1:this.round3(y[1]),param2:this.round3(y[2]),param3:this.round3(y[3])};if(t&&this.runtime){const M=u?this.mouseVec[0]:r*.5,k=u?this.mouseVec[1]:s*.5,[w,C,R,N]=this.runtime.readPixel(M,k),ee=w/255,J=C/255,E=R/255,v=N/255;P.sampleR=this.round3(ee),P.sampleG=this.round3(J),P.sampleB=this.round3(E),P.sampleA=this.round3(v),P.sampleLuma=this.round3(.2126*ee+.7152*J+.0722*E)}return P}publisherFieldHasListener(n){return!!this.outPublisher?._proxies_?.get(n)?.hasListener?.()}hasOutConsumers(){if(this.outEventListeners>0)return!0;if(!this.outPublisher)return!1;for(const n of ns)if(this.publisherFieldHasListener(n))return!0;for(const n of as)if(this.publisherFieldHasListener(n))return!0;return!1}shouldSkipParamOutWrite(n){if(!is.includes(n)||!this.formPublisher||this.formPublisher!==this.outPublisher)return!1;const e=zt(this.hoverParam);return e===null?!0:Number(n.slice(5))!==e}needsSampleRead(){return this.sample&&this.hasOutConsumers()}maybePublishOut(n,e,t){if(this.outPublisher||this.bindOutPublisher(),!this.hasOutConsumers())return;const r=Math.max(16,this.outInterval||80);if(n-this.lastOutAt<r)return;this.lastOutAt=n;const s=this.buildOutput(e,t,this.needsSampleRead()),u=this.outPublisher;if(u){for(const[o,p]of Object.entries(s))if(p!==void 0&&!this.shouldSkipParamOutWrite(o))try{u[o].set(p)}catch{}}this.dispatchEvent(new CustomEvent("out",{detail:s,bubbles:!0,composed:!0}))}revokeBlobUrls(){for(const n of this.lastBlobUrls)try{URL.revokeObjectURL(n)}catch{}this.lastBlobUrls=[]}scheduleRevokePreviousBlobs(n){const e=n.filter(r=>r.startsWith("blob:"));if(e.length===0)return;this.pendingRevokeUrls.push(...e);const t=e;window.setTimeout(()=>{for(const r of t){try{URL.revokeObjectURL(r)}catch{}const s=this.pendingRevokeUrls.indexOf(r);s>=0&&this.pendingRevokeUrls.splice(s,1)}},1500)}publisherHasFieldListener(n,e){return!!n?._proxies_?.get(e)?.hasListener?.()}hasExtractConsumers(){if(this.extractEventListeners>0)return!0;const n=this.extractPublisher;if(!n)return!1;for(const e of os)if(this.publisherHasFieldListener(n,e))return!0;return!1}syncManualRoisFromPublishers(){const n=e=>{if(e?.get)try{const t=e.get()??{};"rois"in t&&(this.manualRois=xn(t.rois))}catch{}};n(this.formPublisher),this.extractPublisher&&this.extractPublisher!==this.formPublisher&&n(this.extractPublisher)}resolveExtractInterval(){return this.extractInterval>0?Math.max(16,this.extractInterval):Math.max(16,this.outInterval||100)}async readRegion(n){return!this.runtime||!this.ready?null:await this.buildExtractItem(n,"manual",void 0)}async extractNow(){const n=(performance.now()-this.startTime)/1e3;return this.runExtract(n)}async maybeExtract(n,e){!this.extract||!this.ready||!this.runtime||(this.extractPublisher||this.bindExtractPublisher(),this.hasExtractConsumers()&&(n-this.lastExtractAt<this.resolveExtractInterval()||this.extractRunning||(this.lastExtractAt=n,await this.runExtract(e))))}async runExtract(n){const e={frame:this.frame,time:this.round3(n),items:[]};if(!this.runtime||!this.ready)return e;this.extractRunning=!0;try{this.syncManualRoisFromPublishers();const{width:t,height:r}=this.runtime.size,s=this.manualRois.map(k=>({...k,source:"manual"})),u=Ur(this.extractMask);if(u){const k=this.runtime.readBufferRect(u,0,0,t,r);if(k){const w=Vi(k.data,k.width,k.height,{threshold:this.extractThreshold,maxCount:Math.max(0,Math.floor(this.extractMax)),minDistance:Math.max(8,Math.floor(Math.min(this.extractPatch/3,16)))}),C=w[0]?.score||1;for(let R=0;R<w.length;R++){const N=w[R];s.push({id:`detect-${R}`,x:(N.x+.5)/t,y:(N.y+.5)/r,patch:this.extractPatch,source:"detect",score:C>0?N.score/C:N.score})}}}const o=[];let p=0;const y=Ur(this.extractSource)??"image";for(const k of s){const w=k.source==="detect"?"detect":"manual";if(w==="detect"){if(p>=Math.max(0,Math.floor(this.extractMax)))continue;p++}const C=bn(k,t,r,this.extractPatch,_n);if(!C)continue;const R=y==="image"?this.runtime.readRect(C.x,C.y,C.w,C.h):this.runtime.readBufferRect(y,C.x,C.y,C.w,C.h);if(!R)continue;const N=new Uint8Array(R.data),ee=yn(N),J={id:k.id||`${w}-${C.x}-${C.y}`,x:this.round3(R.x/t),y:this.round3(R.y/r),w:this.round3(R.width/t),h:this.round3(R.height/r),meanR:this.round3(ee.r),meanG:this.round3(ee.g),meanB:this.round3(ee.b),meanA:this.round3(ee.a),meanLuma:this.round3(ee.luma),source:w};typeof k.score=="number"&&(J.score=this.round3(k.score)),o.push({item:J,rgba:N,width:R.width,height:R.height})}if(this.extractBitmaps){const k=this.rebuildToken;for(const w of o){if(k!==this.rebuildToken||!this.isConnected){for(const R of o)R.item.blobUrl&&It([R.item.blobUrl]);return e}const C=await kn(w.rgba,w.width,w.height);if(k!==this.rebuildToken||!this.isConnected){C&&It([C]);for(const R of o)R.item.blobUrl&&It([R.item.blobUrl]);return e}C&&Sn(w.item,C)}}if(!this.isConnected){for(const k of o)k.item.blobUrl&&It([k.item.blobUrl]);return e}const P=o.map(k=>k.item),M={frame:this.frame,time:this.round3(n),items:P};return this.publishExtract(M),M}finally{this.extractRunning=!1}}async buildExtractItem(n,e,t){if(!this.runtime)return null;const{width:r,height:s}=this.runtime.size,u=bn(n,r,s,this.extractPatch,_n);if(!u)return null;const o=Ur(this.extractSource)??"image",p=o==="image"?this.runtime.readRect(u.x,u.y,u.w,u.h):this.runtime.readBufferRect(o,u.x,u.y,u.w,u.h);if(!p)return null;const y=yn(p.data),P={id:n.id||`${e}-${u.x}-${u.y}`,x:this.round3(p.x/r),y:this.round3(p.y/s),w:this.round3(p.width/r),h:this.round3(p.height/s),meanR:this.round3(y.r),meanG:this.round3(y.g),meanB:this.round3(y.b),meanA:this.round3(y.a),meanLuma:this.round3(y.luma),source:e};if(typeof t=="number"&&(P.score=this.round3(t)),this.extractBitmaps){const M=this.rebuildToken,k=await kn(p.data,p.width,p.height);if(M!==this.rebuildToken||!this.isConnected)return k&&It([k]),null;k&&Sn(P,k)}return P}publishExtract(n){this.scheduleRevokePreviousBlobs(this.lastBlobUrls),this.lastBlobUrls=[];for(const t of n.items)t.blobUrl&&this.lastBlobUrls.push(t.blobUrl);this.extractSeq++,this.extractPublisher||this.bindExtractPublisher();const e=this.extractPublisher;if(e)try{const t=e.get?.()??{};e.set({...t,rois:Array.isArray(t.rois)?t.rois:this.manualRois,extracts:n.items,extractCount:n.items.length,extractSeq:this.extractSeq})}catch{try{e.extracts.set(n.items),e.extractCount.set(n.items.length),e.extractSeq.set(this.extractSeq)}catch{}}this.dispatchEvent(new CustomEvent("extract",{detail:n,bubbles:!0,composed:!0}))}advanceMouseFollow(n){if(!this.mouse||this.mouseMode!=="target"||!this.mouseHasPointer)return;const e=Math.max(0,this.mouseSpeed),t=e<=0||n<=0?1:1-Math.exp(-e*n);this.mouseFollow[0]+=(this.mouseTarget[0]-this.mouseFollow[0])*t,this.mouseFollow[1]+=(this.mouseTarget[1]-this.mouseFollow[1])*t,this.mouseVec[0]=this.mouseFollow[0],this.mouseVec[1]=this.mouseFollow[1]}advanceHover(n){if(zt(this.hoverParam)===null)return;const e=Math.max(0,this.hoverSpeed),t=e<=0||n<=0?1:1-Math.exp(-e*n),r=this.hoverMix+(this.hoverGoal-this.hoverMix)*t;this.hoverMix=Math.abs(r-this.hoverGoal)<.002?this.hoverGoal:r}localPointer(n){const e=this.getBoundingClientRect(),t=Math.min(window.devicePixelRatio||1,this.dprMax),r=(n.clientX-e.left)*t,s=(e.height-(n.clientY-e.top))*t;return{x:r,y:s}}setPointerTarget(n,e,t=!1){this.mouseTarget[0]=n,this.mouseTarget[1]=e,(!this.mouseHasPointer||t||this.mouseMode==="direct")&&(this.mouseHasPointer=!0,this.mouseFollow[0]=n,this.mouseFollow[1]=e,this.mouseVec[0]=n,this.mouseVec[1]=e)}render(){return Zr`
|
|
73
|
+
<canvas part="canvas"></canvas>
|
|
74
|
+
${this.errorMessage?Zr`<div class="err" part="error">${this.errorMessage}</div>`:null}
|
|
75
|
+
`}};V.styles=Rn`
|
|
76
|
+
:host {
|
|
77
|
+
display: block;
|
|
78
|
+
position: relative;
|
|
79
|
+
width: 100%;
|
|
80
|
+
max-width: 100%;
|
|
81
|
+
height: auto;
|
|
82
|
+
aspect-ratio: var(--sonic-shader-ar, 16 / 9);
|
|
83
|
+
overflow: hidden;
|
|
84
|
+
background: #0a0a0a;
|
|
85
|
+
color: #f87171;
|
|
86
|
+
font: 12px/1.4 ui-monospace, monospace;
|
|
87
|
+
}
|
|
88
|
+
canvas {
|
|
89
|
+
position: absolute;
|
|
90
|
+
inset: 0;
|
|
91
|
+
width: 100%;
|
|
92
|
+
height: 100%;
|
|
93
|
+
display: block;
|
|
94
|
+
touch-action: none;
|
|
95
|
+
}
|
|
96
|
+
.err {
|
|
97
|
+
position: absolute;
|
|
98
|
+
inset: 0;
|
|
99
|
+
z-index: 1;
|
|
100
|
+
padding: 0.75rem;
|
|
101
|
+
background: rgba(0, 0, 0, 0.85);
|
|
102
|
+
white-space: pre-wrap;
|
|
103
|
+
overflow: auto;
|
|
104
|
+
}
|
|
105
|
+
`,Y([X()],V.prototype,"image",2),Y([X({attribute:"buffer-a"})],V.prototype,"bufferA",2),Y([X({attribute:"buffer-b"})],V.prototype,"bufferB",2),Y([X({attribute:"buffer-c"})],V.prototype,"bufferC",2),Y([X({attribute:"buffer-d"})],V.prototype,"bufferD",2),Y([X()],V.prototype,"common",2),Y([X()],V.prototype,"channel0",2),Y([X()],V.prototype,"channel1",2),Y([X()],V.prototype,"channel2",2),Y([X()],V.prototype,"channel3",2),Y([X({attribute:"image-ch0"})],V.prototype,"imageCh0",2),Y([X({attribute:"image-ch1"})],V.prototype,"imageCh1",2),Y([X({attribute:"image-ch2"})],V.prototype,"imageCh2",2),Y([X({attribute:"image-ch3"})],V.prototype,"imageCh3",2),Y([X({attribute:"buffer-a-ch0"})],V.prototype,"bufferACh0",2),Y([X({attribute:"buffer-a-ch1"})],V.prototype,"bufferACh1",2),Y([X({attribute:"buffer-a-ch2"})],V.prototype,"bufferACh2",2),Y([X({attribute:"buffer-a-ch3"})],V.prototype,"bufferACh3",2),Y([X({attribute:"buffer-b-ch0"})],V.prototype,"bufferBCh0",2),Y([X({attribute:"buffer-b-ch1"})],V.prototype,"bufferBCh1",2),Y([X({attribute:"buffer-b-ch2"})],V.prototype,"bufferBCh2",2),Y([X({attribute:"buffer-b-ch3"})],V.prototype,"bufferBCh3",2),Y([X({attribute:"buffer-c-ch0"})],V.prototype,"bufferCCh0",2),Y([X({attribute:"buffer-c-ch1"})],V.prototype,"bufferCCh1",2),Y([X({attribute:"buffer-c-ch2"})],V.prototype,"bufferCCh2",2),Y([X({attribute:"buffer-c-ch3"})],V.prototype,"bufferCCh3",2),Y([X({attribute:"buffer-d-ch0"})],V.prototype,"bufferDCh0",2),Y([X({attribute:"buffer-d-ch1"})],V.prototype,"bufferDCh1",2),Y([X({attribute:"buffer-d-ch2"})],V.prototype,"bufferDCh2",2),Y([X({attribute:"buffer-d-ch3"})],V.prototype,"bufferDCh3",2),Y([X({type:Boolean,reflect:!0})],V.prototype,"play",2),Y([X({type:Boolean,attribute:"play-on-hover"})],V.prototype,"playOnHover",2),Y([X({type:Boolean})],V.prototype,"mouse",2),Y([X({type:String,attribute:"mouse-mode"})],V.prototype,"mouseMode",2),Y([X({type:Number,attribute:"mouse-speed"})],V.prototype,"mouseSpeed",2),Y([X({attribute:"hover-param"})],V.prototype,"hoverParam",2),Y([X({type:Number,attribute:"hover-speed"})],V.prototype,"hoverSpeed",2),Y([X({type:Boolean,attribute:"release-offscreen"})],V.prototype,"releaseOffscreen",2),Y([X({type:Number,attribute:"dpr-max"})],V.prototype,"dprMax",2),Y([X({type:Number,attribute:"param0"})],V.prototype,"param0",2),Y([X({type:Number,attribute:"param1"})],V.prototype,"param1",2),Y([X({type:Number,attribute:"param2"})],V.prototype,"param2",2),Y([X({type:Number,attribute:"param3"})],V.prototype,"param3",2),Y([X({type:String})],V.prototype,"dataProvider",2),Y([X({type:String,attribute:"out-data-provider"})],V.prototype,"outDataProvider",2),Y([X({type:Boolean})],V.prototype,"sample",2),Y([X({type:Number,attribute:"out-interval"})],V.prototype,"outInterval",2),Y([X({type:Boolean})],V.prototype,"extract",2),Y([X({type:Number,attribute:"extract-interval"})],V.prototype,"extractInterval",2),Y([X({type:String,attribute:"extract-source"})],V.prototype,"extractSource",2),Y([X({type:String,attribute:"extract-mask"})],V.prototype,"extractMask",2),Y([X({type:Number,attribute:"extract-threshold"})],V.prototype,"extractThreshold",2),Y([X({type:Number,attribute:"extract-max"})],V.prototype,"extractMax",2),Y([X({type:Number,attribute:"extract-patch"})],V.prototype,"extractPatch",2),Y([X({type:Boolean,attribute:"extract-bitmaps"})],V.prototype,"extractBitmaps",2),Y([X({type:String,attribute:"extract-data-provider"})],V.prototype,"extractDataProvider",2),Y([X({type:String,attribute:"aspect-ratio"})],V.prototype,"aspectRatio",2),Y([ri()],V.prototype,"errorMessage",2),V=Y([Qn(rs)],V)})();
|