GNU/Weeb Mailing List <[email protected]>
 help / color / mirror / Atom feed
* [PATCH v1 00/13] App for member attendance record at Senayan Park, Jakarta
@ 2022-11-27 20:32 Ammar Faizi
  2022-11-27 20:32 ` [PATCH v1 01/13] Initial index page Ammar Faizi
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: Ammar Faizi @ 2022-11-27 20:32 UTC (permalink / raw)
  To: Gilang Fachrezy
  Cc: Ammar Faizi, Taufiq Pohan, Aldy Prastyo,
	Muhammad Fitrah Pandjalu, Nauvalsa Yanandana,
	GNU/Weeb Mailing List, VNLX Kernel Department

Hi Gilang,

We will hold a meet and greet event at Senayan Park, Jakarta on the
3rd and 4th of December 2022. To record the member attendance, we
create a web-based app for the attendance record. The web application
will be offline to ensure we have no network stability issues. There
are 13 patches in this series.

Software used in this app:

   Database: MySQL 8.0
   Backend: PHP 8.1
   Frontend: HTML, Bootstrap, jQuery, select2, Sweetalert2.

Signed-off-by: Muhammad Fitrah Pandjalu <[email protected]>
Signed-off-by: Taufiq Pohan <[email protected]>
Signed-off-by: Nauvalsa Yanandana <[email protected]>
Signed-off-by: Ammar Faizi <[email protected]>
---

Ammar Faizi (13):
  Initial index page
  Add regions.json
  index: Integrate city data with the form
  index: Add social media accounts input
  index: Add a red star to the required fields
  index: city: Add "select the city" option on blank form
  Export the DDL
  Initial work on the database integration
  Create initial API integration
  Add input form validation
  assets: Add sweetalert library
  index: Integrate the sweetalert library with the form
  index: Make sure there is no duplicate submission in the same day

 .gitignore                                    |    1 +
 config.example.php                            |   16 +
 database.sql                                  |  607 +++++
 fill.php                                      |   21 +
 helpers.php                                   |    8 +
 public/api.php                                |  130 +
 .../assets}/css/bootstrap.min.css             |    0
 .../assets}/css/bootstrap.min.css.map         |    0
 public/assets/css/select2.min.css             |    1 +
 public/assets/css/sweetalert2.min.css         |    1 +
 {assets => public/assets}/js/bootstrap.min.js |    0
 .../assets}/js/bootstrap.min.js.map           |    0
 public/assets/js/jquery-3.6.1.min.js          |    2 +
 public/assets/js/select2.full.min.js          |    2 +
 public/assets/js/sweetalert2.all.min.js       |    6 +
 public/assets/regions.json                    | 2239 +++++++++++++++++
 public/index.php                              |  171 ++
 17 files changed, 3205 insertions(+)
 create mode 100644 .gitignore
 create mode 100644 config.example.php
 create mode 100644 database.sql
 create mode 100644 fill.php
 create mode 100644 helpers.php
 create mode 100644 public/api.php
 rename {assets => public/assets}/css/bootstrap.min.css (100%)
 rename {assets => public/assets}/css/bootstrap.min.css.map (100%)
 create mode 100644 public/assets/css/select2.min.css
 create mode 100644 public/assets/css/sweetalert2.min.css
 rename {assets => public/assets}/js/bootstrap.min.js (100%)
 rename {assets => public/assets}/js/bootstrap.min.js.map (100%)
 create mode 100644 public/assets/js/jquery-3.6.1.min.js
 create mode 100644 public/assets/js/select2.full.min.js
 create mode 100644 public/assets/js/sweetalert2.all.min.js
 create mode 100644 public/assets/regions.json
 create mode 100644 public/index.php


base-commit: 762ad574573b1a90a5307538965991c2276affc0
-- 
Ammar Faizi


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH v1 01/13] Initial index page
  2022-11-27 20:32 [PATCH v1 00/13] App for member attendance record at Senayan Park, Jakarta Ammar Faizi
@ 2022-11-27 20:32 ` Ammar Faizi
  2022-11-27 20:32 ` [PATCH v1 02/13] Add regions.json Ammar Faizi
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Ammar Faizi @ 2022-11-27 20:32 UTC (permalink / raw)
  To: Gilang Fachrezy
  Cc: Ammar Faizi, Taufiq Pohan, Aldy Prastyo,
	Muhammad Fitrah Pandjalu, Nauvalsa Yanandana,
	GNU/Weeb Mailing List, VNLX Kernel Department

Also, add select2 library.

Co-authored-by: Muhammad Fitrah Pandjalu <[email protected]>
Signed-off-by: Muhammad Fitrah Pandjalu <[email protected]>
Co-authored-by: Taufiq Pohan <[email protected]>
Signed-off-by: Taufiq Pohan <[email protected]>
Co-authored-by: Nauvalsa Yanandana <[email protected]>
Signed-off-by: Nauvalsa Yanandana <[email protected]>
Signed-off-by: Ammar Faizi <[email protected]>
---
 .../assets}/css/bootstrap.min.css             |  0
 .../assets}/css/bootstrap.min.css.map         |  0
 public/assets/css/select2.min.css             |  1 +
 {assets => public/assets}/js/bootstrap.min.js |  0
 .../assets}/js/bootstrap.min.js.map           |  0
 public/assets/js/select2.full.min.js          |  2 ++
 public/index.php                              | 36 +++++++++++++++++++
 7 files changed, 39 insertions(+)
 rename {assets => public/assets}/css/bootstrap.min.css (100%)
 rename {assets => public/assets}/css/bootstrap.min.css.map (100%)
 create mode 100644 public/assets/css/select2.min.css
 rename {assets => public/assets}/js/bootstrap.min.js (100%)
 rename {assets => public/assets}/js/bootstrap.min.js.map (100%)
 create mode 100644 public/assets/js/select2.full.min.js
 create mode 100644 public/index.php

diff --git a/assets/css/bootstrap.min.css b/public/assets/css/bootstrap.min.css
similarity index 100%
rename from assets/css/bootstrap.min.css
rename to public/assets/css/bootstrap.min.css
diff --git a/assets/css/bootstrap.min.css.map b/public/assets/css/bootstrap.min.css.map
similarity index 100%
rename from assets/css/bootstrap.min.css.map
rename to public/assets/css/bootstrap.min.css.map
diff --git a/public/assets/css/select2.min.css b/public/assets/css/select2.min.css
new file mode 100644
index 0000000..7c18ad5
--- /dev/null
+++ b/public/assets/css/select2.min.css
@@ -0,0 +1 @@
+.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px;padding:1px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #fff 50%, #eee 100%);background-image:-o-linear-gradient(top, #fff 50%, #eee 100%);background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eee 50%, #ccc 100%);background-image:-o-linear-gradient(top, #eee 50%, #ccc 100%);background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #fff 0%, #eee 50%);background-image:-o-linear-gradient(top, #fff 0%, #eee 50%);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eee 50%, #fff 100%);background-image:-o-linear-gradient(top, #eee 50%, #fff 100%);background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right;margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}
diff --git a/assets/js/bootstrap.min.js b/public/assets/js/bootstrap.min.js
similarity index 100%
rename from assets/js/bootstrap.min.js
rename to public/assets/js/bootstrap.min.js
diff --git a/assets/js/bootstrap.min.js.map b/public/assets/js/bootstrap.min.js.map
similarity index 100%
rename from assets/js/bootstrap.min.js.map
rename to public/assets/js/bootstrap.min.js.map
diff --git a/public/assets/js/select2.full.min.js b/public/assets/js/select2.full.min.js
new file mode 100644
index 0000000..fa78191
--- /dev/null
+++ b/public/assets/js/select2.full.min.js
@@ -0,0 +1,2 @@
+/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
+!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),n(t),t}:n(jQuery)}(function(d){var e=function(){if(d&&d.fn&&d.fn.select2&&d.fn.select2.amd)var e=d.fn.select2.amd;var t,n,i,h,o,s,f,g,m,v,y,_,r,a,w,l;function b(e,t){return r.call(e,t)}function c(e,t){var n,i,r,o,s,a,l,c,u,d,p,h=t&&t.split("/"),f=y.map,g=f&&f["*"]||{};if(e){for(s=(e=e.split("/")).length-1,y.nodeIdCompat&&w.test(e[s])&&(e[s]=e[s].replace(w,"")),"."===e[0].charAt(0)&&h&&(e=h.slice(0,h.length-1).concat(e)),u=0;u<e.length;u++)if("."===(p=e[u]))e.splice(u,1),u-=1;else if(".."===p){if(0===u||1===u&&".."===e[2]||".."===e[u-1])continue;0<u&&(e.splice(u-1,2),u-=2)}e=e.join("/")}if((h||g)&&f){for(u=(n=e.split("/")).length;0<u;u-=1){if(i=n.slice(0,u).join("/"),h)for(d=h.length;0<d;d-=1)if(r=(r=f[h.slice(0,d).join("/")])&&r[i]){o=r,a=u;break}if(o)break;!l&&g&&g[i]&&(l=g[i],c=u)}!o&&l&&(o=l,a=c),o&&(n.splice(0,a,o),e=n.join("/"))}return e}function A(t,n){return function(){var e=a.call(arguments,0);return"string"!=typeof e[0]&&1===e.length&&e.push(null),s.apply(h,e.concat([t,n]))}}function x(t){return function(e){m[t]=e}}function D(e){if(b(v,e)){var t=v[e];delete v[e],_[e]=!0,o.apply(h,t)}if(!b(m,e)&&!b(_,e))throw new Error("No "+e);return m[e]}function u(e){var t,n=e?e.indexOf("!"):-1;return-1<n&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function S(e){return e?u(e):[]}return e&&e.requirejs||(e?n=e:e={},m={},v={},y={},_={},r=Object.prototype.hasOwnProperty,a=[].slice,w=/\.js$/,f=function(e,t){var n,i=u(e),r=i[0],o=t[1];return e=i[1],r&&(n=D(r=c(r,o))),r?e=n&&n.normalize?n.normalize(e,function(t){return function(e){return c(e,t)}}(o)):c(e,o):(r=(i=u(e=c(e,o)))[0],e=i[1],r&&(n=D(r))),{f:r?r+"!"+e:e,n:e,pr:r,p:n}},g={require:function(e){return A(e)},exports:function(e){var t=m[e];return void 0!==t?t:m[e]={}},module:function(e){return{id:e,uri:"",exports:m[e],config:function(e){return function(){return y&&y.config&&y.config[e]||{}}}(e)}}},o=function(e,t,n,i){var r,o,s,a,l,c,u,d=[],p=typeof n;if(c=S(i=i||e),"undefined"==p||"function"==p){for(t=!t.length&&n.length?["require","exports","module"]:t,l=0;l<t.length;l+=1)if("require"===(o=(a=f(t[l],c)).f))d[l]=g.require(e);else if("exports"===o)d[l]=g.exports(e),u=!0;else if("module"===o)r=d[l]=g.module(e);else if(b(m,o)||b(v,o)||b(_,o))d[l]=D(o);else{if(!a.p)throw new Error(e+" missing "+o);a.p.load(a.n,A(i,!0),x(o),{}),d[l]=m[o]}s=n?n.apply(m[e],d):void 0,e&&(r&&r.exports!==h&&r.exports!==m[e]?m[e]=r.exports:s===h&&u||(m[e]=s))}else e&&(m[e]=n)},t=n=s=function(e,t,n,i,r){if("string"==typeof e)return g[e]?g[e](t):D(f(e,S(t)).f);if(!e.splice){if((y=e).deps&&s(y.deps,y.callback),!t)return;t.splice?(e=t,t=n,n=null):e=h}return t=t||function(){},"function"==typeof n&&(n=i,i=r),i?o(h,e,t,n):setTimeout(function(){o(h,e,t,n)},4),s},s.config=function(e){return s(e)},t._defined=m,(i=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),b(m,e)||b(v,e)||(v[e]=[e,t,n])}).amd={jQuery:!0},e.requirejs=t,e.require=n,e.define=i),e.define("almond",function(){}),e.define("jquery",[],function(){var e=d||$;return null==e&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),e}),e.define("select2/utils",["jquery"],function(o){var r={};function u(e){var t=e.prototype,n=[];for(var i in t){"function"==typeof t[i]&&"constructor"!==i&&n.push(i)}return n}r.Extend=function(e,t){var n={}.hasOwnProperty;function i(){this.constructor=e}for(var r in t)n.call(t,r)&&(e[r]=t[r]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},r.Decorate=function(i,r){var e=u(r),t=u(i);function o(){var e=Array.prototype.unshift,t=r.prototype.constructor.length,n=i.prototype.constructor;0<t&&(e.call(arguments,i.prototype.constructor),n=r.prototype.constructor),n.apply(this,arguments)}r.displayName=i.displayName,o.prototype=new function(){this.constructor=o};for(var n=0;n<t.length;n++){var s=t[n];o.prototype[s]=i.prototype[s]}function a(e){var t=function(){};e in o.prototype&&(t=o.prototype[e]);var n=r.prototype[e];return function(){return Array.prototype.unshift.call(arguments,t),n.apply(this,arguments)}}for(var l=0;l<e.length;l++){var c=e[l];o.prototype[c]=a(c)}return o};function e(){this.listeners={}}e.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},e.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),(n[0]._type=e)in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},e.prototype.invoke=function(e,t){for(var n=0,i=e.length;n<i;n++)e[n].apply(this,t)},r.Observable=e,r.generateChars=function(e){for(var t="",n=0;n<e;n++){t+=Math.floor(36*Math.random()).toString(36)}return t},r.bind=function(e,t){return function(){e.apply(t,arguments)}},r._convertData=function(e){for(var t in e){var n=t.split("-"),i=e;if(1!==n.length){for(var r=0;r<n.length;r++){var o=n[r];(o=o.substring(0,1).toLowerCase()+o.substring(1))in i||(i[o]={}),r==n.length-1&&(i[o]=e[t]),i=i[o]}delete e[t]}}return e},r.hasScroll=function(e,t){var n=o(t),i=t.style.overflowX,r=t.style.overflowY;return(i!==r||"hidden"!==r&&"visible"!==r)&&("scroll"===i||"scroll"===r||(n.innerHeight()<t.scrollHeight||n.innerWidth()<t.scrollWidth))},r.escapeMarkup=function(e){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},r.appendMany=function(e,t){if("1.7"===o.fn.jquery.substr(0,3)){var n=o();o.map(t,function(e){n=n.add(e)}),t=n}e.append(t)},r.__cache={};var n=0;return r.GetUniqueElementId=function(e){var t=e.getAttribute("data-select2-id");return null==t&&(e.id?(t=e.id,e.setAttribute("data-select2-id",t)):(e.setAttribute("data-select2-id",++n),t=n.toString())),t},r.StoreData=function(e,t,n){var i=r.GetUniqueElementId(e);r.__cache[i]||(r.__cache[i]={}),r.__cache[i][t]=n},r.GetData=function(e,t){var n=r.GetUniqueElementId(e);return t?r.__cache[n]&&null!=r.__cache[n][t]?r.__cache[n][t]:o(e).data(t):r.__cache[n]},r.RemoveData=function(e){var t=r.GetUniqueElementId(e);null!=r.__cache[t]&&delete r.__cache[t],e.removeAttribute("data-select2-id")},r}),e.define("select2/results",["jquery","./utils"],function(h,f){function i(e,t,n){this.$element=e,this.data=n,this.options=t,i.__super__.constructor.call(this)}return f.Extend(i,f.Observable),i.prototype.render=function(){var e=h('<ul class="select2-results__options" role="listbox"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},i.prototype.clear=function(){this.$results.empty()},i.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=h('<li role="alert" aria-live="assertive" class="select2-results__option"></li>'),i=this.options.get("translations").get(e.message);n.append(t(i(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},i.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},i.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var i=e.results[n],r=this.option(i);t.push(r)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},i.prototype.position=function(e,t){t.find(".select2-results").append(e)},i.prototype.sort=function(e){return this.options.get("sorter")(e)},i.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option[aria-selected]"),t=e.filter("[aria-selected=true]");0<t.length?t.first().trigger("mouseenter"):e.first().trigger("mouseenter"),this.ensureHighlightVisible()},i.prototype.setClasses=function(){var t=this;this.data.current(function(e){var i=h.map(e,function(e){return e.id.toString()});t.$results.find(".select2-results__option[aria-selected]").each(function(){var e=h(this),t=f.GetData(this,"data"),n=""+t.id;null!=t.element&&t.element.selected||null==t.element&&-1<h.inArray(n,i)?e.attr("aria-selected","true"):e.attr("aria-selected","false")})})},i.prototype.showLoading=function(e){this.hideLoading();var t={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},n=this.option(t);n.className+=" loading-results",this.$results.prepend(n)},i.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},i.prototype.option=function(e){var t=document.createElement("li");t.className="select2-results__option";var n={role:"option","aria-selected":"false"},i=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(var r in(null!=e.element&&i.call(e.element,":disabled")||null==e.element&&e.disabled)&&(delete n["aria-selected"],n["aria-disabled"]="true"),null==e.id&&delete n["aria-selected"],null!=e._resultId&&(t.id=e._resultId),e.title&&(t.title=e.title),e.children&&(n.role="group",n["aria-label"]=e.text,delete n["aria-selected"]),n){var o=n[r];t.setAttribute(r,o)}if(e.children){var s=h(t),a=document.createElement("strong");a.className="select2-results__group";h(a);this.template(e,a);for(var l=[],c=0;c<e.children.length;c++){var u=e.children[c],d=this.option(u);l.push(d)}var p=h("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});p.append(l),s.append(a),s.append(p)}else this.template(e,t);return f.StoreData(t,"data",e),t},i.prototype.bind=function(t,e){var l=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){l.clear(),l.append(e.data),t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("results:append",function(e){l.append(e.data),t.isOpen()&&l.setClasses()}),t.on("query",function(e){l.hideMessages(),l.showLoading(e)}),t.on("select",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("open",function(){l.$results.attr("aria-expanded","true"),l.$results.attr("aria-hidden","false"),l.setClasses(),l.ensureHighlightVisible()}),t.on("close",function(){l.$results.attr("aria-expanded","false"),l.$results.attr("aria-hidden","true"),l.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=l.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=l.getHighlightedResults();if(0!==e.length){var t=f.GetData(e[0],"data");"true"==e.attr("aria-selected")?l.trigger("close",{}):l.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e);if(!(n<=0)){var i=n-1;0===e.length&&(i=0);var r=t.eq(i);r.trigger("mouseenter");var o=l.$results.offset().top,s=r.offset().top,a=l.$results.scrollTop()+(s-o);0===i?l.$results.scrollTop(0):s-o<0&&l.$results.scrollTop(a)}}),t.on("results:next",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var i=t.eq(n);i.trigger("mouseenter");var r=l.$results.offset().top+l.$results.outerHeight(!1),o=i.offset().top+i.outerHeight(!1),s=l.$results.scrollTop()+o-r;0===n?l.$results.scrollTop(0):r<o&&l.$results.scrollTop(s)}}),t.on("results:focus",function(e){e.element.addClass("select2-results__option--highlighted")}),t.on("results:message",function(e){l.displayMessage(e)}),h.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=l.$results.scrollTop(),n=l.$results.get(0).scrollHeight-t+e.deltaY,i=0<e.deltaY&&t-e.deltaY<=0,r=e.deltaY<0&&n<=l.$results.height();i?(l.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):r&&(l.$results.scrollTop(l.$results.get(0).scrollHeight-l.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(e){var t=h(this),n=f.GetData(this,"data");"true"!==t.attr("aria-selected")?l.trigger("select",{originalEvent:e,data:n}):l.options.get("multiple")?l.trigger("unselect",{originalEvent:e,data:n}):l.trigger("close",{})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(e){var t=f.GetData(this,"data");l.getHighlightedResults().removeClass("select2-results__option--highlighted"),l.trigger("results:focus",{data:t,element:h(this)})})},i.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},i.prototype.destroy=function(){this.$results.remove()},i.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]").index(e),n=this.$results.offset().top,i=e.offset().top,r=this.$results.scrollTop()+(i-n),o=i-n;r-=2*e.outerHeight(!1),t<=2?this.$results.scrollTop(0):(o>this.$results.outerHeight()||o<0)&&this.$results.scrollTop(r)}},i.prototype.template=function(e,t){var n=this.options.get("templateResult"),i=this.options.get("escapeMarkup"),r=n(e,t);null==r?t.style.display="none":"string"==typeof r?t.innerHTML=i(r):h(t).append(r)},i}),e.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),e.define("select2/selection/base",["jquery","../utils","../keys"],function(n,i,r){function o(e,t){this.$element=e,this.options=t,o.__super__.constructor.call(this)}return i.Extend(o,i.Observable),o.prototype.render=function(){var e=n('<span class="select2-selection" role="combobox"  aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=i.GetData(this.$element[0],"old-tabindex")?this._tabindex=i.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),e.attr("aria-disabled","false"),this.$selection=e},o.prototype.bind=function(e,t){var n=this,i=e.id+"-results";this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===r.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",i),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.trigger("focus"),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex),n.$selection.attr("aria-disabled","false")}),e.on("disable",function(){n.$selection.attr("tabindex","-1"),n.$selection.attr("aria-disabled","true")})},o.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},o.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.select2."+e.id,function(e){var t=n(e.target).closest(".select2");n(".select2.select2-container--open").each(function(){this!=t[0]&&i.GetData(this,"element").select2("close")})})},o.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.select2."+e.id)},o.prototype.position=function(e,t){t.find(".selection").append(e)},o.prototype.destroy=function(){this._detachCloseHandler(this.container)},o.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},o.prototype.isEnabled=function(){return!this.isDisabled()},o.prototype.isDisabled=function(){return this.options.get("disabled")},o}),e.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,i){function r(){r.__super__.constructor.apply(this,arguments)}return n.Extend(r,t),r.prototype.render=function(){var e=r.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},r.prototype.bind=function(t,e){var n=this;r.__super__.bind.apply(this,arguments);var i=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",i).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",i),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),t.on("focus",function(e){t.isOpen()||n.$selection.trigger("focus")})},r.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return e("<span></span>")},r.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),i=this.display(t,n);n.empty().append(i);var r=t.title||t.text;r?n.attr("title",r):n.removeAttr("title")}else this.clear()},r}),e.define("select2/selection/multiple",["jquery","./base","../utils"],function(r,e,l){function n(e,t){n.__super__.constructor.apply(this,arguments)}return l.Extend(n,e),n.prototype.render=function(){var e=n.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},n.prototype.bind=function(e,t){var i=this;n.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){i.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){if(!i.isDisabled()){var t=r(this).parent(),n=l.GetData(t[0],"data");i.trigger("unselect",{originalEvent:e,data:n})}})},n.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},n.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},n.prototype.selectionContainer=function(){return r('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>')},n.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=0;n<e.length;n++){var i=e[n],r=this.selectionContainer(),o=this.display(i,r);r.append(o);var s=i.title||i.text;s&&r.attr("title",s),l.StoreData(r[0],"data",i),t.push(r)}var a=this.$selection.find(".select2-selection__rendered");l.appendMany(a,t)}},n}),e.define("select2/selection/placeholder",["../utils"],function(e){function t(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return t.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},t.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)),n.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),n},t.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(1<t.length||n)return e.call(this,t);this.clear();var i=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(i)},t}),e.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(r,i,a){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(e){i._handleClear(e)}),t.on("keypress",function(e){i._handleKeyboardClear(e,t)})},e.prototype._handleClear=function(e,t){if(!this.isDisabled()){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){t.stopPropagation();var i=a.GetData(n[0],"data"),r=this.$element.val();this.$element.val(this.placeholder.id);var o={data:i};if(this.trigger("clear",o),o.prevented)this.$element.val(r);else{for(var s=0;s<i.length;s++)if(o={data:i[s]},this.trigger("unselect",o),o.prevented)return void this.$element.val(r);this.$element.trigger("input").trigger("change"),this.trigger("toggle",{})}}}},e.prototype._handleKeyboardClear=function(e,t,n){n.isOpen()||t.which!=i.DELETE&&t.which!=i.BACKSPACE||this._handleClear(t)},e.prototype.update=function(e,t){if(e.call(this,t),!(0<this.$selection.find(".select2-selection__placeholder").length||0===t.length)){var n=this.options.get("translations").get("removeAllItems"),i=r('<span class="select2-selection__clear" title="'+n()+'">&times;</span>');a.StoreData(i[0],"data",t),this.$selection.find(".select2-selection__rendered").prepend(i)}},e}),e.define("select2/selection/search",["jquery","../utils","../keys"],function(i,a,l){function e(e,t,n){e.call(this,t,n)}return e.prototype.render=function(e){var t=i('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></li>');this.$searchContainer=t,this.$search=t.find("input");var n=e.call(this);return this._transferTabIndex(),n},e.prototype.bind=function(e,t,n){var i=this,r=t.id+"-results";e.call(this,t,n),t.on("open",function(){i.$search.attr("aria-controls",r),i.$search.trigger("focus")}),t.on("close",function(){i.$search.val(""),i.$search.removeAttr("aria-controls"),i.$search.removeAttr("aria-activedescendant"),i.$search.trigger("focus")}),t.on("enable",function(){i.$search.prop("disabled",!1),i._transferTabIndex()}),t.on("disable",function(){i.$search.prop("disabled",!0)}),t.on("focus",function(e){i.$search.trigger("focus")}),t.on("results:focus",function(e){e.data._resultId?i.$search.attr("aria-activedescendant",e.data._resultId):i.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".select2-search--inline",function(e){i.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){i._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented(),e.which===l.BACKSPACE&&""===i.$search.val()){var t=i.$searchContainer.prev(".select2-selection__choice");if(0<t.length){var n=a.GetData(t[0],"data");i.searchRemoveChoice(n),e.preventDefault()}}}),this.$selection.on("click",".select2-search--inline",function(e){i.$search.val()&&e.stopPropagation()});var o=document.documentMode,s=o&&o<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(e){s?i.$selection.off("input.search input.searchcheck"):i.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(e){if(s&&"input"===e.type)i.$selection.off("input.search input.searchcheck");else{var t=e.which;t!=l.SHIFT&&t!=l.CTRL&&t!=l.ALT&&t!=l.TAB&&i.handleSearch(e)}})},e.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},e.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},e.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.trigger("focus")},e.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},e.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},e.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";""!==this.$search.attr("placeholder")?e=this.$selection.find(".select2-selection__rendered").width():e=.75*(this.$search.val().length+1)+"em";this.$search.css("width",e)},e}),e.define("select2/selection/eventRelay",["jquery"],function(s){function e(){}return e.prototype.bind=function(e,t,n){var i=this,r=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],o=["opening","closing","selecting","unselecting","clearing"];e.call(this,t,n),t.on("*",function(e,t){if(-1!==s.inArray(e,r)){t=t||{};var n=s.Event("select2:"+e,{params:t});i.$element.trigger(n),-1!==s.inArray(e,o)&&(t.prevented=n.isDefaultPrevented())}})},e}),e.define("select2/translation",["jquery","require"],function(t,n){function i(e){this.dict=e||{}}return i.prototype.all=function(){return this.dict},i.prototype.get=function(e){return this.dict[e]},i.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},i._cache={},i.loadPath=function(e){if(!(e in i._cache)){var t=n(e);i._cache[e]=t}return new i(i._cache[e])},i}),e.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Œ":"OE","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","œ":"oe","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ώ":"ω","ς":"σ","’":"'"}}),e.define("select2/data/base",["../utils"],function(i){function n(e,t){n.__super__.constructor.call(this)}return i.Extend(n,i.Observable),n.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},n.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},n.prototype.bind=function(e,t){},n.prototype.destroy=function(){},n.prototype.generateResultId=function(e,t){var n=e.id+"-result-";return n+=i.generateChars(4),null!=t.id?n+="-"+t.id.toString():n+="-"+i.generateChars(4),n},n}),e.define("select2/data/select",["./base","../utils","jquery"],function(e,a,l){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return a.Extend(n,e),n.prototype.current=function(e){var n=[],i=this;this.$element.find(":selected").each(function(){var e=l(this),t=i.item(e);n.push(t)}),e(n)},n.prototype.select=function(r){var o=this;if(r.selected=!0,l(r.element).is("option"))return r.element.selected=!0,void this.$element.trigger("input").trigger("change");if(this.$element.prop("multiple"))this.current(function(e){var t=[];(r=[r]).push.apply(r,e);for(var n=0;n<r.length;n++){var i=r[n].id;-1===l.inArray(i,t)&&t.push(i)}o.$element.val(t),o.$element.trigger("input").trigger("change")});else{var e=r.id;this.$element.val(e),this.$element.trigger("input").trigger("change")}},n.prototype.unselect=function(r){var o=this;if(this.$element.prop("multiple")){if(r.selected=!1,l(r.element).is("option"))return r.element.selected=!1,void this.$element.trigger("input").trigger("change");this.current(function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n].id;i!==r.id&&-1===l.inArray(i,t)&&t.push(i)}o.$element.val(t),o.$element.trigger("input").trigger("change")})}},n.prototype.bind=function(e,t){var n=this;(this.container=e).on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},n.prototype.destroy=function(){this.$element.find("*").each(function(){a.RemoveData(this)})},n.prototype.query=function(i,e){var r=[],o=this;this.$element.children().each(function(){var e=l(this);if(e.is("option")||e.is("optgroup")){var t=o.item(e),n=o.matches(i,t);null!==n&&r.push(n)}}),e({results:r})},n.prototype.addOptions=function(e){a.appendMany(this.$element,e)},n.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup")).label=e.text:void 0!==(t=document.createElement("option")).textContent?t.textContent=e.text:t.innerText=e.text,void 0!==e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);var n=l(t),i=this._normalizeItem(e);return i.element=t,a.StoreData(t,"data",i),n},n.prototype.item=function(e){var t={};if(null!=(t=a.GetData(e[0],"data")))return t;if(e.is("option"))t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if(e.is("optgroup")){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var n=e.children("option"),i=[],r=0;r<n.length;r++){var o=l(n[r]),s=this.item(o);i.push(s)}t.children=i}return(t=this._normalizeItem(t)).element=e[0],a.StoreData(e[0],"data",t),t},n.prototype._normalizeItem=function(e){e!==Object(e)&&(e={id:e,text:e});return null!=(e=l.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),l.extend({},{selected:!1,disabled:!1},e)},n.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},n}),e.define("select2/data/array",["./select","../utils","jquery"],function(e,f,g){function i(e,t){this._dataToConvert=t.get("data")||[],i.__super__.constructor.call(this,e,t)}return f.Extend(i,e),i.prototype.bind=function(e,t){i.__super__.bind.call(this,e,t),this.addOptions(this.convertToOptions(this._dataToConvert))},i.prototype.select=function(n){var e=this.$element.find("option").filter(function(e,t){return t.value==n.id.toString()});0===e.length&&(e=this.option(n),this.addOptions(e)),i.__super__.select.call(this,n)},i.prototype.convertToOptions=function(e){var t=this,n=this.$element.find("option"),i=n.map(function(){return t.item(g(this)).id}).get(),r=[];function o(e){return function(){return g(this).val()==e.id}}for(var s=0;s<e.length;s++){var a=this._normalizeItem(e[s]);if(0<=g.inArray(a.id,i)){var l=n.filter(o(a)),c=this.item(l),u=g.extend(!0,{},a,c),d=this.option(u);l.replaceWith(d)}else{var p=this.option(a);if(a.children){var h=this.convertToOptions(a.children);f.appendMany(p,h)}r.push(p)}}return r},i}),e.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,o){function n(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),n.__super__.constructor.call(this,e,t)}return t.Extend(n,e),n.prototype._applyDefaults=function(e){var t={data:function(e){return o.extend({},e,{q:e.term})},transport:function(e,t,n){var i=o.ajax(e);return i.then(t),i.fail(n),i}};return o.extend({},t,e,!0)},n.prototype.processResults=function(e){return e},n.prototype.query=function(n,i){var r=this;null!=this._request&&(o.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var t=o.extend({type:"GET"},this.ajaxOptions);function e(){var e=t.transport(t,function(e){var t=r.processResults(e,n);r.options.get("debug")&&window.console&&console.error&&(t&&t.results&&o.isArray(t.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),i(t)},function(){"status"in e&&(0===e.status||"0"===e.status)||r.trigger("results:message",{message:"errorLoading"})});r._request=e}"function"==typeof t.url&&(t.url=t.url.call(this.$element,n)),"function"==typeof t.data&&(t.data=t.data.call(this.$element,n)),this.ajaxOptions.delay&&null!=n.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(e,this.ajaxOptions.delay)):e()},n}),e.define("select2/data/tags",["jquery"],function(u){function e(e,t,n){var i=n.get("tags"),r=n.get("createTag");void 0!==r&&(this.createTag=r);var o=n.get("insertTag");if(void 0!==o&&(this.insertTag=o),e.call(this,t,n),u.isArray(i))for(var s=0;s<i.length;s++){var a=i[s],l=this._normalizeItem(a),c=this.option(l);this.$element.append(c)}}return e.prototype.query=function(e,c,u){var d=this;this._removeOldTags(),null!=c.term&&null==c.page?e.call(this,c,function e(t,n){for(var i=t.results,r=0;r<i.length;r++){var o=i[r],s=null!=o.children&&!e({results:o.children},!0);if((o.text||"").toUpperCase()===(c.term||"").toUpperCase()||s)return!n&&(t.data=i,void u(t))}if(n)return!0;var a=d.createTag(c);if(null!=a){var l=d.option(a);l.attr("data-select2-tag",!0),d.addOptions([l]),d.insertTag(i,a)}t.results=i,u(t)}):e.call(this,c,u)},e.prototype.createTag=function(e,t){var n=u.trim(t.term);return""===n?null:{id:n,text:n}},e.prototype.insertTag=function(e,t,n){t.unshift(n)},e.prototype._removeOldTags=function(e){this.$element.find("option[data-select2-tag]").each(function(){this.selected||u(this).remove()})},e}),e.define("select2/data/tokenizer",["jquery"],function(d){function e(e,t,n){var i=n.get("tokenizer");void 0!==i&&(this.tokenizer=i),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},e.prototype.query=function(e,t,n){var i=this;t.term=t.term||"";var r=this.tokenizer(t,this.options,function(e){var t=i._normalizeItem(e);if(!i.$element.find("option").filter(function(){return d(this).val()===t.id}).length){var n=i.option(t);n.attr("data-select2-tag",!0),i._removeOldTags(),i.addOptions([n])}!function(e){i.trigger("select",{data:e})}(t)});r.term!==t.term&&(this.$search.length&&(this.$search.val(r.term),this.$search.trigger("focus")),t.term=r.term),e.call(this,t,n)},e.prototype.tokenizer=function(e,t,n,i){for(var r=n.get("tokenSeparators")||[],o=t.term,s=0,a=this.createTag||function(e){return{id:e.term,text:e.term}};s<o.length;){var l=o[s];if(-1!==d.inArray(l,r)){var c=o.substr(0,s),u=a(d.extend({},t,{term:c}));null!=u?(i(u),o=o.substr(s+1)||"",s=0):s++}else s++}return{term:o}},e}),e.define("select2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",t.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),e.define("select2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",0<this.maximumInputLength&&t.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),e.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",function(){i._checkIfMaximumSelected()})},e.prototype.query=function(e,t,n){var i=this;this._checkIfMaximumSelected(function(){e.call(i,t,n)})},e.prototype._checkIfMaximumSelected=function(e,n){var i=this;this.current(function(e){var t=null!=e?e.length:0;0<i.maximumSelectionLength&&t>=i.maximumSelectionLength?i.trigger("results:message",{message:"maximumSelected",args:{maximum:i.maximumSelectionLength}}):n&&n()})},e}),e.define("select2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<span class="select2-dropdown"><span class="select2-results"></span></span>');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),e.define("select2/dropdown/search",["jquery","../utils"],function(o,e){function t(){}return t.prototype.render=function(e){var t=e.call(this),n=o('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>');return this.$searchContainer=n,this.$search=n.find("input"),t.prepend(n),t},t.prototype.bind=function(e,t,n){var i=this,r=t.id+"-results";e.call(this,t,n),this.$search.on("keydown",function(e){i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){o(this).off("keyup")}),this.$search.on("keyup input",function(e){i.handleSearch(e)}),t.on("open",function(){i.$search.attr("tabindex",0),i.$search.attr("aria-controls",r),i.$search.trigger("focus"),window.setTimeout(function(){i.$search.trigger("focus")},0)}),t.on("close",function(){i.$search.attr("tabindex",-1),i.$search.removeAttr("aria-controls"),i.$search.removeAttr("aria-activedescendant"),i.$search.val(""),i.$search.trigger("blur")}),t.on("focus",function(){t.isOpen()||i.$search.trigger("focus")}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(i.showSearch(e)?i.$searchContainer.removeClass("select2-search--hide"):i.$searchContainer.addClass("select2-search--hide"))}),t.on("results:focus",function(e){e.data._resultId?i.$search.attr("aria-activedescendant",e.data._resultId):i.$search.removeAttr("aria-activedescendant")})},t.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),e.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),i=t.length-1;0<=i;i--){var r=t[i];this.placeholder.id===r.id&&n.splice(i,1)}return n},e}),e.define("select2/dropdown/infiniteScroll",["jquery"],function(n){function e(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("query",function(e){i.lastParams=e,i.loading=!0}),t.on("query:append",function(e){i.lastParams=e,i.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},e.prototype.loadMoreIfNeeded=function(){var e=n.contains(document.documentElement,this.$loadingMore[0]);if(!this.loading&&e){var t=this.$results.offset().top+this.$results.outerHeight(!1);this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=t+50&&this.loadMore()}},e.prototype.loadMore=function(){this.loading=!0;var e=n.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=n('<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"></li>'),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),e.define("select2/dropdown/attachBody",["jquery","../utils"],function(f,a){function e(e,t,n){this.$dropdownParent=f(n.get("dropdownParent")||document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("open",function(){i._showDropdown(),i._attachPositioningHandler(t),i._bindContainerResultHandlers(t)}),t.on("close",function(){i._hideDropdown(),i._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=f("<span></span>"),n=e.call(this);return t.append(n),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._bindContainerResultHandlers=function(e,t){if(!this._containerResultsHandlersBound){var n=this;t.on("results:all",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:append",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:message",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("select",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("unselect",function(){n._positionDropdown(),n._resizeDropdown()}),this._containerResultsHandlersBound=!0}},e.prototype._attachPositioningHandler=function(e,t){var n=this,i="scroll.select2."+t.id,r="resize.select2."+t.id,o="orientationchange.select2."+t.id,s=this.$container.parents().filter(a.hasScroll);s.each(function(){a.StoreData(this,"select2-scroll-position",{x:f(this).scrollLeft(),y:f(this).scrollTop()})}),s.on(i,function(e){var t=a.GetData(this,"select2-scroll-position");f(this).scrollTop(t.y)}),f(window).on(i+" "+r+" "+o,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.select2."+t.id,i="resize.select2."+t.id,r="orientationchange.select2."+t.id;this.$container.parents().filter(a.hasScroll).off(n),f(window).off(n+" "+i+" "+r)},e.prototype._positionDropdown=function(){var e=f(window),t=this.$dropdown.hasClass("select2-dropdown--above"),n=this.$dropdown.hasClass("select2-dropdown--below"),i=null,r=this.$container.offset();r.bottom=r.top+this.$container.outerHeight(!1);var o={height:this.$container.outerHeight(!1)};o.top=r.top,o.bottom=r.top+o.height;var s=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=a<r.top-s,u=l>r.bottom+s,d={left:r.left,top:o.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var h={top:0,left:0};(f.contains(document.body,p[0])||p[0].isConnected)&&(h=p.offset()),d.top-=h.top,d.left-=h.left,t||n||(i="below"),u||!c||t?!c&&u&&t&&(i="below"):i="above",("above"==i||t&&"below"!==i)&&(d.top=o.top-h.top-s),null!=i&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+i),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+i)),this.$dropdownContainer.css(d)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),e.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,i)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,i=0;i<t.length;i++){var r=t[i];r.children?n+=e(r.children):n++}return n}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e}),e.define("select2/dropdown/selectOnClose",["../utils"],function(o){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("close",function(e){i._handleSelectOnClose(e)})},e.prototype._handleSelectOnClose=function(e,t){if(t&&null!=t.originalSelect2Event){var n=t.originalSelect2Event;if("select"===n._type||"unselect"===n._type)return}var i=this.getHighlightedResults();if(!(i.length<1)){var r=o.GetData(i[0],"data");null!=r.element&&r.element.selected||null==r.element&&r.selected||this.trigger("select",{data:r})}},e}),e.define("select2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",function(e){i._selectTriggered(e)}),t.on("unselect",function(e){i._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&(n.ctrlKey||n.metaKey)||this.trigger("close",{originalEvent:n,originalSelect2Event:t})},e}),e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return 1!=t&&(n+="s"),n},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"}}}),e.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(c,u,d,p,h,f,g,m,v,y,s,t,_,w,$,b,A,x,D,S,C,E,O,T,q,j,L,I,e){function n(){this.reset()}return n.prototype.apply=function(e){if(null==(e=c.extend(!0,{},this.defaults,e)).dataAdapter){if(null!=e.ajax?e.dataAdapter=$:null!=e.data?e.dataAdapter=w:e.dataAdapter=_,0<e.minimumInputLength&&(e.dataAdapter=y.Decorate(e.dataAdapter,x)),0<e.maximumInputLength&&(e.dataAdapter=y.Decorate(e.dataAdapter,D)),0<e.maximumSelectionLength&&(e.dataAdapter=y.Decorate(e.dataAdapter,S)),e.tags&&(e.dataAdapter=y.Decorate(e.dataAdapter,b)),null==e.tokenSeparators&&null==e.tokenizer||(e.dataAdapter=y.Decorate(e.dataAdapter,A)),null!=e.query){var t=u(e.amdBase+"compat/query");e.dataAdapter=y.Decorate(e.dataAdapter,t)}if(null!=e.initSelection){var n=u(e.amdBase+"compat/initSelection");e.dataAdapter=y.Decorate(e.dataAdapter,n)}}if(null==e.resultsAdapter&&(e.resultsAdapter=d,null!=e.ajax&&(e.resultsAdapter=y.Decorate(e.resultsAdapter,T)),null!=e.placeholder&&(e.resultsAdapter=y.Decorate(e.resultsAdapter,O)),e.selectOnClose&&(e.resultsAdapter=y.Decorate(e.resultsAdapter,L))),null==e.dropdownAdapter){if(e.multiple)e.dropdownAdapter=C;else{var i=y.Decorate(C,E);e.dropdownAdapter=i}if(0!==e.minimumResultsForSearch&&(e.dropdownAdapter=y.Decorate(e.dropdownAdapter,j)),e.closeOnSelect&&(e.dropdownAdapter=y.Decorate(e.dropdownAdapter,I)),null!=e.dropdownCssClass||null!=e.dropdownCss||null!=e.adaptDropdownCssClass){var r=u(e.amdBase+"compat/dropdownCss");e.dropdownAdapter=y.Decorate(e.dropdownAdapter,r)}e.dropdownAdapter=y.Decorate(e.dropdownAdapter,q)}if(null==e.selectionAdapter){if(e.multiple?e.selectionAdapter=h:e.selectionAdapter=p,null!=e.placeholder&&(e.selectionAdapter=y.Decorate(e.selectionAdapter,f)),e.allowClear&&(e.selectionAdapter=y.Decorate(e.selectionAdapter,g)),e.multiple&&(e.selectionAdapter=y.Decorate(e.selectionAdapter,m)),null!=e.containerCssClass||null!=e.containerCss||null!=e.adaptContainerCssClass){var o=u(e.amdBase+"compat/containerCss");e.selectionAdapter=y.Decorate(e.selectionAdapter,o)}e.selectionAdapter=y.Decorate(e.selectionAdapter,v)}e.language=this._resolveLanguage(e.language),e.language.push("en");for(var s=[],a=0;a<e.language.length;a++){var l=e.language[a];-1===s.indexOf(l)&&s.push(l)}return e.language=s,e.translations=this._processTranslations(e.language,e.debug),e},n.prototype.reset=function(){function a(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return t[e]||e})}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:y.escapeMarkup,language:{},matcher:function e(t,n){if(""===c.trim(t.term))return n;if(n.children&&0<n.children.length){for(var i=c.extend(!0,{},n),r=n.children.length-1;0<=r;r--)null==e(t,n.children[r])&&i.children.splice(r,1);return 0<i.children.length?i:e(t,i)}var o=a(n.text).toUpperCase(),s=a(t.term).toUpperCase();return-1<o.indexOf(s)?n:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},n.prototype.applyFromElement=function(e,t){var n=e.language,i=this.defaults.language,r=t.prop("lang"),o=t.closest("[lang]").prop("lang"),s=Array.prototype.concat.call(this._resolveLanguage(r),this._resolveLanguage(n),this._resolveLanguage(i),this._resolveLanguage(o));return e.language=s,e},n.prototype._resolveLanguage=function(e){if(!e)return[];if(c.isEmptyObject(e))return[];if(c.isPlainObject(e))return[e];var t;t=c.isArray(e)?e:[e];for(var n=[],i=0;i<t.length;i++)if(n.push(t[i]),"string"==typeof t[i]&&0<t[i].indexOf("-")){var r=t[i].split("-")[0];n.push(r)}return n},n.prototype._processTranslations=function(e,t){for(var n=new s,i=0;i<e.length;i++){var r=new s,o=e[i];if("string"==typeof o)try{r=s.loadPath(o)}catch(e){try{o=this.defaults.amdLanguageBase+o,r=s.loadPath(o)}catch(e){t&&window.console&&console.warn&&console.warn('Select2: The language file for "'+o+'" could not be automatically loaded. A fallback will be used instead.')}}else r=c.isPlainObject(o)?new s(o):o;n.extend(r)}return n},n.prototype.set=function(e,t){var n={};n[c.camelCase(e)]=t;var i=y._convertData(n);c.extend(!0,this.defaults,i)},new n}),e.define("select2/options",["require","jquery","./defaults","./utils"],function(i,d,r,p){function e(e,t){if(this.options=e,null!=t&&this.fromElement(t),null!=t&&(this.options=r.applyFromElement(this.options,t)),this.options=r.apply(this.options),t&&t.is("input")){var n=i(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=p.Decorate(this.options.dataAdapter,n)}}return e.prototype.fromElement=function(e){var t=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),p.GetData(e[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),p.StoreData(e[0],"data",p.GetData(e[0],"select2Tags")),p.StoreData(e[0],"tags",!0)),p.GetData(e[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),e.attr("ajax--url",p.GetData(e[0],"ajaxUrl")),p.StoreData(e[0],"ajax-Url",p.GetData(e[0],"ajaxUrl")));var n={};function i(e,t){return t.toUpperCase()}for(var r=0;r<e[0].attributes.length;r++){var o=e[0].attributes[r].name,s="data-";if(o.substr(0,s.length)==s){var a=o.substring(s.length),l=p.GetData(e[0],a);n[a.replace(/-([a-z])/g,i)]=l}}d.fn.jquery&&"1."==d.fn.jquery.substr(0,2)&&e[0].dataset&&(n=d.extend(!0,{},e[0].dataset,n));var c=d.extend(!0,{},p.GetData(e[0]),n);for(var u in c=p._convertData(c))-1<d.inArray(u,t)||(d.isPlainObject(this.options[u])?d.extend(this.options[u],c[u]):this.options[u]=c[u]);return this},e.prototype.get=function(e){return this.options[e]},e.prototype.set=function(e,t){this.options[e]=t},e}),e.define("select2/core",["jquery","./options","./utils","./keys"],function(o,c,u,i){var d=function(e,t){null!=u.GetData(e[0],"select2")&&u.GetData(e[0],"select2").destroy(),this.$element=e,this.id=this._generateId(e),t=t||{},this.options=new c(t,e),d.__super__.constructor.call(this);var n=e.attr("tabindex")||0;u.StoreData(e[0],"old-tabindex",n),e.attr("tabindex","-1");var i=this.options.get("dataAdapter");this.dataAdapter=new i(e,this.options);var r=this.render();this._placeContainer(r);var o=this.options.get("selectionAdapter");this.selection=new o(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,r);var s=this.options.get("dropdownAdapter");this.dropdown=new s(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,r);var a=this.options.get("resultsAdapter");this.results=new a(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var l=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){l.trigger("selection:update",{data:e})}),e.addClass("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),u.StoreData(e[0],"select2",this),e.data("select2",this)};return u.Extend(d,u.Observable),d.prototype._generateId=function(e){return"select2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+u.generateChars(2):u.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},d.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},d.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var i=this._resolveWidth(e,"style");return null!=i?i:this._resolveWidth(e,"element")}if("element"==t){var r=e.outerWidth(!1);return r<=0?"auto":r+"px"}if("style"!=t)return"computedstyle"!=t?t:window.getComputedStyle(e[0]).width;var o=e.attr("style");if("string"!=typeof o)return null;for(var s=o.split(";"),a=0,l=s.length;a<l;a+=1){var c=s[a].replace(/\s/g,"").match(n);if(null!==c&&1<=c.length)return c[1]}return null},d.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},d.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this.$element.on("focus.select2",function(e){t.trigger("focus",e)}),this._syncA=u.bind(this._syncAttributes,this),this._syncS=u.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=e?(this._observer=new e(function(e){t._syncA(),t._syncS(null,e)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",t._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",t._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",t._syncS,!1))},d.prototype._registerDataEvents=function(){var n=this;this.dataAdapter.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerSelectionEvents=function(){var n=this,i=["toggle","focus"];this.selection.on("toggle",function(){n.toggleDropdown()}),this.selection.on("focus",function(e){n.focus(e)}),this.selection.on("*",function(e,t){-1===o.inArray(e,i)&&n.trigger(e,t)})},d.prototype._registerDropdownEvents=function(){var n=this;this.dropdown.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerResultsEvents=function(){var n=this;this.results.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerEvents=function(){var n=this;this.on("open",function(){n.$container.addClass("select2-container--open")}),this.on("close",function(){n.$container.removeClass("select2-container--open")}),this.on("enable",function(){n.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){n.$container.addClass("select2-container--disabled")}),this.on("blur",function(){n.$container.removeClass("select2-container--focus")}),this.on("query",function(t){n.isOpen()||n.trigger("open",{}),this.dataAdapter.query(t,function(e){n.trigger("results:all",{data:e,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(e){n.trigger("results:append",{data:e,query:t})})}),this.on("keypress",function(e){var t=e.which;n.isOpen()?t===i.ESC||t===i.TAB||t===i.UP&&e.altKey?(n.close(e),e.preventDefault()):t===i.ENTER?(n.trigger("results:select",{}),e.preventDefault()):t===i.SPACE&&e.ctrlKey?(n.trigger("results:toggle",{}),e.preventDefault()):t===i.UP?(n.trigger("results:previous",{}),e.preventDefault()):t===i.DOWN&&(n.trigger("results:next",{}),e.preventDefault()):(t===i.ENTER||t===i.SPACE||t===i.DOWN&&e.altKey)&&(n.open(),e.preventDefault())})},d.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},d.prototype._isChangeMutation=function(e,t){var n=!1,i=this;if(!e||!e.target||"OPTION"===e.target.nodeName||"OPTGROUP"===e.target.nodeName){if(t)if(t.addedNodes&&0<t.addedNodes.length)for(var r=0;r<t.addedNodes.length;r++){t.addedNodes[r].selected&&(n=!0)}else t.removedNodes&&0<t.removedNodes.length?n=!0:o.isArray(t)&&o.each(t,function(e,t){if(i._isChangeMutation(e,t))return!(n=!0)});else n=!0;return n}},d.prototype._syncSubtree=function(e,t){var n=this._isChangeMutation(e,t),i=this;n&&this.dataAdapter.current(function(e){i.trigger("selection:update",{data:e})})},d.prototype.trigger=function(e,t){var n=d.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===t&&(t={}),e in i){var r=i[e],o={prevented:!1,name:e,args:t};if(n.call(this,r,o),o.prevented)return void(t.prevented=!0)}n.call(this,e,t)},d.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},d.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},d.prototype.close=function(e){this.isOpen()&&this.trigger("close",{originalEvent:e})},d.prototype.isEnabled=function(){return!this.isDisabled()},d.prototype.isDisabled=function(){return this.options.get("disabled")},d.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},d.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},d.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},d.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=e&&0!==e.length||(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},d.prototype.data=function(){this.options.get("debug")&&0<arguments.length&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var t=[];return this.dataAdapter.current(function(e){t=e}),t},d.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();var t=e[0];o.isArray(t)&&(t=o.map(t,function(e){return e.toString()})),this.$element.val(t).trigger("input").trigger("change")},d.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",u.GetData(this.$element[0],"old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),u.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},d.prototype.render=function(){var e=o('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),u.StoreData(e[0],"element",this.$element),e},d}),e.define("select2/compat/utils",["jquery"],function(s){return{syncCssClasses:function(e,t,n){var i,r,o=[];(i=s.trim(e.attr("class")))&&s((i=""+i).split(/\s+/)).each(function(){0===this.indexOf("select2-")&&o.push(this)}),(i=s.trim(t.attr("class")))&&s((i=""+i).split(/\s+/)).each(function(){0!==this.indexOf("select2-")&&null!=(r=n(this))&&o.push(r)}),e.attr("class",o.join(" "))}}}),e.define("select2/compat/containerCss",["jquery","./utils"],function(s,a){function l(e){return null}function e(){}return e.prototype.render=function(e){var t=e.call(this),n=this.options.get("containerCssClass")||"";s.isFunction(n)&&(n=n(this.$element));var i=this.options.get("adaptContainerCssClass");if(i=i||l,-1!==n.indexOf(":all:")){n=n.replace(":all:","");var r=i;i=function(e){var t=r(e);return null!=t?t+" "+e:e}}var o=this.options.get("containerCss")||{};return s.isFunction(o)&&(o=o(this.$element)),a.syncCssClasses(t,this.$element,i),t.css(o),t.addClass(n),t},e}),e.define("select2/compat/dropdownCss",["jquery","./utils"],function(s,a){function l(e){return null}function e(){}return e.prototype.render=function(e){var t=e.call(this),n=this.options.get("dropdownCssClass")||"";s.isFunction(n)&&(n=n(this.$element));var i=this.options.get("adaptDropdownCssClass");if(i=i||l,-1!==n.indexOf(":all:")){n=n.replace(":all:","");var r=i;i=function(e){var t=r(e);return null!=t?t+" "+e:e}}var o=this.options.get("dropdownCss")||{};return s.isFunction(o)&&(o=o(this.$element)),a.syncCssClasses(t,this.$element,i),t.css(o),t.addClass(n),t},e}),e.define("select2/compat/initSelection",["jquery"],function(i){function e(e,t,n){n.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=n.get("initSelection"),this._isInitialized=!1,e.call(this,t,n)}return e.prototype.current=function(e,t){var n=this;this._isInitialized?e.call(this,t):this.initSelection.call(null,this.$element,function(e){n._isInitialized=!0,i.isArray(e)||(e=[e]),t(e)})},e}),e.define("select2/compat/inputData",["jquery","../utils"],function(s,i){function e(e,t,n){this._currentData=[],this._valueSeparator=n.get("valueSeparator")||",","hidden"===t.prop("type")&&n.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `<select>` element instead."),e.call(this,t,n)}return e.prototype.current=function(e,t){function i(e,t){var n=[];return e.selected||-1!==s.inArray(e.id,t)?(e.selected=!0,n.push(e)):e.selected=!1,e.children&&n.push.apply(n,i(e.children,t)),n}for(var n=[],r=0;r<this._currentData.length;r++){var o=this._currentData[r];n.push.apply(n,i(o,this.$element.val().split(this._valueSeparator)))}t(n)},e.prototype.select=function(e,t){if(this.options.get("multiple")){var n=this.$element.val();n+=this._valueSeparator+t.id,this.$element.val(n),this.$element.trigger("input").trigger("change")}else this.current(function(e){s.map(e,function(e){e.selected=!1})}),this.$element.val(t.id),this.$element.trigger("input").trigger("change")},e.prototype.unselect=function(e,r){var o=this;r.selected=!1,this.current(function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n];r.id!=i.id&&t.push(i.id)}o.$element.val(t.join(o._valueSeparator)),o.$element.trigger("input").trigger("change")})},e.prototype.query=function(e,t,n){for(var i=[],r=0;r<this._currentData.length;r++){var o=this._currentData[r],s=this.matches(t,o);null!==s&&i.push(s)}n({results:i})},e.prototype.addOptions=function(e,t){var n=s.map(t,function(e){return i.GetData(e[0],"data")});this._currentData.push.apply(this._currentData,n)},e}),e.define("select2/compat/matcher",["jquery"],function(s){return function(o){return function(e,t){var n=s.extend(!0,{},t);if(null==e.term||""===s.trim(e.term))return n;if(t.children){for(var i=t.children.length-1;0<=i;i--){var r=t.children[i];o(e.term,r.text,r)||n.children.splice(i,1)}if(0<n.children.length)return n}return o(e.term,t.text,t)?n:null}}}),e.define("select2/compat/query",[],function(){function e(e,t,n){n.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `query` option has been deprecated in favor of a custom data adapter that overrides the `query` method. Support will be removed for the `query` option in future versions of Select2."),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.callback=n,this.options.get("query").call(null,t)},e}),e.define("select2/dropdown/attachContainer",[],function(){function e(e,t,n){e.call(this,t,n)}return e.prototype.position=function(e,t,n){n.find(".dropdown-wrapper").append(t),t.addClass("select2-dropdown--below"),n.addClass("select2-container--below")},e}),e.define("select2/dropdown/stopPropagation",[],function(){function e(){}return e.prototype.bind=function(e,t,n){e.call(this,t,n);this.$dropdown.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),function(e){e.stopPropagation()})},e}),e.define("select2/selection/stopPropagation",[],function(){function e(){}return e.prototype.bind=function(e,t,n){e.call(this,t,n);this.$selection.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),function(e){e.stopPropagation()})},e}),l=function(p){var h,f,e=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],t="onwheel"in document||9<=document.documentMode?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],g=Array.prototype.slice;if(p.event.fixHooks)for(var n=e.length;n;)p.event.fixHooks[e[--n]]=p.event.mouseHooks;var m=p.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var e=t.length;e;)this.addEventListener(t[--e],i,!1);else this.onmousewheel=i;p.data(this,"mousewheel-line-height",m.getLineHeight(this)),p.data(this,"mousewheel-page-height",m.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=t.length;e;)this.removeEventListener(t[--e],i,!1);else this.onmousewheel=null;p.removeData(this,"mousewheel-line-height"),p.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var t=p(e),n=t["offsetParent"in p.fn?"offsetParent":"parent"]();return n.length||(n=p("body")),parseInt(n.css("fontSize"),10)||parseInt(t.css("fontSize"),10)||16},getPageHeight:function(e){return p(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function i(e){var t,n=e||window.event,i=g.call(arguments,1),r=0,o=0,s=0,a=0,l=0;if((e=p.event.fix(n)).type="mousewheel","detail"in n&&(s=-1*n.detail),"wheelDelta"in n&&(s=n.wheelDelta),"wheelDeltaY"in n&&(s=n.wheelDeltaY),"wheelDeltaX"in n&&(o=-1*n.wheelDeltaX),"axis"in n&&n.axis===n.HORIZONTAL_AXIS&&(o=-1*s,s=0),r=0===s?o:s,"deltaY"in n&&(r=s=-1*n.deltaY),"deltaX"in n&&(o=n.deltaX,0===s&&(r=-1*o)),0!==s||0!==o){if(1===n.deltaMode){var c=p.data(this,"mousewheel-line-height");r*=c,s*=c,o*=c}else if(2===n.deltaMode){var u=p.data(this,"mousewheel-page-height");r*=u,s*=u,o*=u}if(t=Math.max(Math.abs(s),Math.abs(o)),(!f||t<f)&&y(n,f=t)&&(f/=40),y(n,t)&&(r/=40,o/=40,s/=40),r=Math[1<=r?"floor":"ceil"](r/f),o=Math[1<=o?"floor":"ceil"](o/f),s=Math[1<=s?"floor":"ceil"](s/f),m.settings.normalizeOffset&&this.getBoundingClientRect){var d=this.getBoundingClientRect();a=e.clientX-d.left,l=e.clientY-d.top}return e.deltaX=o,e.deltaY=s,e.deltaFactor=f,e.offsetX=a,e.offsetY=l,e.deltaMode=0,i.unshift(e,r,o,s),h&&clearTimeout(h),h=setTimeout(v,200),(p.event.dispatch||p.event.handle).apply(this,i)}}function v(){f=null}function y(e,t){return m.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}p.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})},"function"==typeof e.define&&e.define.amd?e.define("jquery-mousewheel",["jquery"],l):"object"==typeof exports?module.exports=l:l(d),e.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(r,e,o,t,s){if(null==r.fn.select2){var a=["open","close","destroy"];r.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var e=r.extend(!0,{},t);new o(r(this),e)}),this;if("string"!=typeof t)throw new Error("Invalid arguments for Select2: "+t);var n,i=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=s.GetData(this,"select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),n=e[t].apply(e,i)}),-1<r.inArray(t,a)?this:n}}return null==r.fn.select2.defaults&&(r.fn.select2.defaults=t),o}),{define:e.define,require:e.require}}(),t=e.require("jquery.select2");return d.fn.select2.amd=e,t});
\ No newline at end of file
diff --git a/public/index.php b/public/index.php
new file mode 100644
index 0000000..e789459
--- /dev/null
+++ b/public/index.php
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<head>
+	<title>VNL Member Attendance Form</title>
+	<link rel="stylesheet" type="text/css" href="assets/css/bootstrap.min.css"/>
+</head>
+<body>
+	<div class="container">
+		<h1 class="text-center">VNL Member Attendance Form</h1>
+		<div>
+			<form>
+				<div class="mb-3">
+					<label for="full_name" class="form-label">Full Name</label>
+					<input type="text" class="form-control" id="full_name"/>
+				</div>
+				<div class="mb-3">
+					<label for="phone_number" class="form-label">Phone Number</label>
+					<input type="text" class="form-control" id="phone_number"/>
+				</div>
+				<div class="mb-3">
+					<label for="phone_number" class="form-label">City</label>
+					<select class="form-select" aria-label="Default select example">
+						<option value="" selected>Open this select menu</option>
+					</select>
+				</div>
+				<div class="mb-3">
+					<label for="email" class="form-label">Email address</label>
+					<input type="email" class="form-control" id="email"/>
+				</div>
+				<button type="submit" class="btn btn-primary">Submit</button>
+			</form>
+		</div>
+	</div>
+	<script type="text/javascript" src="assets/js/bootstrap.min.js"></script>
+</body>
+</html>
-- 
Ammar Faizi


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v1 02/13] Add regions.json
  2022-11-27 20:32 [PATCH v1 00/13] App for member attendance record at Senayan Park, Jakarta Ammar Faizi
  2022-11-27 20:32 ` [PATCH v1 01/13] Initial index page Ammar Faizi
