From 570abd6f3ab5a10c13baa8c1d73da67ca3c7d2a7 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Thu, 6 Jun 2024 13:34:20 +0200 Subject: [PATCH 01/10] Add project: show more `yaml` examples I used tabs to show different examples of YAML files, as suggested in #184. It looks great for an initial interactive approach. I like the tabs over the dropdown because it gives the user a clear idea there are more than Sphinx and MkDocs tools supported, which is a good marketing strategy, in my opinion. It also adds an "Others" option that's more generic and shows how to use `build.commands` in a generic way: install dependencies, build, copy assets under `$READTHDOCS_OUTPUT` directory. --- .../templates/projects/import_config.html | 265 +++++++++++++++--- 1 file changed, 225 insertions(+), 40 deletions(-) diff --git a/readthedocsext/theme/templates/projects/import_config.html b/readthedocsext/theme/templates/projects/import_config.html index acc68dc9..47e53256 100644 --- a/readthedocsext/theme/templates/projects/import_config.html +++ b/readthedocsext/theme/templates/projects/import_config.html @@ -1,9 +1,9 @@ {% extends "projects/import_base.html" %} {% load i18n %} -{% block project_add_content_subheader %} +{% block project_add_subheader %} {% trans "Add a configuration file to your project" %} -{% endblock project_add_content_subheader %} +{% endblock project_add_subheader %} {% block project_add_content_classes %}ui fourteen wide tablet twelve wide computer column{% endblock %} @@ -12,43 +12,33 @@ {% blocktrans trimmed %} A .readthedocs.yaml configuration file is required at the root of your repository in order to build your documentation. {% endblocktrans %} - - - {% trans "Learn how to add a configuration file to your project." %} - -
- {% trans "Example configuration for:" %} - -
+

-

-
- .readthedocs.yaml -
- - - - -
+    Here you have some simple examples for the most common documentation tools.
+    If you are using a different tool, you can read our documentation to
+    learn how to write your own.
+  

+ + +
+
+
+ .readthedocs.yaml +
+ + + + +
 # Read the Docs configuration file
 # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
 
@@ -59,7 +49,7 @@
 build:
   os: ubuntu-22.04
   tools:
-    python: "3.11"
+    python: "3.12"
     # You can also specify other tool versions:
     # nodejs: "19"
     # rust: "1.64"
@@ -80,11 +70,206 @@
 # python:
 #    install:
 #    - requirements: docs/requirements.txt
