gina 0.1.6-alpha.14 → 0.1.6-alpha.141
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/LICENSE +1 -1
- package/README-4Contributors.md +14 -8
- package/README.md +13 -4
- package/bin/cli +16 -2
- package/bin/gina +29 -1
- package/framework/{v0.1.6-alpha.14/lib/inherits → v0.1.6-alpha.141}/LICENSE +1 -1
- package/framework/v0.1.6-alpha.141/VERSION +1 -0
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/asset/plugin/README.md +1 -0
- package/framework/v0.1.6-alpha.141/core/asset/plugin/dist/vendor/gina/css/gina.min.css.map +1 -0
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/asset/plugin/dist/vendor/gina/html/toolbar.html +1 -1
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/asset/plugin/dist/vendor/gina/js/gina.js +794 -257
- package/framework/v0.1.6-alpha.141/core/asset/plugin/dist/vendor/gina/js/gina.min.js +782 -0
- package/framework/v0.1.6-alpha.141/core/asset/plugin/dist/vendor/gina/js/gina.min.js.map +8 -0
- package/framework/v0.1.6-alpha.141/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js +8 -0
- package/framework/v0.1.6-alpha.141/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.map +8 -0
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/config.js +158 -78
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/connectors/couchbase/index.js +108 -26
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/connectors/couchbase/lib/connector.v4.js +124 -22
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/connectors/couchbase/lib/session-store.v4.js +5 -2
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/controller/controller.js +762 -189
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/controller/index.js +2 -2
- package/framework/v0.1.6-alpha.141/core/deps/busboy-1.6.0/.github/workflows/ci.yml +24 -0
- package/framework/v0.1.6-alpha.141/core/deps/busboy-1.6.0/.github/workflows/lint.yml +23 -0
- package/framework/v0.1.6-alpha.141/core/deps/busboy-1.6.0/README.md +191 -0
- package/framework/v0.1.6-alpha.141/core/deps/busboy-1.6.0/bench/bench-multipart-fields-100mb-big.js +149 -0
- package/framework/v0.1.6-alpha.141/core/deps/busboy-1.6.0/bench/bench-multipart-fields-100mb-small.js +143 -0
- package/framework/v0.1.6-alpha.141/core/deps/busboy-1.6.0/bench/bench-multipart-files-100mb-big.js +154 -0
- package/framework/v0.1.6-alpha.141/core/deps/busboy-1.6.0/bench/bench-multipart-files-100mb-small.js +148 -0
- package/framework/v0.1.6-alpha.141/core/deps/busboy-1.6.0/bench/bench-urlencoded-fields-100pairs-small.js +101 -0
- package/framework/v0.1.6-alpha.141/core/deps/busboy-1.6.0/bench/bench-urlencoded-fields-900pairs-small-alt.js +84 -0
- package/framework/v0.1.6-alpha.141/core/deps/busboy-1.6.0/lib/index.js +57 -0
- package/framework/v0.1.6-alpha.141/core/deps/busboy-1.6.0/lib/types/multipart.js +680 -0
- package/framework/v0.1.6-alpha.141/core/deps/busboy-1.6.0/lib/types/urlencoded.js +350 -0
- package/framework/v0.1.6-alpha.141/core/deps/busboy-1.6.0/lib/utils.js +596 -0
- package/framework/v0.1.6-alpha.141/core/deps/busboy-1.6.0/package.json +22 -0
- package/framework/v0.1.6-alpha.141/core/deps/optimist-0.6.1/.travis.yml +4 -0
- package/framework/v0.1.6-alpha.141/core/deps/optimist-0.6.1/LICENSE +21 -0
- package/framework/v0.1.6-alpha.141/core/deps/optimist-0.6.1/example/bool.js +10 -0
- package/framework/v0.1.6-alpha.141/core/deps/optimist-0.6.1/example/boolean_double.js +7 -0
- package/framework/v0.1.6-alpha.141/core/deps/optimist-0.6.1/example/boolean_single.js +7 -0
- package/framework/v0.1.6-alpha.141/core/deps/optimist-0.6.1/example/default_hash.js +8 -0
- package/framework/v0.1.6-alpha.141/core/deps/optimist-0.6.1/example/default_singles.js +7 -0
- package/framework/v0.1.6-alpha.141/core/deps/optimist-0.6.1/example/divide.js +8 -0
- package/framework/v0.1.6-alpha.141/core/deps/optimist-0.6.1/example/line_count.js +20 -0
- package/framework/v0.1.6-alpha.141/core/deps/optimist-0.6.1/example/line_count_options.js +29 -0
- package/framework/v0.1.6-alpha.141/core/deps/optimist-0.6.1/example/line_count_wrap.js +29 -0
- package/framework/v0.1.6-alpha.141/core/deps/optimist-0.6.1/example/nonopt.js +4 -0
- package/framework/v0.1.6-alpha.141/core/deps/optimist-0.6.1/example/reflect.js +2 -0
- package/framework/v0.1.6-alpha.141/core/deps/optimist-0.6.1/example/short.js +3 -0
- package/framework/v0.1.6-alpha.141/core/deps/optimist-0.6.1/example/string.js +11 -0
- package/framework/v0.1.6-alpha.141/core/deps/optimist-0.6.1/example/usage-options.js +19 -0
- package/framework/v0.1.6-alpha.141/core/deps/optimist-0.6.1/example/xup.js +10 -0
- package/framework/v0.1.6-alpha.141/core/deps/optimist-0.6.1/index.js +343 -0
- package/framework/v0.1.6-alpha.141/core/deps/optimist-0.6.1/package.json +31 -0
- package/framework/v0.1.6-alpha.141/core/deps/optimist-0.6.1/package.json.dist +39 -0
- package/framework/v0.1.6-alpha.141/core/deps/optimist-0.6.1/readme.markdown +513 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-1.4.2/HISTORY.md +498 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-1.4.2/LICENSE +7 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-1.4.2/README.md +88 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-1.4.2/bin/swig.js +161 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-1.4.2/bin/swig.js.dist +161 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-1.4.2/dist/swig.min.js +7 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-1.4.2/dist/swig.min.js.map +8 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-1.4.2/index.js +1 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-1.4.2/lib/dateformatter.js +198 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-1.4.2/lib/filters.js +630 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-1.4.2/lib/lexer.js +306 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-1.4.2/lib/loaders/filesystem.js +59 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-1.4.2/lib/loaders/index.js +53 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-1.4.2/lib/loaders/memory.js +63 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-1.4.2/lib/parser.js +744 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-1.4.2/lib/swig.js +740 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-1.4.2/lib/tags/autoescape.js +37 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-1.4.2/lib/tags/block.js +25 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-1.4.2/lib/tags/else.js +25 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-1.4.2/lib/tags/elseif.js +28 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-1.4.2/lib/tags/extends.js +19 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-1.4.2/lib/tags/filter.js +68 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-1.4.2/lib/tags/for.js +130 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-1.4.2/lib/tags/if.js +86 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-1.4.2/lib/tags/import.js +91 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-1.4.2/lib/tags/include.js +100 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-1.4.2/lib/tags/index.js +16 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-1.4.2/lib/tags/macro.js +79 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-1.4.2/lib/tags/parent.js +51 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-1.4.2/lib/tags/raw.js +23 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-1.4.2/lib/tags/set.js +109 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-1.4.2/lib/tags/spaceless.js +42 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-1.4.2/lib/utils.js +184 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-1.4.2/package.json +57 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-1.4.2/package.json.dist +61 -0
- package/framework/v0.1.6-alpha.141/core/deps/swig-client/swig.js +5031 -0
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/dev/index.js +1 -1
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/dev/lib/factory.js +1 -1
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/gna.js +106 -22
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/locales/index.js +3 -3
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/locales/src/make.js +1 -1
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/mime.types +1 -0
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/model/entity.js +5 -5
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/model/index.js +30 -26
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/model/template/entityFactory.js +1 -1
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/model/template/index.js +1 -1
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/plugins/index.js +3 -3
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/plugins/lib/file/package.json +2 -2
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/plugins/lib/intl/package.json +2 -2
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/plugins/lib/storage/package.json +2 -2
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/plugins/lib/validator/package.json +2 -2
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/plugins/lib/validator/src/form-validator.js +39 -27
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/plugins/lib/validator/src/main.js +490 -114
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/router.js +92 -47
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/server.isaac.js +94 -43
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/server.js +329 -134
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/status.codes +1 -11
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/boilerplate/bundle/controllers/setup.js +2 -2
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/command/gina.tpl +1 -1
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/conf/env.json +19 -0
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/conf/templates.json +4 -2
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/helpers/console.js +1 -1
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/helpers/context.js +30 -13
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/helpers/data/package.json +2 -2
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/helpers/data/src/main.js +1 -1
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/helpers/dateFormat.js +1 -1
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/helpers/index.js +1 -1
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/helpers/json/package.json +2 -2
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/helpers/json/src/main.js +6 -4
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/helpers/path.js +31 -15
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/helpers/plugins/package.json +2 -2
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/helpers/plugins/src/api-error.js +2 -2
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/helpers/plugins/src/main.js +1 -1
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/helpers/task.js +2 -2
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/helpers/text.js +1 -1
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/archiver/package.json +2 -2
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/archiver/src/main.js +11 -11
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/bundle/add.js +2 -1
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/bundle/start.js +21 -8
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/env/get.js +1 -1
- package/framework/v0.1.6-alpha.141/lib/cmd/env/help.js +30 -0
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/framework/build.js +1 -1
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/framework/dot.js +21 -0
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/framework/init.js +19 -1
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/framework/link-node-modules.js +2 -3
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/framework/link.js +3 -2
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/framework/restart.js +3 -3
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/framework/start.js +1 -1
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/framework/tail.js +29 -12
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/framework/version.js +15 -1
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/helper.js +8 -4
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/index.js +1 -1
- package/framework/v0.1.6-alpha.141/lib/cmd/minion/help.txt +18 -0
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/port/reset.js +1 -1
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/project/add.js +7 -2
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/project/arguments.json +1 -0
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/project/build.js +4 -4
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/project/help.txt +4 -0
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/project/list.js +1 -1
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/protocol/list.js +71 -50
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/collection/package.json +2 -2
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/collection/src/main.js +20 -14
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/config.js +1 -1
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cron/package.json +2 -2
- package/framework/v0.1.6-alpha.141/lib/domain/dist/2025-03-14_13-41-20_UTC.dat +15754 -0
- package/framework/v0.1.6-alpha.141/lib/domain/dist/public_suffix_list.dat +15754 -0
- package/framework/v0.1.6-alpha.141/lib/domain/exemples/backend.js +12 -0
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/domain/package.json +2 -2
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/domain/src/main.js +20 -6
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/generator/index.js +1 -1
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/index.js +1 -1
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141/lib/inherits}/LICENSE +1 -1
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/inherits/package.json +2 -2
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/inherits/src/main.js +1 -1
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/logger/package.json +2 -2
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/logger/src/containers/mq/listener.js +10 -2
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/logger/src/helper.js +1 -1
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/logger/src/main.js +1 -1
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/math/index.js +1 -1
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/merge/package.json +2 -2
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/model.js +3 -3
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/proc.js +10 -2
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/routing/package.json +2 -2
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/routing/src/main.js +82 -26
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/session-store.js +3 -3
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/swig-filters/package.json +2 -2
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/swig-filters/src/main.js +76 -15
- package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/validator.js +2 -2
- package/framework/v0.1.6-alpha.141/package.json +11 -0
- package/package.json +3 -3
- package/resources/package.json.template +1 -1
- package/script/post_install.js +4 -4
- package/script/pre_install.js +3 -3
- package/utils/helper.js +38 -14
- package/framework/v0.1.6-alpha.14/VERSION +0 -1
- package/framework/v0.1.6-alpha.14/core/asset/plugin/dist/vendor/gina/css/gina.min.css.map +0 -1
- package/framework/v0.1.6-alpha.14/core/asset/plugin/dist/vendor/gina/js/gina.min.js +0 -766
- package/framework/v0.1.6-alpha.14/core/asset/plugin/dist/vendor/gina/js/gina.min.js.map +0 -8
- package/framework/v0.1.6-alpha.14/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js +0 -7
- package/framework/v0.1.6-alpha.14/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.map +0 -8
- package/framework/v0.1.6-alpha.14/core/deps/busboy/.travis.yml +0 -17
- package/framework/v0.1.6-alpha.14/core/deps/busboy/README.md +0 -225
- package/framework/v0.1.6-alpha.14/core/deps/busboy/deps/encoding/encoding-indexes.js +0 -73
- package/framework/v0.1.6-alpha.14/core/deps/busboy/deps/encoding/encoding.js +0 -2391
- package/framework/v0.1.6-alpha.14/core/deps/busboy/lib/main.js +0 -89
- package/framework/v0.1.6-alpha.14/core/deps/busboy/lib/types/multipart.js +0 -328
- package/framework/v0.1.6-alpha.14/core/deps/busboy/lib/types/urlencoded.js +0 -214
- package/framework/v0.1.6-alpha.14/core/deps/busboy/lib/utils.js +0 -191
- package/framework/v0.1.6-alpha.14/core/deps/busboy/package.json +0 -69
- package/framework/v0.1.6-alpha.14/lib/domain/dist/public_suffix_list.dat +0 -14186
- package/framework/v0.1.6-alpha.14/lib/domain/exemples/backend.js +0 -0
- package/framework/v0.1.6-alpha.14/package.json +0 -14
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/AUTHORS +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/asset/html/nolayout.html +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/asset/html/static.html +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/asset/img/android-chrome-192x192.png +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/asset/img/android-chrome-512x512.png +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/asset/img/apple-touch-icon.png +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/asset/img/favicon-16x16.png +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/asset/img/favicon-32x32.png +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/asset/img/favicon.ico +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/asset/plugin/dist/vendor/gina/css/gina.min.css +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/asset/plugin/uuid.json +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/connectors/couchbase/lib/connector.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/connectors/couchbase/lib/connector.v2.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/connectors/couchbase/lib/connector.v3.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/connectors/couchbase/lib/n1ql.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/connectors/couchbase/lib/session-store.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/connectors/couchbase/lib/session-store.v2.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/connectors/couchbase/lib/session-store.v3.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/controller/controller.framework.js +0 -0
- /package/framework/{v0.1.6-alpha.14/core/deps/busboy → v0.1.6-alpha.141/core/deps/busboy-1.6.0}/LICENSE +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/deps/swig-client/swig-2.0.0.min.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/dev/lib/class.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/dev/lib/tools.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/locales/README.md +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/locales/currency.json +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/locales/dist/language/en.json +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/locales/dist/language/fr.json +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/locales/dist/region/en.json +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/locales/dist/region/fr.json +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/locales/src/resources/currency.csv +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/locales/src/resources/region.csv +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/locales/src/resources/region.mapping.json +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/plugins/README.md +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/plugins/lib/file/README.md +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/plugins/lib/file/build.json +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/plugins/lib/intl/README.md +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/plugins/lib/intl/build.json +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/plugins/lib/intl/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/plugins/lib/storage/README.md +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/plugins/lib/storage/build.json +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/plugins/lib/storage/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/plugins/lib/validator/README.md +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/plugins/lib/validator/build.json +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/server.express.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/_gitignore +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/boilerplate/bundle/config/app.json +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/boilerplate/bundle/config/routing.json +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/boilerplate/bundle/config/settings.json +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/boilerplate/bundle/config/settings.server.json +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/boilerplate/bundle/config/templates.json +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/boilerplate/bundle/controllers/controller.content.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/boilerplate/bundle/controllers/controller.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/boilerplate/bundle/index.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/boilerplate/bundle_namespace/controllers/controller.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/boilerplate/bundle_public/css/default.css +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/boilerplate/bundle_public/css/vendor/readme.md +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/boilerplate/bundle_public/favicon.ico +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/boilerplate/bundle_public/js/vendor/readme.md +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/boilerplate/bundle_public/readme.md +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/boilerplate/bundle_templates/handlers/main.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/boilerplate/bundle_templates/html/content/homepage.html +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/boilerplate/bundle_templates/html/includes/error-msg-noscript.html +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/boilerplate/bundle_templates/html/includes/error-msg-outdated-browser.html +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/boilerplate/bundle_templates/html/layouts/main.html +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/command/gina.bat.tpl +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/conf/manifest.json +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/conf/package.json +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/conf/settings.json +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/conf/statics.json +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/error/client/json/401.json +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/error/client/json/403.json +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/error/client/json/404.json +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/error/server/html/50x.html +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/error/server/json/500.json +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/error/server/json/503.json +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/template/extensions/logger/config.json +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/helpers/data/LICENSE +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/helpers/data/README.md +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/helpers/json/LICENSE +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/helpers/json/README.md +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/helpers/plugins/README.md +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/helpers/prototypes.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/archiver/README.md +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/archiver/build.json +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/archiver/src/dep/jszip.min.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/aliases.json +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/bundle/arguments.json +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/bundle/copy.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/bundle/cp.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/bundle/help.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/bundle/help.txt +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/bundle/list.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/bundle/remove.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/bundle/rename.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/bundle/restart.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/bundle/rm.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/bundle/status.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/bundle/stop.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/env/add.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/env/help.txt +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/env/link-dev.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/env/list.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/env/remove.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/env/rm.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/env/set.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/env/unset.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/env/use.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/framework/get.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/framework/help.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/framework/help.txt +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/framework/msg.json +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/framework/open.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/framework/set.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/framework/status.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/framework/stop.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/framework/update.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/gina-dev.1.md +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/gina-framework.1.md +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/gina.1.md +0 -0
- /package/framework/{v0.1.6-alpha.14/lib/cmd/env → v0.1.6-alpha.141/lib/cmd/minion}/help.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/msg.json +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/port/help.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/port/help.txt +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/port/inc/scan.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/port/list.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/port/set.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/project/help.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/project/import.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/project/move.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/project/remove.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/project/rename.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/project/restart.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/project/rm.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/project/start.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/project/status.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/project/stop.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/protocol/help.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/protocol/help.txt +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/protocol/set.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/scope/add.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/scope/help.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/scope/help.txt +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/scope/link-local.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/scope/link-production.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/scope/list.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/scope/remove.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/scope/rm.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/scope/use.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cmd/view/add.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/collection/README.md +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/collection/build.json +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cron/README.md +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/cron/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/domain/LICENSE +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/domain/README.md +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/domain/exemples/frontend.html +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/inherits/README.md +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/inherits/example/inheriting_eventemitter.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/inherits/example/protected_inheritance.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/inherits/example/simple_inheritance.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/inherits/example/super_attribute_overridden_by_child_on_init.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/logger/README.md +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/logger/src/containers/default/index.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/logger/src/containers/file/index.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/logger/src/containers/file/lib/logrotator/README.md +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/logger/src/containers/file/lib/logrotator/index.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/logger/src/containers/mq/index.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/logger/src/containers/mq/speaker.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/merge/README.md +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/merge/example/merge.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/merge/example/merge_2_literal objects.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/merge/example/merge_and_preserve_first.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/merge/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/routing/README.md +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/routing/build.json +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/shell.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/swig-filters/README.md +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/url/README.md +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/url/index.js +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/url/mocks.json +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/url/routing.json +0 -0
- /package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/lib/url/test.js +0 -0
package/framework/{v0.1.6-alpha.14 → v0.1.6-alpha.141}/core/asset/plugin/dist/vendor/gina/js/gina.js
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** vim: et:ts=4:sw=4:sts=4
|
|
2
|
-
* @license RequireJS 2.3.
|
|
2
|
+
* @license RequireJS 2.3.7 Copyright jQuery Foundation and other contributors.
|
|
3
3
|
* Released under MIT license, https://github.com/requirejs/requirejs/blob/master/LICENSE
|
|
4
4
|
*/
|
|
5
5
|
//Not using strict: uneven strict support in browsers, #392, and causes
|
|
@@ -11,7 +11,7 @@ var requirejs, require, define;
|
|
|
11
11
|
(function (global, setTimeout) {
|
|
12
12
|
var req, s, head, baseElement, dataMain, src,
|
|
13
13
|
interactiveScript, currentlyAddingScript, mainScript, subPath,
|
|
14
|
-
version = '2.3.
|
|
14
|
+
version = '2.3.7',
|
|
15
15
|
commentRegExp = /\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/mg,
|
|
16
16
|
cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,
|
|
17
17
|
jsSuffixRegExp = /\.js$/,
|
|
@@ -33,7 +33,8 @@ var requirejs, require, define;
|
|
|
33
33
|
contexts = {},
|
|
34
34
|
cfg = {},
|
|
35
35
|
globalDefQueue = [],
|
|
36
|
-
useInteractive = false
|
|
36
|
+
useInteractive = false,
|
|
37
|
+
disallowedProps = ['__proto__', 'constructor'];
|
|
37
38
|
|
|
38
39
|
//Could match something like ')//comment', do not lose the prefix to comment.
|
|
39
40
|
function commentReplace(match, singlePrefix) {
|
|
@@ -94,7 +95,7 @@ var requirejs, require, define;
|
|
|
94
95
|
function eachProp(obj, func) {
|
|
95
96
|
var prop;
|
|
96
97
|
for (prop in obj) {
|
|
97
|
-
if (hasProp(obj, prop)) {
|
|
98
|
+
if (hasProp(obj, prop) && disallowedProps.indexOf(prop) == -1) {
|
|
98
99
|
if (func(obj[prop], prop)) {
|
|
99
100
|
break;
|
|
100
101
|
}
|
|
@@ -3072,9 +3073,17 @@ function handleXhr(xhr, $el, options, require) {
|
|
|
3072
3073
|
|
|
3073
3074
|
// catching ready state cb
|
|
3074
3075
|
xhr.onreadystatechange = function (event) {
|
|
3076
|
+
if ( typeof(merge) == 'undefined' ) {
|
|
3077
|
+
merge = require('lib/merge');
|
|
3078
|
+
}
|
|
3075
3079
|
// In case the user is also redirecting
|
|
3076
3080
|
var redirectDelay = (/Google Inc/i.test(navigator.vendor)) ? 50 : 0;
|
|
3077
3081
|
|
|
3082
|
+
// Data loading ...
|
|
3083
|
+
// if (xhr.readyState == 3) {
|
|
3084
|
+
// $form.target.setAttribute('data-gina-form-loading', true);
|
|
3085
|
+
// }
|
|
3086
|
+
|
|
3078
3087
|
if (xhr.readyState == 2) { // responseType interception
|
|
3079
3088
|
isAttachment = ( /^attachment\;/.test( xhr.getResponseHeader('Content-Disposition') ) ) ? true : false;
|
|
3080
3089
|
// force blob response type
|
|
@@ -3108,7 +3117,7 @@ function handleXhr(xhr, $el, options, require) {
|
|
|
3108
3117
|
var url = window.URL.createObjectURL(blob);
|
|
3109
3118
|
a.href = url;
|
|
3110
3119
|
var contentDisposition = xhr.getResponseHeader('Content-Disposition');
|
|
3111
|
-
a.download = contentDisposition.match('\=(.*)')[0].
|
|
3120
|
+
a.download = contentDisposition.match('\=(.*)')[0].substring(1);
|
|
3112
3121
|
//programatically click the link to trigger the download
|
|
3113
3122
|
a.click();
|
|
3114
3123
|
//release the reference to the file by revoking the Object URL
|
|
@@ -3277,6 +3286,10 @@ function handleXhr(xhr, $el, options, require) {
|
|
|
3277
3286
|
// This fires after the blob has been read/loaded.
|
|
3278
3287
|
reader.addEventListener('loadend', (e) => {
|
|
3279
3288
|
|
|
3289
|
+
if ( typeof(merge) == 'undefined' ) {
|
|
3290
|
+
merge = require('lib/merge');
|
|
3291
|
+
}
|
|
3292
|
+
|
|
3280
3293
|
if ( /string/i.test(typeof(e.srcElement.result)) ) {
|
|
3281
3294
|
blobError += e.srcElement.result;
|
|
3282
3295
|
} else if ( typeof(e.srcElement.result) == 'object' ) {
|
|
@@ -3848,7 +3861,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
3848
3861
|
;
|
|
3849
3862
|
/*
|
|
3850
3863
|
* This file is part of the gina package.
|
|
3851
|
-
* Copyright (c) 2009-
|
|
3864
|
+
* Copyright (c) 2009-2025 Rhinostone <contact@gina.io>
|
|
3852
3865
|
*
|
|
3853
3866
|
* For the full copyright and license information, please view the LICENSE
|
|
3854
3867
|
* file that was distributed with this source code.
|
|
@@ -4629,10 +4642,9 @@ function Collection(content, options) {
|
|
|
4629
4642
|
*/
|
|
4630
4643
|
var search = function(filter, field, _content, matched, searchOptionRules) {
|
|
4631
4644
|
var reValidCount = null, searchOptCount = null;
|
|
4632
|
-
|
|
4633
|
-
|
|
4645
|
+
// null case
|
|
4646
|
+
if (filter === null && _content === null) {
|
|
4634
4647
|
++matched;
|
|
4635
|
-
|
|
4636
4648
|
} else if (
|
|
4637
4649
|
filter
|
|
4638
4650
|
&& keywords.indexOf(localeLowerCase) > -1
|
|
@@ -4698,7 +4710,6 @@ function Collection(content, options) {
|
|
|
4698
4710
|
&& searchOptions
|
|
4699
4711
|
&& typeof(searchOptions[field]) != 'undefined'
|
|
4700
4712
|
) {
|
|
4701
|
-
|
|
4702
4713
|
reValidCount = 0;
|
|
4703
4714
|
searchOptCount = searchOptions[field].count();
|
|
4704
4715
|
for ( var rule in searchOptions[field]) {
|
|
@@ -4797,7 +4808,7 @@ function Collection(content, options) {
|
|
|
4797
4808
|
|
|
4798
4809
|
field = arr[1];
|
|
4799
4810
|
if (/^\./.test(field) )
|
|
4800
|
-
field = field.
|
|
4811
|
+
field = field.substring(1);
|
|
4801
4812
|
|
|
4802
4813
|
var subMatched = 0;
|
|
4803
4814
|
if (collection) {
|
|
@@ -5124,15 +5135,15 @@ function Collection(content, options) {
|
|
|
5124
5135
|
}
|
|
5125
5136
|
|
|
5126
5137
|
// fast search with key
|
|
5127
|
-
var r
|
|
5128
|
-
, rLen
|
|
5129
|
-
, c
|
|
5130
|
-
, cLen
|
|
5131
|
-
, f
|
|
5132
|
-
, fLen
|
|
5133
|
-
, keyLen
|
|
5134
|
-
, matched
|
|
5135
|
-
, fullFiltersMatched
|
|
5138
|
+
var r = 0
|
|
5139
|
+
, rLen = foundResults.length
|
|
5140
|
+
, c = 0
|
|
5141
|
+
, cLen = currentResult.length
|
|
5142
|
+
, f = 0
|
|
5143
|
+
, fLen = filters.count()
|
|
5144
|
+
, keyLen = null
|
|
5145
|
+
, matched = 0
|
|
5146
|
+
, fullFiltersMatched = 0
|
|
5136
5147
|
;
|
|
5137
5148
|
if ( uuidSearchModeEnabled && typeof(currentResult[c]) != 'undefined' && currentResult[c].hasOwnProperty(key) ) {
|
|
5138
5149
|
// for every single result found
|
|
@@ -5593,6 +5604,13 @@ function Collection(content, options) {
|
|
|
5593
5604
|
|
|
5594
5605
|
|
|
5595
5606
|
if ( typeof(a) == 'string' && a != '' || typeof(b) == 'string' ) {
|
|
5607
|
+
// Fixed on 2025-03-08: allowed to compare with one of the fields being NULL or not defined
|
|
5608
|
+
if ( typeof(a) == 'undefined' || a == null) {
|
|
5609
|
+
a = ''; // cast to string
|
|
5610
|
+
}
|
|
5611
|
+
if ( typeof(b) == 'undefined' || b == null) {
|
|
5612
|
+
b = ''; // cast to string
|
|
5613
|
+
}
|
|
5596
5614
|
|
|
5597
5615
|
if ( typeof(a) == 'number' ) {
|
|
5598
5616
|
a = ''+a; // cast to string
|
|
@@ -5601,6 +5619,7 @@ function Collection(content, options) {
|
|
|
5601
5619
|
b = ''+b; // cast to string
|
|
5602
5620
|
}
|
|
5603
5621
|
|
|
5622
|
+
|
|
5604
5623
|
return a.localeCompare(b, undefined, {sensitivity: 'case', caseFirst: 'upper'})
|
|
5605
5624
|
}
|
|
5606
5625
|
|
|
@@ -6230,11 +6249,12 @@ function FormValidatorUtil(data, $fields, xhrOptions, fieldsSet) {
|
|
|
6230
6249
|
// system error
|
|
6231
6250
|
systemError = result.error;
|
|
6232
6251
|
}
|
|
6233
|
-
// Fixed on 2023-01-10
|
|
6252
|
+
// Fixed added on 2023-01-10
|
|
6234
6253
|
// We want `local.errorLabels['query']` before the generic|user defined `rule` error
|
|
6235
6254
|
var optionError = ( typeof(options['error']) != 'undefined' ) ? options['error'] : null;
|
|
6236
6255
|
errors['query'] = replace(systemError || _this['error'] || optionError || local.errorLabels['query'], _this);
|
|
6237
|
-
|
|
6256
|
+
|
|
6257
|
+
console.debug('[1] query error detected !! ', result, errorFields, errors['query']);
|
|
6238
6258
|
}
|
|
6239
6259
|
|
|
6240
6260
|
if ( !errors['query'] && _this.value == '' ) {
|
|
@@ -6304,6 +6324,7 @@ function FormValidatorUtil(data, $fields, xhrOptions, fieldsSet) {
|
|
|
6304
6324
|
|
|
6305
6325
|
var id = _this.target.id || _this.target.getAttribute('id');
|
|
6306
6326
|
console.debug('prematurely completed event `'+ 'asyncCompleted.' + id +'`');
|
|
6327
|
+
|
|
6307
6328
|
return triggerEvent(gina, _this.target, 'asyncCompleted.' + id, self[_this['name']]);
|
|
6308
6329
|
} // EO onResult
|
|
6309
6330
|
|
|
@@ -6526,7 +6547,7 @@ function FormValidatorUtil(data, $fields, xhrOptions, fieldsSet) {
|
|
|
6526
6547
|
//instance: self.serverInstance,
|
|
6527
6548
|
//template: (routeHasViews) ? conf.content.templates[templateName] : undefined,
|
|
6528
6549
|
//isUsingTemplate: local.isUsingTemplate,
|
|
6529
|
-
|
|
6550
|
+
isCacheless: conf.isCacheless //,
|
|
6530
6551
|
//path: params.param.path || null, // user custom path : namespace should be ignored | left blank
|
|
6531
6552
|
//assets: {}
|
|
6532
6553
|
};
|
|
@@ -6699,7 +6720,7 @@ function FormValidatorUtil(data, $fields, xhrOptions, fieldsSet) {
|
|
|
6699
6720
|
isValid = condition;
|
|
6700
6721
|
} else if (!isValid) {
|
|
6701
6722
|
var re = null, flags = null;
|
|
6702
|
-
// Fixed on 2021-03-13: $variable now replaced with real value beafore validation
|
|
6723
|
+
// Fixed added on 2021-03-13: $variable now replaced with real value beafore validation
|
|
6703
6724
|
if ( /[\!\=>\>\<a-z 0-9]+/i.test(condition) ) {
|
|
6704
6725
|
var variables = condition.match(/\${0}[-_,.\[\]a-z0-9]+/ig); // without space(s)
|
|
6705
6726
|
if (variables && variables.length > 0) {
|
|
@@ -7075,24 +7096,26 @@ function FormValidatorUtil(data, $fields, xhrOptions, fieldsSet) {
|
|
|
7075
7096
|
|
|
7076
7097
|
|
|
7077
7098
|
self[el]['toFloat'] = function(decimals) {
|
|
7078
|
-
|
|
7079
|
-
|
|
7080
|
-
|
|
7081
|
-
|
|
7082
|
-
|
|
7083
|
-
|
|
7084
|
-
|
|
7085
|
-
|
|
7086
|
-
|
|
7087
|
-
|
|
7088
|
-
|
|
7089
|
-
}
|
|
7090
|
-
|
|
7099
|
+
// Fixed on 2025-03-12
|
|
7100
|
+
// In case we are dealing with a filtered value (swig::formatNumber())
|
|
7101
|
+
var val = document.getElementById(this.target.getAttribute('id')).value || this.value
|
|
7102
|
+
isFloatingWithCommas = false
|
|
7103
|
+
;
|
|
7104
|
+
if ( typeof(val) == 'string' ) {
|
|
7105
|
+
val = val.replace(/\s+/g, '');
|
|
7106
|
+
// Fixed on 2025-03-12
|
|
7107
|
+
// thousand separator ?
|
|
7108
|
+
if ( /\,/.test(val) && /\./.test(val) ) {
|
|
7109
|
+
val = val.replace(/\,/g,'');
|
|
7110
|
+
}
|
|
7111
|
+
else if ( /\,/.test(val) ) {
|
|
7112
|
+
val = val.replace(/\,/g,'.');
|
|
7113
|
+
isFloatingWithCommas = true;
|
|
7091
7114
|
}
|
|
7092
7115
|
}
|
|
7093
7116
|
|
|
7094
|
-
|
|
7095
|
-
|
|
7117
|
+
local.data[this.name] = val;
|
|
7118
|
+
var errors = self[this['name']]['errors'] || {}
|
|
7096
7119
|
, isValid = true
|
|
7097
7120
|
;
|
|
7098
7121
|
|
|
@@ -7107,32 +7130,40 @@ function FormValidatorUtil(data, $fields, xhrOptions, fieldsSet) {
|
|
|
7107
7130
|
} else {
|
|
7108
7131
|
if ( this['isNumber']().valid ) {
|
|
7109
7132
|
try {
|
|
7110
|
-
|
|
7111
7133
|
if ( !Number.isFinite(val) ) {
|
|
7112
|
-
|
|
7134
|
+
// Number <> number
|
|
7135
|
+
val = new Number(parseFloat(val.match(/[0-9.,]+/g).join('').replace(/,/, '.')));
|
|
7113
7136
|
}
|
|
7114
|
-
if (isGFFCtx)
|
|
7115
|
-
this.target.setAttribute('value', val);
|
|
7116
7137
|
} catch(err) {
|
|
7117
7138
|
isValid = false;
|
|
7118
|
-
errors['toFloat'] = replace(this.error ||
|
|
7139
|
+
errors['toFloat'] = replace(this.error || local.errorLabels['toFloat'], this);
|
|
7119
7140
|
this.valid = false;
|
|
7120
7141
|
if ( errors.count() > 0 )
|
|
7121
7142
|
this['errors'] = errors;
|
|
7122
7143
|
}
|
|
7123
7144
|
} else {
|
|
7124
7145
|
isValid = false;
|
|
7125
|
-
errors['toFloat'] = replace(this.error ||
|
|
7146
|
+
errors['toFloat'] = replace(this.error || local.errorLabels['toFloatNAN'], this)
|
|
7126
7147
|
}
|
|
7127
7148
|
}
|
|
7128
7149
|
|
|
7129
7150
|
if (this['decimals'] && val && !errors['toFloat']) {
|
|
7130
|
-
|
|
7151
|
+
val = parseFloat(val.toFixed(this['decimals']));
|
|
7152
|
+
}
|
|
7153
|
+
|
|
7154
|
+
this.value = local.data[this.name] = val;
|
|
7155
|
+
if (isGFFCtx) {
|
|
7156
|
+
// restore original input format for display
|
|
7157
|
+
if (isFloatingWithCommas) {
|
|
7158
|
+
val = (''+val).replace(/\./g,',');
|
|
7159
|
+
}
|
|
7160
|
+
this.target.setAttribute('value', val);
|
|
7131
7161
|
}
|
|
7132
7162
|
|
|
7133
7163
|
this.valid = isValid;
|
|
7134
|
-
if ( errors.count() > 0 )
|
|
7164
|
+
if ( errors.count() > 0 ) {
|
|
7135
7165
|
this['errors'] = errors;
|
|
7166
|
+
}
|
|
7136
7167
|
|
|
7137
7168
|
return self[this.name]
|
|
7138
7169
|
}
|
|
@@ -7711,7 +7742,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
7711
7742
|
};
|
|
7712
7743
|
/*
|
|
7713
7744
|
* This file is part of the gina package.
|
|
7714
|
-
* Copyright (c) 2009-
|
|
7745
|
+
* Copyright (c) 2009-2025 Rhinostone <contact@gina.io>
|
|
7715
7746
|
*
|
|
7716
7747
|
* For the full copyright and license information, please view the LICENSE
|
|
7717
7748
|
* file that was distributed with this source code.
|
|
@@ -7727,7 +7758,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
7727
7758
|
|
|
7728
7759
|
function Routing() {
|
|
7729
7760
|
|
|
7730
|
-
var isGFFCtx = ((typeof (module) !== 'undefined') && module.exports) ? false :
|
|
7761
|
+
var isGFFCtx = ((typeof (module) !== 'undefined') && module.exports) ? false : true;
|
|
7731
7762
|
var self = {
|
|
7732
7763
|
allowedMethods: ['get', 'post', 'put', 'delete'],
|
|
7733
7764
|
reservedParams: ['controle', 'file','title', 'namespace', 'path'],
|
|
@@ -7782,7 +7813,7 @@ function Routing() {
|
|
|
7782
7813
|
urlProps.hostname = config.hostname;
|
|
7783
7814
|
if ( typeof(bundle) != 'undefined' ) {
|
|
7784
7815
|
// get from webroot
|
|
7785
|
-
_route =
|
|
7816
|
+
_route = this.getRoute('webroot@'+ bundle);
|
|
7786
7817
|
urlProps.hostname = _route.hostname;
|
|
7787
7818
|
urlProps.host = _route.host;
|
|
7788
7819
|
urlProps.webroot = _route.webroot;
|
|
@@ -7802,6 +7833,7 @@ function Routing() {
|
|
|
7802
7833
|
urlProps.hostname = config.envConf[bundle][env].hostname;
|
|
7803
7834
|
urlProps.host = config.envConf[bundle][env].host;
|
|
7804
7835
|
urlProps.webroot = config.envConf[bundle][env].server.webroot;
|
|
7836
|
+
console.debug("[self.getUrlProps][isProxyHost = "+ getContext('isProxyHost') +"] hostname ", config.envConf[bundle][env].hostname, vs, process.gina.PROXY_HOSTNAME);
|
|
7805
7837
|
}
|
|
7806
7838
|
|
|
7807
7839
|
return urlProps;
|
|
@@ -7883,9 +7915,11 @@ function Routing() {
|
|
|
7883
7915
|
return foundRoute;
|
|
7884
7916
|
}
|
|
7885
7917
|
|
|
7918
|
+
|
|
7886
7919
|
return await parseRouting(params, url, request, response, next);
|
|
7887
7920
|
};
|
|
7888
7921
|
|
|
7922
|
+
|
|
7889
7923
|
/**
|
|
7890
7924
|
* Check if rule has params
|
|
7891
7925
|
*
|
|
@@ -7969,13 +8003,13 @@ function Routing() {
|
|
|
7969
8003
|
++score;
|
|
7970
8004
|
continue;
|
|
7971
8005
|
}
|
|
7972
|
-
let _key = uRo[p].
|
|
8006
|
+
let _key = uRo[p].substring(1);
|
|
7973
8007
|
if ( typeof(params.requirements[_key]) == 'undefined' ) {
|
|
7974
8008
|
continue;
|
|
7975
8009
|
}
|
|
7976
8010
|
let condition = params.requirements[_key];
|
|
7977
8011
|
if ( /^\//.test(condition) ) {
|
|
7978
|
-
condition = condition.
|
|
8012
|
+
condition = condition.substring(1, condition.lastIndexOf('/')-1);
|
|
7979
8013
|
} else if ( /^validator\:\:/.test(condition) && await fitsWithRequirements(uRo[p], uRe[p], params, request, response, next) ) {
|
|
7980
8014
|
++score;
|
|
7981
8015
|
continue;
|
|
@@ -7986,7 +8020,7 @@ function Routing() {
|
|
|
7986
8020
|
&& new RegExp(condition).test(uRe[p])
|
|
7987
8021
|
) {
|
|
7988
8022
|
++score;
|
|
7989
|
-
request[method][uRo[p].
|
|
8023
|
+
request[method][uRo[p].substring(1)] = uRe[p];
|
|
7990
8024
|
}
|
|
7991
8025
|
}
|
|
7992
8026
|
hasAlreadyBeenScored = true;
|
|
@@ -8264,7 +8298,7 @@ function Routing() {
|
|
|
8264
8298
|
request[requestMethod] = {}
|
|
8265
8299
|
}
|
|
8266
8300
|
|
|
8267
|
-
key = _param[matched].
|
|
8301
|
+
key = _param[matched].substring(1);
|
|
8268
8302
|
// escaping `\` characters
|
|
8269
8303
|
// TODO - remove comment : all regex requirement must start with `/`
|
|
8270
8304
|
//regex = ( /\\/.test(params.requirements[key]) ) ? params.requirements[key].replace(/\\/, '') : params.requirements[key];
|
|
@@ -8366,7 +8400,7 @@ function Routing() {
|
|
|
8366
8400
|
} else if (c > (tplUrl.indexOf(keys[0]) + keys[0].length)) {
|
|
8367
8401
|
|
|
8368
8402
|
regex = params.requirements[keys[0]];
|
|
8369
|
-
urlVal = strVal.
|
|
8403
|
+
urlVal = strVal.substring(0, strVal.length);
|
|
8370
8404
|
|
|
8371
8405
|
if (/^\//.test(regex)) {
|
|
8372
8406
|
re = regex.match(/\/(.*)\//).pop();
|
|
@@ -8403,7 +8437,7 @@ function Routing() {
|
|
|
8403
8437
|
}
|
|
8404
8438
|
|
|
8405
8439
|
if (tested) {
|
|
8406
|
-
values[keys[0].
|
|
8440
|
+
values[keys[0].substring(1)] = urlVal
|
|
8407
8441
|
} else {
|
|
8408
8442
|
return false
|
|
8409
8443
|
}
|
|
@@ -8422,7 +8456,7 @@ function Routing() {
|
|
|
8422
8456
|
if (c == posLen - 1) {
|
|
8423
8457
|
|
|
8424
8458
|
regex = params.requirements[keys[0]];
|
|
8425
|
-
urlVal = strVal.
|
|
8459
|
+
urlVal = strVal.substring(0, strVal.length);
|
|
8426
8460
|
|
|
8427
8461
|
if (/^\//.test(regex)) {
|
|
8428
8462
|
re = regex.match(/\/(.*)\//).pop();
|
|
@@ -8435,7 +8469,7 @@ function Routing() {
|
|
|
8435
8469
|
}
|
|
8436
8470
|
|
|
8437
8471
|
if (tested) {
|
|
8438
|
-
values[keys[0].
|
|
8472
|
+
values[keys[0].substring(1)] = urlVal
|
|
8439
8473
|
} else {
|
|
8440
8474
|
return false
|
|
8441
8475
|
}
|
|
@@ -8471,7 +8505,7 @@ function Routing() {
|
|
|
8471
8505
|
if ( typeof(params) != 'undefined' && typeof(params[p]) == 'undefined' ) continue;
|
|
8472
8506
|
|
|
8473
8507
|
if ( /^:/.test(route.param[p]) ) {
|
|
8474
|
-
variable = route.param[p].
|
|
8508
|
+
variable = route.param[p].substring(1);
|
|
8475
8509
|
|
|
8476
8510
|
if ( typeof(params) != 'undefined' && typeof(params[variable]) != 'undefined' ) {
|
|
8477
8511
|
|
|
@@ -8526,7 +8560,7 @@ function Routing() {
|
|
|
8526
8560
|
p = 0;
|
|
8527
8561
|
pLen = rawUrlVars.length;
|
|
8528
8562
|
for (; p < pLen; p++) {
|
|
8529
|
-
pKey = rawUrlVars[p].
|
|
8563
|
+
pKey = rawUrlVars[p].substring(1);
|
|
8530
8564
|
if ( typeof(params[ pKey ]) != 'undefined' && params[ pKey ] ) {
|
|
8531
8565
|
rawUrlScore++;
|
|
8532
8566
|
}
|
|
@@ -8553,14 +8587,24 @@ function Routing() {
|
|
|
8553
8587
|
* */
|
|
8554
8588
|
self.getRoute = function(rule, params, urlIndex) {
|
|
8555
8589
|
|
|
8556
|
-
var config = null;
|
|
8590
|
+
var config = null, isProxyHost = false;
|
|
8557
8591
|
if (isGFFCtx) {
|
|
8592
|
+
if (
|
|
8593
|
+
!window.location.port
|
|
8594
|
+
&& window.location.hostname == window.gina.config.hostname.replace(/^(https|http|wss|ws)\:\/\//, '').replace(/\:\d+$/, '')
|
|
8595
|
+
) {
|
|
8596
|
+
isProxyHost = true;
|
|
8597
|
+
window.gina.config.hostname = window.gina.config.hostname.replace(/^(https|http|wss|ws)\:\/\//, '').replace(/\:\d+$/, '')
|
|
8598
|
+
}
|
|
8558
8599
|
config = window.gina.config;
|
|
8559
8600
|
} else {
|
|
8601
|
+
|
|
8560
8602
|
config = getContext('gina').config;
|
|
8561
8603
|
if ( typeof(getContext('argvFilename')) != 'undefined' ) {
|
|
8562
8604
|
config.getRouting = getContext('gina').Config.instance.getRouting;
|
|
8563
8605
|
}
|
|
8606
|
+
|
|
8607
|
+
isProxyHost = getContext('isProxyHost');
|
|
8564
8608
|
}
|
|
8565
8609
|
|
|
8566
8610
|
var env = config.env || GINA_ENV // by default, takes the current bundle
|
|
@@ -8605,6 +8649,25 @@ function Routing() {
|
|
|
8605
8649
|
var msg = null;
|
|
8606
8650
|
route = checkRouteParams(route, params);
|
|
8607
8651
|
|
|
8652
|
+
route.isProxyHost = isProxyHost;
|
|
8653
|
+
if (isProxyHost) {
|
|
8654
|
+
if (isGFFCtx) {
|
|
8655
|
+
route.proxy_hostname = window.location.protocol +'//'+ document.location.hostname;
|
|
8656
|
+
} else {
|
|
8657
|
+
route.proxy_hostname = process.gina.PROXY_HOSTNAME || config.envConf._proxyHostname;
|
|
8658
|
+
console.debug("[getRoute#1]["+isProxyHost+"] process.gina.PROXY_HOSTNAME ("+ process.gina.PROXY_HOSTNAME +") VS config.envConf._proxyHostname ("+ config.envConf._proxyHostname +")");
|
|
8659
|
+
}
|
|
8660
|
+
route.proxy_host = route.proxy_hostname.replace(/^(https|http)\:\/\//, '');
|
|
8661
|
+
|
|
8662
|
+
} else if (
|
|
8663
|
+
!isGFFCtx
|
|
8664
|
+
&& typeof(process.gina.PROXY_HOSTNAME) != 'undefined'
|
|
8665
|
+
) {
|
|
8666
|
+
route.proxy_hostname = process.gina.PROXY_HOSTNAME;
|
|
8667
|
+
route.proxy_host = route.proxy_hostname.replace(/^(https|http)\:\/\//, '');
|
|
8668
|
+
console.debug("[getRoute#2]["+isProxyHost+"] process.gina.PROXY_HOSTNAME ("+ process.gina.PROXY_HOSTNAME +") VS config.envConf._proxyHostname ("+ config.envConf._proxyHostname +")");
|
|
8669
|
+
}
|
|
8670
|
+
|
|
8608
8671
|
if ( /\,/.test(route.url) ) {
|
|
8609
8672
|
if ( typeof(route.urlIndex) != 'undefined' ) {
|
|
8610
8673
|
urlIndex = route.urlIndex; // set by checkRouteParams(route, params)
|
|
@@ -8617,7 +8680,7 @@ function Routing() {
|
|
|
8617
8680
|
// to prevent having a folder.
|
|
8618
8681
|
// eg.: {..., id: '/^\\s*$/'} => {..., id: ''} => /path/to/ becoming /path/to
|
|
8619
8682
|
if ( /\/$/.test(route.url) && route.url != '/' )
|
|
8620
|
-
route.url = route.url.
|
|
8683
|
+
route.url = route.url.substring(0, route.url.length-1);
|
|
8621
8684
|
|
|
8622
8685
|
// Completeting url with extra params e.g.: ?param1=val1¶m2=val2
|
|
8623
8686
|
if ( /GET/i.test(route.method) && typeof(params) != 'undefined' ) {
|
|
@@ -8674,18 +8737,30 @@ function Routing() {
|
|
|
8674
8737
|
}
|
|
8675
8738
|
|
|
8676
8739
|
var wroot = this.webroot || urlProps.webroot
|
|
8677
|
-
, hostname = this.hostname || urlProps.hostname
|
|
8678
|
-
, path = this.url
|
|
8740
|
+
, hostname = ''+this.hostname || ''+urlProps.hostname
|
|
8741
|
+
, path = ''+this.url
|
|
8679
8742
|
;
|
|
8743
|
+
if (this.isProxyHost) {
|
|
8744
|
+
hostname = ''+this.proxy_hostname;
|
|
8745
|
+
}
|
|
8746
|
+
|
|
8747
|
+
this.url = (
|
|
8748
|
+
typeof(ignoreWebRoot) != 'undefined'
|
|
8749
|
+
&& /^true$/i.test(ignoreWebRoot)
|
|
8750
|
+
) ? path.replace( new RegExp('^'+ wroot), '/') : path.replace( new RegExp('^('+wroot +'|\/$)'), wroot);
|
|
8751
|
+
|
|
8752
|
+
// this.url = (
|
|
8753
|
+
// typeof(ignoreWebRoot) != 'undefined'
|
|
8754
|
+
// && /^true$/i.test(ignoreWebRoot)
|
|
8755
|
+
// ) ? path.replace( new RegExp('\/'+ wroot), '/') : path;
|
|
8680
8756
|
|
|
8681
|
-
this.url = ( typeof(ignoreWebRoot) != 'undefined' && ignoreWebRoot == true ) ? path.replace(wroot, '/') : path;
|
|
8682
8757
|
|
|
8683
8758
|
return hostname + this.url
|
|
8684
8759
|
};
|
|
8685
8760
|
|
|
8686
8761
|
/**
|
|
8687
8762
|
* request current url
|
|
8688
|
-
*
|
|
8763
|
+
* Attention: You should first try without an authentification middleware
|
|
8689
8764
|
*
|
|
8690
8765
|
*
|
|
8691
8766
|
* @param {boolean} [ignoreWebRoot]
|
|
@@ -8710,6 +8785,10 @@ function Routing() {
|
|
|
8710
8785
|
, url = ( typeof(ignoreWebRoot) != 'undefined' && ignoreWebRoot == true ) ? path.replace(wroot, '/') : this.url || _this.url
|
|
8711
8786
|
;
|
|
8712
8787
|
|
|
8788
|
+
if ( /^\//.test(url) ) {
|
|
8789
|
+
url = hostname + url;
|
|
8790
|
+
}
|
|
8791
|
+
|
|
8713
8792
|
var scheme = ( /^https/.test(hostname) ) ? 'https' : 'http';
|
|
8714
8793
|
|
|
8715
8794
|
if (isGFFCtx) {
|
|
@@ -8792,12 +8871,13 @@ function Routing() {
|
|
|
8792
8871
|
return route
|
|
8793
8872
|
};
|
|
8794
8873
|
|
|
8874
|
+
// TODO - Remove this : deprecated && not used
|
|
8795
8875
|
var getFormatedRoute = function(route, url, hash) {
|
|
8796
8876
|
// fix url in case of empty param value allowed by the routing rule
|
|
8797
8877
|
// to prevent having a folder.
|
|
8798
8878
|
// eg.: {..., id: '/^\\s*$/'} => {..., id: ''} => /path/to/ becoming /path/to
|
|
8799
8879
|
if ( /\/$/.test(url) && url != '/' )
|
|
8800
|
-
url = url.
|
|
8880
|
+
url = url.substring(0, url.length-1);
|
|
8801
8881
|
// adding hash if found
|
|
8802
8882
|
if (hash)
|
|
8803
8883
|
url += hash;
|
|
@@ -8822,12 +8902,13 @@ function Routing() {
|
|
|
8822
8902
|
/**
|
|
8823
8903
|
* Get route by url
|
|
8824
8904
|
* N.B.: this will only work with rules declared with `GET` method property
|
|
8905
|
+
* ATTENTION !!! Not fully working for frontend because of unresolved promises !!!!
|
|
8825
8906
|
*
|
|
8826
8907
|
* @function getRouteByUrl
|
|
8827
8908
|
*
|
|
8828
8909
|
* @param {string} url e.g.: /webroot/some/url/path or http
|
|
8829
8910
|
* @param {string} [bundle] targeted bundle
|
|
8830
|
-
* @param {string} [method] request method (GET|PUT|PUT|DELETE) - GET is set by default
|
|
8911
|
+
* @param {string} [method] 2nd or 3rd - request method (GET|PUT|PUT|DELETE) - GET is set by default
|
|
8831
8912
|
* @param {object} [request]
|
|
8832
8913
|
* @param {boolean} [isOverridinMethod] // will replace request.method by the provided method - Used for redirections
|
|
8833
8914
|
*
|
|
@@ -8922,6 +9003,9 @@ function Routing() {
|
|
|
8922
9003
|
params: {},
|
|
8923
9004
|
url: url
|
|
8924
9005
|
};
|
|
9006
|
+
if (bundle) {
|
|
9007
|
+
request.bundle = bundle;
|
|
9008
|
+
}
|
|
8925
9009
|
} else {
|
|
8926
9010
|
|
|
8927
9011
|
var gnaCtx = getContext('gina');
|
|
@@ -9009,11 +9093,8 @@ function Routing() {
|
|
|
9009
9093
|
// normal case
|
|
9010
9094
|
//Parsing for the right url.
|
|
9011
9095
|
try {
|
|
9012
|
-
|
|
9013
9096
|
isRoute = self.compareUrls(params, routing[name].url, request);
|
|
9014
|
-
|
|
9015
9097
|
if (isRoute.past) {
|
|
9016
|
-
|
|
9017
9098
|
route = JSON.clone(routing[name]);
|
|
9018
9099
|
route.name = name;
|
|
9019
9100
|
|
|
@@ -9035,7 +9116,7 @@ function Routing() {
|
|
|
9035
9116
|
url == '#'
|
|
9036
9117
|
&& /GET/i.test(method)
|
|
9037
9118
|
&& isMethodProvidedByDefault
|
|
9038
|
-
||
|
|
9119
|
+
|| /^404\:/.test(url)
|
|
9039
9120
|
) {
|
|
9040
9121
|
url = location.pathname;
|
|
9041
9122
|
urlHasChanged = true;
|
|
@@ -9125,7 +9206,7 @@ function Routing() {
|
|
|
9125
9206
|
// to prevent having a folder.
|
|
9126
9207
|
// eg.: {..., id: '/^\\s*$/'} => {..., id: ''} => /path/to/ becoming /path/to
|
|
9127
9208
|
if ( /\/$/.test(url) && url != '/' )
|
|
9128
|
-
url = url.
|
|
9209
|
+
url = url.substring(0, url.length-1);
|
|
9129
9210
|
// adding hash if found
|
|
9130
9211
|
if (hash)
|
|
9131
9212
|
url += hash;
|
|
@@ -9152,6 +9233,12 @@ function Routing() {
|
|
|
9152
9233
|
}
|
|
9153
9234
|
|
|
9154
9235
|
if ((typeof (module) !== 'undefined') && module.exports) {
|
|
9236
|
+
|
|
9237
|
+
// Loading logger
|
|
9238
|
+
if ( typeof(console.err) == 'undefined' ) {
|
|
9239
|
+
console = require('../../logger');
|
|
9240
|
+
}
|
|
9241
|
+
|
|
9155
9242
|
// Publish as node.js module
|
|
9156
9243
|
module.exports = Routing()
|
|
9157
9244
|
} else if (typeof (define) === 'function' && define.amd) {
|
|
@@ -9689,7 +9776,7 @@ define("utils/effects", function(){});
|
|
|
9689
9776
|
|
|
9690
9777
|
/*
|
|
9691
9778
|
* This file is part of the gina package.
|
|
9692
|
-
* Copyright (c) 2009-
|
|
9779
|
+
* Copyright (c) 2009-2025 Rhinostone <contact@gina.io>
|
|
9693
9780
|
*
|
|
9694
9781
|
* For the full copyright and license information, please view the LICENSE
|
|
9695
9782
|
* file that was distributed with this source code.
|
|
@@ -10002,7 +10089,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
10002
10089
|
* @param {object} [ data ] // from request
|
|
10003
10090
|
* @param {string} [ formId ]
|
|
10004
10091
|
* */
|
|
10005
|
-
|
|
10092
|
+
function ValidatorPlugin(rules, data, formId) {
|
|
10006
10093
|
|
|
10007
10094
|
this.plugin = 'validator';
|
|
10008
10095
|
|
|
@@ -10112,6 +10199,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
10112
10199
|
'eventData' : {},
|
|
10113
10200
|
'target' : (isGFFCtx) ? document : null, // by default
|
|
10114
10201
|
'cachedErrors' : {},
|
|
10202
|
+
'lastFocused' : (isGFFCtx) ? [] : null,
|
|
10115
10203
|
'binded' : false,
|
|
10116
10204
|
'unbinded' : false,
|
|
10117
10205
|
'withUserBindings' : false,
|
|
@@ -10137,16 +10225,16 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
10137
10225
|
* */
|
|
10138
10226
|
var xhr = null;
|
|
10139
10227
|
var xhrOptions = {
|
|
10140
|
-
'url'
|
|
10141
|
-
'method'
|
|
10142
|
-
'isSynchrone'
|
|
10143
|
-
'withCredentials': false,
|
|
10144
|
-
'
|
|
10228
|
+
'url' : '',
|
|
10229
|
+
'method' : 'GET',
|
|
10230
|
+
'isSynchrone' : false,
|
|
10231
|
+
'withCredentials' : false,
|
|
10232
|
+
'withRateLimit' : true,
|
|
10233
|
+
'headers' : {
|
|
10145
10234
|
// to upload, use `multipart/form-data` for `enctype`
|
|
10146
10235
|
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
|
|
10147
10236
|
// cross domain is enabled by default, but you need to setup `Access-Control-Allow-Origin`
|
|
10148
10237
|
'X-Requested-With': 'XMLHttpRequest' // in case of cross domain origin
|
|
10149
|
-
|
|
10150
10238
|
}
|
|
10151
10239
|
};
|
|
10152
10240
|
|
|
@@ -10213,6 +10301,8 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
10213
10301
|
var setOptions = function (options) {
|
|
10214
10302
|
options = merge(options, xhrOptions);
|
|
10215
10303
|
xhrOptions = options;
|
|
10304
|
+
|
|
10305
|
+
return this;
|
|
10216
10306
|
}
|
|
10217
10307
|
|
|
10218
10308
|
|
|
@@ -10392,22 +10482,34 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
10392
10482
|
}
|
|
10393
10483
|
|
|
10394
10484
|
var refreshWarning = function($el) {
|
|
10395
|
-
var formId = $el.form.getAttribute('id');
|
|
10485
|
+
var formId = $el.form.id || $el.form.getAttribute('id');
|
|
10486
|
+
var elName = $el.name || $el.form.getAttribute('name');
|
|
10487
|
+
var currentElName = document.activeElement.name;
|
|
10396
10488
|
if ( /^true$/i.test(instance.$forms[formId].isValidating) ) {
|
|
10397
10489
|
return;
|
|
10398
10490
|
}
|
|
10399
10491
|
|
|
10400
|
-
var $parent
|
|
10401
|
-
|
|
10492
|
+
var $parent = $el.parentNode
|
|
10493
|
+
, isErrorMessageHidden = false
|
|
10494
|
+
, $children = $parent.getElementsByTagName('div')
|
|
10495
|
+
;
|
|
10402
10496
|
|
|
10403
|
-
if ( /form\-item\-warning/.test($parent.className) ) {
|
|
10497
|
+
if ( /form\-item\-warning/.test($parent.className) && currentElName != elName ) {
|
|
10404
10498
|
$parent.className = $parent.className.replace(/form\-item\-warning/, 'form-item-error');
|
|
10405
10499
|
|
|
10406
|
-
} else if (/form\-item\-error/.test($parent.className) ) {
|
|
10500
|
+
} else if (/form\-item\-error/.test($parent.className) && currentElName == elName ) {
|
|
10407
10501
|
$parent.className = $parent.className.replace(/form\-item\-error/, 'form-item-warning');
|
|
10408
10502
|
isErrorMessageHidden = true;
|
|
10409
10503
|
}
|
|
10410
10504
|
|
|
10505
|
+
// Fixed on 2025-03-16
|
|
10506
|
+
if (
|
|
10507
|
+
/^true$/i.test(instance.$forms[formId].isValidating)
|
|
10508
|
+
&& !isErrorMessageHidden
|
|
10509
|
+
) {
|
|
10510
|
+
return;
|
|
10511
|
+
}
|
|
10512
|
+
|
|
10411
10513
|
|
|
10412
10514
|
for (var c = 0, cLen = $children.length; c<cLen; ++c) {
|
|
10413
10515
|
if ( /form\-item\-error\-message/.test($children[c].className) ) {
|
|
@@ -10429,7 +10531,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
10429
10531
|
* @param {object} $form - Target (HTMLFormElement)
|
|
10430
10532
|
* @param {object} errors
|
|
10431
10533
|
* @param {object|null} data
|
|
10432
|
-
* @param {
|
|
10534
|
+
* @param {string|null} [fileName]
|
|
10433
10535
|
*/
|
|
10434
10536
|
var liveCheckErrors = {}; // Per Form & Per Element
|
|
10435
10537
|
var handleErrorsDisplay = function($form, errors, data, fieldName) {
|
|
@@ -10460,7 +10562,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
10460
10562
|
if ( typeof(liveCheckErrors[formId]) == 'undefined') {
|
|
10461
10563
|
liveCheckErrors[formId] = {};
|
|
10462
10564
|
}
|
|
10463
|
-
if (errors.count() > 0) {
|
|
10565
|
+
if (errors && errors.count() > 0) {
|
|
10464
10566
|
// reset field name
|
|
10465
10567
|
liveCheckErrors[formId][fieldName] = {};
|
|
10466
10568
|
// override
|
|
@@ -10470,8 +10572,29 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
10470
10572
|
}
|
|
10471
10573
|
errors = liveCheckErrors[formId];
|
|
10472
10574
|
// only if the form has not been sent yet
|
|
10473
|
-
if (
|
|
10575
|
+
if (
|
|
10576
|
+
!instance.$forms[formId].sent
|
|
10577
|
+
||
|
|
10578
|
+
instance.$forms[formId].isValidating
|
|
10579
|
+
) {
|
|
10474
10580
|
isWarning = true;
|
|
10581
|
+
// Fixed on 2025-03-16
|
|
10582
|
+
var lastFocused = instance.$forms[formId].lastFocused;
|
|
10583
|
+
// console.debug('fieldName: '+ fieldName + '\nactiveElement: '+ document.activeElement.getAttribute('name') +'\nlastFocused: ', lastFocused);
|
|
10584
|
+
if (
|
|
10585
|
+
lastFocused.length > 0
|
|
10586
|
+
&& typeof(lastFocused[1]) != 'undefined'
|
|
10587
|
+
&& lastFocused[1].name == fieldName
|
|
10588
|
+
||
|
|
10589
|
+
lastFocused.length > 0
|
|
10590
|
+
&& !lastFocused[1]
|
|
10591
|
+
&& document.activeElement.getAttribute('name') != lastFocused[0].name
|
|
10592
|
+
||
|
|
10593
|
+
document.activeElement.getAttribute('name') != fieldName
|
|
10594
|
+
) {
|
|
10595
|
+
isWarning = false;
|
|
10596
|
+
}
|
|
10597
|
+
// console.debug('isWarning: '+isWarning);
|
|
10475
10598
|
}
|
|
10476
10599
|
} else {
|
|
10477
10600
|
if ( typeof(liveCheckErrors[formId][fieldName]) != 'undefined') {
|
|
@@ -10535,7 +10658,11 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
10535
10658
|
|
|
10536
10659
|
if (!name) continue;
|
|
10537
10660
|
|
|
10538
|
-
if (
|
|
10661
|
+
if (
|
|
10662
|
+
errors
|
|
10663
|
+
&& typeof(errors[name]) != 'undefined'
|
|
10664
|
+
&& !/(form\-item\-error|form\-item\-warning)/.test($parent.className)
|
|
10665
|
+
) {
|
|
10539
10666
|
|
|
10540
10667
|
if (isWarning) {
|
|
10541
10668
|
// adding warning class
|
|
@@ -10576,7 +10703,24 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
10576
10703
|
|
|
10577
10704
|
|
|
10578
10705
|
|
|
10579
|
-
} else if (
|
|
10706
|
+
} else if (
|
|
10707
|
+
errors
|
|
10708
|
+
&& typeof(errors[name]) == 'undefined'
|
|
10709
|
+
&& /(form\-item\-error|form\-item\-warning)/.test($parent.className)
|
|
10710
|
+
||
|
|
10711
|
+
errors
|
|
10712
|
+
&& typeof(errors[name]) != 'undefined' && errors[name].count() == 0
|
|
10713
|
+
&& /(form\-item\-error|form\-item\-warning)/.test($parent.className)
|
|
10714
|
+
) {
|
|
10715
|
+
// Fixed on 2025-03-10
|
|
10716
|
+
// targeted field must be the active element
|
|
10717
|
+
// if (
|
|
10718
|
+
// document.activeElement.getAttribute('name') != fieldName
|
|
10719
|
+
// && errors.count() > 0
|
|
10720
|
+
// ) {
|
|
10721
|
+
// break
|
|
10722
|
+
// }
|
|
10723
|
+
console.debug('[handleErrorsDisplay] Resetting when not in error');
|
|
10580
10724
|
// reset when not in error
|
|
10581
10725
|
// remove child elements
|
|
10582
10726
|
var $children = $parent.getElementsByTagName('div');
|
|
@@ -10590,16 +10734,34 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
10590
10734
|
|
|
10591
10735
|
$parent.className = $parent.className.replace(/(\s+form\-item\-error|form\-item\-error|\s+form\-item\-warning|form\-item\-warning)/, '');
|
|
10592
10736
|
|
|
10593
|
-
} else if (
|
|
10737
|
+
} else if (
|
|
10738
|
+
errors.count() > 0
|
|
10739
|
+
&& typeof(errors[name]) != 'undefined'
|
|
10740
|
+
&& errAttr
|
|
10741
|
+
) {
|
|
10594
10742
|
// refreshing already displayed error on msg update
|
|
10595
10743
|
var $divs = $parent.getElementsByTagName('div');
|
|
10596
10744
|
for (var d = 0, dLen = $divs.length; d<dLen; ++d) {
|
|
10597
|
-
|
|
10745
|
+
// Fixed on 2025-03-05: className can have more than one !!
|
|
10746
|
+
let foundMessage = $divs[d].className.match("form-item-error-message");
|
|
10747
|
+
if (
|
|
10748
|
+
foundMessage
|
|
10749
|
+
&& typeof(foundMessage.length) != 'undefined'
|
|
10750
|
+
&& foundMessage.length > 0
|
|
10751
|
+
) {
|
|
10598
10752
|
|
|
10599
10753
|
$divs[d].parentElement.removeChild($divs[d]);
|
|
10600
10754
|
$err = document.createElement('div');
|
|
10601
10755
|
$err.setAttribute('class', 'form-item-error-message');
|
|
10602
10756
|
|
|
10757
|
+
// Fixed on 2025-03-09: className cleanup
|
|
10758
|
+
if (
|
|
10759
|
+
!isWarning
|
|
10760
|
+
&& /(\s+form\-item\-warning|form\-item\-warning)/.test($parent.className)
|
|
10761
|
+
) {
|
|
10762
|
+
$parent.className = $parent.className.replace(/(\s+form\-item\-warning|form\-item\-warning)/, ' form-item-error');
|
|
10763
|
+
}
|
|
10764
|
+
|
|
10603
10765
|
// injecting error messages
|
|
10604
10766
|
// {
|
|
10605
10767
|
// field: {
|
|
@@ -10624,12 +10786,17 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
10624
10786
|
}
|
|
10625
10787
|
}
|
|
10626
10788
|
|
|
10627
|
-
if ($err && $target.type != 'hidden')
|
|
10789
|
+
if ($err && $target.type != 'hidden') {
|
|
10628
10790
|
insertAfter($target, $err);
|
|
10629
|
-
|
|
10791
|
+
}
|
|
10630
10792
|
}
|
|
10631
10793
|
|
|
10632
|
-
if (
|
|
10794
|
+
if (
|
|
10795
|
+
typeof(fieldName) != 'undefined'
|
|
10796
|
+
&& fieldName === $el.name
|
|
10797
|
+
) {
|
|
10798
|
+
break;
|
|
10799
|
+
}
|
|
10633
10800
|
}
|
|
10634
10801
|
|
|
10635
10802
|
|
|
@@ -10753,7 +10920,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
10753
10920
|
, value = null // current value
|
|
10754
10921
|
, defaultValue = null
|
|
10755
10922
|
;
|
|
10756
|
-
|
|
10923
|
+
$form.isBeingReseted = true;
|
|
10757
10924
|
for (var f in $form.fieldsSet) {
|
|
10758
10925
|
|
|
10759
10926
|
$element = document.getElementById(f);
|
|
@@ -10790,6 +10957,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
10790
10957
|
}
|
|
10791
10958
|
|
|
10792
10959
|
}
|
|
10960
|
+
delete $form.isBeingReseted;
|
|
10793
10961
|
}
|
|
10794
10962
|
|
|
10795
10963
|
return $form
|
|
@@ -10824,31 +10992,41 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
10824
10992
|
*
|
|
10825
10993
|
*
|
|
10826
10994
|
* @param {object} data - FormData object (https://developer.mozilla.org/en-US/docs/Web/API/FormData/Using_FormData_Objects)
|
|
10827
|
-
* @param {object} [ options ] : { isSynchrone:
|
|
10995
|
+
* @param {object} [ options ] : { isSynchrone: false, withCredentials: true, withRateLimit: true }
|
|
10828
10996
|
* */
|
|
10829
10997
|
var send = function(data, options) {
|
|
10830
10998
|
|
|
10831
10999
|
|
|
10832
11000
|
var $target = this.target , id = $target.getAttribute('id');
|
|
10833
11001
|
var $form = instance.$forms[id] || this;
|
|
11002
|
+
var $submitTrigger = document.getElementById($form.submitTrigger) || null;
|
|
10834
11003
|
var result = null;
|
|
10835
11004
|
var XHRData = null;
|
|
10836
11005
|
var isAttachment = null; // handle download
|
|
10837
11006
|
var hFormIsRequired = null;
|
|
10838
11007
|
|
|
11008
|
+
options = (typeof (options) != 'undefined') ? merge(options, xhrOptions) : xhrOptions;
|
|
11009
|
+
|
|
11010
|
+
// Rate Limit to one request at the time
|
|
11011
|
+
// Attention: this should be an option
|
|
11012
|
+
// the request needs to be completed before another can be made
|
|
11013
|
+
// TODO - Check same url
|
|
10839
11014
|
if (
|
|
10840
|
-
|
|
11015
|
+
/^true$/i.test(options.withRateLimit)
|
|
11016
|
+
&& typeof($form.isSending) != 'undefined'
|
|
10841
11017
|
&& /^true$/i.test($form.isSending)
|
|
10842
11018
|
||
|
|
10843
|
-
|
|
11019
|
+
/^true$/i.test(options.withRateLimit)
|
|
11020
|
+
&& typeof($form.sent) != 'undefined'
|
|
10844
11021
|
&& /^true$/i.test($form.sent)
|
|
10845
11022
|
) {
|
|
10846
11023
|
return;
|
|
10847
11024
|
}
|
|
11025
|
+
|
|
10848
11026
|
instance.$forms[id].isSending = true;
|
|
10849
11027
|
|
|
10850
11028
|
|
|
10851
|
-
|
|
11029
|
+
|
|
10852
11030
|
// `x-gina-form`definition
|
|
10853
11031
|
//options.headers['X-Gina-Form-Location'] = gina.config.bundle;
|
|
10854
11032
|
if ( typeof($form.id) != 'undefined' ) {
|
|
@@ -10952,20 +11130,43 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
10952
11130
|
|
|
10953
11131
|
if (xhr) {
|
|
10954
11132
|
// catching ready state cb
|
|
11133
|
+
// Data loading ...
|
|
11134
|
+
if ( /^(1|3)$/.test(xhr.readyState) ) {
|
|
11135
|
+
$form.target.setAttribute('data-gina-form-loading', true);
|
|
11136
|
+
if ($submitTrigger) {
|
|
11137
|
+
// For A tag: aria-disabled=true
|
|
11138
|
+
if ( /^A$/i.test($submitTrigger.tagName) ) {
|
|
11139
|
+
$submitTrigger.setAttribute('aria-disabled', true);
|
|
11140
|
+
} else {
|
|
11141
|
+
$submitTrigger.setAttribute('disabled', true);
|
|
11142
|
+
}
|
|
11143
|
+
}
|
|
11144
|
+
}
|
|
10955
11145
|
//handleXhrResponse(xhr, $target, id, $form, hFormIsRequired);
|
|
10956
11146
|
xhr.onreadystatechange = function onValidationCallback(event) {
|
|
10957
11147
|
$form.isSubmitting = false;
|
|
10958
11148
|
$form.isSending = false;
|
|
10959
11149
|
|
|
10960
11150
|
// limit send trigger to 1 sec to prevent from double clicks
|
|
10961
|
-
setTimeout( function onSent() {
|
|
10962
|
-
|
|
10963
|
-
}, 1000);
|
|
10964
|
-
|
|
11151
|
+
// setTimeout( function onSent() {
|
|
11152
|
+
// $form.sent = false;
|
|
11153
|
+
// }, 1000); // 1000
|
|
11154
|
+
|
|
11155
|
+
// Data loading ...
|
|
11156
|
+
if ( /^(1|3)$/.test(xhr.readyState) ) {
|
|
11157
|
+
$form.target.setAttribute('data-gina-form-loading', true);
|
|
11158
|
+
// For A tag: aria-disabled=true
|
|
11159
|
+
if ( /^A$/i.test($submitTrigger.tagName) ) {
|
|
11160
|
+
$submitTrigger.setAttribute('aria-disabled', true);
|
|
11161
|
+
} else {
|
|
11162
|
+
$submitTrigger.setAttribute('disabled', true);
|
|
11163
|
+
}
|
|
11164
|
+
}
|
|
10965
11165
|
// In case the user is also redirecting
|
|
10966
11166
|
var redirectDelay = (/Google Inc/i.test(navigator.vendor)) ? 50 : 0;
|
|
10967
11167
|
|
|
10968
|
-
|
|
11168
|
+
// responseType interception
|
|
11169
|
+
if (xhr.readyState == 2) {
|
|
10969
11170
|
isAttachment = ( /^attachment\;/.test( xhr.getResponseHeader("Content-Disposition") ) ) ? true : false;
|
|
10970
11171
|
// force blob response type
|
|
10971
11172
|
if ( !xhr.responseType && isAttachment ) {
|
|
@@ -10974,6 +11175,18 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
10974
11175
|
}
|
|
10975
11176
|
|
|
10976
11177
|
if (xhr.readyState == 4) {
|
|
11178
|
+
|
|
11179
|
+
$form.sent = false;
|
|
11180
|
+
if ($submitTrigger) {
|
|
11181
|
+
// For A tag: aria-disabled=true
|
|
11182
|
+
if ( /^A$/i.test($submitTrigger.tagName) ) {
|
|
11183
|
+
$submitTrigger.removeAttribute('aria-disabled', true);
|
|
11184
|
+
} else {
|
|
11185
|
+
$submitTrigger.removeAttribute('disabled', true);
|
|
11186
|
+
}
|
|
11187
|
+
}
|
|
11188
|
+
$form.target.removeAttribute('data-gina-form-loading');
|
|
11189
|
+
|
|
10977
11190
|
var $popin = null;
|
|
10978
11191
|
var blob = null;
|
|
10979
11192
|
var contentType = xhr.getResponseHeader("Content-Type");
|
|
@@ -10999,7 +11212,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
10999
11212
|
var url = window.URL.createObjectURL(blob);
|
|
11000
11213
|
a.href = url;
|
|
11001
11214
|
var contentDisposition = xhr.getResponseHeader("Content-Disposition");
|
|
11002
|
-
a.download = contentDisposition.match('\=(.*)')[0].
|
|
11215
|
+
a.download = contentDisposition.match('\=(.*)')[0].substring(1);
|
|
11003
11216
|
//programatically click the link to trigger the download
|
|
11004
11217
|
a.click();
|
|
11005
11218
|
|
|
@@ -11018,7 +11231,9 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
11018
11231
|
size : blob.size
|
|
11019
11232
|
}
|
|
11020
11233
|
|
|
11021
|
-
}
|
|
11234
|
+
}
|
|
11235
|
+
// normal case
|
|
11236
|
+
else {
|
|
11022
11237
|
result = xhr.responseText;
|
|
11023
11238
|
}
|
|
11024
11239
|
|
|
@@ -11027,9 +11242,14 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
11027
11242
|
if ( /\/json/.test( contentType ) ) {
|
|
11028
11243
|
result = JSON.parse(xhr.responseText);
|
|
11029
11244
|
|
|
11030
|
-
if ( typeof(result.status) == 'undefined' )
|
|
11245
|
+
if ( typeof(result.status) == 'undefined' ) {
|
|
11031
11246
|
result.status = xhr.status;
|
|
11032
|
-
|
|
11247
|
+
}
|
|
11248
|
+
// Fixed on 2025-03-13 Allowing toolbar to ubdate after xhr results
|
|
11249
|
+
// TODO - Allowing to revert to previously loaded data via a close button
|
|
11250
|
+
if (gina && envIsDev && typeof(window.ginaToolbar) && typeof(result) != 'undefined') {
|
|
11251
|
+
window.ginaToolbar.update('data-xhr', result);
|
|
11252
|
+
}
|
|
11033
11253
|
}
|
|
11034
11254
|
|
|
11035
11255
|
if ( /\/html/.test( contentType ) ) {
|
|
@@ -11260,6 +11480,13 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
11260
11480
|
// } else { // external - need to remove `X-Requested-With` from `options.headers`
|
|
11261
11481
|
result.location = (!/^http/.test(result.location) && !/^\//.test(result.location) ) ? location.protocol +'//' + result.location : result.location;
|
|
11262
11482
|
//}
|
|
11483
|
+
// isProxyHost ?
|
|
11484
|
+
if (
|
|
11485
|
+
result.location.replace(/^http(.*)\:\d+/, '$1').replace(/^\:\/\//, '').split(/\//g)[0] == gina.config.hostname
|
|
11486
|
+
&& gina.config.hostname == window.location.host
|
|
11487
|
+
) {
|
|
11488
|
+
result.location = location.protocol + result.location.replace(/^http(.*)\:\d+/, '$1').replace(/^\:/, '')
|
|
11489
|
+
}
|
|
11263
11490
|
|
|
11264
11491
|
return setTimeout(() => {
|
|
11265
11492
|
window.location.href = result.location;
|
|
@@ -11471,9 +11698,12 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
11471
11698
|
|
|
11472
11699
|
$form.eventData.ontimeout = result;
|
|
11473
11700
|
|
|
11701
|
+
$form.target.setAttribute('data-gina-form-loading', false);
|
|
11702
|
+
|
|
11474
11703
|
// intercept upload
|
|
11475
|
-
if ( /^gina\-upload/i.test(id) )
|
|
11704
|
+
if ( /^gina\-upload/i.test(id) ) {
|
|
11476
11705
|
onUpload(gina, $target, 'error', id, result);
|
|
11706
|
+
}
|
|
11477
11707
|
|
|
11478
11708
|
triggerEvent(gina, $target, 'error.' + id, result);
|
|
11479
11709
|
|
|
@@ -11889,7 +12119,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
11889
12119
|
filesToBeRemoved.push(childNodeFilePreview);
|
|
11890
12120
|
}
|
|
11891
12121
|
} else {
|
|
11892
|
-
let file = childNodes[i].src.
|
|
12122
|
+
let file = childNodes[i].src.substring(childNodes[i].src.lastIndexOf('/')+1);
|
|
11893
12123
|
childNodeFile = file;
|
|
11894
12124
|
filesToBeRemoved.push(childNodeFile);
|
|
11895
12125
|
}
|
|
@@ -12325,7 +12555,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
12325
12555
|
for (let m = 0, mLen = mergingRules.length; m < mLen; m++) {
|
|
12326
12556
|
if ( re.test(mergingRules[m]) ) {
|
|
12327
12557
|
let tmpStr = JSON.stringify(rule);
|
|
12328
|
-
tmpStr = tmpStr.
|
|
12558
|
+
tmpStr = tmpStr.substring(1, tmpStr.length-1);// removing ->{ ... }<-
|
|
12329
12559
|
// is last ?
|
|
12330
12560
|
if (m < mLen-1) {
|
|
12331
12561
|
tmpStr += ','
|
|
@@ -13092,7 +13322,14 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
13092
13322
|
|
|
13093
13323
|
var processEvent = function() {
|
|
13094
13324
|
|
|
13095
|
-
|
|
13325
|
+
// if ( typeof($form.isBeingReseted) != 'undefined' && /^true$/.test($form.isBeingReseted) ) {
|
|
13326
|
+
// handleErrorsDisplay(event.target.form, {}, null, event.target.name);
|
|
13327
|
+
// return cancelEvent(event);
|
|
13328
|
+
// }
|
|
13329
|
+
|
|
13330
|
+
if ( !/^(password)$/i.test(event.target.type) ) {
|
|
13331
|
+
console.debug('processing: ' + event.target.name+ '/'+ event.target.id);
|
|
13332
|
+
}
|
|
13096
13333
|
|
|
13097
13334
|
// Do not validate `onChange` if `input value` === `orignal value`
|
|
13098
13335
|
// Or else, you will get an endless loop
|
|
@@ -13110,7 +13347,6 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
13110
13347
|
} else {
|
|
13111
13348
|
handleErrorsDisplay(event.target.form, errors, null, event.target.name);
|
|
13112
13349
|
}
|
|
13113
|
-
//return cancelEvent(event);
|
|
13114
13350
|
}
|
|
13115
13351
|
|
|
13116
13352
|
|
|
@@ -13120,7 +13356,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
13120
13356
|
|
|
13121
13357
|
instance.$forms[event.target.form.getAttribute('id')].isValidating = true;
|
|
13122
13358
|
validate(event.target, localField, $localField, $form.rules, function onLiveValidation(result){
|
|
13123
|
-
instance.$forms[event.target.form.getAttribute('id')].isValidating = false;
|
|
13359
|
+
// instance.$forms[event.target.form.getAttribute('id')].isValidating = false;
|
|
13124
13360
|
//console.debug('validation on processEvent(...) ', result);
|
|
13125
13361
|
|
|
13126
13362
|
var isFormValid = result.isValid();
|
|
@@ -13146,8 +13382,10 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
13146
13382
|
instance.$forms[formId].isValidating = true;
|
|
13147
13383
|
validate($gForm, gFields, $gFields, gRules, function onSilentGlobalLiveValidation(gResult){
|
|
13148
13384
|
instance.$forms[formId].isValidating = false;
|
|
13149
|
-
console.debug('['+ formId +'] onSilentGlobalLiveValidation: '+ gResult.isValid(), gResult);
|
|
13385
|
+
console.debug('['+ formId +'] onSilentGlobalLiveValidation: '+ gResult.isValid(), gResult, gFields);
|
|
13386
|
+
// var isFormValid = ( gResult.isValid() && instance.$forms[formId].errors && instance.$forms[formId].errors.count() == 0 )? true : false;
|
|
13150
13387
|
var isFormValid = gResult.isValid();
|
|
13388
|
+
// var isFormValid = gResult.isValid();
|
|
13151
13389
|
if ( envIsDev && isGFFCtx && typeof(window.ginaToolbar) != 'undefined' && window.ginaToolbar ) {
|
|
13152
13390
|
// update toolbar
|
|
13153
13391
|
if (!gina.forms.errors)
|
|
@@ -13162,6 +13400,27 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
13162
13400
|
}
|
|
13163
13401
|
|
|
13164
13402
|
|
|
13403
|
+
if ( !isFormValid && gResult.error ) {
|
|
13404
|
+
// Fixed on 2025-03-16 - we need past and live errors
|
|
13405
|
+
instance.$forms[ $el.form.getAttribute('id') ].errors = merge(result.error, gResult.error);
|
|
13406
|
+
// Fixed on 2025-03-16
|
|
13407
|
+
for (let eField in gResult.error) {
|
|
13408
|
+
refreshWarning($gFields[eField]);
|
|
13409
|
+
handleErrorsDisplay($gForm, gResult.error, gResult.data, eField);
|
|
13410
|
+
}
|
|
13411
|
+
}
|
|
13412
|
+
// Fixed on 2025-03-16
|
|
13413
|
+
// Eg.: input select change impacting another element: solve `no more errors`
|
|
13414
|
+
else if ( instance.$forms[formId].errors && !instance.$forms[formId].errors.count() ) {
|
|
13415
|
+
// recheck if valid
|
|
13416
|
+
//resetting error display
|
|
13417
|
+
instance.$forms[ formId ].errors = {};
|
|
13418
|
+
console.debug('resetting field: '+ $el.name);
|
|
13419
|
+
liveCheckErrors[formId] = {};
|
|
13420
|
+
// $form.dataset.ginaFormIsResetting = true;
|
|
13421
|
+
handleErrorsDisplay($gForm, {}, null, $el.name);
|
|
13422
|
+
}
|
|
13423
|
+
|
|
13165
13424
|
updateSubmitTriggerState( $gForm, isFormValid);
|
|
13166
13425
|
|
|
13167
13426
|
once = false;
|
|
@@ -13195,13 +13454,16 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
13195
13454
|
// other inputs & textareas
|
|
13196
13455
|
else if ( /^focusin\./i.test(event.type) ) {
|
|
13197
13456
|
if ( /\-error/.test($el.parentNode.className) ) {
|
|
13198
|
-
console.debug('#1 you just focusin ....'+$el.id, $el.value);
|
|
13457
|
+
console.debug('#1 you just focusin ....'+$el.id, $el.value, instance.$forms[ $el.form.getAttribute('id') ].isValidating);
|
|
13199
13458
|
refreshWarning($el);
|
|
13200
13459
|
}
|
|
13201
13460
|
}
|
|
13202
13461
|
else if ( /^focusout\./i.test(event.type) ) {
|
|
13203
13462
|
if ( /\-warning/.test($el.parentNode.className) ) {
|
|
13204
13463
|
console.debug('#1 you just focusout ....'+$el.id, $el.value);
|
|
13464
|
+
// Removed on 2025-03-16
|
|
13465
|
+
instance.$forms[ $el.form.getAttribute('id') ].isValidating = false;
|
|
13466
|
+
|
|
13205
13467
|
refreshWarning($el);
|
|
13206
13468
|
// in case error context is changed by another task
|
|
13207
13469
|
handleErrorsDisplay($el.form, instance.$forms[ $el.form.getAttribute('id') ].errors, null, $el.name);
|
|
@@ -13210,12 +13472,86 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
13210
13472
|
else if ( /^keyup\./i.test(event.type) ) {
|
|
13211
13473
|
$el.ginaFormValidatorTestedValue = $el.value;
|
|
13212
13474
|
liveCheckTimer = setTimeout( function onLiveCheckTimer() {
|
|
13213
|
-
//
|
|
13214
|
-
if ( ['91', '17'].indexOf(''+event.keyCode) > -1 && keyboardMapping.count() == 0) {
|
|
13475
|
+
// Do not trigger for copy/paste events
|
|
13476
|
+
if ( ['91', '17', '16'].indexOf(''+event.keyCode) > -1 && keyboardMapping.count() == 0) {
|
|
13215
13477
|
//console.debug('mapping ', keyboardMapping);
|
|
13216
13478
|
return;
|
|
13217
13479
|
}
|
|
13218
|
-
|
|
13480
|
+
|
|
13481
|
+
// Fixed on 2025-03-16:
|
|
13482
|
+
// Treat TAB as focus in/out
|
|
13483
|
+
// if ( ['9'].indexOf(''+event.keyCode) > -1 ) {
|
|
13484
|
+
|
|
13485
|
+
// console.debug('[TAB] you just focusout from "'+ instance.$forms[ $el.form.getAttribute('id') ].lastFocused[1].id +'" to "'+ $el.id +'"');
|
|
13486
|
+
// var $gForm = event.target.form, gFields = null, $gFields = null, gRules = null;
|
|
13487
|
+
// var gValidatorInfos = getFormValidationInfos($gForm, rules);
|
|
13488
|
+
// gFields = gValidatorInfos.fields;
|
|
13489
|
+
// $gFields = gValidatorInfos.$fields;
|
|
13490
|
+
// var formId = $gForm.getAttribute('id');
|
|
13491
|
+
// gRules = instance.$forms[formId].rules;
|
|
13492
|
+
// // Don't be tempted to revome fields that has already been validated
|
|
13493
|
+
// instance.$forms[formId].isValidating = true;
|
|
13494
|
+
// validate($gForm, gFields, $gFields, gRules, function onSilentGlobalLiveValidation(gResult){
|
|
13495
|
+
// instance.$forms[formId].isValidating = false;
|
|
13496
|
+
// console.debug('['+ formId +'] [9] onSilentGlobalLiveValidation: '+ gResult.isValid(), gResult, gFields);
|
|
13497
|
+
// var isFormValid = ( gResult.isValid() && instance.$forms[formId].errors && instance.$forms[formId].errors.count() == 0 )? true : false;
|
|
13498
|
+
// // var isFormValid = gResult.isValid();
|
|
13499
|
+
// if ( envIsDev && isGFFCtx && typeof(window.ginaToolbar) != 'undefined' && window.ginaToolbar ) {
|
|
13500
|
+
// // update toolbar
|
|
13501
|
+
// if (!gina.forms.errors)
|
|
13502
|
+
// gina.forms.errors = {};
|
|
13503
|
+
|
|
13504
|
+
// var objCallback = {
|
|
13505
|
+
// id : formId,
|
|
13506
|
+
// errors : gResult.error || {}
|
|
13507
|
+
// };
|
|
13508
|
+
|
|
13509
|
+
// window.ginaToolbar.update('forms', objCallback);
|
|
13510
|
+
// }
|
|
13511
|
+
|
|
13512
|
+
|
|
13513
|
+
// if ( !isFormValid && gResult.error ) {
|
|
13514
|
+
// // Fixed on 2025-03-16 - we need past and live errors
|
|
13515
|
+
// instance.$forms[ $el.form.getAttribute('id') ].errors = merge(result.error, gResult.error);
|
|
13516
|
+
// // Fixed on 2025-03-16
|
|
13517
|
+
// for (let eField in instance.$forms[ $el.form.getAttribute('id') ].errors) {
|
|
13518
|
+
// refreshWarning($gFields[eField]);
|
|
13519
|
+
// handleErrorsDisplay($gForm, instance.$forms[ $el.form.getAttribute('id') ].errors, gResult.data, eField);
|
|
13520
|
+
// }
|
|
13521
|
+
// }
|
|
13522
|
+
// // Fixed on 2025-03-16
|
|
13523
|
+
// // Eg.: input select change impacting another element: solve `no more errors`
|
|
13524
|
+
// else if ( instance.$forms[formId].errors && !instance.$forms[formId].errors.count() ) {
|
|
13525
|
+
// // recheck if valid
|
|
13526
|
+
// //resetting error display
|
|
13527
|
+
// instance.$forms[ formId ].errors = {};
|
|
13528
|
+
// console.debug('resetting field: '+ $el.name);
|
|
13529
|
+
// liveCheckErrors[formId] = {};
|
|
13530
|
+
// // $form.dataset.ginaFormIsResetting = true;
|
|
13531
|
+
// handleErrorsDisplay($gForm, {}, null, $el.name);
|
|
13532
|
+
// }
|
|
13533
|
+
|
|
13534
|
+
// updateSubmitTriggerState( $gForm, isFormValid);
|
|
13535
|
+
|
|
13536
|
+
// once = false;
|
|
13537
|
+
// });
|
|
13538
|
+
// // var $previeousEl = document.getElementById(instance.$forms[ $el.form.getAttribute('id') ].lastFocused[1].id);
|
|
13539
|
+
// // var errors = instance.$forms[ $previeousEl.form.getAttribute('id') ].errors;
|
|
13540
|
+
// // var isFormValid = (!errors[$previeousEl.name]) ? true : false;
|
|
13541
|
+
// // console.debug('[TAB] you just focusout from "'+ instance.$forms[ $el.form.getAttribute('id') ].lastFocused[1].id +'" to "'+ $el.id +'"', "errors: ", errors);
|
|
13542
|
+
// // if (errors && errors.count() > 0 ) {
|
|
13543
|
+
// // instance.$forms[ $previeousEl.form.getAttribute('id') ].isValidating = false;
|
|
13544
|
+
// // isFormValid = false;
|
|
13545
|
+
// // }
|
|
13546
|
+
// // refreshWarning($previeousEl);
|
|
13547
|
+
// // // // in case error context is changed by another task
|
|
13548
|
+
// // handleErrorsDisplay($previeousEl.form, errors, null, $previeousEl.name);
|
|
13549
|
+
// // updateSubmitTriggerState( $el.form, isFormValid);
|
|
13550
|
+
// return;
|
|
13551
|
+
// }
|
|
13552
|
+
|
|
13553
|
+
|
|
13554
|
+
console.debug('[A]['+keyboardMapping.count()+'] keyup ('+ event.keyCode +') .... '+$el.id, $el.value, ' VS ',$el.ginaFormValidatorTestedValue + '(old)');
|
|
13219
13555
|
processEvent();
|
|
13220
13556
|
}, 1000);
|
|
13221
13557
|
}
|
|
@@ -13315,16 +13651,42 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
13315
13651
|
//console.debug('pressed: '+ e.key+'('+ e.keyCode+')', ' S:'+posStart, ' E:'+posEnd, ' MAP: '+ JSON.stringify(keyboardMapping));
|
|
13316
13652
|
switch (e.keyCode) {
|
|
13317
13653
|
case 46: //Delete
|
|
13654
|
+
if (posStart != posEnd) {
|
|
13655
|
+
$_el.value = str.substring(0, posStart) + str.substring(posEnd);
|
|
13656
|
+
if (posStart == 0) {
|
|
13657
|
+
$_el.value = str.substring(posEnd+1);
|
|
13658
|
+
}
|
|
13659
|
+
} else if (posStart == 0) {
|
|
13660
|
+
$_el.value = str.substring(posStart+1);
|
|
13661
|
+
} else {
|
|
13662
|
+
$_el.value = str.substring(0, posStart) + str.substring(posEnd+1);
|
|
13663
|
+
}
|
|
13664
|
+
|
|
13665
|
+
e.currentTarget.setAttribute('readonly', 'readonly');
|
|
13666
|
+
setTimeout(() => {
|
|
13667
|
+
$_el.removeAttribute('readonly');
|
|
13668
|
+
setTimeout(() => {
|
|
13669
|
+
if (posStart != posEnd) {
|
|
13670
|
+
setCaretToPos($_el, posStart);
|
|
13671
|
+
} else if (posStart == 0) {
|
|
13672
|
+
setCaretToPos($_el, posStart);
|
|
13673
|
+
} else {
|
|
13674
|
+
setCaretToPos($_el, posStart);
|
|
13675
|
+
}
|
|
13676
|
+
}, 0)
|
|
13677
|
+
|
|
13678
|
+
}, 0);
|
|
13679
|
+
break
|
|
13318
13680
|
case 8: //Backspace
|
|
13319
13681
|
if (posStart != posEnd) {
|
|
13320
|
-
$_el.value = str.
|
|
13682
|
+
$_el.value = str.substring(0, posStart) + str.substring(posEnd);
|
|
13321
13683
|
if (posStart == 0) {
|
|
13322
|
-
$_el.value = str.
|
|
13684
|
+
$_el.value = str.substring(posEnd);
|
|
13323
13685
|
}
|
|
13324
13686
|
} else if (posStart == 0) {
|
|
13325
13687
|
$_el.value = str.substring(posStart+1);
|
|
13326
13688
|
} else {
|
|
13327
|
-
$_el.value = str.
|
|
13689
|
+
$_el.value = str.substring(0, posStart-1) + str.substring(posEnd);
|
|
13328
13690
|
}
|
|
13329
13691
|
|
|
13330
13692
|
e.currentTarget.setAttribute('readonly', 'readonly');
|
|
@@ -13362,9 +13724,9 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
13362
13724
|
}
|
|
13363
13725
|
break;
|
|
13364
13726
|
// Shortcuts
|
|
13365
|
-
case 17: //CTRL
|
|
13366
|
-
case 91: //CMD
|
|
13367
|
-
console.debug("CMD hit");
|
|
13727
|
+
case 17: // CTRL
|
|
13728
|
+
case 91: // CMD
|
|
13729
|
+
console.debug("CMD, CTRL hit");
|
|
13368
13730
|
e.preventDefault();
|
|
13369
13731
|
break;
|
|
13370
13732
|
case 67: // to handle CMD+C (copy)
|
|
@@ -13411,15 +13773,18 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
13411
13773
|
}
|
|
13412
13774
|
default:
|
|
13413
13775
|
// Replace selection
|
|
13776
|
+
if (e.key.length > 1) {
|
|
13777
|
+
break;
|
|
13778
|
+
}
|
|
13414
13779
|
if (posStart != posEnd) {
|
|
13415
|
-
$_el.value = str.
|
|
13780
|
+
$_el.value = str.substring(0, posStart) + e.key;
|
|
13416
13781
|
if (posEnd-1 < str.length) {
|
|
13417
13782
|
$_el.value += str.substring(posEnd)
|
|
13418
13783
|
}
|
|
13419
13784
|
} else if (posStart == 0) {
|
|
13420
13785
|
$_el.value = e.key + str.substring(posStart);
|
|
13421
13786
|
} else {
|
|
13422
|
-
$_el.value = str.
|
|
13787
|
+
$_el.value = str.substring(0, posStart) + e.key + str.substring(posEnd);
|
|
13423
13788
|
}
|
|
13424
13789
|
e.currentTarget.setAttribute('readonly', 'readonly');
|
|
13425
13790
|
// Force restore last caret position
|
|
@@ -13561,24 +13926,53 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
13561
13926
|
}
|
|
13562
13927
|
|
|
13563
13928
|
/**
|
|
13564
|
-
* reBindForm
|
|
13929
|
+
* reBindForm
|
|
13930
|
+
* Allows form rebinding: it is like reseting validation
|
|
13565
13931
|
*
|
|
13566
|
-
*
|
|
13567
|
-
*
|
|
13568
|
-
*
|
|
13932
|
+
* E.g.:
|
|
13933
|
+
* $validator
|
|
13934
|
+
* .getFormById('my-form-id')
|
|
13935
|
+
* .reBind();
|
|
13936
|
+
*
|
|
13937
|
+
* @param {string} [formId]
|
|
13938
|
+
* @param {string} [rules]
|
|
13939
|
+
* @param {callback} [cb]
|
|
13569
13940
|
*/
|
|
13570
|
-
var reBindForm = function(
|
|
13571
|
-
|
|
13572
|
-
|
|
13941
|
+
var reBindForm = function(formId, rules, cb) {
|
|
13942
|
+
var $form = null
|
|
13943
|
+
, _id = null
|
|
13944
|
+
;
|
|
13945
|
+
if (
|
|
13946
|
+
typeof(this.target) != 'undefined'
|
|
13947
|
+
&& /FORM/i.test(this.target.tagName)
|
|
13948
|
+
) {
|
|
13949
|
+
_id = formId = this.target.getAttribute('id')
|
|
13950
|
+
} else if ( /string/i.test(typeof(formId)) ) {
|
|
13951
|
+
_id = formId
|
|
13952
|
+
}
|
|
13953
|
+
|
|
13954
|
+
if ( typeof(instance.$forms[_id]) != 'undefined') {
|
|
13955
|
+
$form = instance.$forms[_id];
|
|
13956
|
+
} else {
|
|
13957
|
+
throw new Error('form instance `'+ _id +'` not found');
|
|
13958
|
+
}
|
|
13959
|
+
|
|
13573
13960
|
// reset errors
|
|
13574
|
-
|
|
13961
|
+
resetErrorsDisplay(_id);
|
|
13962
|
+
// Unbind form
|
|
13963
|
+
unbindForm($form.target);
|
|
13575
13964
|
// Bind
|
|
13576
|
-
|
|
13965
|
+
if ( typeof(rule) != 'undefined' ) {
|
|
13966
|
+
bindForm($form.target, rules);
|
|
13967
|
+
} else {
|
|
13968
|
+
bindForm($form.target);
|
|
13969
|
+
}
|
|
13577
13970
|
|
|
13578
13971
|
if ( cb ) {
|
|
13579
|
-
return cb(
|
|
13972
|
+
return cb($form);
|
|
13580
13973
|
}
|
|
13581
|
-
|
|
13974
|
+
|
|
13975
|
+
return $form;
|
|
13582
13976
|
}
|
|
13583
13977
|
|
|
13584
13978
|
var unbindForm = function($target) {
|
|
@@ -13596,7 +13990,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
13596
13990
|
|
|
13597
13991
|
} else if ( typeof($target.target) != 'undefined' ) {
|
|
13598
13992
|
$form = $target;
|
|
13599
|
-
_id = $form.id;
|
|
13993
|
+
_id = ( $target.getAttribute && $target.getAttribute('id') ) ? $form.getAttribute('id') : $form.id;
|
|
13600
13994
|
} else {
|
|
13601
13995
|
throw new Error('Validator::unbindForm($target): `$target` must be a DOM element\n'+err.stack )
|
|
13602
13996
|
}
|
|
@@ -13635,7 +14029,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
13635
14029
|
// submit buttons
|
|
13636
14030
|
$elTMP = $form.target.getElementsByTagName('button');
|
|
13637
14031
|
if ( $elTMP.length > 0 ) {
|
|
13638
|
-
for(let i = 0, len = $elTMP.length; i < len; ++i) {
|
|
14032
|
+
for (let i = 0, len = $elTMP.length; i < len; ++i) {
|
|
13639
14033
|
// if button is != type="submit", you will need to provide : data-gina-form-submit
|
|
13640
14034
|
// TODO - On button binding, you can then provide data-gina-form-action & data-gina-form-method
|
|
13641
14035
|
$els.push($elTMP[i])
|
|
@@ -13645,7 +14039,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
13645
14039
|
// submit links
|
|
13646
14040
|
$elTMP = $form.target.getElementsByTagName('a');
|
|
13647
14041
|
if ( $elTMP.length > 0 ) {
|
|
13648
|
-
for(let i = 0, len = $elTMP.length; i < len; ++i) {
|
|
14042
|
+
for (let i = 0, len = $elTMP.length; i < len; ++i) {
|
|
13649
14043
|
$els.push($elTMP[i])
|
|
13650
14044
|
}
|
|
13651
14045
|
}
|
|
@@ -13701,7 +14095,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
13701
14095
|
// textarea
|
|
13702
14096
|
$elTMP = $form.target.getElementsByTagName('textarea');
|
|
13703
14097
|
if ( $elTMP.length > 0 ) {
|
|
13704
|
-
for(let i = 0, len = $elTMP.length; i < len; ++i) {
|
|
14098
|
+
for (let i = 0, len = $elTMP.length; i < len; ++i) {
|
|
13705
14099
|
$els.push( $elTMP[i] )
|
|
13706
14100
|
}
|
|
13707
14101
|
}
|
|
@@ -13710,7 +14104,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
13710
14104
|
// forms inside main form
|
|
13711
14105
|
$elTMP = $form.target.getElementsByTagName('form');
|
|
13712
14106
|
if ( $elTMP.length > 0 ) {
|
|
13713
|
-
for(let i = 0, len = $elTMP.length; i < len; ++i) {
|
|
14107
|
+
for (let i = 0, len = $elTMP.length; i < len; ++i) {
|
|
13714
14108
|
$els.push( $elTMP[i] )
|
|
13715
14109
|
}
|
|
13716
14110
|
}
|
|
@@ -13795,8 +14189,10 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
13795
14189
|
/**
|
|
13796
14190
|
* bindForm
|
|
13797
14191
|
*
|
|
13798
|
-
* @param {object} $target - DOM element
|
|
13799
|
-
* @param {object} [customRule]
|
|
14192
|
+
* @param {object} [$target] - DOM element
|
|
14193
|
+
* @param {object|string} [customRule]
|
|
14194
|
+
*
|
|
14195
|
+
* @return {object} bindedForm
|
|
13800
14196
|
* */
|
|
13801
14197
|
var bindForm = function($target, customRule) {
|
|
13802
14198
|
|
|
@@ -13805,23 +14201,32 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
13805
14201
|
, rules = ( typeof(local.rules.count() > 0 ) ) ? local.rules : instance.rules
|
|
13806
14202
|
;
|
|
13807
14203
|
|
|
13808
|
-
|
|
13809
|
-
|
|
13810
|
-
|
|
13811
|
-
|
|
13812
|
-
|
|
13813
|
-
|
|
13814
|
-
|
|
14204
|
+
if (
|
|
14205
|
+
typeof($target) == 'undefined'
|
|
14206
|
+
&& typeof(this.target) != 'undefined'
|
|
14207
|
+
&& /FORM/i.test(this.target.tagName)
|
|
14208
|
+
||
|
|
14209
|
+
!/object/i.test( typeof($target) )
|
|
14210
|
+
) {
|
|
14211
|
+
_id = this.target.id || this.target.getAttribute('id');
|
|
14212
|
+
} else if ( /string/i.test(typeof($target)) ) {
|
|
14213
|
+
_id = $target
|
|
14214
|
+
} else {
|
|
14215
|
+
_id = $target.getAttribute('id')
|
|
14216
|
+
}
|
|
13815
14217
|
|
|
14218
|
+
try {
|
|
14219
|
+
if ( typeof(instance.$forms[_id]) != 'undefined') {
|
|
14220
|
+
$form = instance.$forms[_id];
|
|
14221
|
+
if ( typeof($form.target) == 'undefined' ) {
|
|
14222
|
+
throw new Error('Validator::bindForm($target, customRule): `$target` must be a DOM element\n');
|
|
14223
|
+
}
|
|
14224
|
+
$target = $form.target;
|
|
13816
14225
|
} else {
|
|
13817
|
-
throw new Error('
|
|
14226
|
+
throw new Error('form instance `'+ _id +'` not found');
|
|
13818
14227
|
}
|
|
13819
14228
|
} catch(err) {
|
|
13820
|
-
throw new Error('Validator::bindForm($target, customRule) could not bind form `'+ $target +'`\n'+err.stack )
|
|
13821
|
-
}
|
|
13822
|
-
|
|
13823
|
-
if ( typeof($form) != 'undefined' && $form.binded) {
|
|
13824
|
-
return false
|
|
14229
|
+
throw new Error('Validator::bindForm($target, customRule) could not bind form `'+ $target +'`\n'+err.stack );
|
|
13825
14230
|
}
|
|
13826
14231
|
|
|
13827
14232
|
console.debug('binding for: '+ _id);
|
|
@@ -14127,7 +14532,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
14127
14532
|
} else if ( /img/i.test($els[i].tagName) ) {
|
|
14128
14533
|
$img = $els[i];
|
|
14129
14534
|
deleteLinkId = uploadTriggerId + '-'+index+'-delete-trigger';
|
|
14130
|
-
let file = $img.src.
|
|
14535
|
+
let file = $img.src.substring($img.src.lastIndexOf('/')+1);
|
|
14131
14536
|
$uploadTrigger.customFiles.push({
|
|
14132
14537
|
name: file,
|
|
14133
14538
|
deleteLinkId: deleteLinkId
|
|
@@ -14486,7 +14891,10 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
14486
14891
|
var updateSelect = function($el, $form) {
|
|
14487
14892
|
$el.setAttribute('data-value', $el.value);
|
|
14488
14893
|
// If Live check enabled, proceed to silent validation
|
|
14489
|
-
if (
|
|
14894
|
+
if (
|
|
14895
|
+
/^(true)$/i.test($form.target.dataset.ginaFormLiveCheckEnabled && $form.rules.count() > 0)
|
|
14896
|
+
// && typeof($form.isBeingReseted) == 'undefined'
|
|
14897
|
+
) {
|
|
14490
14898
|
var localField = {}, $localField = {}, $localForm = null;
|
|
14491
14899
|
$localForm = $el.form;//event.target.form
|
|
14492
14900
|
localField[event.target.name] = event.target.value;
|
|
@@ -14519,7 +14927,16 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
14519
14927
|
validate($gForm, gFields, $gFields, gRules, function onSilentGlobalLiveValidation(gResult){
|
|
14520
14928
|
instance.$forms[formId].isValidating = false;
|
|
14521
14929
|
console.debug('[updateSelect]: onSilentGlobalLiveValidation: '+ gResult.isValid(), gResult);
|
|
14930
|
+
// Fixed on 2025-03-16
|
|
14522
14931
|
var isFormValid = gResult.isValid();
|
|
14932
|
+
if (!isFormValid) {
|
|
14933
|
+
instance.$forms[formId].errors = gResult.error;
|
|
14934
|
+
for (let eField in gResult.error) {
|
|
14935
|
+
// refreshWarning($gFields[eField]);
|
|
14936
|
+
handleErrorsDisplay($gForm, gResult.error, gResult.data, eField);
|
|
14937
|
+
}
|
|
14938
|
+
}
|
|
14939
|
+
|
|
14523
14940
|
updateSubmitTriggerState( $gForm, isFormValid);
|
|
14524
14941
|
once = false;
|
|
14525
14942
|
})
|
|
@@ -15113,6 +15530,25 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
15113
15530
|
if (gina.events[_evt]) {
|
|
15114
15531
|
cancelEvent(event);
|
|
15115
15532
|
|
|
15533
|
+
// Fixed on 2025-03-05 - "last focus" vs "current focus"
|
|
15534
|
+
// To get active element: document.activeElement
|
|
15535
|
+
var formId = event.target.form.getAttribute('id') || event.currentTarget.getAttribute('id');
|
|
15536
|
+
var lastFocused = {
|
|
15537
|
+
id : $el.id,
|
|
15538
|
+
name: $el.name
|
|
15539
|
+
};
|
|
15540
|
+
if (!instance.$forms[formId].lastFocused.length) {
|
|
15541
|
+
instance.$forms[formId].lastFocused[0] = lastFocused;
|
|
15542
|
+
} else {
|
|
15543
|
+
instance.$forms[formId].lastFocused.splice(0,0,lastFocused);
|
|
15544
|
+
}
|
|
15545
|
+
lastFocused = ( typeof(instance.$forms[formId].lastFocused[1]) != 'undefined' ) ? instance.$forms[formId].lastFocused[1].id : null;
|
|
15546
|
+
|
|
15547
|
+
// cleanup
|
|
15548
|
+
instance.$forms[formId].lastFocused.splice(2);
|
|
15549
|
+
|
|
15550
|
+
// console.debug('lastFocused: ', lastFocused, ' VS current: ', $el.id);
|
|
15551
|
+
|
|
15116
15552
|
triggerEvent(gina, $el, _evt, event.detail);
|
|
15117
15553
|
}
|
|
15118
15554
|
});
|
|
@@ -15286,7 +15722,9 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
15286
15722
|
||
|
|
15287
15723
|
isCustomSubmit && !/^submit\./i.test(_evt)
|
|
15288
15724
|
) {
|
|
15289
|
-
_evt = 'submit.'+_evt
|
|
15725
|
+
_evt = 'submit.'+_evt;
|
|
15726
|
+
// Updating submitTrigger in case it has been changed on the fly
|
|
15727
|
+
instance.$forms[$form.id].submitTrigger = $form.submitTrigger = $el.id;
|
|
15290
15728
|
}
|
|
15291
15729
|
// in case we have multiple reset type buttons
|
|
15292
15730
|
if ( $el.type == 'reset' && !/^reset\./i.test(_evt) ) {
|
|
@@ -15378,10 +15816,11 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
15378
15816
|
, isDisabled = null
|
|
15379
15817
|
;
|
|
15380
15818
|
|
|
15381
|
-
|
|
15382
|
-
if
|
|
15383
|
-
|
|
15384
|
-
|
|
15819
|
+
|
|
15820
|
+
// stop there if form has already been sent - anti spam
|
|
15821
|
+
// if (instance.$forms[id].sent) {
|
|
15822
|
+
// return;
|
|
15823
|
+
// }
|
|
15385
15824
|
|
|
15386
15825
|
var validatorInfos = getFormValidationInfos($target, rules);
|
|
15387
15826
|
fields = validatorInfos.fields;
|
|
@@ -15429,7 +15868,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
15429
15868
|
;
|
|
15430
15869
|
$buttonsTMP = $target.getElementsByTagName('button');
|
|
15431
15870
|
if ( $buttonsTMP.length > 0 ) {
|
|
15432
|
-
for(let b = 0, len = $buttonsTMP.length; b < len; ++b) {
|
|
15871
|
+
for (let b = 0, len = $buttonsTMP.length; b < len; ++b) {
|
|
15433
15872
|
if ($buttonsTMP[b].type == 'submit') {
|
|
15434
15873
|
$buttons.push($buttonsTMP[b])
|
|
15435
15874
|
}
|
|
@@ -15439,7 +15878,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
15439
15878
|
// binding links
|
|
15440
15879
|
$buttonsTMP = $target.getElementsByTagName('a');
|
|
15441
15880
|
if ( $buttonsTMP.length > 0 ) {
|
|
15442
|
-
for(let b = 0, len = $buttonsTMP.length; b < len; ++b) {
|
|
15881
|
+
for (let b = 0, len = $buttonsTMP.length; b < len; ++b) {
|
|
15443
15882
|
if ( $buttonsTMP[b].attributes.getNamedItem('data-gina-form-submit') ) {
|
|
15444
15883
|
$buttons.push($buttonsTMP[b])
|
|
15445
15884
|
} else if (
|
|
@@ -15555,8 +15994,9 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
15555
15994
|
}
|
|
15556
15995
|
|
|
15557
15996
|
// prevent event to be triggered twice
|
|
15558
|
-
if ( typeof(e.defaultPrevented) != 'undefined' && e.defaultPrevented )
|
|
15997
|
+
if ( typeof(e.defaultPrevented) != 'undefined' && e.defaultPrevented ) {
|
|
15559
15998
|
return false;
|
|
15999
|
+
}
|
|
15560
16000
|
|
|
15561
16001
|
if (withRules || isBinded) {
|
|
15562
16002
|
cancelEvent(e);
|
|
@@ -15696,7 +16136,8 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
15696
16136
|
}
|
|
15697
16137
|
updateSubmitTriggerState( $form, result.isValid() );
|
|
15698
16138
|
});
|
|
15699
|
-
}
|
|
16139
|
+
}
|
|
16140
|
+
else if (!/^(true)$/i.test($form.target.dataset.ginaFormLiveCheckEnabled) ) {
|
|
15700
16141
|
updateSubmitTriggerState( $form , true );
|
|
15701
16142
|
}
|
|
15702
16143
|
|
|
@@ -15713,10 +16154,18 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
15713
16154
|
}
|
|
15714
16155
|
//if (!$formInstance) return;
|
|
15715
16156
|
|
|
15716
|
-
|
|
16157
|
+
|
|
16158
|
+
if (
|
|
16159
|
+
typeof($formInstance.submitTrigger) == 'undefined'
|
|
16160
|
+
&& /^(true)$/i.test($formInstance.target.dataset.ginaFormLiveCheckEnabled)
|
|
16161
|
+
) {
|
|
15717
16162
|
console.warn('This might be normal, so do not worry if this form is handled by your javascript: `'+ $formInstance.id +'`\nGina could not complete `updateSubmitTriggerState()`: `submitTrigger` might not be attached to form instance `'+ $formInstance.id +'`\nTo disable this warning, You just need to disable `Form Live Checking on your form by adding to your <form>: `data-gina-form-live-check-enabled=false``')
|
|
15718
16163
|
} else if ( document.getElementById($formInstance.submitTrigger) ) {
|
|
15719
|
-
if (
|
|
16164
|
+
if (
|
|
16165
|
+
/^true$/i.test(isFormValid)
|
|
16166
|
+
||
|
|
16167
|
+
!/^(true)$/i.test($formInstance.target.dataset.ginaFormLiveCheckEnabled)
|
|
16168
|
+
) { // show submitTrigge
|
|
15720
16169
|
document.getElementById($formInstance.submitTrigger).disabled = false;
|
|
15721
16170
|
} else { // hide submitTrigger
|
|
15722
16171
|
document.getElementById($formInstance.submitTrigger).disabled = true;
|
|
@@ -16159,7 +16608,8 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
16159
16608
|
if ( !/^form$/i.test($formOrElement.tagName) ) {
|
|
16160
16609
|
$currentForm = $formOrElement.form;
|
|
16161
16610
|
}
|
|
16162
|
-
var formId
|
|
16611
|
+
var formId = $currentForm.getAttribute('id');
|
|
16612
|
+
var isFormValid = null;
|
|
16163
16613
|
|
|
16164
16614
|
if (
|
|
16165
16615
|
hasParsedAllRules
|
|
@@ -16180,10 +16630,16 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
16180
16630
|
if ( typeof(instance.$forms[formId].errors) == 'undefined' ) {
|
|
16181
16631
|
instance.$forms[formId].errors = {}
|
|
16182
16632
|
}
|
|
16633
|
+
// Fixed on 2025-03-16
|
|
16634
|
+
if ( typeof(cb._errors[field]) != 'undefined' ) {
|
|
16635
|
+
instance.$forms[formId].errors[field] = cb._errors[field];
|
|
16636
|
+
}
|
|
16637
|
+
console.debug('[A] Refreshing warning/error on field '+ field);
|
|
16638
|
+
if (
|
|
16639
|
+
!isFormValid && /^true|false$/i.test(instance.$forms[formId].isValidating)
|
|
16640
|
+
|| d[field].target.value != ''
|
|
16183
16641
|
|
|
16184
|
-
|
|
16185
|
-
|
|
16186
|
-
if (!isFormValid && /^true|false$/i.test(instance.$forms[formId].isValidating) || d[field].target.value != '' ) {
|
|
16642
|
+
) {
|
|
16187
16643
|
refreshWarning($allFields[field]);
|
|
16188
16644
|
handleErrorsDisplay($currentForm, cb._errors, cb._data, field);
|
|
16189
16645
|
updateSubmitTriggerState( $currentForm, isFormValid);
|
|
@@ -16191,8 +16647,9 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
16191
16647
|
|
|
16192
16648
|
if ( envIsDev && isGFFCtx && typeof(window.ginaToolbar) != 'undefined' && window.ginaToolbar ) {
|
|
16193
16649
|
// update toolbar
|
|
16194
|
-
if (!gina.forms.errors)
|
|
16650
|
+
if (!gina.forms.errors) {
|
|
16195
16651
|
gina.forms.errors = {};
|
|
16652
|
+
}
|
|
16196
16653
|
|
|
16197
16654
|
var objCallback = {
|
|
16198
16655
|
id : formId,
|
|
@@ -16209,13 +16666,13 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
16209
16666
|
}
|
|
16210
16667
|
|
|
16211
16668
|
// is this the last or the only field to be validated ?
|
|
16212
|
-
var needsGlobalReValidation = false
|
|
16669
|
+
var needsGlobalReValidation = false;
|
|
16213
16670
|
if ( listedFields.length == 1 || listedFields[listedFields.length-1] == field) {
|
|
16214
16671
|
// trigger end of validation
|
|
16215
16672
|
// console.debug(field +' is the last element to be validated for formId: '+ formId, cb._errors, instance.$forms[formId].errors);
|
|
16216
16673
|
isFormValid = ( cb._errors.count() > 0 ) ? false : true;
|
|
16217
16674
|
if (!isFormValid && /^true|false$/i.test(instance.$forms[formId].isValidating)) {
|
|
16218
|
-
|
|
16675
|
+
console.debug('[1] Should update error display now ', cb._errors);
|
|
16219
16676
|
instance.$forms[formId].errors = merge(cb._errors, instance.$forms[formId].errors);
|
|
16220
16677
|
refreshWarning($allFields[field]);
|
|
16221
16678
|
handleErrorsDisplay($currentForm, cb._errors, cb._data, field);
|
|
@@ -16247,8 +16704,6 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
16247
16704
|
window.ginaToolbar.update('forms', objCallback);
|
|
16248
16705
|
}
|
|
16249
16706
|
|
|
16250
|
-
|
|
16251
|
-
|
|
16252
16707
|
handleErrorsDisplay($currentForm, gResult.error, gResult.data, field);
|
|
16253
16708
|
updateSubmitTriggerState( $currentForm, isFormValid);
|
|
16254
16709
|
})
|
|
@@ -16392,7 +16847,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
16392
16847
|
|
|
16393
16848
|
for (var c in rules) {
|
|
16394
16849
|
if (!/^\_case\_/.test(c) ) continue;
|
|
16395
|
-
if ( typeof(rules[c].conditions) == 'undefined' ||
|
|
16850
|
+
if ( typeof(rules[c].conditions) == 'undefined' || Array.isArray(rules[c].conditions) && !rules[c].conditions.length ) continue;
|
|
16396
16851
|
if ( typeof(rules[c].conditions[0].rules) == 'undefined' ) continue;
|
|
16397
16852
|
|
|
16398
16853
|
|
|
@@ -16574,7 +17029,14 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
16574
17029
|
// filtering conditions
|
|
16575
17030
|
for (var _c = 0, _cLen = rules[c].conditions.length; _c < _cLen; ++_c) {
|
|
16576
17031
|
|
|
16577
|
-
if (
|
|
17032
|
+
if (
|
|
17033
|
+
Array.isArray(rules[c].conditions[_c].case)
|
|
17034
|
+
&& rules[c].conditions[_c].case.indexOf(caseValue) == -1
|
|
17035
|
+
||
|
|
17036
|
+
!Array.isArray(rules[c].conditions[_c].case)
|
|
17037
|
+
&& rules[c].conditions[_c].case != caseValue
|
|
17038
|
+
|
|
17039
|
+
) {
|
|
16578
17040
|
continue;
|
|
16579
17041
|
}
|
|
16580
17042
|
|
|
@@ -16719,7 +17181,8 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
16719
17181
|
if (
|
|
16720
17182
|
conditions[c]['case'] === caseValue
|
|
16721
17183
|
||
|
|
16722
|
-
Array.isArray(conditions[c]['case'])
|
|
17184
|
+
Array.isArray(conditions[c]['case'])
|
|
17185
|
+
&& conditions[c]['case'].indexOf(caseValue) > -1
|
|
16723
17186
|
||
|
|
16724
17187
|
/^\//.test(conditions[c]['case'])
|
|
16725
17188
|
) {
|
|
@@ -16836,8 +17299,6 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
16836
17299
|
}
|
|
16837
17300
|
--i;
|
|
16838
17301
|
}
|
|
16839
|
-
|
|
16840
|
-
|
|
16841
17302
|
} // EO for
|
|
16842
17303
|
}
|
|
16843
17304
|
|
|
@@ -16858,7 +17319,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
16858
17319
|
}
|
|
16859
17320
|
|
|
16860
17321
|
if (isGFFCtx)
|
|
16861
|
-
$fields[field].setAttribute('data-gina-form-errors', fieldErrorsAttributes[field].
|
|
17322
|
+
$fields[field].setAttribute('data-gina-form-errors', fieldErrorsAttributes[field].substring(0, fieldErrorsAttributes[field].length-1))
|
|
16862
17323
|
}
|
|
16863
17324
|
|
|
16864
17325
|
//calling back
|
|
@@ -16929,6 +17390,8 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
|
|
|
16929
17390
|
'data' : formatData( _data )
|
|
16930
17391
|
});
|
|
16931
17392
|
removeListener(gina, event.target, 'validated.' + event.target.id);
|
|
17393
|
+
|
|
17394
|
+
|
|
16932
17395
|
return
|
|
16933
17396
|
}
|
|
16934
17397
|
});
|
|
@@ -17157,6 +17620,11 @@ define('gina/toolbar', ['require', 'jquery', 'vendor/uuid'/**, 'lib/merge'*/, 'l
|
|
|
17157
17620
|
try {
|
|
17158
17621
|
|
|
17159
17622
|
txt = ($json) ? $json.text() : '';
|
|
17623
|
+
// txt = txt
|
|
17624
|
+
// .replace(/:null/gi, ':\"null\"')
|
|
17625
|
+
// .replace(/:true/gi, ':\"true\"')
|
|
17626
|
+
// .replace(/:false/gi, ':\"false\"');
|
|
17627
|
+
|
|
17160
17628
|
if (txt == '' || txt == 'null' ) {
|
|
17161
17629
|
// $json.text('Empty')
|
|
17162
17630
|
$json.text('{}')
|
|
@@ -17180,8 +17648,9 @@ define('gina/toolbar', ['require', 'jquery', 'vendor/uuid'/**, 'lib/merge'*/, 'l
|
|
|
17180
17648
|
|
|
17181
17649
|
var sectionStr = ( section ) ? ' [ '+ section + ' ] ' : ' ';
|
|
17182
17650
|
// var _err = 'Could not load'+ sectionStr +'json\n' + (err.stack||err.message||err);
|
|
17183
|
-
var _err = 'Could not load'+ sectionStr +'json\n' + err.message +'\n'+ err.stack;
|
|
17651
|
+
var _err = 'Could not load ['+ sectionStr +'] json\n' + err.message +'\n'+ err.stack;
|
|
17184
17652
|
console.error(_err);
|
|
17653
|
+
return;
|
|
17185
17654
|
// if ($json) {
|
|
17186
17655
|
// $json.text(_err);
|
|
17187
17656
|
// } else {
|
|
@@ -17806,7 +18275,7 @@ define('gina/toolbar', ['require', 'jquery', 'vendor/uuid'/**, 'lib/merge'*/, 'l
|
|
|
17806
18275
|
|
|
17807
18276
|
foldingStateName += name
|
|
17808
18277
|
} else {
|
|
17809
|
-
foldingStateName = foldingStateName.
|
|
18278
|
+
foldingStateName = foldingStateName.substring(0, foldingStateName.length-1)
|
|
17810
18279
|
}
|
|
17811
18280
|
|
|
17812
18281
|
return foldingStateName.trim()
|
|
@@ -17843,8 +18312,8 @@ define('gina/toolbar', ['require', 'jquery', 'vendor/uuid'/**, 'lib/merge'*/, 'l
|
|
|
17843
18312
|
html += '<ul class="gina-toolbar-object">' + parseObject(obj[i], ginaObj[i], id, elIsXHR, elSection) +'</ul>';
|
|
17844
18313
|
html += '</li>';
|
|
17845
18314
|
// clear one level
|
|
17846
|
-
//id = id.
|
|
17847
|
-
id = id.
|
|
18315
|
+
//id = id.substring(0, id.length - i.length - 1);
|
|
18316
|
+
id = id.substring(0, id.length - i.length);
|
|
17848
18317
|
} else if ( Array.isArray(obj[i]) ) {
|
|
17849
18318
|
//id += i + '-';
|
|
17850
18319
|
id += '-' + i.replace(/[^A-Za-z0-9_-]/g, '_');
|
|
@@ -17855,8 +18324,8 @@ define('gina/toolbar', ['require', 'jquery', 'vendor/uuid'/**, 'lib/merge'*/, 'l
|
|
|
17855
18324
|
html += '<ul class="gina-toolbar-collection">' + parseCollection(obj[i], ginaObj[i], id, elIsXHR, elSection) +'</ul>';
|
|
17856
18325
|
html += '</li>';
|
|
17857
18326
|
// clear one level
|
|
17858
|
-
//id = id.
|
|
17859
|
-
id = id.
|
|
18327
|
+
//id = id.substring(0, id.length - i.length - 1);
|
|
18328
|
+
id = id.substring(0, id.length - i.length);
|
|
17860
18329
|
} else {
|
|
17861
18330
|
objType = (ginaObj[i] === null) ? 'null' : typeof(ginaObj[i]);
|
|
17862
18331
|
if ( objType == 'undefined' ) { // new key declaration added by user
|
|
@@ -17913,7 +18382,7 @@ define('gina/toolbar', ['require', 'jquery', 'vendor/uuid'/**, 'lib/merge'*/, 'l
|
|
|
17913
18382
|
html += '<ul class="gina-toolbar-object">' + parseObject(arr[i], ginaArr[i], id, elIsXHR, elSection) +'</ul>';
|
|
17914
18383
|
html += '</li>';
|
|
17915
18384
|
// clear one level
|
|
17916
|
-
id = id.
|
|
18385
|
+
id = id.substring(0, id.length - i.toString().length - 1);
|
|
17917
18386
|
|
|
17918
18387
|
} else if ( Array.isArray(arr[i]) ) {
|
|
17919
18388
|
//id += i + '-';
|
|
@@ -17926,8 +18395,8 @@ define('gina/toolbar', ['require', 'jquery', 'vendor/uuid'/**, 'lib/merge'*/, 'l
|
|
|
17926
18395
|
html += '<ul class="gina-toolbar-collection">' + parseCollection(arr[i], ginaArr[i], id, elIsXHR, elSection) +'</ul>';
|
|
17927
18396
|
html += '</li>';
|
|
17928
18397
|
// clear one level
|
|
17929
|
-
//id = id.
|
|
17930
|
-
id = id.
|
|
18398
|
+
//id = id.substring(0, id.length - i.toString().length - 1);
|
|
18399
|
+
id = id.substring(0, id.length - i.toString().length);
|
|
17931
18400
|
} else {
|
|
17932
18401
|
html += '<li class="gina-toolbar-key-value"><span class="gina-toolbar-key">'+ i +':</span> <span class="gina-toolbar-value">'+ arr[i] +'</span></li>';
|
|
17933
18402
|
}
|
|
@@ -17956,16 +18425,16 @@ define('gina/toolbar', ['require', 'jquery', 'vendor/uuid'/**, 'lib/merge'*/, 'l
|
|
|
17956
18425
|
section = i;
|
|
17957
18426
|
if ( typeof(obj[i]) == 'object' && !Array.isArray(obj[i]) && obj[i] !== null ) { // parse
|
|
17958
18427
|
|
|
17959
|
-
$parent = $('#gina-toolbar-view-' + id.
|
|
18428
|
+
$parent = $('#gina-toolbar-view-' + id.substring(0, id.length - 1));
|
|
17960
18429
|
hasParent = ( $parent.length ) ? true : false;
|
|
17961
18430
|
|
|
17962
18431
|
if (!hasParent ) {
|
|
17963
18432
|
id += i.replace(/[^A-Za-z0-9_-]/g, '_') + '-';
|
|
17964
18433
|
|
|
17965
18434
|
if (i == 'params') { // force to top
|
|
17966
|
-
var htmlParams = '<div id="gina-toolbar-view-'+ id.
|
|
17967
|
-
'<h2 class="gina-toolbar-section-title">'+ id.
|
|
17968
|
-
'<ul class="'+ id.
|
|
18435
|
+
var htmlParams = '<div id="gina-toolbar-view-'+ id.substring(0, id.length - 1) +'" class="gina-toolbar-section">' +
|
|
18436
|
+
'<h2 class="gina-toolbar-section-title">'+ id.substring(0, id.length - 1) +'</h2>' +
|
|
18437
|
+
'<ul class="'+ id.substring(0, id.length - 1) +'"></ul>' +
|
|
17969
18438
|
'</div>';
|
|
17970
18439
|
|
|
17971
18440
|
$('#gina-toolbar-view-html-properties')
|
|
@@ -17974,9 +18443,9 @@ define('gina/toolbar', ['require', 'jquery', 'vendor/uuid'/**, 'lib/merge'*/, 'l
|
|
|
17974
18443
|
|
|
17975
18444
|
if ( !/^html/.test(id) ) {
|
|
17976
18445
|
|
|
17977
|
-
var htmlOther = '<div id="gina-toolbar-view-'+ id.
|
|
17978
|
-
'<h2 class="gina-toolbar-section-title">'+ id.
|
|
17979
|
-
'<ul class="'+ id.
|
|
18446
|
+
var htmlOther = '<div id="gina-toolbar-view-'+ id.substring(0, id.length - 1) +'" class="gina-toolbar-section">' +
|
|
18447
|
+
'<h2 class="gina-toolbar-section-title">'+ id.substring(0, id.length - 1) +'</h2>' +
|
|
18448
|
+
'<ul class="'+ id.substring(0, id.length - 1) +'"></ul>' +
|
|
17980
18449
|
'</div>';
|
|
17981
18450
|
|
|
17982
18451
|
$html
|
|
@@ -17984,36 +18453,36 @@ define('gina/toolbar', ['require', 'jquery', 'vendor/uuid'/**, 'lib/merge'*/, 'l
|
|
|
17984
18453
|
}/** else { // add to properties section
|
|
17985
18454
|
$root
|
|
17986
18455
|
.find('.gina-toolbar-properties')
|
|
17987
|
-
.append('ul.' + id.
|
|
18456
|
+
.append('ul.' + id.substring(0, id.length - 1))
|
|
17988
18457
|
}*/
|
|
17989
18458
|
|
|
17990
18459
|
}
|
|
17991
18460
|
|
|
17992
|
-
parseView(obj[i], ginaObj[i], id, elIsXHR, $html.find('ul.'+ id.
|
|
18461
|
+
parseView(obj[i], ginaObj[i], id, elIsXHR, $html.find('ul.'+ id.substring(0, id.length - 1)), $root );
|
|
17993
18462
|
|
|
17994
18463
|
} else {
|
|
17995
18464
|
|
|
17996
18465
|
parentId = id + i.replace(/[^A-Za-z0-9_-]/g, '_') + '-';
|
|
17997
18466
|
|
|
17998
18467
|
$parent
|
|
17999
|
-
.find('ul.'+ id.
|
|
18000
|
-
.append('<li class="gina-toolbar-object"><a href="#" class="gina-toolbar-key gina-toolbar'+ isXHR +'-folding-state-'+ normalizeFoldingStateName( i.replace(/[^A-Za-z0-9_-]/g, '_'), parentId.
|
|
18468
|
+
.find('ul.'+ id.substring(0, id.length - 1))
|
|
18469
|
+
.append('<li class="gina-toolbar-object"><a href="#" class="gina-toolbar-key gina-toolbar'+ isXHR +'-folding-state-'+ normalizeFoldingStateName( i.replace(/[^A-Za-z0-9_-]/g, '_'), parentId.substring(0, parentId.length - 1) ) +'">'+ i +' <span>{ }</span></a><ul class="gina-toolbar-object '+ parentId.substring(0, parentId.length - 1) +'"></ul></li>');
|
|
18001
18470
|
|
|
18002
|
-
parseView(obj[i], ginaObj[i], parentId, elIsXHR, $parent.find('ul.'+ id.
|
|
18471
|
+
parseView(obj[i], ginaObj[i], parentId, elIsXHR, $parent.find('ul.'+ id.substring(0, id.length - 1)), $root );
|
|
18003
18472
|
|
|
18004
18473
|
id += i.replace(/[^A-Za-z0-9_-]/g, '_') + '-';
|
|
18005
18474
|
}
|
|
18006
18475
|
|
|
18007
18476
|
|
|
18008
18477
|
// clear one level
|
|
18009
|
-
id = id.
|
|
18478
|
+
id = id.substring(0, id.length - i.length - 1);
|
|
18010
18479
|
|
|
18011
18480
|
|
|
18012
18481
|
} else if ( Array.isArray(obj[i]) ) { // parse collection
|
|
18013
18482
|
|
|
18014
18483
|
|
|
18015
18484
|
|
|
18016
|
-
$parent = $('#gina-toolbar-view-' + id.
|
|
18485
|
+
$parent = $('#gina-toolbar-view-' + id.substring(0, id.length - 1));
|
|
18017
18486
|
|
|
18018
18487
|
hasParent = ( $parent.length ) ? true : false;
|
|
18019
18488
|
|
|
@@ -18023,16 +18492,16 @@ define('gina/toolbar', ['require', 'jquery', 'vendor/uuid'/**, 'lib/merge'*/, 'l
|
|
|
18023
18492
|
parentId = id + i.replace(/[^A-Za-z0-9_-]/g, '_') + '-';
|
|
18024
18493
|
|
|
18025
18494
|
$parent
|
|
18026
|
-
//.find('ul.'+ id.
|
|
18027
|
-
.append('<li class="gina-toolbar-collection"><a href="#" class="gina-toolbar-key gina-toolbar'+ isXHR +'-folding-state-'+ normalizeFoldingStateName( i.replace(/[^A-Za-z0-9_-]/g, '_'), parentId.
|
|
18495
|
+
//.find('ul.'+ id.substring(0, id.length - 1))
|
|
18496
|
+
.append('<li class="gina-toolbar-collection"><a href="#" class="gina-toolbar-key gina-toolbar'+ isXHR +'-folding-state-'+ normalizeFoldingStateName( i.replace(/[^A-Za-z0-9_-]/g, '_'), parentId.substring(0, parentId.length - 1) ) +'">'+ i +' <span>['+ obj[i].length +']</span></a><ul> '+ parseCollection(obj[i], ginaObj[i], parentId, $parent.find('li ul.'+ id.substring(0, id.length - 1)), section )+'</ul></li>');
|
|
18028
18497
|
|
|
18029
18498
|
|
|
18030
|
-
//parentId = parentId.
|
|
18031
|
-
//parentId = id.
|
|
18032
|
-
//parseView(obj[i], ginaObj[i], parentId, elIsXHR, $parent.find('ul.'+ parentId.
|
|
18499
|
+
//parentId = parentId.substring(0, parentId.length - 1)+ '-';
|
|
18500
|
+
//parentId = id.substring(0, id.length - i.length - 1);
|
|
18501
|
+
//parseView(obj[i], ginaObj[i], parentId, elIsXHR, $parent.find('ul.'+ parentId.substring(0, parentId.length - 1)), $root );
|
|
18033
18502
|
|
|
18034
18503
|
//id += i.replace(/[^A-Za-z0-9_-]/g, '_') + '-';
|
|
18035
|
-
//$parent = $('#gina-toolbar-view-' + id.
|
|
18504
|
+
//$parent = $('#gina-toolbar-view-' + id.substring(0, id.length - 1));
|
|
18036
18505
|
id += i.replace(/[^A-Za-z0-9_-]/g, '_') + '-';
|
|
18037
18506
|
} else {
|
|
18038
18507
|
|
|
@@ -18040,8 +18509,8 @@ define('gina/toolbar', ['require', 'jquery', 'vendor/uuid'/**, 'lib/merge'*/, 'l
|
|
|
18040
18509
|
parentId = id + i.replace(/[^A-Za-z0-9_-]/g, '_') + '-';
|
|
18041
18510
|
|
|
18042
18511
|
$parent
|
|
18043
|
-
.find('li.'+ id.
|
|
18044
|
-
.append('<li class="gina-toolbar-collection"><a class="gina-toolbar-key gina-toolbar'+ isXHR +'-folding-state-'+ normalizeFoldingStateName( i.replace(/[^A-Za-z0-9_-]/g, '_'), parentId.
|
|
18512
|
+
.find('li.'+ id.substring(0, id.length - 1) +' ul')
|
|
18513
|
+
.append('<li class="gina-toolbar-collection"><a class="gina-toolbar-key gina-toolbar'+ isXHR +'-folding-state-'+ normalizeFoldingStateName( i.replace(/[^A-Za-z0-9_-]/g, '_'), parentId.substring(0, parentId.length - 1) ) +'">'+ i +' <span>['+ obj[i].length +']</span></a><ul>'+ parseCollection(obj[i], ginaObj[i], parentId, $parent.find('li ul.'+ id.substring(0, id.length - 1)), section ) +'</ul></li>');
|
|
18045
18514
|
|
|
18046
18515
|
id += i.replace(/[^A-Za-z0-9_-]/g, '_') + '-';
|
|
18047
18516
|
|
|
@@ -18052,7 +18521,7 @@ define('gina/toolbar', ['require', 'jquery', 'vendor/uuid'/**, 'lib/merge'*/, 'l
|
|
|
18052
18521
|
// id = id + i.replace(/[^A-Za-z0-9_-]/g, '_') + '-';
|
|
18053
18522
|
// $root
|
|
18054
18523
|
// .find('.gina-toolbar-properties')
|
|
18055
|
-
// .append('<li class="gina-toolbar-collection"><a class="gina-toolbar-key gina-toolbar'+ isXHR +'-folding-state-'+ normalizeFoldingStateName( i.replace(/[^A-Za-z0-9_-]/g, '_'), id.
|
|
18524
|
+
// .append('<li class="gina-toolbar-collection"><a class="gina-toolbar-key gina-toolbar'+ isXHR +'-folding-state-'+ normalizeFoldingStateName( i.replace(/[^A-Za-z0-9_-]/g, '_'), id.substring(0, id.length - 1) ) +'">'+ i +' <span>['+ obj[i].length +']</span></a><ul>'+ parseCollection(obj[i], ginaObj[i], parentId, $root.find('.gina-toolbar-properties'), section) +'</ul></li>');
|
|
18056
18525
|
|
|
18057
18526
|
|
|
18058
18527
|
// } else {
|
|
@@ -18061,14 +18530,14 @@ define('gina/toolbar', ['require', 'jquery', 'vendor/uuid'/**, 'lib/merge'*/, 'l
|
|
|
18061
18530
|
// parentId = id + i.replace(/[^A-Za-z0-9_-]/g, '_') + '-';
|
|
18062
18531
|
|
|
18063
18532
|
// $parent
|
|
18064
|
-
// .find('li.'+ id.
|
|
18065
|
-
// .append('<li class="gina-toolbar-collection"><a class="gina-toolbar-key gina-toolbar'+ isXHR +'-folding-state-'+ normalizeFoldingStateName( i.replace(/[^A-Za-z0-9_-]/g, '_'), parentId.
|
|
18533
|
+
// .find('li.'+ id.substring(0, id.length - 1) +' ul')
|
|
18534
|
+
// .append('<li class="gina-toolbar-collection"><a class="gina-toolbar-key gina-toolbar'+ isXHR +'-folding-state-'+ normalizeFoldingStateName( i.replace(/[^A-Za-z0-9_-]/g, '_'), parentId.substring(0, parentId.length - 1) ) +'">'+ i +' <span>['+ obj[i].length +']</span></a><ul>'+ parseCollection(obj[i], ginaObj[i], parentId, $parent.find('li ul.'+ id.substring(0, id.length - 1)), section ) +'</ul></li>');
|
|
18066
18535
|
|
|
18067
18536
|
// id += i.replace(/[^A-Za-z0-9_-]/g, '_') + '-';
|
|
18068
18537
|
// }
|
|
18069
18538
|
|
|
18070
18539
|
// clear one level
|
|
18071
|
-
id = id.
|
|
18540
|
+
id = id.substring(0, id.length - i.length - 1);
|
|
18072
18541
|
} else {
|
|
18073
18542
|
|
|
18074
18543
|
|
|
@@ -18076,7 +18545,7 @@ define('gina/toolbar', ['require', 'jquery', 'vendor/uuid'/**, 'lib/merge'*/, 'l
|
|
|
18076
18545
|
objType = (ginaObj[i] === null) ? 'null' : typeof(ginaObj[i]);
|
|
18077
18546
|
if ( objType == 'undefined' ) { // new key declaration added by user
|
|
18078
18547
|
if (/\-$/.test(id)) {
|
|
18079
|
-
id = id.
|
|
18548
|
+
id = id.substring(0, id.length - 1);
|
|
18080
18549
|
}
|
|
18081
18550
|
|
|
18082
18551
|
if (!id) continue;
|
|
@@ -18123,7 +18592,7 @@ define('gina/toolbar', ['require', 'jquery', 'vendor/uuid'/**, 'lib/merge'*/, 'l
|
|
|
18123
18592
|
} else {
|
|
18124
18593
|
|
|
18125
18594
|
$root
|
|
18126
|
-
.find('ul.' + id.
|
|
18595
|
+
.find('ul.' + id.substring(0, id.length - 1))
|
|
18127
18596
|
.append('<li class="gina-toolbar-key-value"><span class="gina-toolbar-key">'+ i +':</span> <span class="gina-toolbar-value gina-toolbar-value-type-is-'+ objType +'">'+ obj[i] +'</span></li>')
|
|
18128
18597
|
}
|
|
18129
18598
|
}
|
|
@@ -18643,11 +19112,11 @@ define('gina', [ 'require', 'vendor/uuid', 'lib/merge', 'utils/events', 'helpers
|
|
|
18643
19112
|
return construct
|
|
18644
19113
|
});
|
|
18645
19114
|
/*!
|
|
18646
|
-
* Engine.IO v6.
|
|
18647
|
-
* (c) 2014-
|
|
19115
|
+
* Engine.IO v6.6.3
|
|
19116
|
+
* (c) 2014-2025 Guillermo Rauch
|
|
18648
19117
|
* Released under the MIT License.
|
|
18649
19118
|
*/
|
|
18650
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define('vendor/engine.io',e):(t="undefined"!=typeof globalThis?globalThis:t||self).eio=e()}(this,(function(){"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function n(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}function o(){return o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},o.apply(this,arguments)}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}function a(t,e){return a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},a(t,e)}function u(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function c(t,e,r){return c=u()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&a(o,r.prototype),o},c.apply(null,arguments)}function p(t){var e="function"==typeof Map?new Map:void 0;return p=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return c(t,arguments,s(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),a(n,t)},p(t)}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function l(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?h(t):e}function f(t){var e=u();return function(){var r,n=s(t);if(e){var o=s(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return l(this,r)}}function d(t,e,r){return d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=s(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(r):o.value}},d(t,e,r||t)}var y=Object.create(null);y.open="0",y.close="1",y.ping="2",y.pong="3",y.message="4",y.upgrade="5",y.noop="6";var v=Object.create(null);Object.keys(y).forEach((function(t){v[y[t]]=t}));for(var m={type:"error",data:"parser error"},g="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),b="function"==typeof ArrayBuffer,k=function(t,e,r){var n,o=t.type,i=t.data;return g&&i instanceof Blob?e?r(i):w(i,r):b&&(i instanceof ArrayBuffer||(n=i,"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer))?e?r(i):w(new Blob([i]),r):r(y[o]+(i||""))},w=function(t,e){var r=new FileReader;return r.onload=function(){var t=r.result.split(",")[1];e("b"+t)},r.readAsDataURL(t)},T="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S="undefined"==typeof Uint8Array?[]:new Uint8Array(256),R=0;R<T.length;R++)S[T.charCodeAt(R)]=R;var x="function"==typeof ArrayBuffer,O=function(t,e){if("string"!=typeof t)return{type:"message",data:P(t,e)};var r=t.charAt(0);return"b"===r?{type:"message",data:E(t.substring(1),e)}:v[r]?t.length>1?{type:v[r],data:t.substring(1)}:{type:v[r]}:m},E=function(t,e){if(x){var r=function(t){var e,r,n,o,i,s=.75*t.length,a=t.length,u=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var c=new ArrayBuffer(s),p=new Uint8Array(c);for(e=0;e<a;e+=4)r=S[t.charCodeAt(e)],n=S[t.charCodeAt(e+1)],o=S[t.charCodeAt(e+2)],i=S[t.charCodeAt(e+3)],p[u++]=r<<2|n>>4,p[u++]=(15&n)<<4|o>>2,p[u++]=(3&o)<<6|63&i;return c}(t);return P(r,e)}return{base64:!0,data:t}},P=function(t,e){return"blob"===e&&t instanceof ArrayBuffer?new Blob([t]):t},B=String.fromCharCode(30);function C(t){if(t)return function(t){for(var e in C.prototype)t[e]=C.prototype[e];return t}(t)}C.prototype.on=C.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},C.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this},C.prototype.off=C.prototype.removeListener=C.prototype.removeAllListeners=C.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,n=this._callbacks["$"+t];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<n.length;o++)if((r=n[o])===e||r.fn===e){n.splice(o,1);break}return 0===n.length&&delete this._callbacks["$"+t],this},C.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(r){n=0;for(var o=(r=r.slice(0)).length;n<o;++n)r[n].apply(this,e)}return this},C.prototype.emitReserved=C.prototype.emit,C.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},C.prototype.hasListeners=function(t){return!!this.listeners(t).length};var L="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function q(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return r.reduce((function(e,r){return t.hasOwnProperty(r)&&(e[r]=t[r]),e}),{})}var A=setTimeout,j=clearTimeout;function _(t,e){e.useNativeTimers?(t.setTimeoutFn=A.bind(L),t.clearTimeoutFn=j.bind(L)):(t.setTimeoutFn=setTimeout.bind(L),t.clearTimeoutFn=clearTimeout.bind(L))}var U,H=function(t){i(n,t);var r=f(n);function n(t,o,i){var s;return e(this,n),(s=r.call(this,t)).description=o,s.context=i,s.type="TransportError",s}return n}(p(Error)),F=function(t){i(o,t);var r=f(o);function o(t){var n;return e(this,o),(n=r.call(this)).writable=!1,_(h(n),t),n.opts=t,n.query=t.query,n.readyState="",n.socket=t.socket,n}return n(o,[{key:"onError",value:function(t,e,r){return d(s(o.prototype),"emitReserved",this).call(this,"error",new H(t,e,r)),this}},{key:"open",value:function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this}},{key:"close",value:function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}},{key:"send",value:function(t){"open"===this.readyState&&this.write(t)}},{key:"onOpen",value:function(){this.readyState="open",this.writable=!0,d(s(o.prototype),"emitReserved",this).call(this,"open")}},{key:"onData",value:function(t){var e=O(t,this.socket.binaryType);this.onPacket(e)}},{key:"onPacket",value:function(t){d(s(o.prototype),"emitReserved",this).call(this,"packet",t)}},{key:"onClose",value:function(t){this.readyState="closed",d(s(o.prototype),"emitReserved",this).call(this,"close",t)}}]),o}(C),D="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),M={},I=0,W=0;function N(t){var e="";do{e=D[t%64]+e,t=Math.floor(t/64)}while(t>0);return e}function X(){var t=N(+new Date);return t!==U?(I=0,U=t):t+"."+N(I++)}for(;W<64;W++)M[D[W]]=W;function $(t){var e="";for(var r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function z(t){for(var e={},r=t.split("&"),n=0,o=r.length;n<o;n++){var i=r[n].split("=");e[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return e}var V=!1;try{V="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}var G=V;function J(t){var e=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!e||G))return new XMLHttpRequest}catch(t){}if(!e)try{return new(L[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}function K(){}var Q=null!=new J({xdomain:!1}).responseType,Y=function(t){i(s,t);var r=f(s);function s(t){var n;if(e(this,s),(n=r.call(this,t)).polling=!1,"undefined"!=typeof location){var o="https:"===location.protocol,i=location.port;i||(i=o?"443":"80"),n.xd="undefined"!=typeof location&&t.hostname!==location.hostname||i!==t.port,n.xs=t.secure!==o}var a=t&&t.forceBase64;return n.supportsBinary=Q&&!a,n}return n(s,[{key:"doOpen",value:function(){this.poll()}},{key:"pause",value:function(t){var e=this;this.readyState="pausing";var r=function(){e.readyState="paused",t()};if(this.polling||!this.writable){var n=0;this.polling&&(n++,this.once("pollComplete",(function(){--n||r()}))),this.writable||(n++,this.once("drain",(function(){--n||r()})))}else r()}},{key:"poll",value:function(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}},{key:"onData",value:function(t){var e=this;(function(t,e){for(var r=t.split(B),n=[],o=0;o<r.length;o++){var i=O(r[o],e);if(n.push(i),"error"===i.type)break}return n})(t,this.socket.binaryType).forEach((function(t){if("opening"===e.readyState&&"open"===t.type&&e.onOpen(),"close"===t.type)return e.onClose({description:"transport closed by the server"}),!1;e.onPacket(t)})),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.poll())}},{key:"doClose",value:function(){var t=this,e=function(){t.write([{type:"close"}])};"open"===this.readyState?e():this.once("open",e)}},{key:"write",value:function(t){var e=this;this.writable=!1,function(t,e){var r=t.length,n=new Array(r),o=0;t.forEach((function(t,i){k(t,!1,(function(t){n[i]=t,++o===r&&e(n.join(B))}))}))}(t,(function(t){e.doWrite(t,(function(){e.writable=!0,e.emitReserved("drain")}))}))}},{key:"uri",value:function(){var t=this.query||{},e=this.opts.secure?"https":"http",r="";!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=X()),this.supportsBinary||t.sid||(t.b64=1),this.opts.port&&("https"===e&&443!==Number(this.opts.port)||"http"===e&&80!==Number(this.opts.port))&&(r=":"+this.opts.port);var n=$(t);return e+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(n.length?"?"+n:"")}},{key:"request",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(t,{xd:this.xd,xs:this.xs},this.opts),new Z(this.uri(),t)}},{key:"doWrite",value:function(t,e){var r=this,n=this.request({method:"POST",data:t});n.on("success",e),n.on("error",(function(t,e){r.onError("xhr post error",t,e)}))}},{key:"doPoll",value:function(){var t=this,e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(function(e,r){t.onError("xhr poll error",e,r)})),this.pollXhr=e}},{key:"name",get:function(){return"polling"}}]),s}(F),Z=function(t){i(o,t);var r=f(o);function o(t,n){var i;return e(this,o),_(h(i=r.call(this)),n),i.opts=n,i.method=n.method||"GET",i.uri=t,i.async=!1!==n.async,i.data=void 0!==n.data?n.data:null,i.create(),i}return n(o,[{key:"create",value:function(){var t=this,e=q(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this.opts.xd,e.xscheme=!!this.opts.xs;var r=this.xhr=new J(e);try{r.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders)for(var n in r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0),this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(n)&&r.setRequestHeader(n,this.opts.extraHeaders[n])}catch(t){}if("POST"===this.method)try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{r.setRequestHeader("Accept","*/*")}catch(t){}"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=function(){4===r.readyState&&(200===r.status||1223===r.status?t.onLoad():t.setTimeoutFn((function(){t.onError("number"==typeof r.status?r.status:0)}),0))},r.send(this.data)}catch(e){return void this.setTimeoutFn((function(){t.onError(e)}),0)}"undefined"!=typeof document&&(this.index=o.requestsCount++,o.requests[this.index]=this)}},{key:"onError",value:function(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}},{key:"cleanup",value:function(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=K,t)try{this.xhr.abort()}catch(t){}"undefined"!=typeof document&&delete o.requests[this.index],this.xhr=null}}},{key:"onLoad",value:function(){var t=this.xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}},{key:"abort",value:function(){this.cleanup()}}]),o}(C);if(Z.requestsCount=0,Z.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",tt);else if("function"==typeof addEventListener){addEventListener("onpagehide"in L?"pagehide":"unload",tt,!1)}function tt(){for(var t in Z.requests)Z.requests.hasOwnProperty(t)&&Z.requests[t].abort()}var et="function"==typeof Promise&&"function"==typeof Promise.resolve?function(t){return Promise.resolve().then(t)}:function(t,e){return e(t,0)},rt=L.WebSocket||L.MozWebSocket,nt="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),ot=function(t){i(o,t);var r=f(o);function o(t){var n;return e(this,o),(n=r.call(this,t)).supportsBinary=!t.forceBase64,n}return n(o,[{key:"doOpen",value:function(){if(this.check()){var t=this.uri(),e=this.opts.protocols,r=nt?{}:q(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=nt?new rt(t,e,r):e?new rt(t,e):new rt(t)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType||"arraybuffer",this.addEventListeners()}}},{key:"addEventListeners",value:function(){var t=this;this.ws.onopen=function(){t.opts.autoUnref&&t.ws._socket.unref(),t.onOpen()},this.ws.onclose=function(e){return t.onClose({description:"websocket connection closed",context:e})},this.ws.onmessage=function(e){return t.onData(e.data)},this.ws.onerror=function(e){return t.onError("websocket error",e)}}},{key:"write",value:function(t){var e=this;this.writable=!1;for(var r=function(r){var n=t[r],o=r===t.length-1;k(n,e.supportsBinary,(function(t){try{e.ws.send(t)}catch(t){}o&&et((function(){e.writable=!0,e.emitReserved("drain")}),e.setTimeoutFn)}))},n=0;n<t.length;n++)r(n)}},{key:"doClose",value:function(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}},{key:"uri",value:function(){var t=this.query||{},e=this.opts.secure?"wss":"ws",r="";this.opts.port&&("wss"===e&&443!==Number(this.opts.port)||"ws"===e&&80!==Number(this.opts.port))&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=X()),this.supportsBinary||(t.b64=1);var n=$(t);return e+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(n.length?"?"+n:"")}},{key:"check",value:function(){return!!rt}},{key:"name",get:function(){return"websocket"}}]),o}(F),it={websocket:ot,polling:Y},st=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,at=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function ut(t){var e=t,r=t.indexOf("["),n=t.indexOf("]");-1!=r&&-1!=n&&(t=t.substring(0,r)+t.substring(r,n).replace(/:/g,";")+t.substring(n,t.length));for(var o,i,s=st.exec(t||""),a={},u=14;u--;)a[at[u]]=s[u]||"";return-1!=r&&-1!=n&&(a.source=e,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=function(t,e){var r=/\/{2,9}/g,n=e.replace(r,"/").split("/");"/"!=e.substr(0,1)&&0!==e.length||n.splice(0,1);"/"==e.substr(e.length-1,1)&&n.splice(n.length-1,1);return n}(0,a.path),a.queryKey=(o=a.query,i={},o.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(t,e,r){e&&(i[e]=r)})),i),a}var ct=function(r){i(a,r);var s=f(a);function a(r){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,a),n=s.call(this),r&&"object"===t(r)&&(i=r,r=null),r?(r=ut(r),i.hostname=r.host,i.secure="https"===r.protocol||"wss"===r.protocol,i.port=r.port,r.query&&(i.query=r.query)):i.host&&(i.hostname=ut(i.host).host),_(h(n),i),n.secure=null!=i.secure?i.secure:"undefined"!=typeof location&&"https:"===location.protocol,i.hostname&&!i.port&&(i.port=n.secure?"443":"80"),n.hostname=i.hostname||("undefined"!=typeof location?location.hostname:"localhost"),n.port=i.port||("undefined"!=typeof location&&location.port?location.port:n.secure?"443":"80"),n.transports=i.transports||["polling","websocket"],n.readyState="",n.writeBuffer=[],n.prevBufferLen=0,n.opts=o({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},i),n.opts.path=n.opts.path.replace(/\/$/,"")+"/","string"==typeof n.opts.query&&(n.opts.query=z(n.opts.query)),n.id=null,n.upgrades=null,n.pingInterval=null,n.pingTimeout=null,n.pingTimeoutTimer=null,"function"==typeof addEventListener&&(n.opts.closeOnBeforeunload&&addEventListener("beforeunload",(function(){n.transport&&(n.transport.removeAllListeners(),n.transport.close())}),!1),"localhost"!==n.hostname&&(n.offlineEventListener=function(){n.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",n.offlineEventListener,!1))),n.open(),n}return n(a,[{key:"createTransport",value:function(t){var e=o({},this.opts.query);e.EIO=4,e.transport=t,this.id&&(e.sid=this.id);var r=o({},this.opts.transportOptions[t],this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new it[t](r)}},{key:"open",value:function(){var t,e=this;if(this.opts.rememberUpgrade&&a.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((function(){e.emitReserved("error","No transports available")}),0);t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)}},{key:"setTransport",value:function(t){var e=this;this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(function(t){return e.onClose("transport close",t)}))}},{key:"probe",value:function(t){var e=this,r=this.createTransport(t),n=!1;a.priorWebsocketSuccess=!1;var o=function(){n||(r.send([{type:"ping",data:"probe"}]),r.once("packet",(function(t){if(!n)if("pong"===t.type&&"probe"===t.data){if(e.upgrading=!0,e.emitReserved("upgrading",r),!r)return;a.priorWebsocketSuccess="websocket"===r.name,e.transport.pause((function(){n||"closed"!==e.readyState&&(h(),e.setTransport(r),r.send([{type:"upgrade"}]),e.emitReserved("upgrade",r),r=null,e.upgrading=!1,e.flush())}))}else{var o=new Error("probe error");o.transport=r.name,e.emitReserved("upgradeError",o)}})))};function i(){n||(n=!0,h(),r.close(),r=null)}var s=function(t){var n=new Error("probe error: "+t);n.transport=r.name,i(),e.emitReserved("upgradeError",n)};function u(){s("transport closed")}function c(){s("socket closed")}function p(t){r&&t.name!==r.name&&i()}var h=function(){r.removeListener("open",o),r.removeListener("error",s),r.removeListener("close",u),e.off("close",c),e.off("upgrading",p)};r.once("open",o),r.once("error",s),r.once("close",u),this.once("close",c),this.once("upgrading",p),r.open()}},{key:"onOpen",value:function(){if(this.readyState="open",a.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade&&this.transport.pause)for(var t=0,e=this.upgrades.length;t<e;t++)this.probe(this.upgrades[t])}},{key:"onPacket",value:function(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.resetPingTimeout(),this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":var e=new Error("server error");e.code=t.data,this.onError(e);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data)}}},{key:"onHandshake",value:function(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.resetPingTimeout()}},{key:"resetPingTimeout",value:function(){var t=this;this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn((function(){t.onClose("ping timeout")}),this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}},{key:"onDrain",value:function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}},{key:"flush",value:function(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){var t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}},{key:"getWritablePackets",value:function(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;for(var t,e=1,r=0;r<this.writeBuffer.length;r++){var n=this.writeBuffer[r].data;if(n&&(e+="string"==typeof(t=n)?function(t){for(var e=0,r=0,n=0,o=t.length;n<o;n++)(e=t.charCodeAt(n))<128?r+=1:e<2048?r+=2:e<55296||e>=57344?r+=3:(n++,r+=4);return r}(t):Math.ceil(1.33*(t.byteLength||t.size))),r>0&&e>this.maxPayload)return this.writeBuffer.slice(0,r);e+=2}return this.writeBuffer}},{key:"write",value:function(t,e,r){return this.sendPacket("message",t,e,r),this}},{key:"send",value:function(t,e,r){return this.sendPacket("message",t,e,r),this}},{key:"sendPacket",value:function(t,e,r,n){if("function"==typeof e&&(n=e,e=void 0),"function"==typeof r&&(n=r,r=null),"closing"!==this.readyState&&"closed"!==this.readyState){(r=r||{}).compress=!1!==r.compress;var o={type:t,data:e,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),n&&this.once("flush",n),this.flush()}}},{key:"close",value:function(){var t=this,e=function(){t.onClose("forced close"),t.transport.close()},r=function r(){t.off("upgrade",r),t.off("upgradeError",r),e()},n=function(){t.once("upgrade",r),t.once("upgradeError",r)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(function(){t.upgrading?n():e()})):this.upgrading?n():e()),this}},{key:"onError",value:function(t){a.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}},{key:"onClose",value:function(t,e){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&removeEventListener("offline",this.offlineEventListener,!1),this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this.prevBufferLen=0)}},{key:"filterUpgrades",value:function(t){for(var e=[],r=0,n=t.length;r<n;r++)~this.transports.indexOf(t[r])&&e.push(t[r]);return e}}]),a}(C);ct.protocol=4;return function(t,e){return new ct(t,e)}}));
|
|
19119
|
+
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define('vendor/engine.io',n):(t="undefined"!=typeof globalThis?globalThis:t||self).eio=n()}(this,(function(){"use strict";function t(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,u(r.key),r)}}function n(n,i,r){return i&&t(n.prototype,i),r&&t(n,r),Object.defineProperty(n,"prototype",{writable:!1}),n}function i(){return i=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var r in i)({}).hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t},i.apply(null,arguments)}function r(t){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},r(t)}function e(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n)}function o(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(o=function(){return!!t})()}function s(t,n){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},s(t,n)}function u(t){var n=function(t,n){if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==typeof n?n:n+""}function f(t){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(t)}function h(t){var n="function"==typeof Map?new Map:void 0;return h=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(n){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(t))return n.get(t);n.set(t,i)}function i(){return function(t,n,i){if(o())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,n);var e=new(t.bind.apply(t,r));return i&&s(e,i.prototype),e}(t,arguments,r(this).constructor)}return i.prototype=Object.create(t.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),s(i,t)},h(t)}var c=Object.create(null);c.open="0",c.close="1",c.ping="2",c.pong="3",c.message="4",c.upgrade="5",c.noop="6";var a=Object.create(null);Object.keys(c).forEach((function(t){a[c[t]]=t}));var p,l={type:"error",data:"parser error"},v="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),d="function"==typeof ArrayBuffer,y=function(t){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer},b=function(t,n,i){var r=t.type,e=t.data;return v&&e instanceof Blob?n?i(e):g(e,i):d&&(e instanceof ArrayBuffer||y(e))?n?i(e):g(new Blob([e]),i):i(c[r]+(e||""))},g=function(t,n){var i=new FileReader;return i.onload=function(){var t=i.result.split(",")[1];n("b"+(t||""))},i.readAsDataURL(t)};function w(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}for(var m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",k="undefined"==typeof Uint8Array?[]:new Uint8Array(256),A=0;A<64;A++)k[m.charCodeAt(A)]=A;var j,B="function"==typeof ArrayBuffer,E=function(t,n){if("string"!=typeof t)return{type:"message",data:U(t,n)};var i=t.charAt(0);return"b"===i?{type:"message",data:O(t.substring(1),n)}:a[i]?t.length>1?{type:a[i],data:t.substring(1)}:{type:a[i]}:l},O=function(t,n){if(B){var i=function(t){var n,i,r,e,o,s=.75*t.length,u=t.length,f=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var h=new ArrayBuffer(s),c=new Uint8Array(h);for(n=0;n<u;n+=4)i=k[t.charCodeAt(n)],r=k[t.charCodeAt(n+1)],e=k[t.charCodeAt(n+2)],o=k[t.charCodeAt(n+3)],c[f++]=i<<2|r>>4,c[f++]=(15&r)<<4|e>>2,c[f++]=(3&e)<<6|63&o;return h}(t);return U(i,n)}return{base64:!0,data:t}},U=function(t,n){return"blob"===n?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer},T=String.fromCharCode(30);function S(){return new TransformStream({transform:function(t,n){!function(t,n){v&&t.data instanceof Blob?t.data.arrayBuffer().then(w).then(n):d&&(t.data instanceof ArrayBuffer||y(t.data))?n(w(t.data)):b(t,!1,(function(t){p||(p=new TextEncoder),n(p.encode(t))}))}(t,(function(i){var r,e=i.length;if(e<126)r=new Uint8Array(1),new DataView(r.buffer).setUint8(0,e);else if(e<65536){r=new Uint8Array(3);var o=new DataView(r.buffer);o.setUint8(0,126),o.setUint16(1,e)}else{r=new Uint8Array(9);var s=new DataView(r.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(e))}t.data&&"string"!=typeof t.data&&(r[0]|=128),n.enqueue(r),n.enqueue(i)}))}})}function M(t){return t.reduce((function(t,n){return t+n.length}),0)}function x(t,n){if(t[0].length===n)return t.shift();for(var i=new Uint8Array(n),r=0,e=0;e<n;e++)i[e]=t[0][r++],r===t[0].length&&(t.shift(),r=0);return t.length&&r<t[0].length&&(t[0]=t[0].slice(r)),i}function C(t){if(t)return function(t){for(var n in C.prototype)t[n]=C.prototype[n];return t}(t)}C.prototype.on=C.prototype.addEventListener=function(t,n){return this.t=this.t||{},(this.t["$"+t]=this.t["$"+t]||[]).push(n),this},C.prototype.once=function(t,n){function i(){this.off(t,i),n.apply(this,arguments)}return i.fn=n,this.on(t,i),this},C.prototype.off=C.prototype.removeListener=C.prototype.removeAllListeners=C.prototype.removeEventListener=function(t,n){if(this.t=this.t||{},0==arguments.length)return this.t={},this;var i,r=this.t["$"+t];if(!r)return this;if(1==arguments.length)return delete this.t["$"+t],this;for(var e=0;e<r.length;e++)if((i=r[e])===n||i.fn===n){r.splice(e,1);break}return 0===r.length&&delete this.t["$"+t],this},C.prototype.emit=function(t){this.t=this.t||{};for(var n=new Array(arguments.length-1),i=this.t["$"+t],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(i){r=0;for(var e=(i=i.slice(0)).length;r<e;++r)i[r].apply(this,n)}return this},C.prototype.emitReserved=C.prototype.emit,C.prototype.listeners=function(t){return this.t=this.t||{},this.t["$"+t]||[]},C.prototype.hasListeners=function(t){return!!this.listeners(t).length};var L="function"==typeof Promise&&"function"==typeof Promise.resolve?function(t){return Promise.resolve().then(t)}:function(t,n){return n(t,0)},R="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function D(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return i.reduce((function(n,i){return t.hasOwnProperty(i)&&(n[i]=t[i]),n}),{})}var P=R.setTimeout,I=R.clearTimeout;function $(t,n){n.useNativeTimers?(t.setTimeoutFn=P.bind(R),t.clearTimeoutFn=I.bind(R)):(t.setTimeoutFn=R.setTimeout.bind(R),t.clearTimeoutFn=R.clearTimeout.bind(R))}function q(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}var N=function(t){function n(n,i,r){var e;return(e=t.call(this,n)||this).description=i,e.context=r,e.type="TransportError",e}return e(n,t),n}(h(Error)),V=function(t){function n(n){var i;return(i=t.call(this)||this).writable=!1,$(i,n),i.opts=n,i.query=n.query,i.socket=n.socket,i.supportsBinary=!n.forceBase64,i}e(n,t);var i=n.prototype;return i.onError=function(n,i,r){return t.prototype.emitReserved.call(this,"error",new N(n,i,r)),this},i.open=function(){return this.readyState="opening",this.doOpen(),this},i.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},i.send=function(t){"open"===this.readyState&&this.write(t)},i.onOpen=function(){this.readyState="open",this.writable=!0,t.prototype.emitReserved.call(this,"open")},i.onData=function(t){var n=E(t,this.socket.binaryType);this.onPacket(n)},i.onPacket=function(n){t.prototype.emitReserved.call(this,"packet",n)},i.onClose=function(n){this.readyState="closed",t.prototype.emitReserved.call(this,"close",n)},i.pause=function(t){},i.createUri=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t+"://"+this.i()+this.o()+this.opts.path+this.u(n)},i.i=function(){var t=this.opts.hostname;return-1===t.indexOf(":")?t:"["+t+"]"},i.o=function(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""},i.u=function(t){var n=function(t){var n="";for(var i in t)t.hasOwnProperty(i)&&(n.length&&(n+="&"),n+=encodeURIComponent(i)+"="+encodeURIComponent(t[i]));return n}(t);return n.length?"?"+n:""},n}(C),X=function(t){function i(){var n;return(n=t.apply(this,arguments)||this).h=!1,n}e(i,t);var r=i.prototype;return r.doOpen=function(){this.p()},r.pause=function(t){var n=this;this.readyState="pausing";var i=function(){n.readyState="paused",t()};if(this.h||!this.writable){var r=0;this.h&&(r++,this.once("pollComplete",(function(){--r||i()}))),this.writable||(r++,this.once("drain",(function(){--r||i()})))}else i()},r.p=function(){this.h=!0,this.doPoll(),this.emitReserved("poll")},r.onData=function(t){var n=this;(function(t,n){for(var i=t.split(T),r=[],e=0;e<i.length;e++){var o=E(i[e],n);if(r.push(o),"error"===o.type)break}return r})(t,this.socket.binaryType).forEach((function(t){if("opening"===n.readyState&&"open"===t.type&&n.onOpen(),"close"===t.type)return n.onClose({description:"transport closed by the server"}),!1;n.onPacket(t)})),"closed"!==this.readyState&&(this.h=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.p())},r.doClose=function(){var t=this,n=function(){t.write([{type:"close"}])};"open"===this.readyState?n():this.once("open",n)},r.write=function(t){var n=this;this.writable=!1,function(t,n){var i=t.length,r=new Array(i),e=0;t.forEach((function(t,o){b(t,!1,(function(t){r[o]=t,++e===i&&n(r.join(T))}))}))}(t,(function(t){n.doWrite(t,(function(){n.writable=!0,n.emitReserved("drain")}))}))},r.uri=function(){var t=this.opts.secure?"https":"http",n=this.query||{};return!1!==this.opts.timestampRequests&&(n[this.opts.timestampParam]=q()),this.supportsBinary||n.sid||(n.b64=1),this.createUri(t,n)},n(i,[{key:"name",get:function(){return"polling"}}])}(V),H=!1;try{H="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}var F=H;function z(){}var G=function(t){function n(n){var i;if(i=t.call(this,n)||this,"undefined"!=typeof location){var r="https:"===location.protocol,e=location.port;e||(e=r?"443":"80"),i.xd="undefined"!=typeof location&&n.hostname!==location.hostname||e!==n.port}return i}e(n,t);var i=n.prototype;return i.doWrite=function(t,n){var i=this,r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(function(t,n){i.onError("xhr post error",t,n)}))},i.doPoll=function(){var t=this,n=this.request();n.on("data",this.onData.bind(this)),n.on("error",(function(n,i){t.onError("xhr poll error",n,i)})),this.pollXhr=n},n}(X),J=function(t){function n(n,i,r){var e;return(e=t.call(this)||this).createRequest=n,$(e,r),e.l=r,e.v=r.method||"GET",e.m=i,e.k=void 0!==r.data?r.data:null,e.A(),e}e(n,t);var i=n.prototype;return i.A=function(){var t,i=this,r=D(this.l,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this.l.xd;var e=this.j=this.createRequest(r);try{e.open(this.v,this.m,!0);try{if(this.l.extraHeaders)for(var o in e.setDisableHeaderCheck&&e.setDisableHeaderCheck(!0),this.l.extraHeaders)this.l.extraHeaders.hasOwnProperty(o)&&e.setRequestHeader(o,this.l.extraHeaders[o])}catch(t){}if("POST"===this.v)try{e.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{e.setRequestHeader("Accept","*/*")}catch(t){}null===(t=this.l.cookieJar)||void 0===t||t.addCookies(e),"withCredentials"in e&&(e.withCredentials=this.l.withCredentials),this.l.requestTimeout&&(e.timeout=this.l.requestTimeout),e.onreadystatechange=function(){var t;3===e.readyState&&(null===(t=i.l.cookieJar)||void 0===t||t.parseCookies(e.getResponseHeader("set-cookie"))),4===e.readyState&&(200===e.status||1223===e.status?i.B():i.setTimeoutFn((function(){i.O("number"==typeof e.status?e.status:0)}),0))},e.send(this.k)}catch(t){return void this.setTimeoutFn((function(){i.O(t)}),0)}"undefined"!=typeof document&&(this.U=n.requestsCount++,n.requests[this.U]=this)},i.O=function(t){this.emitReserved("error",t,this.j),this.T(!0)},i.T=function(t){if(void 0!==this.j&&null!==this.j){if(this.j.onreadystatechange=z,t)try{this.j.abort()}catch(t){}"undefined"!=typeof document&&delete n.requests[this.U],this.j=null}},i.B=function(){var t=this.j.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this.T())},i.abort=function(){this.T()},n}(C);if(J.requestsCount=0,J.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",W);else if("function"==typeof addEventListener){addEventListener("onpagehide"in R?"pagehide":"unload",W,!1)}function W(){for(var t in J.requests)J.requests.hasOwnProperty(t)&&J.requests[t].abort()}var K,Q=(K=Z({xdomain:!1}))&&null!==K.responseType,Y=function(t){function n(n){var i;i=t.call(this,n)||this;var r=n&&n.forceBase64;return i.supportsBinary=Q&&!r,i}return e(n,t),n.prototype.request=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(t,{xd:this.xd},this.opts),new J(Z,this.uri(),t)},n}(G);function Z(t){var n=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!n||F))return new XMLHttpRequest}catch(t){}if(!n)try{return new(R[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}var _="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),tt=function(t){function i(){return t.apply(this,arguments)||this}e(i,t);var r=i.prototype;return r.doOpen=function(){var t=this.uri(),n=this.opts.protocols,i=_?{}:D(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,i)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()},r.addEventListeners=function(){var t=this;this.ws.onopen=function(){t.opts.autoUnref&&t.ws.S.unref(),t.onOpen()},this.ws.onclose=function(n){return t.onClose({description:"websocket connection closed",context:n})},this.ws.onmessage=function(n){return t.onData(n.data)},this.ws.onerror=function(n){return t.onError("websocket error",n)}},r.write=function(t){var n=this;this.writable=!1;for(var i=function(){var i=t[r],e=r===t.length-1;b(i,n.supportsBinary,(function(t){try{n.doWrite(i,t)}catch(t){}e&&L((function(){n.writable=!0,n.emitReserved("drain")}),n.setTimeoutFn)}))},r=0;r<t.length;r++)i()},r.doClose=function(){void 0!==this.ws&&(this.ws.onerror=function(){},this.ws.close(),this.ws=null)},r.uri=function(){var t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=q()),this.supportsBinary||(n.b64=1),this.createUri(t,n)},n(i,[{key:"name",get:function(){return"websocket"}}])}(V),nt=R.WebSocket||R.MozWebSocket,it=function(t){function n(){return t.apply(this,arguments)||this}e(n,t);var i=n.prototype;return i.createSocket=function(t,n,i){return _?new nt(t,n,i):n?new nt(t,n):new nt(t)},i.doWrite=function(t,n){this.ws.send(n)},n}(tt),rt=function(t){function i(){return t.apply(this,arguments)||this}e(i,t);var r=i.prototype;return r.doOpen=function(){var t=this;try{this.M=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this.M.closed.then((function(){t.onClose()})).catch((function(n){t.onError("webtransport error",n)})),this.M.ready.then((function(){t.M.createBidirectionalStream().then((function(n){var i=function(t,n){j||(j=new TextDecoder);var i=[],r=0,e=-1,o=!1;return new TransformStream({transform:function(s,u){for(i.push(s);;){if(0===r){if(M(i)<1)break;var f=x(i,1);o=!(128&~f[0]),e=127&f[0],r=e<126?3:126===e?1:2}else if(1===r){if(M(i)<2)break;var h=x(i,2);e=new DataView(h.buffer,h.byteOffset,h.length).getUint16(0),r=3}else if(2===r){if(M(i)<8)break;var c=x(i,8),a=new DataView(c.buffer,c.byteOffset,c.length),p=a.getUint32(0);if(p>Math.pow(2,21)-1){u.enqueue(l);break}e=p*Math.pow(2,32)+a.getUint32(4),r=3}else{if(M(i)<e)break;var v=x(i,e);u.enqueue(E(o?v:j.decode(v),n)),r=0}if(0===e||e>t){u.enqueue(l);break}}}})}(Number.MAX_SAFE_INTEGER,t.socket.binaryType),r=n.readable.pipeThrough(i).getReader(),e=S();e.readable.pipeTo(n.writable),t.C=e.writable.getWriter();!function n(){r.read().then((function(i){var r=i.done,e=i.value;r||(t.onPacket(e),n())})).catch((function(t){}))}();var o={type:"open"};t.query.sid&&(o.data='{"sid":"'.concat(t.query.sid,'"}')),t.C.write(o).then((function(){return t.onOpen()}))}))}))},r.write=function(t){var n=this;this.writable=!1;for(var i=function(){var i=t[r],e=r===t.length-1;n.C.write(i).then((function(){e&&L((function(){n.writable=!0,n.emitReserved("drain")}),n.setTimeoutFn)}))},r=0;r<t.length;r++)i()},r.doClose=function(){var t;null===(t=this.M)||void 0===t||t.close()},n(i,[{key:"name",get:function(){return"webtransport"}}])}(V),et={websocket:it,webtransport:rt,polling:Y},ot=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,st=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function ut(t){if(t.length>8e3)throw"URI too long";var n=t,i=t.indexOf("["),r=t.indexOf("]");-1!=i&&-1!=r&&(t=t.substring(0,i)+t.substring(i,r).replace(/:/g,";")+t.substring(r,t.length));for(var e,o,s=ot.exec(t||""),u={},f=14;f--;)u[st[f]]=s[f]||"";return-1!=i&&-1!=r&&(u.source=n,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=function(t,n){var i=/\/{2,9}/g,r=n.replace(i,"/").split("/");"/"!=n.slice(0,1)&&0!==n.length||r.splice(0,1);"/"==n.slice(-1)&&r.splice(r.length-1,1);return r}(0,u.path),u.queryKey=(e=u.query,o={},e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(t,n,i){n&&(o[n]=i)})),o),u}var ft="function"==typeof addEventListener&&"function"==typeof removeEventListener,ht=[];ft&&addEventListener("offline",(function(){ht.forEach((function(t){return t()}))}),!1);var ct=function(t){function n(n,r){var e;if((e=t.call(this)||this).binaryType="arraybuffer",e.writeBuffer=[],e.L=0,e.R=-1,e.D=-1,e.P=-1,e.I=1/0,n&&"object"===f(n)&&(r=n,n=null),n){var o=ut(n);r.hostname=o.host,r.secure="https"===o.protocol||"wss"===o.protocol,r.port=o.port,o.query&&(r.query=o.query)}else r.host&&(r.hostname=ut(r.host).host);return $(e,r),e.secure=null!=r.secure?r.secure:"undefined"!=typeof location&&"https:"===location.protocol,r.hostname&&!r.port&&(r.port=e.secure?"443":"80"),e.hostname=r.hostname||("undefined"!=typeof location?location.hostname:"localhost"),e.port=r.port||("undefined"!=typeof location&&location.port?location.port:e.secure?"443":"80"),e.transports=[],e.$={},r.transports.forEach((function(t){var n=t.prototype.name;e.transports.push(n),e.$[n]=t})),e.opts=i({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),e.opts.path=e.opts.path.replace(/\/$/,"")+(e.opts.addTrailingSlash?"/":""),"string"==typeof e.opts.query&&(e.opts.query=function(t){for(var n={},i=t.split("&"),r=0,e=i.length;r<e;r++){var o=i[r].split("=");n[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return n}(e.opts.query)),ft&&(e.opts.closeOnBeforeunload&&(e.q=function(){e.transport&&(e.transport.removeAllListeners(),e.transport.close())},addEventListener("beforeunload",e.q,!1)),"localhost"!==e.hostname&&(e.N=function(){e.V("transport close",{description:"network connection lost"})},ht.push(e.N))),e.opts.withCredentials&&(e.X=void 0),e.H(),e}e(n,t);var r=n.prototype;return r.createTransport=function(t){var n=i({},this.opts.query);n.EIO=4,n.transport=t,this.id&&(n.sid=this.id);var r=i({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this.$[t](r)},r.H=function(){var t=this;if(0!==this.transports.length){var i=this.opts.rememberUpgrade&&n.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";var r=this.createTransport(i);r.open(),this.setTransport(r)}else this.setTimeoutFn((function(){t.emitReserved("error","No transports available")}),0)},r.setTransport=function(t){var n=this;this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.F.bind(this)).on("packet",this.G.bind(this)).on("error",this.O.bind(this)).on("close",(function(t){return n.V("transport close",t)}))},r.onOpen=function(){this.readyState="open",n.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()},r.G=function(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.J("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this.W();break;case"error":var n=new Error("server error");n.code=t.data,this.O(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data)}},r.onHandshake=function(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.R=t.pingInterval,this.D=t.pingTimeout,this.P=t.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.W()},r.W=function(){var t=this;this.clearTimeoutFn(this.K);var n=this.R+this.D;this.I=Date.now()+n,this.K=this.setTimeoutFn((function(){t.V("ping timeout")}),n),this.opts.autoUnref&&this.K.unref()},r.F=function(){this.writeBuffer.splice(0,this.L),this.L=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()},r.flush=function(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){var t=this.Y();this.transport.send(t),this.L=t.length,this.emitReserved("flush")}},r.Y=function(){if(!(this.P&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;for(var t,n=1,i=0;i<this.writeBuffer.length;i++){var r=this.writeBuffer[i].data;if(r&&(n+="string"==typeof(t=r)?function(t){for(var n=0,i=0,r=0,e=t.length;r<e;r++)(n=t.charCodeAt(r))<128?i+=1:n<2048?i+=2:n<55296||n>=57344?i+=3:(r++,i+=4);return i}(t):Math.ceil(1.33*(t.byteLength||t.size))),i>0&&n>this.P)return this.writeBuffer.slice(0,i);n+=2}return this.writeBuffer},r.Z=function(){var t=this;if(!this.I)return!0;var n=Date.now()>this.I;return n&&(this.I=0,L((function(){t.V("ping timeout")}),this.setTimeoutFn)),n},r.write=function(t,n,i){return this.J("message",t,n,i),this},r.send=function(t,n,i){return this.J("message",t,n,i),this},r.J=function(t,n,i,r){if("function"==typeof n&&(r=n,n=void 0),"function"==typeof i&&(r=i,i=null),"closing"!==this.readyState&&"closed"!==this.readyState){(i=i||{}).compress=!1!==i.compress;var e={type:t,data:n,options:i};this.emitReserved("packetCreate",e),this.writeBuffer.push(e),r&&this.once("flush",r),this.flush()}},r.close=function(){var t=this,n=function(){t.V("forced close"),t.transport.close()},i=function i(){t.off("upgrade",i),t.off("upgradeError",i),n()},r=function(){t.once("upgrade",i),t.once("upgradeError",i)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(function(){t.upgrading?r():n()})):this.upgrading?r():n()),this},r.O=function(t){if(n.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this.H();this.emitReserved("error",t),this.V("transport error",t)},r.V=function(t,n){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this.K),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),ft&&(this.q&&removeEventListener("beforeunload",this.q,!1),this.N)){var i=ht.indexOf(this.N);-1!==i&&ht.splice(i,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.L=0}},n}(C);ct.protocol=4;var at=function(t){function n(){var n;return(n=t.apply(this,arguments)||this)._=[],n}e(n,t);var i=n.prototype;return i.onOpen=function(){if(t.prototype.onOpen.call(this),"open"===this.readyState&&this.opts.upgrade)for(var n=0;n<this._.length;n++)this.tt(this._[n])},i.tt=function(t){var n=this,i=this.createTransport(t),r=!1;ct.priorWebsocketSuccess=!1;var e=function(){r||(i.send([{type:"ping",data:"probe"}]),i.once("packet",(function(t){if(!r)if("pong"===t.type&&"probe"===t.data){if(n.upgrading=!0,n.emitReserved("upgrading",i),!i)return;ct.priorWebsocketSuccess="websocket"===i.name,n.transport.pause((function(){r||"closed"!==n.readyState&&(c(),n.setTransport(i),i.send([{type:"upgrade"}]),n.emitReserved("upgrade",i),i=null,n.upgrading=!1,n.flush())}))}else{var e=new Error("probe error");e.transport=i.name,n.emitReserved("upgradeError",e)}})))};function o(){r||(r=!0,c(),i.close(),i=null)}var s=function(t){var r=new Error("probe error: "+t);r.transport=i.name,o(),n.emitReserved("upgradeError",r)};function u(){s("transport closed")}function f(){s("socket closed")}function h(t){i&&t.name!==i.name&&o()}var c=function(){i.removeListener("open",e),i.removeListener("error",s),i.removeListener("close",u),n.off("close",f),n.off("upgrading",h)};i.once("open",e),i.once("error",s),i.once("close",u),this.once("close",f),this.once("upgrading",h),-1!==this._.indexOf("webtransport")&&"webtransport"!==t?this.setTimeoutFn((function(){r||i.open()}),200):i.open()},i.onHandshake=function(n){this._=this.nt(n.upgrades),t.prototype.onHandshake.call(this,n)},i.nt=function(t){for(var n=[],i=0;i<t.length;i++)~this.transports.indexOf(t[i])&&n.push(t[i]);return n},n}(ct),pt=function(t){function n(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r="object"===f(n)?n:i;return(!r.transports||r.transports&&"string"==typeof r.transports[0])&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map((function(t){return et[t]})).filter((function(t){return!!t}))),t.call(this,n,r)||this}return e(n,t),n}(at);return function(t,n){return new pt(t,n)}}));
|
|
18651
19120
|
//# sourceMappingURL=engine.io.min.js.map
|
|
18652
19121
|
;
|
|
18653
19122
|
function BindingHelper(handlerContext) {
|
|
@@ -18743,12 +19212,13 @@ function BindingHelper(handlerContext) {
|
|
|
18743
19212
|
define( 'helpers/binding',[],function() { return BindingHelper });
|
|
18744
19213
|
/*
|
|
18745
19214
|
* This file is part of the gina package.
|
|
18746
|
-
* Copyright (c) 2009-
|
|
19215
|
+
* Copyright (c) 2009-2025 Rhinostone <contact@gina.io>
|
|
18747
19216
|
*
|
|
18748
19217
|
* For the full copyright and license information, please view the LICENSE
|
|
18749
19218
|
* file that was distributed with this source code.
|
|
18750
19219
|
*/
|
|
18751
19220
|
|
|
19221
|
+
|
|
18752
19222
|
// nodejs dependencies
|
|
18753
19223
|
if ( typeof(module) !== 'undefined' && module.exports) {
|
|
18754
19224
|
var fs = require('fs');
|
|
@@ -18786,8 +19256,10 @@ function Domain(options, cb) {
|
|
|
18786
19256
|
var isGFFCtx = ( ( typeof(module) !== 'undefined' ) && module.exports ) ? false : true;
|
|
18787
19257
|
// Detect if user is on IE browser
|
|
18788
19258
|
var isIE = false;
|
|
19259
|
+
var defaultUrl = "/_gina/assets/public_suffix_list.dat";
|
|
18789
19260
|
if (isGFFCtx) {
|
|
18790
19261
|
isIE = !!window.MSInputMethodContext && !!document.documentMode;
|
|
19262
|
+
defaultUrl = gina.config.webroot + defaultUrl.substring(1);
|
|
18791
19263
|
}
|
|
18792
19264
|
|
|
18793
19265
|
if ( typeof(arguments[0]) == 'function' ) {
|
|
@@ -18799,20 +19271,31 @@ function Domain(options, cb) {
|
|
|
18799
19271
|
// if isGFFCtx, should be place in the public folder to be served by your own host
|
|
18800
19272
|
// e.g.: "./public_suffix_list.dat" located under "/my-www-folder/"
|
|
18801
19273
|
filename : "../dist/public_suffix_list.dat",
|
|
18802
|
-
url :
|
|
19274
|
+
url : defaultUrl,
|
|
19275
|
+
// url : "https://publicsuffix.org/list/public_suffix_list.dat",
|
|
18803
19276
|
alternativeUrl : "https://raw.githubusercontent.com/publicsuffix/list/master/public_suffix_list.dat",
|
|
18804
19277
|
// only available from backend calls
|
|
18805
19278
|
isCachingRequired : false,
|
|
18806
19279
|
isUpdating : false
|
|
18807
19280
|
}
|
|
18808
19281
|
|
|
19282
|
+
if (
|
|
19283
|
+
!isGFFCtx
|
|
19284
|
+
&& typeof(options) != 'undefined'
|
|
19285
|
+
&& typeof(options.webroot) != 'undefined'
|
|
19286
|
+
) {
|
|
19287
|
+
defaultOptions.url = options.webroot + defaultUrl.substring(1);
|
|
19288
|
+
}
|
|
19289
|
+
|
|
19290
|
+
// Get the commit version
|
|
19291
|
+
// cat ./framework/v0.1.6-alpha.83/core/asset/data/public_suffix_list.dat|grep 'COMMIT:'|sed 's/^\/\/ COMMIT\: //'
|
|
19292
|
+
|
|
18809
19293
|
var self = {
|
|
18810
19294
|
options : null,
|
|
18811
19295
|
rawPSL : null,
|
|
18812
19296
|
PSL : [],
|
|
18813
19297
|
};
|
|
18814
19298
|
|
|
18815
|
-
|
|
18816
19299
|
var init = function(proto, options, cb) {
|
|
18817
19300
|
if ( typeof(options) == 'undefined' ) {
|
|
18818
19301
|
options = defaultOptions
|
|
@@ -18843,9 +19326,8 @@ function Domain(options, cb) {
|
|
|
18843
19326
|
return
|
|
18844
19327
|
}
|
|
18845
19328
|
|
|
18846
|
-
console.debug('[DOMAIN] PSL Loaded');
|
|
19329
|
+
console.debug('[DOMAIN][CB] PSL Loaded');
|
|
18847
19330
|
// return proto
|
|
18848
|
-
|
|
18849
19331
|
cb(err, proto)
|
|
18850
19332
|
});
|
|
18851
19333
|
}
|
|
@@ -19045,7 +19527,7 @@ function Domain(options, cb) {
|
|
|
19045
19527
|
return host
|
|
19046
19528
|
}
|
|
19047
19529
|
|
|
19048
|
-
console.debug('[DOMAIN][getFQDN]
|
|
19530
|
+
console.debug('[DOMAIN][getFQDN] FQDN: ' + host);
|
|
19049
19531
|
var ipObj = null
|
|
19050
19532
|
, err = null
|
|
19051
19533
|
;
|
|
@@ -19094,6 +19576,7 @@ function Domain(options, cb) {
|
|
|
19094
19576
|
if ( typeof(jsonFormat) == 'undefined' ) {
|
|
19095
19577
|
jsonFormat = false
|
|
19096
19578
|
}
|
|
19579
|
+
urlOrHostname = urlOrHostname.trim();
|
|
19097
19580
|
var isSLD = false
|
|
19098
19581
|
, isRegisteredTldOrSld = false
|
|
19099
19582
|
, rootDomain = urlOrHostname.replace(/^(.*)\:\/\/|\/(.*)/g, '')
|
|
@@ -19739,13 +20222,15 @@ define('gina/link', [ 'require', 'jquery', 'vendor/uuid', 'lib/domain', 'lib/mer
|
|
|
19739
20222
|
instance.getLinkByUrl = getLinkByUrl;
|
|
19740
20223
|
}
|
|
19741
20224
|
|
|
19742
|
-
|
|
19743
|
-
|
|
19744
|
-
|
|
19745
|
-
|
|
20225
|
+
if (!domainInstance) {
|
|
20226
|
+
new Domain( function onReady(err, _domainInstance) {
|
|
20227
|
+
if (err) {
|
|
20228
|
+
throw err
|
|
20229
|
+
}
|
|
19746
20230
|
|
|
19747
|
-
|
|
19748
|
-
|
|
20231
|
+
domainInstance = _domainInstance;
|
|
20232
|
+
});
|
|
20233
|
+
}
|
|
19749
20234
|
|
|
19750
20235
|
return init(options)
|
|
19751
20236
|
}
|
|
@@ -19921,7 +20406,7 @@ define('gina/popin', [ 'require', 'vendor/uuid', 'jquery', 'lib/domain', 'lib/me
|
|
|
19921
20406
|
|
|
19922
20407
|
var attr = 'data-gina-popin-name';
|
|
19923
20408
|
var $els = getElementsByAttribute(attr);
|
|
19924
|
-
var $el = null, name = null;
|
|
20409
|
+
var $el = null, name = null, id = null;
|
|
19925
20410
|
var url = null;
|
|
19926
20411
|
var proceed = null, evt = null;
|
|
19927
20412
|
var i = null, len = null;
|
|
@@ -19954,16 +20439,27 @@ define('gina/popin', [ 'require', 'vendor/uuid', 'jquery', 'lib/domain', 'lib/me
|
|
|
19954
20439
|
}
|
|
19955
20440
|
|
|
19956
20441
|
if (name == $popin.name) {
|
|
20442
|
+
id = $el.id || $el.getAttribute('id') || null;
|
|
20443
|
+
// By default
|
|
19957
20444
|
evt = 'popin.click.'+ 'gina-popin-' + instance.id +'-'+ uuid.v4() +'-'+ name;
|
|
19958
|
-
|
|
19959
|
-
|
|
19960
|
-
|
|
20445
|
+
// console.debug("[POPIN CLICK #1]", id, " VS ", evt);
|
|
20446
|
+
// Retrieving existing event
|
|
20447
|
+
if ( id && new RegExp( '^popin.click.gina-popin-').test(id) ) {
|
|
20448
|
+
// if ( id && new RegExp( '^popin.click.gina-popin-' + instance.id).test(id) ) {
|
|
20449
|
+
// console.debug("[POPIN CLICK #2]", id, " VS ", evt);
|
|
20450
|
+
evt = id;
|
|
20451
|
+
}
|
|
19961
20452
|
|
|
19962
20453
|
if (!gina.events[evt]) {
|
|
20454
|
+
$el['id'] = evt;
|
|
20455
|
+
$el.setAttribute( 'id', evt);
|
|
20456
|
+
// $el.setAttribute( 'data-dialog', evt);
|
|
19963
20457
|
|
|
19964
20458
|
// attach click events
|
|
19965
20459
|
addListener(gina, $el, evt, function(e) {
|
|
19966
20460
|
cancelEvent(e);
|
|
20461
|
+
// console.debug("[POPIN CLICK #3]", $popin.openTrigger, " VS ", e.currentTarget.id);
|
|
20462
|
+
$popin.openTrigger = e.currentTarget.id || e.currentTarget.getAttribute('id');
|
|
19967
20463
|
|
|
19968
20464
|
var fired = false;
|
|
19969
20465
|
addListener(gina, $popin.target, 'loaded.'+$popin.id, function(e) {
|
|
@@ -20040,8 +20536,10 @@ define('gina/popin', [ 'require', 'vendor/uuid', 'jquery', 'lib/domain', 'lib/me
|
|
|
20040
20536
|
//console.log('popin.click !! ', event.target);
|
|
20041
20537
|
var _evt = event.target.id;
|
|
20042
20538
|
|
|
20043
|
-
if ( new RegExp( '^popin.click.gina-popin-' + instance.id).test(_evt) )
|
|
20539
|
+
if ( new RegExp( '^popin.click.gina-popin-' + instance.id).test(_evt) ) {
|
|
20044
20540
|
triggerEvent(gina, event.target, _evt, event.detail);
|
|
20541
|
+
}
|
|
20542
|
+
|
|
20045
20543
|
}
|
|
20046
20544
|
});
|
|
20047
20545
|
|
|
@@ -20147,8 +20645,9 @@ define('gina/popin', [ 'require', 'vendor/uuid', 'jquery', 'lib/domain', 'lib/me
|
|
|
20147
20645
|
cancelEvent(event);
|
|
20148
20646
|
var _evt = event.target.id;
|
|
20149
20647
|
|
|
20150
|
-
if ( new RegExp( '^popin.click.gina-popin-' + instance.id).test(_evt) )
|
|
20648
|
+
if ( new RegExp( '^popin.click.gina-popin-' + instance.id).test(_evt) ) {
|
|
20151
20649
|
triggerEvent(gina, event.target, _evt, event.detail);
|
|
20650
|
+
}
|
|
20152
20651
|
|
|
20153
20652
|
}
|
|
20154
20653
|
}
|
|
@@ -20634,8 +21133,9 @@ define('gina/popin', [ 'require', 'vendor/uuid', 'jquery', 'lib/domain', 'lib/me
|
|
|
20634
21133
|
this.name = name;
|
|
20635
21134
|
}
|
|
20636
21135
|
// popin object
|
|
20637
|
-
var $popin
|
|
20638
|
-
var id
|
|
21136
|
+
var $popin = getPopinByName(name);
|
|
21137
|
+
var id = $popin.id;
|
|
21138
|
+
var $popinTrigger = document.getElementById($popin.openTrigger) || null;
|
|
20639
21139
|
|
|
20640
21140
|
// set as active if none is active
|
|
20641
21141
|
if ( !gina.popin.activePopinId ) {
|
|
@@ -20777,12 +21277,37 @@ define('gina/popin', [ 'require', 'vendor/uuid', 'jquery', 'lib/domain', 'lib/me
|
|
|
20777
21277
|
xhr.setRequestHeader(header, options.headers[header]);
|
|
20778
21278
|
}
|
|
20779
21279
|
|
|
21280
|
+
// Data loading ...
|
|
21281
|
+
if ( /^(1|3)$/.test(xhr.readyState) ) {
|
|
21282
|
+
$popin.target.setAttribute('data-gina-popin-loading', true);
|
|
21283
|
+
if ($popinTrigger) {
|
|
21284
|
+
// For A tag: aria-disabled=true
|
|
21285
|
+
if ( /^A$/i.test($popinTrigger.tagName) ) {
|
|
21286
|
+
$popinTrigger.setAttribute('aria-disabled', true);
|
|
21287
|
+
} else {
|
|
21288
|
+
$popinTrigger.setAttribute('disabled', true);
|
|
21289
|
+
}
|
|
21290
|
+
}
|
|
21291
|
+
}
|
|
20780
21292
|
|
|
20781
21293
|
// catching ready state cb
|
|
20782
21294
|
xhr.onreadystatechange = function (event) {
|
|
21295
|
+
// Data loading ...
|
|
21296
|
+
if ( /^(1|3)$/.test(xhr.readyState) ) {
|
|
21297
|
+
$popin.target.setAttribute('data-gina-popin-loading', true);
|
|
21298
|
+
if ($popinTrigger) {
|
|
21299
|
+
// For A tag: aria-disabled=true
|
|
21300
|
+
if ( /^A$/i.test($popinTrigger.tagName) ) {
|
|
21301
|
+
$popinTrigger.setAttribute('aria-disabled', true);
|
|
21302
|
+
} else {
|
|
21303
|
+
$popinTrigger.setAttribute('disabled', true);
|
|
21304
|
+
}
|
|
21305
|
+
}
|
|
21306
|
+
}
|
|
20783
21307
|
if (xhr.readyState == 4) {
|
|
20784
21308
|
// 200, 201, 201' etc ...
|
|
20785
|
-
var result = null
|
|
21309
|
+
var result = null;
|
|
21310
|
+
|
|
20786
21311
|
if ( /^2/.test(xhr.status) ) {
|
|
20787
21312
|
try {
|
|
20788
21313
|
result = xhr.responseText;
|
|
@@ -21308,7 +21833,7 @@ define('gina/popin', [ 'require', 'vendor/uuid', 'jquery', 'lib/domain', 'lib/me
|
|
|
21308
21833
|
name = this.name;
|
|
21309
21834
|
$popin = this;
|
|
21310
21835
|
} else {
|
|
21311
|
-
$popin = getPopinByName(name) ||
|
|
21836
|
+
$popin = getPopinByName(name) || getActivePopin();
|
|
21312
21837
|
if (!$popin)
|
|
21313
21838
|
return;
|
|
21314
21839
|
|
|
@@ -21332,6 +21857,7 @@ define('gina/popin', [ 'require', 'vendor/uuid', 'jquery', 'lib/domain', 'lib/me
|
|
|
21332
21857
|
return;
|
|
21333
21858
|
|
|
21334
21859
|
$el = $popin.target;
|
|
21860
|
+
var $popinTrigger = document.getElementById($popin.openTrigger) || null;
|
|
21335
21861
|
|
|
21336
21862
|
if ( typeof($el.close) === "function" ) {
|
|
21337
21863
|
$el.close();
|
|
@@ -21369,6 +21895,15 @@ define('gina/popin', [ 'require', 'vendor/uuid', 'jquery', 'lib/domain', 'lib/me
|
|
|
21369
21895
|
}
|
|
21370
21896
|
$popin.$headers = [];
|
|
21371
21897
|
}
|
|
21898
|
+
|
|
21899
|
+
if ($popinTrigger) {
|
|
21900
|
+
// For A tag: aria-disabled=true
|
|
21901
|
+
if ( /^A$/i.test($popinTrigger.tagName) ) {
|
|
21902
|
+
$popinTrigger.removeAttribute('aria-disabled', true);
|
|
21903
|
+
} else {
|
|
21904
|
+
$popinTrigger.removeAttribute('disabled', true);
|
|
21905
|
+
}
|
|
21906
|
+
}
|
|
21372
21907
|
triggerEvent(gina, $popin.target, 'close.'+ $popin.id, $popin);
|
|
21373
21908
|
}
|
|
21374
21909
|
}
|
|
@@ -21528,13 +22063,15 @@ define('gina/popin', [ 'require', 'vendor/uuid', 'jquery', 'lib/domain', 'lib/me
|
|
|
21528
22063
|
popinGetContainer()
|
|
21529
22064
|
}
|
|
21530
22065
|
|
|
21531
|
-
|
|
21532
|
-
|
|
21533
|
-
|
|
21534
|
-
|
|
22066
|
+
if (!domainInstance) {
|
|
22067
|
+
new Domain( function onReady(err, _domainInstance) {
|
|
22068
|
+
if (err) {
|
|
22069
|
+
throw err
|
|
22070
|
+
}
|
|
21535
22071
|
|
|
21536
|
-
|
|
21537
|
-
|
|
22072
|
+
domainInstance = _domainInstance;
|
|
22073
|
+
});
|
|
22074
|
+
}
|
|
21538
22075
|
|
|
21539
22076
|
return init(options)
|
|
21540
22077
|
}
|
|
@@ -21654,7 +22191,7 @@ define("utils/polyfill", function(){});
|
|
|
21654
22191
|
|
|
21655
22192
|
/**
|
|
21656
22193
|
* This file is part of the gina package.
|
|
21657
|
-
* Copyright (c) 2009-
|
|
22194
|
+
* Copyright (c) 2009-2025 Rhinostone <contact@gina.io>
|
|
21658
22195
|
*
|
|
21659
22196
|
* For the full copyright and license information, please view the LICENSE
|
|
21660
22197
|
* file that was distributed with this source code.
|