@ 2022-11-27 20:32 ` Ammar Faizi
  2022-11-27 20:32 ` [PATCH v1 03/13] index: Integrate city data with the form Ammar Faizi
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Ammar Faizi @ 2022-11-27 20:32 UTC (permalink / raw)
  To: Gilang Fachrezy
  Cc: Ammar Faizi, Taufiq Pohan, Aldy Prastyo,
	Muhammad Fitrah Pandjalu, Nauvalsa Yanandana,
	GNU/Weeb Mailing List, VNLX Kernel Department

We will use this for select2 input.

Co-authored-by: Muhammad Fitrah Pandjalu <[email protected]>
Signed-off-by: Muhammad Fitrah Pandjalu <[email protected]>
Co-authored-by: Taufiq Pohan <[email protected]>
Signed-off-by: Taufiq Pohan <[email protected]>
Co-authored-by: Nauvalsa Yanandana <[email protected]>
Signed-off-by: Nauvalsa Yanandana <[email protected]>
Signed-off-by: Ammar Faizi <[email protected]>
---
 public/assets/regions.json | 718 +++++++++++++++++++++++++++++++++++++
 1 file changed, 718 insertions(+)
 create mode 100644 public/assets/regions.json

diff --git a/public/assets/regions.json b/public/assets/regions.json
new file mode 100644
index 0000000..433a502
--- /dev/null
+++ b/public/assets/regions.json
@@ -0,0 +1,718 @@
+[
+  {
+    "provinsi":"Aceh",
+    "kota":[
+      "Kota Banda Aceh",
+      "Kota Sabang",
+      "Kota Lhokseumawe",
+      "Kota Langsa",      
+      "Kota Subulussalam",
+      "Kab. Aceh Selatan",
+      "Kab. Aceh Tenggara",
+      "Kab. Aceh Timur",
+      "Kab. Aceh Tengah",
+      "Kab. Aceh Barat",
+      "Kab. Aceh Besar",
+      "Kab. Pidie",
+      "Kab. Aceh Utara",
+      "Kab. Simeulue",
+      "Kab. Aceh Singkil",
+      "Kab. Bireun",
+      "Kab. Aceh Barat Daya",
+      "Kab. Gayo Lues",
+      "Kab. Aceh Jaya",
+      "Kab. Nagan Raya",
+      "Kab. Aceh Tamiang",
+      "Kab. Bener Meriah",
+      "Kab. Pidie Jaya"
+    ]
+  },
+
+  {
+    "provinsi":"Sumatera Utara",
+    "kota":[      
+      "Kota Medan",
+      "Kota Pematang Siantar",
+      "Kota Sibolga",
+      "Kota Tanjung Balai",
+      "Kota Binjai",
+      "Kota Tebing Tinggi",
+      "Kota Padang Sidempuan",
+      "Kota Gunung Sitoli",
+      "Kab. Serdang Bedagai",
+      "Kab. Samosir ",
+      "Kab. Humbang Hasundutan",
+      "Kab. Pakpak Bharat",
+      "Kab. Nias Selatan",
+      "Kab. Mandailing Natal",
+      "Kab. Toba Samosir",
+      "Kab. Dairi",
+      "Kab. Labuhan Batu",
+      "Kab. Asahan",
+      "Kab. Simalungun",
+      "Kab. Deli Serdang",
+      "Kab. Karo",
+      "Kab. Langkat",
+      "Kab. Nias",
+      "Kab. Tapanuli Selatan",
+      "Kab. Tapanuli Utara",
+      "Kab. Tapanuli Tengah",
+      "Kab. Batu Bara",
+      "Kab. Padang Lawas Utara",
+      "Kab. Padang Lawas",
+      "Kab. Labuhanbatu Selatan",
+      "Kab. Labuhanbatu Utara",
+      "Kab. Nias Utara",
+      "Kab. Nias Barat"
+      ]
+  },
+
+  {
+    "provinsi":"Sumatera Barat",
+    "kota":[
+      "Kota Padang",
+      "Kota Solok",
+      "Kota Sawhlunto",
+      "Kota Padang Panjang",
+      "Kota Bukittinggi",
+      "Kota Payakumbuh",
+      "Kota Pariaman",
+      "Kab. Pasaman Barat",
+      "Kab. Solok Selatan",
+      "Kab. Dharmasraya",
+      "Kab. Kepulauan Mentawai",
+      "Kab. Pasaman",
+      "Kab. Lima Puluh Kota",
+      "Kab. Agam",
+      "Kab. Padang Pariaman",
+      "Kab. Tanah Datar",
+      "Kab. Sijunjung",
+      "Kab. Solok",
+      "Kab. Pesisir Selatan"
+    ]
+  },
+
+  {
+    "provinsi":"Riau",
+    "kota":[      
+      "Kota Pekan Baru",
+      "Kota Dumai",
+      "Kab. Kepulauan Meranti",
+      "Kab. Kuantan Singingi",
+      "Kab. Siak",
+      "Kab. Rokan Hilir",
+      "Kab. Rokan Hulu",
+      "Kab. Pelalawan",
+      "Kab. Indragiri Hilir",
+      "Kab. Bengkalis",
+      "Kab. Indragiri Hulu",
+      "Kab. Kampar"
+    ]
+  },
+
+  {
+    "provinsi":"Jambi",
+    "kota":[
+      "Kota Jambi",
+      "Kota Sungai Penuh",
+      "Kab. Tebo",
+      "Kab. Bungo",
+      "Kab. Tanjung Jabung Timur",
+      "Kab. Tanjung Jabung Barat",
+      "Kab. Muaro Jambi",
+      "Kab. Batanghari",
+      "Kab. Sarolangun",
+      "Kab. Merangin",
+      "Kab. Kerinci"
+    ]
+  },
+
+  {
+    "provinsi":"Sumatera Selatan",
+    "kota":[
+      "Kota Palembang",
+      "Kota Pagar Alam",
+      "Kota Lubuk Linggau",
+      "Kota Prabumulih",
+      "Kab. Musi Rawas Utara",
+      "Kab. Penukal Abab Lematang Ilir",
+      "Kab. Empat Lawang",
+      "Kab. Ogan Ilir ",
+      "Kab. Ogan Komering Ulu Selatan ",
+      "Kab. Ogan Komering Ulu Timur ",
+      "Kab. Banyuasin",
+      "Kab. Musi Banyuasin",
+      "Kab. Musi Rawas",
+      "Kab. Lahat",
+      "Kab. Muara Enim",
+      "Kab. Ogan Komering Ilir",
+      "Kab. Ogan Komering Ulu"
+    ]
+  },
+
+  {
+    "provinsi":"Bengkulu",
+    "kota":[
+      "Kota Bengkulu",
+      "Kab. Bengkulu Tengah",
+      "Kab. Kepahiang ",
+      "Kab. Lebong",
+      "Kab. Muko Muko",
+      "Kab. Seluma",
+      "Kab. Kaur",
+      "Kab. Bengkulu Utara",
+      "Kab. Rejang Lebong",
+      "Kab. Bengkulu Selatan"
+    ]
+  },
+
+  {
+    "provinsi":"Lampung",
+    "kota":[      
+      "Kota Bandar Lampung",
+      "Kota Metro",
+      "Kab. Pesisir Barat",
+      "Kab. Tulangbawang Barat",
+      "Kab. Mesuji",
+      "Kab. Pringsewu",
+      "Kab. Pesawaran",
+      "Kab. Way Kanan",
+      "Kab. Lampung Timur",
+      "Kab. Tanggamus",
+      "Kab. Tulang Bawang",
+      "Kab. Lampung Barat",
+      "Kab. Lampung Utara",
+      "Kab. Lampung Tengah",
+      "Kab. Lampung Selatan"
+    ]
+  },
+
+  {
+    "provinsi":"Kepulauan Bangka Belitung",
+    "kota":[
+      "Kota Pangkal Pinang",
+      "Kab. Belitung Timur",
+      "Kab. Bangka Barat",
+      "Kab. Bangka Tengah",
+      "Kab. Bangka Selatan",
+      "Kab. Belitung",
+      "Kab. Bangka"
+    ]
+  },
+  
+  {
+    "provinsi":"Kepulauan Riau",
+    "kota":[
+      "Kota Batam",
+      "Kota Tanjung Pinang",
+      "Kab. Kepulauan Anambas",
+      "Kab. Lingga ",
+      "Kab. Natuna",
+      "Kab. Karimun",
+      "Kab. Bintan"
+    ]
+  },
+
+  {
+    "provinsi":"DKI Jakarta",
+    "kota":[
+      "Kota Jakarta Timur",
+      "Kota Jakarta Selatan",
+      "Kota Jakarta Barat",
+      "Kota Jakarta Utara",
+      "Kota Jakarta Pusat",
+      "Kab. Kepulauan Seribu"
+    ]
+  },
+
+  {
+    "provinsi":"Jawa Barat",
+    "kota":[
+      "Kota Bandung",
+      "Kota Banjar",
+      "Kota Tasikmalaya",
+      "Kota Cimahi",
+      "Kota Depok",
+      "Kota Bekasi",
+      "Kota Cirebon",      
+      "Kota Sukabumi",
+      "Kota Bogor",
+      "Kab. Pangandaran",
+      "Kab. Bandung Barat",
+      "Kab. Bekasi",
+      "Kab. Karawang",
+      "Kab. Purwakarta",
+      "Kab. Subang",
+      "Kab. Indramayu",
+      "Kab. Sumedang",
+      "Kab. Majalengka",
+      "Kab. Cirebon",
+      "Kab. Kuningan",
+      "Kab. Ciamis",
+      "Kab. Tasikmalaya",
+      "Kab. Garut",
+      "Kab. Bandung",
+      "Kab. Cianjur",
+      "Kab. Sukabumi",
+      "Kab. Bogor"
+    ]
+  },
+
+  {
+    "provinsi":"Jawa Tengah",
+    "kota":[
+      "Kota Semarang",
+      "Kota Tegal",
+      "Kota Pekalongan",      
+      "Kota Salatiga",
+      "Kota Surakarta",
+      "Kota Magelang",
+      "Kab. Brebes",
+      "Kab. Tegal",
+      "Kab. Pemalang",
+      "Kab. Pekalongan",
+      "Kab. Batang",
+      "Kab. Kendal",
+      "Kab. Temanggung",
+      "Kab. Semarang",
+      "Kab. Demak",
+      "Kab. Jepara",
+      "Kab. Kudus",
+      "Kab. Pati",
+      "Kab. Rembang",
+      "Kab. Blora",
+      "Kab. Grobogan",
+      "Kab. Sragen",
+      "Kab. Karanganyar",
+      "Kab. Wonogiri",
+      "Kab. Sukoharjo",
+      "Kab. Klaten",
+      "Kab. Boyolali",
+      "Kab. Magelang",
+      "Kab. Wonosobo",
+      "Kab. Purworejo",
+      "Kab. Kebumen",
+      "Kab. Banjarnegara",
+      "Kab. Purbalingga",
+      "Kab. Banyumas",
+      "Kab. Cilacap"
+    ]
+  },
+
+  {
+    "provinsi":"DI Yogyakarta",
+    "kota":[
+      "Kota Yogyakarta",
+      "Kab. Sleman",
+      "Kab. Gunung Kidul",
+      "Kab. Bantul",
+      "Kab. Kulon Progo"
+    ]
+  },
+
+  {
+    "provinsi":"Jawa Timur",
+    "kota":[
+      "Kota Surabaya",
+      "Kota Batu",      
+      "Kota Madiun",
+      "Kota Mojokerto",
+      "Kota Pasuruan",
+      "Kota Probolinggo",
+      "Kota Malang",
+      "Kota Blitar",
+      "Kota Kediri",
+      "Kab. Sumenep",
+      "Kab. Pamekasan",
+      "Kab. Sampang",
+      "Kab. Bangkalan",
+      "Kab. Gresik",
+      "Kab. Lamongan",
+      "Kab. Tuban",
+      "Kab. Bojonegoro",
+      "Kab. Ngawi",
+      "Kab. Magetan",
+      "Kab. Madiun",
+      "Kab. Nganjuk",
+      "Kab. Jombang",
+      "Kab. Mojokerto",
+      "Kab. Sidoarjo",
+      "Kab. Pasuruan",
+      "Kab. Probolinggo",
+      "Kab. Situbondo",
+      "Kab. Bondowoso",
+      "Kab. Banyuwangi",
+      "Kab. Jember",
+      "Kab. Lumajang",
+      "Kab. Malang",
+      "Kab. Kediri",
+      "Kab. Blitar",
+      "Kab. Tulungagung",
+      "Kab. Trenggalek",
+      "Kab. Ponorogo",
+      "Kab. Pacitan"
+    ]
+  },
+
+  {
+    "provinsi":"Banten",
+    "kota":[
+      "Kota Serang",
+      "Kota Cilegon",
+      "Kota Tangerang",
+      "Kota Tangerang Selatan",
+      "Kab. Serang",
+      "Kab. Tangerang",
+      "Kab. Lebak",
+      "Kab. Pandeglang"
+    ]
+  },
+
+  {
+    "provinsi":"Bali",
+    "kota":[
+      "Kota Denpasar",
+      "Kab. Buleleng",
+      "Kab. Karangasem",
+      "Kab. Bangli",
+      "Kab. Klungkung",
+      "Kab. Gianyar",
+      "Kab. Badung",
+      "Kab. Tabanan",
+      "Kab. Jembrana"
+    ]
+  },
+
+  {
+    "provinsi":"Nusa Tenggara Barat",
+    "kota":[
+      "Kota Mataram",
+      "Kota Bima",
+      "Kab. Lombok Utara",  
+      "Kab. Sumbawa Barat",
+      "Kab. Bima",
+      "Kab. Dompu",
+      "Kab. Sumbawa ",
+      "Kab. Lombok Timur",
+      "Kab. Lombok Tengah",
+      "Kab. Lombok Barat"
+    ]
+  },
+
+  {
+    "provinsi":"Nusa Tenggara Timur",
+    "kota":[
+      "Kota Kupang",
+      "Kab. Malaka",
+      "Kab. Sabu Raijua",
+      "Kab. Manggarai Timur",
+      "Kab. Sumba Barat Daya",
+      "Kab. Sumba Tengah",
+      "Kab. Nagekeo",
+      "Kab. Manggarai Barat",
+      "Kab. Rote Ndao",
+      "Kab. Lembata",
+      "Kab. Sumba Barat",
+      "Kab. Sumba Timur",
+      "Kab. Manggarai",
+      "Kab. Ngada",
+      "Kab. Ende",
+      "Kab. Sikka",
+      "Kab. Flores Timur",
+      "Kab. Alor",
+      "Kab. Belu",
+      "Kab. Timor Tengah Utara",
+      "Kab. Timor Tengah Selatan",
+      "Kab. Kupang"
+    ]
+  },
+  {
+    "provinsi":"Kalimantan Barat",
+    "kota":[
+      "Kota Pontianak",
+      "Kota Singkawang",
+      "Kab. Kubu Raya",
+      "Kab. Kayong Utara",
+      "Kab. Sekadau",
+      "Kab. Melawi",
+      "Kab. Landak",
+      "Kab. Bengkayang",
+      "Kab. Kapuas Hulu",
+      "Kab. Sintang ",
+      "Kab. Ketapang",
+      "Kab. Sanggau ",
+      "Kab. Mempawah",
+      "Kab. Sambas"
+    ]
+  },
+
+  {
+    "provinsi":"Kalimantan Tengah",
+    "kota":[
+      "Kota Palangkaraya",
+      "Kab. Barito Timur",
+      "Kab. Murung Raya",
+      "Kab. Pulang Pisau",
+      "Kab. Gunung Mas",
+      "Kab. Lamandau",
+      "Kab. Sukamara",
+      "Kab. Seruyan",
+      "Kab. Katingan",
+      "Kab. Barito Utara",
+      "Kab. Barito Selatan",
+      "Kab. Kapuas",
+      "Kab. Kotawaringin Timur",
+      "Kab. Kotawaringin Barat"
+    ]
+  },
+
+  {
+    "provinsi":"Kalimantan Selatan",
+    "kota":[
+      "Kota Banjarmasin",
+      "Kota Banjarbaru",      
+      "Kab. Balangan",
+      "Kab. Tanah Bambu",
+      "Kab. Tabalong",
+      "Kab. Hulu Sungai Utara",
+      "Kab. Hulu Sungai Tengah",
+      "Kab. Hulu Sungai Selatan",
+      "Kab. Tapin",
+      "Kab. Barito Kuala",
+      "Kab. Banjar",
+      "Kab. Kotabaru",
+      "Kab. Tanah Laut"
+    ]
+  },
+
+  {
+    "provinsi":"Kalimantan Timur",
+    "kota":[
+      "Kota Samarinda",
+      "Kota Bontang",
+      "Kota Balikpapan",
+      "Kab. Mahakam Ulu",
+      "Kab. Penajam Paser Utara",
+      "Kab. Kutai Timur",
+      "Kab. Kutai Barat",
+      "Kab. Berau",
+      "Kab. Kutai Kertanegara",
+      "Kab. Paser"
+    ]
+  },
+
+  {
+    "provinsi":"Kalimantan Utara",
+    "kota":[
+      "Kota Tarakan",
+      "Kab. Tana Tidung",
+      "Kab. Nunukan",
+      "Kab. Malinau",
+      "Kab. Bulungan"
+    ]
+  },
+
+  {
+    "provinsi":"Sulawesi Utara",
+    "kota":[
+      "Kota Manado",
+      "Kota Tomohon",
+      "Kota Bitung",
+      "Kota Kotamobagu",
+      "Kab. Bolaang Mangondow Selatan",
+      "Kab. Bolaang Mangondow Timur",
+      "Kab. Kepulauan Siau Tagulandang Biaro",
+      "Kab. Bolaang Mangondow Utara",
+      "Kab. Minahasa Tenggara",
+      "Kab. Minahasa Utara",
+      "Kab. Minahasa Selatan",
+      "Kab. Kepulauan Talaud",
+      "Kab. Kepulauan Sangihe",
+      "Kab. Minahasa",
+      "Kab. Bolaang Mangondow"
+    ]
+  },
+
+  {
+    "provinsi":"Sulawesi Tengah",
+    "kota":[
+      "Kota Palu",
+      "Kab. Morowali Utara",
+      "Kab. Banggai Laut",
+      "Kab. Sigi",
+      "Kab. Tojo Una-Una",
+      "Kab. Parigi Moutong",
+      "Kab. Banggai Kepulauan",
+      "Kab. Morowali",
+      "Kab. Buol",
+      "Kab. Toli-Toli",
+      "Kab. Donggala",
+      "Kab. Poso",
+      "Kab. Banggai"
+    ]
+  },
+
+  {
+    "provinsi":"Sulawesi Selatan",
+    "kota":[
+      "Kota Makasar",
+      "Kota Palopo",
+      "Kota Pare Pare", 
+      "Kab. Toraja Utara",     
+      "Kab. Luwu Timur",
+      "Kab. Luwu Utara",
+      "Kab. Tana Toraja",
+      "Kab. Luwu",
+      "Kab. Enrekang",
+      "Kab. Pinrang",
+      "Kab. Sidenreng Rappang",
+      "Kab. Wajo",
+      "Kab. Soppeng",
+      "Kab. Barru",
+      "Kab. Pangkajene Kepulauan",
+      "Kab. Maros",
+      "Kab. Bone",
+      "Kab. Sinjai",
+      "Kab. Gowa",
+      "Kab. Takalar",
+      "Kab. Jeneponto",
+      "Kab. Bantaeng",
+      "Kab. Bulukumba",
+      "Kab. Kepulauan Selayar"
+    ]
+  },
+
+  {
+    "provinsi":"Sulawesi Tenggara",
+    "kota":[
+      "Kota Kendari",
+      "Kota Bau Bau",
+      "Kab. Buton Selatan",
+      "Kab. Buton Tengah",
+      "Kab. Muna Barat",
+      "Kab. Konawe Kepulauan",
+      "Kab. Kolaka Timur",
+      "Kab. Buton Utara",
+      "Kab. Konawe Utara",
+      "Kab. Kolaka Utara",
+      "Kab. Wakatobi",
+      "Kab. Bombana",
+      "Kab. Konawe Selatan",
+      "Kab. Buton",
+      "Kab. Muna",
+      "Kab. Konawe",
+      "Kab. Kolaka"
+    ]
+  },
+
+  {
+    "provinsi":"Gorontalo",
+    "kota":[
+      "Kota Gorontalo",
+      "Kab. Pohuwato",
+      "Kab. Bone Bolango",
+      "Kab. Boalemo",
+      "Kab. Gorontalo",
+      "Kab. Gorontalo Utara"
+    ]
+  },
+
+  {
+    "provinsi":"Sulawesi Barat",
+    "kota":[
+      "Kab. Majene",
+      "Kab. Polowali Mandar",
+      "Kab. Mamasa",
+      "Kab. Mamuju",
+      "Kab. Mamuju Utara",
+      "Kab. Mamuju Tengah"
+    ]
+  },
+
+  {
+    "provinsi":"Maluku",
+    "kota":[
+      "Kota Ambon",
+      "Kota Tual",
+      "Kab. Buru Selatan",
+      "Kab. Maluku Barat Daya",
+      "Kab. Kepulauan Aru",
+      "Kab. Seram Bagian Barat ",
+      "Kab. Seram Bagian Timur",
+      "Kab. Buru",      
+      "Kab. Maluku Tenggara Barat",
+      "Kab. Maluku Tenggara",
+      "Kab. Maluku Tengah"
+    ]
+  },
+
+  {
+    "provinsi":"Maluku Utara",
+    "kota":[
+      "Kota Ternate",
+      "Kota Tidore Kepulauan",
+      "Kab. Pulau Taliabu",
+      "Kab. Pulau Morotai",
+      "Kab. Halmahera Timur",
+      "Kab. Kepulauan Sula",
+      "Kab. Halmahera Selatan",
+      "Kab. Halmahera Utara",
+      "Kab. Halmahera Tengah",
+      "Kab. Halmahera Barat"
+    ]
+  },
+
+  {
+    "provinsi":"Papua",
+    "kota":[
+      "Kota Jayapura",
+      "Kab. Deiyai",
+      "Kab. Intan Jaya",
+      "Kab. Dogiyai",
+      "Kab. Puncak",
+      "Kab. Nduga",
+      "Kab. Lanny Jaya",
+      "Kab. Yalimo",
+      "Kab. Mamberamo Tengah",
+      "Kab. Mamberamo Raya",
+      "Kab. Supiori",
+      "Kab. Asmat",
+      "Kab. Mappi",
+      "Kab. Boven Digoel",
+      "Kab. Waropen",
+      "Kab. Tolikara",
+      "Kab. Yahukimo",
+      "Kab. Pegunungan Bintang",
+      "Kab. Keerom",
+      "Kab. Sarmi",
+      "Kab. Mimika",
+      "Kab. Paniai",
+      "Kab. Puncak Jaya",
+      "Kab. Biak Numfor",
+      "Kab. Kepulauan Yapen",
+      "Kab. Nabire",
+      "Kab. Jayapura",
+      "Kab. Jayawijaya",
+      "Kab. Merauke"
+    ]
+  },
+
+  {
+    "provinsi":"Papua Barat",
+    "kota":[
+      "Kota Sorong",      
+      "Kab. Pegunungan Arfak",
+      "Kab. Manokwari Selatan",
+      "Kab. Maybrat",
+      "Kab. Tambrauw",
+      "Kab. Kaimana",
+      "Kab. Teluk Wondama",
+      "Kab. Teluk Bintuni",
+      "Kab. Raja Ampat",
+      "Kab. Sorong Selatan",
+      "Kab. Fak Fak",
+      "Kab. Manokwari",
+      "Kab. Sorong"
+    ]
+  }
+]
-- 
Ammar Faizi


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v1 03/13] index: Integrate city data with the form
  2022-11-27 20:32 [PATCH v1 00/13] App for member attendance record at Senayan Park, Jakarta Ammar Faizi
  2022-11-27 20:32 ` [PATCH v1 01/13] Initial index page Ammar Faizi
  2022-11-27 20:32 ` [PATCH v1 02/13] Add regions.json Ammar Faizi