-      
-
+
+
+
+ + +
+
+
+ .readthedocs.yaml +
+ + + + +
+# Read the Docs configuration file
+# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
+
+# Required
+version: 2
+
+# Set the OS, Python version, and other tools you might need
+build:
+  os: ubuntu-22.04
+  tools:
+    python: "3.12"
+    # You can also specify other tool versions:
+    # nodejs: "19"
+    # rust: "1.64"
+    # golang: "1.19"
+
+# Build documentation with Mkdocs
+mkdocs:
+   configuration: mkdocs.yml
+
+# Optionally, but recommended,
+# declare the Python requirements required to build your documentation
+# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
+# python:
+#    install:
+#    - requirements: docs/requirements.txt
+              
+
+
+
+ +
+
+
+ .readthedocs.yaml +
+ + + + +
+# Read the Docs configuration file
+# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
+
+# Required
+version: 2
+
+# Set the OS, Python version, and other tools you might need
+build:
+  os: ubuntu-22.04
+  tools:
+    nodejs: "19"
+    # You can also specify other tool versions:
+    # python: "3.12"
+    # rust: "1.64"
+    # golang: "1.19"
+
+  commands:
+    # Install Docusaurus dependencies
+    - cd docs/ && npm install
+    # Build the site
+    - cd docs/ && npm run build
+    # Copy generated files into Read the Docs directory
+    - mkdir --parents $READTHEDOCS_OUTPUT/html/
+    - cp --recursive docs/build/* $READTHEDOCS_OUTPUT/html/
+              
+
+
+
+ +
+
+
+ .readthedocs.yaml +
+ + + + +
+# Read the Docs configuration file
+# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
+
+# Required
+version: 2
+
+# Set the OS, Python version, and other tools you might need
+build:
+  os: ubuntu-22.04
+  tools:
+    python: "3.12"
+    # You can also specify other tool versions:
+    # nodejs: "19"
+    # rust: "1.64"
+    # golang: "1.19"
+
+  commands:
+    # Install Pelican and its dependencies
+    - pip install "pelican[markdown]"
+    # Build the site and save generated files into Read the Docs directory
+    - pelican --settings docs/pelicanconf.py --output $READTHEDOCS_OUTPUT/html
+              
+
+
+
+ +
+
+
+ .readthedocs.yaml +
+ + + + +
+# Read the Docs configuration file
+# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
+
+# Required
+version: 2
+
+# Set the OS, Python version, and other tools you might need
+build:
+  os: ubuntu-22.04
+  tools:
+    ruby: "3.3"
+    # You can also specify other tool versions:
+    # python: "3.12"
+    # nodejs: "19"
+    # rust: "1.64"
+    # golang: "1.19"
+
+  commands:
+    # Install dependencies
+    - gem install bundle
+    - bundle install
+    # Build the site and save generated files into Read the Docs directory
+    - jekyll build --destination $READTHEDOCS_OUTPUT/html
+              
+
+
+
+ +
+
+
+ .readthedocs.yaml +
+ + + + +
+# Read the Docs configuration file
+# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
+
+# Required
+version: 2
+
+# Set the OS, Python version, and other tools you might need
+build:
+  os: ubuntu-22.04
+  tools:
+    # Specify the language and version your project requires,
+    # by uncommenting one of the following tools.
+    #
+    # python: "3.12"
+    # ruby: "3.3"
+    # nodejs: "19"
+    # rust: "1.64"
+    # golang: "1.19"
+
+  commands:
+    # Write down your commands here to:
+    #
+    #  - Install the dependencies of your project
+    #  - Build the documentation
+    #  - Save the generated files in $READTHEDOCS_OUTPUT/html
+              
+
+
- {# Show the base form #} + {# Show the base form #} {{ block.super }} {% endblock project_add_content_form %} From b7c120965e7985c9af501af5815bd05741d8ed1a Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Thu, 6 Jun 2024 14:04:00 +0200 Subject: [PATCH 02/10] Add project: highlight yaml examples I used `highlight.js` to highlight the examples when importing a project. It requires importing a CSS file that I'm not sure where to put it yet. https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/dark.min.css Besides, I need to know where to place the small chunk of JS code that I added to make this work. Based on #368 --- package-lock.json | 16 +++++ package.json | 3 + .../static/readthedocsext/theme/js/site.js | 2 +- .../static/readthedocsext/theme/js/vendor.js | 60 +++++++++---------- .../templates/projects/import_config.html | 4 +- src/js/application/index.js | 6 ++ 6 files changed, 58 insertions(+), 33 deletions(-) diff --git a/package-lock.json b/package-lock.json index 81463c9d..a2d739a8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,9 @@ "name": "readthedocsext-theme", "version": "1.0.0", "license": "ISC", + "dependencies": { + "highlight.js": "^11.9.0" + }, "devDependencies": { "@babel/core": "^7.23.0", "@babel/plugin-proposal-class-properties": "^7.16.7", @@ -6812,6 +6815,14 @@ "node": ">= 0.4" } }, + "node_modules/highlight.js": { + "version": "11.9.0", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.9.0.tgz", + "integrity": "sha512-fJ7cW7fQGCYAkgv4CPfwFHrfd/cLS4Hau96JuJ+ZTOWhjnhoeN1ub1tFmALm/+lW5z4WCAuAV9bm05AP0mS6Gw==", + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/homedir-polyfill": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", @@ -18051,6 +18062,11 @@ "function-bind": "^1.1.2" } }, + "highlight.js": { + "version": "11.9.0", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.9.0.tgz", + "integrity": "sha512-fJ7cW7fQGCYAkgv4CPfwFHrfd/cLS4Hau96JuJ+ZTOWhjnhoeN1ub1tFmALm/+lW5z4WCAuAV9bm05AP0mS6Gw==" + }, "homedir-polyfill": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", diff --git a/package.json b/package.json index 715a8a1b..e91befe0 100644 --- a/package.json +++ b/package.json @@ -101,5 +101,8 @@ } } ] + }, + "dependencies": { + "highlight.js": "^11.9.0" } } diff --git a/readthedocsext/theme/static/readthedocsext/theme/js/site.js b/readthedocsext/theme/static/readthedocsext/theme/js/site.js index 890d14e8..ca00d6b0 100644 --- a/readthedocsext/theme/static/readthedocsext/theme/js/site.js +++ b/readthedocsext/theme/static/readthedocsext/theme/js/site.js @@ -1 +1 @@ -(()=>{"use strict";var e,t,n,r,o,i={286:()=>{},8488:e=>{if("undefined"==typeof moment){var t=new Error("Cannot find module 'moment'");throw t.code="MODULE_NOT_FOUND",t}e.exports=moment},8234:(e,t,n)=>{var r=n(9755),o=n(8527),i=n(2152);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function u(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"body";console.debug("Attaching application to selector:",e),o.applyBindings(this,r(e)[0])}},{key:"show_modal",value:function(e){return function(t,n){var o="[data-modal-id="+e+"]";console.debug("Showing modal:",o),0===r(o).modal("show").length&&console.debug("Modal not found:",o)}}},{key:"post_child_form",value:function(e,t){var n=t.currentTarget.querySelector(":scope > form");return n&&n.submit(),!1}}],n&&u(t.prototype,n),i&&u(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();globalThis.jQuery=r;var l=n(2876),f=(n(4238),n(7239),n(8105),n(7030),n(83),n(4567),n(1714),n(5082),n(8225),n(4696),n(5812),n(2208),n(3441),n(4671),n(9610),n(4115),n(2445),n(6426),n(3150),n(8329),n(1307),n(8182),n(9755));function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,t)||b(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?o-1:0),a=1;a1&&void 0!==arguments[1]&&arguments[1])&&(t.trackLocalhost=!0);var n=(0,l.Z)(t).trackEvent;return(0,(0,l.Z)(t).trackPageview)(),this.each((function(e,t){function r(e){var r=t.getAttribute("data-analytics").split(/,(.+)/),o=null!=t.tagName&&"a"==t.tagName.toLowerCase(),i="auxclick"==e.type&&2==e.which,a="click"==e.type,u=o&&a&&!t.target&&!(e.ctrlKey||e.metaKey||e.shiftKey);if(i||a){var c,s=function(){u&&t.href&&"#"!=t.href&&(console.debug("Plausible: resuming redirect to",t.href),location.href=t.href)},l=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=b(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}(r);try{var f=function(){var e=c.value;n(e,{callback:function(){console.debug("Plausible: tracked event",e),s()}}),setTimeout((function(){console.debug("Plausible: didn't receive response, continuing anyways"),s()}),150)};for(l.s();!(c=l.n()).done;)f()}catch(e){l.e(e)}finally{l.f()}}u&&e.preventDefault()}t.addEventListener("click",r),t.addEventListener("auxclick",r)}))}function k(e){return this.each((function(t,n){f(n).find(".item").tab(e)}))}function T(e){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},T(e)}function x(e,t,n){return x=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&E(o,n.prototype),o},x.apply(null,arguments)}function E(e,t){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},E(e,t)}function C(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return A(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return A(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&n.is_expanded(!0)})),this.output=o.observable(),this.output_lines=o.computed((function(){return n.output().split(/\n/).map((function(e,t){return new Z({command:n,output:e,line_number:t+1})}))}),null,{deferEvaluation:!0}),this.output(t.output)}return K(e,[{key:"color_output",value:function(e){return Promise.all([n.e("ansi_up").then(n.t.bind(n,4431,19)).then((function(e){return e.default})),n.e("sanitize-html").then(n.t.bind(n,1036,19)).then((function(e){return e.default}))]).then((function(t){var n,r,o=z(t,2);n=o[0],r=o[1];var i=new n;return i.use_classes=!0,e=r(e=i.ansi_to_html(e),{allowedTags:["span"],allowedAttributes:{span:["class"]}})}))}},{key:"toggle_expanded",value:function(){return this.is_expanded(!this.is_expanded()),!1}}]),e}(),Y=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0,a=arguments.length>2?arguments[2]:void 0;X(this,e),this.id=n.id,this.url_api_build=i,this.url_api_notifications=a,this.success=o.observable(n.success),this.error=o.observable(n.error),this.notifications=o.observableArray(),this.has_notifications=o.computed((function(){return t.notifications().length>0})),this.state=o.observable(n.state),this.state_display=o.observable(n.state_display),this.is_finished=o.observable(!1),this.is_loading=o.observable(!0),this.can_cancel=o.observable(!1),this.can_retry=o.observable(!1),this.can_view_docs=o.observable(!1),this.state.subscribe((function(e){t.update_state(e)})),this.progress_config=o.computed((function(){var e=t.state(),n=["triggered","queued","cloning","installing","building","uploading","finished"];if(o.computedContext.isInitial())return{autoSuccess:!1,value:n.indexOf(e),total:n.length-1,label:t.state_display()};if(t.is_finished()){var r="cancelled"===e,i=t.error()||!1===t.success();return r?function(e){e("set warning","Build cancelled")}:i?function(e){e("set error","Build failed")}:function(e){e("set success","Build succeeded")}}return function(r){r("set progress",n.indexOf(e)),r("set label",t.state_display())}})).extend({deferred:!0}),this.date=o.observable(n.date),this.length=o.observable(n.length),this.date_display=o.observable(),this.date_display_since=o.observable(),this.length_display=o.observable(),U.extend(D),U.extend(H),U.extend(q),this.date.subscribe((function(e){var n=U(e);t.date_display(n.format("llll")),t.date_display_since(n.fromNow())})),this.length.subscribe((function(e){t.length_display(U.duration(e,"seconds").humanize())})),this.config=o.observable(),this.builder=o.observable(n.builder),this.commands=o.observableArray(n.commands),this.commit=o.observable(n.commit),this.commit_short=o.computed((function(){var e=t.commit();if(e)return e.substring(0,8)})),this.docs_url=o.observable(n.docs_url),this.commit_url=o.observable(n.commit_url),this.legacy_output=o.observable(!1),this.selected_hash=o.observable(r(location).attr("hash")),this.selected_hash.subscribe((function(e){r(location).attr("hash",e)})),this.selected_line=o.observable(),this.selected_line.subscribe((function(e){e&&e.is_selected(!1)}),this,"beforeChange"),this.selected_line.subscribe((function(e){e.command.is_expanded(!0),e.is_selected(!0),t.selected_hash(e.anchor_id())})),this.show_debug=o.observable(!1),this.is_polling=o.observable(!0),this.is_polling.subscribe((function(e){e||t.set_selected_line_from_hash(t.selected_hash())})),this.url_api_build&&this.poll_api_build(),this.url_api_notifications&&this.poll_api_notifications()}return K(e,[{key:"poll_api_build",value:function(){var e=this;r.getJSON(this.url_api_build).then((function(t){e.date(t.date),e.success(t.success),e.error(t.error),e.length(t.length),e.commit(t.commit),e.docs_url(t.docs_url),e.commit_url(t.commit_url),e.builder(t.builder),e.config(t.config),e.state(t.state),e.state_display(t.state_display),e.add_command({id:0,command:"readthedocs-build --show-config",output:JSON.stringify(t.config,null," "),exit_code:0,run_time:0,is_debug:!0});var n,r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=J(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}(t.commands);try{for(r.s();!(n=r.n()).done;){var o=n.value;e.add_command(o)}}catch(e){r.e(e)}finally{r.f()}e.is_loading(!1)})).then((function(){e.is_finished()?e.is_polling(!1):setTimeout((function(){e.poll_api_build(),e.poll_api_notifications()}),2e3)}))}},{key:"poll_api_notifications",value:function(){var e=this;r.getJSON(this.url_api_notifications,{state__in:"read,unread"}).then((function(t){t.results&&e.notifications(t.results)}))}},{key:"add_command",value:function(e){o.utils.arrayFirst(this.commands(),(function(t){return t.id()===e.id}))||this.commands.push(new Q(e))}},{key:"set_selected_line",value:function(e){this.selected_line(e);var t=document.querySelector("[data-selected=true]");return t&&(t.scrollIntoView?t.scrollIntoView({behavior:"auto",block:"center",inline:"center"}):r(t).focus()),!1}},{key:"set_selected_line_from_hash",value:function(e){if(e){var t=e.match(/^#(\d+)--(\d+)$/);if(!t)return;var n=o.utils.arrayFirst(this.commands(),(function(e){return e.id()==t[1]}));if(n){var r=o.utils.arrayFirst(n.output_lines(),(function(e){return e.line_number()==t[2]}));r&&this.set_selected_line(r)}}}},{key:"show_legacy_output",value:function(){this.legacy_output(!0)}},{key:"toggle_debug",value:function(){var e=this.show_debug();this.show_debug(!e)}},{key:"update_state",value:function(e){["finished","cancelled"].includes(e)?(this.is_finished(!0),this.can_cancel(!1),this.can_retry(!0),this.success()&&this.can_view_docs(!0)):this.can_cancel(!0)}}]),e}();function G(e){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G(e)}function ee(e,t){for(var n=0;n=oe[o];t.device[o](i)}}));var n=r(window),i=function(){t.viewport_width(n.width())};n.on("resize",i),i()})),ae=function(){function e(t){re(this,e),this.id=t.id,this.url=t.url,this.loaded=o.observable(!1),this.loading=o.observable(!1),this.promise=null,this.data=o.observable()}return te(e,[{key:"fetch",value:function(){var e=this;if(this.promise)return this.promise;this.promise=new Promise((function(t,n){if(e.loaded())return t(e.data());e.loading(!0),r.getJSON(e.url).then((function(n){return e.data(n),e.loaded(!0),e.loading(!1),t(n)}))}))}}]),e}(),ue=te((function e(){var t=this;re(this,e),this.config=o.observable(),this.search_project_config=o.observable(),this.config.subscribe((function(e){if(void 0!==e){var n=new URL(e.api_projects_list_url,window.location.origin);n.search="?name={query}",t.search_project_config({type:"category",apiSettings:{url:n.href,onResponse:function(e){return{results:{"category-projects":{name:"Projects",results:e.results.map((function(e,t){var n=e.slug;e.subproject_of?n="Subproject of "+e.subproject_of.name:e.translation_of&&(n=e.language.name+" translation of "+e.translation_of.name);var r=new URL(e.urls.home),o=new URL(window.location.href);return r.hostname!=o.hostname&&(r.hostname=o.hostname),{title:e.name,description:n,url:r.toString()}}))}}}}},minCharacters:2})}}))}));function ce(e){return ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ce(e)}function se(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return le(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return le(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function le(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0])||arguments[0];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.is_collapsed=o.observable(n),this.dropdown_class=o.computed((function(){return t.is_collapsed()?"fa-caret-down":"fa-caret-up"}))}var t,n,r;return t=e,n=[{key:"toggle_collapsed",value:function(){var e=this.is_collapsed();this.is_collapsed(!e)}}],n&&Te(t.prototype,n),r&&Te(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ce(e){return Ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ce(e)}function Ae(e,t){for(var n=0;n\n ','\n
\n \n ',"\n
\n

","

\n \n "])),(0,Ue.$)(t),(0,Ve.g)(this.notification.dismissable,(function(){return(0,Le.dy)(We||(We=Qe(['\n 0)setTimeout(o,2e3);else{var r=e.statusText;e.responseJSON&&(r=e.responseJSON.detail),t.reject({message:r})}}))}),2e3),t})(e).then((function(){t.resolve()})).fail((function(e){t.reject(e)}))},error:function(e){var n=e.responseJSON.detail||e.statusText;t.reject({message:n})}}),t}function Ct(e){return Ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ct(e)}function At(e,t){return At=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},At(e,t)}function Rt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nt(e);if(t){var o=Nt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ct(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function Nt(e){return Nt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Nt(e)}function It(e,t){for(var n=0;n0}))})),$t=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&At(e,t)}(n,e);var t=Rt(n);function n(){var e;return Vt(this,n),(e=t.call(this)).config=o.observable(),e.search_config=o.observable(),e.selected=o.observable(),e.is_loading=o.observable(!1),e.is_syncing=o.observable(!1),e.is_selected=o.computed((function(){return void 0!==e.selected()})),e.allow_private_repos=o.observable(!1),e.error=o.observable(),e.config.subscribe((function(t){void 0!==t&&(e.allow_private_repos(t.allow_private_repos),e.init_search())})),e}return Lt(n,[{key:"sync_remote_repos",value:function(){var e=this,t=this.config(),n={url:t.urls.api_sync_remote_repositories,token:t.csrf_token};return this.is_syncing(!0),this.is_loading(!0),Et(n).fail((function(t){console.error("Error syncing remote repositories:",t.message),e.error(t.message)})).always((function(){e.is_syncing(!1),e.is_loading(!1)}))}},{key:"init_search",value:function(){var e=this,t=this.config().urls.remoterepository_list+"?expand=projects&full_name={query}";this.search_config({type:"knockout",templates:{knockout:function(e){var t=r("
");o.applyBindingsToNode(t[0],{template:{name:"remote-repo-results",data:{remote_repos:e.results.map((function(e){return new qt(e)}))}}});var n=t.html();return t.remove(),n}},apiSettings:{url:t},selector:{prompt:".ui.text",title:".title .text"},fullTextSearch:!0,onSelect:function(t,n){e.selected(new qt(t))}})}},{key:"is_repository_supported",value:function(e){return!e.is_private()||this.allow_private_repos()}}]),n}(ie);function zt(e){return zt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zt(e)}function Jt(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Mt(e,t){for(var n=0;n\n ',"\n
\n "])),(0,pt.U)(e.results,(function(e){return(0,Le.dy)(Dt||(Dt=Jt(['\n \n
\n
\n
\n ','\n \n ','\n
\n
\n ',"\n
\n
\n
\n "])),e.verbose_name,(0,Ue.$)({"fa-code-branch":"branch"===e.type,"fa-tag":"tag"===e.type}),(0,Ve.g)(e.active,(function(){return(0,Le.dy)(Ht||(Ht=Jt(['\n \n \n Active\n \n '])))})),e.identifier)})));(0,Le.sY)(n,t);var r=t.innerHTML;return t.remove(),r}}}}}]),e}();Yt(tn,"view_name","ProjectVersionCreateView"),V.add_view(tn);var nn=function(e){Wt(n,e);var t=Zt(n);function n(e){var r;return Kt(this,n),(r=t.call(this,e)).url_pdf=o.observable(),r.url_epub=o.observable(),r.url_html=o.observable(),r.url_docs=o.observable(),r.is_built=o.observable(!0),r.data.subscribe((function(e){r.url_pdf(e.downloads.pdf),r.url_epub(e.downloads.epub),r.url_html(e.downloads.html),r.url_docs(e.urls.documentation),r.is_built(e.built)})),r}return Ft(n,[{key:"trigger_build",value:function(e,t){return function(n,o){r.ajax({type:"POST",url:e,data:{csrfmiddlewaretoken:t}}).then((function(e){e.build.urls.build?window.location.href=e.build.urls.build:console.debug("Redirect to new build failed")})).catch((function(e){console.error(e)}))}}}]),n}(ae);function rn(e){return rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rn(e)}function on(e,t){for(var n=0;n select").dropdown({placeholder:""}),r("[data-content]:not([data-semanticui-popup])").popup({position:"top center",delay:{show:500},variation:"small"}),r(".ui.menu > .item[data-tab]").tab(),new i("[data-clipboard-text], [data-clipboard-target]"),r("[data-clipboard-text], [data-clipboard-target]").popup({on:"click",hoverable:!1,content:"Copied!"}),r("[data-analytics]").plausible(this.config.production_domain,this.config.debug)}}])&&on(t.prototype,a),u&&on(t,u),Object.defineProperty(t,"prototype",{writable:!1}),e}();r(document).ready((function(){(new un).run()}))}},a={};function u(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={exports:{}};return i[e].call(n.exports,n,n.exports,u),n.exports}u.m=i,e=[],u.O=(t,n,r,o)=>{if(!n){var i=1/0;for(l=0;l=o)&&Object.keys(u.O).every((e=>u.O[e](n[c])))?n.splice(c--,1):(a=!1,o0&&e[l-1][2]>o;l--)e[l]=e[l-1];e[l]=[n,r,o]},n=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,u.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var o=Object.create(null);u.r(o);var i={};t=t||[null,n({}),n([]),n(n)];for(var a=2&r&&e;"object"==typeof a&&!~t.indexOf(a);a=n(a))Object.getOwnPropertyNames(a).forEach((t=>i[t]=()=>e[t]));return i.default=()=>e,u.d(o,i),o},u.d=(e,t)=>{for(var n in t)u.o(t,n)&&!u.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},u.f={},u.e=e=>Promise.all(Object.keys(u.f).reduce(((t,n)=>(u.f[n](e,t),t)),[])),u.u=e=>"js/vendors~"+e+".js?"+{chartjs:"88d308352093cb9caa38",ansi_up:"d27561856946166026c2","sanitize-html":"fe70b4790c12dedf5bc9"}[e],u.miniCssF=e=>{},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},o="readthedocsext-theme:",u.l=(e,t,n,i)=>{if(r[e])r[e].push(t);else{var a,c;if(void 0!==n)for(var s=document.getElementsByTagName("script"),l=0;l{a.onerror=a.onload=null,clearTimeout(b);var o=r[e];if(delete r[e],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach((e=>e(n))),t)return t(n)},b=setTimeout(d.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=d.bind(null,a.onerror),a.onload=d.bind(null,a.onload),c&&document.head.appendChild(a)}},u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u.p="./",(()=>{var e={site:0};u.f.j=(t,n)=>{var r=u.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var i=u.p+u.u(t),a=new Error;u.l(i,(n=>{if(u.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",a.name="ChunkLoadError",a.type=o,a.request=i,r[1](a)}}),"chunk-"+t,t)}},u.O.j=t=>0===e[t];var t=(t,n)=>{var r,o,[i,a,c]=n,s=0;if(i.some((t=>0!==e[t]))){for(r in a)u.o(a,r)&&(u.m[r]=a[r]);if(c)var l=c(u)}for(t&&t(n);su(286)));var c=u.O(void 0,["vendor"],(()=>u(8234)));c=u.O(c)})(); \ No newline at end of file +(()=>{"use strict";var e,t,n,r,o,i={286:()=>{},8488:e=>{if("undefined"==typeof moment){var t=new Error("Cannot find module 'moment'");throw t.code="MODULE_NOT_FOUND",t}e.exports=moment},8234:(e,t,n)=>{var r=n(9755),o=n(8527),i=n(2152),a=n(837),u=n(5688);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function s(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"body";console.debug("Attaching application to selector:",e),o.applyBindings(this,r(e)[0])}},{key:"show_modal",value:function(e){return function(t,n){var o="[data-modal-id="+e+"]";console.debug("Showing modal:",o),0===r(o).modal("show").length&&console.debug("Modal not found:",o)}}},{key:"post_child_form",value:function(e,t){var n=t.currentTarget.querySelector(":scope > form");return n&&n.submit(),!1}}],n&&s(t.prototype,n),i&&s(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();globalThis.jQuery=r;var d=n(2876),b=(n(4238),n(7239),n(8105),n(7030),n(83),n(4567),n(1714),n(5082),n(8225),n(4696),n(5812),n(2208),n(3441),n(4671),n(9610),n(4115),n(2445),n(6426),n(3150),n(8329),n(1307),n(8182),n(9755));function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,t)||v(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t){if(e){if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?o-1:0),a=1;a1&&void 0!==arguments[1]&&arguments[1])&&(t.trackLocalhost=!0);var n=(0,d.Z)(t).trackEvent;return(0,(0,d.Z)(t).trackPageview)(),this.each((function(e,t){function r(e){var r=t.getAttribute("data-analytics").split(/,(.+)/),o=null!=t.tagName&&"a"==t.tagName.toLowerCase(),i="auxclick"==e.type&&2==e.which,a="click"==e.type,u=o&&a&&!t.target&&!(e.ctrlKey||e.metaKey||e.shiftKey);if(i||a){var c,s=function(){u&&t.href&&"#"!=t.href&&(console.debug("Plausible: resuming redirect to",t.href),location.href=t.href)},l=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=v(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}(r);try{var f=function(){var e=c.value;n(e,{callback:function(){console.debug("Plausible: tracked event",e),s()}}),setTimeout((function(){console.debug("Plausible: didn't receive response, continuing anyways"),s()}),150)};for(l.s();!(c=l.n()).done;)f()}catch(e){l.e(e)}finally{l.f()}}u&&e.preventDefault()}t.addEventListener("click",r),t.addEventListener("auxclick",r)}))}function x(e){return this.each((function(t,n){b(n).find(".item").tab(e)}))}function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}function C(e,t,n){return C=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&A(o,n.prototype),o},C.apply(null,arguments)}function A(e,t){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},A(e,t)}function R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return N(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&n.is_expanded(!0)})),this.output=o.observable(),this.output_lines=o.computed((function(){return n.output().split(/\n/).map((function(e,t){return new Y({command:n,output:e,line_number:t+1})}))}),null,{deferEvaluation:!0}),this.output(t.output)}return W(e,[{key:"color_output",value:function(e){return Promise.all([n.e("ansi_up").then(n.t.bind(n,4431,19)).then((function(e){return e.default})),n.e("sanitize-html").then(n.t.bind(n,1036,19)).then((function(e){return e.default}))]).then((function(t){var n,r,o=M(t,2);n=o[0],r=o[1];var i=new n;return i.use_classes=!0,e=r(e=i.ansi_to_html(e),{allowedTags:["span"],allowedAttributes:{span:["class"]}})}))}},{key:"toggle_expanded",value:function(){return this.is_expanded(!this.is_expanded()),!1}}]),e}(),ee=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0,a=arguments.length>2?arguments[2]:void 0;Q(this,e),this.id=n.id,this.url_api_build=i,this.url_api_notifications=a,this.success=o.observable(n.success),this.error=o.observable(n.error),this.notifications=o.observableArray(),this.has_notifications=o.computed((function(){return t.notifications().length>0})),this.state=o.observable(n.state),this.state_display=o.observable(n.state_display),this.is_finished=o.observable(!1),this.is_loading=o.observable(!0),this.can_cancel=o.observable(!1),this.can_retry=o.observable(!1),this.can_view_docs=o.observable(!1),this.state.subscribe((function(e){t.update_state(e)})),this.progress_config=o.computed((function(){var e=t.state(),n=["triggered","queued","cloning","installing","building","uploading","finished"];if(o.computedContext.isInitial())return{autoSuccess:!1,value:n.indexOf(e),total:n.length-1,label:t.state_display()};if(t.is_finished()){var r="cancelled"===e,i=t.error()||!1===t.success();return r?function(e){e("set warning","Build cancelled")}:i?function(e){e("set error","Build failed")}:function(e){e("set success","Build succeeded")}}return function(r){r("set progress",n.indexOf(e)),r("set label",t.state_display())}})).extend({deferred:!0}),this.date=o.observable(n.date),this.length=o.observable(n.length),this.date_display=o.observable(),this.date_display_since=o.observable(),this.length_display=o.observable(),H.extend(q),H.extend($),H.extend(z),this.date.subscribe((function(e){var n=H(e);t.date_display(n.format("llll")),t.date_display_since(n.fromNow())})),this.length.subscribe((function(e){t.length_display(H.duration(e,"seconds").humanize())})),this.config=o.observable(),this.builder=o.observable(n.builder),this.commands=o.observableArray(n.commands),this.commit=o.observable(n.commit),this.commit_short=o.computed((function(){var e=t.commit();if(e)return e.substring(0,8)})),this.docs_url=o.observable(n.docs_url),this.commit_url=o.observable(n.commit_url),this.legacy_output=o.observable(!1),this.selected_hash=o.observable(r(location).attr("hash")),this.selected_hash.subscribe((function(e){r(location).attr("hash",e)})),this.selected_line=o.observable(),this.selected_line.subscribe((function(e){e&&e.is_selected(!1)}),this,"beforeChange"),this.selected_line.subscribe((function(e){e.command.is_expanded(!0),e.is_selected(!0),t.selected_hash(e.anchor_id())})),this.show_debug=o.observable(!1),this.is_polling=o.observable(!0),this.is_polling.subscribe((function(e){e||t.set_selected_line_from_hash(t.selected_hash())})),this.url_api_build&&this.poll_api_build(),this.url_api_notifications&&this.poll_api_notifications()}return W(e,[{key:"poll_api_build",value:function(){var e=this;r.getJSON(this.url_api_build).then((function(t){e.date(t.date),e.success(t.success),e.error(t.error),e.length(t.length),e.commit(t.commit),e.docs_url(t.docs_url),e.commit_url(t.commit_url),e.builder(t.builder),e.config(t.config),e.state(t.state),e.state_display(t.state_display),e.add_command({id:0,command:"readthedocs-build --show-config",output:JSON.stringify(t.config,null," "),exit_code:0,run_time:0,is_debug:!0});var n,r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=F(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}(t.commands);try{for(r.s();!(n=r.n()).done;){var o=n.value;e.add_command(o)}}catch(e){r.e(e)}finally{r.f()}e.is_loading(!1)})).then((function(){e.is_finished()?e.is_polling(!1):setTimeout((function(){e.poll_api_build(),e.poll_api_notifications()}),2e3)}))}},{key:"poll_api_notifications",value:function(){var e=this;r.getJSON(this.url_api_notifications,{state__in:"read,unread"}).then((function(t){t.results&&e.notifications(t.results)}))}},{key:"add_command",value:function(e){o.utils.arrayFirst(this.commands(),(function(t){return t.id()===e.id}))||this.commands.push(new G(e))}},{key:"set_selected_line",value:function(e){this.selected_line(e);var t=document.querySelector("[data-selected=true]");return t&&(t.scrollIntoView?t.scrollIntoView({behavior:"auto",block:"center",inline:"center"}):r(t).focus()),!1}},{key:"set_selected_line_from_hash",value:function(e){if(e){var t=e.match(/^#(\d+)--(\d+)$/);if(!t)return;var n=o.utils.arrayFirst(this.commands(),(function(e){return e.id()==t[1]}));if(n){var r=o.utils.arrayFirst(n.output_lines(),(function(e){return e.line_number()==t[2]}));r&&this.set_selected_line(r)}}}},{key:"show_legacy_output",value:function(){this.legacy_output(!0)}},{key:"toggle_debug",value:function(){var e=this.show_debug();this.show_debug(!e)}},{key:"update_state",value:function(e){["finished","cancelled"].includes(e)?(this.is_finished(!0),this.can_cancel(!1),this.can_retry(!0),this.success()&&this.can_view_docs(!0)):this.can_cancel(!0)}}]),e}();function te(e){return te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},te(e)}function ne(e,t){for(var n=0;n=ae[o];t.device[o](i)}}));var n=r(window),i=function(){t.viewport_width(n.width())};n.on("resize",i),i()})),ce=function(){function e(t){ie(this,e),this.id=t.id,this.url=t.url,this.loaded=o.observable(!1),this.loading=o.observable(!1),this.promise=null,this.data=o.observable()}return re(e,[{key:"fetch",value:function(){var e=this;if(this.promise)return this.promise;this.promise=new Promise((function(t,n){if(e.loaded())return t(e.data());e.loading(!0),r.getJSON(e.url).then((function(n){return e.data(n),e.loaded(!0),e.loading(!1),t(n)}))}))}}]),e}(),se=re((function e(){var t=this;ie(this,e),this.config=o.observable(),this.search_project_config=o.observable(),this.config.subscribe((function(e){if(void 0!==e){var n=new URL(e.api_projects_list_url,window.location.origin);n.search="?name={query}",t.search_project_config({type:"category",apiSettings:{url:n.href,onResponse:function(e){return{results:{"category-projects":{name:"Projects",results:e.results.map((function(e,t){var n=e.slug;e.subproject_of?n="Subproject of "+e.subproject_of.name:e.translation_of&&(n=e.language.name+" translation of "+e.translation_of.name);var r=new URL(e.urls.home),o=new URL(window.location.href);return r.hostname!=o.hostname&&(r.hostname=o.hostname),{title:e.name,description:n,url:r.toString()}}))}}}}},minCharacters:2})}}))}));function le(e){return le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},le(e)}function fe(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return de(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return de(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function de(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0])||arguments[0];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.is_collapsed=o.observable(n),this.dropdown_class=o.computed((function(){return t.is_collapsed()?"fa-caret-down":"fa-caret-up"}))}var t,n,r;return t=e,n=[{key:"toggle_collapsed",value:function(){var e=this.is_collapsed();this.is_collapsed(!e)}}],n&&Ee(t.prototype,n),r&&Ee(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Re(e){return Re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Re(e)}function Ne(e,t){for(var n=0;n\n ','\n
\n \n ',"\n
\n

","

\n \n "])),(0,He.$)(t),(0,De.g)(this.notification.dismissable,(function(){return(0,Ve.dy)(Xe||(Xe=Ge(['\n 0)setTimeout(o,2e3);else{var r=e.statusText;e.responseJSON&&(r=e.responseJSON.detail),t.reject({message:r})}}))}),2e3),t})(e).then((function(){t.resolve()})).fail((function(e){t.reject(e)}))},error:function(e){var n=e.responseJSON.detail||e.statusText;t.reject({message:n})}}),t}function Rt(e){return Rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rt(e)}function Nt(e,t){return Nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Nt(e,t)}function It(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Lt(e);if(t){var o=Lt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Rt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function Lt(e){return Lt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Lt(e)}function Bt(e,t){for(var n=0;n0}))})),Jt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Nt(e,t)}(n,e);var t=It(n);function n(){var e;return Dt(this,n),(e=t.call(this)).config=o.observable(),e.search_config=o.observable(),e.selected=o.observable(),e.is_loading=o.observable(!1),e.is_syncing=o.observable(!1),e.is_selected=o.computed((function(){return void 0!==e.selected()})),e.allow_private_repos=o.observable(!1),e.error=o.observable(),e.config.subscribe((function(t){void 0!==t&&(e.allow_private_repos(t.allow_private_repos),e.init_search())})),e}return Vt(n,[{key:"sync_remote_repos",value:function(){var e=this,t=this.config(),n={url:t.urls.api_sync_remote_repositories,token:t.csrf_token};return this.is_syncing(!0),this.is_loading(!0),At(n).fail((function(t){console.error("Error syncing remote repositories:",t.message),e.error(t.message)})).always((function(){e.is_syncing(!1),e.is_loading(!1)}))}},{key:"init_search",value:function(){var e=this,t=this.config().urls.remoterepository_list+"?expand=projects&full_name={query}";this.search_config({type:"knockout",templates:{knockout:function(e){var t=r("
");o.applyBindingsToNode(t[0],{template:{name:"remote-repo-results",data:{remote_repos:e.results.map((function(e){return new zt(e)}))}}});var n=t.html();return t.remove(),n}},apiSettings:{url:t},selector:{prompt:".ui.text",title:".title .text"},fullTextSearch:!0,onSelect:function(t,n){e.selected(new zt(t))}})}},{key:"is_repository_supported",value:function(e){return!e.is_private()||this.allow_private_repos()}}]),n}(ue);function Mt(e){return Mt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mt(e)}function Ft(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Kt(e,t){for(var n=0;n\n ',"\n
\n "])),(0,yt.U)(e.results,(function(e){return(0,Ve.dy)(qt||(qt=Ft(['\n \n
\n
\n
\n ','\n \n ','\n
\n
\n ',"\n
\n
\n
\n "])),e.verbose_name,(0,He.$)({"fa-code-branch":"branch"===e.type,"fa-tag":"tag"===e.type}),(0,De.g)(e.active,(function(){return(0,Ve.dy)($t||($t=Ft(['\n \n \n Active\n \n '])))})),e.identifier)})));(0,Ve.sY)(n,t);var r=t.innerHTML;return t.remove(),r}}}}}]),e}();en(rn,"view_name","ProjectVersionCreateView"),D.add_view(rn);var on=function(e){Xt(n,e);var t=Yt(n);function n(e){var r;return Wt(this,n),(r=t.call(this,e)).url_pdf=o.observable(),r.url_epub=o.observable(),r.url_html=o.observable(),r.url_docs=o.observable(),r.is_built=o.observable(!0),r.data.subscribe((function(e){r.url_pdf(e.downloads.pdf),r.url_epub(e.downloads.epub),r.url_html(e.downloads.html),r.url_docs(e.urls.documentation),r.is_built(e.built)})),r}return Zt(n,[{key:"trigger_build",value:function(e,t){return function(n,o){r.ajax({type:"POST",url:e,data:{csrfmiddlewaretoken:t}}).then((function(e){e.build.urls.build?window.location.href=e.build.urls.build:console.debug("Redirect to new build failed")})).catch((function(e){console.error(e)}))}}}]),n}(ce);function an(e){return an="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},an(e)}function un(e,t){for(var n=0;n select").dropdown({placeholder:""}),r("[data-content]:not([data-semanticui-popup])").popup({position:"top center",delay:{show:500},variation:"small"}),r(".ui.menu > .item[data-tab]").tab(),new i("[data-clipboard-text], [data-clipboard-target]"),r("[data-clipboard-text], [data-clipboard-target]").popup({on:"click",hoverable:!1,content:"Copied!"}),r("[data-analytics]").plausible(this.config.production_domain,this.config.debug)}}])&&un(t.prototype,u),c&&un(t,c),Object.defineProperty(t,"prototype",{writable:!1}),e}();r(document).ready((function(){(new sn).run()}))}},a={};function u(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={exports:{}};return i[e].call(n.exports,n,n.exports,u),n.exports}u.m=i,e=[],u.O=(t,n,r,o)=>{if(!n){var i=1/0;for(l=0;l=o)&&Object.keys(u.O).every((e=>u.O[e](n[c])))?n.splice(c--,1):(a=!1,o0&&e[l-1][2]>o;l--)e[l]=e[l-1];e[l]=[n,r,o]},n=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,u.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var o=Object.create(null);u.r(o);var i={};t=t||[null,n({}),n([]),n(n)];for(var a=2&r&&e;"object"==typeof a&&!~t.indexOf(a);a=n(a))Object.getOwnPropertyNames(a).forEach((t=>i[t]=()=>e[t]));return i.default=()=>e,u.d(o,i),o},u.d=(e,t)=>{for(var n in t)u.o(t,n)&&!u.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},u.f={},u.e=e=>Promise.all(Object.keys(u.f).reduce(((t,n)=>(u.f[n](e,t),t)),[])),u.u=e=>"js/vendors~"+e+".js?"+{chartjs:"88d308352093cb9caa38",ansi_up:"d27561856946166026c2","sanitize-html":"fe70b4790c12dedf5bc9"}[e],u.miniCssF=e=>{},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},o="readthedocsext-theme:",u.l=(e,t,n,i)=>{if(r[e])r[e].push(t);else{var a,c;if(void 0!==n)for(var s=document.getElementsByTagName("script"),l=0;l{a.onerror=a.onload=null,clearTimeout(b);var o=r[e];if(delete r[e],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach((e=>e(n))),t)return t(n)},b=setTimeout(d.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=d.bind(null,a.onerror),a.onload=d.bind(null,a.onload),c&&document.head.appendChild(a)}},u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u.p="./",(()=>{var e={site:0};u.f.j=(t,n)=>{var r=u.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var i=u.p+u.u(t),a=new Error;u.l(i,(n=>{if(u.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",a.name="ChunkLoadError",a.type=o,a.request=i,r[1](a)}}),"chunk-"+t,t)}},u.O.j=t=>0===e[t];var t=(t,n)=>{var r,o,[i,a,c]=n,s=0;if(i.some((t=>0!==e[t]))){for(r in a)u.o(a,r)&&(u.m[r]=a[r]);if(c)var l=c(u)}for(t&&t(n);su(286)));var c=u.O(void 0,["vendor"],(()=>u(8234)));c=u.O(c)})(); \ No newline at end of file diff --git a/readthedocsext/theme/static/readthedocsext/theme/js/vendor.js b/readthedocsext/theme/static/readthedocsext/theme/js/vendor.js index bd603b85..722f8b98 100644 --- a/readthedocsext/theme/static/readthedocsext/theme/js/vendor.js +++ b/readthedocsext/theme/static/readthedocsext/theme/js/vendor.js @@ -5,7 +5,7 @@ * * Licensed MIT © Zeno Rocha */ -var t;t=function(){return function(){var e={686:function(e,t,n){"use strict";n.d(t,{default:function(){return C}});var i=n(279),o=n.n(i),r=n(370),a=n.n(r),s=n(817),c=n.n(s);function l(e){try{return document.execCommand(e)}catch(e){return!1}}var u=function(e){var t=c()(e);return l("cut"),t},d=function(e,t){var n=function(e){var t="rtl"===document.documentElement.getAttribute("dir"),n=document.createElement("textarea");n.style.fontSize="12pt",n.style.border="0",n.style.padding="0",n.style.margin="0",n.style.position="absolute",n.style[t?"right":"left"]="-9999px";var i=window.pageYOffset||document.documentElement.scrollTop;return n.style.top="".concat(i,"px"),n.setAttribute("readonly",""),n.value=e,n}(e);t.container.appendChild(n);var i=c()(n);return l("copy"),n.remove(),i},f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body},n="";return"string"==typeof e?n=d(e,t):e instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(null==e?void 0:e.type)?n=d(e.value,t):(n=c()(e),l("copy")),n};function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}var h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.action,n=void 0===t?"copy":t,i=e.container,o=e.target,r=e.text;if("copy"!==n&&"cut"!==n)throw new Error('Invalid "action" value, use either "copy" or "cut"');if(void 0!==o){if(!o||"object"!==p(o)||1!==o.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===n&&o.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===n&&(o.hasAttribute("readonly")||o.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}return r?f(r,{container:i}):o?"cut"===n?u(o):f(o,{container:i}):void 0};function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function g(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===m(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=a()(e,"click",(function(e){return t.onClick(e)}))}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget,n=this.action(t)||"copy",i=h({action:n,container:this.container,target:this.target(t),text:this.text(t)});this.emit(i?"success":"error",{action:n,text:i,trigger:t,clearSelection:function(){t&&t.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(e){return x("action",e)}},{key:"defaultTarget",value:function(e){var t=x("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return x("text",e)}},{key:"destroy",value:function(){this.listener.destroy()}}],i=[{key:"copy",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body};return f(e,t)}},{key:"cut",value:function(e){return u(e)}},{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,n=!!document.queryCommandSupported;return t.forEach((function(e){n=n&&!!document.queryCommandSupported(e)})),n}}],n&&g(t.prototype,n),i&&g(t,i),r}(o()),C=w},828:function(e){if("undefined"!=typeof Element&&!Element.prototype.matches){var t=Element.prototype;t.matches=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}e.exports=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}},438:function(e,t,n){var i=n(828);function o(e,t,n,i,o){var a=r.apply(this,arguments);return e.addEventListener(n,a,o),{destroy:function(){e.removeEventListener(n,a,o)}}}function r(e,t,n,o){return function(n){n.delegateTarget=i(n.target,t),n.delegateTarget&&o.call(e,n)}}e.exports=function(e,t,n,i,r){return"function"==typeof e.addEventListener?o.apply(null,arguments):"function"==typeof n?o.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,(function(e){return o(e,t,n,i,r)})))}},879:function(e,t){t.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},t.nodeList=function(e){var n=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in e&&(0===e.length||t.node(e[0]))},t.string=function(e){return"string"==typeof e||e instanceof String},t.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},370:function(e,t,n){var i=n(879),o=n(438);e.exports=function(e,t,n){if(!e&&!t&&!n)throw new Error("Missing required arguments");if(!i.string(t))throw new TypeError("Second argument must be a String");if(!i.fn(n))throw new TypeError("Third argument must be a Function");if(i.node(e))return function(e,t,n){return e.addEventListener(t,n),{destroy:function(){e.removeEventListener(t,n)}}}(e,t,n);if(i.nodeList(e))return function(e,t,n){return Array.prototype.forEach.call(e,(function(e){e.addEventListener(t,n)})),{destroy:function(){Array.prototype.forEach.call(e,(function(e){e.removeEventListener(t,n)}))}}}(e,t,n);if(i.string(e))return function(e,t,n){return o(document.body,e,t,n)}(e,t,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},817:function(e){e.exports=function(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var i=window.getSelection(),o=document.createRange();o.selectNodeContents(e),i.removeAllRanges(),i.addRange(o),t=i.toString()}return t}},279:function(e){function t(){}t.prototype={on:function(e,t,n){var i=this.e||(this.e={});return(i[e]||(i[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var i=this;function o(){i.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),i=0,o=n.length;i=t?e:""+Array(t+1-i.length).join(n)+e},b={s:v,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),i=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+v(i,2,"0")+":"+v(o,2,"0")},m:function e(t,n){if(t.date()1)return e(a[0])}else{var s=t.name;x[s]=t,o=s}return!i&&o&&(y=o),o||!i&&y},k=function(e,t){if(C(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new A(n)},T=b;T.l=S,T.i=C,T.w=function(e,t){return k(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var A=function(){function g(e){this.$L=S(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var v=g.prototype;return v.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var i=t.match(h);if(i){var o=i[2]-1||0,r=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,r)):new Date(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,r)}}return new Date(t)}(e),this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return T},v.isValid=function(){return!(this.$d.toString()===p)},v.isSame=function(e,t){var n=k(e);return this.startOf(t)<=n&&n<=this.endOf(t)},v.isAfter=function(e,t){return k(e)0,g<=m.r||!m.r){g<=1&&h>0&&(m=f[h-1]);var v=d[m.l];s&&(g=s(""+g)),l="string"==typeof v?v.replace("%d",g):v(g,i,m.l,u);break}}if(i)return l;var b=u?d.future:d.past;return"function"==typeof b?b(l):b.replace("%s",l)},i.to=function(e,t){return r(e,t,this,!0)},i.from=function(e,t){return r(e,t,this)};var a=function(e){return e.$u?n.utc():n()};i.toNow=function(e){return this.to(a(this),e)},i.fromNow=function(e){return this.from(a(this),e)}}}()},83:(e,t,n)=>{ +var t;t=function(){return function(){var e={686:function(e,t,n){"use strict";n.d(t,{default:function(){return C}});var i=n(279),o=n.n(i),r=n(370),a=n.n(r),s=n(817),c=n.n(s);function l(e){try{return document.execCommand(e)}catch(e){return!1}}var u=function(e){var t=c()(e);return l("cut"),t},d=function(e,t){var n=function(e){var t="rtl"===document.documentElement.getAttribute("dir"),n=document.createElement("textarea");n.style.fontSize="12pt",n.style.border="0",n.style.padding="0",n.style.margin="0",n.style.position="absolute",n.style[t?"right":"left"]="-9999px";var i=window.pageYOffset||document.documentElement.scrollTop;return n.style.top="".concat(i,"px"),n.setAttribute("readonly",""),n.value=e,n}(e);t.container.appendChild(n);var i=c()(n);return l("copy"),n.remove(),i},f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body},n="";return"string"==typeof e?n=d(e,t):e instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(null==e?void 0:e.type)?n=d(e.value,t):(n=c()(e),l("copy")),n};function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}var h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.action,n=void 0===t?"copy":t,i=e.container,o=e.target,r=e.text;if("copy"!==n&&"cut"!==n)throw new Error('Invalid "action" value, use either "copy" or "cut"');if(void 0!==o){if(!o||"object"!==p(o)||1!==o.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===n&&o.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===n&&(o.hasAttribute("readonly")||o.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}return r?f(r,{container:i}):o?"cut"===n?u(o):f(o,{container:i}):void 0};function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function m(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===g(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=a()(e,"click",(function(e){return t.onClick(e)}))}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget,n=this.action(t)||"copy",i=h({action:n,container:this.container,target:this.target(t),text:this.text(t)});this.emit(i?"success":"error",{action:n,text:i,trigger:t,clearSelection:function(){t&&t.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(e){return x("action",e)}},{key:"defaultTarget",value:function(e){var t=x("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return x("text",e)}},{key:"destroy",value:function(){this.listener.destroy()}}],i=[{key:"copy",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body};return f(e,t)}},{key:"cut",value:function(e){return u(e)}},{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,n=!!document.queryCommandSupported;return t.forEach((function(e){n=n&&!!document.queryCommandSupported(e)})),n}}],n&&m(t.prototype,n),i&&m(t,i),r}(o()),C=w},828:function(e){if("undefined"!=typeof Element&&!Element.prototype.matches){var t=Element.prototype;t.matches=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}e.exports=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}},438:function(e,t,n){var i=n(828);function o(e,t,n,i,o){var a=r.apply(this,arguments);return e.addEventListener(n,a,o),{destroy:function(){e.removeEventListener(n,a,o)}}}function r(e,t,n,o){return function(n){n.delegateTarget=i(n.target,t),n.delegateTarget&&o.call(e,n)}}e.exports=function(e,t,n,i,r){return"function"==typeof e.addEventListener?o.apply(null,arguments):"function"==typeof n?o.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,(function(e){return o(e,t,n,i,r)})))}},879:function(e,t){t.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},t.nodeList=function(e){var n=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in e&&(0===e.length||t.node(e[0]))},t.string=function(e){return"string"==typeof e||e instanceof String},t.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},370:function(e,t,n){var i=n(879),o=n(438);e.exports=function(e,t,n){if(!e&&!t&&!n)throw new Error("Missing required arguments");if(!i.string(t))throw new TypeError("Second argument must be a String");if(!i.fn(n))throw new TypeError("Third argument must be a Function");if(i.node(e))return function(e,t,n){return e.addEventListener(t,n),{destroy:function(){e.removeEventListener(t,n)}}}(e,t,n);if(i.nodeList(e))return function(e,t,n){return Array.prototype.forEach.call(e,(function(e){e.addEventListener(t,n)})),{destroy:function(){Array.prototype.forEach.call(e,(function(e){e.removeEventListener(t,n)}))}}}(e,t,n);if(i.string(e))return function(e,t,n){return o(document.body,e,t,n)}(e,t,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},817:function(e){e.exports=function(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var i=window.getSelection(),o=document.createRange();o.selectNodeContents(e),i.removeAllRanges(),i.addRange(o),t=i.toString()}return t}},279:function(e){function t(){}t.prototype={on:function(e,t,n){var i=this.e||(this.e={});return(i[e]||(i[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var i=this;function o(){i.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),i=0,o=n.length;i=t?e:""+Array(t+1-i.length).join(n)+e},b={s:v,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),i=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+v(i,2,"0")+":"+v(o,2,"0")},m:function e(t,n){if(t.date()1)return e(a[0])}else{var s=t.name;x[s]=t,o=s}return!i&&o&&(y=o),o||!i&&y},k=function(e,t){if(C(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new E(n)},T=b;T.l=S,T.i=C,T.w=function(e,t){return k(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function m(e){this.$L=S(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var v=m.prototype;return v.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var i=t.match(h);if(i){var o=i[2]-1||0,r=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,r)):new Date(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,r)}}return new Date(t)}(e),this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return T},v.isValid=function(){return!(this.$d.toString()===p)},v.isSame=function(e,t){var n=k(e);return this.startOf(t)<=n&&n<=this.endOf(t)},v.isAfter=function(e,t){return k(e)0,m<=g.r||!g.r){m<=1&&h>0&&(g=f[h-1]);var v=d[g.l];s&&(m=s(""+m)),l="string"==typeof v?v.replace("%d",m):v(m,i,g.l,u);break}}if(i)return l;var b=u?d.future:d.past;return"function"==typeof b?b(l):b.replace("%s",l)},i.to=function(e,t){return r(e,t,this,!0)},i.from=function(e,t){return r(e,t,this)};var a=function(e){return e.$u?n.utc():n()};i.toNow=function(e){return this.to(a(this),e)},i.fromNow=function(e){return this.from(a(this),e)}}}()},83:(e,t,n)=>{ /*! * # Fomantic-UI - API * https://github.com/fomantic/Fomantic-UI/ @@ -15,7 +15,7 @@ var t;t=function(){return function(){var e={686:function(e,t,n){"use strict";n.d * https://opensource.org/licenses/MIT * */ -!function(e,t,n){"use strict";function i(e){return null!==e&&e===e.window}function o(e){return"function"==typeof e&&"number"!=typeof e.nodeType}t=void 0!==t&&t.Math===Math?t:globalThis,e.fn.api=function(r){var a,s=o(this)?e(t):e(this),c=Date.now(),l=[],u=arguments[0],d="string"==typeof u,f=[].slice.call(arguments,1),p=function(i,o){var r;return[t,n].indexOf(i)>=0?r=e(i):0===(r=e(o.document).find(i)).length&&(r=o.frameElement?p(i,o.parent):t),r};return s.each((function(){var n,s,h,m,g,v,b,y=e.isPlainObject(r)?e.extend(!0,{},e.fn.api.settings,r):e.extend({},e.fn.api.settings),x=y.regExp,w=y.namespace,C=y.metadata,S=y.selector,k=y.error,T=y.className,A="."+w,E="module-"+w,D=e(this),O=D.closest(S.form),P=y.stateContext?p(y.stateContext,t):D,R=this,M=P[0],L=D.data(E);b={initialize:function(){d||(v=y.data,b.bind.events()),b.instantiate()},instantiate:function(){b.verbose("Storing instance of module",b),L=b,D.data(E,L)},destroy:function(){b.verbose("Destroying previous module for",R),D.removeData(E).off(A)},bind:{events:function(){var e=b.get.event();e?(b.verbose("Attaching API events to element",e),D.on(e+A,b.event.trigger)):"now"===y.on&&(b.debug("Querying API endpoint immediately"),b.query())}},decode:{json:function(e){if(void 0!==e&&"string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}},read:{cachedResponse:function(e){var n;if(void 0!==t.Storage)return n=sessionStorage.getItem(e+b.get.normalizedData()),b.debug("Using cached response",e,y.data,n),n=b.decode.json(n);b.error(k.noStorage)}},write:{cachedResponse:function(n,i){void 0!==t.Storage?(e.isPlainObject(i)&&(i=JSON.stringify(i)),sessionStorage.setItem(n+b.get.normalizedData(),i),b.verbose("Storing cached response for url",n,y.data,i)):b.error(k.noStorage)}},query:function(){if(b.is.disabled())b.debug("Element is disabled API request aborted");else{if(b.is.loading()){if(!y.interruptRequests)return void b.debug("Cancelling request, previous request is still pending");b.debug("Interrupting previous request"),b.abort()}if(y.defaultData&&e.extend(!0,y.urlData,b.get.defaultData()),y.serializeForm&&(y.data=b.add.formData(v||y.data)),!1===(s=b.get.settings()))return b.cancelled=!0,void b.error(k.beforeSend);if(b.cancelled=!1,(h=b.get.templatedURL())||b.is.mocked()){if((h=b.add.urlData(h))||b.is.mocked()){if(s.url=y.base+h,n=e.extend(!0,{},y,{type:y.method||y.type,data:m,url:y.base+h,beforeSend:y.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),b.debug("Querying URL",n.url),b.verbose("Using AJAX settings",n),"local"===y.cache&&b.read.cachedResponse(h))return b.debug("Response returned from local cache"),b.request=b.create.request(),void b.request.resolveWith(M,[b.read.cachedResponse(h)]);y.throttle?y.throttleFirstRequest||b.timer?(b.debug("Throttling request",y.throttle),clearTimeout(b.timer),b.timer=setTimeout((function(){b.timer&&delete b.timer,b.debug("Sending throttled request",m,n.method),b.send.request()}),y.throttle)):(b.debug("Sending request",m,n.method),b.send.request(),b.timer=setTimeout((function(){}),y.throttle)):(b.debug("Sending request",m,n.method),b.send.request())}}else b.error(k.missingURL)}},should:{removeError:function(){return!0===y.hideError||"auto"===y.hideError&&!b.is.form()}},is:{disabled:function(){return D.filter(S.disabled).length>0},expectingJSON:function(){return"json"===y.dataType||"jsonp"===y.dataType},form:function(){return D.is("form")||P.is("form")},mocked:function(){return y.mockResponse||y.mockResponseAsync||y.response||y.responseAsync},input:function(){return D.is("input")},loading:function(){return!!b.request&&"pending"===b.request.state()},abortedRequest:function(e){return e&&void 0!==e.readyState&&0===e.readyState?(b.verbose("XHR request determined to be aborted"),!0):(b.verbose("XHR request was not aborted"),!1)},validResponse:function(e){return b.is.expectingJSON()&&o(y.successTest)?(b.debug("Checking JSON returned success",y.successTest,e),y.successTest(e)?(b.debug("Response passed success test",e),!0):(b.debug("Response failed success test",e),!1)):(b.verbose("Response is not JSON, skipping validation",y.successTest,e),!0)}},was:{cancelled:function(){return b.cancelled||!1},successful:function(){return b.request&&"resolved"===b.request.state()},failure:function(){return b.request&&"rejected"===b.request.state()},complete:function(){return b.request&&("resolved"===b.request.state()||"rejected"===b.request.state())}},add:{urlData:function(t,n){var i,o;return t&&(i=t.match(x.required),o=t.match(x.optional),n=n||y.urlData,i&&(b.debug("Looking for required URL variables",i),e.each(i,(function(i,o){var r=-1!==o.indexOf("$")?o.slice(2,-1):o.slice(1,-1),a=e.isPlainObject(n)&&void 0!==n[r]?n[r]:void 0!==D.data(r)?D.data(r):void 0!==P.data(r)?P.data(r):n[r];if(void 0===a)return b.error(k.requiredParameter,r,t),t=!1,!1;b.verbose("Found required variable",r,a),a=y.encodeParameters?b.get.urlEncodedValue(a):a,t=t.replace(o,a)}))),o&&(b.debug("Looking for optional URL variables",i),e.each(o,(function(i,o){var r=-1!==o.indexOf("$")?o.slice(3,-1):o.slice(2,-1),a=e.isPlainObject(n)&&void 0!==n[r]?n[r]:void 0!==D.data(r)?D.data(r):void 0!==P.data(r)?P.data(r):n[r];void 0!==a?(b.verbose("Optional variable Found",r,a),t=t.replace(o,a)):(b.verbose("Optional variable not found",r),t=-1!==t.indexOf("/"+o)?t.replace("/"+o,""):t.replace(o,""))})))),t},formData:function(t){var n,i={},o="formdata"===y.serializeForm;if(t=t||v||y.data,n=e.isPlainObject(t),o)i=new FormData(O[0]),y.processData=void 0!==y.processData&&y.processData,y.contentType=void 0!==y.contentType&&y.contentType;else{var r=O.serializeArray(),a={},s={},c=function(e,t,n){return e[t]=n,e};e.each(e('input[type="file"]',O),(function(t,n){e.each(e(n)[0].files,(function(e,t){r.push({name:n.name,value:t})}))})),e.each(r,(function(t,n){if(x.validate.test(n.name)){var o="checkbox"===e('[name="'+n.name+'"]',O).attr("type"),r=parseFloat(n.value),l=o&&"on"===n.value||"true"===n.value||(String(r)===n.value?r:"false"!==n.value&&n.value),u=n.name.match(x.key)||[],d=n.name.replace(/\[]$/,"");d in a?Array.isArray(s[d])?s[d].push(l):s[d]=[s[d],l]:(a[d]=0,s[d]=l),-1===d.indexOf("[]")&&(l=s[d]);for(;u.length>0;){var f=u.pop();""!==f||Array.isArray(l)?x.fixed.test(f)?l=c([],f,l):x.named.test(f)&&(l=c({},f,l)):l=c([],a[d]++,l)}i=e.extend(!0,i,l)}}))}return n?(b.debug("Extending existing data with form data",t,i),o?(e.each(Object.keys(t),(function(e,n){i.append(n,t[n])})),t=i):t=e.extend(!0,{},t,i)):(b.debug("Adding form data",i),t=i),t}},send:{request:function(){b.set.loading(),b.request=b.create.request(),b.is.mocked()?b.mockedXHR=b.create.mockedXHR():b.xhr=b.create.xhr(),y.onRequest.call(M,b.request,b.xhr)}},event:{trigger:function(e){b.query(),"submit"!==e.type&&"click"!==e.type||e.preventDefault()},xhr:{always:function(){},done:function(t,n,i){var r=this,a=Date.now()-g,s=y.loadingDuration-a,c=!!o(y.onResponse)&&(b.is.expectingJSON()&&!y.rawResponse?y.onResponse.call(r,e.extend(!0,{},t)):y.onResponse.call(r,t));s=s>0?s:0,c&&(b.debug("Modified API response in onResponse callback",y.onResponse,c,t),t=c),s>0&&b.debug("Response completed early delaying state change by",s),setTimeout((function(){b.is.validResponse(t)?b.request.resolveWith(r,[t,i]):b.request.rejectWith(r,[i,"invalid"])}),s)},fail:function(e,t,n){var i=this,o=Date.now()-g,r=y.loadingDuration-o;(r=r>0?r:0)>0&&b.debug("Response completed early delaying state change by",r),setTimeout((function(){b.is.abortedRequest(e)?b.request.rejectWith(i,[e,"aborted",n]):b.request.rejectWith(i,[e,"error",t,n])}),r)}},request:{done:function(e,t){b.debug("Successful API Response",e),"local"===y.cache&&h&&(b.write.cachedResponse(h,e),b.debug("Saving server response locally",b.cache)),y.onSuccess.call(M,e,D,t)},complete:function(e,t){var n,i;b.was.successful()?(i=e,n=t):(n=e,i=b.get.responseFromXHR(n)),b.remove.loading(),y.onComplete.call(M,i,D,n)},fail:function(e,t,i){var o=b.get.responseFromXHR(e),r=b.get.errorFromRequest(o,t,i);if("aborted"===t)return b.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",t,i),y.onAbort.call(M,t,D,e),!0;"invalid"===t?b.debug("JSON did not pass success test. A server-side error has most likely occurred",o):"error"===t&&void 0!==e&&(b.debug("XHR produced a server error",t,i),(e.status<200||e.status>=300)&&void 0!==i&&""!==i&&b.error(k.statusMessage+i,n.url),y.onError.call(M,r,D,e)),y.errorDuration&&"aborted"!==t&&(b.debug("Adding error state"),b.set.error(),b.should.removeError()&&setTimeout((function(){b.remove.error()}),y.errorDuration)),b.debug("API Request failed",r,e),y.onFailure.call(M,o,D,e)}}},create:{request:function(){return e.Deferred().always(b.event.request.complete).done(b.event.request.done).fail(b.event.request.fail)},mockedXHR:function(){var t,n,i,r=y.mockResponse||y.response,a=y.mockResponseAsync||y.responseAsync;return i=e.Deferred().always(b.event.xhr.complete).done(b.event.xhr.done).fail(b.event.xhr.fail),r?(o(r)?(b.debug("Using specified synchronous callback",r),n=r.call(M,s)):(b.debug("Using settings specified response",r),n=r),i.resolveWith(M,[n,false,{responseText:n}])):o(a)&&(t=function(e){b.debug("Async callback returned response",e),e?i.resolveWith(M,[e,false,{responseText:e}]):i.rejectWith(M,[{responseText:e},false,false])},b.debug("Using specified async response callback",a),a.call(M,s,t)),i},xhr:function(){var t;return t=e.ajax(n).always(b.event.xhr.always).done(b.event.xhr.done).fail(b.event.xhr.fail),b.verbose("Created server request",t,n),t}},set:{error:function(){b.verbose("Adding error state to element",P),P.addClass(T.error)},loading:function(){b.verbose("Adding loading state to element",P),P.addClass(T.loading),g=Date.now()}},remove:{error:function(){b.verbose("Removing error state from element",P),P.removeClass(T.error)},loading:function(){b.verbose("Removing loading state from element",P),P.removeClass(T.loading)}},get:{normalizedData:function(){return"string"==typeof y.data?y.data:JSON.stringify(y.data,Object.keys(y.data).sort())},responseFromXHR:function(t){return!!e.isPlainObject(t)&&(b.is.expectingJSON()?b.decode.json(t.responseText):t.responseText)},errorFromRequest:function(t,n,i){return e.isPlainObject(t)&&void 0!==t.error?t.error:void 0!==y.error[n]?y.error[n]:i},request:function(){return b.request||!1},xhr:function(){return b.xhr||!1},settings:function(){var t;return(t=y.beforeSend.call(D,y))&&(void 0!==t.success&&(b.debug("Legacy success callback detected",t),b.error(k.legacyParameters,t.success),t.onSuccess=t.success),void 0!==t.failure&&(b.debug("Legacy failure callback detected",t),b.error(k.legacyParameters,t.failure),t.onFailure=t.failure),void 0!==t.complete&&(b.debug("Legacy complete callback detected",t),b.error(k.legacyParameters,t.complete),t.onComplete=t.complete)),void 0===t&&b.error(k.noReturnedValue),!1===t?t:void 0!==t?e.extend(!0,{},t):e.extend(!0,{},y)},urlEncodedValue:function(e){var n=t.decodeURIComponent(e),i=t.encodeURIComponent(e);return n!==e?(b.debug("URL value is already encoded, avoiding double encoding",e),e):(b.verbose("Encoding value using encodeURIComponent",e,i),i)},defaultData:function(){var e={};return i(R)||(b.is.input()?e.value=D.val():b.is.form()||(e.text=D.text())),e},event:function(){return i(R)||"now"===y.on?(b.debug("API called without element, no events attached"),!1):"auto"===y.on?D.is("input")?void 0!==R.oninput?"input":void 0!==R.onpropertychange?"propertychange":"keyup":D.is("form")?"submit":"click":y.on},templatedURL:function(e){if(e=e||y.action||D.data(C.action)||!1,h=y.url||D.data(C.url)||!1)return b.debug("Using specified url",h),h;if(e){if(b.debug("Looking up url for action",e,y.api),void 0===y.api[e]&&!b.is.mocked())return void b.error(k.missingAction,y.action,y.api);h=y.api[e]}else b.is.form()&&(h=D.attr("action")||P.attr("action")||!1,b.debug("No url or action specified, defaulting to form action",h));return h}},abort:function(){var e=b.get.xhr();e&&"resolved"!==e.state()&&(b.debug("Cancelling API request"),e.abort())},reset:function(){b.remove.error(),b.remove.loading()},setting:function(t,n){if(b.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,y,t);else{if(void 0===n)return y[t];e.isPlainObject(y[t])?e.extend(!0,y[t],n):y[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,b,t);else{if(void 0===n)return b[t];b[t]=n}},debug:function(){!y.silent&&y.debug&&(y.performance?b.performance.log(arguments):(b.debug=Function.prototype.bind.call(console.info,console,y.name+":"),b.debug.apply(console,arguments)))},verbose:function(){!y.silent&&y.verbose&&y.debug&&(y.performance?b.performance.log(arguments):(b.verbose=Function.prototype.bind.call(console.info,console,y.name+":"),b.verbose.apply(console,arguments)))},error:function(){y.silent||(b.error=Function.prototype.bind.call(console.error,console,y.name+":"),b.error.apply(console,arguments))},performance:{log:function(e){var t,n;y.performance&&(n=(t=Date.now())-(c||t),c=t,l.push({Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":n})),clearTimeout(b.performance.timer),b.performance.timer=setTimeout((function(){b.performance.display()}),500)},display:function(){var t=y.name+":",n=0;c=!1,clearTimeout(b.performance.timer),e.each(l,(function(e,t){n+=t["Execution Time"]})),t+=" "+n+"ms",l.length>0&&(console.groupCollapsed(t),console.table?console.table(l):e.each(l,(function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")})),console.groupEnd()),l=[]}},invoke:function(t,n,i){var r,s,c,l=L;return n=n||f,i=i||R,"string"==typeof t&&void 0!==l&&(t=t.split(/[ .]/),r=t.length-1,e.each(t,(function(n,i){var o=n!==r?i+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(l[o])&&n!==r)l=l[o];else{if(void 0!==l[o])return s=l[o],!1;if(!e.isPlainObject(l[i])||n===r)return void 0!==l[i]?(s=l[i],!1):(b.error(k.method,t),!1);l=l[i]}}))),o(s)?c=s.apply(i,n):void 0!==s&&(c=s),Array.isArray(a)?a.push(c):void 0!==a?a=[a,c]:void 0!==c&&(a=c),s}},d?(void 0===L&&b.initialize(),b.invoke(u)):(void 0!==L&&L.invoke("destroy"),b.initialize())})),void 0!==a?a:this},e.api=e.fn.api,e.api.settings={name:"API",namespace:"api",debug:!1,verbose:!1,performance:!0,api:{},cache:!0,interruptRequests:!0,on:"auto",stateContext:!1,loadingDuration:0,hideError:"auto",errorDuration:2e3,encodeParameters:!0,action:!1,url:!1,base:"",urlData:{},defaultData:!0,serializeForm:!1,throttle:0,throttleFirstRequest:!0,method:"get",data:{},dataType:"json",mockResponse:!1,mockResponseAsync:!1,response:!1,responseAsync:!1,rawResponse:!0,beforeSend:function(e){return e},beforeXHR:function(e){},onRequest:function(e,t){},onResponse:!1,onSuccess:function(e,t){},onComplete:function(e,t){},onFailure:function(e,t){},onError:function(e,t){},onAbort:function(e,t){},successTest:!1,error:{beforeSend:"The before send function has aborted the request",error:"There was an error with your request",exitConditions:"API Request Aborted. Exit conditions met",JSONParse:"JSON could not be parsed during error handling",legacyParameters:"You are using legacy API success callback names",method:"The method you called is not defined",missingAction:"API action used but no url was defined",missingURL:"No URL specified for api event",noReturnedValue:"The beforeSend callback must return a settings object, beforeSend ignored.",noStorage:"Caching responses locally requires session storage",parseError:"There was an error parsing your request",requiredParameter:"Missing a required URL parameter: ",statusMessage:"Server gave an error: ",timeout:"Your request timed out"},regExp:{required:/{\$*[\da-z]+}/gi,optional:/{\/\$*[\da-z]+}/gi,validate:/^[_a-z][\w-]*(?:\[[\w-]*])*$/i,key:/[\w-]+|(?=\[])/gi,push:/^$/,fixed:/^\d+$/,named:/^[\w-]+$/i},className:{loading:"loading",error:"error"},selector:{disabled:".disabled",form:"form"},metadata:{action:"action",url:"url"}}}(n(9755),window,document)},8105:(e,t,n)=>{ +!function(e,t,n){"use strict";function i(e){return null!==e&&e===e.window}function o(e){return"function"==typeof e&&"number"!=typeof e.nodeType}t=void 0!==t&&t.Math===Math?t:globalThis,e.fn.api=function(r){var a,s=o(this)?e(t):e(this),c=Date.now(),l=[],u=arguments[0],d="string"==typeof u,f=[].slice.call(arguments,1),p=function(i,o){var r;return[t,n].indexOf(i)>=0?r=e(i):0===(r=e(o.document).find(i)).length&&(r=o.frameElement?p(i,o.parent):t),r};return s.each((function(){var n,s,h,g,m,v,b,y=e.isPlainObject(r)?e.extend(!0,{},e.fn.api.settings,r):e.extend({},e.fn.api.settings),x=y.regExp,w=y.namespace,C=y.metadata,S=y.selector,k=y.error,T=y.className,E="."+w,A="module-"+w,D=e(this),O=D.closest(S.form),R=y.stateContext?p(y.stateContext,t):D,P=this,M=R[0],N=D.data(A);b={initialize:function(){d||(v=y.data,b.bind.events()),b.instantiate()},instantiate:function(){b.verbose("Storing instance of module",b),N=b,D.data(A,N)},destroy:function(){b.verbose("Destroying previous module for",P),D.removeData(A).off(E)},bind:{events:function(){var e=b.get.event();e?(b.verbose("Attaching API events to element",e),D.on(e+E,b.event.trigger)):"now"===y.on&&(b.debug("Querying API endpoint immediately"),b.query())}},decode:{json:function(e){if(void 0!==e&&"string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}},read:{cachedResponse:function(e){var n;if(void 0!==t.Storage)return n=sessionStorage.getItem(e+b.get.normalizedData()),b.debug("Using cached response",e,y.data,n),n=b.decode.json(n);b.error(k.noStorage)}},write:{cachedResponse:function(n,i){void 0!==t.Storage?(e.isPlainObject(i)&&(i=JSON.stringify(i)),sessionStorage.setItem(n+b.get.normalizedData(),i),b.verbose("Storing cached response for url",n,y.data,i)):b.error(k.noStorage)}},query:function(){if(b.is.disabled())b.debug("Element is disabled API request aborted");else{if(b.is.loading()){if(!y.interruptRequests)return void b.debug("Cancelling request, previous request is still pending");b.debug("Interrupting previous request"),b.abort()}if(y.defaultData&&e.extend(!0,y.urlData,b.get.defaultData()),y.serializeForm&&(y.data=b.add.formData(v||y.data)),!1===(s=b.get.settings()))return b.cancelled=!0,void b.error(k.beforeSend);if(b.cancelled=!1,(h=b.get.templatedURL())||b.is.mocked()){if((h=b.add.urlData(h))||b.is.mocked()){if(s.url=y.base+h,n=e.extend(!0,{},y,{type:y.method||y.type,data:g,url:y.base+h,beforeSend:y.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),b.debug("Querying URL",n.url),b.verbose("Using AJAX settings",n),"local"===y.cache&&b.read.cachedResponse(h))return b.debug("Response returned from local cache"),b.request=b.create.request(),void b.request.resolveWith(M,[b.read.cachedResponse(h)]);y.throttle?y.throttleFirstRequest||b.timer?(b.debug("Throttling request",y.throttle),clearTimeout(b.timer),b.timer=setTimeout((function(){b.timer&&delete b.timer,b.debug("Sending throttled request",g,n.method),b.send.request()}),y.throttle)):(b.debug("Sending request",g,n.method),b.send.request(),b.timer=setTimeout((function(){}),y.throttle)):(b.debug("Sending request",g,n.method),b.send.request())}}else b.error(k.missingURL)}},should:{removeError:function(){return!0===y.hideError||"auto"===y.hideError&&!b.is.form()}},is:{disabled:function(){return D.filter(S.disabled).length>0},expectingJSON:function(){return"json"===y.dataType||"jsonp"===y.dataType},form:function(){return D.is("form")||R.is("form")},mocked:function(){return y.mockResponse||y.mockResponseAsync||y.response||y.responseAsync},input:function(){return D.is("input")},loading:function(){return!!b.request&&"pending"===b.request.state()},abortedRequest:function(e){return e&&void 0!==e.readyState&&0===e.readyState?(b.verbose("XHR request determined to be aborted"),!0):(b.verbose("XHR request was not aborted"),!1)},validResponse:function(e){return b.is.expectingJSON()&&o(y.successTest)?(b.debug("Checking JSON returned success",y.successTest,e),y.successTest(e)?(b.debug("Response passed success test",e),!0):(b.debug("Response failed success test",e),!1)):(b.verbose("Response is not JSON, skipping validation",y.successTest,e),!0)}},was:{cancelled:function(){return b.cancelled||!1},successful:function(){return b.request&&"resolved"===b.request.state()},failure:function(){return b.request&&"rejected"===b.request.state()},complete:function(){return b.request&&("resolved"===b.request.state()||"rejected"===b.request.state())}},add:{urlData:function(t,n){var i,o;return t&&(i=t.match(x.required),o=t.match(x.optional),n=n||y.urlData,i&&(b.debug("Looking for required URL variables",i),e.each(i,(function(i,o){var r=-1!==o.indexOf("$")?o.slice(2,-1):o.slice(1,-1),a=e.isPlainObject(n)&&void 0!==n[r]?n[r]:void 0!==D.data(r)?D.data(r):void 0!==R.data(r)?R.data(r):n[r];if(void 0===a)return b.error(k.requiredParameter,r,t),t=!1,!1;b.verbose("Found required variable",r,a),a=y.encodeParameters?b.get.urlEncodedValue(a):a,t=t.replace(o,a)}))),o&&(b.debug("Looking for optional URL variables",i),e.each(o,(function(i,o){var r=-1!==o.indexOf("$")?o.slice(3,-1):o.slice(2,-1),a=e.isPlainObject(n)&&void 0!==n[r]?n[r]:void 0!==D.data(r)?D.data(r):void 0!==R.data(r)?R.data(r):n[r];void 0!==a?(b.verbose("Optional variable Found",r,a),t=t.replace(o,a)):(b.verbose("Optional variable not found",r),t=-1!==t.indexOf("/"+o)?t.replace("/"+o,""):t.replace(o,""))})))),t},formData:function(t){var n,i={},o="formdata"===y.serializeForm;if(t=t||v||y.data,n=e.isPlainObject(t),o)i=new FormData(O[0]),y.processData=void 0!==y.processData&&y.processData,y.contentType=void 0!==y.contentType&&y.contentType;else{var r=O.serializeArray(),a={},s={},c=function(e,t,n){return e[t]=n,e};e.each(e('input[type="file"]',O),(function(t,n){e.each(e(n)[0].files,(function(e,t){r.push({name:n.name,value:t})}))})),e.each(r,(function(t,n){if(x.validate.test(n.name)){var o="checkbox"===e('[name="'+n.name+'"]',O).attr("type"),r=parseFloat(n.value),l=o&&"on"===n.value||"true"===n.value||(String(r)===n.value?r:"false"!==n.value&&n.value),u=n.name.match(x.key)||[],d=n.name.replace(/\[]$/,"");d in a?Array.isArray(s[d])?s[d].push(l):s[d]=[s[d],l]:(a[d]=0,s[d]=l),-1===d.indexOf("[]")&&(l=s[d]);for(;u.length>0;){var f=u.pop();""!==f||Array.isArray(l)?x.fixed.test(f)?l=c([],f,l):x.named.test(f)&&(l=c({},f,l)):l=c([],a[d]++,l)}i=e.extend(!0,i,l)}}))}return n?(b.debug("Extending existing data with form data",t,i),o?(e.each(Object.keys(t),(function(e,n){i.append(n,t[n])})),t=i):t=e.extend(!0,{},t,i)):(b.debug("Adding form data",i),t=i),t}},send:{request:function(){b.set.loading(),b.request=b.create.request(),b.is.mocked()?b.mockedXHR=b.create.mockedXHR():b.xhr=b.create.xhr(),y.onRequest.call(M,b.request,b.xhr)}},event:{trigger:function(e){b.query(),"submit"!==e.type&&"click"!==e.type||e.preventDefault()},xhr:{always:function(){},done:function(t,n,i){var r=this,a=Date.now()-m,s=y.loadingDuration-a,c=!!o(y.onResponse)&&(b.is.expectingJSON()&&!y.rawResponse?y.onResponse.call(r,e.extend(!0,{},t)):y.onResponse.call(r,t));s=s>0?s:0,c&&(b.debug("Modified API response in onResponse callback",y.onResponse,c,t),t=c),s>0&&b.debug("Response completed early delaying state change by",s),setTimeout((function(){b.is.validResponse(t)?b.request.resolveWith(r,[t,i]):b.request.rejectWith(r,[i,"invalid"])}),s)},fail:function(e,t,n){var i=this,o=Date.now()-m,r=y.loadingDuration-o;(r=r>0?r:0)>0&&b.debug("Response completed early delaying state change by",r),setTimeout((function(){b.is.abortedRequest(e)?b.request.rejectWith(i,[e,"aborted",n]):b.request.rejectWith(i,[e,"error",t,n])}),r)}},request:{done:function(e,t){b.debug("Successful API Response",e),"local"===y.cache&&h&&(b.write.cachedResponse(h,e),b.debug("Saving server response locally",b.cache)),y.onSuccess.call(M,e,D,t)},complete:function(e,t){var n,i;b.was.successful()?(i=e,n=t):(n=e,i=b.get.responseFromXHR(n)),b.remove.loading(),y.onComplete.call(M,i,D,n)},fail:function(e,t,i){var o=b.get.responseFromXHR(e),r=b.get.errorFromRequest(o,t,i);if("aborted"===t)return b.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",t,i),y.onAbort.call(M,t,D,e),!0;"invalid"===t?b.debug("JSON did not pass success test. A server-side error has most likely occurred",o):"error"===t&&void 0!==e&&(b.debug("XHR produced a server error",t,i),(e.status<200||e.status>=300)&&void 0!==i&&""!==i&&b.error(k.statusMessage+i,n.url),y.onError.call(M,r,D,e)),y.errorDuration&&"aborted"!==t&&(b.debug("Adding error state"),b.set.error(),b.should.removeError()&&setTimeout((function(){b.remove.error()}),y.errorDuration)),b.debug("API Request failed",r,e),y.onFailure.call(M,o,D,e)}}},create:{request:function(){return e.Deferred().always(b.event.request.complete).done(b.event.request.done).fail(b.event.request.fail)},mockedXHR:function(){var t,n,i,r=y.mockResponse||y.response,a=y.mockResponseAsync||y.responseAsync;return i=e.Deferred().always(b.event.xhr.complete).done(b.event.xhr.done).fail(b.event.xhr.fail),r?(o(r)?(b.debug("Using specified synchronous callback",r),n=r.call(M,s)):(b.debug("Using settings specified response",r),n=r),i.resolveWith(M,[n,false,{responseText:n}])):o(a)&&(t=function(e){b.debug("Async callback returned response",e),e?i.resolveWith(M,[e,false,{responseText:e}]):i.rejectWith(M,[{responseText:e},false,false])},b.debug("Using specified async response callback",a),a.call(M,s,t)),i},xhr:function(){var t;return t=e.ajax(n).always(b.event.xhr.always).done(b.event.xhr.done).fail(b.event.xhr.fail),b.verbose("Created server request",t,n),t}},set:{error:function(){b.verbose("Adding error state to element",R),R.addClass(T.error)},loading:function(){b.verbose("Adding loading state to element",R),R.addClass(T.loading),m=Date.now()}},remove:{error:function(){b.verbose("Removing error state from element",R),R.removeClass(T.error)},loading:function(){b.verbose("Removing loading state from element",R),R.removeClass(T.loading)}},get:{normalizedData:function(){return"string"==typeof y.data?y.data:JSON.stringify(y.data,Object.keys(y.data).sort())},responseFromXHR:function(t){return!!e.isPlainObject(t)&&(b.is.expectingJSON()?b.decode.json(t.responseText):t.responseText)},errorFromRequest:function(t,n,i){return e.isPlainObject(t)&&void 0!==t.error?t.error:void 0!==y.error[n]?y.error[n]:i},request:function(){return b.request||!1},xhr:function(){return b.xhr||!1},settings:function(){var t;return(t=y.beforeSend.call(D,y))&&(void 0!==t.success&&(b.debug("Legacy success callback detected",t),b.error(k.legacyParameters,t.success),t.onSuccess=t.success),void 0!==t.failure&&(b.debug("Legacy failure callback detected",t),b.error(k.legacyParameters,t.failure),t.onFailure=t.failure),void 0!==t.complete&&(b.debug("Legacy complete callback detected",t),b.error(k.legacyParameters,t.complete),t.onComplete=t.complete)),void 0===t&&b.error(k.noReturnedValue),!1===t?t:void 0!==t?e.extend(!0,{},t):e.extend(!0,{},y)},urlEncodedValue:function(e){var n=t.decodeURIComponent(e),i=t.encodeURIComponent(e);return n!==e?(b.debug("URL value is already encoded, avoiding double encoding",e),e):(b.verbose("Encoding value using encodeURIComponent",e,i),i)},defaultData:function(){var e={};return i(P)||(b.is.input()?e.value=D.val():b.is.form()||(e.text=D.text())),e},event:function(){return i(P)||"now"===y.on?(b.debug("API called without element, no events attached"),!1):"auto"===y.on?D.is("input")?void 0!==P.oninput?"input":void 0!==P.onpropertychange?"propertychange":"keyup":D.is("form")?"submit":"click":y.on},templatedURL:function(e){if(e=e||y.action||D.data(C.action)||!1,h=y.url||D.data(C.url)||!1)return b.debug("Using specified url",h),h;if(e){if(b.debug("Looking up url for action",e,y.api),void 0===y.api[e]&&!b.is.mocked())return void b.error(k.missingAction,y.action,y.api);h=y.api[e]}else b.is.form()&&(h=D.attr("action")||R.attr("action")||!1,b.debug("No url or action specified, defaulting to form action",h));return h}},abort:function(){var e=b.get.xhr();e&&"resolved"!==e.state()&&(b.debug("Cancelling API request"),e.abort())},reset:function(){b.remove.error(),b.remove.loading()},setting:function(t,n){if(b.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,y,t);else{if(void 0===n)return y[t];e.isPlainObject(y[t])?e.extend(!0,y[t],n):y[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,b,t);else{if(void 0===n)return b[t];b[t]=n}},debug:function(){!y.silent&&y.debug&&(y.performance?b.performance.log(arguments):(b.debug=Function.prototype.bind.call(console.info,console,y.name+":"),b.debug.apply(console,arguments)))},verbose:function(){!y.silent&&y.verbose&&y.debug&&(y.performance?b.performance.log(arguments):(b.verbose=Function.prototype.bind.call(console.info,console,y.name+":"),b.verbose.apply(console,arguments)))},error:function(){y.silent||(b.error=Function.prototype.bind.call(console.error,console,y.name+":"),b.error.apply(console,arguments))},performance:{log:function(e){var t,n;y.performance&&(n=(t=Date.now())-(c||t),c=t,l.push({Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":n})),clearTimeout(b.performance.timer),b.performance.timer=setTimeout((function(){b.performance.display()}),500)},display:function(){var t=y.name+":",n=0;c=!1,clearTimeout(b.performance.timer),e.each(l,(function(e,t){n+=t["Execution Time"]})),t+=" "+n+"ms",l.length>0&&(console.groupCollapsed(t),console.table?console.table(l):e.each(l,(function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")})),console.groupEnd()),l=[]}},invoke:function(t,n,i){var r,s,c,l=N;return n=n||f,i=i||P,"string"==typeof t&&void 0!==l&&(t=t.split(/[ .]/),r=t.length-1,e.each(t,(function(n,i){var o=n!==r?i+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(l[o])&&n!==r)l=l[o];else{if(void 0!==l[o])return s=l[o],!1;if(!e.isPlainObject(l[i])||n===r)return void 0!==l[i]?(s=l[i],!1):(b.error(k.method,t),!1);l=l[i]}}))),o(s)?c=s.apply(i,n):void 0!==s&&(c=s),Array.isArray(a)?a.push(c):void 0!==a?a=[a,c]:void 0!==c&&(a=c),s}},d?(void 0===N&&b.initialize(),b.invoke(u)):(void 0!==N&&N.invoke("destroy"),b.initialize())})),void 0!==a?a:this},e.api=e.fn.api,e.api.settings={name:"API",namespace:"api",debug:!1,verbose:!1,performance:!0,api:{},cache:!0,interruptRequests:!0,on:"auto",stateContext:!1,loadingDuration:0,hideError:"auto",errorDuration:2e3,encodeParameters:!0,action:!1,url:!1,base:"",urlData:{},defaultData:!0,serializeForm:!1,throttle:0,throttleFirstRequest:!0,method:"get",data:{},dataType:"json",mockResponse:!1,mockResponseAsync:!1,response:!1,responseAsync:!1,rawResponse:!0,beforeSend:function(e){return e},beforeXHR:function(e){},onRequest:function(e,t){},onResponse:!1,onSuccess:function(e,t){},onComplete:function(e,t){},onFailure:function(e,t){},onError:function(e,t){},onAbort:function(e,t){},successTest:!1,error:{beforeSend:"The before send function has aborted the request",error:"There was an error with your request",exitConditions:"API Request Aborted. Exit conditions met",JSONParse:"JSON could not be parsed during error handling",legacyParameters:"You are using legacy API success callback names",method:"The method you called is not defined",missingAction:"API action used but no url was defined",missingURL:"No URL specified for api event",noReturnedValue:"The beforeSend callback must return a settings object, beforeSend ignored.",noStorage:"Caching responses locally requires session storage",parseError:"There was an error parsing your request",requiredParameter:"Missing a required URL parameter: ",statusMessage:"Server gave an error: ",timeout:"Your request timed out"},regExp:{required:/{\$*[\da-z]+}/gi,optional:/{\/\$*[\da-z]+}/gi,validate:/^[_a-z][\w-]*(?:\[[\w-]*])*$/i,key:/[\w-]+|(?=\[])/gi,push:/^$/,fixed:/^\d+$/,named:/^[\w-]+$/i},className:{loading:"loading",error:"error"},selector:{disabled:".disabled",form:"form"},metadata:{action:"action",url:"url"}}}(n(9755),window,document)},8105:(e,t,n)=>{ /*! * # Fomantic-UI - Form Validation * https://github.com/fomantic/Fomantic-UI/ @@ -25,7 +25,7 @@ var t;t=function(){return function(){var e={686:function(e,t,n){"use strict";n.d * https://opensource.org/licenses/MIT * */ -!function(e,t,n){"use strict";function i(e){return"function"==typeof e&&"number"!=typeof e.nodeType}t=void 0!==t&&t.Math===Math?t:globalThis,e.fn.form=function(o){var r,a=e(this),s=e(t),c=Date.now(),l=[],u=arguments[0],d="string"==typeof u,f=[].slice.call(arguments,1);return a.each((function(){var p,h,m,g,v,b,y,x,w,C,S,k,T,A,E,D,O,P,R=e(this),M=this,L=[],N=!1,$=!1,j=!1,I=["clean","clean"];P={initialize:function(){P.get.settings(),R.addClass(w.initial),d?(void 0===O&&P.instantiate(),P.invoke(u)):(void 0!==O&&(O.invoke("destroy"),P.refresh()),P.verbose("Initializing form validation",R,v),P.bindEvents(),P.set.defaults(),v.autoCheckRequired&&P.set.autoCheck(),P.instantiate())},instantiate:function(){P.verbose("Storing instance of module",P),O=P,R.data(T,P)},destroy:function(){P.verbose("Destroying previous module",O),P.removeEvents(),R.removeData(T)},refresh:function(){P.verbose("Refreshing selector cache"),p=R.find(x.field),h=R.find(x.group),m=R.find(x.message),R.find(x.prompt),g=R.find(x.submit),R.find(x.clear),R.find(x.reset)},refreshEvents:function(){P.removeEvents(),P.bindEvents()},submit:function(e){P.verbose("Submitting form",R),$=!0,R.trigger("submit"),e&&e.preventDefault()},attachEvents:function(t,n){n||(n="submit"),e(t).on("click"+A,(function(e){P[n](),e.preventDefault()})),E=t,D=n},bindEvents:function(){P.verbose("Attaching form events"),R.on("submit"+A,P.validate.form).on("blur"+A,x.field,P.event.field.blur).on("click"+A,x.submit,P.submit).on("click"+A,x.reset,P.reset).on("click"+A,x.clear,P.clear),p.on("invalid"+A,P.event.field.invalid),v.keyboardShortcuts&&R.on("keydown"+A,x.field,P.event.field.keydown),p.each((function(t,n){var i=e(n),o=i.prop("type"),r=P.get.changeEvent(o,i);i.on(r+A,P.event.field.change)})),v.preventLeaving&&s.on("beforeunload"+A,P.event.beforeUnload),p.on("change"+A+" click"+A+" keyup"+A+" keydown"+A+" blur"+A,(function(e){P.determine.isDirty()})),R.on("dirty"+A,(function(e){v.onDirty.call()})),R.on("clean"+A,(function(e){v.onClean.call()})),E&&P.attachEvents(E,D)},clear:function(){p.each((function(t,n){var i=e(n),o=i.parent(),r=i.closest(h),a=r.find(x.prompt),s=i.closest(x.uiCalendar),c=i.data(y.defaultValue)||"",l=i.is(x.checkbox),u=o.is(x.uiDropdown)&&P.can.useElement("dropdown"),d=s.length>0&&P.can.useElement("calendar");r.hasClass(w.error)&&(P.verbose("Resetting error on field",r),r.removeClass(w.error),a.remove()),u?(P.verbose("Resetting dropdown value",o,c),o.dropdown("clear",!0)):l?i.prop("checked",!1):d?s.calendar("clear"):(P.verbose("Resetting field value",i,c),i.val(""))})),P.remove.states()},reset:function(){p.each((function(t,n){var i=e(n),o=i.parent(),r=i.closest(h),a=i.closest(x.uiCalendar),s=r.find(x.prompt),c=i.data(y.defaultValue),l=i.is(x.checkbox),u=o.is(x.uiDropdown)&&P.can.useElement("dropdown"),d=a.length>0&&P.can.useElement("calendar"),f=i.is(x.file),p=r.hasClass(w.error);void 0!==c&&(p&&(P.verbose("Resetting error on field",r),r.removeClass(w.error),s.remove()),u?(P.verbose("Resetting dropdown value",o,c),o.dropdown("restore defaults",!0)):l?(P.verbose("Resetting checkbox value",i,c),i.prop("checked",c)):d?a.calendar("set date",c):(P.verbose("Resetting field value",i,c),i.val(f?"":c)))})),P.remove.states()},determine:{isValid:function(){var t=!0;return p.each((function(n,i){var o=e(i),r=P.get.validation(o)||{},a=P.get.identifier(r,o);P.validate.field(r,a,!0)||(t=!1)})),t},isDirty:function(t){var n=!1;p.each((function(t,i){var o,r=e(i);o=r.filter(x.checkbox).length>0?P.is.checkboxDirty(r):P.is.fieldDirty(r),r.data(v.metadata.isDirty,o),n=n||o})),n?P.set.dirty():P.set.clean()}},is:{bracketedRule:function(e){return e.type&&e.type.match(v.regExp.bracket)},shorthandRules:function(e){return"string"==typeof e||Array.isArray(e)},empty:function(e){return!e||0===e.length||(e.is(x.checkbox)?!e.is(":checked"):P.is.blank(e))},blank:function(e){return""===String(e.val()).trim()},valid:function(t,n){var i=!0;return t?(P.verbose("Checking if field is valid",t),P.validate.field(b[t],t,!!n)):(P.verbose("Checking if form is valid"),e.each(b,(function(e,t){P.is.valid(e,n)||(i=!1)})),i)},dirty:function(){return j},clean:function(){return!j},fieldDirty:function(e){var t=e.data(y.defaultValue);null==t?t="":Array.isArray(t)&&(t=t.toString());var n=e.val();null==n?n="":Array.isArray(n)&&(n=n.toString());var i=/^(true|false)$/i;return i.test(t)&&i.test(n)?!new RegExp("^"+t+"$","i").test(n):n!==t},checkboxDirty:function(e){return e.data(y.defaultValue)!==e.is(":checked")},justDirty:function(){return"dirty"===I[0]},justClean:function(){return"clean"===I[0]}},removeEvents:function(){R.off(A),p.off(A),g.off(A),v.preventLeaving&&s.off(A),E&&(e(E).off(A),E=void 0)},event:{field:{keydown:function(t){var n=e(this),i=t.which,o=n.is(x.input),r=n.is(x.checkbox),a=n.closest(x.uiDropdown).length>0,s=13;i===27&&(P.verbose("Escape key pressed blurring field"),n[0].blur()),t.ctrlKey||i!==s||!o||a||r||(N||(n.one("keyup"+A,P.event.field.keyup),P.submit(t),P.debug("Enter pressed on input submitting form")),N=!0)},keyup:function(){N=!1},invalid:function(e){e.preventDefault()},blur:function(t){var n=e(this),i=P.get.validation(n)||{},o=P.get.identifier(i,n);("blur"===v.on||!R.hasClass(w.initial)&&v.revalidate)&&(P.debug("Revalidating field",n,i),P.validate.field(i,o),v.inline||P.validate.form(!1,!0))},change:function(t){var n=e(this),i=P.get.validation(n)||{},o=P.get.identifier(i,n);("change"===v.on||!R.hasClass(w.initial)&&v.revalidate)&&(clearTimeout(P.timer),P.timer=setTimeout((function(){P.debug("Revalidating field",n,i),P.validate.field(i,o),v.inline||P.validate.form(!1,!0)}),v.delay))}},beforeUnload:function(e){if(P.is.dirty()&&!$)return(e=e||t.event)&&(e.returnValue=v.text.leavingMessage),v.text.leavingMessage}},get:{ancillaryValue:function(e){return!(!e.type||!e.value&&!P.is.bracketedRule(e))&&(void 0!==e.value?e.value:e.type.match(v.regExp.bracket)[1]+"")},ruleName:function(e){return P.is.bracketedRule(e)?e.type.replace(e.type.match(v.regExp.bracket)[0],""):e.type},changeEvent:function(e,t){return["file","checkbox","radio","hidden"].indexOf(e)>=0||t.is("select")?"change":"input"},fieldsFromShorthand:function(t){var n={};return e.each(t,(function(t,i){Array.isArray(i)||"object"!=typeof i?("string"==typeof i&&(i=[i]),n[t]={rules:[]},e.each(i,(function(e,i){n[t].rules.push({type:i})}))):n[t]=i})),n},identifier:function(e,t){return e.identifier||t.attr("id")||t.attr("name")||t.data(y.validate)},prompt:function(e,t){var n,o=P.get.ruleName(e),r=P.get.ancillaryValue(e),a=P.get.field(t.identifier),s=a.val(),c=i(e.prompt)?e.prompt(s):e.prompt||v.prompt[o]||v.text.unspecifiedRule,l=-1!==c.search("{value}"),u=-1!==c.search("{name}");return r&&["integer","decimal","number","size"].indexOf(o)>=0&&r.indexOf("..")>=0&&(n=r.split("..",2),e.prompt||"size"===o||(c+=(""===n[0]?v.prompt.maxValue.replace(/{ruleValue}/g,"{max}"):""===n[1]?v.prompt.minValue.replace(/{ruleValue}/g,"{min}"):v.prompt.range).replace(/{name}/g," "+v.text.and)),c=(c=c.replace(/{min}/g,n[0])).replace(/{max}/g,n[1])),r&&["match","different"].indexOf(o)>=0&&(c=c.replace(/{ruleValue}/g,P.get.fieldLabel(r,!0))),l&&(c=c.replace(/{value}/g,a.val())),u&&(c=c.replace(/{name}/g,P.get.fieldLabel(a))),c=(c=c.replace(/{identifier}/g,t.identifier)).replace(/{ruleValue}/g,r),e.prompt||P.verbose("Using default validation prompt for type",c,o),c},settings:function(){e.isPlainObject(o)?(o.fields&&(o.fields=P.get.fieldsFromShorthand(o.fields)),v=e.extend(!0,{},e.fn.form.settings,o),b=e.extend(!0,{},e.fn.form.settings.defaults,v.fields),P.verbose("Extending settings",b,v)):(v=e.extend(!0,{},e.fn.form.settings),b=e.extend(!0,{},e.fn.form.settings.defaults),P.verbose("Using default form validation",b,v)),k=v.namespace,y=v.metadata,x=v.selector,w=v.className,C=v.regExp,S=v.error,T="module-"+k,A="."+k,((O=R.data(T))||P).refresh()},field:function(t,n){var i;return P.verbose("Finding field with identifier",t),t=P.escape.string(t),(i=p.filter("#"+t)).length>0||(i=p.filter('[name="'+t+'"]')).length>0||(i=p.filter('[name="'+t+'[]"]')).length>0||(i=p.filter("[data-"+y.validate+'="'+t+'"]')).length>0?i:(P.error(S.noField.replace("{identifier}",t)),n?e():e(""))},fields:function(t,n){var i=e();return e.each(t,(function(e,t){i=i.add(P.get.field(t,n))})),i},fieldLabel:function(e,t){var n="string"==typeof e?P.get.field(e):e,i=n.closest(x.group).find("label:not(:empty)").eq(0);return 1===i.length?i.text():n.prop("placeholder")||(t?e:v.text.unspecifiedField)},validation:function(t){var n,i;return!!b&&(e.each(b,(function(o,r){i=r.identifier||o,e.each(P.get.field(i),(function(e,o){if(o==t[0])return r.identifier=i,n=r,!1}))})),n||!1)},value:function(e,t){var n,i,o=[];return o.push(e),n=P.get.values.call(M,o,t),(i=Object.keys(n)).length>0?n[i[0]]:void 0},values:function(t,n){var i=Array.isArray(t)&&t.length>0?P.get.fields(t,n):p,o={};return i.each((function(t,n){var i=e(n),r=i.closest(x.uiCalendar),a=i.prop("name"),s=i.val(),c=i.is(x.checkbox),l=i.is(x.radio),u=-1!==a.indexOf("[]"),d=r.length>0&&P.can.useElement("calendar"),f=!!c&&i.is(":checked");if(a)if(u)a=a.replace("[]",""),o[a]||(o[a]=[]),c?f?o[a].push(s||!0):o[a].push(!1):o[a].push(s);else if(l)void 0!==o[a]&&!1!==o[a]||(o[a]=!!f&&(s||!0));else if(c)o[a]=!!f&&(s||!0);else if(d){var p=r.calendar("get date");if(null!==p)switch(v.dateHandling){case"date":o[a]=p;break;case"input":o[a]=r.calendar("get input date");break;case"formatter":var h=r.calendar("setting","type");switch(h){case"date":o[a]=v.formatter.date(p);break;case"datetime":o[a]=v.formatter.datetime(p);break;case"time":o[a]=v.formatter.time(p);break;case"month":o[a]=v.formatter.month(p);break;case"year":o[a]=v.formatter.year(p);break;default:P.debug("Wrong calendar mode",r,h),o[a]=""}}else o[a]=""}else o[a]=s})),o},dirtyFields:function(){return p.filter((function(t,n){return e(n).data(y.isDirty)}))}},has:{field:function(e){return P.verbose("Checking for existence of a field with identifier",e),P.get.field(e,!0).length>0}},can:{useElement:function(t){return void 0!==e.fn[t]||(P.error(S.noElement.replace("{element}",t)),!1)}},escape:{string:function(e){return(e=String(e)).replace(C.escape,"\\$&")}},checkErrors:function(e,t){return e&&0!==e.length?(t||(e="string"==typeof e?[e]:e),e):(t||P.error(v.error.noErrorMessage),!1)},add:{rule:function(e,t){P.add.field(e,t)},field:function(t,n){void 0!==b[t]&&void 0!==b[t].rules||(b[t]={rules:[]});var i={rules:[]};P.is.shorthandRules(n)?(n=Array.isArray(n)?n:[n],e.each(n,(function(e,t){i.rules.push({type:t})}))):i.rules=n.rules,e.each(i.rules,(function(n,i){0===e.grep(b[t].rules,(function(e){return e.type===i.type})).length&&b[t].rules.push(i)})),P.debug("Adding rules",i.rules,b),P.refreshEvents()},fields:function(t){b=e.extend(!0,{},b,P.get.fieldsFromShorthand(t)),P.refreshEvents()},prompt:function(t,n,i){if(!1!==(n=P.checkErrors(n))){var o=P.get.field(t).closest(h),r=o.children(x.prompt),a=r.length>0,s=v.transition&&P.can.useElement("transition");P.verbose("Adding field error state",t),i||o.addClass(w.error),v.inline?(a&&(s?r.transition("is animating")&&r.transition("stop all"):r.is(":animated")&&r.stop(!0,!0),a=(r=o.children(x.prompt)).length>0),a||(r=e("
").addClass(w.label),s||r.css("display","none"),r.appendTo(o)),r.html(v.templates.prompt(n)),a||(s?(P.verbose("Displaying error with css transition",v.transition),r.transition(v.transition+" in",v.duration)):(P.verbose("Displaying error with fallback javascript animation"),r.fadeIn(v.duration)))):P.verbose("Inline errors are disabled, no inline error added",t)}},errors:function(t){if(!1!==(t=P.checkErrors(t))){P.debug("Adding form error messages",t),P.set.error();var n,i=[];e.isPlainObject(t)?e.each(Object.keys(t),(function(o,r){!1!==P.checkErrors(t[r],!0)&&(v.inline?P.add.prompt(r,t[r]):!1!==(n=P.checkErrors(t[r]))&&e.each(n,(function(e,t){i.push(v.prompt.addErrors.replace(/{name}/g,P.get.fieldLabel(r)).replace(/{error}/g,t))})))})):i=t,i.length>0&&m.html(v.templates.error(i))}}},remove:{errors:function(){P.debug("Removing form error messages"),m.empty()},states:function(){R.removeClass(w.error).removeClass(w.success).addClass(w.initial),v.inline||P.remove.errors(),P.determine.isDirty()},rule:function(t,n){var i=Array.isArray(n)?n:[n];if(void 0!==b[t]&&Array.isArray(b[t].rules))return void 0===n?(P.debug("Removed all rules"),void(P.has.field(t)?b[t].rules=[]:delete b[t])):void e.each(b[t].rules,(function(e,n){n&&-1!==i.indexOf(n.type)&&(P.debug("Removed rule",n.type),b[t].rules.splice(e,1))}))},field:function(t){var n=Array.isArray(t)?t:[t];e.each(n,(function(e,t){P.remove.rule(t)})),P.refreshEvents()},rules:function(t,n){Array.isArray(t)?e.each(t,(function(e,t){P.remove.rule(t,n)})):P.remove.rule(t,n)},fields:function(e){P.remove.field(e)},prompt:function(e){var t=P.get.field(e).closest(h),n=t.children(x.prompt);t.removeClass(w.error),v.inline&&n.is(":visible")&&(P.verbose("Removing prompt for field",e),v.transition&&P.can.useElement("transition")?n.transition(v.transition+" out",v.duration,(function(){n.remove()})):n.fadeOut(v.duration,(function(){n.remove()})))}},set:{success:function(){R.removeClass(w.error).addClass(w.success)},defaults:function(){p.each((function(t,n){var i=e(n),o=i.parent(),r=i.filter(x.checkbox).length>0,a=(o.is(x.uiDropdown)||i.is(x.uiDropdown))&&P.can.useElement("dropdown"),s=i.closest(x.uiCalendar),c=s.length>0&&P.can.useElement("calendar"),l=r?i.is(":checked"):i.val();a?o.is(x.uiDropdown)?o.dropdown("save defaults"):i.dropdown("save defaults"):c&&s.calendar("refresh"),i.data(y.defaultValue,l),i.data(y.isDirty,!1)}))},error:function(){R.removeClass(w.success).addClass(w.error)},value:function(e,t){var n={};return n[e]=t,P.set.values.call(M,n)},values:function(t){e.isEmptyObject(t)||e.each(t,(function(t,n){var i,o=P.get.field(t),r=o.parent(),a=o.closest(x.uiCalendar),s=o.is(x.file),c=Array.isArray(n),l=r.is(x.uiCheckbox)&&P.can.useElement("checkbox"),u=r.is(x.uiDropdown)&&P.can.useElement("dropdown"),d=o.is(x.radio)&&l,f=a.length>0&&P.can.useElement("calendar");o.length>0&&(c&&l?(P.verbose("Selecting multiple",n,o),r.checkbox("uncheck"),e.each(n,(function(e,t){i=o.filter('[value="'+t+'"]'),r=i.parent(),i.length>0&&r.checkbox("check")}))):d?(P.verbose("Selecting radio value",n,o),o.filter('[value="'+n+'"]').parent(x.uiCheckbox).checkbox("check")):l?(P.verbose("Setting checkbox value",n,r),!0===n||1===n||"on"===n?r.checkbox("check"):r.checkbox("uncheck"),"string"==typeof n&&o.val(n)):u?(P.verbose("Setting dropdown value",n,r),r.dropdown("set selected",n)):f?a.calendar("set date",n):(P.verbose("Setting field value",n,o),o.val(s?"":n)))}))},dirty:function(){P.verbose("Setting state dirty"),j=!0,I[0]=I[1],I[1]="dirty",P.is.justClean()&&R.trigger("dirty")},clean:function(){P.verbose("Setting state clean"),j=!1,I[0]=I[1],I[1]="clean",P.is.justDirty()&&R.trigger("clean")},asClean:function(){P.set.defaults(),P.set.clean()},asDirty:function(){P.set.defaults(),P.set.dirty()},autoCheck:function(){P.debug("Enabling auto check on required fields"),b&&e.each(b,(function(e){P.has.field(e)||(P.verbose("Field not found, removing from validation",e),P.remove.field(e))})),p.each((function(t,n){var i=e(n),o=i.closest(h),r=i.filter(x.checkbox).length>0,a=i.prop("required")||o.hasClass(w.required)||o.parent().hasClass(w.required),s=i.is(":disabled")||o.hasClass(w.disabled)||o.parent().hasClass(w.disabled),c=P.get.validation(i),l=!!c&&0!==e.grep(c.rules,(function(e){return"empty"===e.type})),u=P.get.identifier(c,i);!a||s||l||void 0===u||(r?(P.verbose("Adding 'checked' rule on field",u),P.add.rule(u,"checked")):(P.verbose("Adding 'empty' rule on field",u),P.add.rule(u,"empty")))}))},optional:function(t,n){n=!1!==n,e.each(b,(function(e,i){t!==e&&t!==i.identifier||(i.optional=n)}))}},validate:{form:function(t,i){var o=P.get.values();if(N)return!1;if(R.removeClass(w.initial),L=[],P.determine.isValid()){if(P.debug("Form has no validation errors, submitting"),P.set.success(),v.inline||P.remove.errors(),!0!==i)return v.onSuccess.call(M,t,o)}else{if(P.debug("Form has errors"),$=!1,P.set.error(),v.inline||P.add.errors(L),t&&void 0!==R.data("moduleApi")&&t.stopImmediatePropagation(),v.errorFocus&&!0!==i){var r,a=!0;"string"==typeof v.errorFocus?(a=(r=e(n).find(v.errorFocus)).is("[tabindex]"))||r.attr("tabindex",-1):r=h.filter("."+w.error).first().find(x.field),r.trigger("focus"),a||r.removeAttr("tabindex")}if(!0!==i)return v.onFailure.call(M,L,o)}},field:function(t,n,i){if(i=void 0===i||i,"string"==typeof t&&(P.verbose("Validating field",t),n=t,t=b[t]),!t)return P.debug("Unable to find field validation. Skipping",n),!0;var o,r=t.identifier||n,a=P.get.field(r),s=!!t.depends&&P.get.field(t.depends),c=!0,l=[],u=0===a.filter(":not(:disabled)").length,d=a[0].validationMessage;return t.identifier||(P.debug("Using field name as identifier",r),t.identifier=r),d?(P.debug("Field is natively invalid",r),l.push(d),c=!1,i&&a.closest(h).addClass(w.error)):i&&a.closest(h).removeClass(w.error),u?P.debug("Field is disabled. Skipping",r):t.optional&&P.is.blank(a)?P.debug("Field is optional and blank. Skipping",r):t.depends&&P.is.empty(s)?P.debug("Field depends on another value that is not present or empty. Skipping",s):void 0!==t.rules&&(o=t.errorLimit||v.errorLimit,e.each(t.rules,(function(n,a){if(P.has.field(r)&&(!o||l.length0&&(P.debug("Field is invalid",r,a.type),l.push(P.get.prompt(a,t)),c=!1,i&&e(s).closest(h).addClass(w.error))}}))),c?(i&&(P.remove.prompt(r),v.onValid.call(a)),!0):(i&&(L=L.concat(l),P.add.prompt(r,l,!0),v.onInvalid.call(a,l)),!1)},rule:function(t,n,o){var r=P.get.field(t.identifier),a=P.get.ancillaryValue(n),s=P.get.ruleName(n),c=v.rules[s],l=[],u=r.is(x.checkbox),d=function(t){var i=u?e(t).filter(":checked").val():e(t).val();return i=void 0===i||""===i||null===i?"":v.shouldTrim&&!1!==n.shouldTrim||n.shouldTrim?String(i+"").trim():String(i+""),c.call(t,i,a,P)};if(i(c))return u?d(r)||(l=r):e.each(r,(function(e,t){d(t)||l.push(t)})),o?l:0===l.length;P.error(S.noRule,s)}},setting:function(t,n){if(e.isPlainObject(t))e.extend(!0,v,t);else{if(void 0===n)return v[t];v[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,P,t);else{if(void 0===n)return P[t];P[t]=n}},debug:function(){!v.silent&&v.debug&&(v.performance?P.performance.log(arguments):(P.debug=Function.prototype.bind.call(console.info,console,v.name+":"),P.debug.apply(console,arguments)))},verbose:function(){!v.silent&&v.verbose&&v.debug&&(v.performance?P.performance.log(arguments):(P.verbose=Function.prototype.bind.call(console.info,console,v.name+":"),P.verbose.apply(console,arguments)))},error:function(){v.silent||(P.error=Function.prototype.bind.call(console.error,console,v.name+":"),P.error.apply(console,arguments))},performance:{log:function(e){var t,n;v.performance&&(n=(t=Date.now())-(c||t),c=t,l.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:M,"Execution Time":n})),clearTimeout(P.performance.timer),P.performance.timer=setTimeout((function(){P.performance.display()}),500)},display:function(){var t=v.name+":",n=0;c=!1,clearTimeout(P.performance.timer),e.each(l,(function(e,t){n+=t["Execution Time"]})),t+=" "+n+"ms",a.length>1&&(t+=" ("+a.length+")"),l.length>0&&(console.groupCollapsed(t),console.table?console.table(l):e.each(l,(function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")})),console.groupEnd()),l=[]}},invoke:function(t,n,o){var a,s,c,l=O;return n=n||f,o=o||M,"string"==typeof t&&void 0!==l&&(t=t.split(/[ .]/),a=t.length-1,e.each(t,(function(n,i){var o=n!==a?i+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(l[o])&&n!==a)l=l[o];else{if(void 0!==l[o])return s=l[o],!1;if(!e.isPlainObject(l[i])||n===a)return void 0!==l[i]?(s=l[i],!1):(P.error(S.method,t),!1);l=l[i]}}))),i(s)?c=s.apply(o,n):void 0!==s&&(c=s),Array.isArray(r)?r.push(c):void 0!==r?r=[r,c]:void 0!==c&&(r=c),s}},P.initialize()})),void 0!==r?r:this},e.fn.form.settings={name:"Form",namespace:"form",debug:!1,verbose:!1,performance:!0,fields:!1,keyboardShortcuts:!0,on:"submit",inline:!1,delay:200,revalidate:!0,shouldTrim:!0,transition:"scale",duration:200,autoCheckRequired:!1,preventLeaving:!1,errorFocus:!0,dateHandling:"date",errorLimit:0,onValid:function(){},onInvalid:function(){},onSuccess:function(){return!0},onFailure:function(){return!1},onDirty:function(){},onClean:function(){},metadata:{defaultValue:"default",validate:"validate",isDirty:"isDirty"},regExp:{htmlID:/^[A-Za-z][\w.:-]*$/g,bracket:/\[(.*)]/i,decimal:/^\d+\.?\d*$/,email:/^[\w!#$%&'*+./=?^`{|}~-]+@[\da-z]([\da-z-]*[\da-z])?(\.[\da-z]([\da-z-]*[\da-z])?)*$/i,escape:/[$()*+,./:=?@[\\\]^{|}-]/g,flags:/^\/(.*)\/(.*)?/,integer:/^-?\d+$/,number:/^-?\d*(\.\d+)?$/,url:/(https?:\/\/(?:www\.|(?!www))[^\s.]+\.\S{2,}|www\.\S+\.\S{2,})/i},text:{and:"and",unspecifiedRule:"Please enter a valid value",unspecifiedField:"This field",leavingMessage:"There are unsaved changes on this page which will be discarded if you continue."},prompt:{range:"{name} must be in a range from {min} to {max}",maxValue:"{name} must have a maximum value of {ruleValue}",minValue:"{name} must have a minimum value of {ruleValue}",empty:"{name} must have a value",checked:"{name} must be checked",email:"{name} must be a valid e-mail",url:"{name} must be a valid url",regExp:"{name} is not formatted correctly",integer:"{name} must be an integer",decimal:"{name} must be a decimal number",number:"{name} must be set to a number",is:'{name} must be "{ruleValue}"',isExactly:'{name} must be exactly "{ruleValue}"',not:'{name} cannot be set to "{ruleValue}"',notExactly:'{name} cannot be set to exactly "{ruleValue}"',contains:'{name} must contain "{ruleValue}"',containsExactly:'{name} must contain exactly "{ruleValue}"',doesntContain:'{name} cannot contain "{ruleValue}"',doesntContainExactly:'{name} cannot contain exactly "{ruleValue}"',minLength:"{name} must be at least {ruleValue} characters",exactLength:"{name} must be exactly {ruleValue} characters",maxLength:"{name} cannot be longer than {ruleValue} characters",size:"{name} must have a length between {min} and {max} characters",match:"{name} must match {ruleValue} field",different:"{name} must have a different value than {ruleValue} field",creditCard:"{name} must be a valid credit card number",minCount:"{name} must have at least {ruleValue} choices",exactCount:"{name} must have exactly {ruleValue} choices",maxCount:"{name} must have {ruleValue} or less choices",addErrors:"{name}: {error}"},selector:{checkbox:'input[type="checkbox"], input[type="radio"]',clear:".clear",field:'input:not(.search):not([type="reset"]):not([type="button"]):not([type="submit"]), textarea, select',file:'input[type="file"]',group:".field",input:"input",message:".error.message",prompt:".prompt.label",radio:'input[type="radio"]',reset:'.reset:not([type="reset"])',submit:'.submit:not([type="submit"])',uiCheckbox:".ui.checkbox",uiDropdown:".ui.dropdown",uiCalendar:".ui.calendar"},className:{initial:"initial",error:"error",label:"ui basic red pointing prompt label",pressed:"down",success:"success",required:"required",disabled:"disabled"},error:{method:"The method you called is not defined.",noRule:"There is no rule matching the one you specified",noField:"Field identifier {identifier} not found",noElement:"This module requires ui {element}",noErrorMessage:"No error message provided"},templates:{error:function(t){var n='
    ';return e.each(t,(function(e,t){n+="
  • "+t+"
  • "})),n+="
"},prompt:function(t){if(1===t.length)return t[0];var n='
    ';return e.each(t,(function(e,t){n+="
  • "+t+"
  • "})),n+="
"}},formatter:{date:function(e){return Intl.DateTimeFormat("en-GB").format(e)},datetime:function(e){return Intl.DateTimeFormat("en-GB",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(e)},time:function(e){return Intl.DateTimeFormat("en-GB",{hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(e)},month:function(e){return Intl.DateTimeFormat("en-GB",{month:"2-digit",year:"numeric"}).format(e)},year:function(e){return Intl.DateTimeFormat("en-GB",{year:"numeric"}).format(e)}},rules:{empty:function(e){return!(void 0===e||""===e||Array.isArray(e)&&0===e.length)},checked:function(){return e(this).filter(":checked").length>0},email:function(t){return e.fn.form.settings.regExp.email.test(t)},url:function(t){return e.fn.form.settings.regExp.url.test(t)},regExp:function(t,n){if(n instanceof RegExp)return t.match(n);var i,o=n.match(e.fn.form.settings.regExp.flags);return o&&(n=o.length>=2?o[1]:n,i=o.length>=3?o[2]:""),t.match(new RegExp(n,i))},minValue:function(t,n){return e.fn.form.settings.rules.range(t,n+"..","number")},maxValue:function(t,n){return e.fn.form.settings.rules.range(t,".."+n,"number")},integer:function(t,n){return e.fn.form.settings.rules.range(t,n,"integer")},range:function(t,n,i,o){var r,a,s;return"string"==typeof i&&(i=e.fn.form.settings.regExp[i]),i instanceof RegExp||(i=e.fn.form.settings.regExp.integer),n&&-1===["",".."].indexOf(n)&&(-1===n.indexOf("..")?i.test(n)&&(a=r=n-0):(s=n.split("..",2),i.test(s[0])&&(r=s[0]-0),i.test(s[1])&&(a=s[1]-0))),o&&(t=t.length),i.test(t)&&(void 0===r||t>=r)&&(void 0===a||t<=a)},decimal:function(t,n){return e.fn.form.settings.rules.range(t,n,"decimal")},number:function(t,n){return e.fn.form.settings.rules.range(t,n,"number")},is:function(e,t){return t="string"==typeof t?t.toLowerCase():t,(e="string"==typeof e?e.toLowerCase():e)==t},isExactly:function(e,t){return e==t},not:function(e,t){return(e="string"==typeof e?e.toLowerCase():e)!=(t="string"==typeof t?t.toLowerCase():t)},notExactly:function(e,t){return e!=t},contains:function(t,n){return n=n.replace(e.fn.form.settings.regExp.escape,"\\$&"),-1!==t.search(new RegExp(n,"i"))},containsExactly:function(t,n){return n=n.replace(e.fn.form.settings.regExp.escape,"\\$&"),-1!==t.search(new RegExp(n))},doesntContain:function(t,n){return n=n.replace(e.fn.form.settings.regExp.escape,"\\$&"),-1===t.search(new RegExp(n,"i"))},doesntContainExactly:function(t,n){return n=n.replace(e.fn.form.settings.regExp.escape,"\\$&"),-1===t.search(new RegExp(n))},minLength:function(t,n){return e.fn.form.settings.rules.range(t,n+"..","integer",!0)},exactLength:function(t,n){return e.fn.form.settings.rules.range(t,n+".."+n,"integer",!0)},maxLength:function(t,n){return e.fn.form.settings.rules.range(t,".."+n,"integer",!0)},size:function(t,n){return e.fn.form.settings.rules.range(t,n,"integer",!0)},match:function(e,t,n){var i=n.get.value(t,!0);return void 0!==i&&e.toString()===i.toString()},different:function(e,t,n){var i=n.get.value(t,!0);return void 0!==i&&e.toString()!==i.toString()},creditCard:function(t,n){var i,o,r={visa:{pattern:/^4/,length:[16]},amex:{pattern:/^3[47]/,length:[15]},mastercard:{pattern:/^5[1-5]/,length:[16]},discover:{pattern:/^(6011|622(12[6-9]|1[3-9]\d|[2-8]\d{2}|9[01]\d|92[0-5]|64[4-9])|65)/,length:[16]},unionPay:{pattern:/^(62|88)/,length:[16,17,18,19]},jcb:{pattern:/^35(2[89]|[3-8]\d)/,length:[16]},maestro:{pattern:/^(5018|5020|5038|6304|6759|676[1-3])/,length:[12,13,14,15,16,17,18,19]},dinersClub:{pattern:/^(30[0-5]|^36)/,length:[14]},laser:{pattern:/^(6304|670[69]|6771)/,length:[16,17,18,19]},visaElectron:{pattern:/^(4026|417500|4508|4844|491(3|7))/,length:[16]}},a={},s=!1,c="string"==typeof n&&n.split(",");if("string"==typeof t&&0!==t.length){if(t=t.replace(/[\s-]/g,""),c&&(e.each(c,(function(n,i){(o=r[i])&&(a={length:-1!==e.inArray(t.length,o.length),pattern:-1!==t.search(o.pattern)}).length>0&&a.pattern&&(s=!0)})),!s))return!1;if((i={number:-1!==e.inArray(t.length,r.unionPay.length),pattern:-1!==t.search(r.unionPay.pattern)}).number&&i.pattern)return!0;for(var l=t.length,u=0,d=[[0,1,2,3,4,5,6,7,8,9],[0,2,4,6,8,1,3,5,7,9]],f=0;l--;)f+=d[u][parseInt(t.charAt(l),10)],u^=1;return f%10==0&&f>0}},minCount:function(e,t){return 0===(t=Number(t))||(1===t?""!==e:e.split(",").length>=t)},exactCount:function(e,t){return 0===(t=Number(t))?""===e:1===t?""!==e&&-1===e.search(","):e.split(",").length===t},maxCount:function(e,t){return 0!==(t=Number(t))&&(1===t?-1===e.search(","):e.split(",").length<=t)}}}}(n(9755),window,document)},7030:(e,t,n)=>{ +!function(e,t,n){"use strict";function i(e){return"function"==typeof e&&"number"!=typeof e.nodeType}t=void 0!==t&&t.Math===Math?t:globalThis,e.fn.form=function(o){var r,a=e(this),s=e(t),c=Date.now(),l=[],u=arguments[0],d="string"==typeof u,f=[].slice.call(arguments,1);return a.each((function(){var p,h,g,m,v,b,y,x,w,C,S,k,T,E,A,D,O,R,P=e(this),M=this,N=[],L=!1,j=!1,$=!1,_=["clean","clean"];R={initialize:function(){R.get.settings(),P.addClass(w.initial),d?(void 0===O&&R.instantiate(),R.invoke(u)):(void 0!==O&&(O.invoke("destroy"),R.refresh()),R.verbose("Initializing form validation",P,v),R.bindEvents(),R.set.defaults(),v.autoCheckRequired&&R.set.autoCheck(),R.instantiate())},instantiate:function(){R.verbose("Storing instance of module",R),O=R,P.data(T,R)},destroy:function(){R.verbose("Destroying previous module",O),R.removeEvents(),P.removeData(T)},refresh:function(){R.verbose("Refreshing selector cache"),p=P.find(x.field),h=P.find(x.group),g=P.find(x.message),P.find(x.prompt),m=P.find(x.submit),P.find(x.clear),P.find(x.reset)},refreshEvents:function(){R.removeEvents(),R.bindEvents()},submit:function(e){R.verbose("Submitting form",P),j=!0,P.trigger("submit"),e&&e.preventDefault()},attachEvents:function(t,n){n||(n="submit"),e(t).on("click"+E,(function(e){R[n](),e.preventDefault()})),A=t,D=n},bindEvents:function(){R.verbose("Attaching form events"),P.on("submit"+E,R.validate.form).on("blur"+E,x.field,R.event.field.blur).on("click"+E,x.submit,R.submit).on("click"+E,x.reset,R.reset).on("click"+E,x.clear,R.clear),p.on("invalid"+E,R.event.field.invalid),v.keyboardShortcuts&&P.on("keydown"+E,x.field,R.event.field.keydown),p.each((function(t,n){var i=e(n),o=i.prop("type"),r=R.get.changeEvent(o,i);i.on(r+E,R.event.field.change)})),v.preventLeaving&&s.on("beforeunload"+E,R.event.beforeUnload),p.on("change"+E+" click"+E+" keyup"+E+" keydown"+E+" blur"+E,(function(e){R.determine.isDirty()})),P.on("dirty"+E,(function(e){v.onDirty.call()})),P.on("clean"+E,(function(e){v.onClean.call()})),A&&R.attachEvents(A,D)},clear:function(){p.each((function(t,n){var i=e(n),o=i.parent(),r=i.closest(h),a=r.find(x.prompt),s=i.closest(x.uiCalendar),c=i.data(y.defaultValue)||"",l=i.is(x.checkbox),u=o.is(x.uiDropdown)&&R.can.useElement("dropdown"),d=s.length>0&&R.can.useElement("calendar");r.hasClass(w.error)&&(R.verbose("Resetting error on field",r),r.removeClass(w.error),a.remove()),u?(R.verbose("Resetting dropdown value",o,c),o.dropdown("clear",!0)):l?i.prop("checked",!1):d?s.calendar("clear"):(R.verbose("Resetting field value",i,c),i.val(""))})),R.remove.states()},reset:function(){p.each((function(t,n){var i=e(n),o=i.parent(),r=i.closest(h),a=i.closest(x.uiCalendar),s=r.find(x.prompt),c=i.data(y.defaultValue),l=i.is(x.checkbox),u=o.is(x.uiDropdown)&&R.can.useElement("dropdown"),d=a.length>0&&R.can.useElement("calendar"),f=i.is(x.file),p=r.hasClass(w.error);void 0!==c&&(p&&(R.verbose("Resetting error on field",r),r.removeClass(w.error),s.remove()),u?(R.verbose("Resetting dropdown value",o,c),o.dropdown("restore defaults",!0)):l?(R.verbose("Resetting checkbox value",i,c),i.prop("checked",c)):d?a.calendar("set date",c):(R.verbose("Resetting field value",i,c),i.val(f?"":c)))})),R.remove.states()},determine:{isValid:function(){var t=!0;return p.each((function(n,i){var o=e(i),r=R.get.validation(o)||{},a=R.get.identifier(r,o);R.validate.field(r,a,!0)||(t=!1)})),t},isDirty:function(t){var n=!1;p.each((function(t,i){var o,r=e(i);o=r.filter(x.checkbox).length>0?R.is.checkboxDirty(r):R.is.fieldDirty(r),r.data(v.metadata.isDirty,o),n=n||o})),n?R.set.dirty():R.set.clean()}},is:{bracketedRule:function(e){return e.type&&e.type.match(v.regExp.bracket)},shorthandRules:function(e){return"string"==typeof e||Array.isArray(e)},empty:function(e){return!e||0===e.length||(e.is(x.checkbox)?!e.is(":checked"):R.is.blank(e))},blank:function(e){return""===String(e.val()).trim()},valid:function(t,n){var i=!0;return t?(R.verbose("Checking if field is valid",t),R.validate.field(b[t],t,!!n)):(R.verbose("Checking if form is valid"),e.each(b,(function(e,t){R.is.valid(e,n)||(i=!1)})),i)},dirty:function(){return $},clean:function(){return!$},fieldDirty:function(e){var t=e.data(y.defaultValue);null==t?t="":Array.isArray(t)&&(t=t.toString());var n=e.val();null==n?n="":Array.isArray(n)&&(n=n.toString());var i=/^(true|false)$/i;return i.test(t)&&i.test(n)?!new RegExp("^"+t+"$","i").test(n):n!==t},checkboxDirty:function(e){return e.data(y.defaultValue)!==e.is(":checked")},justDirty:function(){return"dirty"===_[0]},justClean:function(){return"clean"===_[0]}},removeEvents:function(){P.off(E),p.off(E),m.off(E),v.preventLeaving&&s.off(E),A&&(e(A).off(E),A=void 0)},event:{field:{keydown:function(t){var n=e(this),i=t.which,o=n.is(x.input),r=n.is(x.checkbox),a=n.closest(x.uiDropdown).length>0,s=13;i===27&&(R.verbose("Escape key pressed blurring field"),n[0].blur()),t.ctrlKey||i!==s||!o||a||r||(L||(n.one("keyup"+E,R.event.field.keyup),R.submit(t),R.debug("Enter pressed on input submitting form")),L=!0)},keyup:function(){L=!1},invalid:function(e){e.preventDefault()},blur:function(t){var n=e(this),i=R.get.validation(n)||{},o=R.get.identifier(i,n);("blur"===v.on||!P.hasClass(w.initial)&&v.revalidate)&&(R.debug("Revalidating field",n,i),R.validate.field(i,o),v.inline||R.validate.form(!1,!0))},change:function(t){var n=e(this),i=R.get.validation(n)||{},o=R.get.identifier(i,n);("change"===v.on||!P.hasClass(w.initial)&&v.revalidate)&&(clearTimeout(R.timer),R.timer=setTimeout((function(){R.debug("Revalidating field",n,i),R.validate.field(i,o),v.inline||R.validate.form(!1,!0)}),v.delay))}},beforeUnload:function(e){if(R.is.dirty()&&!j)return(e=e||t.event)&&(e.returnValue=v.text.leavingMessage),v.text.leavingMessage}},get:{ancillaryValue:function(e){return!(!e.type||!e.value&&!R.is.bracketedRule(e))&&(void 0!==e.value?e.value:e.type.match(v.regExp.bracket)[1]+"")},ruleName:function(e){return R.is.bracketedRule(e)?e.type.replace(e.type.match(v.regExp.bracket)[0],""):e.type},changeEvent:function(e,t){return["file","checkbox","radio","hidden"].indexOf(e)>=0||t.is("select")?"change":"input"},fieldsFromShorthand:function(t){var n={};return e.each(t,(function(t,i){Array.isArray(i)||"object"!=typeof i?("string"==typeof i&&(i=[i]),n[t]={rules:[]},e.each(i,(function(e,i){n[t].rules.push({type:i})}))):n[t]=i})),n},identifier:function(e,t){return e.identifier||t.attr("id")||t.attr("name")||t.data(y.validate)},prompt:function(e,t){var n,o=R.get.ruleName(e),r=R.get.ancillaryValue(e),a=R.get.field(t.identifier),s=a.val(),c=i(e.prompt)?e.prompt(s):e.prompt||v.prompt[o]||v.text.unspecifiedRule,l=-1!==c.search("{value}"),u=-1!==c.search("{name}");return r&&["integer","decimal","number","size"].indexOf(o)>=0&&r.indexOf("..")>=0&&(n=r.split("..",2),e.prompt||"size"===o||(c+=(""===n[0]?v.prompt.maxValue.replace(/{ruleValue}/g,"{max}"):""===n[1]?v.prompt.minValue.replace(/{ruleValue}/g,"{min}"):v.prompt.range).replace(/{name}/g," "+v.text.and)),c=(c=c.replace(/{min}/g,n[0])).replace(/{max}/g,n[1])),r&&["match","different"].indexOf(o)>=0&&(c=c.replace(/{ruleValue}/g,R.get.fieldLabel(r,!0))),l&&(c=c.replace(/{value}/g,a.val())),u&&(c=c.replace(/{name}/g,R.get.fieldLabel(a))),c=(c=c.replace(/{identifier}/g,t.identifier)).replace(/{ruleValue}/g,r),e.prompt||R.verbose("Using default validation prompt for type",c,o),c},settings:function(){e.isPlainObject(o)?(o.fields&&(o.fields=R.get.fieldsFromShorthand(o.fields)),v=e.extend(!0,{},e.fn.form.settings,o),b=e.extend(!0,{},e.fn.form.settings.defaults,v.fields),R.verbose("Extending settings",b,v)):(v=e.extend(!0,{},e.fn.form.settings),b=e.extend(!0,{},e.fn.form.settings.defaults),R.verbose("Using default form validation",b,v)),k=v.namespace,y=v.metadata,x=v.selector,w=v.className,C=v.regExp,S=v.error,T="module-"+k,E="."+k,((O=P.data(T))||R).refresh()},field:function(t,n){var i;return R.verbose("Finding field with identifier",t),t=R.escape.string(t),(i=p.filter("#"+t)).length>0||(i=p.filter('[name="'+t+'"]')).length>0||(i=p.filter('[name="'+t+'[]"]')).length>0||(i=p.filter("[data-"+y.validate+'="'+t+'"]')).length>0?i:(R.error(S.noField.replace("{identifier}",t)),n?e():e(""))},fields:function(t,n){var i=e();return e.each(t,(function(e,t){i=i.add(R.get.field(t,n))})),i},fieldLabel:function(e,t){var n="string"==typeof e?R.get.field(e):e,i=n.closest(x.group).find("label:not(:empty)").eq(0);return 1===i.length?i.text():n.prop("placeholder")||(t?e:v.text.unspecifiedField)},validation:function(t){var n,i;return!!b&&(e.each(b,(function(o,r){i=r.identifier||o,e.each(R.get.field(i),(function(e,o){if(o==t[0])return r.identifier=i,n=r,!1}))})),n||!1)},value:function(e,t){var n,i,o=[];return o.push(e),n=R.get.values.call(M,o,t),(i=Object.keys(n)).length>0?n[i[0]]:void 0},values:function(t,n){var i=Array.isArray(t)&&t.length>0?R.get.fields(t,n):p,o={};return i.each((function(t,n){var i=e(n),r=i.closest(x.uiCalendar),a=i.prop("name"),s=i.val(),c=i.is(x.checkbox),l=i.is(x.radio),u=-1!==a.indexOf("[]"),d=r.length>0&&R.can.useElement("calendar"),f=!!c&&i.is(":checked");if(a)if(u)a=a.replace("[]",""),o[a]||(o[a]=[]),c?f?o[a].push(s||!0):o[a].push(!1):o[a].push(s);else if(l)void 0!==o[a]&&!1!==o[a]||(o[a]=!!f&&(s||!0));else if(c)o[a]=!!f&&(s||!0);else if(d){var p=r.calendar("get date");if(null!==p)switch(v.dateHandling){case"date":o[a]=p;break;case"input":o[a]=r.calendar("get input date");break;case"formatter":var h=r.calendar("setting","type");switch(h){case"date":o[a]=v.formatter.date(p);break;case"datetime":o[a]=v.formatter.datetime(p);break;case"time":o[a]=v.formatter.time(p);break;case"month":o[a]=v.formatter.month(p);break;case"year":o[a]=v.formatter.year(p);break;default:R.debug("Wrong calendar mode",r,h),o[a]=""}}else o[a]=""}else o[a]=s})),o},dirtyFields:function(){return p.filter((function(t,n){return e(n).data(y.isDirty)}))}},has:{field:function(e){return R.verbose("Checking for existence of a field with identifier",e),R.get.field(e,!0).length>0}},can:{useElement:function(t){return void 0!==e.fn[t]||(R.error(S.noElement.replace("{element}",t)),!1)}},escape:{string:function(e){return(e=String(e)).replace(C.escape,"\\$&")}},checkErrors:function(e,t){return e&&0!==e.length?(t||(e="string"==typeof e?[e]:e),e):(t||R.error(v.error.noErrorMessage),!1)},add:{rule:function(e,t){R.add.field(e,t)},field:function(t,n){void 0!==b[t]&&void 0!==b[t].rules||(b[t]={rules:[]});var i={rules:[]};R.is.shorthandRules(n)?(n=Array.isArray(n)?n:[n],e.each(n,(function(e,t){i.rules.push({type:t})}))):i.rules=n.rules,e.each(i.rules,(function(n,i){0===e.grep(b[t].rules,(function(e){return e.type===i.type})).length&&b[t].rules.push(i)})),R.debug("Adding rules",i.rules,b),R.refreshEvents()},fields:function(t){b=e.extend(!0,{},b,R.get.fieldsFromShorthand(t)),R.refreshEvents()},prompt:function(t,n,i){if(!1!==(n=R.checkErrors(n))){var o=R.get.field(t).closest(h),r=o.children(x.prompt),a=r.length>0,s=v.transition&&R.can.useElement("transition");R.verbose("Adding field error state",t),i||o.addClass(w.error),v.inline?(a&&(s?r.transition("is animating")&&r.transition("stop all"):r.is(":animated")&&r.stop(!0,!0),a=(r=o.children(x.prompt)).length>0),a||(r=e("
").addClass(w.label),s||r.css("display","none"),r.appendTo(o)),r.html(v.templates.prompt(n)),a||(s?(R.verbose("Displaying error with css transition",v.transition),r.transition(v.transition+" in",v.duration)):(R.verbose("Displaying error with fallback javascript animation"),r.fadeIn(v.duration)))):R.verbose("Inline errors are disabled, no inline error added",t)}},errors:function(t){if(!1!==(t=R.checkErrors(t))){R.debug("Adding form error messages",t),R.set.error();var n,i=[];e.isPlainObject(t)?e.each(Object.keys(t),(function(o,r){!1!==R.checkErrors(t[r],!0)&&(v.inline?R.add.prompt(r,t[r]):!1!==(n=R.checkErrors(t[r]))&&e.each(n,(function(e,t){i.push(v.prompt.addErrors.replace(/{name}/g,R.get.fieldLabel(r)).replace(/{error}/g,t))})))})):i=t,i.length>0&&g.html(v.templates.error(i))}}},remove:{errors:function(){R.debug("Removing form error messages"),g.empty()},states:function(){P.removeClass(w.error).removeClass(w.success).addClass(w.initial),v.inline||R.remove.errors(),R.determine.isDirty()},rule:function(t,n){var i=Array.isArray(n)?n:[n];if(void 0!==b[t]&&Array.isArray(b[t].rules))return void 0===n?(R.debug("Removed all rules"),void(R.has.field(t)?b[t].rules=[]:delete b[t])):void e.each(b[t].rules,(function(e,n){n&&-1!==i.indexOf(n.type)&&(R.debug("Removed rule",n.type),b[t].rules.splice(e,1))}))},field:function(t){var n=Array.isArray(t)?t:[t];e.each(n,(function(e,t){R.remove.rule(t)})),R.refreshEvents()},rules:function(t,n){Array.isArray(t)?e.each(t,(function(e,t){R.remove.rule(t,n)})):R.remove.rule(t,n)},fields:function(e){R.remove.field(e)},prompt:function(e){var t=R.get.field(e).closest(h),n=t.children(x.prompt);t.removeClass(w.error),v.inline&&n.is(":visible")&&(R.verbose("Removing prompt for field",e),v.transition&&R.can.useElement("transition")?n.transition(v.transition+" out",v.duration,(function(){n.remove()})):n.fadeOut(v.duration,(function(){n.remove()})))}},set:{success:function(){P.removeClass(w.error).addClass(w.success)},defaults:function(){p.each((function(t,n){var i=e(n),o=i.parent(),r=i.filter(x.checkbox).length>0,a=(o.is(x.uiDropdown)||i.is(x.uiDropdown))&&R.can.useElement("dropdown"),s=i.closest(x.uiCalendar),c=s.length>0&&R.can.useElement("calendar"),l=r?i.is(":checked"):i.val();a?o.is(x.uiDropdown)?o.dropdown("save defaults"):i.dropdown("save defaults"):c&&s.calendar("refresh"),i.data(y.defaultValue,l),i.data(y.isDirty,!1)}))},error:function(){P.removeClass(w.success).addClass(w.error)},value:function(e,t){var n={};return n[e]=t,R.set.values.call(M,n)},values:function(t){e.isEmptyObject(t)||e.each(t,(function(t,n){var i,o=R.get.field(t),r=o.parent(),a=o.closest(x.uiCalendar),s=o.is(x.file),c=Array.isArray(n),l=r.is(x.uiCheckbox)&&R.can.useElement("checkbox"),u=r.is(x.uiDropdown)&&R.can.useElement("dropdown"),d=o.is(x.radio)&&l,f=a.length>0&&R.can.useElement("calendar");o.length>0&&(c&&l?(R.verbose("Selecting multiple",n,o),r.checkbox("uncheck"),e.each(n,(function(e,t){i=o.filter('[value="'+t+'"]'),r=i.parent(),i.length>0&&r.checkbox("check")}))):d?(R.verbose("Selecting radio value",n,o),o.filter('[value="'+n+'"]').parent(x.uiCheckbox).checkbox("check")):l?(R.verbose("Setting checkbox value",n,r),!0===n||1===n||"on"===n?r.checkbox("check"):r.checkbox("uncheck"),"string"==typeof n&&o.val(n)):u?(R.verbose("Setting dropdown value",n,r),r.dropdown("set selected",n)):f?a.calendar("set date",n):(R.verbose("Setting field value",n,o),o.val(s?"":n)))}))},dirty:function(){R.verbose("Setting state dirty"),$=!0,_[0]=_[1],_[1]="dirty",R.is.justClean()&&P.trigger("dirty")},clean:function(){R.verbose("Setting state clean"),$=!1,_[0]=_[1],_[1]="clean",R.is.justDirty()&&P.trigger("clean")},asClean:function(){R.set.defaults(),R.set.clean()},asDirty:function(){R.set.defaults(),R.set.dirty()},autoCheck:function(){R.debug("Enabling auto check on required fields"),b&&e.each(b,(function(e){R.has.field(e)||(R.verbose("Field not found, removing from validation",e),R.remove.field(e))})),p.each((function(t,n){var i=e(n),o=i.closest(h),r=i.filter(x.checkbox).length>0,a=i.prop("required")||o.hasClass(w.required)||o.parent().hasClass(w.required),s=i.is(":disabled")||o.hasClass(w.disabled)||o.parent().hasClass(w.disabled),c=R.get.validation(i),l=!!c&&0!==e.grep(c.rules,(function(e){return"empty"===e.type})),u=R.get.identifier(c,i);!a||s||l||void 0===u||(r?(R.verbose("Adding 'checked' rule on field",u),R.add.rule(u,"checked")):(R.verbose("Adding 'empty' rule on field",u),R.add.rule(u,"empty")))}))},optional:function(t,n){n=!1!==n,e.each(b,(function(e,i){t!==e&&t!==i.identifier||(i.optional=n)}))}},validate:{form:function(t,i){var o=R.get.values();if(L)return!1;if(P.removeClass(w.initial),N=[],R.determine.isValid()){if(R.debug("Form has no validation errors, submitting"),R.set.success(),v.inline||R.remove.errors(),!0!==i)return v.onSuccess.call(M,t,o)}else{if(R.debug("Form has errors"),j=!1,R.set.error(),v.inline||R.add.errors(N),t&&void 0!==P.data("moduleApi")&&t.stopImmediatePropagation(),v.errorFocus&&!0!==i){var r,a=!0;"string"==typeof v.errorFocus?(a=(r=e(n).find(v.errorFocus)).is("[tabindex]"))||r.attr("tabindex",-1):r=h.filter("."+w.error).first().find(x.field),r.trigger("focus"),a||r.removeAttr("tabindex")}if(!0!==i)return v.onFailure.call(M,N,o)}},field:function(t,n,i){if(i=void 0===i||i,"string"==typeof t&&(R.verbose("Validating field",t),n=t,t=b[t]),!t)return R.debug("Unable to find field validation. Skipping",n),!0;var o,r=t.identifier||n,a=R.get.field(r),s=!!t.depends&&R.get.field(t.depends),c=!0,l=[],u=0===a.filter(":not(:disabled)").length,d=a[0].validationMessage;return t.identifier||(R.debug("Using field name as identifier",r),t.identifier=r),d?(R.debug("Field is natively invalid",r),l.push(d),c=!1,i&&a.closest(h).addClass(w.error)):i&&a.closest(h).removeClass(w.error),u?R.debug("Field is disabled. Skipping",r):t.optional&&R.is.blank(a)?R.debug("Field is optional and blank. Skipping",r):t.depends&&R.is.empty(s)?R.debug("Field depends on another value that is not present or empty. Skipping",s):void 0!==t.rules&&(o=t.errorLimit||v.errorLimit,e.each(t.rules,(function(n,a){if(R.has.field(r)&&(!o||l.length0&&(R.debug("Field is invalid",r,a.type),l.push(R.get.prompt(a,t)),c=!1,i&&e(s).closest(h).addClass(w.error))}}))),c?(i&&(R.remove.prompt(r),v.onValid.call(a)),!0):(i&&(N=N.concat(l),R.add.prompt(r,l,!0),v.onInvalid.call(a,l)),!1)},rule:function(t,n,o){var r=R.get.field(t.identifier),a=R.get.ancillaryValue(n),s=R.get.ruleName(n),c=v.rules[s],l=[],u=r.is(x.checkbox),d=function(t){var i=u?e(t).filter(":checked").val():e(t).val();return i=void 0===i||""===i||null===i?"":v.shouldTrim&&!1!==n.shouldTrim||n.shouldTrim?String(i+"").trim():String(i+""),c.call(t,i,a,R)};if(i(c))return u?d(r)||(l=r):e.each(r,(function(e,t){d(t)||l.push(t)})),o?l:0===l.length;R.error(S.noRule,s)}},setting:function(t,n){if(e.isPlainObject(t))e.extend(!0,v,t);else{if(void 0===n)return v[t];v[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,R,t);else{if(void 0===n)return R[t];R[t]=n}},debug:function(){!v.silent&&v.debug&&(v.performance?R.performance.log(arguments):(R.debug=Function.prototype.bind.call(console.info,console,v.name+":"),R.debug.apply(console,arguments)))},verbose:function(){!v.silent&&v.verbose&&v.debug&&(v.performance?R.performance.log(arguments):(R.verbose=Function.prototype.bind.call(console.info,console,v.name+":"),R.verbose.apply(console,arguments)))},error:function(){v.silent||(R.error=Function.prototype.bind.call(console.error,console,v.name+":"),R.error.apply(console,arguments))},performance:{log:function(e){var t,n;v.performance&&(n=(t=Date.now())-(c||t),c=t,l.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:M,"Execution Time":n})),clearTimeout(R.performance.timer),R.performance.timer=setTimeout((function(){R.performance.display()}),500)},display:function(){var t=v.name+":",n=0;c=!1,clearTimeout(R.performance.timer),e.each(l,(function(e,t){n+=t["Execution Time"]})),t+=" "+n+"ms",a.length>1&&(t+=" ("+a.length+")"),l.length>0&&(console.groupCollapsed(t),console.table?console.table(l):e.each(l,(function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")})),console.groupEnd()),l=[]}},invoke:function(t,n,o){var a,s,c,l=O;return n=n||f,o=o||M,"string"==typeof t&&void 0!==l&&(t=t.split(/[ .]/),a=t.length-1,e.each(t,(function(n,i){var o=n!==a?i+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(l[o])&&n!==a)l=l[o];else{if(void 0!==l[o])return s=l[o],!1;if(!e.isPlainObject(l[i])||n===a)return void 0!==l[i]?(s=l[i],!1):(R.error(S.method,t),!1);l=l[i]}}))),i(s)?c=s.apply(o,n):void 0!==s&&(c=s),Array.isArray(r)?r.push(c):void 0!==r?r=[r,c]:void 0!==c&&(r=c),s}},R.initialize()})),void 0!==r?r:this},e.fn.form.settings={name:"Form",namespace:"form",debug:!1,verbose:!1,performance:!0,fields:!1,keyboardShortcuts:!0,on:"submit",inline:!1,delay:200,revalidate:!0,shouldTrim:!0,transition:"scale",duration:200,autoCheckRequired:!1,preventLeaving:!1,errorFocus:!0,dateHandling:"date",errorLimit:0,onValid:function(){},onInvalid:function(){},onSuccess:function(){return!0},onFailure:function(){return!1},onDirty:function(){},onClean:function(){},metadata:{defaultValue:"default",validate:"validate",isDirty:"isDirty"},regExp:{htmlID:/^[A-Za-z][\w.:-]*$/g,bracket:/\[(.*)]/i,decimal:/^\d+\.?\d*$/,email:/^[\w!#$%&'*+./=?^`{|}~-]+@[\da-z]([\da-z-]*[\da-z])?(\.[\da-z]([\da-z-]*[\da-z])?)*$/i,escape:/[$()*+,./:=?@[\\\]^{|}-]/g,flags:/^\/(.*)\/(.*)?/,integer:/^-?\d+$/,number:/^-?\d*(\.\d+)?$/,url:/(https?:\/\/(?:www\.|(?!www))[^\s.]+\.\S{2,}|www\.\S+\.\S{2,})/i},text:{and:"and",unspecifiedRule:"Please enter a valid value",unspecifiedField:"This field",leavingMessage:"There are unsaved changes on this page which will be discarded if you continue."},prompt:{range:"{name} must be in a range from {min} to {max}",maxValue:"{name} must have a maximum value of {ruleValue}",minValue:"{name} must have a minimum value of {ruleValue}",empty:"{name} must have a value",checked:"{name} must be checked",email:"{name} must be a valid e-mail",url:"{name} must be a valid url",regExp:"{name} is not formatted correctly",integer:"{name} must be an integer",decimal:"{name} must be a decimal number",number:"{name} must be set to a number",is:'{name} must be "{ruleValue}"',isExactly:'{name} must be exactly "{ruleValue}"',not:'{name} cannot be set to "{ruleValue}"',notExactly:'{name} cannot be set to exactly "{ruleValue}"',contains:'{name} must contain "{ruleValue}"',containsExactly:'{name} must contain exactly "{ruleValue}"',doesntContain:'{name} cannot contain "{ruleValue}"',doesntContainExactly:'{name} cannot contain exactly "{ruleValue}"',minLength:"{name} must be at least {ruleValue} characters",exactLength:"{name} must be exactly {ruleValue} characters",maxLength:"{name} cannot be longer than {ruleValue} characters",size:"{name} must have a length between {min} and {max} characters",match:"{name} must match {ruleValue} field",different:"{name} must have a different value than {ruleValue} field",creditCard:"{name} must be a valid credit card number",minCount:"{name} must have at least {ruleValue} choices",exactCount:"{name} must have exactly {ruleValue} choices",maxCount:"{name} must have {ruleValue} or less choices",addErrors:"{name}: {error}"},selector:{checkbox:'input[type="checkbox"], input[type="radio"]',clear:".clear",field:'input:not(.search):not([type="reset"]):not([type="button"]):not([type="submit"]), textarea, select',file:'input[type="file"]',group:".field",input:"input",message:".error.message",prompt:".prompt.label",radio:'input[type="radio"]',reset:'.reset:not([type="reset"])',submit:'.submit:not([type="submit"])',uiCheckbox:".ui.checkbox",uiDropdown:".ui.dropdown",uiCalendar:".ui.calendar"},className:{initial:"initial",error:"error",label:"ui basic red pointing prompt label",pressed:"down",success:"success",required:"required",disabled:"disabled"},error:{method:"The method you called is not defined.",noRule:"There is no rule matching the one you specified",noField:"Field identifier {identifier} not found",noElement:"This module requires ui {element}",noErrorMessage:"No error message provided"},templates:{error:function(t){var n='
    ';return e.each(t,(function(e,t){n+="
  • "+t+"
  • "})),n+="
"},prompt:function(t){if(1===t.length)return t[0];var n='
    ';return e.each(t,(function(e,t){n+="
  • "+t+"
  • "})),n+="
"}},formatter:{date:function(e){return Intl.DateTimeFormat("en-GB").format(e)},datetime:function(e){return Intl.DateTimeFormat("en-GB",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(e)},time:function(e){return Intl.DateTimeFormat("en-GB",{hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(e)},month:function(e){return Intl.DateTimeFormat("en-GB",{month:"2-digit",year:"numeric"}).format(e)},year:function(e){return Intl.DateTimeFormat("en-GB",{year:"numeric"}).format(e)}},rules:{empty:function(e){return!(void 0===e||""===e||Array.isArray(e)&&0===e.length)},checked:function(){return e(this).filter(":checked").length>0},email:function(t){return e.fn.form.settings.regExp.email.test(t)},url:function(t){return e.fn.form.settings.regExp.url.test(t)},regExp:function(t,n){if(n instanceof RegExp)return t.match(n);var i,o=n.match(e.fn.form.settings.regExp.flags);return o&&(n=o.length>=2?o[1]:n,i=o.length>=3?o[2]:""),t.match(new RegExp(n,i))},minValue:function(t,n){return e.fn.form.settings.rules.range(t,n+"..","number")},maxValue:function(t,n){return e.fn.form.settings.rules.range(t,".."+n,"number")},integer:function(t,n){return e.fn.form.settings.rules.range(t,n,"integer")},range:function(t,n,i,o){var r,a,s;return"string"==typeof i&&(i=e.fn.form.settings.regExp[i]),i instanceof RegExp||(i=e.fn.form.settings.regExp.integer),n&&-1===["",".."].indexOf(n)&&(-1===n.indexOf("..")?i.test(n)&&(a=r=n-0):(s=n.split("..",2),i.test(s[0])&&(r=s[0]-0),i.test(s[1])&&(a=s[1]-0))),o&&(t=t.length),i.test(t)&&(void 0===r||t>=r)&&(void 0===a||t<=a)},decimal:function(t,n){return e.fn.form.settings.rules.range(t,n,"decimal")},number:function(t,n){return e.fn.form.settings.rules.range(t,n,"number")},is:function(e,t){return t="string"==typeof t?t.toLowerCase():t,(e="string"==typeof e?e.toLowerCase():e)==t},isExactly:function(e,t){return e==t},not:function(e,t){return(e="string"==typeof e?e.toLowerCase():e)!=(t="string"==typeof t?t.toLowerCase():t)},notExactly:function(e,t){return e!=t},contains:function(t,n){return n=n.replace(e.fn.form.settings.regExp.escape,"\\$&"),-1!==t.search(new RegExp(n,"i"))},containsExactly:function(t,n){return n=n.replace(e.fn.form.settings.regExp.escape,"\\$&"),-1!==t.search(new RegExp(n))},doesntContain:function(t,n){return n=n.replace(e.fn.form.settings.regExp.escape,"\\$&"),-1===t.search(new RegExp(n,"i"))},doesntContainExactly:function(t,n){return n=n.replace(e.fn.form.settings.regExp.escape,"\\$&"),-1===t.search(new RegExp(n))},minLength:function(t,n){return e.fn.form.settings.rules.range(t,n+"..","integer",!0)},exactLength:function(t,n){return e.fn.form.settings.rules.range(t,n+".."+n,"integer",!0)},maxLength:function(t,n){return e.fn.form.settings.rules.range(t,".."+n,"integer",!0)},size:function(t,n){return e.fn.form.settings.rules.range(t,n,"integer",!0)},match:function(e,t,n){var i=n.get.value(t,!0);return void 0!==i&&e.toString()===i.toString()},different:function(e,t,n){var i=n.get.value(t,!0);return void 0!==i&&e.toString()!==i.toString()},creditCard:function(t,n){var i,o,r={visa:{pattern:/^4/,length:[16]},amex:{pattern:/^3[47]/,length:[15]},mastercard:{pattern:/^5[1-5]/,length:[16]},discover:{pattern:/^(6011|622(12[6-9]|1[3-9]\d|[2-8]\d{2}|9[01]\d|92[0-5]|64[4-9])|65)/,length:[16]},unionPay:{pattern:/^(62|88)/,length:[16,17,18,19]},jcb:{pattern:/^35(2[89]|[3-8]\d)/,length:[16]},maestro:{pattern:/^(5018|5020|5038|6304|6759|676[1-3])/,length:[12,13,14,15,16,17,18,19]},dinersClub:{pattern:/^(30[0-5]|^36)/,length:[14]},laser:{pattern:/^(6304|670[69]|6771)/,length:[16,17,18,19]},visaElectron:{pattern:/^(4026|417500|4508|4844|491(3|7))/,length:[16]}},a={},s=!1,c="string"==typeof n&&n.split(",");if("string"==typeof t&&0!==t.length){if(t=t.replace(/[\s-]/g,""),c&&(e.each(c,(function(n,i){(o=r[i])&&(a={length:-1!==e.inArray(t.length,o.length),pattern:-1!==t.search(o.pattern)}).length>0&&a.pattern&&(s=!0)})),!s))return!1;if((i={number:-1!==e.inArray(t.length,r.unionPay.length),pattern:-1!==t.search(r.unionPay.pattern)}).number&&i.pattern)return!0;for(var l=t.length,u=0,d=[[0,1,2,3,4,5,6,7,8,9],[0,2,4,6,8,1,3,5,7,9]],f=0;l--;)f+=d[u][parseInt(t.charAt(l),10)],u^=1;return f%10==0&&f>0}},minCount:function(e,t){return 0===(t=Number(t))||(1===t?""!==e:e.split(",").length>=t)},exactCount:function(e,t){return 0===(t=Number(t))?""===e:1===t?""!==e&&-1===e.search(","):e.split(",").length===t},maxCount:function(e,t){return 0!==(t=Number(t))&&(1===t?-1===e.search(","):e.split(",").length<=t)}}}}(n(9755),window,document)},7030:(e,t,n)=>{ /*! * # Fomantic-UI - State * https://github.com/fomantic/Fomantic-UI/ @@ -35,7 +35,7 @@ var t;t=function(){return function(){var e={686:function(e,t,n){"use strict";n.d * https://opensource.org/licenses/MIT * */ -!function(e,t,n){"use strict";t=void 0!==t&&t.Math===Math?t:globalThis,e.fn.state=function(i){var o,r=e(this),a=Date.now(),s=[],c=arguments[0],l="string"==typeof c,u=[].slice.call(arguments,1),d=function(i,o){var r;return[t,n].indexOf(i)>=0?r=e(i):0===(r=e(o.document).find(i)).length&&(r=o.frameElement?d(i,o.parent):t),r};return r.each((function(){var n,f=e.isPlainObject(i)?e.extend(!0,{},e.fn.state.settings,i):e.extend({},e.fn.state.settings),p=f.error,h=f.metadata,m=f.className,g=f.namespace,v=f.states,b=f.text,y="."+g,x=g+"-module",w=e(this),C=f.context?d(f.context,t):w,S=this,k=w.data(x);n={initialize:function(){n.verbose("Initializing module"),f.automatic&&n.add.defaults(),C.on("mouseenter"+y,n.change.text).on("mouseleave"+y,n.reset.text).on("click"+y,n.toggle.state),n.instantiate()},instantiate:function(){n.verbose("Storing instance of module",n),k=n,w.data(x,n)},destroy:function(){n.verbose("Destroying previous module",k),C.off(y),w.removeData(h.storedText).removeData(x)},refresh:function(){n.verbose("Refreshing selector cache"),w=e(S)},add:{defaults:function(){var t=i&&e.isPlainObject(i.states)?i.states:{};e.each(f.defaults,(function(i,o){void 0!==n.is[i]&&n.is[i]()&&(n.verbose("Adding default states",i,S),e.extend(f.states,o,t))}))}},is:{active:function(){return w.hasClass(m.active)},loading:function(){return w.hasClass(m.loading)},inactive:function(){return!w.hasClass(m.active)},state:function(e){return void 0!==m[e]&&w.hasClass(m[e])},enabled:function(){return!w.is(f.filter.active)},disabled:function(){return w.is(f.filter.active)},textEnabled:function(){return!w.is(f.filter.text)},button:function(){return w.is(".button:not(a, .submit)")},input:function(){return w.is("input")},progress:function(){return w.is(".ui.progress")}},allow:function(e){n.debug("Now allowing state",e),v[e]=!0},disallow:function(e){n.debug("No longer allowing",e),v[e]=!1},allows:function(e){return v[e]||!1},enable:function(){w.removeClass(m.disabled)},disable:function(){w.addClass(m.disabled)},setState:function(e){n.allows(e)&&w.addClass(m[e])},removeState:function(e){n.allows(e)&&w.removeClass(m[e])},toggle:{state:function(){var t;if(n.allows("active")&&n.is.enabled()){if(n.refresh(),void 0!==e.fn.api)if(t=w.api("get request"),w.api("was cancelled"))n.debug("API Request cancelled by beforesend"),f.activateTest=function(){return!1},f.deactivateTest=function(){return!1};else if(t)return void n.listenTo(t);n.change.state()}}},listenTo:function(t){n.debug("API request detected, waiting for state signal",t),t&&(b.loading&&n.update.text(b.loading),e.when(t).then((function(){"resolved"===t.state()?(n.debug("API request succeeded"),f.activateTest=function(){return!0},f.deactivateTest=function(){return!0}):(n.debug("API request failed"),f.activateTest=function(){return!1},f.deactivateTest=function(){return!1}),n.change.state()})))},change:{state:function(){n.debug("Determining state change direction"),n.is.inactive()?n.activate():n.deactivate(),f.sync&&n.sync(),f.onChange.call(S)},text:function(){n.is.textEnabled()&&(n.is.disabled()?(n.verbose("Changing text to disabled text",b.hover),n.update.text(b.disabled)):n.is.active()?b.hover?(n.verbose("Changing text to hover text",b.hover),n.update.text(b.hover)):b.deactivate&&(n.verbose("Changing text to deactivating text",b.deactivate),n.update.text(b.deactivate)):b.hover?(n.verbose("Changing text to hover text",b.hover),n.update.text(b.hover)):b.activate&&(n.verbose("Changing text to activating text",b.activate),n.update.text(b.activate)))}},activate:function(){f.activateTest.call(S)&&(n.debug("Setting state to active"),w.addClass(m.active),n.update.text(b.active),f.onActivate.call(S))},deactivate:function(){f.deactivateTest.call(S)&&(n.debug("Setting state to inactive"),w.removeClass(m.active),n.update.text(b.inactive),f.onDeactivate.call(S))},sync:function(){n.verbose("Syncing other buttons to current state"),n.is.active()?r.not(w).state("activate"):r.not(w).state("deactivate")},get:{text:function(){return f.selector.text?w.find(f.selector.text).text():w.html()},textFor:function(e){return b[e]||!1}},flash:{text:function(e,t,i){var o=n.get.text();n.debug("Flashing text message",e,t),e=e||f.text.flash,t=t||f.flashDuration,i=i||function(){},n.update.text(e),setTimeout((function(){n.update.text(o),i.call(S)}),t)}},reset:{text:function(){var e=b.active||w.data(h.storedText),t=b.inactive||w.data(h.storedText);n.is.textEnabled()&&(n.is.active()&&e?(n.verbose("Resetting active text",e),n.update.text(e)):t&&(n.verbose("Resetting inactive text",e),n.update.text(t)))}},update:{text:function(e){var t=n.get.text();e&&e!==t?(n.debug("Updating text",e),f.selector.text?w.data(h.storedText,e).find(f.selector.text).text(e):w.data(h.storedText,e).html(e)):n.debug("Text is already set, ignoring update",e)}},setting:function(t,i){if(n.debug("Changing setting",t,i),e.isPlainObject(t))e.extend(!0,f,t);else{if(void 0===i)return f[t];e.isPlainObject(f[t])?e.extend(!0,f[t],i):f[t]=i}},internal:function(t,i){if(e.isPlainObject(t))e.extend(!0,n,t);else{if(void 0===i)return n[t];n[t]=i}},debug:function(){!f.silent&&f.debug&&(f.performance?n.performance.log(arguments):(n.debug=Function.prototype.bind.call(console.info,console,f.name+":"),n.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?n.performance.log(arguments):(n.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),n.verbose.apply(console,arguments)))},error:function(){f.silent||(n.error=Function.prototype.bind.call(console.error,console,f.name+":"),n.error.apply(console,arguments))},performance:{log:function(e){var t,i;f.performance&&(i=(t=Date.now())-(a||t),a=t,s.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:S,"Execution Time":i})),clearTimeout(n.performance.timer),n.performance.timer=setTimeout((function(){n.performance.display()}),500)},display:function(){var t=f.name+":",i=0;a=!1,clearTimeout(n.performance.timer),e.each(s,(function(e,t){i+=t["Execution Time"]})),t+=" "+i+"ms",s.length>0&&(console.groupCollapsed(t),console.table?console.table(s):e.each(s,(function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")})),console.groupEnd()),s=[]}},invoke:function(t,i,r){var a,s,c,l,d=k;return i=i||u,r=r||S,"string"==typeof t&&void 0!==d&&(t=t.split(/[ .]/),a=t.length-1,e.each(t,(function(i,o){var r=i!==a?o+t[i+1].charAt(0).toUpperCase()+t[i+1].slice(1):t;if(e.isPlainObject(d[r])&&i!==a)d=d[r];else{if(void 0!==d[r])return s=d[r],!1;if(!e.isPlainObject(d[o])||i===a)return void 0!==d[o]?(s=d[o],!1):(n.error(p.method,t),!1);d=d[o]}}))),"function"==typeof(l=s)&&"number"!=typeof l.nodeType?c=s.apply(r,i):void 0!==s&&(c=s),Array.isArray(o)?o.push(c):void 0!==o?o=[o,c]:void 0!==c&&(o=c),s}},l?(void 0===k&&n.initialize(),n.invoke(c)):(void 0!==k&&k.invoke("destroy"),n.initialize())})),void 0!==o?o:this},e.fn.state.settings={name:"State",debug:!1,verbose:!1,namespace:"state",performance:!0,onActivate:function(){},onDeactivate:function(){},onChange:function(){},activateTest:function(){return!0},deactivateTest:function(){return!0},automatic:!0,sync:!1,flashDuration:1e3,filter:{text:".loading, .disabled",active:".disabled"},context:!1,error:{method:"The method you called is not defined."},metadata:{promise:"promise",storedText:"stored-text"},className:{active:"active",disabled:"disabled",error:"error",loading:"loading",success:"success",warning:"warning"},selector:{text:!1},defaults:{input:{disabled:!0,loading:!0,active:!0},button:{disabled:!0,loading:!0,active:!0},progress:{active:!0,success:!0,warning:!0,error:!0}},states:{active:!0,disabled:!0,error:!0,loading:!0,success:!0,warning:!0},text:{disabled:!1,flash:!1,hover:!1,active:!1,inactive:!1,activate:!1,deactivate:!1}}}(n(9755),window,document)},7239:(e,t,n)=>{ +!function(e,t,n){"use strict";t=void 0!==t&&t.Math===Math?t:globalThis,e.fn.state=function(i){var o,r=e(this),a=Date.now(),s=[],c=arguments[0],l="string"==typeof c,u=[].slice.call(arguments,1),d=function(i,o){var r;return[t,n].indexOf(i)>=0?r=e(i):0===(r=e(o.document).find(i)).length&&(r=o.frameElement?d(i,o.parent):t),r};return r.each((function(){var n,f=e.isPlainObject(i)?e.extend(!0,{},e.fn.state.settings,i):e.extend({},e.fn.state.settings),p=f.error,h=f.metadata,g=f.className,m=f.namespace,v=f.states,b=f.text,y="."+m,x=m+"-module",w=e(this),C=f.context?d(f.context,t):w,S=this,k=w.data(x);n={initialize:function(){n.verbose("Initializing module"),f.automatic&&n.add.defaults(),C.on("mouseenter"+y,n.change.text).on("mouseleave"+y,n.reset.text).on("click"+y,n.toggle.state),n.instantiate()},instantiate:function(){n.verbose("Storing instance of module",n),k=n,w.data(x,n)},destroy:function(){n.verbose("Destroying previous module",k),C.off(y),w.removeData(h.storedText).removeData(x)},refresh:function(){n.verbose("Refreshing selector cache"),w=e(S)},add:{defaults:function(){var t=i&&e.isPlainObject(i.states)?i.states:{};e.each(f.defaults,(function(i,o){void 0!==n.is[i]&&n.is[i]()&&(n.verbose("Adding default states",i,S),e.extend(f.states,o,t))}))}},is:{active:function(){return w.hasClass(g.active)},loading:function(){return w.hasClass(g.loading)},inactive:function(){return!w.hasClass(g.active)},state:function(e){return void 0!==g[e]&&w.hasClass(g[e])},enabled:function(){return!w.is(f.filter.active)},disabled:function(){return w.is(f.filter.active)},textEnabled:function(){return!w.is(f.filter.text)},button:function(){return w.is(".button:not(a, .submit)")},input:function(){return w.is("input")},progress:function(){return w.is(".ui.progress")}},allow:function(e){n.debug("Now allowing state",e),v[e]=!0},disallow:function(e){n.debug("No longer allowing",e),v[e]=!1},allows:function(e){return v[e]||!1},enable:function(){w.removeClass(g.disabled)},disable:function(){w.addClass(g.disabled)},setState:function(e){n.allows(e)&&w.addClass(g[e])},removeState:function(e){n.allows(e)&&w.removeClass(g[e])},toggle:{state:function(){var t;if(n.allows("active")&&n.is.enabled()){if(n.refresh(),void 0!==e.fn.api)if(t=w.api("get request"),w.api("was cancelled"))n.debug("API Request cancelled by beforesend"),f.activateTest=function(){return!1},f.deactivateTest=function(){return!1};else if(t)return void n.listenTo(t);n.change.state()}}},listenTo:function(t){n.debug("API request detected, waiting for state signal",t),t&&(b.loading&&n.update.text(b.loading),e.when(t).then((function(){"resolved"===t.state()?(n.debug("API request succeeded"),f.activateTest=function(){return!0},f.deactivateTest=function(){return!0}):(n.debug("API request failed"),f.activateTest=function(){return!1},f.deactivateTest=function(){return!1}),n.change.state()})))},change:{state:function(){n.debug("Determining state change direction"),n.is.inactive()?n.activate():n.deactivate(),f.sync&&n.sync(),f.onChange.call(S)},text:function(){n.is.textEnabled()&&(n.is.disabled()?(n.verbose("Changing text to disabled text",b.hover),n.update.text(b.disabled)):n.is.active()?b.hover?(n.verbose("Changing text to hover text",b.hover),n.update.text(b.hover)):b.deactivate&&(n.verbose("Changing text to deactivating text",b.deactivate),n.update.text(b.deactivate)):b.hover?(n.verbose("Changing text to hover text",b.hover),n.update.text(b.hover)):b.activate&&(n.verbose("Changing text to activating text",b.activate),n.update.text(b.activate)))}},activate:function(){f.activateTest.call(S)&&(n.debug("Setting state to active"),w.addClass(g.active),n.update.text(b.active),f.onActivate.call(S))},deactivate:function(){f.deactivateTest.call(S)&&(n.debug("Setting state to inactive"),w.removeClass(g.active),n.update.text(b.inactive),f.onDeactivate.call(S))},sync:function(){n.verbose("Syncing other buttons to current state"),n.is.active()?r.not(w).state("activate"):r.not(w).state("deactivate")},get:{text:function(){return f.selector.text?w.find(f.selector.text).text():w.html()},textFor:function(e){return b[e]||!1}},flash:{text:function(e,t,i){var o=n.get.text();n.debug("Flashing text message",e,t),e=e||f.text.flash,t=t||f.flashDuration,i=i||function(){},n.update.text(e),setTimeout((function(){n.update.text(o),i.call(S)}),t)}},reset:{text:function(){var e=b.active||w.data(h.storedText),t=b.inactive||w.data(h.storedText);n.is.textEnabled()&&(n.is.active()&&e?(n.verbose("Resetting active text",e),n.update.text(e)):t&&(n.verbose("Resetting inactive text",e),n.update.text(t)))}},update:{text:function(e){var t=n.get.text();e&&e!==t?(n.debug("Updating text",e),f.selector.text?w.data(h.storedText,e).find(f.selector.text).text(e):w.data(h.storedText,e).html(e)):n.debug("Text is already set, ignoring update",e)}},setting:function(t,i){if(n.debug("Changing setting",t,i),e.isPlainObject(t))e.extend(!0,f,t);else{if(void 0===i)return f[t];e.isPlainObject(f[t])?e.extend(!0,f[t],i):f[t]=i}},internal:function(t,i){if(e.isPlainObject(t))e.extend(!0,n,t);else{if(void 0===i)return n[t];n[t]=i}},debug:function(){!f.silent&&f.debug&&(f.performance?n.performance.log(arguments):(n.debug=Function.prototype.bind.call(console.info,console,f.name+":"),n.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?n.performance.log(arguments):(n.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),n.verbose.apply(console,arguments)))},error:function(){f.silent||(n.error=Function.prototype.bind.call(console.error,console,f.name+":"),n.error.apply(console,arguments))},performance:{log:function(e){var t,i;f.performance&&(i=(t=Date.now())-(a||t),a=t,s.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:S,"Execution Time":i})),clearTimeout(n.performance.timer),n.performance.timer=setTimeout((function(){n.performance.display()}),500)},display:function(){var t=f.name+":",i=0;a=!1,clearTimeout(n.performance.timer),e.each(s,(function(e,t){i+=t["Execution Time"]})),t+=" "+i+"ms",s.length>0&&(console.groupCollapsed(t),console.table?console.table(s):e.each(s,(function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")})),console.groupEnd()),s=[]}},invoke:function(t,i,r){var a,s,c,l,d=k;return i=i||u,r=r||S,"string"==typeof t&&void 0!==d&&(t=t.split(/[ .]/),a=t.length-1,e.each(t,(function(i,o){var r=i!==a?o+t[i+1].charAt(0).toUpperCase()+t[i+1].slice(1):t;if(e.isPlainObject(d[r])&&i!==a)d=d[r];else{if(void 0!==d[r])return s=d[r],!1;if(!e.isPlainObject(d[o])||i===a)return void 0!==d[o]?(s=d[o],!1):(n.error(p.method,t),!1);d=d[o]}}))),"function"==typeof(l=s)&&"number"!=typeof l.nodeType?c=s.apply(r,i):void 0!==s&&(c=s),Array.isArray(o)?o.push(c):void 0!==o?o=[o,c]:void 0!==c&&(o=c),s}},l?(void 0===k&&n.initialize(),n.invoke(c)):(void 0!==k&&k.invoke("destroy"),n.initialize())})),void 0!==o?o:this},e.fn.state.settings={name:"State",debug:!1,verbose:!1,namespace:"state",performance:!0,onActivate:function(){},onDeactivate:function(){},onChange:function(){},activateTest:function(){return!0},deactivateTest:function(){return!0},automatic:!0,sync:!1,flashDuration:1e3,filter:{text:".loading, .disabled",active:".disabled"},context:!1,error:{method:"The method you called is not defined."},metadata:{promise:"promise",storedText:"stored-text"},className:{active:"active",disabled:"disabled",error:"error",loading:"loading",success:"success",warning:"warning"},selector:{text:!1},defaults:{input:{disabled:!0,loading:!0,active:!0},button:{disabled:!0,loading:!0,active:!0},progress:{active:!0,success:!0,warning:!0,error:!0}},states:{active:!0,disabled:!0,error:!0,loading:!0,success:!0,warning:!0},text:{disabled:!1,flash:!1,hover:!1,active:!1,inactive:!1,activate:!1,deactivate:!1}}}(n(9755),window,document)},7239:(e,t,n)=>{ /*! * # Fomantic-UI - Visibility * https://github.com/fomantic/Fomantic-UI/ @@ -45,7 +45,7 @@ var t;t=function(){return function(){var e={686:function(e,t,n){"use strict";n.d * https://opensource.org/licenses/MIT * */ -!function(e,t,n){"use strict";function i(e){return"function"==typeof e&&"number"!=typeof e.nodeType}t=void 0!==t&&t.Math===Math?t:globalThis,e.fn.visibility=function(o){var r,a=e(this),s=Date.now(),c=[],l=arguments[0],u="string"==typeof l,d=[].slice.call(arguments,1),f=function(i,o){var r;return[t,n].indexOf(i)>=0?r=e(i):0===(r=e(o.document).find(i)).length&&(r=o.frameElement?f(i,o.parent):t),r},p=a.length,h=0;return a.each((function(){var a,m,g,v,b=e.isPlainObject(o)?e.extend(!0,{},e.fn.visibility.settings,o):e.extend({},e.fn.visibility.settings),y=b.className,x=b.namespace,w=b.error,C=b.metadata,S="."+x,k="module-"+x,T=e(t),A=e(this),E=f(b.context,t),D=A.data(k),O=this,P=!1;v={initialize:function(){v.debug("Initializing",b),v.setup.cache(),v.should.trackChanges()&&("image"===b.type&&v.setup.image(),"fixed"===b.type&&v.setup.fixed(),b.observeChanges&&v.observeChanges(),v.bind.events()),v.save.position(),v.is.visible()||v.error(w.visible,A),b.initialCheck&&v.checkVisibility(),v.instantiate()},instantiate:function(){v.debug("Storing instance",v),A.data(k,v),D=v},destroy:function(){v.verbose("Destroying previous module"),g&&g.disconnect(),m&&m.disconnect(),T.off("load"+S,v.event.load).off("resize"+S,v.event.resize),E.off("scroll"+S,v.event.scroll).off("scrollchange"+S,v.event.scrollchange),"fixed"===b.type&&(v.resetFixed(),v.remove.placeholder()),A.off(S).removeData(k)},observeChanges:function(){"MutationObserver"in t&&(m=new MutationObserver(v.event.contextChanged),g=new MutationObserver(v.event.changed),m.observe(n,{childList:!0,subtree:!0}),g.observe(O,{childList:!0,subtree:!0}),v.debug("Setting up mutation observer",g))},bind:{events:function(){v.verbose("Binding visibility events to scroll and resize"),b.refreshOnLoad&&T.on("load"+S,v.event.load),T.on("resize"+S,v.event.resize),E.off("scroll"+S).on("scroll"+S,v.event.scroll).on("scrollchange"+S,v.event.scrollchange)}},event:{changed:function(e){v.verbose("DOM tree modified, updating visibility calculations"),v.timer=setTimeout((function(){v.verbose("DOM tree modified, updating sticky menu"),v.refresh()}),100)},contextChanged:function(t){[].forEach.call(t,(function(t){t.removedNodes&&[].forEach.call(t.removedNodes,(function(t){(t===O||e(t).find(O).length>0)&&(v.debug("Element removed from DOM, tearing down events"),v.destroy())}))}))},resize:function(){v.debug("Window resized"),b.refreshOnResize&&requestAnimationFrame(v.refresh)},load:function(){v.debug("Page finished loading"),requestAnimationFrame(v.refresh)},scroll:function(){b.throttle?(clearTimeout(v.timer),v.timer=setTimeout((function(){E.triggerHandler("scrollchange"+S,[E.scrollTop()])}),b.throttle)):requestAnimationFrame((function(){E.triggerHandler("scrollchange"+S,[E.scrollTop()])}))},scrollchange:function(e,t){v.checkVisibility(t)}},precache:function(e,t){Array.isArray(e)||(e=[e]);for(var o=e.length,r=0,a=[],s=n.createElement("img"),c=function(){++r>=e.length&&i(t)&&t()};o--;)(s=n.createElement("img")).addEventListener("load",c),s.addEventListener("error",c),s.src=e[o],a.push(s)},enableCallbacks:function(){v.debug("Allowing callbacks to occur"),P=!1},disableCallbacks:function(){v.debug("Disabling all callbacks temporarily"),P=!0},should:{trackChanges:function(){return u?(v.debug("One time query, no need to bind events"),!1):(v.debug("Callbacks being attached"),!0)}},setup:{cache:function(){v.cache={occurred:{},screen:{},element:{}}},image:function(){var e=A.data(C.src);e&&(v.verbose("Lazy loading image",e),b.once=!0,b.observeChanges=!1,b.onOnScreen=function(){v.debug("Image on screen",O),v.precache(e,(function(){v.set.image(e,(function(){++h===p&&b.onAllLoaded.call(this),b.onLoad.call(this)}))}))})},fixed:function(){v.debug("Setting up fixed"),b.once=!1,b.observeChanges=!1,b.initialCheck=!0,b.refreshOnLoad=!0,o.transition||(b.transition=!1),v.create.placeholder(),v.debug("Added placeholder",a),b.onTopPassed=function(){v.debug("Element passed, adding fixed position",A),v.show.placeholder(),v.set.fixed(),b.transition&&void 0!==e.fn.transition&&A.transition(b.transition,b.duration)},b.onTopPassedReverse=function(){v.debug("Element returned to position, removing fixed",A),v.hide.placeholder(),v.remove.fixed()}}},create:{placeholder:function(){v.verbose("Creating fixed position placeholder"),a=A.clone(!1).css("display","none").addClass(y.placeholder).insertAfter(A)}},show:{placeholder:function(){v.verbose("Showing placeholder"),a.css("display","block").css("visibility","hidden")}},hide:{placeholder:function(){v.verbose("Hiding placeholder"),a.css("display","none").css("visibility","")}},set:{fixed:function(){v.verbose("Setting element to fixed position"),A.addClass(y.fixed).css({position:"fixed",top:b.offset+"px",left:"auto",zIndex:b.zIndex}),b.onFixed.call(O)},image:function(t,n){if(A.attr("src",t),b.transition)if(void 0!==e.fn.transition){if(A.hasClass(y.visible))return void v.debug("Transition already occurred on this image, skipping animation");A.transition(b.transition,b.duration,n)}else A.fadeIn(b.duration,n);else A.show()}},is:{onScreen:function(){return v.get.elementCalculations().onScreen},offScreen:function(){return v.get.elementCalculations().offScreen},visible:function(){return!(!v.cache||!v.cache.element)&&!(0===v.cache.element.width&&0===v.cache.element.offset.top)},verticallyScrollableContext:function(){var e=E[0]!==t&&E.css("overflow-y");return"auto"===e||"scroll"===e},horizontallyScrollableContext:function(){var e=E[0]!==t&&E.css("overflow-x");return"auto"===e||"scroll"===e}},refresh:function(){v.debug("Refreshing constants (width/height)"),"fixed"===b.type&&v.resetFixed(),v.reset(),v.save.position(),b.checkOnRefresh&&v.checkVisibility(),b.onRefresh.call(O)},resetFixed:function(){v.remove.fixed(),v.remove.occurred()},reset:function(){v.verbose("Resetting all cached values"),e.isPlainObject(v.cache)&&(v.cache.screen={},v.cache.element={})},checkVisibility:function(e){v.verbose("Checking visibility of element",v.cache.element),!P&&v.is.visible()&&(v.save.scroll(e),v.save.calculations(),v.passed(),v.passingReverse(),v.topVisibleReverse(),v.bottomVisibleReverse(),v.topPassedReverse(),v.bottomPassedReverse(),v.onScreen(),v.offScreen(),v.passing(),v.topVisible(),v.bottomVisible(),v.topPassed(),v.bottomPassed(),b.onUpdate&&b.onUpdate.call(O,v.get.elementCalculations()))},passed:function(t,n){var i=v.get.elementCalculations();if(t&&n)b.onPassed[t]=n;else{if(void 0!==t)return v.get.pixelsPassed(t)>i.pixelsPassed;i.passing&&e.each(b.onPassed,(function(e,t){i.bottomVisible||i.pixelsPassed>v.get.pixelsPassed(e)?v.execute(t,e):b.once||v.remove.occurred(t)}))}},onScreen:function(e){var t=v.get.elementCalculations(),n=e||b.onOnScreen,i="onScreen";if(e&&(v.debug("Adding callback for onScreen",e),b.onOnScreen=e),t.onScreen?v.execute(n,i):b.once||v.remove.occurred(i),void 0!==e)return t.onOnScreen},offScreen:function(e){var t=v.get.elementCalculations(),n=e||b.onOffScreen,i="offScreen";if(e&&(v.debug("Adding callback for offScreen",e),b.onOffScreen=e),t.offScreen?v.execute(n,i):b.once||v.remove.occurred(i),void 0!==e)return t.onOffScreen},passing:function(e){var t=v.get.elementCalculations(),n=e||b.onPassing,i="passing";if(e&&(v.debug("Adding callback for passing",e),b.onPassing=e),t.passing?v.execute(n,i):b.once||v.remove.occurred(i),void 0!==e)return t.passing},topVisible:function(e){var t=v.get.elementCalculations(),n=e||b.onTopVisible,i="topVisible";if(e&&(v.debug("Adding callback for top visible",e),b.onTopVisible=e),t.topVisible?v.execute(n,i):b.once||v.remove.occurred(i),void 0===e)return t.topVisible},bottomVisible:function(e){var t=v.get.elementCalculations(),n=e||b.onBottomVisible,i="bottomVisible";if(e&&(v.debug("Adding callback for bottom visible",e),b.onBottomVisible=e),t.bottomVisible?v.execute(n,i):b.once||v.remove.occurred(i),void 0===e)return t.bottomVisible},topPassed:function(e){var t=v.get.elementCalculations(),n=e||b.onTopPassed,i="topPassed";if(e&&(v.debug("Adding callback for top passed",e),b.onTopPassed=e),t.topPassed?v.execute(n,i):b.once||v.remove.occurred(i),void 0===e)return t.topPassed},bottomPassed:function(e){var t=v.get.elementCalculations(),n=e||b.onBottomPassed,i="bottomPassed";if(e&&(v.debug("Adding callback for bottom passed",e),b.onBottomPassed=e),t.bottomPassed?v.execute(n,i):b.once||v.remove.occurred(i),void 0===e)return t.bottomPassed},passingReverse:function(e){var t=v.get.elementCalculations(),n=e||b.onPassingReverse,i="passingReverse";if(e&&(v.debug("Adding callback for passing reverse",e),b.onPassingReverse=e),t.passing?b.once||v.remove.occurred(i):v.get.occurred("passing")&&v.execute(n,i),void 0!==e)return!t.passing},topVisibleReverse:function(e){var t=v.get.elementCalculations(),n=e||b.onTopVisibleReverse,i="topVisibleReverse";if(e&&(v.debug("Adding callback for top visible reverse",e),b.onTopVisibleReverse=e),t.topVisible?b.once||v.remove.occurred(i):v.get.occurred("topVisible")&&v.execute(n,i),void 0===e)return!t.topVisible},bottomVisibleReverse:function(e){var t=v.get.elementCalculations(),n=e||b.onBottomVisibleReverse,i="bottomVisibleReverse";if(e&&(v.debug("Adding callback for bottom visible reverse",e),b.onBottomVisibleReverse=e),t.bottomVisible?b.once||v.remove.occurred(i):v.get.occurred("bottomVisible")&&v.execute(n,i),void 0===e)return!t.bottomVisible},topPassedReverse:function(e){var t=v.get.elementCalculations(),n=e||b.onTopPassedReverse,i="topPassedReverse";if(e&&(v.debug("Adding callback for top passed reverse",e),b.onTopPassedReverse=e),t.topPassed?b.once||v.remove.occurred(i):v.get.occurred("topPassed")&&v.execute(n,i),void 0===e)return!t.onTopPassed},bottomPassedReverse:function(e){var t=v.get.elementCalculations(),n=e||b.onBottomPassedReverse,i="bottomPassedReverse";if(e&&(v.debug("Adding callback for bottom passed reverse",e),b.onBottomPassedReverse=e),t.bottomPassed?b.once||v.remove.occurred(i):v.get.occurred("bottomPassed")&&v.execute(n,i),void 0===e)return!t.bottomPassed},execute:function(e,t){var n=v.get.elementCalculations(),i=v.get.screenCalculations();(e=e||!1)&&(b.continuous?(v.debug("Callback being called continuously",t,n),e.call(O,n,i)):v.get.occurred(t)||(v.debug("Conditions met",t,n),e.call(O,n,i))),v.save.occurred(t)},remove:{fixed:function(){v.debug("Removing fixed position"),A.removeClass(y.fixed).css({position:"",top:"",left:"",zIndex:""}),b.onUnfixed.call(O)},placeholder:function(){v.debug("Removing placeholder content"),a&&a.remove()},occurred:function(e){if(e){var t=v.cache.occurred;void 0!==t[e]&&!0===t[e]&&(v.debug("Callback can now be called again",e),v.cache.occurred[e]=!1)}else v.cache.occurred={}}},save:{calculations:function(){v.verbose("Saving all calculations necessary to determine positioning"),v.save.direction(),v.save.screenCalculations(),v.save.elementCalculations()},occurred:function(e){e&&(void 0!==v.cache.occurred[e]&&!0===v.cache.occurred[e]||(v.verbose("Saving callback occurred",e),v.cache.occurred[e]=!0))},scroll:function(e){e=e+b.offset||E.scrollTop()+b.offset,v.cache.scroll=e},direction:function(){var e,t=v.get.scroll(),n=v.get.lastScroll();return e=t>n&&n?"down":t=t.top,t.bottomPassed=e.top>=t.bottom,t.topVisible=e.bottom>=t.top&&!t.topPassed,t.bottomVisible=e.bottom>=t.bottom&&!t.bottomPassed,t.pixelsPassed=0,t.percentagePassed=0,t.onScreen=(t.topVisible||t.passing)&&!t.bottomPassed,t.passing=t.topPassed&&!t.bottomPassed,t.offScreen=!t.onScreen,t.passing&&(t.pixelsPassed=e.top-t.top,t.percentagePassed=(e.top-t.top)/t.height),v.cache.element=t,v.verbose("Updated element calculations",t),t},screenCalculations:function(){var e=v.get.scroll();return v.save.direction(),v.cache.screen.top=e,v.cache.screen.bottom=e+v.cache.screen.height,v.cache.screen},screenSize:function(){v.verbose("Saving window position"),v.cache.screen={height:E.height()}},position:function(){v.save.screenSize(),v.save.elementPosition()}},get:{pixelsPassed:function(e){var t=v.get.elementCalculations();return e.search("%")>-1?t.height*(parseInt(e,10)/100):parseInt(e,10)},occurred:function(e){return void 0!==v.cache.occurred&&v.cache.occurred[e]||!1},direction:function(){return void 0===v.cache.direction&&v.save.direction(),v.cache.direction},elementPosition:function(){return void 0===v.cache.element&&v.save.elementPosition(),v.cache.element},elementCalculations:function(){return void 0===v.cache.element&&v.save.elementCalculations(),v.cache.element},screenCalculations:function(){return void 0===v.cache.screen&&v.save.screenCalculations(),v.cache.screen},screenSize:function(){return void 0===v.cache.screen&&v.save.screenSize(),v.cache.screen},scroll:function(){return void 0===v.cache.scroll&&v.save.scroll(),v.cache.scroll},lastScroll:function(){return void 0===v.cache.screen?(v.debug("First scroll event, no last scroll could be found"),!1):v.cache.screen.top}},setting:function(t,n){if(e.isPlainObject(t))e.extend(!0,b,t);else{if(void 0===n)return b[t];b[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,v,t);else{if(void 0===n)return v[t];v[t]=n}},debug:function(){!b.silent&&b.debug&&(b.performance?v.performance.log(arguments):(v.debug=Function.prototype.bind.call(console.info,console,b.name+":"),v.debug.apply(console,arguments)))},verbose:function(){!b.silent&&b.verbose&&b.debug&&(b.performance?v.performance.log(arguments):(v.verbose=Function.prototype.bind.call(console.info,console,b.name+":"),v.verbose.apply(console,arguments)))},error:function(){b.silent||(v.error=Function.prototype.bind.call(console.error,console,b.name+":"),v.error.apply(console,arguments))},performance:{log:function(e){var t,n;b.performance&&(n=(t=Date.now())-(s||t),s=t,c.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:O,"Execution Time":n})),clearTimeout(v.performance.timer),v.performance.timer=setTimeout((function(){v.performance.display()}),500)},display:function(){var t=b.name+":",n=0;s=!1,clearTimeout(v.performance.timer),e.each(c,(function(e,t){n+=t["Execution Time"]})),t+=" "+n+"ms",c.length>0&&(console.groupCollapsed(t),console.table?console.table(c):e.each(c,(function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")})),console.groupEnd()),c=[]}},invoke:function(t,n,o){var a,s,c,l=D;return n=n||d,o=o||O,"string"==typeof t&&void 0!==l&&(t=t.split(/[ .]/),a=t.length-1,e.each(t,(function(n,i){var o=n!==a?i+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(l[o])&&n!==a)l=l[o];else{if(void 0!==l[o])return s=l[o],!1;if(!e.isPlainObject(l[i])||n===a)return void 0!==l[i]?(s=l[i],!1):(v.error(w.method,t),!1);l=l[i]}}))),i(s)?c=s.apply(o,n):void 0!==s&&(c=s),Array.isArray(r)?r.push(c):void 0!==r?r=[r,c]:void 0!==c&&(r=c),s}},u?(void 0===D&&v.initialize(),D.save.scroll(),D.save.calculations(),v.invoke(l)):(void 0!==D&&D.invoke("destroy"),v.initialize())})),void 0!==r?r:this},e.fn.visibility.settings={name:"Visibility",namespace:"visibility",debug:!1,verbose:!1,performance:!0,observeChanges:!0,initialCheck:!0,refreshOnLoad:!0,refreshOnResize:!0,checkOnRefresh:!0,once:!0,continuous:!1,offset:0,includeMargin:!1,context:t,throttle:!1,type:!1,zIndex:"10",transition:"fade in",duration:1e3,onPassed:{},onOnScreen:!1,onOffScreen:!1,onPassing:!1,onTopVisible:!1,onBottomVisible:!1,onTopPassed:!1,onBottomPassed:!1,onPassingReverse:!1,onTopVisibleReverse:!1,onBottomVisibleReverse:!1,onTopPassedReverse:!1,onBottomPassedReverse:!1,onLoad:function(){},onAllLoaded:function(){},onFixed:function(){},onUnfixed:function(){},onUpdate:!1,onRefresh:function(){},metadata:{src:"src"},className:{fixed:"fixed",placeholder:"constraint",visible:"visible"},error:{method:"The method you called is not defined.",visible:"Element is hidden, you must call refresh after element becomes visible"}}}(n(9755),window,document)},8182:(e,t,n)=>{ +!function(e,t,n){"use strict";function i(e){return"function"==typeof e&&"number"!=typeof e.nodeType}t=void 0!==t&&t.Math===Math?t:globalThis,e.fn.visibility=function(o){var r,a=e(this),s=Date.now(),c=[],l=arguments[0],u="string"==typeof l,d=[].slice.call(arguments,1),f=function(i,o){var r;return[t,n].indexOf(i)>=0?r=e(i):0===(r=e(o.document).find(i)).length&&(r=o.frameElement?f(i,o.parent):t),r},p=a.length,h=0;return a.each((function(){var a,g,m,v,b=e.isPlainObject(o)?e.extend(!0,{},e.fn.visibility.settings,o):e.extend({},e.fn.visibility.settings),y=b.className,x=b.namespace,w=b.error,C=b.metadata,S="."+x,k="module-"+x,T=e(t),E=e(this),A=f(b.context,t),D=E.data(k),O=this,R=!1;v={initialize:function(){v.debug("Initializing",b),v.setup.cache(),v.should.trackChanges()&&("image"===b.type&&v.setup.image(),"fixed"===b.type&&v.setup.fixed(),b.observeChanges&&v.observeChanges(),v.bind.events()),v.save.position(),v.is.visible()||v.error(w.visible,E),b.initialCheck&&v.checkVisibility(),v.instantiate()},instantiate:function(){v.debug("Storing instance",v),E.data(k,v),D=v},destroy:function(){v.verbose("Destroying previous module"),m&&m.disconnect(),g&&g.disconnect(),T.off("load"+S,v.event.load).off("resize"+S,v.event.resize),A.off("scroll"+S,v.event.scroll).off("scrollchange"+S,v.event.scrollchange),"fixed"===b.type&&(v.resetFixed(),v.remove.placeholder()),E.off(S).removeData(k)},observeChanges:function(){"MutationObserver"in t&&(g=new MutationObserver(v.event.contextChanged),m=new MutationObserver(v.event.changed),g.observe(n,{childList:!0,subtree:!0}),m.observe(O,{childList:!0,subtree:!0}),v.debug("Setting up mutation observer",m))},bind:{events:function(){v.verbose("Binding visibility events to scroll and resize"),b.refreshOnLoad&&T.on("load"+S,v.event.load),T.on("resize"+S,v.event.resize),A.off("scroll"+S).on("scroll"+S,v.event.scroll).on("scrollchange"+S,v.event.scrollchange)}},event:{changed:function(e){v.verbose("DOM tree modified, updating visibility calculations"),v.timer=setTimeout((function(){v.verbose("DOM tree modified, updating sticky menu"),v.refresh()}),100)},contextChanged:function(t){[].forEach.call(t,(function(t){t.removedNodes&&[].forEach.call(t.removedNodes,(function(t){(t===O||e(t).find(O).length>0)&&(v.debug("Element removed from DOM, tearing down events"),v.destroy())}))}))},resize:function(){v.debug("Window resized"),b.refreshOnResize&&requestAnimationFrame(v.refresh)},load:function(){v.debug("Page finished loading"),requestAnimationFrame(v.refresh)},scroll:function(){b.throttle?(clearTimeout(v.timer),v.timer=setTimeout((function(){A.triggerHandler("scrollchange"+S,[A.scrollTop()])}),b.throttle)):requestAnimationFrame((function(){A.triggerHandler("scrollchange"+S,[A.scrollTop()])}))},scrollchange:function(e,t){v.checkVisibility(t)}},precache:function(e,t){Array.isArray(e)||(e=[e]);for(var o=e.length,r=0,a=[],s=n.createElement("img"),c=function(){++r>=e.length&&i(t)&&t()};o--;)(s=n.createElement("img")).addEventListener("load",c),s.addEventListener("error",c),s.src=e[o],a.push(s)},enableCallbacks:function(){v.debug("Allowing callbacks to occur"),R=!1},disableCallbacks:function(){v.debug("Disabling all callbacks temporarily"),R=!0},should:{trackChanges:function(){return u?(v.debug("One time query, no need to bind events"),!1):(v.debug("Callbacks being attached"),!0)}},setup:{cache:function(){v.cache={occurred:{},screen:{},element:{}}},image:function(){var e=E.data(C.src);e&&(v.verbose("Lazy loading image",e),b.once=!0,b.observeChanges=!1,b.onOnScreen=function(){v.debug("Image on screen",O),v.precache(e,(function(){v.set.image(e,(function(){++h===p&&b.onAllLoaded.call(this),b.onLoad.call(this)}))}))})},fixed:function(){v.debug("Setting up fixed"),b.once=!1,b.observeChanges=!1,b.initialCheck=!0,b.refreshOnLoad=!0,o.transition||(b.transition=!1),v.create.placeholder(),v.debug("Added placeholder",a),b.onTopPassed=function(){v.debug("Element passed, adding fixed position",E),v.show.placeholder(),v.set.fixed(),b.transition&&void 0!==e.fn.transition&&E.transition(b.transition,b.duration)},b.onTopPassedReverse=function(){v.debug("Element returned to position, removing fixed",E),v.hide.placeholder(),v.remove.fixed()}}},create:{placeholder:function(){v.verbose("Creating fixed position placeholder"),a=E.clone(!1).css("display","none").addClass(y.placeholder).insertAfter(E)}},show:{placeholder:function(){v.verbose("Showing placeholder"),a.css("display","block").css("visibility","hidden")}},hide:{placeholder:function(){v.verbose("Hiding placeholder"),a.css("display","none").css("visibility","")}},set:{fixed:function(){v.verbose("Setting element to fixed position"),E.addClass(y.fixed).css({position:"fixed",top:b.offset+"px",left:"auto",zIndex:b.zIndex}),b.onFixed.call(O)},image:function(t,n){if(E.attr("src",t),b.transition)if(void 0!==e.fn.transition){if(E.hasClass(y.visible))return void v.debug("Transition already occurred on this image, skipping animation");E.transition(b.transition,b.duration,n)}else E.fadeIn(b.duration,n);else E.show()}},is:{onScreen:function(){return v.get.elementCalculations().onScreen},offScreen:function(){return v.get.elementCalculations().offScreen},visible:function(){return!(!v.cache||!v.cache.element)&&!(0===v.cache.element.width&&0===v.cache.element.offset.top)},verticallyScrollableContext:function(){var e=A[0]!==t&&A.css("overflow-y");return"auto"===e||"scroll"===e},horizontallyScrollableContext:function(){var e=A[0]!==t&&A.css("overflow-x");return"auto"===e||"scroll"===e}},refresh:function(){v.debug("Refreshing constants (width/height)"),"fixed"===b.type&&v.resetFixed(),v.reset(),v.save.position(),b.checkOnRefresh&&v.checkVisibility(),b.onRefresh.call(O)},resetFixed:function(){v.remove.fixed(),v.remove.occurred()},reset:function(){v.verbose("Resetting all cached values"),e.isPlainObject(v.cache)&&(v.cache.screen={},v.cache.element={})},checkVisibility:function(e){v.verbose("Checking visibility of element",v.cache.element),!R&&v.is.visible()&&(v.save.scroll(e),v.save.calculations(),v.passed(),v.passingReverse(),v.topVisibleReverse(),v.bottomVisibleReverse(),v.topPassedReverse(),v.bottomPassedReverse(),v.onScreen(),v.offScreen(),v.passing(),v.topVisible(),v.bottomVisible(),v.topPassed(),v.bottomPassed(),b.onUpdate&&b.onUpdate.call(O,v.get.elementCalculations()))},passed:function(t,n){var i=v.get.elementCalculations();if(t&&n)b.onPassed[t]=n;else{if(void 0!==t)return v.get.pixelsPassed(t)>i.pixelsPassed;i.passing&&e.each(b.onPassed,(function(e,t){i.bottomVisible||i.pixelsPassed>v.get.pixelsPassed(e)?v.execute(t,e):b.once||v.remove.occurred(t)}))}},onScreen:function(e){var t=v.get.elementCalculations(),n=e||b.onOnScreen,i="onScreen";if(e&&(v.debug("Adding callback for onScreen",e),b.onOnScreen=e),t.onScreen?v.execute(n,i):b.once||v.remove.occurred(i),void 0!==e)return t.onOnScreen},offScreen:function(e){var t=v.get.elementCalculations(),n=e||b.onOffScreen,i="offScreen";if(e&&(v.debug("Adding callback for offScreen",e),b.onOffScreen=e),t.offScreen?v.execute(n,i):b.once||v.remove.occurred(i),void 0!==e)return t.onOffScreen},passing:function(e){var t=v.get.elementCalculations(),n=e||b.onPassing,i="passing";if(e&&(v.debug("Adding callback for passing",e),b.onPassing=e),t.passing?v.execute(n,i):b.once||v.remove.occurred(i),void 0!==e)return t.passing},topVisible:function(e){var t=v.get.elementCalculations(),n=e||b.onTopVisible,i="topVisible";if(e&&(v.debug("Adding callback for top visible",e),b.onTopVisible=e),t.topVisible?v.execute(n,i):b.once||v.remove.occurred(i),void 0===e)return t.topVisible},bottomVisible:function(e){var t=v.get.elementCalculations(),n=e||b.onBottomVisible,i="bottomVisible";if(e&&(v.debug("Adding callback for bottom visible",e),b.onBottomVisible=e),t.bottomVisible?v.execute(n,i):b.once||v.remove.occurred(i),void 0===e)return t.bottomVisible},topPassed:function(e){var t=v.get.elementCalculations(),n=e||b.onTopPassed,i="topPassed";if(e&&(v.debug("Adding callback for top passed",e),b.onTopPassed=e),t.topPassed?v.execute(n,i):b.once||v.remove.occurred(i),void 0===e)return t.topPassed},bottomPassed:function(e){var t=v.get.elementCalculations(),n=e||b.onBottomPassed,i="bottomPassed";if(e&&(v.debug("Adding callback for bottom passed",e),b.onBottomPassed=e),t.bottomPassed?v.execute(n,i):b.once||v.remove.occurred(i),void 0===e)return t.bottomPassed},passingReverse:function(e){var t=v.get.elementCalculations(),n=e||b.onPassingReverse,i="passingReverse";if(e&&(v.debug("Adding callback for passing reverse",e),b.onPassingReverse=e),t.passing?b.once||v.remove.occurred(i):v.get.occurred("passing")&&v.execute(n,i),void 0!==e)return!t.passing},topVisibleReverse:function(e){var t=v.get.elementCalculations(),n=e||b.onTopVisibleReverse,i="topVisibleReverse";if(e&&(v.debug("Adding callback for top visible reverse",e),b.onTopVisibleReverse=e),t.topVisible?b.once||v.remove.occurred(i):v.get.occurred("topVisible")&&v.execute(n,i),void 0===e)return!t.topVisible},bottomVisibleReverse:function(e){var t=v.get.elementCalculations(),n=e||b.onBottomVisibleReverse,i="bottomVisibleReverse";if(e&&(v.debug("Adding callback for bottom visible reverse",e),b.onBottomVisibleReverse=e),t.bottomVisible?b.once||v.remove.occurred(i):v.get.occurred("bottomVisible")&&v.execute(n,i),void 0===e)return!t.bottomVisible},topPassedReverse:function(e){var t=v.get.elementCalculations(),n=e||b.onTopPassedReverse,i="topPassedReverse";if(e&&(v.debug("Adding callback for top passed reverse",e),b.onTopPassedReverse=e),t.topPassed?b.once||v.remove.occurred(i):v.get.occurred("topPassed")&&v.execute(n,i),void 0===e)return!t.onTopPassed},bottomPassedReverse:function(e){var t=v.get.elementCalculations(),n=e||b.onBottomPassedReverse,i="bottomPassedReverse";if(e&&(v.debug("Adding callback for bottom passed reverse",e),b.onBottomPassedReverse=e),t.bottomPassed?b.once||v.remove.occurred(i):v.get.occurred("bottomPassed")&&v.execute(n,i),void 0===e)return!t.bottomPassed},execute:function(e,t){var n=v.get.elementCalculations(),i=v.get.screenCalculations();(e=e||!1)&&(b.continuous?(v.debug("Callback being called continuously",t,n),e.call(O,n,i)):v.get.occurred(t)||(v.debug("Conditions met",t,n),e.call(O,n,i))),v.save.occurred(t)},remove:{fixed:function(){v.debug("Removing fixed position"),E.removeClass(y.fixed).css({position:"",top:"",left:"",zIndex:""}),b.onUnfixed.call(O)},placeholder:function(){v.debug("Removing placeholder content"),a&&a.remove()},occurred:function(e){if(e){var t=v.cache.occurred;void 0!==t[e]&&!0===t[e]&&(v.debug("Callback can now be called again",e),v.cache.occurred[e]=!1)}else v.cache.occurred={}}},save:{calculations:function(){v.verbose("Saving all calculations necessary to determine positioning"),v.save.direction(),v.save.screenCalculations(),v.save.elementCalculations()},occurred:function(e){e&&(void 0!==v.cache.occurred[e]&&!0===v.cache.occurred[e]||(v.verbose("Saving callback occurred",e),v.cache.occurred[e]=!0))},scroll:function(e){e=e+b.offset||A.scrollTop()+b.offset,v.cache.scroll=e},direction:function(){var e,t=v.get.scroll(),n=v.get.lastScroll();return e=t>n&&n?"down":t=t.top,t.bottomPassed=e.top>=t.bottom,t.topVisible=e.bottom>=t.top&&!t.topPassed,t.bottomVisible=e.bottom>=t.bottom&&!t.bottomPassed,t.pixelsPassed=0,t.percentagePassed=0,t.onScreen=(t.topVisible||t.passing)&&!t.bottomPassed,t.passing=t.topPassed&&!t.bottomPassed,t.offScreen=!t.onScreen,t.passing&&(t.pixelsPassed=e.top-t.top,t.percentagePassed=(e.top-t.top)/t.height),v.cache.element=t,v.verbose("Updated element calculations",t),t},screenCalculations:function(){var e=v.get.scroll();return v.save.direction(),v.cache.screen.top=e,v.cache.screen.bottom=e+v.cache.screen.height,v.cache.screen},screenSize:function(){v.verbose("Saving window position"),v.cache.screen={height:A.height()}},position:function(){v.save.screenSize(),v.save.elementPosition()}},get:{pixelsPassed:function(e){var t=v.get.elementCalculations();return e.search("%")>-1?t.height*(parseInt(e,10)/100):parseInt(e,10)},occurred:function(e){return void 0!==v.cache.occurred&&v.cache.occurred[e]||!1},direction:function(){return void 0===v.cache.direction&&v.save.direction(),v.cache.direction},elementPosition:function(){return void 0===v.cache.element&&v.save.elementPosition(),v.cache.element},elementCalculations:function(){return void 0===v.cache.element&&v.save.elementCalculations(),v.cache.element},screenCalculations:function(){return void 0===v.cache.screen&&v.save.screenCalculations(),v.cache.screen},screenSize:function(){return void 0===v.cache.screen&&v.save.screenSize(),v.cache.screen},scroll:function(){return void 0===v.cache.scroll&&v.save.scroll(),v.cache.scroll},lastScroll:function(){return void 0===v.cache.screen?(v.debug("First scroll event, no last scroll could be found"),!1):v.cache.screen.top}},setting:function(t,n){if(e.isPlainObject(t))e.extend(!0,b,t);else{if(void 0===n)return b[t];b[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,v,t);else{if(void 0===n)return v[t];v[t]=n}},debug:function(){!b.silent&&b.debug&&(b.performance?v.performance.log(arguments):(v.debug=Function.prototype.bind.call(console.info,console,b.name+":"),v.debug.apply(console,arguments)))},verbose:function(){!b.silent&&b.verbose&&b.debug&&(b.performance?v.performance.log(arguments):(v.verbose=Function.prototype.bind.call(console.info,console,b.name+":"),v.verbose.apply(console,arguments)))},error:function(){b.silent||(v.error=Function.prototype.bind.call(console.error,console,b.name+":"),v.error.apply(console,arguments))},performance:{log:function(e){var t,n;b.performance&&(n=(t=Date.now())-(s||t),s=t,c.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:O,"Execution Time":n})),clearTimeout(v.performance.timer),v.performance.timer=setTimeout((function(){v.performance.display()}),500)},display:function(){var t=b.name+":",n=0;s=!1,clearTimeout(v.performance.timer),e.each(c,(function(e,t){n+=t["Execution Time"]})),t+=" "+n+"ms",c.length>0&&(console.groupCollapsed(t),console.table?console.table(c):e.each(c,(function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")})),console.groupEnd()),c=[]}},invoke:function(t,n,o){var a,s,c,l=D;return n=n||d,o=o||O,"string"==typeof t&&void 0!==l&&(t=t.split(/[ .]/),a=t.length-1,e.each(t,(function(n,i){var o=n!==a?i+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(l[o])&&n!==a)l=l[o];else{if(void 0!==l[o])return s=l[o],!1;if(!e.isPlainObject(l[i])||n===a)return void 0!==l[i]?(s=l[i],!1):(v.error(w.method,t),!1);l=l[i]}}))),i(s)?c=s.apply(o,n):void 0!==s&&(c=s),Array.isArray(r)?r.push(c):void 0!==r?r=[r,c]:void 0!==c&&(r=c),s}},u?(void 0===D&&v.initialize(),D.save.scroll(),D.save.calculations(),v.invoke(l)):(void 0!==D&&D.invoke("destroy"),v.initialize())})),void 0!==r?r:this},e.fn.visibility.settings={name:"Visibility",namespace:"visibility",debug:!1,verbose:!1,performance:!0,observeChanges:!0,initialCheck:!0,refreshOnLoad:!0,refreshOnResize:!0,checkOnRefresh:!0,once:!0,continuous:!1,offset:0,includeMargin:!1,context:t,throttle:!1,type:!1,zIndex:"10",transition:"fade in",duration:1e3,onPassed:{},onOnScreen:!1,onOffScreen:!1,onPassing:!1,onTopVisible:!1,onBottomVisible:!1,onTopPassed:!1,onBottomPassed:!1,onPassingReverse:!1,onTopVisibleReverse:!1,onBottomVisibleReverse:!1,onTopPassedReverse:!1,onBottomPassedReverse:!1,onLoad:function(){},onAllLoaded:function(){},onFixed:function(){},onUnfixed:function(){},onUpdate:!1,onRefresh:function(){},metadata:{src:"src"},className:{fixed:"fixed",placeholder:"constraint",visible:"visible"},error:{method:"The method you called is not defined.",visible:"Element is hidden, you must call refresh after element becomes visible"}}}(n(9755),window,document)},8182:(e,t,n)=>{ /*! * # Fomantic-UI - Site * https://github.com/fomantic/Fomantic-UI/ @@ -55,7 +55,7 @@ var t;t=function(){return function(){var e={686:function(e,t,n){"use strict";n.d * https://opensource.org/licenses/MIT * */ -!function(e,t,n){"use strict";t=void 0!==t&&t.Math===Math?t:globalThis,e.fn.site=function(i){var o,r,a=Date.now(),s=[],c=arguments[0],l="string"==typeof c,u=[].slice.call(arguments,1),d=e.isPlainObject(i)?e.extend(!0,{},e.site.settings,i):e.extend({},e.site.settings),f=d.namespace,p=d.error,h="module-"+f,m=e(n),g=this,v=m.data(h);return o={initialize:function(){o.instantiate()},instantiate:function(){o.verbose("Storing instance of site",o),v=o,m.data(h,o)},normalize:function(){},fix:{consoleClear:function(){o.debug("Disabling programmatic console clearing"),t.console.clear=function(){}}},moduleExists:function(t){return void 0!==e.fn[t]&&void 0!==e.fn[t].settings},enabled:{modules:function(t){var n=[];return t=t||d.modules,e.each(t,(function(e,t){o.moduleExists(t)&&n.push(t)})),n}},disabled:{modules:function(t){var n=[];return t=t||d.modules,e.each(t,(function(e,t){o.moduleExists(t)||n.push(t)})),n}},change:{setting:function(t,n,i,r){i="string"==typeof i?"all"===i?d.modules:[i]:i||d.modules,r=void 0===r||r,e.each(i,(function(i,a){var s,c=!o.moduleExists(a)||(e.fn[a].settings.namespace||!1);o.moduleExists(a)&&(o.verbose("Changing default setting",t,n,a),e.fn[a].settings[t]=n,r&&c&&(s=e(":data(module-"+c+")")).length>0&&(o.verbose("Modifying existing settings",s),s[a]("setting",t,n)))}))},settings:function(t,n,i){n="string"==typeof n?[n]:n||d.modules,i=void 0===i||i,e.each(n,(function(n,r){var a;o.moduleExists(r)&&(o.verbose("Changing default setting",t,r),e.extend(!0,e.fn[r].settings,t),i&&f&&(a=e(":data(module-"+f+")")).length>0&&(o.verbose("Modifying existing settings",a),a[r]("setting",t)))}))}},enable:{console:function(){o.console(!0)},debug:function(e,t){e=e||d.modules,o.debug("Enabling debug for modules",e),o.change.setting("debug",!0,e,t)},verbose:function(e,t){e=e||d.modules,o.debug("Enabling verbose debug for modules",e),o.change.setting("verbose",!0,e,t)}},disable:{console:function(){o.console(!1)},debug:function(e,t){e=e||d.modules,o.debug("Disabling debug for modules",e),o.change.setting("debug",!1,e,t)},verbose:function(e,t){e=e||d.modules,o.debug("Disabling verbose debug for modules",e),o.change.setting("verbose",!1,e,t)}},console:function(e){if(e){if(void 0===v.cache.console)return void o.error(p.console);o.debug("Restoring console function"),t.console=v.cache.console}else o.debug("Disabling console function"),v.cache.console=t.console,t.console={clear:function(){},error:function(){},group:function(){},groupCollapsed:function(){},groupEnd:function(){},info:function(){},log:function(){},table:function(){},warn:function(){}}},destroy:function(){o.verbose("Destroying previous site for",m),m.removeData(h)},cache:{},setting:function(t,n){if(e.isPlainObject(t))e.extend(!0,d,t);else{if(void 0===n)return d[t];d[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,o,t);else{if(void 0===n)return o[t];o[t]=n}},debug:function(){d.debug&&(d.performance?o.performance.log(arguments):(o.debug=Function.prototype.bind.call(console.info,console,d.name+":"),o.debug.apply(console,arguments)))},verbose:function(){d.verbose&&d.debug&&(d.performance?o.performance.log(arguments):(o.verbose=Function.prototype.bind.call(console.info,console,d.name+":"),o.verbose.apply(console,arguments)))},error:function(){o.error=Function.prototype.bind.call(console.error,console,d.name+":"),o.error.apply(console,arguments)},performance:{log:function(e){var t,n;d.performance&&(n=(t=Date.now())-(a||t),a=t,s.push({Element:g,Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":n})),clearTimeout(o.performance.timer),o.performance.timer=setTimeout((function(){o.performance.display()}),500)},display:function(){var t=d.name+":",n=0;a=!1,clearTimeout(o.performance.timer),e.each(s,(function(e,t){n+=t["Execution Time"]})),t+=" "+n+"ms",s.length>0&&(console.groupCollapsed(t),console.table?console.table(s):e.each(s,(function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")})),console.groupEnd()),s=[]}},invoke:function(t,n,i){var a,s,c,l,d=v;return n=n||u,i=i||g,"string"==typeof t&&void 0!==d&&(t=t.split(/[ .]/),a=t.length-1,e.each(t,(function(n,i){var r=n!==a?i+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(d[r])&&n!==a)d=d[r];else{if(void 0!==d[r])return s=d[r],!1;if(!e.isPlainObject(d[i])||n===a)return void 0!==d[i]?(s=d[i],!1):(o.error(p.method,t),!1);d=d[i]}}))),"function"==typeof(l=s)&&"number"!=typeof l.nodeType?c=s.apply(i,n):void 0!==s&&(c=s),Array.isArray(r)?r.push(c):void 0!==r?r=[r,c]:void 0!==c&&(r=c),s}},l?(void 0===v&&o.initialize(),o.invoke(c)):(void 0!==v&&o.destroy(),o.initialize()),void 0!==r?r:this},e.site=e.fn.site,e.site.settings={name:"Site",namespace:"site",error:{console:"Console cannot be restored, most likely it was overwritten outside of module",method:"The method you called is not defined."},debug:!1,verbose:!1,performance:!0,modules:["accordion","api","calendar","checkbox","dimmer","dropdown","embed","flyout","form","modal","nag","popup","progress","rating","search","shape","sidebar","slider","state","sticky","tab","toast","transition","visibility"],siteNamespace:"site",namespaceStub:{cache:{},config:{},sections:{},section:{},utilities:{}}},e.extend(e.expr.pseudos,{data:e.expr.createPseudo((function(t){return function(n){return!!e.data(n,t)}}))})}(n(9755),window,document)},3441:(e,t,n)=>{ +!function(e,t,n){"use strict";t=void 0!==t&&t.Math===Math?t:globalThis,e.fn.site=function(i){var o,r,a=Date.now(),s=[],c=arguments[0],l="string"==typeof c,u=[].slice.call(arguments,1),d=e.isPlainObject(i)?e.extend(!0,{},e.site.settings,i):e.extend({},e.site.settings),f=d.namespace,p=d.error,h="module-"+f,g=e(n),m=this,v=g.data(h);return o={initialize:function(){o.instantiate()},instantiate:function(){o.verbose("Storing instance of site",o),v=o,g.data(h,o)},normalize:function(){},fix:{consoleClear:function(){o.debug("Disabling programmatic console clearing"),t.console.clear=function(){}}},moduleExists:function(t){return void 0!==e.fn[t]&&void 0!==e.fn[t].settings},enabled:{modules:function(t){var n=[];return t=t||d.modules,e.each(t,(function(e,t){o.moduleExists(t)&&n.push(t)})),n}},disabled:{modules:function(t){var n=[];return t=t||d.modules,e.each(t,(function(e,t){o.moduleExists(t)||n.push(t)})),n}},change:{setting:function(t,n,i,r){i="string"==typeof i?"all"===i?d.modules:[i]:i||d.modules,r=void 0===r||r,e.each(i,(function(i,a){var s,c=!o.moduleExists(a)||(e.fn[a].settings.namespace||!1);o.moduleExists(a)&&(o.verbose("Changing default setting",t,n,a),e.fn[a].settings[t]=n,r&&c&&(s=e(":data(module-"+c+")")).length>0&&(o.verbose("Modifying existing settings",s),s[a]("setting",t,n)))}))},settings:function(t,n,i){n="string"==typeof n?[n]:n||d.modules,i=void 0===i||i,e.each(n,(function(n,r){var a;o.moduleExists(r)&&(o.verbose("Changing default setting",t,r),e.extend(!0,e.fn[r].settings,t),i&&f&&(a=e(":data(module-"+f+")")).length>0&&(o.verbose("Modifying existing settings",a),a[r]("setting",t)))}))}},enable:{console:function(){o.console(!0)},debug:function(e,t){e=e||d.modules,o.debug("Enabling debug for modules",e),o.change.setting("debug",!0,e,t)},verbose:function(e,t){e=e||d.modules,o.debug("Enabling verbose debug for modules",e),o.change.setting("verbose",!0,e,t)}},disable:{console:function(){o.console(!1)},debug:function(e,t){e=e||d.modules,o.debug("Disabling debug for modules",e),o.change.setting("debug",!1,e,t)},verbose:function(e,t){e=e||d.modules,o.debug("Disabling verbose debug for modules",e),o.change.setting("verbose",!1,e,t)}},console:function(e){if(e){if(void 0===v.cache.console)return void o.error(p.console);o.debug("Restoring console function"),t.console=v.cache.console}else o.debug("Disabling console function"),v.cache.console=t.console,t.console={clear:function(){},error:function(){},group:function(){},groupCollapsed:function(){},groupEnd:function(){},info:function(){},log:function(){},table:function(){},warn:function(){}}},destroy:function(){o.verbose("Destroying previous site for",g),g.removeData(h)},cache:{},setting:function(t,n){if(e.isPlainObject(t))e.extend(!0,d,t);else{if(void 0===n)return d[t];d[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,o,t);else{if(void 0===n)return o[t];o[t]=n}},debug:function(){d.debug&&(d.performance?o.performance.log(arguments):(o.debug=Function.prototype.bind.call(console.info,console,d.name+":"),o.debug.apply(console,arguments)))},verbose:function(){d.verbose&&d.debug&&(d.performance?o.performance.log(arguments):(o.verbose=Function.prototype.bind.call(console.info,console,d.name+":"),o.verbose.apply(console,arguments)))},error:function(){o.error=Function.prototype.bind.call(console.error,console,d.name+":"),o.error.apply(console,arguments)},performance:{log:function(e){var t,n;d.performance&&(n=(t=Date.now())-(a||t),a=t,s.push({Element:m,Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":n})),clearTimeout(o.performance.timer),o.performance.timer=setTimeout((function(){o.performance.display()}),500)},display:function(){var t=d.name+":",n=0;a=!1,clearTimeout(o.performance.timer),e.each(s,(function(e,t){n+=t["Execution Time"]})),t+=" "+n+"ms",s.length>0&&(console.groupCollapsed(t),console.table?console.table(s):e.each(s,(function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")})),console.groupEnd()),s=[]}},invoke:function(t,n,i){var a,s,c,l,d=v;return n=n||u,i=i||m,"string"==typeof t&&void 0!==d&&(t=t.split(/[ .]/),a=t.length-1,e.each(t,(function(n,i){var r=n!==a?i+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(d[r])&&n!==a)d=d[r];else{if(void 0!==d[r])return s=d[r],!1;if(!e.isPlainObject(d[i])||n===a)return void 0!==d[i]?(s=d[i],!1):(o.error(p.method,t),!1);d=d[i]}}))),"function"==typeof(l=s)&&"number"!=typeof l.nodeType?c=s.apply(i,n):void 0!==s&&(c=s),Array.isArray(r)?r.push(c):void 0!==r?r=[r,c]:void 0!==c&&(r=c),s}},l?(void 0===v&&o.initialize(),o.invoke(c)):(void 0!==v&&o.destroy(),o.initialize()),void 0!==r?r:this},e.site=e.fn.site,e.site.settings={name:"Site",namespace:"site",error:{console:"Console cannot be restored, most likely it was overwritten outside of module",method:"The method you called is not defined."},debug:!1,verbose:!1,performance:!0,modules:["accordion","api","calendar","checkbox","dimmer","dropdown","embed","flyout","form","modal","nag","popup","progress","rating","search","shape","sidebar","slider","state","sticky","tab","toast","transition","visibility"],siteNamespace:"site",namespaceStub:{cache:{},config:{},sections:{},section:{},utilities:{}}},e.extend(e.expr.pseudos,{data:e.expr.createPseudo((function(t){return function(n){return!!e.data(n,t)}}))})}(n(9755),window,document)},3441:(e,t,n)=>{ /*! * # Fomantic-UI - Accordion * https://github.com/fomantic/Fomantic-UI/ @@ -65,7 +65,7 @@ var t;t=function(){return function(){var e={686:function(e,t,n){"use strict";n.d * https://opensource.org/licenses/MIT * */ -!function(e,t,n){"use strict";t=void 0!==t&&t.Math===Math?t:globalThis,e.fn.accordion=function(n){var i,o=e(this),r=Date.now(),a=[],s=arguments[0],c="string"==typeof s,l=[].slice.call(arguments,1);return o.each((function(){var o,u,d=e.isPlainObject(n)?e.extend(!0,{},e.fn.accordion.settings,n):e.extend({},e.fn.accordion.settings),f=d.className,p=d.namespace,h=d.selector,m=d.error,g="."+p,v="module-"+p,b=e(this),y=b.find(h.title),x=b.find(h.content),w=this,C=b.data(v);u={initialize:function(){u.debug("Initializing",b),u.bind.events(),d.observeChanges&&u.observeChanges(),u.instantiate()},instantiate:function(){C=u,b.data(v,u)},destroy:function(){u.debug("Destroying previous instance",b),b.off(g).removeData(v)},refresh:function(){y=b.find(h.title),x=b.find(h.content)},observeChanges:function(){"MutationObserver"in t&&((o=new MutationObserver((function(e){u.debug("DOM tree modified, updating selector cache"),u.refresh()}))).observe(w,{childList:!0,subtree:!0}),u.debug("Setting up mutation observer",o))},bind:{events:function(){u.debug("Binding delegated events"),b.on(d.on+g,h.trigger,u.event.click)}},event:{click:function(t){0===e(t.target).closest(h.ignore).length&&u.toggle.call(this)}},toggle:function(t){var n=void 0!==t?"number"==typeof t?y.eq(t):e(t).closest(h.title):e(this).closest(h.title),i=n.next(x),o=i.hasClass(f.animating),r=i.hasClass(f.active),a=r&&!o,s=!r&&o;u.debug("Toggling visibility of content",n),a||s?d.collapsible?u.close.call(n):u.debug("Cannot close accordion content collapsing is disabled"):u.open.call(n)},open:function(t){var n=void 0!==t?"number"==typeof t?y.eq(t):e(t).closest(h.title):e(this).closest(h.title),i=n.next(x),o=i.hasClass(f.animating);i.hasClass(f.active)||o?u.debug("Accordion already open, skipping",i):(u.debug("Opening accordion content",n),d.onOpening.call(i),d.onChanging.call(i),d.exclusive&&u.closeOthers.call(n),n.addClass(f.active),i.stop(!0,!0).addClass(f.animating),d.animateChildren&&(void 0!==e.fn.transition?i.children().transition({animation:"fade in",queue:!1,useFailSafe:!0,debug:d.debug,verbose:d.verbose,silent:d.silent,duration:d.duration,skipInlineHidden:!0,onComplete:function(){i.children().removeClass(f.transition)}}):i.children().stop(!0,!0).animate({opacity:1},d.duration,u.resetOpacity)),i.slideDown(d.duration,d.easing,(function(){i.removeClass(f.animating).addClass(f.active),u.reset.display.call(this),d.onOpen.call(this),d.onChange.call(this)})))},close:function(t){var n=void 0!==t?"number"==typeof t?y.eq(t):e(t).closest(h.title):e(this).closest(h.title),i=n.next(x),o=i.hasClass(f.animating),r=i.hasClass(f.active);!r&&!(!r&&o)||r&&o||(u.debug("Closing accordion content",i),d.onClosing.call(i),d.onChanging.call(i),n.removeClass(f.active),i.stop(!0,!0).addClass(f.animating),d.animateChildren&&(void 0!==e.fn.transition?i.children().transition({animation:"fade out",queue:!1,useFailSafe:!0,debug:d.debug,verbose:d.verbose,silent:d.silent,duration:d.duration,skipInlineHidden:!0}):i.children().stop(!0,!0).animate({opacity:0},d.duration,u.resetOpacity)),i.slideUp(d.duration,d.easing,(function(){i.removeClass(f.animating).removeClass(f.active),u.reset.display.call(this),d.onClose.call(this),d.onChange.call(this)})))},closeOthers:function(t){var n,i,o,r=void 0!==t?y.eq(t):e(this).closest(h.title),a=r.parents(h.content).prev(h.title),s=r.closest(h.accordion),c=h.title+"."+f.active+":visible",l=h.content+"."+f.active+":visible";d.closeNested?o=(n=s.find(c).not(a)).next(x):(n=s.find(c).not(a),i=s.find(l).find(c).not(a),o=(n=n.not(i)).next(x)),n.length>0&&(u.debug("Exclusive enabled, closing other content",n),n.removeClass(f.active),o.removeClass(f.animating).stop(!0,!0),d.animateChildren&&(void 0!==e.fn.transition?o.children().transition({animation:"fade out",useFailSafe:!0,debug:d.debug,verbose:d.verbose,silent:d.silent,duration:d.duration,skipInlineHidden:!0}):o.children().stop(!0,!0).animate({opacity:0},d.duration,u.resetOpacity)),o.slideUp(d.duration,d.easing,(function(){e(this).removeClass(f.active),u.reset.display.call(this)})))},reset:{display:function(){u.verbose("Removing inline display from element",this);var t=e(this);t.css("display",""),""===t.attr("style")&&t.attr("style","").removeAttr("style")},opacity:function(){u.verbose("Removing inline opacity from element",this);var t=e(this);t.css("opacity",""),""===t.attr("style")&&t.attr("style","").removeAttr("style")}},setting:function(t,n){if(u.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,d,t);else{if(void 0===n)return d[t];e.isPlainObject(d[t])?e.extend(!0,d[t],n):d[t]=n}},internal:function(t,n){if(u.debug("Changing internal",t,n),void 0===n)return u[t];e.isPlainObject(t)?e.extend(!0,u,t):u[t]=n},debug:function(){!d.silent&&d.debug&&(d.performance?u.performance.log(arguments):(u.debug=Function.prototype.bind.call(console.info,console,d.name+":"),u.debug.apply(console,arguments)))},verbose:function(){!d.silent&&d.verbose&&d.debug&&(d.performance?u.performance.log(arguments):(u.verbose=Function.prototype.bind.call(console.info,console,d.name+":"),u.verbose.apply(console,arguments)))},error:function(){d.silent||(u.error=Function.prototype.bind.call(console.error,console,d.name+":"),u.error.apply(console,arguments))},performance:{log:function(e){var t,n;d.performance&&(n=(t=Date.now())-(r||t),r=t,a.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:w,"Execution Time":n})),clearTimeout(u.performance.timer),u.performance.timer=setTimeout((function(){u.performance.display()}),500)},display:function(){var t=d.name+":",n=0;r=!1,clearTimeout(u.performance.timer),e.each(a,(function(e,t){n+=t["Execution Time"]})),t+=" "+n+"ms",a.length>0&&(console.groupCollapsed(t),console.table?console.table(a):e.each(a,(function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")})),console.groupEnd()),a=[]}},invoke:function(t,n,o){var r,a,s,c,d=C;return n=n||l,o=o||w,"string"==typeof t&&void 0!==d&&(t=t.split(/[ .]/),r=t.length-1,e.each(t,(function(n,i){var o=n!==r?i+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(d[o])&&n!==r)d=d[o];else{if(void 0!==d[o])return a=d[o],!1;if(!e.isPlainObject(d[i])||n===r)return void 0!==d[i]?(a=d[i],!1):(u.error(m.method,t),!1);d=d[i]}}))),"function"==typeof(c=a)&&"number"!=typeof c.nodeType?s=a.apply(o,n):void 0!==a&&(s=a),Array.isArray(i)?i.push(s):void 0!==i?i=[i,s]:void 0!==s&&(i=s),a}},c?(void 0===C&&u.initialize(),u.invoke(s)):(void 0!==C&&C.invoke("destroy"),u.initialize())})),void 0!==i?i:this},e.fn.accordion.settings={name:"Accordion",namespace:"accordion",silent:!1,debug:!1,verbose:!1,performance:!0,on:"click",observeChanges:!0,exclusive:!0,collapsible:!0,closeNested:!1,animateChildren:!0,duration:350,easing:"easeOutQuad",onOpening:function(){},onClosing:function(){},onChanging:function(){},onOpen:function(){},onClose:function(){},onChange:function(){},error:{method:"The method you called is not defined"},className:{active:"active",animating:"animating",transition:"transition"},selector:{accordion:".accordion",title:".title",trigger:".title",ignore:".ui.dropdown",content:".content"}},e.extend(e.easing,{easeOutQuad:function(e){return 1-(1-e)*(1-e)}})}(n(9755),window,document)},4115:(e,t,n)=>{ +!function(e,t,n){"use strict";t=void 0!==t&&t.Math===Math?t:globalThis,e.fn.accordion=function(n){var i,o=e(this),r=Date.now(),a=[],s=arguments[0],c="string"==typeof s,l=[].slice.call(arguments,1);return o.each((function(){var o,u,d=e.isPlainObject(n)?e.extend(!0,{},e.fn.accordion.settings,n):e.extend({},e.fn.accordion.settings),f=d.className,p=d.namespace,h=d.selector,g=d.error,m="."+p,v="module-"+p,b=e(this),y=b.find(h.title),x=b.find(h.content),w=this,C=b.data(v);u={initialize:function(){u.debug("Initializing",b),u.bind.events(),d.observeChanges&&u.observeChanges(),u.instantiate()},instantiate:function(){C=u,b.data(v,u)},destroy:function(){u.debug("Destroying previous instance",b),b.off(m).removeData(v)},refresh:function(){y=b.find(h.title),x=b.find(h.content)},observeChanges:function(){"MutationObserver"in t&&((o=new MutationObserver((function(e){u.debug("DOM tree modified, updating selector cache"),u.refresh()}))).observe(w,{childList:!0,subtree:!0}),u.debug("Setting up mutation observer",o))},bind:{events:function(){u.debug("Binding delegated events"),b.on(d.on+m,h.trigger,u.event.click)}},event:{click:function(t){0===e(t.target).closest(h.ignore).length&&u.toggle.call(this)}},toggle:function(t){var n=void 0!==t?"number"==typeof t?y.eq(t):e(t).closest(h.title):e(this).closest(h.title),i=n.next(x),o=i.hasClass(f.animating),r=i.hasClass(f.active),a=r&&!o,s=!r&&o;u.debug("Toggling visibility of content",n),a||s?d.collapsible?u.close.call(n):u.debug("Cannot close accordion content collapsing is disabled"):u.open.call(n)},open:function(t){var n=void 0!==t?"number"==typeof t?y.eq(t):e(t).closest(h.title):e(this).closest(h.title),i=n.next(x),o=i.hasClass(f.animating);i.hasClass(f.active)||o?u.debug("Accordion already open, skipping",i):(u.debug("Opening accordion content",n),d.onOpening.call(i),d.onChanging.call(i),d.exclusive&&u.closeOthers.call(n),n.addClass(f.active),i.stop(!0,!0).addClass(f.animating),d.animateChildren&&(void 0!==e.fn.transition?i.children().transition({animation:"fade in",queue:!1,useFailSafe:!0,debug:d.debug,verbose:d.verbose,silent:d.silent,duration:d.duration,skipInlineHidden:!0,onComplete:function(){i.children().removeClass(f.transition)}}):i.children().stop(!0,!0).animate({opacity:1},d.duration,u.resetOpacity)),i.slideDown(d.duration,d.easing,(function(){i.removeClass(f.animating).addClass(f.active),u.reset.display.call(this),d.onOpen.call(this),d.onChange.call(this)})))},close:function(t){var n=void 0!==t?"number"==typeof t?y.eq(t):e(t).closest(h.title):e(this).closest(h.title),i=n.next(x),o=i.hasClass(f.animating),r=i.hasClass(f.active);!r&&!(!r&&o)||r&&o||(u.debug("Closing accordion content",i),d.onClosing.call(i),d.onChanging.call(i),n.removeClass(f.active),i.stop(!0,!0).addClass(f.animating),d.animateChildren&&(void 0!==e.fn.transition?i.children().transition({animation:"fade out",queue:!1,useFailSafe:!0,debug:d.debug,verbose:d.verbose,silent:d.silent,duration:d.duration,skipInlineHidden:!0}):i.children().stop(!0,!0).animate({opacity:0},d.duration,u.resetOpacity)),i.slideUp(d.duration,d.easing,(function(){i.removeClass(f.animating).removeClass(f.active),u.reset.display.call(this),d.onClose.call(this),d.onChange.call(this)})))},closeOthers:function(t){var n,i,o,r=void 0!==t?y.eq(t):e(this).closest(h.title),a=r.parents(h.content).prev(h.title),s=r.closest(h.accordion),c=h.title+"."+f.active+":visible",l=h.content+"."+f.active+":visible";d.closeNested?o=(n=s.find(c).not(a)).next(x):(n=s.find(c).not(a),i=s.find(l).find(c).not(a),o=(n=n.not(i)).next(x)),n.length>0&&(u.debug("Exclusive enabled, closing other content",n),n.removeClass(f.active),o.removeClass(f.animating).stop(!0,!0),d.animateChildren&&(void 0!==e.fn.transition?o.children().transition({animation:"fade out",useFailSafe:!0,debug:d.debug,verbose:d.verbose,silent:d.silent,duration:d.duration,skipInlineHidden:!0}):o.children().stop(!0,!0).animate({opacity:0},d.duration,u.resetOpacity)),o.slideUp(d.duration,d.easing,(function(){e(this).removeClass(f.active),u.reset.display.call(this)})))},reset:{display:function(){u.verbose("Removing inline display from element",this);var t=e(this);t.css("display",""),""===t.attr("style")&&t.attr("style","").removeAttr("style")},opacity:function(){u.verbose("Removing inline opacity from element",this);var t=e(this);t.css("opacity",""),""===t.attr("style")&&t.attr("style","").removeAttr("style")}},setting:function(t,n){if(u.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,d,t);else{if(void 0===n)return d[t];e.isPlainObject(d[t])?e.extend(!0,d[t],n):d[t]=n}},internal:function(t,n){if(u.debug("Changing internal",t,n),void 0===n)return u[t];e.isPlainObject(t)?e.extend(!0,u,t):u[t]=n},debug:function(){!d.silent&&d.debug&&(d.performance?u.performance.log(arguments):(u.debug=Function.prototype.bind.call(console.info,console,d.name+":"),u.debug.apply(console,arguments)))},verbose:function(){!d.silent&&d.verbose&&d.debug&&(d.performance?u.performance.log(arguments):(u.verbose=Function.prototype.bind.call(console.info,console,d.name+":"),u.verbose.apply(console,arguments)))},error:function(){d.silent||(u.error=Function.prototype.bind.call(console.error,console,d.name+":"),u.error.apply(console,arguments))},performance:{log:function(e){var t,n;d.performance&&(n=(t=Date.now())-(r||t),r=t,a.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:w,"Execution Time":n})),clearTimeout(u.performance.timer),u.performance.timer=setTimeout((function(){u.performance.display()}),500)},display:function(){var t=d.name+":",n=0;r=!1,clearTimeout(u.performance.timer),e.each(a,(function(e,t){n+=t["Execution Time"]})),t+=" "+n+"ms",a.length>0&&(console.groupCollapsed(t),console.table?console.table(a):e.each(a,(function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")})),console.groupEnd()),a=[]}},invoke:function(t,n,o){var r,a,s,c,d=C;return n=n||l,o=o||w,"string"==typeof t&&void 0!==d&&(t=t.split(/[ .]/),r=t.length-1,e.each(t,(function(n,i){var o=n!==r?i+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(d[o])&&n!==r)d=d[o];else{if(void 0!==d[o])return a=d[o],!1;if(!e.isPlainObject(d[i])||n===r)return void 0!==d[i]?(a=d[i],!1):(u.error(g.method,t),!1);d=d[i]}}))),"function"==typeof(c=a)&&"number"!=typeof c.nodeType?s=a.apply(o,n):void 0!==a&&(s=a),Array.isArray(i)?i.push(s):void 0!==i?i=[i,s]:void 0!==s&&(i=s),a}},c?(void 0===C&&u.initialize(),u.invoke(s)):(void 0!==C&&C.invoke("destroy"),u.initialize())})),void 0!==i?i:this},e.fn.accordion.settings={name:"Accordion",namespace:"accordion",silent:!1,debug:!1,verbose:!1,performance:!0,on:"click",observeChanges:!0,exclusive:!0,collapsible:!0,closeNested:!1,animateChildren:!0,duration:350,easing:"easeOutQuad",onOpening:function(){},onClosing:function(){},onChanging:function(){},onOpen:function(){},onClose:function(){},onChange:function(){},error:{method:"The method you called is not defined"},className:{active:"active",animating:"animating",transition:"transition"},selector:{accordion:".accordion",title:".title",trigger:".title",ignore:".ui.dropdown",content:".content"}},e.extend(e.easing,{easeOutQuad:function(e){return 1-(1-e)*(1-e)}})}(n(9755),window,document)},4115:(e,t,n)=>{ /*! * # Fomantic-UI - Checkbox * https://github.com/fomantic/Fomantic-UI/ @@ -75,7 +75,7 @@ var t;t=function(){return function(){var e={686:function(e,t,n){"use strict";n.d * https://opensource.org/licenses/MIT * */ -!function(e,t,n){"use strict";function i(e){return"function"==typeof e&&"number"!=typeof e.nodeType}t=void 0!==t&&t.Math===Math?t:globalThis,e.fn.checkbox=function(o){var r,a=e(this),s=Date.now(),c=[],l=arguments[0],u="string"==typeof l,d=[].slice.call(arguments,1);return a.each((function(){var a,f,p=e.extend(!0,{},e.fn.checkbox.settings,o),h=p.className,m=p.namespace,g=p.selector,v=p.error,b="."+m,y="module-"+m,x=e(this),w=e(this).children(g.label),C=e(this).children(g.input),S=C[0],k=!1,T=!1,A=x.data(y),E=this;f={initialize:function(){f.verbose("Initializing checkbox",p),f.create.label(),f.bind.events(),f.set.tabbable(),f.hide.input(),f.observeChanges(),f.instantiate(),f.setup()},instantiate:function(){f.verbose("Storing instance of module",f),A=f,x.data(y,f)},destroy:function(){f.verbose("Destroying module"),f.unbind.events(),f.show.input(),x.removeData(y)},fix:{reference:function(){x.is(g.input)&&(f.debug("Behavior called on adjusting invoked element"),x=x.closest(g.checkbox),f.refresh())}},setup:function(){f.set.initialLoad(),f.is.indeterminate()?(f.debug("Initial value is indeterminate"),f.indeterminate()):f.is.checked()?(f.debug("Initial value is checked"),f.check()):(f.debug("Initial value is unchecked"),f.uncheck()),f.remove.initialLoad()},refresh:function(){w=x.children(g.label),C=x.children(g.input),S=C[0]},hide:{input:function(){f.verbose("Modifying z-index to be unselectable"),C.addClass(h.hidden)}},show:{input:function(){f.verbose("Modifying z-index to be selectable"),C.removeClass(h.hidden)}},observeChanges:function(){"MutationObserver"in t&&((a=new MutationObserver((function(e){f.debug("DOM tree modified, updating selector cache"),f.refresh()}))).observe(E,{childList:!0,subtree:!0}),f.debug("Setting up mutation observer",a))},attachEvents:function(t,n){var o=e(t);n=i(f[n])?f[n]:f.toggle,o.length>0?(f.debug("Attaching checkbox events to element",t,n),o.on("click"+b,n)):f.error(v.notFound)},preventDefaultOnInputTarget:function(){void 0!==event&&null!==event&&e(event.target).is(g.input)&&(f.verbose("Preventing default check action after manual check action"),event.preventDefault())},event:{change:function(e){f.should.ignoreCallbacks()||p.onChange.call(S)},click:function(t){var n=e(t.target);n.is(g.input)?f.verbose("Using default check action on initialized checkbox"):n.is(g.link)?f.debug("Clicking link inside checkbox, skipping toggle"):(f.toggle(),C.trigger("focus"),t.preventDefault())},keydown:function(t){var n=t.which,i=13,o=32,r=27,a=37,s=38,c=39,l=40,u=f.get.radios(),d=u.index(x),h=u.length,m=!1;if(n===a||n===s?m=(0===d?h:d)-1:n!==c&&n!==l||(m=d===h-1?0:d+1),!f.should.ignoreCallbacks()&&!1!==m){if(!1===p.beforeUnchecked.apply(S))return f.verbose("Option not allowed to be unchecked, cancelling key navigation"),!1;if(!1===p.beforeChecked.apply(e(u[m]).children(g.input)[0]))return f.verbose("Next option should not allow check, cancelling key navigation"),!1}T=!1,n===r?(f.verbose("Escape key pressed blurring field"),C.trigger("blur"),T=!0,t.stopPropagation()):f.can.change()?t.ctrlKey||(n===o||n===i&&p.enableEnterKey?(f.verbose("Enter/space key pressed, toggling checkbox"),f.toggle(),T=!0):x.is(".toggle, .slider")&&!f.is.radio()&&(n===a&&f.is.checked()?(f.uncheck(),T=!0):n===c&&f.is.unchecked()&&(f.check(),T=!0))):T=!0},keyup:function(e){T&&e.preventDefault()}},check:function(){f.should.allowCheck()&&(f.debug("Checking checkbox",C),f.set.checked(),f.should.ignoreCallbacks()||(p.onChecked.call(S),f.trigger.change()),f.preventDefaultOnInputTarget())},uncheck:function(){f.should.allowUncheck()&&(f.debug("Unchecking checkbox"),f.set.unchecked(),f.should.ignoreCallbacks()||(p.onUnchecked.call(S),f.trigger.change()),f.preventDefaultOnInputTarget())},indeterminate:function(){f.should.allowIndeterminate()?f.debug("Checkbox is already indeterminate"):(f.debug("Making checkbox indeterminate"),f.set.indeterminate(),f.should.ignoreCallbacks()||(p.onIndeterminate.call(S),f.trigger.change()))},determinate:function(){f.should.allowDeterminate()?f.debug("Checkbox is already determinate"):(f.debug("Making checkbox determinate"),f.set.determinate(),f.should.ignoreCallbacks()||(p.onDeterminate.call(S),f.trigger.change()))},enable:function(){f.is.enabled()?f.debug("Checkbox is already enabled"):(f.debug("Enabling checkbox"),f.set.enabled(),f.should.ignoreCallbacks()||(p.onEnable.call(S),p.onEnabled.call(S)))},disable:function(){f.is.disabled()?f.debug("Checkbox is already disabled"):(f.debug("Disabling checkbox"),f.set.disabled(),f.should.ignoreCallbacks()||(p.onDisable.call(S),p.onDisabled.call(S)))},get:{radios:function(){var t=f.get.name();return e('input[name="'+t+'"]').closest(g.checkbox)},otherRadios:function(){return f.get.radios().not(x)},name:function(){return C.attr("name")}},is:{initialLoad:function(){return k},radio:function(){return C.hasClass(h.radio)||"radio"===C.attr("type")},indeterminate:function(){return void 0!==C.prop("indeterminate")&&C.prop("indeterminate")},checked:function(){return void 0!==C.prop("checked")&&C.prop("checked")},disabled:function(){return void 0!==C.prop("disabled")&&C.prop("disabled")},enabled:function(){return!f.is.disabled()},determinate:function(){return!f.is.indeterminate()},unchecked:function(){return!f.is.checked()}},should:{allowCheck:function(){return f.is.determinate()&&f.is.checked()&&!f.is.initialLoad()?(f.debug("Should not allow check, checkbox is already checked"),!1):!(!f.should.ignoreCallbacks()&&!1===p.beforeChecked.apply(S))||(f.debug("Should not allow check, beforeChecked cancelled"),!1)},allowUncheck:function(){return f.is.determinate()&&f.is.unchecked()&&!f.is.initialLoad()?(f.debug("Should not allow uncheck, checkbox is already unchecked"),!1):!(!f.should.ignoreCallbacks()&&!1===p.beforeUnchecked.apply(S))||(f.debug("Should not allow uncheck, beforeUnchecked cancelled"),!1)},allowIndeterminate:function(){return f.is.indeterminate()&&!f.is.initialLoad()?(f.debug("Should not allow indeterminate, checkbox is already indeterminate"),!1):!(!f.should.ignoreCallbacks()&&!1===p.beforeIndeterminate.apply(S))||(f.debug("Should not allow indeterminate, beforeIndeterminate cancelled"),!1)},allowDeterminate:function(){return f.is.determinate()&&!f.is.initialLoad()?(f.debug("Should not allow determinate, checkbox is already determinate"),!1):!(!f.should.ignoreCallbacks()&&!1===p.beforeDeterminate.apply(S))||(f.debug("Should not allow determinate, beforeDeterminate cancelled"),!1)},ignoreCallbacks:function(){return k&&!p.fireOnInit}},can:{change:function(){return!(x.hasClass(h.disabled)||x.hasClass(h.readOnly)||C.prop("disabled")||C.prop("readonly"))},uncheck:function(){return"boolean"==typeof p.uncheckable?p.uncheckable:!f.is.radio()}},set:{initialLoad:function(){k=!0},checked:function(){f.verbose("Setting class to checked"),x.removeClass(h.indeterminate).addClass(h.checked),f.is.radio()&&f.uncheckOthers(),f.is.indeterminate()||!f.is.checked()?(f.verbose("Setting state to checked",S),C.prop("indeterminate",!1).prop("checked",!0)):f.debug("Input is already checked, skipping input property change")},unchecked:function(){f.verbose("Removing checked class"),x.removeClass(h.indeterminate).removeClass(h.checked),f.is.indeterminate()||!f.is.unchecked()?(f.debug("Setting state to unchecked"),C.prop("indeterminate",!1).prop("checked",!1)):f.debug("Input is already unchecked")},indeterminate:function(){f.verbose("Setting class to indeterminate"),x.addClass(h.indeterminate),f.is.indeterminate()?f.debug("Input is already indeterminate, skipping input property change"):(f.debug("Setting state to indeterminate"),C.prop("indeterminate",!0))},determinate:function(){f.verbose("Removing indeterminate class"),x.removeClass(h.indeterminate),f.is.determinate()?f.debug("Input is already determinate, skipping input property change"):(f.debug("Setting state to determinate"),C.prop("indeterminate",!1))},disabled:function(){f.verbose("Setting class to disabled"),x.addClass(h.disabled),f.is.disabled()?f.debug("Input is already disabled, skipping input property change"):(f.debug("Setting state to disabled"),C.prop("disabled","disabled"))},enabled:function(){f.verbose("Removing disabled class"),x.removeClass(h.disabled),f.is.enabled()?f.debug("Input is already enabled, skipping input property change"):(f.debug("Setting state to enabled"),C.prop("disabled",!1))},tabbable:function(){f.verbose("Adding tabindex to checkbox"),void 0===C.attr("tabindex")&&C.attr("tabindex",0)}},remove:{initialLoad:function(){k=!1}},trigger:{change:function(){var e=C[0];if(e){var t=n.createEvent("HTMLEvents");f.verbose("Triggering native change event"),t.initEvent("change",!0,!1),e.dispatchEvent(t)}}},create:{label:function(){C.prevAll(g.label).length>0?(C.prev(g.label).detach().insertAfter(C),f.debug("Moving existing label",w)):f.has.label()||(w=e("