@ 2022-11-27 20:32 ` Ammar Faizi
  2022-11-27 20:32 ` [PATCH v1 04/13] index: Add social media accounts input Ammar Faizi
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Ammar Faizi @ 2022-11-27 20:32 UTC (permalink / raw)
  To: Gilang Fachrezy
  Cc: Ammar Faizi, Taufiq Pohan, Aldy Prastyo,
	Muhammad Fitrah Pandjalu, Nauvalsa Yanandana,
	GNU/Weeb Mailing List, VNLX Kernel Department

This allows the user to choose the city via select input with
search feature.

Co-authored-by: Muhammad Fitrah Pandjalu <[email protected]>
Signed-off-by: Muhammad Fitrah Pandjalu <[email protected]>
Co-authored-by: Taufiq Pohan <[email protected]>
Signed-off-by: Taufiq Pohan <[email protected]>
Co-authored-by: Nauvalsa Yanandana <[email protected]>
Signed-off-by: Nauvalsa Yanandana <[email protected]>
Signed-off-by: Ammar Faizi <[email protected]>
---
 public/assets/js/jquery-3.6.1.min.js |    2 +
 public/assets/regions.json           | 2946 +++++++++++++++++++-------
 public/index.php                     |   23 +-
 3 files changed, 2250 insertions(+), 721 deletions(-)
 create mode 100644 public/assets/js/jquery-3.6.1.min.js

diff --git a/public/assets/js/jquery-3.6.1.min.js b/public/assets/js/jquery-3.6.1.min.js
new file mode 100644
index 0000000..2c69bc9
--- /dev/null
+++ b/public/assets/js/jquery-3.6.1.min.js
@@ -0,0 +1,2 @@
+/*! jQuery v3.6.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */
+!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,y=n.hasOwnProperty,a=y.toString,l=a.call(Object),v={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:f,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(n){return this.pushStack(S.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},S.extend=S.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=y.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(p(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?S.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:v}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=t[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,y,s,c,v,S="sizzle"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(),A=ue(),N=ue(),j=function(e,t){return e===t&&(l=!0),0},D={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",F=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",$=new RegExp(M+"+","g"),B=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&v(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!y||!y.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ve(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ye(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ve(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],y=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="<a id='"+S+"'></a><select id='"+S+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||y.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||y.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||y.push(".#.+[+~]"),e.querySelectorAll("\\\f"),y.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),y=y.length&&new RegExp(y.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),v=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&v(p,e)?-1:t==C||t.ownerDocument==p&&v(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!y||!y.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0<se(t,C,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!=C&&T(e),v(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&D.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(j),l){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1)}return u=null,e},o=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else while(t=e[r++])n+=o(t);return n},(b=se.selectors={cacheLength:50,createPseudo:le,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace($," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,y){var v="nth"!==h.slice(0,3),m="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===y?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=v!==m?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(v){while(l){a=e;while(a=a[l])if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&p){d=(s=(r=(i=(o=(a=c)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1])&&r[2],a=s&&c.childNodes[s];while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if(1===a.nodeType&&++d&&a===e){i[h]=[k,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1]),!1===d)while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if((x?a.nodeName.toLowerCase()===f:1===a.nodeType)&&++d&&(p&&((i=(o=a[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[k,d]),a===e))break;return(d-=y)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return a[S]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=P(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:le(function(e){var r=[],i=[],s=f(e.replace(B,"$1"));return s[S]?le(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:le(function(t){return function(e){return 0<se(t,e).length}}),contains:le(function(t){return t=t.replace(te,ne),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),lang:le(function(n){return V.test(n||"")||se.error("unsupported lang: "+n),n=n.replace(te,ne).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ye(function(){return[0]}),last:ye(function(e,t){return[t-1]}),eq:ye(function(e,t,n){return[n<0?n+t:n]}),even:ye(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ye(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ye(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ye(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=de(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=he(e);function me(){}function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function be(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){while(e=e[u])if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[k,p];if(n){while(e=e[u])if((1===e.nodeType||f)&&s(e,t,n))return!0}else while(e=e[u])if(1===e.nodeType||f)if(i=(o=e[S]||(e[S]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===k&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function we(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Ce(d,h,g,y,v,e){return y&&!y[S]&&(y=Ce(y)),v&&!v[S]&&(v=Ce(v,e)),le(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:Te(c,s,d,n,r),p=g?v||(e?d:l||y)?[]:t:f;if(g&&g(f,p,n,r),y){i=Te(p,u),y(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a))}if(e){if(v||d){if(v){i=[],o=p.length;while(o--)(a=p[o])&&i.push(f[o]=a);v(null,p=[],i,r)}o=p.length;while(o--)(a=p[o])&&-1<(i=v?P(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=Te(p===t?p.splice(l,p.length):p),v?v(null,t,p,r):H.apply(t,p)})}function Ee(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=be(function(e){return e===i},a,!0),l=be(function(e){return-1<P(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[be(we(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[S]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return Ce(1<s&&we(c),1<s&&xe(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(B,"$1"),t,s<n&&Ee(e.slice(s,n)),n<r&&Ee(e=e.slice(n)),n<r&&xe(e))}c.push(t)}return we(c)}return me.prototype=b.filters=b.pseudos,b.setFilters=new me,h=se.tokenize=function(e,t){var n,r,i,o,a,s,u,l=x[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=_.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=z.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace(B," ")}),a=a.slice(n.length)),b.filter)!(r=G[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?se.error(e):x(e,s).slice(0)},f=se.compile=function(e,t){var n,y,v,m,x,r,i=[],o=[],a=A[e+" "];if(!a){t||(t=h(e)),n=t.length;while(n--)(a=Ee(t[n]))[S]?i.push(a):o.push(a);(a=A(e,(y=o,m=0<(v=i).length,x=0<y.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=k+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==C||(T(o),n=!E);while(s=y[a++])if(s(o,t||C,n)){r.push(o);break}i&&(k=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=v[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=q.call(r));f=Te(f)}H.apply(r,f),i&&!e&&0<f.length&&1<u+v.length&&se.uniqueSort(r)}return i&&(k=h,w=p),c},m?le(r):r))).selector=e}return a},g=se.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,ne),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=G.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(te,ne),ee.test(o[0].type)&&ve(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return H.apply(n,r),n;break}}}return(l||f(e,c))(r,t,!E,n,!t||ee.test(e)&&ve(t.parentNode)||t),n},d.sortStable=S.split("").sort(j).join("")===S,d.detectDuplicates=!!l,T(),d.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(C.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),d.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(C);S.find=d,S.expr=d.selectors,S.expr[":"]=S.expr.pseudos,S.uniqueSort=S.unique=d.uniqueSort,S.text=d.getText,S.isXMLDoc=d.isXML,S.contains=d.contains,S.escapeSelector=d.escape;var h=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&S(e).is(n))break;r.push(e)}return r},T=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},k=S.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1<i.call(n,e)!==r}):S.filter(n,e,r)}S.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?S.find.matchesSelector(r,e)?[r]:[]:S.find.matches(e,S.grep(t,function(e){return 1===e.nodeType}))},S.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(S(e).filter(function(){for(t=0;t<r;t++)if(S.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)S.find(e,i[t],n);return 1<r?S.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&k.test(e)?S(e):e||[],!1).length}});var D,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(S.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&S(e);if(!k.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&S.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?S.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(S(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return h(e,"parentNode")},parentsUntil:function(e,t,n){return h(e,"parentNode",n)},next:function(e){return O(e,"nextSibling")},prev:function(e){return O(e,"previousSibling")},nextAll:function(e){return h(e,"nextSibling")},prevAll:function(e){return h(e,"previousSibling")},nextUntil:function(e,t,n){return h(e,"nextSibling",n)},prevUntil:function(e,t,n){return h(e,"previousSibling",n)},siblings:function(e){return T((e.parentNode||{}).firstChild,e)},children:function(e){return T(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(A(e,"template")&&(e=e.content||e),S.merge([],e.childNodes))}},function(r,i){S.fn[r]=function(e,t){var n=S.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=S.filter(t,n)),1<this.length&&(H[r]||S.uniqueSort(n),L.test(r)&&n.reverse()),this.pushStack(n)}});var P=/[^\x20\t\r\n\f]+/g;function R(e){return e}function M(e){throw e}function I(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}S.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},S.each(e.match(P)||[],function(e,t){n[t]=!0}),n):S.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){S.each(e,function(e,t){m(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==w(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return S.each(arguments,function(e,t){var n;while(-1<(n=S.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<S.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},S.extend({Deferred:function(e){var o=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return S.Deferred(function(r){S.each(o,function(e,t){var n=m(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&m(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,m(t)?s?t.call(e,l(u,o,R,s),l(u,o,M,s)):(u++,t.call(e,l(u,o,R,s),l(u,o,M,s),l(u,o,R,o.notifyWith))):(a!==R&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==M&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(S.Deferred.getStackHook&&(t.stackTrace=S.Deferred.getStackHook()),C.setTimeout(t))}}return S.Deferred(function(e){o[0][3].add(l(0,e,m(r)?r:R,e.notifyWith)),o[1][3].add(l(0,e,m(t)?t:R)),o[2][3].add(l(0,e,m(n)?n:M))}).promise()},promise:function(e){return null!=e?S.extend(e,a):a}},s={};return S.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=s.call(arguments),o=S.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?s.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(I(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||m(i[t]&&i[t].then)))return o.then();while(t--)I(i[t],a(t),o.reject);return o.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&W.test(e.name)&&C.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},S.readyException=function(e){C.setTimeout(function(){throw e})};var F=S.Deferred();function $(){E.removeEventListener("DOMContentLoaded",$),C.removeEventListener("load",$),S.ready()}S.fn.ready=function(e){return F.then(e)["catch"](function(e){S.readyException(e)}),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0)!==e&&0<--S.readyWait||F.resolveWith(E,[S])}}),S.ready.then=F.then,"complete"===E.readyState||"loading"!==E.readyState&&!E.documentElement.doScroll?C.setTimeout(S.ready):(E.addEventListener("DOMContentLoaded",$),C.addEventListener("load",$));var B=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===w(n))for(s in i=!0,n)B(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(S(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},_=/^-ms-/,z=/-([a-z])/g;function U(e,t){return t.toUpperCase()}function X(e){return e.replace(_,"ms-").replace(z,U)}var V=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function G(){this.expando=S.expando+G.uid++}G.uid=1,G.prototype={cache:function(e){var t=e[this.expando];return t||(t={},V(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[X(t)]=n;else for(r in t)i[X(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][X(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(X):(t=X(t))in r?[t]:t.match(P)||[]).length;while(n--)delete r[t[n]]}(void 0===t||S.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!S.isEmptyObject(t)}};var Y=new G,Q=new G,J=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,K=/[A-Z]/g;function Z(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(K,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:J.test(i)?JSON.parse(i):i)}catch(e){}Q.set(e,t,n)}else n=void 0;return n}S.extend({hasData:function(e){return Q.hasData(e)||Y.hasData(e)},data:function(e,t,n){return Q.access(e,t,n)},removeData:function(e,t){Q.remove(e,t)},_data:function(e,t,n){return Y.access(e,t,n)},_removeData:function(e,t){Y.remove(e,t)}}),S.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=Q.get(o),1===o.nodeType&&!Y.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=X(r.slice(5)),Z(o,r,i[r]));Y.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){Q.set(this,n)}):B(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=Q.get(o,n))?t:void 0!==(t=Z(o,n))?t:void 0;this.each(function(){Q.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){Q.remove(this,e)})}}),S.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.access(e,t,S.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=S.queue(e,t),r=n.length,i=n.shift(),o=S._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){S.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Y.get(e,n)||Y.access(e,n,{empty:S.Callbacks("once memory").add(function(){Y.remove(e,[t+"queue",n])})})}}),S.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?S.queue(this[0],t):void 0===n?this:this.each(function(){var e=S.queue(this,t,n);S._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&S.dequeue(this,t)})},dequeue:function(e){return this.each(function(){S.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=S.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=Y.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),ne=["Top","Right","Bottom","Left"],re=E.documentElement,ie=function(e){return S.contains(e.ownerDocument,e)},oe={composed:!0};re.getRootNode&&(ie=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(oe)===e.ownerDocument});var ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ie(e)&&"none"===S.css(e,"display")};function se(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return S.css(e,t,"")},u=s(),l=n&&n[3]||(S.cssNumber[t]?"":"px"),c=e.nodeType&&(S.cssNumber[t]||"px"!==l&&+u)&&te.exec(S.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)S.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,S.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ue={};function le(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Y.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ae(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ue[s])||(o=a.body.appendChild(a.createElement(s)),u=S.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ue[s]=u)))):"none"!==n&&(l[c]="none",Y.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}S.fn.extend({show:function(){return le(this,!0)},hide:function(){return le(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?S(this).show():S(this).hide()})}});var ce,fe,pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),v.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="<textarea>x</textarea>",v.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="<option></option>",v.option=!!ce.lastChild;var ge={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],"globalEval",!t||Y.get(t[n],"globalEval"))}ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td,v.option||(ge.optgroup=ge.option=[1,"<select multiple='multiple'>","</select>"]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===w(o))S.merge(p,o.nodeType?[o]:o);else if(me.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+S.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;S.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<S.inArray(o,r))i&&i.push(o);else if(l=ie(o),a=ye(f.appendChild(o),"script"),l&&ve(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}var be=/^([^.]*)(?:\.(.+)|)/;function we(){return!0}function Te(){return!1}function Ce(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ee(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ee(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Te;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return S().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=S.guid++)),e.each(function(){S.event.add(this,t,i,r,n)})}function Se(e,i,o){o?(Y.set(e,i,!1),S.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Y.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(S.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Y.set(this,i,r),t=o(this,i),this[i](),r!==(n=Y.get(this,i))||t?Y.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n&&n.value}else r.length&&(Y.set(this,i,{value:S.event.trigger(S.extend(r[0],S.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,i)&&S.event.add(e,i,we)}S.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=Y.get(t);if(V(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&S.find.matchesSelector(re,i),n.guid||(n.guid=S.guid++),(u=y.events)||(u=y.events=Object.create(null)),(a=y.handle)||(a=y.handle=function(e){return"undefined"!=typeof S&&S.event.triggered!==e.type?S.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(P)||[""]).length;while(l--)d=g=(s=be.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=S.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=S.event.special[d]||{},c=S.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&S.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),S.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=Y.hasData(e)&&Y.get(e);if(y&&(u=y.events)){l=(t=(t||"").match(P)||[""]).length;while(l--)if(d=g=(s=be.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=S.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,y.handle)||S.removeEvent(e,d,y.handle),delete u[d])}else for(d in u)S.event.remove(e,d+t[l],n,r,!0);S.isEmptyObject(u)&&Y.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=S.event.fix(e),l=(Y.get(this,"events")||Object.create(null))[u.type]||[],c=S.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=S.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((S.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<S(i,this).index(l):S.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(S.Event.prototype,t,{enumerable:!0,configurable:!0,get:m(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[S.expando]?e:new S.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Se(t,"click",we),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Se(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&A(t,"input")&&Y.get(t,"click")||A(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},S.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?we:Te,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:Te,isPropagationStopped:Te,isImmediatePropagationStopped:Te,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=we,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=we,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=we,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},S.event.addProp),S.each({focus:"focusin",blur:"focusout"},function(t,e){S.event.special[t]={setup:function(){return Se(this,t,Ce),!1},trigger:function(){return Se(this,t),!0},_default:function(e){return Y.get(e.target,t)},delegateType:e}}),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){S.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||S.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),S.fn.extend({on:function(e,t,n,r){return Ee(this,e,t,n,r)},one:function(e,t,n,r){return Ee(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,S(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Te),this.each(function(){S.event.remove(this,e,n,t)})}});var ke=/<script|<style|<link/i,Ae=/checked\s*(?:[^=]|=\s*.checked.)/i,Ne=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)S.event.add(t,i,s[i][n]);Q.hasData(e)&&(o=Q.access(e),a=S.extend({},o),Q.set(t,a))}}function He(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=m(d);if(h||1<f&&"string"==typeof d&&!v.checkClone&&Ae.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),He(t,r,i,o)});if(f&&(t=(e=xe(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=S.map(ye(e,"script"),De)).length;c<f;c++)u=e,c!==p&&(u=S.clone(u,!0,!0),s&&S.merge(a,ye(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,S.map(a,qe),c=0;c<s;c++)u=a[c],he.test(u.type||"")&&!Y.access(u,"globalEval")&&S.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?S._evalUrl&&!u.noModule&&S._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):b(u.textContent.replace(Ne,""),u,l))}return n}function Oe(e,t,n){for(var r,i=t?S.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||S.cleanData(ye(r)),r.parentNode&&(n&&ie(r)&&ve(ye(r,"script")),r.parentNode.removeChild(r));return e}S.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=ie(e);if(!(v.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(a=ye(c),r=0,i=(o=ye(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&pe.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ye(e),a=a||ye(c),r=0,i=o.length;r<i;r++)Le(o[r],a[r]);else Le(e,c);return 0<(a=ye(c,"script")).length&&ve(a,!f&&ye(e,"script")),c},cleanData:function(e){for(var t,n,r,i=S.event.special,o=0;void 0!==(n=e[o]);o++)if(V(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?S.event.remove(n,r):S.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),S.fn.extend({detach:function(e){return Oe(this,e,!0)},remove:function(e){return Oe(this,e)},text:function(e){return B(this,function(e){return void 0===e?S.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return He(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||je(this,e).appendChild(e)})},prepend:function(){return He(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=je(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return He(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return He(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(S.cleanData(ye(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return S.clone(this,e,t)})},html:function(e){return B(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!ke.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(S.cleanData(ye(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return He(this,arguments,function(e){var t=this.parentNode;S.inArray(this,n)<0&&(S.cleanData(ye(this)),t&&t.replaceChild(e,this))},n)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){S.fn[e]=function(e){for(var t,n=[],r=S(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),S(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var Pe=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Re=/^--/,Me=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},Ie=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},We=new RegExp(ne.join("|"),"i"),Fe="[\\x20\\t\\r\\n\\f]",$e=new RegExp("^"+Fe+"+|((?:^|[^\\\\])(?:\\\\.)*)"+Fe+"+$","g");function Be(e,t,n){var r,i,o,a,s=Re.test(t),u=e.style;return(n=n||Me(e))&&(a=n.getPropertyValue(t)||n[t],s&&(a=a.replace($e,"$1")),""!==a||ie(e)||(a=S.style(e,t)),!v.pixelBoxStyles()&&Pe.test(a)&&We.test(t)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=n.width,u.width=r,u.minWidth=i,u.maxWidth=o)),void 0!==a?a+"":a}function _e(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",re.appendChild(u).appendChild(l);var e=C.getComputedStyle(l);n="1%"!==e.top,s=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),r=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),re.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=E.createElement("div"),l=E.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",v.clearCloneStyle="content-box"===l.style.backgroundClip,S.extend(v,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=E.createElement("table"),t=E.createElement("tr"),n=E.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",re.appendChild(e).appendChild(t).appendChild(n),r=C.getComputedStyle(t),a=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===t.offsetHeight,re.removeChild(e)),a}}))}();var ze=["Webkit","Moz","ms"],Ue=E.createElement("div").style,Xe={};function Ve(e){var t=S.cssProps[e]||Xe[e];return t||(e in Ue?e:Xe[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=ze.length;while(n--)if((e=ze[n]+t)in Ue)return e}(e)||e)}var Ge=/^(none|table(?!-c[ea]).+)/,Ye={position:"absolute",visibility:"hidden",display:"block"},Qe={letterSpacing:"0",fontWeight:"400"};function Je(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Ke(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=S.css(e,n+ne[a],!0,i)),r?("content"===n&&(u-=S.css(e,"padding"+ne[a],!0,i)),"margin"!==n&&(u-=S.css(e,"border"+ne[a]+"Width",!0,i))):(u+=S.css(e,"padding"+ne[a],!0,i),"padding"!==n?u+=S.css(e,"border"+ne[a]+"Width",!0,i):s+=S.css(e,"border"+ne[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function Ze(e,t,n){var r=Me(e),i=(!v.boxSizingReliable()||n)&&"border-box"===S.css(e,"boxSizing",!1,r),o=i,a=Be(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Pe.test(a)){if(!n)return a;a="auto"}return(!v.boxSizingReliable()&&i||!v.reliableTrDimensions()&&A(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===S.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===S.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Ke(e,t,n||(i?"border":"content"),o,r,a)+"px"}function et(e,t,n,r,i){return new et.prototype.init(e,t,n,r,i)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Be(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=X(t),u=Re.test(t),l=e.style;if(u||(t=Ve(s)),a=S.cssHooks[t]||S.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=te.exec(n))&&i[1]&&(n=se(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(S.cssNumber[s]?"":"px")),v.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=X(t);return Re.test(t)||(t=Ve(s)),(a=S.cssHooks[t]||S.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Be(e,t,r)),"normal"===i&&t in Qe&&(i=Qe[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),S.each(["height","width"],function(e,u){S.cssHooks[u]={get:function(e,t,n){if(t)return!Ge.test(S.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Ze(e,u,n):Ie(e,Ye,function(){return Ze(e,u,n)})},set:function(e,t,n){var r,i=Me(e),o=!v.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===S.css(e,"boxSizing",!1,i),s=n?Ke(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-Ke(e,u,"border",!1,i)-.5)),s&&(r=te.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=S.css(e,u)),Je(0,t,s)}}}),S.cssHooks.marginLeft=_e(v.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Be(e,"marginLeft"))||e.getBoundingClientRect().left-Ie(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),S.each({margin:"",padding:"",border:"Width"},function(i,o){S.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+ne[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(S.cssHooks[i+o].set=Je)}),S.fn.extend({css:function(e,t){return B(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Me(e),i=t.length;a<i;a++)o[t[a]]=S.css(e,t[a],!1,r);return o}return void 0!==n?S.style(e,t,n):S.css(e,t)},e,t,1<arguments.length)}}),((S.Tween=et).prototype={constructor:et,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(S.cssNumber[n]?"":"px")},cur:function(){var e=et.propHooks[this.prop];return e&&e.get?e.get(this):et.propHooks._default.get(this)},run:function(e){var t,n=et.propHooks[this.prop];return this.options.duration?this.pos=t=S.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):et.propHooks._default.set(this),this}}).init.prototype=et.prototype,(et.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=S.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||!S.cssHooks[e.prop]&&null==e.elem.style[Ve(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=et.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},S.fx=et.prototype.init,S.fx.step={};var tt,nt,rt,it,ot=/^(?:toggle|show|hide)$/,at=/queueHooks$/;function st(){nt&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(st):C.setTimeout(st,S.fx.interval),S.fx.tick())}function ut(){return C.setTimeout(function(){tt=void 0}),tt=Date.now()}function lt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ne[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ct(e,t,n){for(var r,i=(ft.tweeners[t]||[]).concat(ft.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function ft(o,e,t){var n,a,r=0,i=ft.prefilters.length,s=S.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=tt||ut(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:S.extend({},e),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},t),originalProperties:e,originalOptions:t,startTime:tt||ut(),duration:t.duration,tweens:[],createTween:function(e,t){var n=S.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=X(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=S.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=ft.prefilters[r].call(l,o,c,l.opts))return m(n.stop)&&(S._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return S.map(c,ct,l),m(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),S.fx.timer(S.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}S.Animation=S.extend(ft,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(P);for(var n,r=0,i=e.length;r<i;r++)n=e[r],ft.tweeners[n]=ft.tweeners[n]||[],ft.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),y=Y.get(e,"fxshow");for(r in n.queue||(null==(a=S._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,S.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],ot.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!y||void 0===y[r])continue;g=!0}d[r]=y&&y[r]||S.style(e,r)}if((u=!S.isEmptyObject(t))||!S.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=y&&y.display)&&(l=Y.get(e,"display")),"none"===(c=S.css(e,"display"))&&(l?c=l:(le([e],!0),l=e.style.display||l,c=S.css(e,"display"),le([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===S.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(y?"hidden"in y&&(g=y.hidden):y=Y.access(e,"fxshow",{display:l}),o&&(y.hidden=!g),g&&le([e],!0),p.done(function(){for(r in g||le([e]),Y.remove(e,"fxshow"),d)S.style(e,r,d[r])})),u=ct(g?y[r]:0,r,p),r in y||(y[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?ft.prefilters.unshift(e):ft.prefilters.push(e)}}),S.speed=function(e,t,n){var r=e&&"object"==typeof e?S.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return S.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in S.fx.speeds?r.duration=S.fx.speeds[r.duration]:r.duration=S.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&S.dequeue(this,r.queue)},r},S.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=S.isEmptyObject(t),o=S.speed(e,n,r),a=function(){var e=ft(this,S.extend({},t),o);(i||Y.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=S.timers,r=Y.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&at.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||S.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=Y.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=S.timers,o=n?n.length:0;for(t.finish=!0,S.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),S.each(["toggle","show","hide"],function(e,r){var i=S.fn[r];S.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(lt(r,!0),e,t,n)}}),S.each({slideDown:lt("show"),slideUp:lt("hide"),slideToggle:lt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){S.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),S.timers=[],S.fx.tick=function(){var e,t=0,n=S.timers;for(tt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||S.fx.stop(),tt=void 0},S.fx.timer=function(e){S.timers.push(e),S.fx.start()},S.fx.interval=13,S.fx.start=function(){nt||(nt=!0,st())},S.fx.stop=function(){nt=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(r,e){return r=S.fx&&S.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},rt=E.createElement("input"),it=E.createElement("select").appendChild(E.createElement("option")),rt.type="checkbox",v.checkOn=""!==rt.value,v.optSelected=it.selected,(rt=E.createElement("input")).value="t",rt.type="radio",v.radioValue="t"===rt.value;var pt,dt=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return B(this,S.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){S.removeAttr(this,e)})}}),S.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?S.prop(e,t,n):(1===o&&S.isXMLDoc(e)||(i=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?pt:void 0)),void 0!==n?null===n?void S.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=S.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!v.radioValue&&"radio"===t&&A(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(P);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),pt={set:function(e,t,n){return!1===t?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),function(e,t){var a=dt[t]||S.find.attr;dt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=dt[o],dt[o]=r,r=null!=a(e,t,n)?o:null,dt[o]=i),r}});var ht=/^(?:input|select|textarea|button)$/i,gt=/^(?:a|area)$/i;function yt(e){return(e.match(P)||[]).join(" ")}function vt(e){return e.getAttribute&&e.getAttribute("class")||""}function mt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(P)||[]}S.fn.extend({prop:function(e,t){return B(this,S.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[S.propFix[e]||e]})}}),S.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&S.isXMLDoc(e)||(t=S.propFix[t]||t,i=S.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=S.find.attr(e,"tabindex");return t?parseInt(t,10):ht.test(e.nodeName)||gt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),v.optSelected||(S.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){S.propFix[this.toLowerCase()]=this}),S.fn.extend({addClass:function(t){var e,n,r,i,o,a;return m(t)?this.each(function(e){S(this).addClass(t.call(this,e,vt(this)))}):(e=mt(t)).length?this.each(function(){if(r=vt(this),n=1===this.nodeType&&" "+yt(r)+" "){for(o=0;o<e.length;o++)i=e[o],n.indexOf(" "+i+" ")<0&&(n+=i+" ");a=yt(n),r!==a&&this.setAttribute("class",a)}}):this},removeClass:function(t){var e,n,r,i,o,a;return m(t)?this.each(function(e){S(this).removeClass(t.call(this,e,vt(this)))}):arguments.length?(e=mt(t)).length?this.each(function(){if(r=vt(this),n=1===this.nodeType&&" "+yt(r)+" "){for(o=0;o<e.length;o++){i=e[o];while(-1<n.indexOf(" "+i+" "))n=n.replace(" "+i+" "," ")}a=yt(n),r!==a&&this.setAttribute("class",a)}}):this:this.attr("class","")},toggleClass:function(t,n){var e,r,i,o,a=typeof t,s="string"===a||Array.isArray(t);return m(t)?this.each(function(e){S(this).toggleClass(t.call(this,e,vt(this),n),n)}):"boolean"==typeof n&&s?n?this.addClass(t):this.removeClass(t):(e=mt(t),this.each(function(){if(s)for(o=S(this),i=0;i<e.length;i++)r=e[i],o.hasClass(r)?o.removeClass(r):o.addClass(r);else void 0!==t&&"boolean"!==a||((r=vt(this))&&Y.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===t?"":Y.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+yt(vt(n))+" ").indexOf(t))return!0;return!1}});var xt=/\r/g;S.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=m(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,S(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=S.map(t,function(e){return null==e?"":e+""})),(r=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=S.valHooks[t.type]||S.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(xt,""):null==e?"":e:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:yt(S.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,"optgroup"))){if(t=S(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=S.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<S.inArray(S.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),S.each(["radio","checkbox"],function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<S.inArray(S(e).val(),t)}},v.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),v.focusin="onfocusin"in C;var bt=/^(?:focusinfocus|focusoutblur)$/,wt=function(e){e.stopPropagation()};S.extend(S.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||E],d=y.call(e,"type")?e.type:e,h=y.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||E,3!==n.nodeType&&8!==n.nodeType&&!bt.test(d+S.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[S.expando]?e:new S.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:S.makeArray(t,[e]),c=S.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!x(n)){for(s=c.delegateType||d,bt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||E)&&p.push(a.defaultView||a.parentWindow||C)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(Y.get(o,"events")||Object.create(null))[e.type]&&Y.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&V(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!V(n)||u&&m(n[d])&&!x(n)&&((a=n[u])&&(n[u]=null),S.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,wt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,wt),S.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(r,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each(function(){S.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}}),v.focusin||S.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(e){S.event.simulate(r,e.target,S.event.fix(e))};S.event.special[r]={setup:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r);t||e.addEventListener(n,i,!0),Y.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r)-1;t?Y.access(e,r,t):(e.removeEventListener(n,i,!0),Y.remove(e,r))}}});var Tt=C.location,Ct={guid:Date.now()},Et=/\?/;S.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||S.error("Invalid XML: "+(n?S.map(n.childNodes,function(e){return e.textContent}).join("\n"):e)),t};var St=/\[\]$/,kt=/\r?\n/g,At=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;function jt(n,e,r,i){var t;if(Array.isArray(e))S.each(e,function(e,t){r||St.test(n)?i(n,t):jt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==w(e))i(n,e);else for(t in e)jt(n+"["+t+"]",e[t],r,i)}S.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,function(){i(this.name,this.value)});else for(n in e)jt(n,e[n],t,i);return r.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=S.prop(this,"elements");return e?S.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!S(this).is(":disabled")&&Nt.test(this.nodeName)&&!At.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,function(e){return{name:t.name,value:e.replace(kt,"\r\n")}}):{name:t.name,value:n.replace(kt,"\r\n")}}).get()}});var Dt=/%20/g,qt=/#.*$/,Lt=/([?&])_=[^&]*/,Ht=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ot=/^(?:GET|HEAD)$/,Pt=/^\/\//,Rt={},Mt={},It="*/".concat("*"),Wt=E.createElement("a");function Ft(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(P)||[];if(m(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function $t(t,i,o,a){var s={},u=t===Mt;function l(e){var r;return s[e]=!0,S.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function Bt(e,t){var n,r,i=S.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&S.extend(!0,e,r),e}Wt.href=Tt.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Tt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Tt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":It,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Bt(Bt(e,S.ajaxSettings),t):Bt(S.ajaxSettings,e)},ajaxPrefilter:Ft(Rt),ajaxTransport:Ft(Mt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,y=S.ajaxSetup({},t),v=y.context||y,m=y.context&&(v.nodeType||v.jquery)?S(v):S.event,x=S.Deferred(),b=S.Callbacks("once memory"),w=y.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=Ht.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(y.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),y.url=((e||y.url||Tt.href)+"").replace(Pt,Tt.protocol+"//"),y.type=t.method||t.type||y.method||y.type,y.dataTypes=(y.dataType||"*").toLowerCase().match(P)||[""],null==y.crossDomain){r=E.createElement("a");try{r.href=y.url,r.href=r.href,y.crossDomain=Wt.protocol+"//"+Wt.host!=r.protocol+"//"+r.host}catch(e){y.crossDomain=!0}}if(y.data&&y.processData&&"string"!=typeof y.data&&(y.data=S.param(y.data,y.traditional)),$t(Rt,y,t,T),h)return T;for(i in(g=S.event&&y.global)&&0==S.active++&&S.event.trigger("ajaxStart"),y.type=y.type.toUpperCase(),y.hasContent=!Ot.test(y.type),f=y.url.replace(qt,""),y.hasContent?y.data&&y.processData&&0===(y.contentType||"").indexOf("application/x-www-form-urlencoded")&&(y.data=y.data.replace(Dt,"+")):(o=y.url.slice(f.length),y.data&&(y.processData||"string"==typeof y.data)&&(f+=(Et.test(f)?"&":"?")+y.data,delete y.data),!1===y.cache&&(f=f.replace(Lt,"$1"),o=(Et.test(f)?"&":"?")+"_="+Ct.guid+++o),y.url=f+o),y.ifModified&&(S.lastModified[f]&&T.setRequestHeader("If-Modified-Since",S.lastModified[f]),S.etag[f]&&T.setRequestHeader("If-None-Match",S.etag[f])),(y.data&&y.hasContent&&!1!==y.contentType||t.contentType)&&T.setRequestHeader("Content-Type",y.contentType),T.setRequestHeader("Accept",y.dataTypes[0]&&y.accepts[y.dataTypes[0]]?y.accepts[y.dataTypes[0]]+("*"!==y.dataTypes[0]?", "+It+"; q=0.01":""):y.accepts["*"]),y.headers)T.setRequestHeader(i,y.headers[i]);if(y.beforeSend&&(!1===y.beforeSend.call(v,T,y)||h))return T.abort();if(u="abort",b.add(y.complete),T.done(y.success),T.fail(y.error),c=$t(Mt,y,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,y]),h)return T;y.async&&0<y.timeout&&(d=C.setTimeout(function(){T.abort("timeout")},y.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(y,T,n)),!i&&-1<S.inArray("script",y.dataTypes)&&S.inArray("json",y.dataTypes)<0&&(y.converters["text script"]=function(){}),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(y,s,T,i),i?(y.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(S.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(S.etag[f]=u)),204===e||"HEAD"===y.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(v,[o,l,T]):x.rejectWith(v,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,y,i?o:a]),b.fireWith(v,[T,l]),g&&(m.trigger("ajaxComplete",[T,y]),--S.active||S.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return S.get(e,t,n,"json")},getScript:function(e,t){return S.get(e,void 0,t,"script")}}),S.each(["get","post"],function(e,i){S[i]=function(e,t,n,r){return m(t)&&(r=r||n,n=t,t=void 0),S.ajax(S.extend({url:e,type:i,dataType:r,data:t,success:n},S.isPlainObject(e)&&e))}}),S.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),S._evalUrl=function(e,t,n){return S.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){S.globalEval(e,t,n)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return m(n)?this.each(function(e){S(this).wrapInner(n.call(this,e))}):this.each(function(){var e=S(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=m(t);return this.each(function(e){S(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){S(this).replaceWith(this.childNodes)}),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var _t={0:200,1223:204},zt=S.ajaxSettings.xhr();v.cors=!!zt&&"withCredentials"in zt,v.ajax=zt=!!zt,S.ajaxTransport(function(i){var o,a;if(v.cors||zt&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(_t[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),S.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),S.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return S.globalEval(e),e}}}),S.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),S.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=S("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),v.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=yt(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&S.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?S("<div>").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return B(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=_e(v.pixelPosition,function(e,t){if(t)return t=Be(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return B(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var Gt=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;S.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||S.guid++,i},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.isArray=Array.isArray,S.parseJSON=JSON.parse,S.nodeName=A,S.isFunction=m,S.isWindow=x,S.camelCase=X,S.type=w,S.now=Date.now,S.isNumeric=function(e){var t=S.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},S.trim=function(e){return null==e?"":(e+"").replace(Gt,"$1")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return S});var Yt=C.jQuery,Qt=C.$;return S.noConflict=function(e){return C.$===S&&(C.$=Qt),e&&C.jQuery===S&&(C.jQuery=Yt),S},"undefined"==typeof e&&(C.jQuery=C.$=S),S});
diff --git a/public/assets/regions.json b/public/assets/regions.json
index 433a502..db3f671 100644
--- a/public/assets/regions.json
+++ b/public/assets/regions.json
@@ -1,718 +1,2230 @@
-[
-  {
-    "provinsi":"Aceh",
-    "kota":[
-      "Kota Banda Aceh",
-      "Kota Sabang",
-      "Kota Lhokseumawe",
-      "Kota Langsa",      
-      "Kota Subulussalam",
-      "Kab. Aceh Selatan",
-      "Kab. Aceh Tenggara",
-      "Kab. Aceh Timur",
-      "Kab. Aceh Tengah",
-      "Kab. Aceh Barat",
-      "Kab. Aceh Besar",
-      "Kab. Pidie",
-      "Kab. Aceh Utara",
-      "Kab. Simeulue",
-      "Kab. Aceh Singkil",
-      "Kab. Bireun",
-      "Kab. Aceh Barat Daya",
-      "Kab. Gayo Lues",
-      "Kab. Aceh Jaya",
-      "Kab. Nagan Raya",
-      "Kab. Aceh Tamiang",
-      "Kab. Bener Meriah",
-      "Kab. Pidie Jaya"
+{
+    "results": [
+        {
+            "text": "Aceh",
+            "children": [
+                {
+                    "id": 1,
+                    "text": "Kota Banda Aceh"
+                },
+                {
+                    "id": 2,
+                    "text": "Kota Sabang"
+                },
+                {
+                    "id": 3,
+                    "text": "Kota Lhokseumawe"
+                },
+                {
+                    "id": 4,
+                    "text": "Kota Langsa"
+                },
+                {
+                    "id": 5,
+                    "text": "Kota Subulussalam"
+                },
+                {
+                    "id": 6,
+                    "text": "Kab. Aceh Selatan"
+                },
+                {
+                    "id": 7,
+                    "text": "Kab. Aceh Tenggara"
+                },
+                {
+                    "id": 8,
+                    "text": "Kab. Aceh Timur"
+                },
+                {
+                    "id": 9,
+                    "text": "Kab. Aceh Tengah"
+                },
+                {
+                    "id": 10,
+                    "text": "Kab. Aceh Barat"
+                },
+                {
+                    "id": 11,
+                    "text": "Kab. Aceh Besar"
+                },
+                {
+                    "id": 12,
+                    "text": "Kab. Pidie"
+                },
+                {
+                    "id": 13,
+                    "text": "Kab. Aceh Utara"
+                },
+                {
+                    "id": 14,
+                    "text": "Kab. Simeulue"
+                },
+                {
+                    "id": 15,
+                    "text": "Kab. Aceh Singkil"
+                },
+                {
+                    "id": 16,
+                    "text": "Kab. Bireun"
+                },
+                {
+                    "id": 17,
+                    "text": "Kab. Aceh Barat Daya"
+                },
+                {
+                    "id": 18,
+                    "text": "Kab. Gayo Lues"
+                },
+                {
+                    "id": 19,
+                    "text": "Kab. Aceh Jaya"
+                },
+                {
+                    "id": 20,
+                    "text": "Kab. Nagan Raya"
+                },
+                {
+                    "id": 21,
+                    "text": "Kab. Aceh Tamiang"
+                },
+                {
+                    "id": 22,
+                    "text": "Kab. Bener Meriah"
+                },
+                {
+                    "id": 23,
+                    "text": "Kab. Pidie Jaya"
+                }
+            ]
+        },
+        {
+            "text": "Sumatera Utara",
+            "children": [
+                {
+                    "id": 24,
+                    "text": "Kota Medan"
+                },
+                {
+                    "id": 25,
+                    "text": "Kota Pematang Siantar"
+                },
+                {
+                    "id": 26,
+                    "text": "Kota Sibolga"
+                },
+                {
+                    "id": 27,
+                    "text": "Kota Tanjung Balai"
+                },
+                {
+                    "id": 28,
+                    "text": "Kota Binjai"
+                },
+                {
+                    "id": 29,
+                    "text": "Kota Tebing Tinggi"
+                },
+                {
+                    "id": 30,
+                    "text": "Kota Padang Sidempuan"
+                },
+                {
+                    "id": 31,
+                    "text": "Kota Gunung Sitoli"
+                },
+                {
+                    "id": 32,
+                    "text": "Kab. Serdang Bedagai"
+                },
+                {
+                    "id": 33,
+                    "text": "Kab. Samosir "
+                },
+                {
+                    "id": 34,
+                    "text": "Kab. Humbang Hasundutan"
+                },
+                {
+                    "id": 35,
+                    "text": "Kab. Pakpak Bharat"
+                },
+                {
+                    "id": 36,
+                    "text": "Kab. Nias Selatan"
+                },
+                {
+                    "id": 37,
+                    "text": "Kab. Mandailing Natal"
+                },
+                {
+                    "id": 38,
+                    "text": "Kab. Toba Samosir"
+                },
+                {
+                    "id": 39,
+                    "text": "Kab. Dairi"
+                },
+                {
+                    "id": 40,
+                    "text": "Kab. Labuhan Batu"
+                },
+                {
+                    "id": 41,
+                    "text": "Kab. Asahan"
+                },
+                {
+                    "id": 42,
+                    "text": "Kab. Simalungun"
+                },
+                {
+                    "id": 43,
+                    "text": "Kab. Deli Serdang"
+                },
+                {
+                    "id": 44,
+                    "text": "Kab. Karo"
+                },
+                {
+                    "id": 45,
+                    "text": "Kab. Langkat"
+                },
+                {
+                    "id": 46,
+                    "text": "Kab. Nias"
+                },
+                {
+                    "id": 47,
+                    "text": "Kab. Tapanuli Selatan"
+                },
+                {
+                    "id": 48,
+                    "text": "Kab. Tapanuli Utara"
+                },
+                {
+                    "id": 49,
+                    "text": "Kab. Tapanuli Tengah"
+                },
+                {
+                    "id": 50,
+                    "text": "Kab. Batu Bara"
+                },
+                {
+                    "id": 51,
+                    "text": "Kab. Padang Lawas Utara"
+                },
+                {
+                    "id": 52,
+                    "text": "Kab. Padang Lawas"
+                },
+                {
+                    "id": 53,
+                    "text": "Kab. Labuhanbatu Selatan"
+                },
+                {
+                    "id": 54,
+                    "text": "Kab. Labuhanbatu Utara"
+                },
+                {
+                    "id": 55,
+                    "text": "Kab. Nias Utara"
+                },
+                {
+                    "id": 56,
+                    "text": "Kab. Nias Barat"
+                }
+            ]
+        },
+        {
+            "text": "Sumatera Barat",
+            "children": [
+                {
+                    "id": 57,
+                    "text": "Kota Padang"
+                },
+                {
+                    "id": 58,
+                    "text": "Kota Solok"
+                },
+                {
+                    "id": 59,
+                    "text": "Kota Sawhlunto"
+                },
+                {
+                    "id": 60,
+                    "text": "Kota Padang Panjang"
+                },
+                {
+                    "id": 61,
+                    "text": "Kota Bukittinggi"
+                },
+                {
+                    "id": 62,
+                    "text": "Kota Payakumbuh"
+                },
+                {
+                    "id": 63,
+                    "text": "Kota Pariaman"
+                },
+                {
+                    "id": 64,
+                    "text": "Kab. Pasaman Barat"
+                },
+                {
+                    "id": 65,
+                    "text": "Kab. Solok Selatan"
+                },
+                {
+                    "id": 66,
+                    "text": "Kab. Dharmasraya"
+                },
+                {
+                    "id": 67,
+                    "text": "Kab. Kepulauan Mentawai"
+                },
+                {
+                    "id": 68,
+                    "text": "Kab. Pasaman"
+                },
+                {
+                    "id": 69,
+                    "text": "Kab. Lima Puluh Kota"
+                },
+                {
+                    "id": 70,
+                    "text": "Kab. Agam"
+                },
+                {
+                    "id": 71,
+                    "text": "Kab. Padang Pariaman"
+                },
+                {
+                    "id": 72,
+                    "text": "Kab. Tanah Datar"
+                },
+                {
+                    "id": 73,
+                    "text": "Kab. Sijunjung"
+                },
+                {
+                    "id": 74,
+                    "text": "Kab. Solok"
+                },
+                {
+                    "id": 75,
+                    "text": "Kab. Pesisir Selatan"
+                }
+            ]
+        },
+        {
+            "text": "Riau",
+            "children": [
+                {
+                    "id": 76,
+                    "text": "Kota Pekan Baru"
+                },
+                {
+                    "id": 77,
+                    "text": "Kota Dumai"
+                },
+                {
+                    "id": 78,
+                    "text": "Kab. Kepulauan Meranti"
+                },
+                {
+                    "id": 79,
+                    "text": "Kab. Kuantan Singingi"
+                },
+                {
+                    "id": 80,
+                    "text": "Kab. Siak"
+                },
+                {
+                    "id": 81,
+                    "text": "Kab. Rokan Hilir"
+                },
+                {
+                    "id": 82,
+                    "text": "Kab. Rokan Hulu"
+                },
+                {
+                    "id": 83,
+                    "text": "Kab. Pelalawan"
+                },
+                {
+                    "id": 84,
+                    "text": "Kab. Indragiri Hilir"
+                },
+                {
+                    "id": 85,
+                    "text": "Kab. Bengkalis"
+                },
+                {
+                    "id": 86,
+                    "text": "Kab. Indragiri Hulu"
+                },
+                {
+                    "id": 87,
+                    "text": "Kab. Kampar"
+                }
+            ]
+        },
+        {
+            "text": "Jambi",
+            "children": [
+                {
+                    "id": 88,
+                    "text": "Kota Jambi"
+                },
+                {
+                    "id": 89,
+                    "text": "Kota Sungai Penuh"
+                },
+                {
+                    "id": 90,
+                    "text": "Kab. Tebo"
+                },
+                {
+                    "id": 91,
+                    "text": "Kab. Bungo"
+                },
+                {
+                    "id": 92,
+                    "text": "Kab. Tanjung Jabung Timur"
+                },
+                {
+                    "id": 93,
+                    "text": "Kab. Tanjung Jabung Barat"
+                },
+                {
+                    "id": 94,
+                    "text": "Kab. Muaro Jambi"
+                },
+                {
+                    "id": 95,
+                    "text": "Kab. Batanghari"
+                },
+                {
+                    "id": 96,
+                    "text": "Kab. Sarolangun"
+                },
+                {
+                    "id": 97,
+                    "text": "Kab. Merangin"
+                },
+                {
+                    "id": 98,
+                    "text": "Kab. Kerinci"
+                }
+            ]
+        },
+        {
+            "text": "Sumatera Selatan",
+            "children": [
+                {
+                    "id": 99,
+                    "text": "Kota Palembang"
+                },
+                {
+                    "id": 100,
+                    "text": "Kota Pagar Alam"
+                },
+                {
+                    "id": 101,
+                    "text": "Kota Lubuk Linggau"
+                },
+                {
+                    "id": 102,
+                    "text": "Kota Prabumulih"
+                },
+                {
+                    "id": 103,
+                    "text": "Kab. Musi Rawas Utara"
+                },
+                {
+                    "id": 104,
+                    "text": "Kab. Penukal Abab Lematang Ilir"
+                },
+                {
+                    "id": 105,
+                    "text": "Kab. Empat Lawang"
+                },
+                {
+                    "id": 106,
+                    "text": "Kab. Ogan Ilir "
+                },
+                {
+                    "id": 107,
+                    "text": "Kab. Ogan Komering Ulu Selatan "
+                },
+                {
+                    "id": 108,
+                    "text": "Kab. Ogan Komering Ulu Timur "
+                },
+                {
+                    "id": 109,
+                    "text": "Kab. Banyuasin"
+                },
+                {
+                    "id": 110,
+                    "text": "Kab. Musi Banyuasin"
+                },
+                {
+                    "id": 111,
+                    "text": "Kab. Musi Rawas"
+                },
+                {
+                    "id": 112,
+                    "text": "Kab. Lahat"
+                },
+                {
+                    "id": 113,
+                    "text": "Kab. Muara Enim"
+                },
+                {
+                    "id": 114,
+                    "text": "Kab. Ogan Komering Ilir"
+                },
+                {
+                    "id": 115,
+                    "text": "Kab. Ogan Komering Ulu"
+                }
+            ]
+        },
+        {
+            "text": "Bengkulu",
+            "children": [
+                {
+                    "id": 116,
+                    "text": "Kota Bengkulu"
+                },
+                {
+                    "id": 117,
+                    "text": "Kab. Bengkulu Tengah"
+                },
+                {
+                    "id": 118,
+                    "text": "Kab. Kepahiang "
+                },
+                {
+                    "id": 119,
+                    "text": "Kab. Lebong"
+                },
+                {
+                    "id": 120,
+                    "text": "Kab. Muko Muko"
+                },
+                {
+                    "id": 121,
+                    "text": "Kab. Seluma"
+                },
+                {
+                    "id": 122,
+                    "text": "Kab. Kaur"
+                },
+                {
+                    "id": 123,
+                    "text": "Kab. Bengkulu Utara"
+                },
+                {
+                    "id": 124,
+                    "text": "Kab. Rejang Lebong"
+                },
+                {
+                    "id": 125,
+                    "text": "Kab. Bengkulu Selatan"
+                }
+            ]
+        },
+        {
+            "text": "Lampung",
+            "children": [
+                {
+                    "id": 126,
+                    "text": "Kota Bandar Lampung"
+                },
+                {
+                    "id": 127,
+                    "text": "Kota Metro"
+                },
+                {
+                    "id": 128,
+                    "text": "Kab. Pesisir Barat"
+                },
+                {
+                    "id": 129,
+                    "text": "Kab. Tulangbawang Barat"
+                },
+                {
+                    "id": 130,
+                    "text": "Kab. Mesuji"
+                },
+                {
+                    "id": 131,
+                    "text": "Kab. Pringsewu"
+                },
+                {
+                    "id": 132,
+                    "text": "Kab. Pesawaran"
+                },
+                {
+                    "id": 133,
+                    "text": "Kab. Way Kanan"
+                },
+                {
+                    "id": 134,
+                    "text": "Kab. Lampung Timur"
+                },
+                {
+                    "id": 135,
+                    "text": "Kab. Tanggamus"
+                },
+                {
+                    "id": 136,
+                    "text": "Kab. Tulang Bawang"
+                },
+                {
+                    "id": 137,
+                    "text": "Kab. Lampung Barat"
+                },
+                {
+                    "id": 138,
+                    "text": "Kab. Lampung Utara"
+                },
+                {
+                    "id": 139,
+                    "text": "Kab. Lampung Tengah"
+                },
+                {
+                    "id": 140,
+                    "text": "Kab. Lampung Selatan"
+                }
+            ]
+        },
+        {
+            "text": "Kepulauan Bangka Belitung",
+            "children": [
+                {
+                    "id": 141,
+                    "text": "Kota Pangkal Pinang"
+                },
+                {
+                    "id": 142,
+                    "text": "Kab. Belitung Timur"
+                },
+                {
+                    "id": 143,
+                    "text": "Kab. Bangka Barat"
+                },
+                {
+                    "id": 144,
+                    "text": "Kab. Bangka Tengah"
+                },
+                {
+                    "id": 145,
+                    "text": "Kab. Bangka Selatan"
+                },
+                {
+                    "id": 146,
+                    "text": "Kab. Belitung"
+                },
+                {
+                    "id": 147,
+                    "text": "Kab. Bangka"
+                }
+            ]
+        },
+        {
+            "text": "Kepulauan Riau",
+            "children": [
+                {
+                    "id": 148,
+                    "text": "Kota Batam"
+                },
+                {
+                    "id": 149,
+                    "text": "Kota Tanjung Pinang"
+                },
+                {
+                    "id": 150,
+                    "text": "Kab. Kepulauan Anambas"
+                },
+                {
+                    "id": 151,
+                    "text": "Kab. Lingga "
+                },
+                {
+                    "id": 152,
+                    "text": "Kab. Natuna"
+                },
+                {
+                    "id": 153,
+                    "text": "Kab. Karimun"
+                },
+                {
+                    "id": 154,
+                    "text": "Kab. Bintan"
+                }
+            ]
+        },
+        {
+            "text": "DKI Jakarta",
+            "children": [
+                {
+                    "id": 155,
+                    "text": "Kota Jakarta Timur"
+                },
+                {
+                    "id": 156,
+                    "text": "Kota Jakarta Selatan"
+                },
+                {
+                    "id": 157,
+                    "text": "Kota Jakarta Barat"
+                },
+                {
+                    "id": 158,
+                    "text": "Kota Jakarta Utara"
+                },
+                {
+                    "id": 159,
+                    "text": "Kota Jakarta Pusat"
+                },
+                {
+                    "id": 160,
+                    "text": "Kab. Kepulauan Seribu"
+                }
+            ]
+        },
+        {
+            "text": "Jawa Barat",
+            "children": [
+                {
+                    "id": 161,
+                    "text": "Kota Bandung"
+                },
+                {
+                    "id": 162,
+                    "text": "Kota Banjar"
+                },
+                {
+                    "id": 163,
+                    "text": "Kota Tasikmalaya"
+                },
+                {
+                    "id": 164,
+                    "text": "Kota Cimahi"
+                },
+                {
+                    "id": 165,
+                    "text": "Kota Depok"
+                },
+                {
+                    "id": 166,
+                    "text": "Kota Bekasi"
+                },
+                {
+                    "id": 167,
+                    "text": "Kota Cirebon"
+                },
+                {
+                    "id": 168,
+                    "text": "Kota Sukabumi"
+                },
+                {
+                    "id": 169,
+                    "text": "Kota Bogor"
+                },
+                {
+                    "id": 170,
+                    "text": "Kab. Pangandaran"
+                },
+                {
+                    "id": 171,
+                    "text": "Kab. Bandung Barat"
+                },
+                {
+                    "id": 172,
+                    "text": "Kab. Bekasi"
+                },
+                {
+                    "id": 173,
+                    "text": "Kab. Karawang"
+                },
+                {
+                    "id": 174,
+                    "text": "Kab. Purwakarta"
+                },
+                {
+                    "id": 175,
+                    "text": "Kab. Subang"
+                },
+                {
+                    "id": 176,
+                    "text": "Kab. Indramayu"
+                },
+                {
+                    "id": 177,
+                    "text": "Kab. Sumedang"
+                },
+                {
+                    "id": 178,
+                    "text": "Kab. Majalengka"
+                },
+                {
+                    "id": 179,
+                    "text": "Kab. Cirebon"
+                },
+                {
+                    "id": 180,
+                    "text": "Kab. Kuningan"
+                },
+                {
+                    "id": 181,
+                    "text": "Kab. Ciamis"
+                },
+                {
+                    "id": 182,
+                    "text": "Kab. Tasikmalaya"
+                },
+                {
+                    "id": 183,
+                    "text": "Kab. Garut"
+                },
+                {
+                    "id": 184,
+                    "text": "Kab. Bandung"
+                },
+                {
+                    "id": 185,
+                    "text": "Kab. Cianjur"
+                },
+                {
+                    "id": 186,
+                    "text": "Kab. Sukabumi"
+                },
+                {
+                    "id": 187,
+                    "text": "Kab. Bogor"
+                }
+            ]
+        },
+        {
+            "text": "Jawa Tengah",
+            "children": [
+                {
+                    "id": 188,
+                    "text": "Kota Semarang"
+                },
+                {
+                    "id": 189,
+                    "text": "Kota Tegal"
+                },
+                {
+                    "id": 190,
+                    "text": "Kota Pekalongan"
+                },
+                {
+                    "id": 191,
+                    "text": "Kota Salatiga"
+                },
+                {
+                    "id": 192,
+                    "text": "Kota Surakarta"
+                },
+                {
+                    "id": 193,
+                    "text": "Kota Magelang"
+                },
+                {
+                    "id": 194,
+                    "text": "Kab. Brebes"
+                },
+                {
+                    "id": 195,
+                    "text": "Kab. Tegal"
+                },
+                {
+                    "id": 196,
+                    "text": "Kab. Pemalang"
+                },
+                {
+                    "id": 197,
+                    "text": "Kab. Pekalongan"
+                },
+                {
+                    "id": 198,
+                    "text": "Kab. Batang"
+                },
+                {
+                    "id": 199,
+                    "text": "Kab. Kendal"
+                },
+                {
+                    "id": 200,
+                    "text": "Kab. Temanggung"
+                },
+                {
+                    "id": 201,
+                    "text": "Kab. Semarang"
+                },
+                {
+                    "id": 202,
+                    "text": "Kab. Demak"
+                },
+                {
+                    "id": 203,
+                    "text": "Kab. Jepara"
+                },
+                {
+                    "id": 204,
+                    "text": "Kab. Kudus"
+                },
+                {
+                    "id": 205,
+                    "text": "Kab. Pati"
+                },
+                {
+                    "id": 206,
+                    "text": "Kab. Rembang"
+                },
+                {
+                    "id": 207,
+                    "text": "Kab. Blora"
+                },
+                {
+                    "id": 208,
+                    "text": "Kab. Grobogan"
+                },
+                {
+                    "id": 209,
+                    "text": "Kab. Sragen"
+                },
+                {
+                    "id": 210,
+                    "text": "Kab. Karanganyar"
+                },
+                {
+                    "id": 211,
+                    "text": "Kab. Wonogiri"
+                },
+                {
+                    "id": 212,
+                    "text": "Kab. Sukoharjo"
+                },
+                {
+                    "id": 213,
+                    "text": "Kab. Klaten"
+                },
+                {
+                    "id": 214,
+                    "text": "Kab. Boyolali"
+                },
+                {
+                    "id": 215,
+                    "text": "Kab. Magelang"
+                },
+                {
+                    "id": 216,
+                    "text": "Kab. Wonosobo"
+                },
+                {
+                    "id": 217,
+                    "text": "Kab. Purworejo"
+                },
+                {
+                    "id": 218,
+                    "text": "Kab. Kebumen"
+                },
+                {
+                    "id": 219,
+                    "text": "Kab. Banjarnegara"
+                },
+                {
+                    "id": 220,
+                    "text": "Kab. Purbalingga"
+                },
+                {
+                    "id": 221,
+                    "text": "Kab. Banyumas"
+                },
+                {
+                    "id": 222,
+                    "text": "Kab. Cilacap"
+                }
+            ]
+        },
+        {
+            "text": "DI Yogyakarta",
+            "children": [
+                {
+                    "id": 223,
+                    "text": "Kota Yogyakarta"
+                },
+                {
+                    "id": 224,
+                    "text": "Kab. Sleman"
+                },
+                {
+                    "id": 225,
+                    "text": "Kab. Gunung Kidul"
+                },
+                {
+                    "id": 226,
+                    "text": "Kab. Bantul"
+                },
+                {
+                    "id": 227,
+                    "text": "Kab. Kulon Progo"
+                }
+            ]
+        },
+        {
+            "text": "Jawa Timur",
+            "children": [
+                {
+                    "id": 228,
+                    "text": "Kota Surabaya"
+                },
+                {
+                    "id": 229,
+                    "text": "Kota Batu"
+                },
+                {
+                    "id": 230,
+                    "text": "Kota Madiun"
+                },
+                {
+                    "id": 231,
+                    "text": "Kota Mojokerto"
+                },
+                {
+                    "id": 232,
+                    "text": "Kota Pasuruan"
+                },
+                {
+                    "id": 233,
+                    "text": "Kota Probolinggo"
+                },
+                {
+                    "id": 234,
+                    "text": "Kota Malang"
+                },
+                {
+                    "id": 235,
+                    "text": "Kota Blitar"
+                },
+                {
+                    "id": 236,
+                    "text": "Kota Kediri"
+                },
+                {
+                    "id": 237,
+                    "text": "Kab. Sumenep"
+                },
+                {
+                    "id": 238,
+                    "text": "Kab. Pamekasan"
+                },
+                {
+                    "id": 239,
+                    "text": "Kab. Sampang"
+                },
+                {
+                    "id": 240,
+                    "text": "Kab. Bangkalan"
+                },
+                {
+                    "id": 241,
+                    "text": "Kab. Gresik"
+                },
+                {
+                    "id": 242,
+                    "text": "Kab. Lamongan"
+                },
+                {
+                    "id": 243,
+                    "text": "Kab. Tuban"
+                },
+                {
+                    "id": 244,
+                    "text": "Kab. Bojonegoro"
+                },
+                {
+                    "id": 245,
+                    "text": "Kab. Ngawi"
+                },
+                {
+                    "id": 246,
+                    "text": "Kab. Magetan"
+                },
+                {
+                    "id": 247,
+                    "text": "Kab. Madiun"
+                },
+                {
+                    "id": 248,
+                    "text": "Kab. Nganjuk"
+                },
+                {
+                    "id": 249,
+                    "text": "Kab. Jombang"
+                },
+                {
+                    "id": 250,
+                    "text": "Kab. Mojokerto"
+                },
+                {
+                    "id": 251,
+                    "text": "Kab. Sidoarjo"
+                },
+                {
+                    "id": 252,
+                    "text": "Kab. Pasuruan"
+                },
+                {
+                    "id": 253,
+                    "text": "Kab. Probolinggo"
+                },
+                {
+                    "id": 254,
+                    "text": "Kab. Situbondo"
+                },
+                {
+                    "id": 255,
+                    "text": "Kab. Bondowoso"
+                },
+                {
+                    "id": 256,
+                    "text": "Kab. Banyuwangi"
+                },
+                {
+                    "id": 257,
+                    "text": "Kab. Jember"
+                },
+                {
+                    "id": 258,
+                    "text": "Kab. Lumajang"
+                },
+                {
+                    "id": 259,
+                    "text": "Kab. Malang"
+                },
+                {
+                    "id": 260,
+                    "text": "Kab. Kediri"
+                },
+                {
+                    "id": 261,
+                    "text": "Kab. Blitar"
+                },
+                {
+                    "id": 262,
+                    "text": "Kab. Tulungagung"
+                },
+                {
+                    "id": 263,
+                    "text": "Kab. Trenggalek"
+                },
+                {
+                    "id": 264,
+                    "text": "Kab. Ponorogo"
+                },
+                {
+                    "id": 265,
+                    "text": "Kab. Pacitan"
+                }
+            ]
+        },
+        {
+            "text": "Banten",
+            "children": [
+                {
+                    "id": 266,
+                    "text": "Kota Serang"
+                },
+                {
+                    "id": 267,
+                    "text": "Kota Cilegon"
+                },
+                {
+                    "id": 268,
+                    "text": "Kota Tangerang"
+                },
+                {
+                    "id": 269,
+                    "text": "Kota Tangerang Selatan"
+                },
+                {
+                    "id": 270,
+                    "text": "Kab. Serang"
+                },
+                {
+                    "id": 271,
+                    "text": "Kab. Tangerang"
+                },
+                {
+                    "id": 272,
+                    "text": "Kab. Lebak"
+                },
+                {
+                    "id": 273,
+                    "text": "Kab. Pandeglang"
+                }
+            ]
+        },
+        {
+            "text": "Bali",
+            "children": [
+                {
+                    "id": 274,
+                    "text": "Kota Denpasar"
+                },
+                {
+                    "id": 275,
+                    "text": "Kab. Buleleng"
+                },
+                {
+                    "id": 276,
+                    "text": "Kab. Karangasem"
+                },
+                {
+                    "id": 277,
+                    "text": "Kab. Bangli"
+                },
+                {
+                    "id": 278,
+                    "text": "Kab. Klungkung"
+                },
+                {
+                    "id": 279,
+                    "text": "Kab. Gianyar"
+                },
+                {
+                    "id": 280,
+                    "text": "Kab. Badung"
+                },
+                {
+                    "id": 281,
+                    "text": "Kab. Tabanan"
+                },
+                {
+                    "id": 282,
+                    "text": "Kab. Jembrana"
+                }
+            ]
+        },
+        {
+            "text": "Nusa Tenggara Barat",
+            "children": [
+                {
+                    "id": 283,
+                    "text": "Kota Mataram"
+                },
+                {
+                    "id": 284,
+                    "text": "Kota Bima"
+                },
+                {
+                    "id": 285,
+                    "text": "Kab. Lombok Utara"
+                },
+                {
+                    "id": 286,
+                    "text": "Kab. Sumbawa Barat"
+                },
+                {
+                    "id": 287,
+                    "text": "Kab. Bima"
+                },
+                {
+                    "id": 288,
+                    "text": "Kab. Dompu"
+                },
+                {
+                    "id": 289,
+                    "text": "Kab. Sumbawa "
+                },
+                {
+                    "id": 290,
+                    "text": "Kab. Lombok Timur"
+                },
+                {
+                    "id": 291,
+                    "text": "Kab. Lombok Tengah"
+                },
+                {
+                    "id": 292,
+                    "text": "Kab. Lombok Barat"
+                }
+            ]
+        },
+        {
+            "text": "Nusa Tenggara Timur",
+            "children": [
+                {
+                    "id": 293,
+                    "text": "Kota Kupang"
+                },
+                {
+                    "id": 294,
+                    "text": "Kab. Malaka"
+                },
+                {
+                    "id": 295,
+                    "text": "Kab. Sabu Raijua"
+                },
+                {
+                    "id": 296,
+                    "text": "Kab. Manggarai Timur"
+                },
+                {
+                    "id": 297,
+                    "text": "Kab. Sumba Barat Daya"
+                },
+                {
+                    "id": 298,
+                    "text": "Kab. Sumba Tengah"
+                },
+                {
+                    "id": 299,
+                    "text": "Kab. Nagekeo"
+                },
+                {
+                    "id": 300,
+                    "text": "Kab. Manggarai Barat"
+                },
+                {
+                    "id": 301,
+                    "text": "Kab. Rote Ndao"
+                },
+                {
+                    "id": 302,
+                    "text": "Kab. Lembata"
+                },
+                {
+                    "id": 303,
+                    "text": "Kab. Sumba Barat"
+                },
+                {
+                    "id": 304,
+                    "text": "Kab. Sumba Timur"
+                },
+                {
+                    "id": 305,
+                    "text": "Kab. Manggarai"
+                },
+                {
+                    "id": 306,
+                    "text": "Kab. Ngada"
+                },
+                {
+                    "id": 307,
+                    "text": "Kab. Ende"
+                },
+                {
+                    "id": 308,
+                    "text": "Kab. Sikka"
+                },
+                {
+                    "id": 309,
+                    "text": "Kab. Flores Timur"
+                },
+                {
+                    "id": 310,
+                    "text": "Kab. Alor"
+                },
+                {
+                    "id": 311,
+                    "text": "Kab. Belu"
+                },
+                {
+                    "id": 312,
+                    "text": "Kab. Timor Tengah Utara"
+                },
+                {
+                    "id": 313,
+                    "text": "Kab. Timor Tengah Selatan"
+                },
+                {
+                    "id": 314,
+                    "text": "Kab. Kupang"
+                }
+            ]
+        },
+        {
+            "text": "Kalimantan Barat",
+            "children": [
+                {
+                    "id": 315,
+                    "text": "Kota Pontianak"
+                },
+                {
+                    "id": 316,
+                    "text": "Kota Singkawang"
+                },
+                {
+                    "id": 317,
+                    "text": "Kab. Kubu Raya"
+                },
+                {
+                    "id": 318,
+                    "text": "Kab. Kayong Utara"
+                },
+                {
+                    "id": 319,
+                    "text": "Kab. Sekadau"
+                },
+                {
+                    "id": 320,
+                    "text": "Kab. Melawi"
+                },
+                {
+                    "id": 321,
+                    "text": "Kab. Landak"
+                },
+                {
+                    "id": 322,
+                    "text": "Kab. Bengkayang"
+                },
+                {
+                    "id": 323,
+                    "text": "Kab. Kapuas Hulu"
+                },
+                {
+                    "id": 324,
+                    "text": "Kab. Sintang "
+                },
+                {
+                    "id": 325,
+                    "text": "Kab. Ketapang"
+                },
+                {
+                    "id": 326,
+                    "text": "Kab. Sanggau "
+                },
+                {
+                    "id": 327,
+                    "text": "Kab. Mempawah"
+                },
+                {
+                    "id": 328,
+                    "text": "Kab. Sambas"
+                }
+            ]
+        },
+        {
+            "text": "Kalimantan Tengah",
+            "children": [
+                {
+                    "id": 329,
+                    "text": "Kota Palangkaraya"
+                },
+                {
+                    "id": 330,
+                    "text": "Kab. Barito Timur"
+                },
+                {
+                    "id": 331,
+                    "text": "Kab. Murung Raya"
+                },
+                {
+                    "id": 332,
+                    "text": "Kab. Pulang Pisau"
+                },
+                {
+                    "id": 333,
+                    "text": "Kab. Gunung Mas"
+                },
+                {
+                    "id": 334,
+                    "text": "Kab. Lamandau"
+                },
+                {
+                    "id": 335,
+                    "text": "Kab. Sukamara"
+                },
+                {
+                    "id": 336,
+                    "text": "Kab. Seruyan"
+                },
+                {
+                    "id": 337,
+                    "text": "Kab. Katingan"
+                },
+                {
+                    "id": 338,
+                    "text": "Kab. Barito Utara"
+                },
+                {
+                    "id": 339,
+                    "text": "Kab. Barito Selatan"
+                },
+                {
+                    "id": 340,
+                    "text": "Kab. Kapuas"
+                },
+                {
+                    "id": 341,
+                    "text": "Kab. Kotawaringin Timur"
+                },
+                {
+                    "id": 342,
+                    "text": "Kab. Kotawaringin Barat"
+                }
+            ]
+        },
+        {
+            "text": "Kalimantan Selatan",
+            "children": [
+                {
+                    "id": 343,
+                    "text": "Kota Banjarmasin"
+                },
+                {
+                    "id": 344,
+                    "text": "Kota Banjarbaru"
+                },
+                {
+                    "id": 345,
+                    "text": "Kab. Balangan"
+                },
+                {
+                    "id": 346,
+                    "text": "Kab. Tanah Bambu"
+                },
+                {
+                    "id": 347,
+                    "text": "Kab. Tabalong"
+                },
+                {
+                    "id": 348,
+                    "text": "Kab. Hulu Sungai Utara"
+                },
+                {
+                    "id": 349,
+                    "text": "Kab. Hulu Sungai Tengah"
+                },
+                {
+                    "id": 350,
+                    "text": "Kab. Hulu Sungai Selatan"
+                },
+                {
+                    "id": 351,
+                    "text": "Kab. Tapin"
+                },
+                {
+                    "id": 352,
+                    "text": "Kab. Barito Kuala"
+                },
+                {
+                    "id": 353,
+                    "text": "Kab. Banjar"
+                },
+                {
+                    "id": 354,
+                    "text": "Kab. Kotabaru"
+                },
+                {
+                    "id": 355,
+                    "text": "Kab. Tanah Laut"
+                }
+            ]
+        },
+        {
+            "text": "Kalimantan Timur",
+            "children": [
+                {
+                    "id": 356,
+                    "text": "Kota Samarinda"
+                },
+                {
+                    "id": 357,
+                    "text": "Kota Bontang"
+                },
+                {
+                    "id": 358,
+                    "text": "Kota Balikpapan"
+                },
+                {
+                    "id": 359,
+                    "text": "Kab. Mahakam Ulu"
+                },
+                {
+                    "id": 360,
+                    "text": "Kab. Penajam Paser Utara"
+                },
+                {
+                    "id": 361,
+                    "text": "Kab. Kutai Timur"
+                },
+                {
+                    "id": 362,
+                    "text": "Kab. Kutai Barat"
+                },
+                {
+                    "id": 363,
+                    "text": "Kab. Berau"
+                },
+                {
+                    "id": 364,
+                    "text": "Kab. Kutai Kertanegara"
+                },
+                {
+                    "id": 365,
+                    "text": "Kab. Paser"
+                }
+            ]
+        },
+        {
+            "text": "Kalimantan Utara",
+            "children": [
+                {
+                    "id": 366,
+                    "text": "Kota Tarakan"
+                },
+                {
+                    "id": 367,
+                    "text": "Kab. Tana Tidung"
+                },
+                {
+                    "id": 368,
+                    "text": "Kab. Nunukan"
+                },
+                {
+                    "id": 369,
+                    "text": "Kab. Malinau"
+                },
+                {
+                    "id": 370,
+                    "text": "Kab. Bulungan"
+                }
+            ]
+        },
+        {
+            "text": "Sulawesi Utara",
+            "children": [
+                {
+                    "id": 371,
+                    "text": "Kota Manado"
+                },
+                {
+                    "id": 372,
+                    "text": "Kota Tomohon"
+                },
+                {
+                    "id": 373,
+                    "text": "Kota Bitung"
+                },
+                {
+                    "id": 374,
+                    "text": "Kota Kotamobagu"
+                },
+                {
+                    "id": 375,
+                    "text": "Kab. Bolaang Mangondow Selatan"
+                },
+                {
+                    "id": 376,
+                    "text": "Kab. Bolaang Mangondow Timur"
+                },
+                {
+                    "id": 377,
+                    "text": "Kab. Kepulauan Siau Tagulandang Biaro"
+                },
+                {
+                    "id": 378,
+                    "text": "Kab. Bolaang Mangondow Utara"
+                },
+                {
+                    "id": 379,
+                    "text": "Kab. Minahasa Tenggara"
+                },
+                {
+                    "id": 380,
+                    "text": "Kab. Minahasa Utara"
+                },
+                {
+                    "id": 381,
+                    "text": "Kab. Minahasa Selatan"
+                },
+                {
+                    "id": 382,
+                    "text": "Kab. Kepulauan Talaud"
+                },
+                {
+                    "id": 383,
+                    "text": "Kab. Kepulauan Sangihe"
+                },
+                {
+                    "id": 384,
+                    "text": "Kab. Minahasa"
+                },
+                {
+                    "id": 385,
+                    "text": "Kab. Bolaang Mangondow"
+                }
+            ]
+        },
+        {
+            "text": "Sulawesi Tengah",
+            "children": [
+                {
+                    "id": 386,
+                    "text": "Kota Palu"
+                },
+                {
+                    "id": 387,
+                    "text": "Kab. Morowali Utara"
+                },
+                {
+                    "id": 388,
+                    "text": "Kab. Banggai Laut"
+                },
+                {
+                    "id": 389,
+                    "text": "Kab. Sigi"
+                },
+                {
+                    "id": 390,
+                    "text": "Kab. Tojo Una-Una"
+                },
+                {
+                    "id": 391,
+                    "text": "Kab. Parigi Moutong"
+                },
+                {
+                    "id": 392,
+                    "text": "Kab. Banggai Kepulauan"
+                },
+                {
+                    "id": 393,
+                    "text": "Kab. Morowali"
+                },
+                {
+                    "id": 394,
+                    "text": "Kab. Buol"
+                },
+                {
+                    "id": 395,
+                    "text": "Kab. Toli-Toli"
+                },
+                {
+                    "id": 396,
+                    "text": "Kab. Donggala"
+                },
+                {
+                    "id": 397,
+                    "text": "Kab. Poso"
+                },
+                {
+                    "id": 398,
+                    "text": "Kab. Banggai"
+                }
+            ]
+        },
+        {
+            "text": "Sulawesi Selatan",
+            "children": [
+                {
+                    "id": 399,
+                    "text": "Kota Makasar"
+                },
+                {
+                    "id": 400,
+                    "text": "Kota Palopo"
+                },
+                {
+                    "id": 401,
+                    "text": "Kota Pare Pare"
+                },
+                {
+                    "id": 402,
+                    "text": "Kab. Toraja Utara"
+                },
+                {
+                    "id": 403,
+                    "text": "Kab. Luwu Timur"
+                },
+                {
+                    "id": 404,
+                    "text": "Kab. Luwu Utara"
+                },
+                {
+                    "id": 405,
+                    "text": "Kab. Tana Toraja"
+                },
+                {
+                    "id": 406,
+                    "text": "Kab. Luwu"
+                },
+                {
+                    "id": 407,
+                    "text": "Kab. Enrekang"
+                },
+                {
+                    "id": 408,
+                    "text": "Kab. Pinrang"
+                },
+                {
+                    "id": 409,
+                    "text": "Kab. Sidenreng Rappang"
+                },
+                {
+                    "id": 410,
+                    "text": "Kab. Wajo"
+                },
+                {
+                    "id": 411,
+                    "text": "Kab. Soppeng"
+                },
+                {
+                    "id": 412,
+                    "text": "Kab. Barru"
+                },
+                {
+                    "id": 413,
+                    "text": "Kab. Pangkajene Kepulauan"
+                },
+                {
+                    "id": 414,
+                    "text": "Kab. Maros"
+                },
+                {
+                    "id": 415,
+                    "text": "Kab. Bone"
+                },
+                {
+                    "id": 416,
+                    "text": "Kab. Sinjai"
+                },
+                {
+                    "id": 417,
+                    "text": "Kab. Gowa"
+                },
+                {
+                    "id": 418,
+                    "text": "Kab. Takalar"
+                },
+                {
+                    "id": 419,
+                    "text": "Kab. Jeneponto"
+                },
+                {
+                    "id": 420,
+                    "text": "Kab. Bantaeng"
+                },
+                {
+                    "id": 421,
+                    "text": "Kab. Bulukumba"
+                },
+                {
+                    "id": 422,
+                    "text": "Kab. Kepulauan Selayar"
+                }
+            ]
+        },
+        {
+            "text": "Sulawesi Tenggara",
+            "children": [
+                {
+                    "id": 423,
+                    "text": "Kota Kendari"
+                },
+                {
+                    "id": 424,
+                    "text": "Kota Bau Bau"
+                },
+                {
+                    "id": 425,
+                    "text": "Kab. Buton Selatan"
+                },
+                {
+                    "id": 426,
+                    "text": "Kab. Buton Tengah"
+                },
+                {
+                    "id": 427,
+                    "text": "Kab. Muna Barat"
+                },
+                {
+                    "id": 428,
+                    "text": "Kab. Konawe Kepulauan"
+                },
+                {
+                    "id": 429,
+                    "text": "Kab. Kolaka Timur"
+                },
+                {
+                    "id": 430,
+                    "text": "Kab. Buton Utara"
+                },
+                {
+                    "id": 431,
+                    "text": "Kab. Konawe Utara"
+                },
+                {
+                    "id": 432,
+                    "text": "Kab. Kolaka Utara"
+                },
+                {
+                    "id": 433,
+                    "text": "Kab. Wakatobi"
+                },
+                {
+                    "id": 434,
+                    "text": "Kab. Bombana"
+                },
+                {
+                    "id": 435,
+                    "text": "Kab. Konawe Selatan"
+                },
+                {
+                    "id": 436,
+                    "text": "Kab. Buton"
+                },
+                {
+                    "id": 437,
+                    "text": "Kab. Muna"
+                },
+                {
+                    "id": 438,
+                    "text": "Kab. Konawe"
+                },
+                {
+                    "id": 439,
+                    "text": "Kab. Kolaka"
+                }
+            ]
+        },
+        {
+            "text": "Gorontalo",
+            "children": [
+                {
+                    "id": 440,
+                    "text": "Kota Gorontalo"
+                },
+                {
+                    "id": 441,
+                    "text": "Kab. Pohuwato"
+                },
+                {
+                    "id": 442,
+                    "text": "Kab. Bone Bolango"
+                },
+                {
+                    "id": 443,
+                    "text": "Kab. Boalemo"
+                },
+                {
+                    "id": 444,
+                    "text": "Kab. Gorontalo"
+                },
+                {
+                    "id": 445,
+                    "text": "Kab. Gorontalo Utara"
+                }
+            ]
+        },
+        {
+            "text": "Sulawesi Barat",
+            "children": [
+                {
+                    "id": 446,
+                    "text": "Kab. Majene"
+                },
+                {
+                    "id": 447,
+                    "text": "Kab. Polowali Mandar"
+                },
+                {
+                    "id": 448,
+                    "text": "Kab. Mamasa"
+                },
+                {
+                    "id": 449,
+                    "text": "Kab. Mamuju"
+                },
+                {
+                    "id": 450,
+                    "text": "Kab. Mamuju Utara"
+                },
+                {
+                    "id": 451,
+                    "text": "Kab. Mamuju Tengah"
+                }
+            ]
+        },
+        {
+            "text": "Maluku",
+            "children": [
+                {
+                    "id": 452,
+                    "text": "Kota Ambon"
+                },
+                {
+                    "id": 453,
+                    "text": "Kota Tual"
+                },
+                {
+                    "id": 454,
+                    "text": "Kab. Buru Selatan"
+                },
+                {
+                    "id": 455,
+                    "text": "Kab. Maluku Barat Daya"
+                },
+                {
+                    "id": 456,
+                    "text": "Kab. Kepulauan Aru"
+                },
+                {
+                    "id": 457,
+                    "text": "Kab. Seram Bagian Barat "
+                },
+                {
+                    "id": 458,
+                    "text": "Kab. Seram Bagian Timur"
+                },
+                {
+                    "id": 459,
+                    "text": "Kab. Buru"
+                },
+                {
+                    "id": 460,
+                    "text": "Kab. Maluku Tenggara Barat"
+                },
+                {
+                    "id": 461,
+                    "text": "Kab. Maluku Tenggara"
+                },
+                {
+                    "id": 462,
+                    "text": "Kab. Maluku Tengah"
+                }
+            ]
+        },
+        {
+            "text": "Maluku Utara",
+            "children": [
+                {
+                    "id": 463,
+                    "text": "Kota Ternate"
+                },
+                {
+                    "id": 464,
+                    "text": "Kota Tidore Kepulauan"
+                },
+                {
+                    "id": 465,
+                    "text": "Kab. Pulau Taliabu"
+                },
+                {
+                    "id": 466,
+                    "text": "Kab. Pulau Morotai"
+                },
+                {
+                    "id": 467,
+                    "text": "Kab. Halmahera Timur"
+                },
+                {
+                    "id": 468,
+                    "text": "Kab. Kepulauan Sula"
+                },
+                {
+                    "id": 469,
+                    "text": "Kab. Halmahera Selatan"
+                },
+                {
+                    "id": 470,
+                    "text": "Kab. Halmahera Utara"
+                },
+                {
+                    "id": 471,
+                    "text": "Kab. Halmahera Tengah"
+                },
+                {
+                    "id": 472,
+                    "text": "Kab. Halmahera Barat"
+                }
+            ]
+        },
+        {
+            "text": "Papua",
+            "children": [
+                {
+                    "id": 473,
+                    "text": "Kota Jayapura"
+                },
+                {
+                    "id": 474,
+                    "text": "Kab. Deiyai"
+                },
+                {
+                    "id": 475,
+                    "text": "Kab. Intan Jaya"
+                },
+                {
+                    "id": 476,
+                    "text": "Kab. Dogiyai"
+                },
+                {
+                    "id": 477,
+                    "text": "Kab. Puncak"
+                },
+                {
+                    "id": 478,
+                    "text": "Kab. Nduga"
+                },
+                {
+                    "id": 479,
+                    "text": "Kab. Lanny Jaya"
+                },
+                {
+                    "id": 480,
+                    "text": "Kab. Yalimo"
+                },
+                {
+                    "id": 481,
+                    "text": "Kab. Mamberamo Tengah"
+                },
+                {
+                    "id": 482,
+                    "text": "Kab. Mamberamo Raya"
+                },
+                {
+                    "id": 483,
+                    "text": "Kab. Supiori"
+                },
+                {
+                    "id": 484,
+                    "text": "Kab. Asmat"
+                },
+                {
+                    "id": 485,
+                    "text": "Kab. Mappi"
+                },
+                {
+                    "id": 486,
+                    "text": "Kab. Boven Digoel"
+                },
+                {
+                    "id": 487,
+                    "text": "Kab. Waropen"
+                },
+                {
+                    "id": 488,
+                    "text": "Kab. Tolikara"
+                },
+                {
+                    "id": 489,
+                    "text": "Kab. Yahukimo"
+                },
+                {
+                    "id": 490,
+                    "text": "Kab. Pegunungan Bintang"
+                },
+                {
+                    "id": 491,
+                    "text": "Kab. Keerom"
+                },
+                {
+                    "id": 492,
+                    "text": "Kab. Sarmi"
+                },
+                {
+                    "id": 493,
+                    "text": "Kab. Mimika"
+                },
+                {
+                    "id": 494,
+                    "text": "Kab. Paniai"
+                },
+                {
+                    "id": 495,
+                    "text": "Kab. Puncak Jaya"
+                },
+                {
+                    "id": 496,
+                    "text": "Kab. Biak Numfor"
+                },
+                {
+                    "id": 497,
+                    "text": "Kab. Kepulauan Yapen"
+                },
+                {
+                    "id": 498,
+                    "text": "Kab. Nabire"
+                },
+                {
+                    "id": 499,
+                    "text": "Kab. Jayapura"
+                },
+                {
+                    "id": 500,
+                    "text": "Kab. Jayawijaya"
+                },
+                {
+                    "id": 501,
+                    "text": "Kab. Merauke"
+                }
+            ]
+        },
+        {
+            "text": "Papua Barat",
+            "children": [
+                {
+                    "id": 502,
+                    "text": "Kota Sorong"
+                },
+                {
+                    "id": 503,
+                    "text": "Kab. Pegunungan Arfak"
+                },
+                {
+                    "id": 504,
+                    "text": "Kab. Manokwari Selatan"
+                },
+                {
+                    "id": 505,
+                    "text": "Kab. Maybrat"
+                },
+                {
+                    "id": 506,
+                    "text": "Kab. Tambrauw"
+                },
+                {
+                    "id": 507,
+                    "text": "Kab. Kaimana"
+                },
+                {
+                    "id": 508,
+                    "text": "Kab. Teluk Wondama"
+                },
+                {
+                    "id": 509,
+                    "text": "Kab. Teluk Bintuni"
+                },
+                {
+                    "id": 510,
+                    "text": "Kab. Raja Ampat"
+                },
+                {
+                    "id": 511,
+                    "text": "Kab. Sorong Selatan"
+                },
+                {
+                    "id": 512,
+                    "text": "Kab. Fak Fak"
+                },
+                {
+                    "id": 513,
+                    "text": "Kab. Manokwari"
+                },
+                {
+                    "id": 514,
+                    "text": "Kab. Sorong"
+                }
+            ]
+        }
     ]
-  },
-
-  {
-    "provinsi":"Sumatera Utara",
-    "kota":[      
-      "Kota Medan",
-      "Kota Pematang Siantar",
-      "Kota Sibolga",
-      "Kota Tanjung Balai",
-      "Kota Binjai",
-      "Kota Tebing Tinggi",
-      "Kota Padang Sidempuan",
-      "Kota Gunung Sitoli",
-      "Kab. Serdang Bedagai",
-      "Kab. Samosir ",
-      "Kab. Humbang Hasundutan",
-      "Kab. Pakpak Bharat",
-      "Kab. Nias Selatan",
-      "Kab. Mandailing Natal",
-      "Kab. Toba Samosir",
-      "Kab. Dairi",
-      "Kab. Labuhan Batu",
-      "Kab. Asahan",
-      "Kab. Simalungun",
-      "Kab. Deli Serdang",
-      "Kab. Karo",
-      "Kab. Langkat",
-      "Kab. Nias",
-      "Kab. Tapanuli Selatan",
-      "Kab. Tapanuli Utara",
-      "Kab. Tapanuli Tengah",
-      "Kab. Batu Bara",
-      "Kab. Padang Lawas Utara",
-      "Kab. Padang Lawas",
-      "Kab. Labuhanbatu Selatan",
-      "Kab. Labuhanbatu Utara",
-      "Kab. Nias Utara",
-      "Kab. Nias Barat"
-      ]
-  },
-
-  {
-    "provinsi":"Sumatera Barat",
-    "kota":[
-      "Kota Padang",
-      "Kota Solok",
-      "Kota Sawhlunto",
-      "Kota Padang Panjang",
-      "Kota Bukittinggi",
-      "Kota Payakumbuh",
-      "Kota Pariaman",
-      "Kab. Pasaman Barat",
-      "Kab. Solok Selatan",
-      "Kab. Dharmasraya",
-      "Kab. Kepulauan Mentawai",
-      "Kab. Pasaman",
-      "Kab. Lima Puluh Kota",
-      "Kab. Agam",
-      "Kab. Padang Pariaman",
-      "Kab. Tanah Datar",
-      "Kab. Sijunjung",
-      "Kab. Solok",
-      "Kab. Pesisir Selatan"
-    ]
-  },
-
-  {
-    "provinsi":"Riau",
-    "kota":[      
-      "Kota Pekan Baru",
-      "Kota Dumai",
-      "Kab. Kepulauan Meranti",
-      "Kab. Kuantan Singingi",
-      "Kab. Siak",
-      "Kab. Rokan Hilir",
-      "Kab. Rokan Hulu",
-      "Kab. Pelalawan",
-      "Kab. Indragiri Hilir",
-      "Kab. Bengkalis",
-      "Kab. Indragiri Hulu",
-      "Kab. Kampar"
-    ]
-  },
-
-  {
-    "provinsi":"Jambi",
-    "kota":[
-      "Kota Jambi",
-      "Kota Sungai Penuh",
-      "Kab. Tebo",
-      "Kab. Bungo",
-      "Kab. Tanjung Jabung Timur",
-      "Kab. Tanjung Jabung Barat",
-      "Kab. Muaro Jambi",
-      "Kab. Batanghari",
-      "Kab. Sarolangun",
-      "Kab. Merangin",
-      "Kab. Kerinci"
-    ]
-  },
-
-  {
-    "provinsi":"Sumatera Selatan",
-    "kota":[
-      "Kota Palembang",
-      "Kota Pagar Alam",
-      "Kota Lubuk Linggau",
-      "Kota Prabumulih",
-      "Kab. Musi Rawas Utara",
-      "Kab. Penukal Abab Lematang Ilir",
-      "Kab. Empat Lawang",
-      "Kab. Ogan Ilir ",
-      "Kab. Ogan Komering Ulu Selatan ",
-      "Kab. Ogan Komering Ulu Timur ",
-      "Kab. Banyuasin",
-      "Kab. Musi Banyuasin",
-      "Kab. Musi Rawas",
-      "Kab. Lahat",
-      "Kab. Muara Enim",
-      "Kab. Ogan Komering Ilir",
-      "Kab. Ogan Komering Ulu"
-    ]
-  },
-
-  {
-    "provinsi":"Bengkulu",
-    "kota":[
-      "Kota Bengkulu",
-      "Kab. Bengkulu Tengah",
-      "Kab. Kepahiang ",
-      "Kab. Lebong",
-      "Kab. Muko Muko",
-      "Kab. Seluma",
-      "Kab. Kaur",
-      "Kab. Bengkulu Utara",
-      "Kab. Rejang Lebong",
-      "Kab. Bengkulu Selatan"
-    ]
-  },
-
-  {
-    "provinsi":"Lampung",
-    "kota":[      
-      "Kota Bandar Lampung",
-      "Kota Metro",
-      "Kab. Pesisir Barat",
-      "Kab. Tulangbawang Barat",
-      "Kab. Mesuji",
-      "Kab. Pringsewu",
-      "Kab. Pesawaran",
-      "Kab. Way Kanan",
-      "Kab. Lampung Timur",
-      "Kab. Tanggamus",
-      "Kab. Tulang Bawang",
-      "Kab. Lampung Barat",
-      "Kab. Lampung Utara",
-      "Kab. Lampung Tengah",
-      "Kab. Lampung Selatan"
-    ]
-  },
-
-  {
-    "provinsi":"Kepulauan Bangka Belitung",
-    "kota":[
-      "Kota Pangkal Pinang",
-      "Kab. Belitung Timur",
-      "Kab. Bangka Barat",
-      "Kab. Bangka Tengah",
-      "Kab. Bangka Selatan",
-      "Kab. Belitung",
-      "Kab. Bangka"
-    ]
-  },
-  
-  {
-    "provinsi":"Kepulauan Riau",
-    "kota":[
-      "Kota Batam",
-      "Kota Tanjung Pinang",
-      "Kab. Kepulauan Anambas",
-      "Kab. Lingga ",
-      "Kab. Natuna",
-      "Kab. Karimun",
-      "Kab. Bintan"
-    ]
-  },
-
-  {
-    "provinsi":"DKI Jakarta",
-    "kota":[
-      "Kota Jakarta Timur",
-      "Kota Jakarta Selatan",
-      "Kota Jakarta Barat",
-      "Kota Jakarta Utara",
-      "Kota Jakarta Pusat",
-      "Kab. Kepulauan Seribu"
-    ]
-  },
-
-  {
-    "provinsi":"Jawa Barat",
-    "kota":[
-      "Kota Bandung",
-      "Kota Banjar",
-      "Kota Tasikmalaya",
-      "Kota Cimahi",
-      "Kota Depok",
-      "Kota Bekasi",
-      "Kota Cirebon",      
-      "Kota Sukabumi",
-      "Kota Bogor",
-      "Kab. Pangandaran",
-      "Kab. Bandung Barat",
-      "Kab. Bekasi",
-      "Kab. Karawang",
-      "Kab. Purwakarta",
-      "Kab. Subang",
-      "Kab. Indramayu",
-      "Kab. Sumedang",
-      "Kab. Majalengka",
-      "Kab. Cirebon",
-      "Kab. Kuningan",
-      "Kab. Ciamis",
-      "Kab. Tasikmalaya",
-      "Kab. Garut",
-      "Kab. Bandung",
-      "Kab. Cianjur",
-      "Kab. Sukabumi",
-      "Kab. Bogor"
-    ]
-  },
-
-  {
-    "provinsi":"Jawa Tengah",
-    "kota":[
-      "Kota Semarang",
-      "Kota Tegal",
-      "Kota Pekalongan",      
-      "Kota Salatiga",
-      "Kota Surakarta",
-      "Kota Magelang",
-      "Kab. Brebes",
-      "Kab. Tegal",
-      "Kab. Pemalang",
-      "Kab. Pekalongan",
-      "Kab. Batang",
-      "Kab. Kendal",
-      "Kab. Temanggung",
-      "Kab. Semarang",
-      "Kab. Demak",
-      "Kab. Jepara",
-      "Kab. Kudus",
-      "Kab. Pati",
-      "Kab. Rembang",
-      "Kab. Blora",
-      "Kab. Grobogan",
-      "Kab. Sragen",
-      "Kab. Karanganyar",
-      "Kab. Wonogiri",
-      "Kab. Sukoharjo",
-      "Kab. Klaten",
-      "Kab. Boyolali",
-      "Kab. Magelang",
-      "Kab. Wonosobo",
-      "Kab. Purworejo",
-      "Kab. Kebumen",
-      "Kab. Banjarnegara",
-      "Kab. Purbalingga",
-      "Kab. Banyumas",
-      "Kab. Cilacap"
-    ]
-  },
-
-  {
-    "provinsi":"DI Yogyakarta",
-    "kota":[
-      "Kota Yogyakarta",
-      "Kab. Sleman",
-      "Kab. Gunung Kidul",
-      "Kab. Bantul",
-      "Kab. Kulon Progo"
-    ]
-  },
-
-  {
-    "provinsi":"Jawa Timur",
-    "kota":[
-      "Kota Surabaya",
-      "Kota Batu",      
-      "Kota Madiun",
-      "Kota Mojokerto",
-      "Kota Pasuruan",
-      "Kota Probolinggo",
-      "Kota Malang",
-      "Kota Blitar",
-      "Kota Kediri",
-      "Kab. Sumenep",
-      "Kab. Pamekasan",
-      "Kab. Sampang",
-      "Kab. Bangkalan",
-      "Kab. Gresik",
-      "Kab. Lamongan",
-      "Kab. Tuban",
-      "Kab. Bojonegoro",
-      "Kab. Ngawi",
-      "Kab. Magetan",
-      "Kab. Madiun",
-      "Kab. Nganjuk",
-      "Kab. Jombang",
-      "Kab. Mojokerto",
-      "Kab. Sidoarjo",
-      "Kab. Pasuruan",
-      "Kab. Probolinggo",
-      "Kab. Situbondo",
-      "Kab. Bondowoso",
-      "Kab. Banyuwangi",
-      "Kab. Jember",
-      "Kab. Lumajang",
-      "Kab. Malang",
-      "Kab. Kediri",
-      "Kab. Blitar",
-      "Kab. Tulungagung",
-      "Kab. Trenggalek",
-      "Kab. Ponorogo",
-      "Kab. Pacitan"
-    ]
-  },
-
-  {
-    "provinsi":"Banten",
-    "kota":[
-      "Kota Serang",
-      "Kota Cilegon",
-      "Kota Tangerang",
-      "Kota Tangerang Selatan",
-      "Kab. Serang",
-      "Kab. Tangerang",
-      "Kab. Lebak",
-      "Kab. Pandeglang"
-    ]
-  },
-
-  {
-    "provinsi":"Bali",
-    "kota":[
-      "Kota Denpasar",
-      "Kab. Buleleng",
-      "Kab. Karangasem",
-      "Kab. Bangli",
-      "Kab. Klungkung",
-      "Kab. Gianyar",
-      "Kab. Badung",
-      "Kab. Tabanan",
-      "Kab. Jembrana"
-    ]
-  },
-
-  {
-    "provinsi":"Nusa Tenggara Barat",
-    "kota":[
-      "Kota Mataram",
-      "Kota Bima",
-      "Kab. Lombok Utara",  
-      "Kab. Sumbawa Barat",
-      "Kab. Bima",
-      "Kab. Dompu",
-      "Kab. Sumbawa ",
-      "Kab. Lombok Timur",
-      "Kab. Lombok Tengah",
-      "Kab. Lombok Barat"
-    ]
-  },
-
-  {
-    "provinsi":"Nusa Tenggara Timur",
-    "kota":[
-      "Kota Kupang",
-      "Kab. Malaka",
-      "Kab. Sabu Raijua",
-      "Kab. Manggarai Timur",
-      "Kab. Sumba Barat Daya",
-      "Kab. Sumba Tengah",
-      "Kab. Nagekeo",
-      "Kab. Manggarai Barat",
-      "Kab. Rote Ndao",
-      "Kab. Lembata",
-      "Kab. Sumba Barat",
-      "Kab. Sumba Timur",
-      "Kab. Manggarai",
-      "Kab. Ngada",
-      "Kab. Ende",
-      "Kab. Sikka",
-      "Kab. Flores Timur",
-      "Kab. Alor",
-      "Kab. Belu",
-      "Kab. Timor Tengah Utara",
-      "Kab. Timor Tengah Selatan",
-      "Kab. Kupang"
-    ]
-  },
-  {
-    "provinsi":"Kalimantan Barat",
-    "kota":[
-      "Kota Pontianak",
-      "Kota Singkawang",
-      "Kab. Kubu Raya",
-      "Kab. Kayong Utara",
-      "Kab. Sekadau",
-      "Kab. Melawi",
-      "Kab. Landak",
-      "Kab. Bengkayang",
-      "Kab. Kapuas Hulu",
-      "Kab. Sintang ",
-      "Kab. Ketapang",
-      "Kab. Sanggau ",
-      "Kab. Mempawah",
-      "Kab. Sambas"
-    ]
-  },
-
-  {
-    "provinsi":"Kalimantan Tengah",
-    "kota":[
-      "Kota Palangkaraya",
-      "Kab. Barito Timur",
-      "Kab. Murung Raya",
-      "Kab. Pulang Pisau",
-      "Kab. Gunung Mas",
-      "Kab. Lamandau",
-      "Kab. Sukamara",
-      "Kab. Seruyan",
-      "Kab. Katingan",
-      "Kab. Barito Utara",
-      "Kab. Barito Selatan",
-      "Kab. Kapuas",
-      "Kab. Kotawaringin Timur",
-      "Kab. Kotawaringin Barat"
-    ]
-  },
-
-  {
-    "provinsi":"Kalimantan Selatan",
-    "kota":[
-      "Kota Banjarmasin",
-      "Kota Banjarbaru",      
-      "Kab. Balangan",
-      "Kab. Tanah Bambu",
-      "Kab. Tabalong",
-      "Kab. Hulu Sungai Utara",
-      "Kab. Hulu Sungai Tengah",
-      "Kab. Hulu Sungai Selatan",
-      "Kab. Tapin",
-      "Kab. Barito Kuala",
-      "Kab. Banjar",
-      "Kab. Kotabaru",
-      "Kab. Tanah Laut"
-    ]
-  },
-
-  {
-    "provinsi":"Kalimantan Timur",
-    "kota":[
-      "Kota Samarinda",
-      "Kota Bontang",
-      "Kota Balikpapan",
-      "Kab. Mahakam Ulu",
-      "Kab. Penajam Paser Utara",
-      "Kab. Kutai Timur",
-      "Kab. Kutai Barat",
-      "Kab. Berau",
-      "Kab. Kutai Kertanegara",
-      "Kab. Paser"
-    ]
-  },
-
-  {
-    "provinsi":"Kalimantan Utara",
-    "kota":[
-      "Kota Tarakan",
-      "Kab. Tana Tidung",
-      "Kab. Nunukan",
-      "Kab. Malinau",
-      "Kab. Bulungan"
-    ]
-  },
-
-  {
-    "provinsi":"Sulawesi Utara",
-    "kota":[
-      "Kota Manado",
-      "Kota Tomohon",
-      "Kota Bitung",
-      "Kota Kotamobagu",
-      "Kab. Bolaang Mangondow Selatan",
-      "Kab. Bolaang Mangondow Timur",
-      "Kab. Kepulauan Siau Tagulandang Biaro",
-      "Kab. Bolaang Mangondow Utara",
-      "Kab. Minahasa Tenggara",
-      "Kab. Minahasa Utara",
-      "Kab. Minahasa Selatan",
-      "Kab. Kepulauan Talaud",
-      "Kab. Kepulauan Sangihe",
-      "Kab. Minahasa",
-      "Kab. Bolaang Mangondow"
-    ]
-  },
-
-  {
-    "provinsi":"Sulawesi Tengah",
-    "kota":[
-      "Kota Palu",
-      "Kab. Morowali Utara",
-      "Kab. Banggai Laut",
-      "Kab. Sigi",
-      "Kab. Tojo Una-Una",
-      "Kab. Parigi Moutong",
-      "Kab. Banggai Kepulauan",
-      "Kab. Morowali",
-      "Kab. Buol",
-      "Kab. Toli-Toli",
-      "Kab. Donggala",
-      "Kab. Poso",
-      "Kab. Banggai"
-    ]
-  },
-
-  {
-    "provinsi":"Sulawesi Selatan",
-    "kota":[
-      "Kota Makasar",
-      "Kota Palopo",
-      "Kota Pare Pare", 
-      "Kab. Toraja Utara",     
-      "Kab. Luwu Timur",
-      "Kab. Luwu Utara",
-      "Kab. Tana Toraja",
-      "Kab. Luwu",
-      "Kab. Enrekang",
-      "Kab. Pinrang",
-      "Kab. Sidenreng Rappang",
-      "Kab. Wajo",
-      "Kab. Soppeng",
-      "Kab. Barru",
-      "Kab. Pangkajene Kepulauan",
-      "Kab. Maros",
-      "Kab. Bone",
-      "Kab. Sinjai",
-      "Kab. Gowa",
-      "Kab. Takalar",
-      "Kab. Jeneponto",
-      "Kab. Bantaeng",
-      "Kab. Bulukumba",
-      "Kab. Kepulauan Selayar"
-    ]
-  },
-
-  {
-    "provinsi":"Sulawesi Tenggara",
-    "kota":[
-      "Kota Kendari",
-      "Kota Bau Bau",
-      "Kab. Buton Selatan",
-      "Kab. Buton Tengah",
-      "Kab. Muna Barat",
-      "Kab. Konawe Kepulauan",
-      "Kab. Kolaka Timur",
-      "Kab. Buton Utara",
-      "Kab. Konawe Utara",
-      "Kab. Kolaka Utara",
-      "Kab. Wakatobi",
-      "Kab. Bombana",
-      "Kab. Konawe Selatan",
-      "Kab. Buton",
-      "Kab. Muna",
-      "Kab. Konawe",
-      "Kab. Kolaka"
-    ]
-  },
-
-  {
-    "provinsi":"Gorontalo",
-    "kota":[
-      "Kota Gorontalo",
-      "Kab. Pohuwato",
-      "Kab. Bone Bolango",
-      "Kab. Boalemo",
-      "Kab. Gorontalo",
-      "Kab. Gorontalo Utara"
-    ]
-  },
-
-  {
-    "provinsi":"Sulawesi Barat",
-    "kota":[
-      "Kab. Majene",
-      "Kab. Polowali Mandar",
-      "Kab. Mamasa",
-      "Kab. Mamuju",
-      "Kab. Mamuju Utara",
-      "Kab. Mamuju Tengah"
-    ]
-  },
-
-  {
-    "provinsi":"Maluku",
-    "kota":[
-      "Kota Ambon",
-      "Kota Tual",
-      "Kab. Buru Selatan",
-      "Kab. Maluku Barat Daya",
-      "Kab. Kepulauan Aru",
-      "Kab. Seram Bagian Barat ",
-      "Kab. Seram Bagian Timur",
-      "Kab. Buru",      
-      "Kab. Maluku Tenggara Barat",
-      "Kab. Maluku Tenggara",
-      "Kab. Maluku Tengah"
-    ]
-  },
-
-  {
-    "provinsi":"Maluku Utara",
-    "kota":[
-      "Kota Ternate",
-      "Kota Tidore Kepulauan",
-      "Kab. Pulau Taliabu",
-      "Kab. Pulau Morotai",
-      "Kab. Halmahera Timur",
-      "Kab. Kepulauan Sula",
-      "Kab. Halmahera Selatan",
-      "Kab. Halmahera Utara",
-      "Kab. Halmahera Tengah",
-      "Kab. Halmahera Barat"
-    ]
-  },
-
-  {
-    "provinsi":"Papua",
-    "kota":[
-      "Kota Jayapura",
-      "Kab. Deiyai",
-      "Kab. Intan Jaya",
-      "Kab. Dogiyai",
-      "Kab. Puncak",
-      "Kab. Nduga",
-      "Kab. Lanny Jaya",
-      "Kab. Yalimo",
-      "Kab. Mamberamo Tengah",
-      "Kab. Mamberamo Raya",
-      "Kab. Supiori",
-      "Kab. Asmat",
-      "Kab. Mappi",
-      "Kab. Boven Digoel",
-      "Kab. Waropen",
-      "Kab. Tolikara",
-      "Kab. Yahukimo",
-      "Kab. Pegunungan Bintang",
-      "Kab. Keerom",
-      "Kab. Sarmi",
-      "Kab. Mimika",
-      "Kab. Paniai",
-      "Kab. Puncak Jaya",
-      "Kab. Biak Numfor",
-      "Kab. Kepulauan Yapen",
-      "Kab. Nabire",
-      "Kab. Jayapura",
-      "Kab. Jayawijaya",
-      "Kab. Merauke"
-    ]
-  },
-
-  {
-    "provinsi":"Papua Barat",
-    "kota":[
-      "Kota Sorong",      
-      "Kab. Pegunungan Arfak",
-      "Kab. Manokwari Selatan",
-      "Kab. Maybrat",
-      "Kab. Tambrauw",
-      "Kab. Kaimana",
-      "Kab. Teluk Wondama",
-      "Kab. Teluk Bintuni",
-      "Kab. Raja Ampat",
-      "Kab. Sorong Selatan",
-      "Kab. Fak Fak",
-      "Kab. Manokwari",
-      "Kab. Sorong"
-    ]
-  }
-]
+}
diff --git a/public/index.php b/public/index.php
index e789459..9be5682 100644
--- a/public/index.php
+++ b/public/index.php
@@ -3,6 +3,7 @@
 <head>
 	<title>VNL Member Attendance Form</title>
 	<link rel="stylesheet" type="text/css" href="assets/css/bootstrap.min.css"/>
+	<link rel="stylesheet" type="text/css" href="assets/css/select2.min.css"/>
 </head>
 <body>
 	<div class="container">
@@ -18,10 +19,8 @@
 					<input type="text" class="form-control" id="phone_number"/>
 				</div>
 				<div class="mb-3">
-					<label for="phone_number" class="form-label">City</label>
-					<select class="form-select" aria-label="Default select example">
-						<option value="" selected>Open this select menu</option>
-					</select>
+					<label for="city" class="form-label">City</label>
+					<select id="city" class="form-control"></select>
 				</div>
 				<div class="mb-3">
 					<label for="email" class="form-label">Email address</label>
@@ -31,6 +30,22 @@
 			</form>
 		</div>
 	</div>
+	<script type="text/javascript" src="assets/js/jquery-3.6.1.min.js"></script>
 	<script type="text/javascript" src="assets/js/bootstrap.min.js"></script>
+	<script type="text/javascript" src="assets/js/select2.full.min.js"></script>
+	<script type="text/javascript">
+		function load_select2_city(data)
+		{
+			$("#city").select2({
+				data: data.results
+			});
+		}
+
+		$.ajax({
+			url: "assets/regions.json",
+			dataType: "json",
+			success: load_select2_city
+		});
+	</script>
 </body>
 </html>
-- 
Ammar Faizi


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v1 04/13] index: Add social media accounts input
  2022-11-27 20:32 [PATCH v1 00/13] App for member attendance record at Senayan Park, Jakarta Ammar Faizi
                   ` (2 preceding siblings ...)
  2022-11-27 20:32 ` [PATCH v1 03/13] index: Integrate city data with the form Ammar Faizi
@ 2022-11-27 20:32 ` Ammar Faizi
  2022-11-27 20:32 ` [PATCH v1 05/13] index: Add a red star to the required fields Ammar Faizi
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Ammar Faizi @ 2022-11-27 20:32 UTC (permalink / raw)
  To: Gilang Fachrezy
  Cc: Ammar Faizi, Taufiq Pohan, Aldy Prastyo,
	Muhammad Fitrah Pandjalu, Nauvalsa Yanandana,
	GNU/Weeb Mailing List, VNLX Kernel Department

The user must fill the social media accounts at least one.

Co-authored-by: Muhammad Fitrah Pandjalu <[email protected]>
Signed-off-by: Muhammad Fitrah Pandjalu <[email protected]>
Co-authored-by: Taufiq Pohan <[email protected]>
Signed-off-by: Taufiq Pohan <[email protected]>
Co-authored-by: Nauvalsa Yanandana <[email protected]>
Signed-off-by: Nauvalsa Yanandana <[email protected]>
Signed-off-by: Ammar Faizi <[email protected]>
---
 public/index.php | 32 ++++++++++++++++++++++++++------
 1 file changed, 26 insertions(+), 6 deletions(-)

diff --git a/public/index.php b/public/index.php
index 9be5682..acdd560 100644
--- a/public/index.php
+++ b/public/index.php
@@ -6,7 +6,7 @@
 	<link rel="stylesheet" type="text/css" href="assets/css/select2.min.css"/>
 </head>
 <body>
-	<div class="container">
+	<div class="container p-5">
 		<h1 class="text-center">VNL Member Attendance Form</h1>
 		<div>
 			<form>
@@ -14,19 +14,39 @@
 					<label for="full_name" class="form-label">Full Name</label>
 					<input type="text" class="form-control" id="full_name"/>
 				</div>
-				<div class="mb-3">
-					<label for="phone_number" class="form-label">Phone Number</label>
-					<input type="text" class="form-control" id="phone_number"/>
-				</div>
 				<div class="mb-3">
 					<label for="city" class="form-label">City</label>
 					<select id="city" class="form-control"></select>
 				</div>
+				<div class="mb-3">
+					<label for="phone_number" class="form-label">Phone Number</label>
+					<input type="text" class="form-control" id="phone_number"/>
+				</div>
 				<div class="mb-3">
 					<label for="email" class="form-label">Email address</label>
 					<input type="email" class="form-control" id="email"/>
 				</div>
-				<button type="submit" class="btn btn-primary">Submit</button>
+				<div class="border container p-3 border-3 border-dark rounded-3">
+					<h4>Social Media Accounts</h4>
+					<p class="text-danger">Must be filled at least one!</p>
+					<div class="mb-3">
+						<label for="email" class="form-label">Facebook ID / Username</label>
+						<input type="email" class="form-control" id="facebook_link"/>
+					</div>
+					<div class="mb-3">
+						<label for="email" class="form-label">Twitter Username</label>
+						<input type="email" class="form-control" id="twitter_username" placeholder="@username"/>
+					</div>
+					<div class="mb-3">
+						<label for="email" class="form-label">Discord Username</label>
+						<input type="email" class="form-control" id="discord_username" placeholder="username#1234"/>
+					</div>
+					<div class="mb-3">
+						<label for="email" class="form-label">GitHub Username</label>
+						<input type="email" class="form-control" id="github_username" placeholder="@username"/>
+					</div>
+				</div>
+				<button type="submit" class="btn btn-primary mt-3">Submit</button>
 			</form>
 		</div>
 	</div>
-- 
Ammar Faizi


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v1 05/13] index: Add a red star to the required fields
  2022-11-27 20:32 [PATCH v1 00/13] App for member attendance record at Senayan Park, Jakarta Ammar Faizi
                   ` (3 preceding siblings ...)
  2022-11-27 20:32 ` [PATCH v1 04/13] index: Add social media accounts input Ammar Faizi
@ 2022-11-27 20:32 ` Ammar Faizi
  2022-11-27 20:32 ` [PATCH v1 06/13] index: city: Add "select the city" option on blank form Ammar Faizi
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Ammar Faizi @ 2022-11-27 20:32 UTC (permalink / raw)
  To: Gilang Fachrezy
  Cc: Ammar Faizi, Taufiq Pohan, Aldy Prastyo,
	Muhammad Fitrah Pandjalu, Nauvalsa Yanandana,
	GNU/Weeb Mailing List, VNLX Kernel Department

To mark that the field has to be filled.

Co-authored-by: Muhammad Fitrah Pandjalu <[email protected]>
Signed-off-by: Muhammad Fitrah Pandjalu <[email protected]>
Co-authored-by: Taufiq Pohan <[email protected]>
Signed-off-by: Taufiq Pohan <[email protected]>
Co-authored-by: Nauvalsa Yanandana <[email protected]>
Signed-off-by: Nauvalsa Yanandana <[email protected]>
Signed-off-by: Ammar Faizi <[email protected]>
---
 public/index.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/public/index.php b/public/index.php
index acdd560..8587c95 100644
--- a/public/index.php
+++ b/public/index.php
@@ -11,19 +11,19 @@
 		<div>
 			<form>
 				<div class="mb-3">
-					<label for="full_name" class="form-label">Full Name</label>
+					<label for="full_name" class="form-label">Full Name <span class="text-danger">*</span></label>
 					<input type="text" class="form-control" id="full_name"/>
 				</div>
 				<div class="mb-3">
-					<label for="city" class="form-label">City</label>
+					<label for="city" class="form-label">City  <span class="text-danger">*</span></label>
 					<select id="city" class="form-control"></select>
 				</div>
 				<div class="mb-3">
-					<label for="phone_number" class="form-label">Phone Number</label>
+					<label for="phone_number" class="form-label">Phone Number  <span class="text-danger">*</span></label>
 					<input type="text" class="form-control" id="phone_number"/>
 				</div>
 				<div class="mb-3">
-					<label for="email" class="form-label">Email address</label>
+					<label for="email" class="form-label">Email address  <span class="text-danger">*</span></label>
 					<input type="email" class="form-control" id="email"/>
 				</div>
 				<div class="border container p-3 border-3 border-dark rounded-3">
-- 
Ammar Faizi


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v1 06/13] index: city: Add "select the city" option on blank form
  2022-11-27 20:32 [PATCH v1 00/13] App for member attendance record at Senayan Park, Jakarta Ammar Faizi
                   ` (4 preceding siblings ...)
  2022-11-27 20:32 ` [PATCH v1 05/13] index: Add a red star to the required fields Ammar Faizi
@ 2022-11-27 20:32 ` Ammar Faizi
  2022-11-27 20:32 ` [PATCH v1 07/13] Export the DDL Ammar Faizi
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Ammar Faizi @ 2022-11-27 20:32 UTC (permalink / raw)
  To: Gilang Fachrezy
  Cc: Ammar Faizi, Taufiq Pohan, Aldy Prastyo,
	Muhammad Fitrah Pandjalu, Nauvalsa Yanandana,
	GNU/Weeb Mailing List, VNLX Kernel Department

This informs the user to select the city.

Co-authored-by: Muhammad Fitrah Pandjalu <[email protected]>
Signed-off-by: Muhammad Fitrah Pandjalu <[email protected]>
Co-authored-by: Taufiq Pohan <[email protected]>
Signed-off-by: Taufiq Pohan <[email protected]>
Signed-off-by: Ammar Faizi <[email protected]>
---
 public/assets/regions.json | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/public/assets/regions.json b/public/assets/regions.json
index db3f671..57ff233 100644
--- a/public/assets/regions.json
+++ b/public/assets/regions.json
@@ -1,5 +1,14 @@
 {
     "results": [
+        {
+            "text": "Province",
+            "children": [
+                {
+                    "id": 0,
+                    "text": "Select the city"
+                }
+            ]
+        },
         {
             "text": "Aceh",
             "children": [
-- 
Ammar Faizi


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v1 07/13] Export the DDL
  2022-11-27 20:32 [PATCH v1 00/13] App for member attendance record at Senayan Park, Jakarta Ammar Faizi
                   ` (5 preceding siblings ...)
  2022-11-27 20:32 ` [PATCH v1 06/13] index: city: Add "select the city" option on blank form Ammar Faizi
@ 2022-11-27 20:32 ` Ammar Faizi
  2022-11-27 20:32 ` [PATCH v1 08/13] Initial work on the database integration Ammar Faizi
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Ammar Faizi @ 2022-11-27 20:32 UTC (permalink / raw)
  To: Gilang Fachrezy
  Cc: Ammar Faizi, Taufiq Pohan, Aldy Prastyo,
	Muhammad Fitrah Pandjalu, Nauvalsa Yanandana,
	GNU/Weeb Mailing List, VNLX Kernel Department

Initial work of the database part.

Co-authored-by: Muhammad Fitrah Pandjalu <[email protected]>
Signed-off-by: Muhammad Fitrah Pandjalu <[email protected]>
Co-authored-by: Taufiq Pohan <[email protected]>
Signed-off-by: Taufiq Pohan <[email protected]>
Signed-off-by: Ammar Faizi <[email protected]>
---
 database.sql | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)
 create mode 100644 database.sql

diff --git a/database.sql b/database.sql
new file mode 100644
index 0000000..909d987
--- /dev/null
+++ b/database.sql
@@ -0,0 +1,57 @@
+-- Adminer 4.8.1 MySQL 8.0.31-0ubuntu0.22.04.1 dump
+
+SET NAMES utf8;
+SET time_zone = '+00:00';
+SET foreign_key_checks = 0;
+SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
+
+SET NAMES utf8mb4;
+
+DROP TABLE IF EXISTS `attendances`;
+CREATE TABLE `attendances` (
+  `id` int unsigned NOT NULL AUTO_INCREMENT,
+  `city_id` int unsigned DEFAULT NULL,
+  `full_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci NOT NULL,
+  `phone_number` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
+  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
+  `facebook_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
+  `twitter_username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
+  `discord_username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
+  `github_username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
+  `created_at` datetime DEFAULT NULL,
+  PRIMARY KEY (`id`),
+  KEY `full_name` (`full_name`),
+  KEY `phone_number` (`phone_number`),
+  KEY `email` (`email`),
+  KEY `facebook_id` (`facebook_id`),
+  KEY `twitter_username` (`twitter_username`),
+  KEY `discord_username` (`discord_username`),
+  KEY `github_username` (`github_username`),
+  KEY `created_at` (`created_at`),
+  KEY `city_id` (`city_id`),
+  CONSTRAINT `attendances_ibfk_2` FOREIGN KEY (`city_id`) REFERENCES `cities` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
+
+
+DROP TABLE IF EXISTS `cities`;
+CREATE TABLE `cities` (
+  `id` int unsigned NOT NULL AUTO_INCREMENT,
+  `province_id` tinyint unsigned NOT NULL,
+  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
+  PRIMARY KEY (`id`),
+  KEY `name` (`name`),
+  KEY `province_id` (`province_id`),
+  CONSTRAINT `cities_ibfk_3` FOREIGN KEY (`province_id`) REFERENCES `provinces` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
+
+
+DROP TABLE IF EXISTS `provinces`;
+CREATE TABLE `provinces` (
+  `id` tinyint unsigned NOT NULL AUTO_INCREMENT,
+  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `name` (`name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
+
+
+-- 2022-11-27 18:33:10
-- 
Ammar Faizi


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v1 08/13] Initial work on the database integration
  2022-11-27 20:32 [PATCH v1 00/13] App for member attendance record at Senayan Park, Jakarta Ammar Faizi
                   ` (6 preceding siblings ...)
  2022-11-27 20:32 ` [PATCH v1 07/13] Export the DDL Ammar Faizi
@ 2022-11-27 20:32 ` Ammar Faizi
  2022-11-27 20:32 ` [PATCH v1 09/13] Create initial API integration Ammar Faizi
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Ammar Faizi @ 2022-11-27 20:32 UTC (permalink / raw)
  To: Gilang Fachrezy
  Cc: Ammar Faizi, Taufiq Pohan, Aldy Prastyo,
	Muhammad Fitrah Pandjalu, Nauvalsa Yanandana,
	GNU/Weeb Mailing List, VNLX Kernel Department

This creates provinces and cities dataset in the MySQL database.

Co-authored-by: Muhammad Fitrah Pandjalu <[email protected]>
Signed-off-by: Muhammad Fitrah Pandjalu <[email protected]>
Co-authored-by: Taufiq Pohan <[email protected]>
Signed-off-by: Taufiq Pohan <[email protected]>
Signed-off-by: Ammar Faizi <[email protected]>
---
 .gitignore         |   1 +
 config.example.php |  16 ++
 database.sql       | 552 ++++++++++++++++++++++++++++++++++++++++++++-
 fill.php           |  21 ++
 helpers.php        |   8 +
 public/api.php     |   6 +
 6 files changed, 603 insertions(+), 1 deletion(-)
 create mode 100644 .gitignore
 create mode 100644 config.example.php
 create mode 100644 fill.php
 create mode 100644 helpers.php
 create mode 100644 public/api.php

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..b74decb
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/config.php
diff --git a/config.example.php b/config.example.php
new file mode 100644
index 0000000..a1d5e3f
--- /dev/null
+++ b/config.example.php
@@ -0,0 +1,16 @@
+<?php
+
+const DB_HOST = "127.0.0.1";
+const DB_PORT = 3306;
+const DB_NAME = "attendances";
+const DB_USER = "root";
+const DB_PASS = "";
+
+const PDO_PARAM = [
+	"mysql:host=".DB_HOST.";dbname=".DB_NAME.";port=".DB_PORT,
+	DB_USER,
+	DB_PASS,
+	[
+		PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
+	]
+];
diff --git a/database.sql b/database.sql
index 909d987..18da728 100644
--- a/database.sql
+++ b/database.sql
@@ -44,6 +44,521 @@ CREATE TABLE `cities` (
   CONSTRAINT `cities_ibfk_3` FOREIGN KEY (`province_id`) REFERENCES `provinces` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
 
+INSERT INTO `cities` (`id`, `province_id`, `name`) VALUES
+(1, 1,  'Kota Banda Aceh'),
+(2, 1,  'Kota Sabang'),
+(3, 1,  'Kota Lhokseumawe'),
+(4, 1,  'Kota Langsa'),
+(5, 1,  'Kota Subulussalam'),
+(6, 1,  'Kab. Aceh Selatan'),
+(7, 1,  'Kab. Aceh Tenggara'),
+(8, 1,  'Kab. Aceh Timur'),
+(9, 1,  'Kab. Aceh Tengah'),
+(10,  1,  'Kab. Aceh Barat'),
+(11,  1,  'Kab. Aceh Besar'),
+(12,  1,  'Kab. Pidie'),
+(13,  1,  'Kab. Aceh Utara'),
+(14,  1,  'Kab. Simeulue'),
+(15,  1,  'Kab. Aceh Singkil'),
+(16,  1,  'Kab. Bireun'),
+(17,  1,  'Kab. Aceh Barat Daya'),
+(18,  1,  'Kab. Gayo Lues'),
+(19,  1,  'Kab. Aceh Jaya'),
+(20,  1,  'Kab. Nagan Raya'),
+(21,  1,  'Kab. Aceh Tamiang'),
+(22,  1,  'Kab. Bener Meriah'),
+(23,  1,  'Kab. Pidie Jaya'),
+(24,  2,  'Kota Medan'),
+(25,  2,  'Kota Pematang Siantar'),
+(26,  2,  'Kota Sibolga'),
+(27,  2,  'Kota Tanjung Balai'),
+(28,  2,  'Kota Binjai'),
+(29,  2,  'Kota Tebing Tinggi'),
+(30,  2,  'Kota Padang Sidempuan'),
+(31,  2,  'Kota Gunung Sitoli'),
+(32,  2,  'Kab. Serdang Bedagai'),
+(33,  2,  'Kab. Samosir '),
+(34,  2,  'Kab. Humbang Hasundutan'),
+(35,  2,  'Kab. Pakpak Bharat'),
+(36,  2,  'Kab. Nias Selatan'),
+(37,  2,  'Kab. Mandailing Natal'),
+(38,  2,  'Kab. Toba Samosir'),
+(39,  2,  'Kab. Dairi'),
+(40,  2,  'Kab. Labuhan Batu'),
+(41,  2,  'Kab. Asahan'),
+(42,  2,  'Kab. Simalungun'),
+(43,  2,  'Kab. Deli Serdang'),
+(44,  2,  'Kab. Karo'),
+(45,  2,  'Kab. Langkat'),
+(46,  2,  'Kab. Nias'),
+(47,  2,  'Kab. Tapanuli Selatan'),
+(48,  2,  'Kab. Tapanuli Utara'),
+(49,  2,  'Kab. Tapanuli Tengah'),
+(50,  2,  'Kab. Batu Bara'),
+(51,  2,  'Kab. Padang Lawas Utara'),
+(52,  2,  'Kab. Padang Lawas'),
+(53,  2,  'Kab. Labuhanbatu Selatan'),
+(54,  2,  'Kab. Labuhanbatu Utara'),
+(55,  2,  'Kab. Nias Utara'),
+(56,  2,  'Kab. Nias Barat'),
+(57,  3,  'Kota Padang'),
+(58,  3,  'Kota Solok'),
+(59,  3,  'Kota Sawhlunto'),
+(60,  3,  'Kota Padang Panjang'),
+(61,  3,  'Kota Bukittinggi'),
+(62,  3,  'Kota Payakumbuh'),
+(63,  3,  'Kota Pariaman'),
+(64,  3,  'Kab. Pasaman Barat'),
+(65,  3,  'Kab. Solok Selatan'),
+(66,  3,  'Kab. Dharmasraya'),
+(67,  3,  'Kab. Kepulauan Mentawai'),
+(68,  3,  'Kab. Pasaman'),
+(69,  3,  'Kab. Lima Puluh Kota'),
+(70,  3,  'Kab. Agam'),
+(71,  3,  'Kab. Padang Pariaman'),
+(72,  3,  'Kab. Tanah Datar'),
+(73,  3,  'Kab. Sijunjung'),
+(74,  3,  'Kab. Solok'),
+(75,  3,  'Kab. Pesisir Selatan'),
+(76,  4,  'Kota Pekan Baru'),
+(77,  4,  'Kota Dumai'),
+(78,  4,  'Kab. Kepulauan Meranti'),
+(79,  4,  'Kab. Kuantan Singingi'),
+(80,  4,  'Kab. Siak'),
+(81,  4,  'Kab. Rokan Hilir'),
+(82,  4,  'Kab. Rokan Hulu'),
+(83,  4,  'Kab. Pelalawan'),
+(84,  4,  'Kab. Indragiri Hilir'),
+(85,  4,  'Kab. Bengkalis'),
+(86,  4,  'Kab. Indragiri Hulu'),
+(87,  4,  'Kab. Kampar'),
+(88,  5,  'Kota Jambi'),
+(89,  5,  'Kota Sungai Penuh'),
+(90,  5,  'Kab. Tebo'),
+(91,  5,  'Kab. Bungo'),
+(92,  5,  'Kab. Tanjung Jabung Timur'),
+(93,  5,  'Kab. Tanjung Jabung Barat'),
+(94,  5,  'Kab. Muaro Jambi'),
+(95,  5,  'Kab. Batanghari'),
+(96,  5,  'Kab. Sarolangun'),
+(97,  5,  'Kab. Merangin'),
+(98,  5,  'Kab. Kerinci'),
+(99,  6,  'Kota Palembang'),
+(100, 6,  'Kota Pagar Alam'),
+(101, 6,  'Kota Lubuk Linggau'),
+(102, 6,  'Kota Prabumulih'),
+(103, 6,  'Kab. Musi Rawas Utara'),
+(104, 6,  'Kab. Penukal Abab Lematang Ilir'),
+(105, 6,  'Kab. Empat Lawang'),
+(106, 6,  'Kab. Ogan Ilir '),
+(107, 6,  'Kab. Ogan Komering Ulu Selatan '),
+(108, 6,  'Kab. Ogan Komering Ulu Timur '),
+(109, 6,  'Kab. Banyuasin'),
+(110, 6,  'Kab. Musi Banyuasin'),
+(111, 6,  'Kab. Musi Rawas'),
+(112, 6,  'Kab. Lahat'),
+(113, 6,  'Kab. Muara Enim'),
+(114, 6,  'Kab. Ogan Komering Ilir'),
+(115, 6,  'Kab. Ogan Komering Ulu'),
+(116, 7,  'Kota Bengkulu'),
+(117, 7,  'Kab. Bengkulu Tengah'),
+(118, 7,  'Kab. Kepahiang '),
+(119, 7,  'Kab. Lebong'),
+(120, 7,  'Kab. Muko Muko'),
+(121, 7,  'Kab. Seluma'),
+(122, 7,  'Kab. Kaur'),
+(123, 7,  'Kab. Bengkulu Utara'),
+(124, 7,  'Kab. Rejang Lebong'),
+(125, 7,  'Kab. Bengkulu Selatan'),
+(126, 8,  'Kota Bandar Lampung'),
+(127, 8,  'Kota Metro'),
+(128, 8,  'Kab. Pesisir Barat'),
+(129, 8,  'Kab. Tulangbawang Barat'),
+(130, 8,  'Kab. Mesuji'),
+(131, 8,  'Kab. Pringsewu'),
+(132, 8,  'Kab. Pesawaran'),
+(133, 8,  'Kab. Way Kanan'),
+(134, 8,  'Kab. Lampung Timur'),
+(135, 8,  'Kab. Tanggamus'),
+(136, 8,  'Kab. Tulang Bawang'),
+(137, 8,  'Kab. Lampung Barat'),
+(138, 8,  'Kab. Lampung Utara'),
+(139, 8,  'Kab. Lampung Tengah'),
+(140, 8,  'Kab. Lampung Selatan'),
+(141, 9,  'Kota Pangkal Pinang'),
+(142, 9,  'Kab. Belitung Timur'),
+(143, 9,  'Kab. Bangka Barat'),
+(144, 9,  'Kab. Bangka Tengah'),
+(145, 9,  'Kab. Bangka Selatan'),
+(146, 9,  'Kab. Belitung'),
+(147, 9,  'Kab. Bangka'),
+(148, 10, 'Kota Batam'),
+(149, 10, 'Kota Tanjung Pinang'),
+(150, 10, 'Kab. Kepulauan Anambas'),
+(151, 10, 'Kab. Lingga '),
+(152, 10, 'Kab. Natuna'),
+(153, 10, 'Kab. Karimun'),
+(154, 10, 'Kab. Bintan'),
+(155, 11, 'Kota Jakarta Timur'),
+(156, 11, 'Kota Jakarta Selatan'),
+(157, 11, 'Kota Jakarta Barat'),
+(158, 11, 'Kota Jakarta Utara'),
+(159, 11, 'Kota Jakarta Pusat'),
+(160, 11, 'Kab. Kepulauan Seribu'),
+(161, 12, 'Kota Bandung'),
+(162, 12, 'Kota Banjar'),
+(163, 12, 'Kota Tasikmalaya'),
+(164, 12, 'Kota Cimahi'),
+(165, 12, 'Kota Depok'),
+(166, 12, 'Kota Bekasi'),
+(167, 12, 'Kota Cirebon'),
+(168, 12, 'Kota Sukabumi'),
+(169, 12, 'Kota Bogor'),
+(170, 12, 'Kab. Pangandaran'),
+(171, 12, 'Kab. Bandung Barat'),
+(172, 12, 'Kab. Bekasi'),
+(173, 12, 'Kab. Karawang'),
+(174, 12, 'Kab. Purwakarta'),
+(175, 12, 'Kab. Subang'),
+(176, 12, 'Kab. Indramayu'),
+(177, 12, 'Kab. Sumedang'),
+(178, 12, 'Kab. Majalengka'),
+(179, 12, 'Kab. Cirebon'),
+(180, 12, 'Kab. Kuningan'),
+(181, 12, 'Kab. Ciamis'),
+(182, 12, 'Kab. Tasikmalaya'),
+(183, 12, 'Kab. Garut'),
+(184, 12, 'Kab. Bandung'),
+(185, 12, 'Kab. Cianjur'),
+(186, 12, 'Kab. Sukabumi'),
+(187, 12, 'Kab. Bogor'),
+(188, 13, 'Kota Semarang'),
+(189, 13, 'Kota Tegal'),
+(190, 13, 'Kota Pekalongan'),
+(191, 13, 'Kota Salatiga'),
+(192, 13, 'Kota Surakarta'),
+(193, 13, 'Kota Magelang'),
+(194, 13, 'Kab. Brebes'),
+(195, 13, 'Kab. Tegal'),
+(196, 13, 'Kab. Pemalang'),
+(197, 13, 'Kab. Pekalongan'),
+(198, 13, 'Kab. Batang'),
+(199, 13, 'Kab. Kendal'),
+(200, 13, 'Kab. Temanggung'),
+(201, 13, 'Kab. Semarang'),
+(202, 13, 'Kab. Demak'),
+(203, 13, 'Kab. Jepara'),
+(204, 13, 'Kab. Kudus'),
+(205, 13, 'Kab. Pati'),
+(206, 13, 'Kab. Rembang'),
+(207, 13, 'Kab. Blora'),
+(208, 13, 'Kab. Grobogan'),
+(209, 13, 'Kab. Sragen'),
+(210, 13, 'Kab. Karanganyar'),
+(211, 13, 'Kab. Wonogiri'),
+(212, 13, 'Kab. Sukoharjo'),
+(213, 13, 'Kab. Klaten'),
+(214, 13, 'Kab. Boyolali'),
+(215, 13, 'Kab. Magelang'),
+(216, 13, 'Kab. Wonosobo'),
+(217, 13, 'Kab. Purworejo'),
+(218, 13, 'Kab. Kebumen'),
+(219, 13, 'Kab. Banjarnegara'),
+(220, 13, 'Kab. Purbalingga'),
+(221, 13, 'Kab. Banyumas'),
+(222, 13, 'Kab. Cilacap'),
+(223, 14, 'Kota Yogyakarta'),
+(224, 14, 'Kab. Sleman'),
+(225, 14, 'Kab. Gunung Kidul'),
+(226, 14, 'Kab. Bantul'),
+(227, 14, 'Kab. Kulon Progo'),
+(228, 15, 'Kota Surabaya'),
+(229, 15, 'Kota Batu'),
+(230, 15, 'Kota Madiun'),
+(231, 15, 'Kota Mojokerto'),
+(232, 15, 'Kota Pasuruan'),
+(233, 15, 'Kota Probolinggo'),
+(234, 15, 'Kota Malang'),
+(235, 15, 'Kota Blitar'),
+(236, 15, 'Kota Kediri'),
+(237, 15, 'Kab. Sumenep'),
+(238, 15, 'Kab. Pamekasan'),
+(239, 15, 'Kab. Sampang'),
+(240, 15, 'Kab. Bangkalan'),
+(241, 15, 'Kab. Gresik'),
+(242, 15, 'Kab. Lamongan'),
+(243, 15, 'Kab. Tuban'),
+(244, 15, 'Kab. Bojonegoro'),
+(245, 15, 'Kab. Ngawi'),
+(246, 15, 'Kab. Magetan'),
+(247, 15, 'Kab. Madiun'),
+(248, 15, 'Kab. Nganjuk'),
+(249, 15, 'Kab. Jombang'),
+(250, 15, 'Kab. Mojokerto'),
+(251, 15, 'Kab. Sidoarjo'),
+(252, 15, 'Kab. Pasuruan'),
+(253, 15, 'Kab. Probolinggo'),
+(254, 15, 'Kab. Situbondo'),
+(255, 15, 'Kab. Bondowoso'),
+(256, 15, 'Kab. Banyuwangi'),
+(257, 15, 'Kab. Jember'),
+(258, 15, 'Kab. Lumajang'),
+(259, 15, 'Kab. Malang'),
+(260, 15, 'Kab. Kediri'),
+(261, 15, 'Kab. Blitar'),
+(262, 15, 'Kab. Tulungagung'),
+(263, 15, 'Kab. Trenggalek'),
+(264, 15, 'Kab. Ponorogo'),
+(265, 15, 'Kab. Pacitan'),
+(266, 16, 'Kota Serang'),
+(267, 16, 'Kota Cilegon'),
+(268, 16, 'Kota Tangerang'),
+(269, 16, 'Kota Tangerang Selatan'),
+(270, 16, 'Kab. Serang'),
+(271, 16, 'Kab. Tangerang'),
+(272, 16, 'Kab. Lebak'),
+(273, 16, 'Kab. Pandeglang'),
+(274, 17, 'Kota Denpasar'),
+(275, 17, 'Kab. Buleleng'),
+(276, 17, 'Kab. Karangasem'),
+(277, 17, 'Kab. Bangli'),
+(278, 17, 'Kab. Klungkung'),
+(279, 17, 'Kab. Gianyar'),
+(280, 17, 'Kab. Badung'),
+(281, 17, 'Kab. Tabanan'),
+(282, 17, 'Kab. Jembrana'),
+(283, 18, 'Kota Mataram'),
+(284, 18, 'Kota Bima'),
+(285, 18, 'Kab. Lombok Utara'),
+(286, 18, 'Kab. Sumbawa Barat'),
+(287, 18, 'Kab. Bima'),
+(288, 18, 'Kab. Dompu'),
+(289, 18, 'Kab. Sumbawa '),
+(290, 18, 'Kab. Lombok Timur'),
+(291, 18, 'Kab. Lombok Tengah'),
+(292, 18, 'Kab. Lombok Barat'),
+(293, 19, 'Kota Kupang'),
+(294, 19, 'Kab. Malaka'),
+(295, 19, 'Kab. Sabu Raijua'),
+(296, 19, 'Kab. Manggarai Timur'),
+(297, 19, 'Kab. Sumba Barat Daya'),
+(298, 19, 'Kab. Sumba Tengah'),
+(299, 19, 'Kab. Nagekeo'),
+(300, 19, 'Kab. Manggarai Barat'),
+(301, 19, 'Kab. Rote Ndao'),
+(302, 19, 'Kab. Lembata'),
+(303, 19, 'Kab. Sumba Barat'),
+(304, 19, 'Kab. Sumba Timur'),
+(305, 19, 'Kab. Manggarai'),
+(306, 19, 'Kab. Ngada'),
+(307, 19, 'Kab. Ende'),
+(308, 19, 'Kab. Sikka'),
+(309, 19, 'Kab. Flores Timur'),
+(310, 19, 'Kab. Alor'),
+(311, 19, 'Kab. Belu'),
+(312, 19, 'Kab. Timor Tengah Utara'),
+(313, 19, 'Kab. Timor Tengah Selatan'),
+(314, 19, 'Kab. Kupang'),
+(315, 20, 'Kota Pontianak'),
+(316, 20, 'Kota Singkawang'),
+(317, 20, 'Kab. Kubu Raya'),
+(318, 20, 'Kab. Kayong Utara'),
+(319, 20, 'Kab. Sekadau'),
+(320, 20, 'Kab. Melawi'),
+(321, 20, 'Kab. Landak'),
+(322, 20, 'Kab. Bengkayang'),
+(323, 20, 'Kab. Kapuas Hulu'),
+(324, 20, 'Kab. Sintang '),
+(325, 20, 'Kab. Ketapang'),
+(326, 20, 'Kab. Sanggau '),
+(327, 20, 'Kab. Mempawah'),
+(328, 20, 'Kab. Sambas'),
+(329, 21, 'Kota Palangkaraya'),
+(330, 21, 'Kab. Barito Timur'),
+(331, 21, 'Kab. Murung Raya'),
+(332, 21, 'Kab. Pulang Pisau'),
+(333, 21, 'Kab. Gunung Mas'),
+(334, 21, 'Kab. Lamandau'),
+(335, 21, 'Kab. Sukamara'),
+(336, 21, 'Kab. Seruyan'),
+(337, 21, 'Kab. Katingan'),
+(338, 21, 'Kab. Barito Utara'),
+(339, 21, 'Kab. Barito Selatan'),
+(340, 21, 'Kab. Kapuas'),
+(341, 21, 'Kab. Kotawaringin Timur'),
+(342, 21, 'Kab. Kotawaringin Barat'),
+(343, 22, 'Kota Banjarmasin'),
+(344, 22, 'Kota Banjarbaru'),
+(345, 22, 'Kab. Balangan'),
+(346, 22, 'Kab. Tanah Bambu'),
+(347, 22, 'Kab. Tabalong'),
+(348, 22, 'Kab. Hulu Sungai Utara'),
+(349, 22, 'Kab. Hulu Sungai Tengah'),
+(350, 22, 'Kab. Hulu Sungai Selatan'),
+(351, 22, 'Kab. Tapin'),
+(352, 22, 'Kab. Barito Kuala'),
+(353, 22, 'Kab. Banjar'),
+(354, 22, 'Kab. Kotabaru'),
+(355, 22, 'Kab. Tanah Laut'),
+(356, 23, 'Kota Samarinda'),
+(357, 23, 'Kota Bontang'),
+(358, 23, 'Kota Balikpapan'),
+(359, 23, 'Kab. Mahakam Ulu'),
+(360, 23, 'Kab. Penajam Paser Utara'),
+(361, 23, 'Kab. Kutai Timur'),
+(362, 23, 'Kab. Kutai Barat'),
+(363, 23, 'Kab. Berau'),
+(364, 23, 'Kab. Kutai Kertanegara'),
+(365, 23, 'Kab. Paser'),
+(366, 24, 'Kota Tarakan'),
+(367, 24, 'Kab. Tana Tidung'),
+(368, 24, 'Kab. Nunukan'),
+(369, 24, 'Kab. Malinau'),
+(370, 24, 'Kab. Bulungan'),
+(371, 25, 'Kota Manado'),
+(372, 25, 'Kota Tomohon'),
+(373, 25, 'Kota Bitung'),
+(374, 25, 'Kota Kotamobagu'),
+(375, 25, 'Kab. Bolaang Mangondow Selatan'),
+(376, 25, 'Kab. Bolaang Mangondow Timur'),
+(377, 25, 'Kab. Kepulauan Siau Tagulandang Biaro'),
+(378, 25, 'Kab. Bolaang Mangondow Utara'),
+(379, 25, 'Kab. Minahasa Tenggara'),
+(380, 25, 'Kab. Minahasa Utara'),
+(381, 25, 'Kab. Minahasa Selatan'),
+(382, 25, 'Kab. Kepulauan Talaud'),
+(383, 25, 'Kab. Kepulauan Sangihe'),
+(384, 25, 'Kab. Minahasa'),
+(385, 25, 'Kab. Bolaang Mangondow'),
+(386, 26, 'Kota Palu'),
+(387, 26, 'Kab. Morowali Utara'),
+(388, 26, 'Kab. Banggai Laut'),
+(389, 26, 'Kab. Sigi'),
+(390, 26, 'Kab. Tojo Una-Una'),
+(391, 26, 'Kab. Parigi Moutong'),
+(392, 26, 'Kab. Banggai Kepulauan'),
+(393, 26, 'Kab. Morowali'),
+(394, 26, 'Kab. Buol'),
+(395, 26, 'Kab. Toli-Toli'),
+(396, 26, 'Kab. Donggala'),
+(397, 26, 'Kab. Poso'),
+(398, 26, 'Kab. Banggai'),
+(399, 27, 'Kota Makasar'),
+(400, 27, 'Kota Palopo'),
+(401, 27, 'Kota Pare Pare'),
+(402, 27, 'Kab. Toraja Utara'),
+(403, 27, 'Kab. Luwu Timur'),
+(404, 27, 'Kab. Luwu Utara'),
+(405, 27, 'Kab. Tana Toraja'),
+(406, 27, 'Kab. Luwu'),
+(407, 27, 'Kab. Enrekang'),
+(408, 27, 'Kab. Pinrang'),
+(409, 27, 'Kab. Sidenreng Rappang'),
+(410, 27, 'Kab. Wajo'),
+(411, 27, 'Kab. Soppeng'),
+(412, 27, 'Kab. Barru'),
+(413, 27, 'Kab. Pangkajene Kepulauan'),
+(414, 27, 'Kab. Maros'),
+(415, 27, 'Kab. Bone'),
+(416, 27, 'Kab. Sinjai'),
+(417, 27, 'Kab. Gowa'),
+(418, 27, 'Kab. Takalar'),
+(419, 27, 'Kab. Jeneponto'),
+(420, 27, 'Kab. Bantaeng'),
+(421, 27, 'Kab. Bulukumba'),
+(422, 27, 'Kab. Kepulauan Selayar'),
+(423, 28, 'Kota Kendari'),
+(424, 28, 'Kota Bau Bau'),
+(425, 28, 'Kab. Buton Selatan'),
+(426, 28, 'Kab. Buton Tengah'),
+(427, 28, 'Kab. Muna Barat'),
+(428, 28, 'Kab. Konawe Kepulauan'),
+(429, 28, 'Kab. Kolaka Timur'),
+(430, 28, 'Kab. Buton Utara'),
+(431, 28, 'Kab. Konawe Utara'),
+(432, 28, 'Kab. Kolaka Utara'),
+(433, 28, 'Kab. Wakatobi'),
+(434, 28, 'Kab. Bombana'),
+(435, 28, 'Kab. Konawe Selatan'),
+(436, 28, 'Kab. Buton'),
+(437, 28, 'Kab. Muna'),
+(438, 28, 'Kab. Konawe'),
+(439, 28, 'Kab. Kolaka'),
+(440, 29, 'Kota Gorontalo'),
+(441, 29, 'Kab. Pohuwato'),
+(442, 29, 'Kab. Bone Bolango'),
+(443, 29, 'Kab. Boalemo'),
+(444, 29, 'Kab. Gorontalo'),
+(445, 29, 'Kab. Gorontalo Utara'),
+(446, 30, 'Kab. Majene'),
+(447, 30, 'Kab. Polowali Mandar'),
+(448, 30, 'Kab. Mamasa'),
+(449, 30, 'Kab. Mamuju'),
+(450, 30, 'Kab. Mamuju Utara'),
+(451, 30, 'Kab. Mamuju Tengah'),
+(452, 31, 'Kota Ambon'),
+(453, 31, 'Kota Tual'),
+(454, 31, 'Kab. Buru Selatan'),
+(455, 31, 'Kab. Maluku Barat Daya'),
+(456, 31, 'Kab. Kepulauan Aru'),
+(457, 31, 'Kab. Seram Bagian Barat '),
+(458, 31, 'Kab. Seram Bagian Timur'),
+(459, 31, 'Kab. Buru'),
+(460, 31, 'Kab. Maluku Tenggara Barat'),
+(461, 31, 'Kab. Maluku Tenggara'),
+(462, 31, 'Kab. Maluku Tengah'),
+(463, 32, 'Kota Ternate'),
+(464, 32, 'Kota Tidore Kepulauan'),
+(465, 32, 'Kab. Pulau Taliabu'),
+(466, 32, 'Kab. Pulau Morotai'),
+(467, 32, 'Kab. Halmahera Timur'),
+(468, 32, 'Kab. Kepulauan Sula'),
+(469, 32, 'Kab. Halmahera Selatan'),
+(470, 32, 'Kab. Halmahera Utara'),
+(471, 32, 'Kab. Halmahera Tengah'),
+(472, 32, 'Kab. Halmahera Barat'),
+(473, 33, 'Kota Jayapura'),
+(474, 33, 'Kab. Deiyai'),
+(475, 33, 'Kab. Intan Jaya'),
+(476, 33, 'Kab. Dogiyai'),
+(477, 33, 'Kab. Puncak'),
+(478, 33, 'Kab. Nduga'),
+(479, 33, 'Kab. Lanny Jaya'),
+(480, 33, 'Kab. Yalimo'),
+(481, 33, 'Kab. Mamberamo Tengah'),
+(482, 33, 'Kab. Mamberamo Raya'),
+(483, 33, 'Kab. Supiori'),
+(484, 33, 'Kab. Asmat'),
+(485, 33, 'Kab. Mappi'),
+(486, 33, 'Kab. Boven Digoel'),
+(487, 33, 'Kab. Waropen'),
+(488, 33, 'Kab. Tolikara'),
+(489, 33, 'Kab. Yahukimo'),
+(490, 33, 'Kab. Pegunungan Bintang'),
+(491, 33, 'Kab. Keerom'),
+(492, 33, 'Kab. Sarmi'),
+(493, 33, 'Kab. Mimika'),
+(494, 33, 'Kab. Paniai'),
+(495, 33, 'Kab. Puncak Jaya'),
+(496, 33, 'Kab. Biak Numfor'),
+(497, 33, 'Kab. Kepulauan Yapen'),
+(498, 33, 'Kab. Nabire'),
+(499, 33, 'Kab. Jayapura'),
+(500, 33, 'Kab. Jayawijaya'),
+(501, 33, 'Kab. Merauke'),
+(502, 34, 'Kota Sorong'),
+(503, 34, 'Kab. Pegunungan Arfak'),
+(504, 34, 'Kab. Manokwari Selatan'),
+(505, 34, 'Kab. Maybrat'),
+(506, 34, 'Kab. Tambrauw'),
+(507, 34, 'Kab. Kaimana'),
+(508, 34, 'Kab. Teluk Wondama'),
+(509, 34, 'Kab. Teluk Bintuni'),
+(510, 34, 'Kab. Raja Ampat'),
+(511, 34, 'Kab. Sorong Selatan'),
+(512, 34, 'Kab. Fak Fak'),
+(513, 34, 'Kab. Manokwari'),
+(514, 34, 'Kab. Sorong');
 
 DROP TABLE IF EXISTS `provinces`;
 CREATE TABLE `provinces` (
@@ -53,5 +568,40 @@ CREATE TABLE `provinces` (
   UNIQUE KEY `name` (`name`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
 
+INSERT INTO `provinces` (`id`, `name`) VALUES
+(1, 'Aceh'),
+(17,  'Bali'),
+(16,  'Banten'),
+(7, 'Bengkulu'),
+(14,  'DI Yogyakarta'),
+(11,  'DKI Jakarta'),
+(29,  'Gorontalo'),
+(5, 'Jambi'),
+(12,  'Jawa Barat'),
+(13,  'Jawa Tengah'),
+(15,  'Jawa Timur'),
+(20,  'Kalimantan Barat'),
+(22,  'Kalimantan Selatan'),
+(21,  'Kalimantan Tengah'),
+(23,  'Kalimantan Timur'),
+(24,  'Kalimantan Utara'),
+(9, 'Kepulauan Bangka Belitung'),
+(10,  'Kepulauan Riau'),
+(8, 'Lampung'),
+(31,  'Maluku'),
+(32,  'Maluku Utara'),
+(18,  'Nusa Tenggara Barat'),
+(19,  'Nusa Tenggara Timur'),
+(33,  'Papua'),
+(34,  'Papua Barat'),
+(4, 'Riau'),
+(30,  'Sulawesi Barat'),
+(27,  'Sulawesi Selatan'),
+(26,  'Sulawesi Tengah'),
+(28,  'Sulawesi Tenggara'),
+(25,  'Sulawesi Utara'),
+(3, 'Sumatera Barat'),
+(6, 'Sumatera Selatan'),
+(2, 'Sumatera Utara');
 
--- 2022-11-27 18:33:10
+-- 2022-11-27 18:44:52
diff --git a/fill.php b/fill.php
new file mode 100644
index 0000000..2bbc872
--- /dev/null
+++ b/fill.php
@@ -0,0 +1,21 @@
+<?php
+
+require __DIR__."/helpers.php";
+
+$provinces = json_decode(file_get_contents(__DIR__."/public/assets/regions.json"), true);
+
+$pdo = pdo();
+$st = $pdo->prepare("INSERT INTO provinces (name) VALUES (?)");
+$st2 = $pdo->prepare("INSERT INTO cities (id, province_id, name) VALUES (?, ?, ?)");
+
+foreach ($provinces["results"] as $province) {
+	if ($province["text"] === "Province")
+		continue;
+
+	$st->execute([$province["text"]]);
+	$province_id = $pdo->lastInsertId();
+
+	foreach ($province["children"] as $city)
+		$st2->execute([$city["id"], $province_id, $city["text"]]);
+}
+
diff --git a/helpers.php b/helpers.php
new file mode 100644
index 0000000..15120ba
--- /dev/null
+++ b/helpers.php
@@ -0,0 +1,8 @@
+<?php
+
+require_once __DIR__."/config.php";
+
+function pdo(): PDO
+{
+	return new PDO(...PDO_PARAM);
+}
diff --git a/public/api.php b/public/api.php
new file mode 100644
index 0000000..1a812a7
--- /dev/null
+++ b/public/api.php
@@ -0,0 +1,6 @@
+<?php
+
+require __DIR__."/../helpers.php";
+
+$pdo = pdo();
+var_dump($pdo);
-- 
Ammar Faizi


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v1 09/13] Create initial API integration
  2022-11-27 20:32 [PATCH v1 00/13] App for member attendance record at Senayan Park, Jakarta Ammar Faizi
                   ` (7 preceding siblings ...)
  2022-11-27 20:32 ` [PATCH v1 08/13] Initial work on the database integration Ammar Faizi
@ 2022-11-27 20:32 ` Ammar Faizi
  2022-11-27 20:32 ` [PATCH v1 10/13] Add input form validation Ammar Faizi
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Ammar Faizi @ 2022-11-27 20:32 UTC (permalink / raw)
  To: Gilang Fachrezy
  Cc: Ammar Faizi, Taufiq Pohan, Aldy Prastyo,
	Muhammad Fitrah Pandjalu, Nauvalsa Yanandana,
	GNU/Weeb Mailing List, VNLX Kernel Department

This connects the HTML form with the MySQL database via AJAX.

Co-authored-by: Muhammad Fitrah Pandjalu <[email protected]>
Signed-off-by: Muhammad Fitrah Pandjalu <[email protected]>
Co-authored-by: Taufiq Pohan <[email protected]>
Signed-off-by: Taufiq Pohan <[email protected]>
Signed-off-by: Ammar Faizi <[email protected]>
---
 public/api.php   | 100 ++++++++++++++++++++++++++++++++++++++++++++++-
 public/index.php |  51 ++++++++++++++++++------
 2 files changed, 136 insertions(+), 15 deletions(-)

diff --git a/public/api.php b/public/api.php
index 1a812a7..97d8e4d 100644
--- a/public/api.php
+++ b/public/api.php
@@ -2,5 +2,101 @@
 
 require __DIR__."/../helpers.php";
 
-$pdo = pdo();
-var_dump($pdo);
+date_default_timezone_set("UTC");
+
+function err_msg(int $code, string $msg): array
+{
+	return [
+		"code"  => $code,
+		"error" => $msg
+	];
+}
+
+if (!isset($_GET["action"]) || !is_string($_GET["action"])) {
+	$code = 400;
+	$msg = err_msg($code, "Missing \"action\" string parameter");
+	goto out;
+}
+
+function submit_attendance(): array
+{
+	if ($_SERVER["REQUEST_METHOD"] !== "POST")
+		return [405, err_msg(405, "Method not allowed!")];
+
+	$j = json_decode(file_get_contents("php://input"), true);
+	if (!is_array($j))
+		return [400, err_msg(400, "Invalid input request")];
+
+	if (!isset($j["full_name"]) || !is_string($j["full_name"]))
+		return [400, err_msg(400, "Missing \"full_name\" string argument!")];
+
+	if (!isset($j["city"]) || !is_integer($j["city"]))
+		return [400, err_msg(400, "Missing \"city\" integer argument!")];
+
+	if (!isset($j["phone_number"]) || !is_string($j["phone_number"]))
+		return [400, err_msg(400, "Missing \"phone_number\" string argument!")];
+
+	if (!isset($j["email"]) || !is_string($j["email"]))
+		return [400, err_msg(400, "Missing \"email\" string argument!")];
+
+	if (!isset($j["facebook_id"]))
+		return [400, err_msg(400, "Missing \"facebook_id\" argument!")];
+
+	if (!isset($j["twitter_username"]))
+		return [400, err_msg(400, "Missing \"twitter_username\" argument!")];
+
+	if (!isset($j["discord_username"]))
+		return [400, err_msg(400, "Missing \"discord_username\" argument!")];
+
+	if (!isset($j["github_username"]))
+		return [400, err_msg(400, "Missing \"github_username\" argument!")];
+
+	try {
+		$pdo = pdo();
+		$st = $pdo->prepare(<<<SQL
+			INSERT INTO `attendances`
+			(
+				`city_id`,
+				`full_name`,
+				`phone_number`,
+				`email`,
+				`facebook_id`,
+				`twitter_username`,
+				`discord_username`,
+				`github_username`,
+				`created_at`
+			) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?);
+		SQL);
+		$st->execute([
+			$j["city"],
+			$j["full_name"],
+			$j["phone_number"],
+			$j["email"],
+			$j["facebook_id"],
+			$j["twitter_username"],
+			$j["discord_username"],
+			$j["github_username"],
+			date("Y-m-d H:i:s")
+		]);
+		return [200, err_msg(200, "Success!")];
+	} catch (PDOException $e) {
+		return [500, err_msg(500, "Database error: ".$e->__toString())];
+	}
+}
+
+switch ($_GET["action"]) {
+case "submit_attendance":
+	[$code, $msg] = submit_attendance();
+	break;
+
+default:
+	$code = 400;
+	$msg = err_msg($code, "Invalid action {$_GET["action"]}");
+	break;
+}
+
+
+out:
+http_response_code($code);
+header("Content-Type: application/json");
+echo json_encode($msg, JSON_PRETTY_PRINT);
diff --git a/public/index.php b/public/index.php
index 8587c95..411f6df 100644
--- a/public/index.php
+++ b/public/index.php
@@ -9,41 +9,41 @@
 	<div class="container p-5">
 		<h1 class="text-center">VNL Member Attendance Form</h1>
 		<div>
-			<form>
+			<form method="POST" action="javascript:void(0);" id="attendance_form">
 				<div class="mb-3">
 					<label for="full_name" class="form-label">Full Name <span class="text-danger">*</span></label>
-					<input type="text" class="form-control" id="full_name"/>
+					<input type="text" name="full_name" class="form-control" id="full_name"/>
 				</div>
 				<div class="mb-3">
 					<label for="city" class="form-label">City  <span class="text-danger">*</span></label>
-					<select id="city" class="form-control"></select>
+					<select id="city" name="city" class="form-control"></select>
 				</div>
 				<div class="mb-3">
 					<label for="phone_number" class="form-label">Phone Number  <span class="text-danger">*</span></label>
-					<input type="text" class="form-control" id="phone_number"/>
+					<input type="text" name="phone_number" class="form-control" id="phone_number"/>
 				</div>
 				<div class="mb-3">
 					<label for="email" class="form-label">Email address  <span class="text-danger">*</span></label>
-					<input type="email" class="form-control" id="email"/>
+					<input type="email" name="email" class="form-control" id="email"/>
 				</div>
 				<div class="border container p-3 border-3 border-dark rounded-3">
 					<h4>Social Media Accounts</h4>
 					<p class="text-danger">Must be filled at least one!</p>
 					<div class="mb-3">
-						<label for="email" class="form-label">Facebook ID / Username</label>
-						<input type="email" class="form-control" id="facebook_link"/>
+						<label for="facebook_id" class="form-label">Facebook ID / Username</label>
+						<input type="text" name="facebook_id" class="form-control" id="facebook_id"/>
 					</div>
 					<div class="mb-3">
-						<label for="email" class="form-label">Twitter Username</label>
-						<input type="email" class="form-control" id="twitter_username" placeholder="@username"/>
+						<label for="twitter_username" class="form-label">Twitter Username</label>
+						<input type="text" name="twitter_username" class="form-control" id="twitter_username" placeholder="@username"/>
 					</div>
 					<div class="mb-3">
-						<label for="email" class="form-label">Discord Username</label>
-						<input type="email" class="form-control" id="discord_username" placeholder="username#1234"/>
+						<label for="discord_username" class="form-label">Discord Username</label>
+						<input type="text" name="discord_username" class="form-control" id="discord_username" placeholder="username#1234"/>
 					</div>
 					<div class="mb-3">
-						<label for="email" class="form-label">GitHub Username</label>
-						<input type="email" class="form-control" id="github_username" placeholder="@username"/>
+						<label for="github_username" class="form-label">GitHub Username</label>
+						<input type="text" name="github_username" class="form-control" id="github_username" placeholder="@username"/>
 					</div>
 				</div>
 				<button type="submit" class="btn btn-primary mt-3">Submit</button>
@@ -66,6 +66,31 @@
 			dataType: "json",
 			success: load_select2_city
 		});
+
+		let form = $("#attendance_form");
+		form.submit(function () {
+			let data = form.serializeArray();
+			let json = {};
+			let i;
+
+			for (i in data) {
+				let key = data[i].name;
+				let val = data[i].value;
+
+				if (key === "city")
+					val = parseInt(val);
+
+				json[key] = val;
+			}
+
+			$.post({
+				url: "api.php?action=submit_attendance",
+				data: JSON.stringify(json),
+				success: function () {
+					alert("success!");
+				}
+			});
+		});
 	</script>
 </body>
 </html>
-- 
Ammar Faizi


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v1 10/13] Add input form validation
  2022-11-27 20:32 [PATCH v1 00/13] App for member attendance record at Senayan Park, Jakarta Ammar Faizi
                   ` (8 preceding siblings ...)
  2022-11-27 20:32 ` [PATCH v1 09/13] Create initial API integration Ammar Faizi
@ 2022-11-27 20:32 ` Ammar Faizi
  2022-11-27 20:32 ` [PATCH v1 11/13] assets: Add sweetalert library Ammar Faizi
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Ammar Faizi @ 2022-11-27 20:32 UTC (permalink / raw)
  To: Gilang Fachrezy
  Cc: Ammar Faizi, Taufiq Pohan, Aldy Prastyo,
	Muhammad Fitrah Pandjalu, Nauvalsa Yanandana,
	GNU/Weeb Mailing List, VNLX Kernel Department

This validates the user inputs.

Co-authored-by: Muhammad Fitrah Pandjalu <[email protected]>
Signed-off-by: Muhammad Fitrah Pandjalu <[email protected]>
Co-authored-by: Taufiq Pohan <[email protected]>
Signed-off-by: Taufiq Pohan <[email protected]>
Signed-off-by: Ammar Faizi <[email protected]>
---
 public/api.php   | 25 +++++++++++++------
 public/index.php | 65 +++++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 81 insertions(+), 9 deletions(-)

diff --git a/public/api.php b/public/api.php
index 97d8e4d..8305552 100644
--- a/public/api.php
+++ b/public/api.php
@@ -18,6 +18,13 @@ if (!isset($_GET["action"]) || !is_string($_GET["action"])) {
 	goto out;
 }
 
+const SOCIAL_MEDIA = [
+	"facebook_id",
+	"twitter_username",
+	"discord_username",
+	"github_username",
+];
+
 function submit_attendance(): array
 {
 	if ($_SERVER["REQUEST_METHOD"] !== "POST")
@@ -39,17 +46,19 @@ function submit_attendance(): array
 	if (!isset($j["email"]) || !is_string($j["email"]))
 		return [400, err_msg(400, "Missing \"email\" string argument!")];
 
-	if (!isset($j["facebook_id"]))
-		return [400, err_msg(400, "Missing \"facebook_id\" argument!")];
+	$social_media_is_filled = false;
+	foreach (SOCIAL_MEDIA as $sc) {
+		if (!isset($j[$sc]))
+			continue;
 
-	if (!isset($j["twitter_username"]))
-		return [400, err_msg(400, "Missing \"twitter_username\" argument!")];
+		if (!is_string($j[$sc]))
+			return [400, err_msg(400, "Argument \"{$sc}\" has to be a string")];
 
-	if (!isset($j["discord_username"]))
-		return [400, err_msg(400, "Missing \"discord_username\" argument!")];
+		$social_media_is_filled = true;
+	}
 
-	if (!isset($j["github_username"]))
-		return [400, err_msg(400, "Missing \"github_username\" argument!")];
+	if (!$social_media_is_filled)
+		return [400, err_msg(400, "Social media accounts must be filled at least one")];
 
 	try {
 		$pdo = pdo();
diff --git a/public/index.php b/public/index.php
index 411f6df..abb016f 100644
--- a/public/index.php
+++ b/public/index.php
@@ -8,6 +8,7 @@
 <body>
 	<div class="container p-5">
 		<h1 class="text-center">VNL Member Attendance Form</h1>
+		<h3 class="text-center">3th and 4th Dec 2022 (VNL Booth Senayan Park)</h3>
 		<div>
 			<form method="POST" action="javascript:void(0);" id="attendance_form">
 				<div class="mb-3">
@@ -67,6 +68,52 @@
 			success: load_select2_city
 		});
 
+		function form_err(msg)
+		{
+			alert(msg);
+		}
+
+		function form_ok()
+		{
+			alert("Terima kasih telah melakukan presensi, data Anda sudah dicatat dan dijamin aman!");
+		}
+
+		function validate_form(j)
+		{
+			if (!j.full_name.match(/^[a-z\.\'\ ]+$/i)) {
+				form_err("The full name must match with /^[a-z\\.\\'\\ ]+$/i regex pattern!");
+				return false;
+			}
+
+			if (!j.phone_number.match(/^((\+?62)|(0))\d+$/i)) {
+				form_err("The phone number must match with /^((\\+?62)|(0))\\d+$/i regex pattern!");
+				return false;
+			}
+
+			const social_media = [
+				"facebook_id",
+				"twitter_username",
+				"discord_username",
+				"github_username",
+			];
+			let social_media_is_filled = false;
+			let i;
+
+			for (i in social_media) {
+				if (j[social_media[i]] !== null) {
+					social_media_is_filled = true;
+					break;
+				}
+			}
+
+			if (!social_media_is_filled) {
+				form_err("Social media accounts must be filled at least one");
+				return false;
+			}
+
+			return true;
+		}
+
 		let form = $("#attendance_form");
 		form.submit(function () {
 			let data = form.serializeArray();
@@ -77,17 +124,33 @@
 				let key = data[i].name;
 				let val = data[i].value;
 
+				val = val.trim();
 				if (key === "city")
 					val = parseInt(val);
 
+				if (val === "")
+					val = null;
+
 				json[key] = val;
 			}
 
+			if (!validate_form(json))
+				return;
+
 			$.post({
 				url: "api.php?action=submit_attendance",
 				data: JSON.stringify(json),
 				success: function () {
-					alert("success!");
+					form_ok();
+					window.location = "";
+				},
+				error: function (res) {
+					let j = res.responseJSON;
+
+					if ("error" in j)
+						form_err(j.error);
+					else
+						form_err("Unknown error!");
 				}
 			});
 		});
-- 
Ammar Faizi


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v1 11/13] assets: Add sweetalert library
  2022-11-27 20:32 [PATCH v1 00/13] App for member attendance record at Senayan Park, Jakarta Ammar Faizi
                   ` (9 preceding siblings ...)
  2022-11-27 20:32 ` [PATCH v1 10/13] Add input form validation Ammar Faizi
@ 2022-11-27 20:32 ` Ammar Faizi
  2022-11-27 20:32 ` [PATCH v1 12/13] index: Integrate the sweetalert library with the form Ammar Faizi
  2022-11-27 20:32 ` [PATCH v1 13/13] index: Make sure there is no duplicate submission in the same day Ammar Faizi
  12 siblings, 0 replies; 14+ messages in thread
From: Ammar Faizi @ 2022-11-27 20:32 UTC (permalink / raw)
  To: Gilang Fachrezy
  Cc: Ammar Faizi, Taufiq Pohan, Aldy Prastyo,
	Muhammad Fitrah Pandjalu, Nauvalsa Yanandana,
	GNU/Weeb Mailing List, VNLX Kernel Department

A preparation patch to replace the legacy alert with the modern one.

Co-authored-by: Muhammad Fitrah Pandjalu <[email protected]>
Signed-off-by: Muhammad Fitrah Pandjalu <[email protected]>
Co-authored-by: Taufiq Pohan <[email protected]>
Signed-off-by: Taufiq Pohan <[email protected]>
Signed-off-by: Ammar Faizi <[email protected]>
---
 public/assets/css/sweetalert2.min.css   | 1 +
 public/assets/js/sweetalert2.all.min.js | 6 ++++++
 2 files changed, 7 insertions(+)
 create mode 100644 public/assets/css/sweetalert2.min.css
 create mode 100644 public/assets/js/sweetalert2.all.min.js

diff --git a/public/assets/css/sweetalert2.min.css b/public/assets/css/sweetalert2.min.css
new file mode 100644
index 0000000..4c092a8
--- /dev/null
+++ b/public/assets/css/sweetalert2.min.css
@@ -0,0 +1 @@
+.swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:"top-start     top            top-end" "center-start  center         center-end" "bottom-start  bottom-center  bottom-end";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:rgba(0,0,0,0) !important}.swal2-container.swal2-top-start,.swal2-container.swal2-center-start,.swal2-container.swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}.swal2-container.swal2-top,.swal2-container.swal2-center,.swal2-container.swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}.swal2-container.swal2-top-end,.swal2-container.swal2-center-end,.swal2-container.swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-start>.swal2-popup,.swal2-container.swal2-center-left>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-start>.swal2-popup,.swal2-container.swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-row>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none !important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:none}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(112,102,224,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(220,55,65,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,120,129,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:none}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:rgba(0,0,0,0);color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:rgba(0,0,0,0);color:#f27474}.swal2-close:focus{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-input,.swal2-file,.swal2-textarea,.swal2-select,.swal2-radio,.swal2-checkbox{margin:1em 2em 3px}.swal2-input,.swal2-file,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:rgba(0,0,0,0);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);color:inherit;font-size:1.125em}.swal2-input.swal2-inputerror,.swal2-file.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}.swal2-input:focus,.swal2-file:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-input::placeholder,.swal2-file::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 3px;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:rgba(0,0,0,0);font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:rgba(0,0,0,0);color:inherit;font-size:1.125em}.swal2-radio,.swal2-checkbox{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-radio label,.swal2-checkbox label{margin:0 .6em;font-size:1.125em}.swal2-radio input,.swal2-checkbox input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:0.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:swal2-show .3s}.swal2-hide{animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static !important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}
diff --git a/public/assets/js/sweetalert2.all.min.js b/public/assets/js/sweetalert2.all.min.js
new file mode 100644
index 0000000..82d4892
--- /dev/null
+++ b/public/assets/js/sweetalert2.all.min.js
@@ -0,0 +1,6 @@
+/*!
+* sweetalert2 v11.6.14
+* Released under the MIT License.
+*/
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Sweetalert2=t()}(this,(function(){"use strict";var e={awaitingPromise:new WeakMap,promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const t=e=>{const t={};for(const n in e)t[e[n]]="swal2-"+e[n];return t},n=t(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),o=t(["success","warning","info","question","error"]),i=e=>e.charAt(0).toUpperCase()+e.slice(1),s=e=>{console.warn(`SweetAlert2: ${"object"==typeof e?e.join(" "):e}`)},r=e=>{console.error(`SweetAlert2: ${e}`)},a=[],l=(e,t)=>{var n;n=`"${e}" is deprecated and will be removed in the next major release. Please use "${t}" instead.`,a.includes(n)||(a.push(n),s(n))},c=e=>"function"==typeof e?e():e,u=e=>e&&"function"==typeof e.toPromise,d=e=>u(e)?e.toPromise():Promise.resolve(e),p=e=>e&&Promise.resolve(e)===e,m=()=>document.body.querySelector(`.${n.container}`),g=e=>{const t=m();return t?t.querySelector(e):null},h=e=>g(`.${e}`),f=()=>h(n.popup),b=()=>h(n.icon),y=()=>h(n.title),w=()=>h(n["html-container"]),v=()=>h(n.image),C=()=>h(n["progress-steps"]),A=()=>h(n["validation-message"]),k=()=>g(`.${n.actions} .${n.confirm}`),B=()=>g(`.${n.actions} .${n.deny}`),P=()=>g(`.${n.loader}`),x=()=>g(`.${n.actions} .${n.cancel}`),E=()=>h(n.actions),$=()=>h(n.footer),T=()=>h(n["timer-progress-bar"]),S=()=>h(n.close),L=()=>{const e=Array.from(f().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort(((e,t)=>{const n=parseInt(e.getAttribute("tabindex")),o=parseInt(t.getAttribute("tabindex"));return n>o?1:n<o?-1:0})),t=Array.from(f().querySelectorAll('\n  a[href],\n  area[href],\n  input:not([disabled]),\n  select:not([disabled]),\n  textarea:not([disabled]),\n  button:not([disabled]),\n  iframe,\n  object,\n  embed,\n  [tabindex="0"],\n  [contenteditable],\n  audio[controls],\n  video[controls],\n  summary\n')).filter((e=>"-1"!==e.getAttribute("tabindex")));return(e=>{const t=[];for(let n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t})(e.concat(t)).filter((e=>Z(e)))},O=()=>I(document.body,n.shown)&&!I(document.body,n["toast-shown"])&&!I(document.body,n["no-backdrop"]),j=()=>f()&&I(f(),n.toast),M={previousBodyPadding:null},H=(e,t)=>{if(e.textContent="",t){const n=(new DOMParser).parseFromString(t,"text/html");Array.from(n.querySelector("head").childNodes).forEach((t=>{e.appendChild(t)})),Array.from(n.querySelector("body").childNodes).forEach((t=>{t instanceof HTMLVideoElement||t instanceof HTMLAudioElement?e.appendChild(t.cloneNode(!0)):e.appendChild(t)}))}},I=(e,t)=>{if(!t)return!1;const n=t.split(/\s+/);for(let t=0;t<n.length;t++)if(!e.classList.contains(n[t]))return!1;return!0},D=(e,t,i)=>{if(((e,t)=>{Array.from(e.classList).forEach((i=>{Object.values(n).includes(i)||Object.values(o).includes(i)||Object.values(t.showClass).includes(i)||e.classList.remove(i)}))})(e,t),t.customClass&&t.customClass[i]){if("string"!=typeof t.customClass[i]&&!t.customClass[i].forEach)return void s(`Invalid type of customClass.${i}! Expected string or iterable object, got "${typeof t.customClass[i]}"`);F(e,t.customClass[i])}},q=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return e.querySelector(`.${n.popup} > .${n[t]}`);case"checkbox":return e.querySelector(`.${n.popup} > .${n.checkbox} input`);case"radio":return e.querySelector(`.${n.popup} > .${n.radio} input:checked`)||e.querySelector(`.${n.popup} > .${n.radio} input:first-child`);case"range":return e.querySelector(`.${n.popup} > .${n.range} input`);default:return e.querySelector(`.${n.popup} > .${n.input}`)}},V=e=>{if(e.focus(),"file"!==e.type){const t=e.value;e.value="",e.value=t}},N=(e,t,n)=>{e&&t&&("string"==typeof t&&(t=t.split(/\s+/).filter(Boolean)),t.forEach((t=>{Array.isArray(e)?e.forEach((e=>{n?e.classList.add(t):e.classList.remove(t)})):n?e.classList.add(t):e.classList.remove(t)})))},F=(e,t)=>{N(e,t,!0)},R=(e,t)=>{N(e,t,!1)},U=(e,t)=>{const n=Array.from(e.children);for(let e=0;e<n.length;e++){const o=n[e];if(o instanceof HTMLElement&&I(o,t))return o}},_=(e,t,n)=>{n===`${parseInt(n)}`&&(n=parseInt(n)),n||0===parseInt(n)?e.style[t]="number"==typeof n?`${n}px`:n:e.style.removeProperty(t)},W=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"flex";e.style.display=t},z=e=>{e.style.display="none"},K=(e,t,n,o)=>{const i=e.querySelector(t);i&&(i.style[n]=o)},Y=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"flex";t?W(e,n):z(e)},Z=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),J=e=>!!(e.scrollHeight>e.clientHeight),X=e=>{const t=window.getComputedStyle(e),n=parseFloat(t.getPropertyValue("animation-duration")||"0"),o=parseFloat(t.getPropertyValue("transition-duration")||"0");return n>0||o>0},G=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=T();Z(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout((()=>{n.style.transition=`width ${e/1e3}s linear`,n.style.width="0%"}),10))},Q={},ee=e=>new Promise((t=>{if(!e)return t();const n=window.scrollX,o=window.scrollY;Q.restoreFocusTimeout=setTimeout((()=>{Q.previousActiveElement instanceof HTMLElement?(Q.previousActiveElement.focus(),Q.previousActiveElement=null):document.body&&document.body.focus(),t()}),100),window.scrollTo(n,o)})),te=()=>"undefined"==typeof window||"undefined"==typeof document,ne=`\n <div aria-labelledby="${n.title}" aria-describedby="${n["html-container"]}" class="${n.popup}" tabindex="-1">\n   <button type="button" class="${n.close}"></button>\n   <ul class="${n["progress-steps"]}"></ul>\n   <div class="${n.icon}"></div>\n   <img class="${n.image}" />\n   <h2 class="${n.title}" id="${n.title}"></h2>\n   <div class="${n["html-container"]}" id="${n["html-container"]}"></div>\n   <input class="${n.input}" />\n   <input type="file" class="${n.file}" />\n   <div class="${n.range}">\n     <input type="range" />\n     <output></output>\n   </div>\n   <select class="${n.select}"></select>\n   <div class="${n.radio}"></div>\n   <label for="${n.checkbox}" class="${n.checkbox}">\n     <input type="checkbox" />\n     <span class="${n.label}"></span>\n   </label>\n   <textarea class="${n.textarea}"></textarea>\n   <div class="${n["validation-message"]}" id="${n["validation-message"]}"></div>\n   <div class="${n.actions}">\n     <div class="${n.loader}"></div>\n     <button type="button" class="${n.confirm}"></button>\n     <button type="button" class="${n.deny}"></button>\n     <button type="button" class="${n.cancel}"></button>\n   </div>\n   <div class="${n.footer}"></div>\n   <div class="${n["timer-progress-bar-container"]}">\n     <div class="${n["timer-progress-bar"]}"></div>\n   </div>\n </div>\n`.replace(/(^|\n)\s*/g,""),oe=()=>{Q.currentInstance.resetValidationMessage()},ie=e=>{const t=(()=>{const e=m();return!!e&&(e.remove(),R([document.documentElement,document.body],[n["no-backdrop"],n["toast-shown"],n["has-column"]]),!0)})();if(te())return void r("SweetAlert2 requires document to initialize");const o=document.createElement("div");o.className=n.container,t&&F(o,n["no-transition"]),H(o,ne);const i="string"==typeof(s=e.target)?document.querySelector(s):s;var s;i.appendChild(o),(e=>{const t=f();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")})(e),(e=>{"rtl"===window.getComputedStyle(e).direction&&F(m(),n.rtl)})(i),(()=>{const e=f(),t=U(e,n.input),o=U(e,n.file),i=e.querySelector(`.${n.range} input`),s=e.querySelector(`.${n.range} output`),r=U(e,n.select),a=e.querySelector(`.${n.checkbox} input`),l=U(e,n.textarea);t.oninput=oe,o.onchange=oe,r.onchange=oe,a.onchange=oe,l.oninput=oe,i.oninput=()=>{oe(),s.value=i.value},i.onchange=()=>{oe(),s.value=i.value}})()},se=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?re(e,t):e&&H(t,e)},re=(e,t)=>{e.jquery?ae(t,e):H(t,e.toString())},ae=(e,t)=>{if(e.textContent="",0 in t)for(let n=0;n in t;n++)e.appendChild(t[n].cloneNode(!0));else e.appendChild(t.cloneNode(!0))},le=(()=>{if(te())return!1;const e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",animation:"animationend"};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&void 0!==e.style[n])return t[n];return!1})(),ce=(e,t)=>{const o=E(),i=P();t.showConfirmButton||t.showDenyButton||t.showCancelButton?W(o):z(o),D(o,t,"actions"),function(e,t,o){const i=k(),s=B(),r=x();ue(i,"confirm",o),ue(s,"deny",o),ue(r,"cancel",o),function(e,t,o,i){if(!i.buttonsStyling)return void R([e,t,o],n.styled);F([e,t,o],n.styled),i.confirmButtonColor&&(e.style.backgroundColor=i.confirmButtonColor,F(e,n["default-outline"]));i.denyButtonColor&&(t.style.backgroundColor=i.denyButtonColor,F(t,n["default-outline"]));i.cancelButtonColor&&(o.style.backgroundColor=i.cancelButtonColor,F(o,n["default-outline"]))}(i,s,r,o),o.reverseButtons&&(o.toast?(e.insertBefore(r,i),e.insertBefore(s,i)):(e.insertBefore(r,t),e.insertBefore(s,t),e.insertBefore(i,t)))}(o,i,t),H(i,t.loaderHtml),D(i,t,"loader")};function ue(e,t,o){Y(e,o[`show${i(t)}Button`],"inline-block"),H(e,o[`${t}ButtonText`]),e.setAttribute("aria-label",o[`${t}ButtonAriaLabel`]),e.className=n[t],D(e,o,`${t}Button`),F(e,o[`${t}ButtonClass`])}const de=(e,t)=>{const o=m();o&&(!function(e,t){"string"==typeof t?e.style.background=t:t||F([document.documentElement,document.body],n["no-backdrop"])}(o,t.backdrop),function(e,t){t in n?F(e,n[t]):(s('The "position" parameter is not valid, defaulting to "center"'),F(e,n.center))}(o,t.position),function(e,t){if(t&&"string"==typeof t){const o=`grow-${t}`;o in n&&F(e,n[o])}}(o,t.grow),D(o,t,"container"))};const pe=["input","file","range","select","radio","checkbox","textarea"],me=e=>{if(!ve[e.input])return void r(`Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "${e.input}"`);const t=ye(e.input),n=ve[e.input](t,e);W(t),setTimeout((()=>{V(n)}))},ge=(e,t)=>{const n=q(f(),e);if(n){(e=>{for(let t=0;t<e.attributes.length;t++){const n=e.attributes[t].name;["type","value","style"].includes(n)||e.removeAttribute(n)}})(n);for(const e in t)n.setAttribute(e,t[e])}},he=e=>{const t=ye(e.input);"object"==typeof e.customClass&&F(t,e.customClass.input)},fe=(e,t)=>{e.placeholder&&!t.inputPlaceholder||(e.placeholder=t.inputPlaceholder)},be=(e,t,o)=>{if(o.inputLabel){e.id=n.input;const i=document.createElement("label"),s=n["input-label"];i.setAttribute("for",e.id),i.className=s,"object"==typeof o.customClass&&F(i,o.customClass.inputLabel),i.innerText=o.inputLabel,t.insertAdjacentElement("beforebegin",i)}},ye=e=>U(f(),n[e]||n.input),we=(e,t)=>{["string","number"].includes(typeof t)?e.value=`${t}`:p(t)||s(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof t}"`)},ve={};ve.text=ve.email=ve.password=ve.number=ve.tel=ve.url=(e,t)=>(we(e,t.inputValue),be(e,e,t),fe(e,t),e.type=t.input,e),ve.file=(e,t)=>(be(e,e,t),fe(e,t),e),ve.range=(e,t)=>{const n=e.querySelector("input"),o=e.querySelector("output");return we(n,t.inputValue),n.type=t.input,we(o,t.inputValue),be(n,e,t),e},ve.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const n=document.createElement("option");H(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return be(e,e,t),e},ve.radio=e=>(e.textContent="",e),ve.checkbox=(e,t)=>{const o=q(f(),"checkbox");o.value="1",o.id=n.checkbox,o.checked=Boolean(t.inputValue);const i=e.querySelector("span");return H(i,t.inputPlaceholder),o},ve.textarea=(e,t)=>{we(e,t.inputValue),fe(e,t),be(e,e,t);return setTimeout((()=>{if("MutationObserver"in window){const t=parseInt(window.getComputedStyle(f()).width);new MutationObserver((()=>{const n=e.offsetWidth+(o=e,parseInt(window.getComputedStyle(o).marginLeft)+parseInt(window.getComputedStyle(o).marginRight));var o;f().style.width=n>t?`${n}px`:null})).observe(e,{attributes:!0,attributeFilter:["style"]})}})),e};const Ce=(t,o)=>{const i=w();D(i,o,"htmlContainer"),o.html?(se(o.html,i),W(i,"block")):o.text?(i.textContent=o.text,W(i,"block")):z(i),((t,o)=>{const i=f(),s=e.innerParams.get(t),r=!s||o.input!==s.input;pe.forEach((e=>{const t=U(i,n[e]);ge(e,o.inputAttributes),t.className=n[e],r&&z(t)})),o.input&&(r&&me(o),he(o))})(t,o)},Ae=(e,t)=>{for(const n in o)t.icon!==n&&R(e,o[n]);F(e,o[t.icon]),Pe(e,t),ke(),D(e,t,"icon")},ke=()=>{const e=f(),t=window.getComputedStyle(e).getPropertyValue("background-color"),n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e<n.length;e++)n[e].style.backgroundColor=t},Be=(e,t)=>{let n,o=e.innerHTML;if(t.iconHtml)n=xe(t.iconHtml);else if("success"===t.icon)n='\n  <div class="swal2-success-circular-line-left"></div>\n  <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>\n  <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>\n  <div class="swal2-success-circular-line-right"></div>\n',o=o.replace(/ style=".*?"/g,"");else if("error"===t.icon)n='\n  <span class="swal2-x-mark">\n    <span class="swal2-x-mark-line-left"></span>\n    <span class="swal2-x-mark-line-right"></span>\n  </span>\n';else{n=xe({question:"?",warning:"!",info:"i"}[t.icon])}o.trim()!==n.trim()&&H(e,n)},Pe=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])K(e,n,"backgroundColor",t.iconColor);K(e,".swal2-success-ring","borderColor",t.iconColor)}},xe=e=>`<div class="${n["icon-content"]}">${e}</div>`,Ee=(e,t)=>{e.className=`${n.popup} ${Z(e)?t.showClass.popup:""}`,t.toast?(F([document.documentElement,document.body],n["toast-shown"]),F(e,n.toast)):F(e,n.modal),D(e,t,"popup"),"string"==typeof t.customClass&&F(e,t.customClass),t.icon&&F(e,n[`icon-${t.icon}`])},$e=e=>{const t=document.createElement("li");return F(t,n["progress-step"]),H(t,e),t},Te=e=>{const t=document.createElement("li");return F(t,n["progress-step-line"]),e.progressStepsDistance&&_(t,"width",e.progressStepsDistance),t},Se=(t,i)=>{((e,t)=>{const n=m(),o=f();t.toast?(_(n,"width",t.width),o.style.width="100%",o.insertBefore(P(),b())):_(o,"width",t.width),_(o,"padding",t.padding),t.color&&(o.style.color=t.color),t.background&&(o.style.background=t.background),z(A()),Ee(o,t)})(0,i),de(0,i),((e,t)=>{const o=C();t.progressSteps&&0!==t.progressSteps.length?(W(o),o.textContent="",t.currentProgressStep>=t.progressSteps.length&&s("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),t.progressSteps.forEach(((e,i)=>{const s=$e(e);if(o.appendChild(s),i===t.currentProgressStep&&F(s,n["active-progress-step"]),i!==t.progressSteps.length-1){const e=Te(t);o.appendChild(e)}}))):z(o)})(0,i),((t,n)=>{const i=e.innerParams.get(t),s=b();if(i&&n.icon===i.icon)return Be(s,n),void Ae(s,n);if(n.icon||n.iconHtml){if(n.icon&&-1===Object.keys(o).indexOf(n.icon))return r(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${n.icon}"`),void z(s);W(s),Be(s,n),Ae(s,n),F(s,n.showClass.icon)}else z(s)})(t,i),((e,t)=>{const o=v();t.imageUrl?(W(o,""),o.setAttribute("src",t.imageUrl),o.setAttribute("alt",t.imageAlt),_(o,"width",t.imageWidth),_(o,"height",t.imageHeight),o.className=n.image,D(o,t,"image")):z(o)})(0,i),((e,t)=>{const n=y();Y(n,t.title||t.titleText,"block"),t.title&&se(t.title,n),t.titleText&&(n.innerText=t.titleText),D(n,t,"title")})(0,i),((e,t)=>{const n=S();H(n,t.closeButtonHtml),D(n,t,"closeButton"),Y(n,t.showCloseButton),n.setAttribute("aria-label",t.closeButtonAriaLabel)})(0,i),Ce(t,i),ce(0,i),((e,t)=>{const n=$();Y(n,t.footer),t.footer&&se(t.footer,n),D(n,t,"footer")})(0,i),"function"==typeof i.didRender&&i.didRender(f())};function Le(){const t=e.innerParams.get(this);if(!t)return;const o=e.domCache.get(this);z(o.loader),j()?t.icon&&W(b()):Oe(o),R([o.popup,o.actions],n.loading),o.popup.removeAttribute("aria-busy"),o.popup.removeAttribute("data-loading"),o.confirmButton.disabled=!1,o.denyButton.disabled=!1,o.cancelButton.disabled=!1}const Oe=e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));t.length?W(t[0],"inline-block"):Z(k())||Z(B())||Z(x())||z(e.actions)};const je=()=>k()&&k().click(),Me=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),He=e=>{e.keydownTarget&&e.keydownHandlerAdded&&(e.keydownTarget.removeEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1)},Ie=(e,t,n)=>{const o=L();if(o.length)return(t+=n)===o.length?t=0:-1===t&&(t=o.length-1),o[t].focus();f().focus()},De=["ArrowRight","ArrowDown"],qe=["ArrowLeft","ArrowUp"],Ve=(t,n,o)=>{const i=e.innerParams.get(t);i&&(n.isComposing||229===n.keyCode||(i.stopKeydownPropagation&&n.stopPropagation(),"Enter"===n.key?Ne(t,n,i):"Tab"===n.key?Fe(n,i):[...De,...qe].includes(n.key)?Re(n.key):"Escape"===n.key&&Ue(n,i,o)))},Ne=(e,t,n)=>{if(c(n.allowEnterKey)&&t.target&&e.getInput()&&t.target instanceof HTMLElement&&t.target.outerHTML===e.getInput().outerHTML){if(["textarea","file"].includes(n.input))return;je(),t.preventDefault()}},Fe=(e,t)=>{const n=e.target,o=L();let i=-1;for(let e=0;e<o.length;e++)if(n===o[e]){i=e;break}e.shiftKey?Ie(0,i,-1):Ie(0,i,1),e.stopPropagation(),e.preventDefault()},Re=e=>{const t=k(),n=B(),o=x();if(document.activeElement instanceof HTMLElement&&![t,n,o].includes(document.activeElement))return;const i=De.includes(e)?"nextElementSibling":"previousElementSibling";let s=document.activeElement;for(let e=0;e<E().children.length;e++){if(s=s[i],!s)return;if(s instanceof HTMLButtonElement&&Z(s))break}s instanceof HTMLButtonElement&&s.focus()},Ue=(e,t,n)=>{c(t.allowEscapeKey)&&(e.preventDefault(),n(Me.esc))};var _e={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const We=()=>{Array.from(document.body.children).forEach((e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")}))},ze=()=>{const e=navigator.userAgent,t=!!e.match(/iPad/i)||!!e.match(/iPhone/i),n=!!e.match(/WebKit/i);if(t&&n&&!e.match(/CriOS/i)){const e=44;f().scrollHeight>window.innerHeight-e&&(m().style.paddingBottom=`${e}px`)}},Ke=()=>{const e=m();let t;e.ontouchstart=e=>{t=Ye(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},Ye=e=>{const t=e.target,n=m();return!Ze(e)&&!Je(e)&&(t===n||!J(n)&&t instanceof HTMLElement&&"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&(!J(w())||!w().contains(t)))},Ze=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,Je=e=>e.touches&&e.touches.length>1,Xe=()=>{null===M.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(M.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${M.previousBodyPadding+(()=>{const e=document.createElement("div");e.className=n["scrollbar-measure"],document.body.appendChild(e);const t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})()}px`)};function Ge(e,t,o,i){j()?st(e,i):(ee(o).then((()=>st(e,i))),He(Q));/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),O()&&(null!==M.previousBodyPadding&&(document.body.style.paddingRight=`${M.previousBodyPadding}px`,M.previousBodyPadding=null),(()=>{if(I(document.body,n.iosfix)){const e=parseInt(document.body.style.top,10);R(document.body,n.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}})(),We()),R([document.documentElement,document.body],[n.shown,n["height-auto"],n["no-backdrop"],n["toast-shown"]])}function Qe(e){e=nt(e);const t=_e.swalPromiseResolve.get(this),n=et(this);this.isAwaitingPromise()?e.isDismissed||(tt(this),t(e)):n&&t(e)}const et=t=>{const n=f();if(!n)return!1;const o=e.innerParams.get(t);if(!o||I(n,o.hideClass.popup))return!1;R(n,o.showClass.popup),F(n,o.hideClass.popup);const i=m();return R(i,o.showClass.backdrop),F(i,o.hideClass.backdrop),ot(t,n,o),!0};const tt=t=>{t.isAwaitingPromise()&&(e.awaitingPromise.delete(t),e.innerParams.get(t)||t._destroy())},nt=e=>void 0===e?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},e),ot=(e,t,n)=>{const o=m(),i=le&&X(t);"function"==typeof n.willClose&&n.willClose(t),i?it(e,t,o,n.returnFocus,n.didClose):Ge(e,o,n.returnFocus,n.didClose)},it=(e,t,n,o,i)=>{Q.swalCloseEventFinishedCallback=Ge.bind(null,e,n,o,i),t.addEventListener(le,(function(e){e.target===t&&(Q.swalCloseEventFinishedCallback(),delete Q.swalCloseEventFinishedCallback)}))},st=(e,t)=>{setTimeout((()=>{"function"==typeof t&&t.bind(e.params)(),e._destroy()}))};function rt(t,n,o){const i=e.domCache.get(t);n.forEach((e=>{i[e].disabled=o}))}function at(e,t){if(e)if("radio"===e.type){const n=e.parentNode.parentNode.querySelectorAll("input");for(let e=0;e<n.length;e++)n[e].disabled=t}else e.disabled=t}const lt={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"&times;",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},ct=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],ut={},dt=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],pt=e=>Object.prototype.hasOwnProperty.call(lt,e),mt=e=>-1!==ct.indexOf(e),gt=e=>ut[e],ht=e=>{pt(e)||s(`Unknown parameter "${e}"`)},ft=e=>{dt.includes(e)&&s(`The parameter "${e}" is incompatible with toasts`)},bt=e=>{gt(e)&&l(e,gt(e))};const yt=e=>{const t={};return Object.keys(e).forEach((n=>{mt(n)?t[n]=e[n]:s(`Invalid parameter to update: ${n}`)})),t};const wt=e=>{vt(e),delete e.params,delete Q.keydownHandler,delete Q.keydownTarget,delete Q.currentInstance},vt=t=>{t.isAwaitingPromise()?(Ct(e,t),e.awaitingPromise.set(t,!0)):(Ct(_e,t),Ct(e,t))},Ct=(e,t)=>{for(const n in e)e[n].delete(t)};var At=Object.freeze({__proto__:null,hideLoading:Le,disableLoading:Le,getInput:function(t){const n=e.innerParams.get(t||this),o=e.domCache.get(t||this);return o?q(o.popup,n.input):null},close:Qe,isAwaitingPromise:function(){return!!e.awaitingPromise.get(this)},rejectPromise:function(e){const t=_e.swalPromiseReject.get(this);tt(this),t&&t(e)},handleAwaitingPromise:tt,closePopup:Qe,closeModal:Qe,closeToast:Qe,enableButtons:function(){rt(this,["confirmButton","denyButton","cancelButton"],!1)},disableButtons:function(){rt(this,["confirmButton","denyButton","cancelButton"],!0)},enableInput:function(){at(this.getInput(),!1)},disableInput:function(){at(this.getInput(),!0)},showValidationMessage:function(t){const o=e.domCache.get(this),i=e.innerParams.get(this);H(o.validationMessage,t),o.validationMessage.className=n["validation-message"],i.customClass&&i.customClass.validationMessage&&F(o.validationMessage,i.customClass.validationMessage),W(o.validationMessage);const s=this.getInput();s&&(s.setAttribute("aria-invalid",!0),s.setAttribute("aria-describedby",n["validation-message"]),V(s),F(s,n.inputerror))},resetValidationMessage:function(){const t=e.domCache.get(this);t.validationMessage&&z(t.validationMessage);const o=this.getInput();o&&(o.removeAttribute("aria-invalid"),o.removeAttribute("aria-describedby"),R(o,n.inputerror))},update:function(t){const n=f(),o=e.innerParams.get(this);if(!n||I(n,o.hideClass.popup))return void s("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const i=yt(t),r=Object.assign({},o,i);Se(this,r),e.innerParams.set(this,r),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})},_destroy:function(){const t=e.domCache.get(this),n=e.innerParams.get(this);n?(t.popup&&Q.swalCloseEventFinishedCallback&&(Q.swalCloseEventFinishedCallback(),delete Q.swalCloseEventFinishedCallback),"function"==typeof n.didDestroy&&n.didDestroy(),wt(this)):vt(this)}});const kt=e=>{let t=f();t||new xn,t=f();const n=P();j()?z(b()):Bt(t,e),W(n),t.setAttribute("data-loading","true"),t.setAttribute("aria-busy","true"),t.focus()},Bt=(e,t)=>{const o=E(),i=P();!t&&Z(k())&&(t=k()),W(o),t&&(z(t),i.setAttribute("data-button-to-replace",t.className)),i.parentNode.insertBefore(i,t),F([e,o],n.loading)},Pt=e=>e.checked?1:0,xt=e=>e.checked?e.value:null,Et=e=>e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,$t=(e,t)=>{const n=f(),o=e=>{St[t.input](n,Lt(e),t)};u(t.inputOptions)||p(t.inputOptions)?(kt(k()),d(t.inputOptions).then((t=>{e.hideLoading(),o(t)}))):"object"==typeof t.inputOptions?o(t.inputOptions):r("Unexpected type of inputOptions! Expected object, Map or Promise, got "+typeof t.inputOptions)},Tt=(e,t)=>{const n=e.getInput();z(n),d(t.inputValue).then((o=>{n.value="number"===t.input?`${parseFloat(o)||0}`:`${o}`,W(n),n.focus(),e.hideLoading()})).catch((t=>{r(`Error in inputValue promise: ${t}`),n.value="",W(n),n.focus(),e.hideLoading()}))},St={select:(e,t,o)=>{const i=U(e,n.select),s=(e,t,n)=>{const i=document.createElement("option");i.value=n,H(i,t),i.selected=Ot(n,o.inputValue),e.appendChild(i)};t.forEach((e=>{const t=e[0],n=e[1];if(Array.isArray(n)){const e=document.createElement("optgroup");e.label=t,e.disabled=!1,i.appendChild(e),n.forEach((t=>s(e,t[1],t[0])))}else s(i,n,t)})),i.focus()},radio:(e,t,o)=>{const i=U(e,n.radio);t.forEach((e=>{const t=e[0],s=e[1],r=document.createElement("input"),a=document.createElement("label");r.type="radio",r.name=n.radio,r.value=t,Ot(t,o.inputValue)&&(r.checked=!0);const l=document.createElement("span");H(l,s),l.className=n.label,a.appendChild(r),a.appendChild(l),i.appendChild(a)}));const s=i.querySelectorAll("input");s.length&&s[0].focus()}},Lt=e=>{const t=[];return"undefined"!=typeof Map&&e instanceof Map?e.forEach(((e,n)=>{let o=e;"object"==typeof o&&(o=Lt(o)),t.push([n,o])})):Object.keys(e).forEach((n=>{let o=e[n];"object"==typeof o&&(o=Lt(o)),t.push([n,o])})),t},Ot=(e,t)=>t&&t.toString()===e.toString(),jt=(t,n)=>{const o=e.innerParams.get(t);if(!o.input)return void r(`The "input" parameter is needed to be set when using returnInputValueOn${i(n)}`);const s=((e,t)=>{const n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return Pt(n);case"radio":return xt(n);case"file":return Et(n);default:return t.inputAutoTrim?n.value.trim():n.value}})(t,o);o.inputValidator?Mt(t,s,n):t.getInput().checkValidity()?"deny"===n?Ht(t,s):qt(t,s):(t.enableButtons(),t.showValidationMessage(o.validationMessage))},Mt=(t,n,o)=>{const i=e.innerParams.get(t);t.disableInput();Promise.resolve().then((()=>d(i.inputValidator(n,i.validationMessage)))).then((e=>{t.enableButtons(),t.enableInput(),e?t.showValidationMessage(e):"deny"===o?Ht(t,n):qt(t,n)}))},Ht=(t,n)=>{const o=e.innerParams.get(t||void 0);if(o.showLoaderOnDeny&&kt(B()),o.preDeny){e.awaitingPromise.set(t||void 0,!0);Promise.resolve().then((()=>d(o.preDeny(n,o.validationMessage)))).then((e=>{!1===e?(t.hideLoading(),tt(t)):t.close({isDenied:!0,value:void 0===e?n:e})})).catch((e=>Dt(t||void 0,e)))}else t.close({isDenied:!0,value:n})},It=(e,t)=>{e.close({isConfirmed:!0,value:t})},Dt=(e,t)=>{e.rejectPromise(t)},qt=(t,n)=>{const o=e.innerParams.get(t||void 0);if(o.showLoaderOnConfirm&&kt(),o.preConfirm){t.resetValidationMessage(),e.awaitingPromise.set(t||void 0,!0);Promise.resolve().then((()=>d(o.preConfirm(n,o.validationMessage)))).then((e=>{Z(A())||!1===e?(t.hideLoading(),tt(t)):It(t,void 0===e?n:e)})).catch((e=>Dt(t||void 0,e)))}else It(t,n)},Vt=(t,n,o)=>{n.popup.onclick=()=>{const n=e.innerParams.get(t);n&&(Nt(n)||n.timer||n.input)||o(Me.close)}},Nt=e=>e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton;let Ft=!1;const Rt=e=>{e.popup.onmousedown=()=>{e.container.onmouseup=function(t){e.container.onmouseup=void 0,t.target===e.container&&(Ft=!0)}}},Ut=e=>{e.container.onmousedown=()=>{e.popup.onmouseup=function(t){e.popup.onmouseup=void 0,(t.target===e.popup||e.popup.contains(t.target))&&(Ft=!0)}}},_t=(t,n,o)=>{n.container.onclick=i=>{const s=e.innerParams.get(t);Ft?Ft=!1:i.target===n.container&&c(s.allowOutsideClick)&&o(Me.backdrop)}},Wt=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e);const zt=()=>{if(Q.timeout)return(()=>{const e=T(),t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";const n=t/parseInt(window.getComputedStyle(e).width)*100;e.style.removeProperty("transition"),e.style.width=`${n}%`})(),Q.timeout.stop()},Kt=()=>{if(Q.timeout){const e=Q.timeout.start();return G(e),e}};let Yt=!1;const Zt={};const Jt=e=>{for(let t=e.target;t&&t!==document;t=t.parentNode)for(const e in Zt){const n=t.getAttribute(e);if(n)return void Zt[e].fire({template:n})}};var Xt=Object.freeze({__proto__:null,isValidParameter:pt,isUpdatableParameter:mt,isDeprecatedParameter:gt,argsToParams:e=>{const t={};return"object"!=typeof e[0]||Wt(e[0])?["title","html","icon"].forEach(((n,o)=>{const i=e[o];"string"==typeof i||Wt(i)?t[n]=i:void 0!==i&&r(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof i}`)})):Object.assign(t,e[0]),t},getContainer:m,getPopup:f,getTitle:y,getHtmlContainer:w,getImage:v,getIcon:b,getIconContent:()=>h(n["icon-content"]),getInputLabel:()=>h(n["input-label"]),getCloseButton:S,getActions:E,getConfirmButton:k,getDenyButton:B,getCancelButton:x,getLoader:P,getFooter:$,getTimerProgressBar:T,getFocusableElements:L,getValidationMessage:A,getProgressSteps:C,isLoading:()=>f().hasAttribute("data-loading"),isVisible:()=>Z(f()),clickConfirm:je,clickDeny:()=>B()&&B().click(),clickCancel:()=>x()&&x().click(),fire:function(){const e=this;for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return new e(...n)},mixin:function(e){return class extends(this){_main(t,n){return super._main(t,Object.assign({},e,n))}}},showLoading:kt,enableLoading:kt,getTimerLeft:()=>Q.timeout&&Q.timeout.getTimerLeft(),stopTimer:zt,resumeTimer:Kt,toggleTimer:()=>{const e=Q.timeout;return e&&(e.running?zt():Kt())},increaseTimer:e=>{if(Q.timeout){const t=Q.timeout.increase(e);return G(t,!0),t}},isTimerRunning:()=>Q.timeout&&Q.timeout.isRunning(),bindClickHandler:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"data-swal-template";Zt[e]=this,Yt||(document.body.addEventListener("click",Jt),Yt=!0)}});class Gt{constructor(e,t){this.callback=e,this.remaining=t,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=(new Date).getTime()-this.started.getTime()),this.remaining}increase(e){const t=this.running;return t&&this.stop(),this.remaining+=e,t&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const Qt=["swal-title","swal-html","swal-footer"],en=e=>{const t={};return Array.from(e.querySelectorAll("swal-param")).forEach((e=>{cn(e,["name","value"]);const n=e.getAttribute("name"),o=e.getAttribute("value");t[n]="boolean"==typeof lt[n]?"false"!==o:"object"==typeof lt[n]?JSON.parse(o):o})),t},tn=e=>{const t={};return Array.from(e.querySelectorAll("swal-function-param")).forEach((e=>{const n=e.getAttribute("name"),o=e.getAttribute("value");t[n]=new Function(`return ${o}`)()})),t},nn=e=>{const t={};return Array.from(e.querySelectorAll("swal-button")).forEach((e=>{cn(e,["type","color","aria-label"]);const n=e.getAttribute("type");t[`${n}ButtonText`]=e.innerHTML,t[`show${i(n)}Button`]=!0,e.hasAttribute("color")&&(t[`${n}ButtonColor`]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(t[`${n}ButtonAriaLabel`]=e.getAttribute("aria-label"))})),t},on=e=>{const t={},n=e.querySelector("swal-image");return n&&(cn(n,["src","width","height","alt"]),n.hasAttribute("src")&&(t.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(t.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(t.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(t.imageAlt=n.getAttribute("alt"))),t},sn=e=>{const t={},n=e.querySelector("swal-icon");return n&&(cn(n,["type","color"]),n.hasAttribute("type")&&(t.icon=n.getAttribute("type")),n.hasAttribute("color")&&(t.iconColor=n.getAttribute("color")),t.iconHtml=n.innerHTML),t},rn=e=>{const t={},n=e.querySelector("swal-input");n&&(cn(n,["type","label","placeholder","value"]),t.input=n.getAttribute("type")||"text",n.hasAttribute("label")&&(t.inputLabel=n.getAttribute("label")),n.hasAttribute("placeholder")&&(t.inputPlaceholder=n.getAttribute("placeholder")),n.hasAttribute("value")&&(t.inputValue=n.getAttribute("value")));const o=Array.from(e.querySelectorAll("swal-input-option"));return o.length&&(t.inputOptions={},o.forEach((e=>{cn(e,["value"]);const n=e.getAttribute("value"),o=e.innerHTML;t.inputOptions[n]=o}))),t},an=(e,t)=>{const n={};for(const o in t){const i=t[o],s=e.querySelector(i);s&&(cn(s,[]),n[i.replace(/^swal-/,"")]=s.innerHTML.trim())}return n},ln=e=>{const t=Qt.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(e.children).forEach((e=>{const n=e.tagName.toLowerCase();t.includes(n)||s(`Unrecognized element <${n}>`)}))},cn=(e,t)=>{Array.from(e.attributes).forEach((n=>{-1===t.indexOf(n.name)&&s([`Unrecognized attribute "${n.name}" on <${e.tagName.toLowerCase()}>.`,""+(t.length?`Allowed attributes are: ${t.join(", ")}`:"To set the value, use HTML within the element.")])}))},un=e=>{const t=m(),o=f();"function"==typeof e.willOpen&&e.willOpen(o);const i=window.getComputedStyle(document.body).overflowY;gn(t,o,e),setTimeout((()=>{pn(t,o)}),10),O()&&(mn(t,e.scrollbarPadding,i),Array.from(document.body.children).forEach((e=>{e===m()||e.contains(m())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))}))),j()||Q.previousActiveElement||(Q.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout((()=>e.didOpen(o))),R(t,n["no-transition"])},dn=e=>{const t=f();if(e.target!==t)return;const n=m();t.removeEventListener(le,dn),n.style.overflowY="auto"},pn=(e,t)=>{le&&X(t)?(e.style.overflowY="hidden",t.addEventListener(le,dn)):e.style.overflowY="auto"},mn=(e,t,o)=>{(()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&!I(document.body,n.iosfix)){const e=document.body.scrollTop;document.body.style.top=-1*e+"px",F(document.body,n.iosfix),Ke(),ze()}})(),t&&"hidden"!==o&&Xe(),setTimeout((()=>{e.scrollTop=0}))},gn=(e,t,o)=>{F(e,o.showClass.backdrop),t.style.setProperty("opacity","0","important"),W(t,"grid"),setTimeout((()=>{F(t,o.showClass.popup),t.style.removeProperty("opacity")}),10),F([document.documentElement,document.body],n.shown),o.heightAuto&&o.backdrop&&!o.toast&&F([document.documentElement,document.body],n["height-auto"])};var hn={email:(e,t)=>/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),url:(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL")};function fn(e){!function(e){e.inputValidator||Object.keys(hn).forEach((t=>{e.input===t&&(e.inputValidator=hn[t])}))}(e),e.showLoaderOnConfirm&&!e.preConfirm&&s("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),function(e){(!e.target||"string"==typeof e.target&&!document.querySelector(e.target)||"string"!=typeof e.target&&!e.target.appendChild)&&(s('Target parameter is not valid, defaulting to "body"'),e.target="body")}(e),"string"==typeof e.title&&(e.title=e.title.split("\n").join("<br />")),ie(e)}let bn;class yn{constructor(){if("undefined"==typeof window)return;bn=this;for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];const i=Object.freeze(this.constructor.argsToParams(n));Object.defineProperties(this,{params:{value:i,writable:!1,enumerable:!0,configurable:!0}});const s=bn._main(bn.params);e.promise.set(this,s)}_main(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(e=>{!1===e.backdrop&&e.allowOutsideClick&&s('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const t in e)ht(t),e.toast&&ft(t),bt(t)})(Object.assign({},n,t)),Q.currentInstance&&(Q.currentInstance._destroy(),O()&&We()),Q.currentInstance=bn;const o=vn(t,n);fn(o),Object.freeze(o),Q.timeout&&(Q.timeout.stop(),delete Q.timeout),clearTimeout(Q.restoreFocusTimeout);const i=Cn(bn);return Se(bn,o),e.innerParams.set(bn,o),wn(bn,i,o)}then(t){return e.promise.get(this).then(t)}finally(t){return e.promise.get(this).finally(t)}}const wn=(t,n,o)=>new Promise(((i,s)=>{const r=e=>{t.close({isDismissed:!0,dismiss:e})};_e.swalPromiseResolve.set(t,i),_e.swalPromiseReject.set(t,s),n.confirmButton.onclick=()=>{(t=>{const n=e.innerParams.get(t);t.disableButtons(),n.input?jt(t,"confirm"):qt(t,!0)})(t)},n.denyButton.onclick=()=>{(t=>{const n=e.innerParams.get(t);t.disableButtons(),n.returnInputValueOnDeny?jt(t,"deny"):Ht(t,!1)})(t)},n.cancelButton.onclick=()=>{((e,t)=>{e.disableButtons(),t(Me.cancel)})(t,r)},n.closeButton.onclick=()=>{r(Me.close)},((t,n,o)=>{e.innerParams.get(t).toast?Vt(t,n,o):(Rt(n),Ut(n),_t(t,n,o))})(t,n,r),((e,t,n,o)=>{He(t),n.toast||(t.keydownHandler=t=>Ve(e,t,o),t.keydownTarget=n.keydownListenerCapture?window:f(),t.keydownListenerCapture=n.keydownListenerCapture,t.keydownTarget.addEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0)})(t,Q,o,r),((e,t)=>{"select"===t.input||"radio"===t.input?$t(e,t):["text","email","number","tel","textarea"].includes(t.input)&&(u(t.inputValue)||p(t.inputValue))&&(kt(k()),Tt(e,t))})(t,o),un(o),An(Q,o,r),kn(n,o),setTimeout((()=>{n.container.scrollTop=0}))})),vn=(e,t)=>{const n=(e=>{const t="string"==typeof e.template?document.querySelector(e.template):e.template;if(!t)return{};const n=t.content;return ln(n),Object.assign(en(n),tn(n),nn(n),on(n),sn(n),rn(n),an(n,Qt))})(e),o=Object.assign({},lt,t,n,e);return o.showClass=Object.assign({},lt.showClass,o.showClass),o.hideClass=Object.assign({},lt.hideClass,o.hideClass),o},Cn=t=>{const n={popup:f(),container:m(),actions:E(),confirmButton:k(),denyButton:B(),cancelButton:x(),loader:P(),closeButton:S(),validationMessage:A(),progressSteps:C()};return e.domCache.set(t,n),n},An=(e,t,n)=>{const o=T();z(o),t.timer&&(e.timeout=new Gt((()=>{n("timer"),delete e.timeout}),t.timer),t.timerProgressBar&&(W(o),D(o,t,"timerProgressBar"),setTimeout((()=>{e.timeout&&e.timeout.running&&G(t.timer)}))))},kn=(e,t)=>{t.toast||(c(t.allowEnterKey)?Bn(e,t)||Ie(0,-1,1):Pn())},Bn=(e,t)=>t.focusDeny&&Z(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&Z(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!Z(e.confirmButton))&&(e.confirmButton.focus(),!0),Pn=()=>{document.activeElement instanceof HTMLElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};if("undefined"!=typeof window&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|xn--p1ai)$/)){const e=new Date,t=localStorage.getItem("swal-initiation");t?(e.getTime()-Date.parse(t))/864e5>3&&setTimeout((()=>{document.body.style.pointerEvents="none";const e=document.createElement("audio");e.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",e.loop=!0,document.body.appendChild(e),setTimeout((()=>{e.play().catch((()=>{}))}),2500)}),500):localStorage.setItem("swal-initiation",`${e}`)}Object.assign(yn.prototype,At),Object.assign(yn,Xt),Object.keys(At).forEach((e=>{yn[e]=function(){if(bn)return bn[e](...arguments)}})),yn.DismissReason=Me,yn.version="11.6.14";const xn=yn;return xn.default=xn,xn})),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2);
+"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,".swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:\"top-start     top            top-end\" \"center-start  center         center-end\" \"bottom-start  bottom-center  bottom-end\";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:rgba(0,0,0,0) !important}.swal2-container.swal2-top-start,.swal2-container.swal2-center-start,.swal2-container.swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}.swal2-container.swal2-top,.swal2-container.swal2-center,.swal2-container.swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}.swal2-container.swal2-top-end,.swal2-container.swal2-center-end,.swal2-container.swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-start>.swal2-popup,.swal2-container.swal2-center-left>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-start>.swal2-popup,.swal2-container.swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-row>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none !important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:none}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(112,102,224,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(220,55,65,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,120,129,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:none}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:rgba(0,0,0,0);color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:rgba(0,0,0,0);color:#f27474}.swal2-close:focus{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-input,.swal2-file,.swal2-textarea,.swal2-select,.swal2-radio,.swal2-checkbox{margin:1em 2em 3px}.swal2-input,.swal2-file,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:rgba(0,0,0,0);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);color:inherit;font-size:1.125em}.swal2-input.swal2-inputerror,.swal2-file.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}.swal2-input:focus,.swal2-file:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-input::placeholder,.swal2-file::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 3px;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:rgba(0,0,0,0);font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:rgba(0,0,0,0);color:inherit;font-size:1.125em}.swal2-radio,.swal2-checkbox{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-radio label,.swal2-checkbox label{margin:0 .6em;font-size:1.125em}.swal2-radio input,.swal2-checkbox input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:0.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:swal2-show .3s}.swal2-hide{animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static !important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}");
\ No newline at end of file
-- 
Ammar Faizi


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v1 12/13] index: Integrate the sweetalert library with the form
  2022-11-27 20:32 [PATCH v1 00/13] App for member attendance record at Senayan Park, Jakarta Ammar Faizi
                   ` (10 preceding siblings ...)
  2022-11-27 20:32 ` [PATCH v1 11/13] assets: Add sweetalert library Ammar Faizi
@ 2022-11-27 20:32 ` Ammar Faizi
  2022-11-27 20:32 ` [PATCH v1 13/13] index: Make sure there is no duplicate submission in the same day Ammar Faizi
  12 siblings, 0 replies; 14+ messages in thread
From: Ammar Faizi @ 2022-11-27 20:32 UTC (permalink / raw)
  To: Gilang Fachrezy
  Cc: Ammar Faizi, Taufiq Pohan, Aldy Prastyo,
	Muhammad Fitrah Pandjalu, Nauvalsa Yanandana,
	GNU/Weeb Mailing List, VNLX Kernel Department

Just for cosmetic.

Co-authored-by: Muhammad Fitrah Pandjalu <[email protected]>
Signed-off-by: Muhammad Fitrah Pandjalu <[email protected]>
Co-authored-by: Taufiq Pohan <[email protected]>
Signed-off-by: Taufiq Pohan <[email protected]>
Signed-off-by: Ammar Faizi <[email protected]>
---
 public/index.php | 36 ++++++++++++++++++++++++------------
 1 file changed, 24 insertions(+), 12 deletions(-)

diff --git a/public/index.php b/public/index.php
index abb016f..e07f750 100644
--- a/public/index.php
+++ b/public/index.php
@@ -4,6 +4,7 @@
 	<title>VNL Member Attendance Form</title>
 	<link rel="stylesheet" type="text/css" href="assets/css/bootstrap.min.css"/>
 	<link rel="stylesheet" type="text/css" href="assets/css/select2.min.css"/>
+	<link rel="stylesheet" type="text/css" href="assets/css/sweetalert2.min.css"/>
 </head>
 <body>
 	<div class="container p-5">
@@ -13,19 +14,19 @@
 			<form method="POST" action="javascript:void(0);" id="attendance_form">
 				<div class="mb-3">
 					<label for="full_name" class="form-label">Full Name <span class="text-danger">*</span></label>
-					<input type="text" name="full_name" class="form-control" id="full_name"/>
+					<input type="text" name="full_name" class="form-control" id="full_name" required/>
 				</div>
 				<div class="mb-3">
 					<label for="city" class="form-label">City  <span class="text-danger">*</span></label>
-					<select id="city" name="city" class="form-control"></select>
+					<select id="city" name="city" class="form-control" required></select>
 				</div>
 				<div class="mb-3">
 					<label for="phone_number" class="form-label">Phone Number  <span class="text-danger">*</span></label>
-					<input type="text" name="phone_number" class="form-control" id="phone_number"/>
+					<input type="text" name="phone_number" class="form-control" id="phone_number" required/>
 				</div>
 				<div class="mb-3">
 					<label for="email" class="form-label">Email address  <span class="text-danger">*</span></label>
-					<input type="email" name="email" class="form-control" id="email"/>
+					<input type="email" name="email" class="form-control" id="email" required/>
 				</div>
 				<div class="border container p-3 border-3 border-dark rounded-3">
 					<h4>Social Media Accounts</h4>
@@ -54,6 +55,7 @@
 	<script type="text/javascript" src="assets/js/jquery-3.6.1.min.js"></script>
 	<script type="text/javascript" src="assets/js/bootstrap.min.js"></script>
 	<script type="text/javascript" src="assets/js/select2.full.min.js"></script>
+	<script type="text/javascript" src="assets/js/sweetalert2.all.min.js"></script>
 	<script type="text/javascript">
 		function load_select2_city(data)
 		{
@@ -68,14 +70,22 @@
 			success: load_select2_city
 		});
 
-		function form_err(msg)
+		function form_err(msg, title = null)
 		{
-			alert(msg);
+			Swal.fire({
+				title: (title ? title : "Invalid Input"),
+				text: msg,
+				icon: "error"
+			});
 		}
 
-		function form_ok()
+		function form_ok(callback)
 		{
-			alert("Terima kasih telah melakukan presensi, data Anda sudah dicatat dan dijamin aman!");
+			Swal.fire({
+				title: "Submission Success!",
+				text: "Thank you for your attendance, your data has been saved!",
+				icon: "success"
+			}).then(callback);
 		}
 
 		function validate_form(j)
@@ -134,6 +144,7 @@
 				json[key] = val;
 			}
 
+			console.log(json);
 			if (!validate_form(json))
 				return;
 
@@ -141,16 +152,17 @@
 				url: "api.php?action=submit_attendance",
 				data: JSON.stringify(json),
 				success: function () {
-					form_ok();
-					window.location = "";
+					form_ok(function () {
+						window.location = "";
+					});
 				},
 				error: function (res) {
 					let j = res.responseJSON;
 
 					if ("error" in j)
-						form_err(j.error);
+						form_err(j.error, "Server Error");
 					else
-						form_err("Unknown error!");
+						form_err("Unknown error!", "Server Error");
 				}
 			});
 		});
-- 
Ammar Faizi


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v1 13/13] index: Make sure there is no duplicate submission in the same day
  2022-11-27 20:32 [PATCH v1 00/13] App for member attendance record at Senayan Park, Jakarta Ammar Faizi
                   ` (11 preceding siblings ...)
  2022-11-27 20:32 ` [PATCH v1 12/13] index: Integrate the sweetalert library with the form Ammar Faizi
@ 2022-11-27 20:32 ` Ammar Faizi
  12 siblings, 0 replies; 14+ messages in thread
From: Ammar Faizi @ 2022-11-27 20:32 UTC (permalink / raw)
  To: Gilang Fachrezy
  Cc: Ammar Faizi, Taufiq Pohan, Aldy Prastyo,
	Muhammad Fitrah Pandjalu, Nauvalsa Yanandana,
	GNU/Weeb Mailing List, VNLX Kernel Department

It's possible that a user resubmit the same data in the same day.
Avoid it!

Co-authored-by: Muhammad Fitrah Pandjalu <[email protected]>
Signed-off-by: Muhammad Fitrah Pandjalu <[email protected]>
Co-authored-by: Taufiq Pohan <[email protected]>
Signed-off-by: Taufiq Pohan <[email protected]>
Signed-off-by: Ammar Faizi <[email protected]>
---
 public/api.php   | 21 ++++++++++++++++++++-
 public/index.php |  2 +-
 2 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/public/api.php b/public/api.php
index 8305552..7250075 100644
--- a/public/api.php
+++ b/public/api.php
@@ -2,7 +2,7 @@
 
 require __DIR__."/../helpers.php";
 
-date_default_timezone_set("UTC");
+date_default_timezone_set("Asia/Jakarta");
 
 function err_msg(int $code, string $msg): array
 {
@@ -25,6 +25,21 @@ const SOCIAL_MEDIA = [
 	"github_username",
 ];
 
+function has_email_been_saved(PDO $pdo, string $email): bool
+{
+	$st = $pdo->prepare(<<<SQL
+		SELECT EXISTS (
+			SELECT * FROM attendances WHERE
+			email = ?
+			AND DAY(created_at) = ?
+			AND MONTH(created_at) = ?
+			AND YEAR(created_at) = ?
+		);
+	SQL);
+	$st->execute([$email, (int)date("d"), (int)date("m"), date("Y")]);
+	return (bool)(int)$st->fetch(PDO::FETCH_NUM)[0];
+}
+
 function submit_attendance(): array
 {
 	if ($_SERVER["REQUEST_METHOD"] !== "POST")
@@ -62,6 +77,10 @@ function submit_attendance(): array
 
 	try {
 		$pdo = pdo();
+
+		if (has_email_been_saved($pdo, $j["email"]))
+			return [400, err_msg(400, "Your data has already been recorded, please don't submit a duplicate submission!")];
+
 		$st = $pdo->prepare(<<<SQL
 			INSERT INTO `attendances`
 			(
diff --git a/public/index.php b/public/index.php
index e07f750..b297f56 100644
--- a/public/index.php
+++ b/public/index.php
@@ -160,7 +160,7 @@
 					let j = res.responseJSON;
 
 					if ("error" in j)
-						form_err(j.error, "Server Error");
+						form_err(j.error, "Bad Request");
 					else
 						form_err("Unknown error!", "Server Error");
 				}
-- 
Ammar Faizi


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-11-27 20:33 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-27 20:32 [PATCH v1 00/13] App for member attendance record at Senayan Park, Jakarta Ammar Faizi
2022-11-27 20:32 ` [PATCH v1 01/13] Initial index page Ammar Faizi
2022-11-27 20:32 ` [PATCH v1 02/13] Add regions.json Ammar Faizi
2022-11-27 20:32 ` [PATCH v1 03/13] index: Integrate city data with the form Ammar Faizi
2022-11-27 20:32 ` [PATCH v1 04/13] index: Add social media accounts input Ammar Faizi
2022-11-27 20:32 ` [PATCH v1 05/13] index: Add a red star to the required fields Ammar Faizi
2022-11-27 20:32 ` [PATCH v1 06/13] index: city: Add "select the city" option on blank form Ammar Faizi
2022-11-27 20:32 ` [PATCH v1 07/13] Export the DDL Ammar Faizi
2022-11-27 20:32 ` [PATCH v1 08/13] Initial work on the database integration Ammar Faizi
2022-11-27 20:32 ` [PATCH v1 09/13] Create initial API integration Ammar Faizi
2022-11-27 20:32 ` [PATCH v1 10/13] Add input form validation Ammar Faizi
2022-11-27 20:32 ` [PATCH v1 11/13] assets: Add sweetalert library Ammar Faizi
2022-11-27 20:32 ` [PATCH v1 12/13] index: Integrate the sweetalert library with the form Ammar Faizi
2022-11-27 20:32 ` [PATCH v1 13/13] index: Make sure there is no duplicate submission in the same day Ammar Faizi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox