Version Description
Download this release
Release Info
Developer | nahuelmahe |
Plugin | Caldera Forms – More Than Contact Forms |
Version | 1.9.4 |
Comparing to | |
See all releases |
Code changes from version 1.9.3 to 1.9.4
- assets/build/css/caldera-forms-front.min.css +1 -1
- assets/build/js/admin.min.js +1 -1
- assets/build/js/ajax-core.min.js +1 -1
- assets/build/js/caldera-forms-front.min.js +5 -5
- assets/build/js/conditionals.min.js +1 -1
- assets/build/js/edit.min.js +3 -3
- assets/build/js/entry-viewer-2.min.js +1 -1
- assets/build/js/frontend-script-init.min.js +1 -1
- assets/build/js/jquery-12-4.min.js +0 -5
- assets/build/js/modals.min.js +1 -1
- assets/build/js/parsley-aria.min.js +1 -1
- assets/build/js/parsley.min.js +1 -1
- assets/build/js/remodal.min.js +1 -1
- assets/build/js/viewer/init.min.js +0 -1
assets/build/css/caldera-forms-front.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
/*! GENERATED SOURCE FILE caldera-forms - v1.9.3 - 2020-12-21 */@media (min-width:768px){.caldera-grid .container{width:750px}}@media (min-width:992px){.caldera-grid .container{width:970px}}@media (min-width:1200px){.caldera-grid .container{width:1170px}}.caldera-grid article,.caldera-grid aside,.caldera-grid details,.caldera-grid figcaption,.caldera-grid figure,.caldera-grid footer,.caldera-grid header,.caldera-grid hgroup,.caldera-grid main,.caldera-grid nav,.caldera-grid section,.caldera-grid summary{display:block}.caldera-grid a{background:0 0;text-decoration:none}.caldera-grid img{vertical-align:middle}.caldera-grid pre{overflow:auto}.caldera-grid *,.caldera-grid :after,.caldera-grid :before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.caldera-grid html{font-size:62.5%;-webkit-tap-highlight-color:transparent}.caldera-grid body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}.caldera-grid button,.caldera-grid input,.caldera-grid select,.caldera-grid textarea{font-family:inherit;font-size:inherit;line-height:inherit}.caldera-grid a:focus,.caldera-grid a:hover{color:#2a6496;text-decoration:underline}.caldera-grid a:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.caldera-grid .img-responsive{display:block;max-width:100%;height:auto}.caldera-grid .img-rounded{border-radius:6px}.caldera-grid .img-thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.caldera-grid .img-circle{border-radius:50%}.caldera-grid hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.caldera-grid .sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.caldera-grid .container,.caldera-grid .container-fluid{margin-right:auto;margin-left:auto;padding-left:7.5px;padding-right:7.5px}@media (min-width:768px){.caldera-grid .container{width:735px}}@media (min-width:992px){.caldera-grid .container{width:955px}}@media (min-width:1200px){.caldera-grid .container{width:1155px}}.caldera-grid .row{margin-left:-7.5px;margin-right:-7.5px;max-width:100%}.caldera-grid .col-lg-1,.caldera-grid .col-lg-10,.caldera-grid .col-lg-11,.caldera-grid .col-lg-12,.caldera-grid .col-lg-2,.caldera-grid .col-lg-3,.caldera-grid .col-lg-4,.caldera-grid .col-lg-5,.caldera-grid .col-lg-6,.caldera-grid .col-lg-7,.caldera-grid .col-lg-8,.caldera-grid .col-lg-9,.caldera-grid .col-md-1,.caldera-grid .col-md-10,.caldera-grid .col-md-11,.caldera-grid .col-md-12,.caldera-grid .col-md-2,.caldera-grid .col-md-3,.caldera-grid .col-md-4,.caldera-grid .col-md-5,.caldera-grid .col-md-6,.caldera-grid .col-md-7,.caldera-grid .col-md-8,.caldera-grid .col-md-9,.caldera-grid .col-sm-1,.caldera-grid .col-sm-10,.caldera-grid .col-sm-11,.caldera-grid .col-sm-12,.caldera-grid .col-sm-2,.caldera-grid .col-sm-3,.caldera-grid .col-sm-4,.caldera-grid .col-sm-5,.caldera-grid .col-sm-6,.caldera-grid .col-sm-7,.caldera-grid .col-sm-8,.caldera-grid .col-sm-9,.caldera-grid .col-xs-1,.caldera-grid .col-xs-10,.caldera-grid .col-xs-11,.caldera-grid .col-xs-12,.caldera-grid .col-xs-2,.caldera-grid .col-xs-3,.caldera-grid .col-xs-4,.caldera-grid .col-xs-5,.caldera-grid .col-xs-6,.caldera-grid .col-xs-7,.caldera-grid .col-xs-8,.caldera-grid .col-xs-9{position:relative;padding-left:7.5px;padding-right:7.5px}.caldera-grid .col-xs-1,.caldera-grid .col-xs-10,.caldera-grid .col-xs-11,.caldera-grid .col-xs-12,.caldera-grid .col-xs-2,.caldera-grid .col-xs-3,.caldera-grid .col-xs-4,.caldera-grid .col-xs-5,.caldera-grid .col-xs-6,.caldera-grid .col-xs-7,.caldera-grid .col-xs-8,.caldera-grid .col-xs-9{float:left}.caldera-grid .col-xs-12{width:100%}.caldera-grid .col-xs-11{width:91.66666667%}.caldera-grid .col-xs-10{width:83.33333333%}.caldera-grid .col-xs-9{width:75%}.caldera-grid .col-xs-8{width:66.66666667%}.caldera-grid .col-xs-7{width:58.33333333%}.caldera-grid .col-xs-6{width:50%}.caldera-grid .col-xs-5{width:41.66666667%}.caldera-grid .col-xs-4{width:33.33333333%}.caldera-grid .col-xs-3{width:25%}.caldera-grid .col-xs-2{width:16.66666667%}.caldera-grid .col-xs-1{width:8.33333333%}.caldera-grid .col-xs-pull-12{right:100%}.caldera-grid .col-xs-pull-11{right:91.66666667%}.caldera-grid .col-xs-pull-10{right:83.33333333%}.caldera-grid .col-xs-pull-9{right:75%}.caldera-grid .col-xs-pull-8{right:66.66666667%}.caldera-grid .col-xs-pull-7{right:58.33333333%}.caldera-grid .col-xs-pull-6{right:50%}.caldera-grid .col-xs-pull-5{right:41.66666667%}.caldera-grid .col-xs-pull-4{right:33.33333333%}.caldera-grid .col-xs-pull-3{right:25%}.caldera-grid .col-xs-pull-2{right:16.66666667%}.caldera-grid .col-xs-pull-1{right:8.33333333%}.caldera-grid .col-xs-pull-0{right:0}.caldera-grid .col-xs-push-12{left:100%}.caldera-grid .col-xs-push-11{left:91.66666667%}.caldera-grid .col-xs-push-10{left:83.33333333%}.caldera-grid .col-xs-push-9{left:75%}.caldera-grid .col-xs-push-8{left:66.66666667%}.caldera-grid .col-xs-push-7{left:58.33333333%}.caldera-grid .col-xs-push-6{left:50%}.caldera-grid .col-xs-push-5{left:41.66666667%}.caldera-grid .col-xs-push-4{left:33.33333333%}.caldera-grid .col-xs-push-3{left:25%}.caldera-grid .col-xs-push-2{left:16.66666667%}.caldera-grid .col-xs-push-1{left:8.33333333%}.caldera-grid .col-xs-push-0{left:0}.caldera-grid .col-xs-offset-12{margin-left:100%}.caldera-grid .col-xs-offset-11{margin-left:91.66666667%}.caldera-grid .col-xs-offset-10{margin-left:83.33333333%}.caldera-grid .col-xs-offset-9{margin-left:75%}.caldera-grid .col-xs-offset-8{margin-left:66.66666667%}.caldera-grid .col-xs-offset-7{margin-left:58.33333333%}.caldera-grid .col-xs-offset-6{margin-left:50%}.caldera-grid .col-xs-offset-5{margin-left:41.66666667%}.caldera-grid .col-xs-offset-4{margin-left:33.33333333%}.caldera-grid .col-xs-offset-3{margin-left:25%}.caldera-grid .col-xs-offset-2{margin-left:16.66666667%}.caldera-grid .col-xs-offset-1{margin-left:8.33333333%}.caldera-grid .col-xs-offset-0{margin-left:0}@media (min-width:768px){.caldera-grid .col-sm-1,.caldera-grid .col-sm-10,.caldera-grid .col-sm-11,.caldera-grid .col-sm-12,.caldera-grid .col-sm-2,.caldera-grid .col-sm-3,.caldera-grid .col-sm-4,.caldera-grid .col-sm-5,.caldera-grid .col-sm-6,.caldera-grid .col-sm-7,.caldera-grid .col-sm-8,.caldera-grid .col-sm-9{float:left}.caldera-grid .col-sm-12{width:100%}.caldera-grid .col-sm-11{width:91.66666667%}.caldera-grid .col-sm-10{width:83.33333333%}.caldera-grid .col-sm-9{width:75%}.caldera-grid .col-sm-8{width:66.66666667%}.caldera-grid .col-sm-7{width:58.33333333%}.caldera-grid .col-sm-6{width:50%}.caldera-grid .col-sm-5{width:41.66666667%}.caldera-grid .col-sm-4{width:33.33333333%}.caldera-grid .col-sm-3{width:25%}.caldera-grid .col-sm-2{width:16.66666667%}.caldera-grid .col-sm-1{width:8.33333333%}.caldera-grid .col-sm-pull-12{right:100%}.caldera-grid .col-sm-pull-11{right:91.66666667%}.caldera-grid .col-sm-pull-10{right:83.33333333%}.caldera-grid .col-sm-pull-9{right:75%}.caldera-grid .col-sm-pull-8{right:66.66666667%}.caldera-grid .col-sm-pull-7{right:58.33333333%}.caldera-grid .col-sm-pull-6{right:50%}.caldera-grid .col-sm-pull-5{right:41.66666667%}.caldera-grid .col-sm-pull-4{right:33.33333333%}.caldera-grid .col-sm-pull-3{right:25%}.caldera-grid .col-sm-pull-2{right:16.66666667%}.caldera-grid .col-sm-pull-1{right:8.33333333%}.caldera-grid .col-sm-pull-0{right:0}.caldera-grid .col-sm-push-12{left:100%}.caldera-grid .col-sm-push-11{left:91.66666667%}.caldera-grid .col-sm-push-10{left:83.33333333%}.caldera-grid .col-sm-push-9{left:75%}.caldera-grid .col-sm-push-8{left:66.66666667%}.caldera-grid .col-sm-push-7{left:58.33333333%}.caldera-grid .col-sm-push-6{left:50%}.caldera-grid .col-sm-push-5{left:41.66666667%}.caldera-grid .col-sm-push-4{left:33.33333333%}.caldera-grid .col-sm-push-3{left:25%}.caldera-grid .col-sm-push-2{left:16.66666667%}.caldera-grid .col-sm-push-1{left:8.33333333%}.caldera-grid .col-sm-push-0{left:0}.caldera-grid .col-sm-offset-12{margin-left:100%}.caldera-grid .col-sm-offset-11{margin-left:91.66666667%}.caldera-grid .col-sm-offset-10{margin-left:83.33333333%}.caldera-grid .col-sm-offset-9{margin-left:75%}.caldera-grid .col-sm-offset-8{margin-left:66.66666667%}.caldera-grid .col-sm-offset-7{margin-left:58.33333333%}.caldera-grid .col-sm-offset-6{margin-left:50%}.caldera-grid .col-sm-offset-5{margin-left:41.66666667%}.caldera-grid .col-sm-offset-4{margin-left:33.33333333%}.caldera-grid .col-sm-offset-3{margin-left:25%}.caldera-grid .col-sm-offset-2{margin-left:16.66666667%}.caldera-grid .col-sm-offset-1{margin-left:8.33333333%}.caldera-grid .col-sm-offset-0{margin-left:0}}@media (min-width:992px){.caldera-grid .col-md-1,.caldera-grid .col-md-10,.caldera-grid .col-md-11,.caldera-grid .col-md-12,.caldera-grid .col-md-2,.caldera-grid .col-md-3,.caldera-grid .col-md-4,.caldera-grid .col-md-5,.caldera-grid .col-md-6,.caldera-grid .col-md-7,.caldera-grid .col-md-8,.caldera-grid .col-md-9{float:left}.caldera-grid .col-md-12{width:100%}.caldera-grid .col-md-11{width:91.66666667%}.caldera-grid .col-md-10{width:83.33333333%}.caldera-grid .col-md-9{width:75%}.caldera-grid .col-md-8{width:66.66666667%}.caldera-grid .col-md-7{width:58.33333333%}.caldera-grid .col-md-6{width:50%}.caldera-grid .col-md-5{width:41.66666667%}.caldera-grid .col-md-4{width:33.33333333%}.caldera-grid .col-md-3{width:25%}.caldera-grid .col-md-2{width:16.66666667%}.caldera-grid .col-md-1{width:8.33333333%}.caldera-grid .col-md-pull-12{right:100%}.caldera-grid .col-md-pull-11{right:91.66666667%}.caldera-grid .col-md-pull-10{right:83.33333333%}.caldera-grid .col-md-pull-9{right:75%}.caldera-grid .col-md-pull-8{right:66.66666667%}.caldera-grid .col-md-pull-7{right:58.33333333%}.caldera-grid .col-md-pull-6{right:50%}.caldera-grid .col-md-pull-5{right:41.66666667%}.caldera-grid .col-md-pull-4{right:33.33333333%}.caldera-grid .col-md-pull-3{right:25%}.caldera-grid .col-md-pull-2{right:16.66666667%}.caldera-grid .col-md-pull-1{right:8.33333333%}.caldera-grid .col-md-pull-0{right:0}.caldera-grid .col-md-push-12{left:100%}.caldera-grid .col-md-push-11{left:91.66666667%}.caldera-grid .col-md-push-10{left:83.33333333%}.caldera-grid .col-md-push-9{left:75%}.caldera-grid .col-md-push-8{left:66.66666667%}.caldera-grid .col-md-push-7{left:58.33333333%}.caldera-grid .col-md-push-6{left:50%}.caldera-grid .col-md-push-5{left:41.66666667%}.caldera-grid .col-md-push-4{left:33.33333333%}.caldera-grid .col-md-push-3{left:25%}.caldera-grid .col-md-push-2{left:16.66666667%}.caldera-grid .col-md-push-1{left:8.33333333%}.caldera-grid .col-md-push-0{left:0}.caldera-grid .col-md-offset-12{margin-left:100%}.caldera-grid .col-md-offset-11{margin-left:91.66666667%}.caldera-grid .col-md-offset-10{margin-left:83.33333333%}.caldera-grid .col-md-offset-9{margin-left:75%}.caldera-grid .col-md-offset-8{margin-left:66.66666667%}.caldera-grid .col-md-offset-7{margin-left:58.33333333%}.caldera-grid .col-md-offset-6{margin-left:50%}.caldera-grid .col-md-offset-5{margin-left:41.66666667%}.caldera-grid .col-md-offset-4{margin-left:33.33333333%}.caldera-grid .col-md-offset-3{margin-left:25%}.caldera-grid .col-md-offset-2{margin-left:16.66666667%}.caldera-grid .col-md-offset-1{margin-left:8.33333333%}.caldera-grid .col-md-offset-0{margin-left:0}}@-ms-viewport{width:device-width}@media (min-width:1200px){.caldera-grid .col-lg-1,.caldera-grid .col-lg-10,.caldera-grid .col-lg-11,.caldera-grid .col-lg-12,.caldera-grid .col-lg-2,.caldera-grid .col-lg-3,.caldera-grid .col-lg-4,.caldera-grid .col-lg-5,.caldera-grid .col-lg-6,.caldera-grid .col-lg-7,.caldera-grid .col-lg-8,.caldera-grid .col-lg-9{float:left}.caldera-grid .col-lg-12{width:100%}.caldera-grid .col-lg-11{width:91.66666667%}.caldera-grid .col-lg-10{width:83.33333333%}.caldera-grid .col-lg-9{width:75%}.caldera-grid .col-lg-8{width:66.66666667%}.caldera-grid .col-lg-7{width:58.33333333%}.caldera-grid .col-lg-6{width:50%}.caldera-grid .col-lg-5{width:41.66666667%}.caldera-grid .col-lg-4{width:33.33333333%}.caldera-grid .col-lg-3{width:25%}.caldera-grid .col-lg-2{width:16.66666667%}.caldera-grid .col-lg-1{width:8.33333333%}.caldera-grid .col-lg-pull-12{right:100%}.caldera-grid .col-lg-pull-11{right:91.66666667%}.caldera-grid .col-lg-pull-10{right:83.33333333%}.caldera-grid .col-lg-pull-9{right:75%}.caldera-grid .col-lg-pull-8{right:66.66666667%}.caldera-grid .col-lg-pull-7{right:58.33333333%}.caldera-grid .col-lg-pull-6{right:50%}.caldera-grid .col-lg-pull-5{right:41.66666667%}.caldera-grid .col-lg-pull-4{right:33.33333333%}.caldera-grid .col-lg-pull-3{right:25%}.caldera-grid .col-lg-pull-2{right:16.66666667%}.caldera-grid .col-lg-pull-1{right:8.33333333%}.caldera-grid .col-lg-pull-0{right:0}.caldera-grid .col-lg-push-12{left:100%}.caldera-grid .col-lg-push-11{left:91.66666667%}.caldera-grid .col-lg-push-10{left:83.33333333%}.caldera-grid .col-lg-push-9{left:75%}.caldera-grid .col-lg-push-8{left:66.66666667%}.caldera-grid .col-lg-push-7{left:58.33333333%}.caldera-grid .col-lg-push-6{left:50%}.caldera-grid .col-lg-push-5{left:41.66666667%}.caldera-grid .col-lg-push-4{left:33.33333333%}.caldera-grid .col-lg-push-3{left:25%}.caldera-grid .col-lg-push-2{left:16.66666667%}.caldera-grid .col-lg-push-1{left:8.33333333%}.caldera-grid .col-lg-push-0{left:0}.caldera-grid .col-lg-offset-12{margin-left:100%}.caldera-grid .col-lg-offset-11{margin-left:91.66666667%}.caldera-grid .col-lg-offset-10{margin-left:83.33333333%}.caldera-grid .col-lg-offset-9{margin-left:75%}.caldera-grid .col-lg-offset-8{margin-left:66.66666667%}.caldera-grid .col-lg-offset-7{margin-left:58.33333333%}.caldera-grid .col-lg-offset-6{margin-left:50%}.caldera-grid .col-lg-offset-5{margin-left:41.66666667%}.caldera-grid .col-lg-offset-4{margin-left:33.33333333%}.caldera-grid .col-lg-offset-3{margin-left:25%}.caldera-grid .col-lg-offset-2{margin-left:16.66666667%}.caldera-grid .col-lg-offset-1{margin-left:8.33333333%}.caldera-grid .col-lg-offset-0{margin-left:0}}.caldera-grid .clearfix:after,.caldera-grid .clearfix:before,.caldera-grid .container-fluid:after,.caldera-grid .container-fluid:before,.caldera-grid .container:after,.caldera-grid .container:before,.caldera-grid .row:after,.caldera-grid .row:before{content:" ";display:table}.caldera-grid .clearfix:after,.caldera-grid .container-fluid:after,.caldera-grid .container:after,.caldera-grid .row:after{clear:both}.caldera-grid .center-block{display:block;margin-left:auto;margin-right:auto}.caldera-grid .pull-right{float:right!important}.caldera-grid .pull-left{float:left!important}.caldera-grid .hide{display:none!important}.caldera-grid .show{display:block!important}.caldera-grid .hidden,.caldera-grid .visible-lg,.caldera-grid .visible-md,.caldera-grid .visible-sm,.caldera-grid .visible-xs{display:none!important}.caldera-grid .invisible{visibility:hidden}.caldera-grid .text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.caldera-grid .hidden{visibility:hidden!important}.caldera-grid .affix{position:fixed}@-ms-viewport{width:device-width}@media (max-width:767px){.caldera-grid .visible-xs{display:block!important}.caldera-grid table.visible-xs{display:table}.caldera-grid tr.visible-xs{display:table-row!important}.caldera-grid td.visible-xs,.caldera-grid th.visible-xs{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.caldera-grid .visible-sm{display:block!important}.caldera-grid table.visible-sm{display:table}.caldera-grid tr.visible-sm{display:table-row!important}.caldera-grid td.visible-sm,.caldera-grid th.visible-sm{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.caldera-grid .visible-md{display:block!important}.caldera-grid table.visible-md{display:table}.caldera-grid tr.visible-md{display:table-row!important}.caldera-grid td.visible-md,.caldera-grid th.visible-md{display:table-cell!important}}@media (min-width:1200px){.caldera-grid .visible-lg{display:block!important}.caldera-grid table.visible-lg{display:table}.caldera-grid tr.visible-lg{display:table-row!important}.caldera-grid td.visible-lg,.caldera-grid th.visible-lg{display:table-cell!important}.caldera-grid .hidden-lg{display:none!important}}@media (max-width:767px){.caldera-grid .hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.caldera-grid .hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.caldera-grid .hidden-md{display:none!important}}.caldera-grid .visible-print{display:none!important}@media print{.caldera-grid .visible-print{display:block!important}.caldera-grid table.visible-print{display:table}.caldera-grid tr.visible-print{display:table-row!important}.caldera-grid td.visible-print,.caldera-grid th.visible-print{display:table-cell!important}.caldera-grid .hidden-print{display:none!important}}input.parsley-success,select.parsley-success,textarea.parsley-success{color:#468847;background-color:#DFF0D8;border:1px solid #D6E9C6}input.parsley-error,select.parsley-error,textarea.parsley-error{color:#B94A48;background-color:#F2DEDE;border:1px solid #EED3D7}.parsley-errors-list{margin:2px 0 3px;padding:0;list-style-type:none;font-size:.9em;line-height:.9em;opacity:0;transition:all .3s ease-in;-o-transition:all .3s ease-in;-moz-transition:all .3s ease-in;-webkit-transition:all .3s ease-in}.parsley-errors-list.filled{opacity:1}.caldera-grid .alert{padding:8px;margin-bottom:18px;border-radius:2px}.caldera-grid .alert .alert-link{font-weight:700}.caldera-grid .alert-dismissable{padding-right:28px}.caldera-grid .alert-success{background-color:#dff0d8;border-color:#a3d48e;color:#3c763d}.caldera-grid .alert-success hr{border-top-color:#93cd7c}.caldera-grid .alert-success .alert-link{color:#2b542c}.caldera-grid .alert-info{background-color:#d9edf7;border-color:#85c5e5;color:#31708f}.caldera-grid .alert-info hr{border-top-color:#70bbe1}.caldera-grid .alert-info .alert-link{color:#245269}.caldera-grid .alert-warning{background-color:#f9edbe;border-color:#f0c36d;color:#333}.caldera-grid .alert-warning hr{border-top-color:#eeb956}.caldera-grid .alert-warning .alert-link{color:#1a1a1a}.caldera-grid .alert-danger,.caldera-grid .alert-error{background-color:#f2dede;border-color:#d59595;color:#a94442}.caldera-grid .alert-danger hr,.caldera-grid .alert-error hr{border-top-color:#ce8383}.caldera-grid .alert-danger .alert-link,.caldera-grid .alert-error .alert-link{color:#843534}.caldera-grid .alert-danger,.caldera-grid .alert-error,.caldera-grid .alert-info,.caldera-grid .alert-success,.caldera-grid .alert-warning{text-shadow:0 1px 0 rgba(255,255,255,.5)}.caldera-grid .has-error .form-control:focus,.caldera-grid .has-error .form-control:hover{border-color:#dd4b39}.caldera-grid.cf_processing{background:url(../images/loading.gif) center center/30px auto no-repeat rgba(0,0,0,0)}.caldera-grid.cf_processing>*{opacity:.5}.caldera-grid html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}.caldera-grid body{margin:0}.caldera-grid article,.caldera-grid aside,.caldera-grid details,.caldera-grid figcaption,.caldera-grid figure,.caldera-grid footer,.caldera-grid header,.caldera-grid hgroup,.caldera-grid main,.caldera-grid menu,.caldera-grid nav,.caldera-grid section,.caldera-grid summary{display:block}.caldera-grid audio,.caldera-grid canvas,.caldera-grid progress,.caldera-grid video{display:inline-block;vertical-align:baseline}.caldera-grid audio:not([controls]){display:none;height:0}.caldera-grid [hidden],.caldera-grid template{display:none}.caldera-grid a{background-color:transparent}.caldera-grid a:active,.caldera-grid a:hover{outline:0}.caldera-grid abbr[title]{border-bottom:1px dotted}.caldera-grid b,.caldera-grid strong{font-weight:700}.caldera-grid dfn{font-style:italic}.caldera-grid h1{font-size:2em;margin:.67em 0}.caldera-grid mark{background:#ff0;color:#000}.caldera-grid small{font-size:80%}.caldera-grid sub,.caldera-grid sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.caldera-grid sup{top:-.5em}.caldera-grid sub{bottom:-.25em}.caldera-grid img{border:0}.caldera-grid svg:not(:root){overflow:hidden}.caldera-grid pre,.caldera-grid textarea{overflow:auto}.caldera-grid figure{margin:1em 40px}.caldera-grid hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}.caldera-grid code,.caldera-grid kbd,.caldera-grid pre,.caldera-grid samp{font-family:monospace,monospace;font-size:1em}.caldera-grid button,.caldera-grid input,.caldera-grid optgroup,.caldera-grid select,.caldera-grid textarea{font:inherit;margin:0}.caldera-grid button{overflow:visible}.caldera-grid button,.caldera-grid select{text-transform:none}.caldera-grid button,.caldera-grid html input[type=button],.caldera-grid input[type=reset],.caldera-grid input[type=submit]{-webkit-appearance:button;cursor:pointer}.caldera-grid button[disabled],.caldera-grid html input[disabled]{cursor:default}.caldera-grid button::-moz-focus-inner,.caldera-grid input::-moz-focus-inner{border:0;padding:0}.caldera-grid input{line-height:normal}.caldera-grid input[type=checkbox],.caldera-grid input[type=radio]{box-sizing:border-box;padding:0}.caldera-grid input[type=number]::-webkit-inner-spin-button,.caldera-grid input[type=number]::-webkit-outer-spin-button{height:auto}.caldera-grid input[type=search]{-webkit-appearance:textfield;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.caldera-grid input[type=search]::-webkit-search-cancel-button,.caldera-grid input[type=search]::-webkit-search-decoration{-webkit-appearance:none}.caldera-grid optgroup{font-weight:700}.caldera-grid table{border-collapse:collapse;border-spacing:0}.caldera-grid td,.caldera-grid th{padding:0}@media print{.caldera-grid *,.caldera-grid :after,.caldera-grid :before{background:0 0!important;color:#000!important;box-shadow:none!important;text-shadow:none!important}.caldera-grid a,.caldera-grid a:visited{text-decoration:underline}.caldera-grid a[href]:after{content:" (" attr(href) ")"}.caldera-grid abbr[title]:after{content:" (" attr(title) ")"}.caldera-grid a[href^="#"]:after,.caldera-grid a[href^="javascript:"]:after{content:""}.caldera-grid blockquote,.caldera-grid pre{border:1px solid #999;page-break-inside:avoid}.caldera-grid thead{display:table-header-group}.caldera-grid img,.caldera-grid tr{page-break-inside:avoid}.caldera-grid img{max-width:100%!important}.caldera-grid h2,.caldera-grid h3,.caldera-grid p{orphans:3;widows:3}.caldera-grid h2,.caldera-grid h3{page-break-after:avoid}.caldera-grid select{background:#fff!important}.caldera-grid .navbar{display:none}.caldera-grid .btn>.caret,.caldera-grid .dropup>.btn>.caret{border-top-color:#000!important}.caldera-grid .label{border:1px solid #000}.caldera-grid .table{border-collapse:collapse!important}.caldera-grid .table td,.caldera-grid .table th{background-color:#fff!important}.caldera-grid .table-bordered td,.caldera-grid .table-bordered th{border:1px solid #ddd!important}}.caldera-grid .btn,.caldera-grid .btn-danger.active,.caldera-grid .btn-danger:active,.caldera-grid .btn-default.active,.caldera-grid .btn-default:active,.caldera-grid .btn-info.active,.caldera-grid .btn-info:active,.caldera-grid .btn-primary.active,.caldera-grid .btn-primary:active,.caldera-grid .btn-success.active,.caldera-grid .btn-success:active,.caldera-grid .btn-warning.active,.caldera-grid .btn-warning:active,.caldera-grid .btn.active,.caldera-grid .btn:active,.caldera-grid .form-control,.open>.dropdown-toggle.caldera-grid .btn-danger,.open>.dropdown-toggle.caldera-grid .btn-default,.open>.dropdown-toggle.caldera-grid .btn-info,.open>.dropdown-toggle.caldera-grid .btn-primary,.open>.dropdown-toggle.caldera-grid .btn-success,.open>.dropdown-toggle.caldera-grid .btn-warning{background-image:none}.caldera-grid fieldset{padding:0;margin:0;border:0;min-width:0}.caldera-grid legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}.caldera-grid label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}.caldera-grid input[type=checkbox],.caldera-grid input[type=radio]{margin:0;line-height:normal}.caldera-grid .form-group,.cf-color-picker .form-group{margin-bottom:15px}.caldera-grid .form-control,.caldera-grid output{font-size:14px;line-height:1.42857143;color:#555;display:block}.caldera-grid input[type=file]{display:block}.caldera-grid input[type=range]{display:block;width:100%}.caldera-grid select[multiple],.caldera-grid select[size]{height:auto}.caldera-grid input[type=checkbox]:focus,.caldera-grid input[type=file]:focus,.caldera-grid input[type=radio]:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.caldera-grid input[type=checkbox]{-webkit-appearance:checkbox}.caldera-grid input[type=radio]{-webkit-appearance:radio}.caldera-grid output{padding-top:7px}.caldera-grid .form-control{width:100%;height:34px;padding:6px 12px;background-color:#fff;border:1px solid #ccc;border-radius:2px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.caldera-grid .form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.caldera-grid .form-control::-moz-placeholder{color:#999;opacity:1}.caldera-grid .form-control:-ms-input-placeholder{color:#999}.caldera-grid .form-control::-webkit-input-placeholder{color:#999}.caldera-grid .form-control[disabled],.caldera-grid .form-control[readonly],fieldset[disabled] .caldera-grid .form-control{background-color:#eee;opacity:1}.caldera-grid .form-control[disabled],fieldset[disabled] .caldera-grid .form-control{cursor:not-allowed}textarea .caldera-grid .form-control{height:auto}@media screen and (-webkit-min-device-pixel-ratio:0){.caldera-grid input[type=date],.caldera-grid input[type=datetime-local],.caldera-grid input[type=month],.caldera-grid input[type=time]{line-height:34px}.caldera-grid input[type=date].input-sm,.caldera-grid input[type=datetime-local].input-sm,.caldera-grid input[type=month].input-sm,.caldera-grid input[type=time].input-sm,.input-group-sm .caldera-grid input[type=date],.input-group-sm .caldera-grid input[type=datetime-local],.input-group-sm .caldera-grid input[type=month],.input-group-sm .caldera-grid input[type=time]{line-height:30px}.caldera-grid input[type=date].input-lg,.caldera-grid input[type=datetime-local].input-lg,.caldera-grid input[type=month].input-lg,.caldera-grid input[type=time].input-lg,.input-group-lg .caldera-grid input[type=date],.input-group-lg .caldera-grid input[type=datetime-local],.input-group-lg .caldera-grid input[type=month],.input-group-lg .caldera-grid input[type=time]{line-height:46px}}.caldera-grid .checkbox,.caldera-grid .radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.caldera-grid .checkbox label,.caldera-grid .radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.caldera-grid .checkbox input[type=checkbox],.caldera-grid .checkbox-inline input[type=checkbox],.caldera-grid .radio input[type=radio],.caldera-grid .radio-inline input[type=radio]{margin-left:-20px}.caldera-grid .checkbox+.checkbox,.caldera-grid .radio+.radio{margin-top:-5px}.caldera-grid .checkbox-inline,.caldera-grid .radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer}.caldera-grid .checkbox-inline+.checkbox-inline,.caldera-grid .radio-inline+.radio-inline{margin-top:0;margin-left:10px}.caldera-grid .btn-block+.btn-block,.caldera-grid .help-block,.cf-toggle-switch .btn-block+.btn-block{margin-top:5px}.caldera-grid .checkbox-inline.disabled,.caldera-grid .checkbox.disabled label,.caldera-grid .radio-inline.disabled,.caldera-grid .radio.disabled label,.caldera-grid input[type=checkbox].disabled,.caldera-grid input[type=checkbox][disabled],.caldera-grid input[type=radio].disabled,.caldera-grid input[type=radio][disabled],fieldset[disabled] .caldera-grid .checkbox label,fieldset[disabled] .caldera-grid .checkbox-inline,fieldset[disabled] .caldera-grid .radio label,fieldset[disabled] .caldera-grid .radio-inline,fieldset[disabled] .caldera-grid input[type=checkbox],fieldset[disabled] .caldera-grid input[type=radio]{cursor:not-allowed}.caldera-grid .form-control-static{padding-top:7px;padding-bottom:7px;margin-bottom:0;min-height:34px}.caldera-grid .form-control-static.input-lg,.caldera-grid .form-control-static.input-sm{padding-left:0;padding-right:0}.caldera-grid .input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:1px}select.caldera-grid .input-sm{height:30px;line-height:30px}select[multiple].caldera-grid .input-sm,textarea.caldera-grid .input-sm{height:auto}.caldera-grid .form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:1px}select.caldera-grid .form-group-sm .form-control{height:30px;line-height:30px}select[multiple].caldera-grid .form-group-sm .form-control,textarea.caldera-grid .form-group-sm .form-control{height:auto}.caldera-grid .form-group-sm .form-control-static{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;min-height:32px}.caldera-grid .input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:4px}select.caldera-grid .input-lg{height:46px;line-height:46px}select[multiple].caldera-grid .input-lg,textarea.caldera-grid .input-lg{height:auto}.caldera-grid .form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:4px}select.caldera-grid .form-group-lg .form-control{height:46px;line-height:46px}select[multiple].caldera-grid .form-group-lg .form-control,textarea.caldera-grid .form-group-lg .form-control{height:auto}.caldera-grid .form-group-lg .form-control-static{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;min-height:38px}.caldera-grid .has-feedback{position:relative}.caldera-grid .has-feedback .form-control{padding-right:42.5px}.caldera-grid .form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.caldera-grid .input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.caldera-grid .input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.caldera-grid .has-success .checkbox,.caldera-grid .has-success .checkbox-inline,.caldera-grid .has-success .control-label,.caldera-grid .has-success .help-block,.caldera-grid .has-success .radio,.caldera-grid .has-success .radio-inline,.caldera-grid .has-success.checkbox label,.caldera-grid .has-success.checkbox-inline label,.caldera-grid .has-success.radio label,.caldera-grid .has-success.radio-inline label{color:#3c763d}.caldera-grid .has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.caldera-grid .has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.caldera-grid .has-success .input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.caldera-grid .has-success .form-control-feedback{color:#3c763d}.caldera-grid .has-warning .checkbox,.caldera-grid .has-warning .checkbox-inline,.caldera-grid .has-warning .control-label,.caldera-grid .has-warning .help-block,.caldera-grid .has-warning .radio,.caldera-grid .has-warning .radio-inline,.caldera-grid .has-warning.checkbox label,.caldera-grid .has-warning.checkbox-inline label,.caldera-grid .has-warning.radio label,.caldera-grid .has-warning.radio-inline label{color:#8a6d3b}.caldera-grid .has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.caldera-grid .has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.caldera-grid .has-warning .input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.caldera-grid .has-warning .form-control-feedback{color:#8a6d3b}.caldera-grid .has-error .checkbox,.caldera-grid .has-error .checkbox-inline,.caldera-grid .has-error .control-label,.caldera-grid .has-error .help-block,.caldera-grid .has-error .radio,.caldera-grid .has-error .radio-inline,.caldera-grid .has-error.checkbox label,.caldera-grid .has-error.checkbox-inline label,.caldera-grid .has-error.radio label,.caldera-grid .has-error.radio-inline label{color:#a94442}.caldera-grid .has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.caldera-grid .has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.caldera-grid .has-error .input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.caldera-grid .has-error .form-control-feedback{color:#a94442}.caldera-grid .has-feedback label~.form-control-feedback{top:25px}.caldera-grid .has-feedback label.sr-only~.form-control-feedback{top:0}.caldera-grid .help-block{display:block;margin-bottom:10px;color:#737373}@media (min-width:768px){.caldera-grid .form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.caldera-grid .form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.caldera-grid .form-inline .form-control-static{display:inline-block}.caldera-grid .form-inline .input-group{display:inline-table;vertical-align:middle}.caldera-grid .form-inline .input-group .form-control,.caldera-grid .form-inline .input-group .input-group-addon,.caldera-grid .form-inline .input-group .input-group-btn{width:auto}.caldera-grid .form-inline .input-group>.form-control{width:100%}.caldera-grid .form-inline .control-label{margin-bottom:0;vertical-align:middle}.caldera-grid .form-inline .checkbox,.caldera-grid .form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.caldera-grid .form-inline .checkbox label,.caldera-grid .form-inline .radio label{padding-left:0}.caldera-grid .form-inline .checkbox input[type=checkbox],.caldera-grid .form-inline .radio input[type=radio]{position:relative;margin-left:0}.caldera-grid .form-inline .has-feedback .form-control-feedback{top:0}.caldera-grid .form-horizontal .control-label{text-align:right;margin-bottom:0;padding-top:7px}}.caldera-grid .form-horizontal .checkbox,.caldera-grid .form-horizontal .checkbox-inline,.caldera-grid .form-horizontal .radio,.caldera-grid .form-horizontal .radio-inline{margin-top:0;margin-bottom:0;padding-top:7px}.caldera-grid .form-horizontal .checkbox,.caldera-grid .form-horizontal .radio{min-height:27px}.caldera-grid .form-horizontal .form-group{margin-left:-15px;margin-right:-15px}.caldera-grid .form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.caldera-grid .form-horizontal .form-group-lg .control-label{padding-top:14.33px}.caldera-grid .form-horizontal .form-group-sm .control-label{padding-top:6px}}.caldera-grid .btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:2px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.caldera-grid .btn.active.focus,.caldera-grid .btn.active:focus,.caldera-grid .btn.focus,.caldera-grid .btn:active.focus,.caldera-grid .btn:active:focus,.caldera-grid .btn:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.caldera-grid .btn.focus,.caldera-grid .btn:focus,.caldera-grid .btn:hover{color:#333;text-decoration:none}.caldera-grid .btn.active,.caldera-grid .btn:active{outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.caldera-grid .btn.disabled,.caldera-grid .btn[disabled],fieldset[disabled] .caldera-grid .btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.caldera-grid .btn-default{color:#333;background-color:#fff;border-color:#ccc}.caldera-grid .btn-default.active,.caldera-grid .btn-default.focus,.caldera-grid .btn-default:active,.caldera-grid .btn-default:focus,.caldera-grid .btn-default:hover,.open>.dropdown-toggle.caldera-grid .btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.caldera-grid .btn-default.disabled,.caldera-grid .btn-default.disabled.active,.caldera-grid .btn-default.disabled.focus,.caldera-grid .btn-default.disabled:active,.caldera-grid .btn-default.disabled:focus,.caldera-grid .btn-default.disabled:hover,.caldera-grid .btn-default[disabled],.caldera-grid .btn-default[disabled].active,.caldera-grid .btn-default[disabled].focus,.caldera-grid .btn-default[disabled]:active,.caldera-grid .btn-default[disabled]:focus,.caldera-grid .btn-default[disabled]:hover,fieldset[disabled] .caldera-grid .btn-default,fieldset[disabled] .caldera-grid .btn-default.active,fieldset[disabled] .caldera-grid .btn-default.focus,fieldset[disabled] .caldera-grid .btn-default:active,fieldset[disabled] .caldera-grid .btn-default:focus,fieldset[disabled] .caldera-grid .btn-default:hover{background-color:#fff;border-color:#ccc}.caldera-grid .btn-default .badge{color:#fff;background-color:#333}.caldera-grid .btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.caldera-grid .btn-primary.active,.caldera-grid .btn-primary.focus,.caldera-grid .btn-primary:active,.caldera-grid .btn-primary:focus,.caldera-grid .btn-primary:hover,.open>.dropdown-toggle.caldera-grid .btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.caldera-grid .btn-primary.disabled,.caldera-grid .btn-primary.disabled.active,.caldera-grid .btn-primary.disabled.focus,.caldera-grid .btn-primary.disabled:active,.caldera-grid .btn-primary.disabled:focus,.caldera-grid .btn-primary.disabled:hover,.caldera-grid .btn-primary[disabled],.caldera-grid .btn-primary[disabled].active,.caldera-grid .btn-primary[disabled].focus,.caldera-grid .btn-primary[disabled]:active,.caldera-grid .btn-primary[disabled]:focus,.caldera-grid .btn-primary[disabled]:hover,fieldset[disabled] .caldera-grid .btn-primary,fieldset[disabled] .caldera-grid .btn-primary.active,fieldset[disabled] .caldera-grid .btn-primary.focus,fieldset[disabled] .caldera-grid .btn-primary:active,fieldset[disabled] .caldera-grid .btn-primary:focus,fieldset[disabled] .caldera-grid .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.caldera-grid .btn-primary .badge{color:#337ab7;background-color:#fff}.caldera-grid .btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.caldera-grid .btn-success.active,.caldera-grid .btn-success.focus,.caldera-grid .btn-success:active,.caldera-grid .btn-success:focus,.caldera-grid .btn-success:hover,.open>.dropdown-toggle.caldera-grid .btn-success{color:#fff;background-color:#449d44;border-color:#398439}.caldera-grid .btn-success.disabled,.caldera-grid .btn-success.disabled.active,.caldera-grid .btn-success.disabled.focus,.caldera-grid .btn-success.disabled:active,.caldera-grid .btn-success.disabled:focus,.caldera-grid .btn-success.disabled:hover,.caldera-grid .btn-success[disabled],.caldera-grid .btn-success[disabled].active,.caldera-grid .btn-success[disabled].focus,.caldera-grid .btn-success[disabled]:active,.caldera-grid .btn-success[disabled]:focus,.caldera-grid .btn-success[disabled]:hover,fieldset[disabled] .caldera-grid .btn-success,fieldset[disabled] .caldera-grid .btn-success.active,fieldset[disabled] .caldera-grid .btn-success.focus,fieldset[disabled] .caldera-grid .btn-success:active,fieldset[disabled] .caldera-grid .btn-success:focus,fieldset[disabled] .caldera-grid .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.caldera-grid .btn-success .badge{color:#5cb85c;background-color:#fff}.caldera-grid .btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.caldera-grid .btn-info.active,.caldera-grid .btn-info.focus,.caldera-grid .btn-info:active,.caldera-grid .btn-info:focus,.caldera-grid .btn-info:hover,.open>.dropdown-toggle.caldera-grid .btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.caldera-grid .btn-info.disabled,.caldera-grid .btn-info.disabled.active,.caldera-grid .btn-info.disabled.focus,.caldera-grid .btn-info.disabled:active,.caldera-grid .btn-info.disabled:focus,.caldera-grid .btn-info.disabled:hover,.caldera-grid .btn-info[disabled],.caldera-grid .btn-info[disabled].active,.caldera-grid .btn-info[disabled].focus,.caldera-grid .btn-info[disabled]:active,.caldera-grid .btn-info[disabled]:focus,.caldera-grid .btn-info[disabled]:hover,fieldset[disabled] .caldera-grid .btn-info,fieldset[disabled] .caldera-grid .btn-info.active,fieldset[disabled] .caldera-grid .btn-info.focus,fieldset[disabled] .caldera-grid .btn-info:active,fieldset[disabled] .caldera-grid .btn-info:focus,fieldset[disabled] .caldera-grid .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.caldera-grid .btn-info .badge{color:#5bc0de;background-color:#fff}.caldera-grid .btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.caldera-grid .btn-warning.active,.caldera-grid .btn-warning.focus,.caldera-grid .btn-warning:active,.caldera-grid .btn-warning:focus,.caldera-grid .btn-warning:hover,.open>.dropdown-toggle.caldera-grid .btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.caldera-grid .btn-warning.disabled,.caldera-grid .btn-warning.disabled.active,.caldera-grid .btn-warning.disabled.focus,.caldera-grid .btn-warning.disabled:active,.caldera-grid .btn-warning.disabled:focus,.caldera-grid .btn-warning.disabled:hover,.caldera-grid .btn-warning[disabled],.caldera-grid .btn-warning[disabled].active,.caldera-grid .btn-warning[disabled].focus,.caldera-grid .btn-warning[disabled]:active,.caldera-grid .btn-warning[disabled]:focus,.caldera-grid .btn-warning[disabled]:hover,fieldset[disabled] .caldera-grid .btn-warning,fieldset[disabled] .caldera-grid .btn-warning.active,fieldset[disabled] .caldera-grid .btn-warning.focus,fieldset[disabled] .caldera-grid .btn-warning:active,fieldset[disabled] .caldera-grid .btn-warning:focus,fieldset[disabled] .caldera-grid .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.caldera-grid .btn-warning .badge{color:#f0ad4e;background-color:#fff}.caldera-grid .btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.caldera-grid .btn-danger.active,.caldera-grid .btn-danger.focus,.caldera-grid .btn-danger:active,.caldera-grid .btn-danger:focus,.caldera-grid .btn-danger:hover,.open>.dropdown-toggle.caldera-grid .btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.caldera-grid .btn-danger.disabled,.caldera-grid .btn-danger.disabled.active,.caldera-grid .btn-danger.disabled.focus,.caldera-grid .btn-danger.disabled:active,.caldera-grid .btn-danger.disabled:focus,.caldera-grid .btn-danger.disabled:hover,.caldera-grid .btn-danger[disabled],.caldera-grid .btn-danger[disabled].active,.caldera-grid .btn-danger[disabled].focus,.caldera-grid .btn-danger[disabled]:active,.caldera-grid .btn-danger[disabled]:focus,.caldera-grid .btn-danger[disabled]:hover,fieldset[disabled] .caldera-grid .btn-danger,fieldset[disabled] .caldera-grid .btn-danger.active,fieldset[disabled] .caldera-grid .btn-danger.focus,fieldset[disabled] .caldera-grid .btn-danger:active,fieldset[disabled] .caldera-grid .btn-danger:focus,fieldset[disabled] .caldera-grid .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.caldera-grid .btn-danger .badge{color:#d9534f;background-color:#fff}.caldera-grid .btn-link{color:#337ab7;font-weight:400;border-radius:0}.caldera-grid .btn-link,.caldera-grid .btn-link.active,.caldera-grid .btn-link:active,.caldera-grid .btn-link[disabled],fieldset[disabled] .caldera-grid .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.caldera-grid .btn-link,.caldera-grid .btn-link:active,.caldera-grid .btn-link:focus,.caldera-grid .btn-link:hover{border-color:transparent}.caldera-grid .btn-link:focus,.caldera-grid .btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.caldera-grid .btn-link[disabled]:focus,.caldera-grid .btn-link[disabled]:hover,fieldset[disabled] .caldera-grid .btn-link:focus,fieldset[disabled] .caldera-grid .btn-link:hover{color:#777;text-decoration:none}.caldera-grid .btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:4px}.caldera-grid .btn-sm,.caldera-grid .btn-xs{font-size:12px;line-height:1.5;border-radius:1px}.caldera-grid .btn-sm{padding:5px 10px}.caldera-grid .btn-xs{padding:1px 5px}.caldera-grid .btn-block{display:block;width:100%}.caldera-grid input[type=button].btn-block,.caldera-grid input[type=reset].btn-block,.caldera-grid input[type=submit].btn-block{width:100%}.caldera-grid textarea.form-control{padding-right:4px;height:auto}.caldera-grid .breadcrumb{padding:6px 12px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.caldera-grid .breadcrumb>li{display:inline-block;margin:0}.caldera-grid .breadcrumb>li+li:before{content:"/\00a0";padding:0 5px;color:#ccc}.caldera-grid .breadcrumb>.active,.caldera-grid .breadcrumb>.active>a{color:#777}.breadcrumb>li.active.error>a,.breadcrumb>li.error>a{color:red}.caldera-grid .cf-credit-card{padding-left:42px;background-image:url(../images/credit-card.svg);background-repeat:no-repeat!important;background-position-x:4px!important;background-position-y:3px!important}.caldera-grid .screen-reader-text{clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;position:absolute!important;width:1px;word-wrap:normal!important}p.caldera-forms-consent-field-agreement{display:inline}@font-face{font-family:cf-raty;src:url(fonts/cf-raty.eot?40481674);src:url(fonts/cf-raty.eot?40481674#iefix) format('embedded-opentype'),url(fonts/cf-raty.woff?40481674) format('woff'),url(fonts/cf-raty.ttf?40481674) format('truetype'),url(fonts/cf-raty.svg?40481674#cf-raty) format('svg');font-weight:400;font-style:normal}[class*=" raty-"]:before,[class^=raty-]:before{font-family:cf-raty;font-style:normal;font-weight:400;speak:none;font-size:2em;display:inline-block;text-decoration:inherit;width:1em;text-align:center;font-variant:normal;text-transform:none;line-height:1em}.raty-heart-on:before{content:'\e800'}.raty-heart-off:before{content:'\e801'}.raty-star-on:before{content:'\e802'}.raty-star-off:before{content:'\e803'}.raty-circle-on:before{content:'\e804'}.raty-circle-off:before{content:'\e805'}.raty-dot-off:before{content:'\e806'}.raty-dot-on:before{content:'\e807'}.raty-face-off:before{content:'\e808'}.raty-face-on:before{content:'\e809'}.raty-cancel-off:before{content:'\e80a'}.raty-cancel-on:before{content:'\e80b'}.calculation-group{background:#FFF;box-shadow:0 1px 2px rgba(0,0,0,.05);padding:6px;margin:6px 0}.cf-color-picker .input-group-btn:last-child>.btn,.cf-color-picker .input-group-btn:last-child>.btn-group,.cf-color-picker .input-group-btn>.btn+.btn,.cf-toggle-switch .btn-group .btn+.btn,.cf-toggle-switch .btn-group .btn+.btn-group,.cf-toggle-switch .btn-group .btn-group+.btn,.cf-toggle-switch .btn-group .btn-group+.btn-group,.preview-color-selector{margin-left:-1px}.preview-color-selector{background:#F0F0F0;border:1px solid #E2E2E2;display:inline;padding:3px 12px;box-shadow:0 0 0 2px #fff inset}.miniColors-trigger{border:1px solid #999;-mz-border-radius:0 1px 1px 0;-webkit-border-radius:0 1px 1px 0;display:inline-block;height:24px;margin:0 0 -8px -1px;width:30px}.miniColors-selector{background:#FFF;border:1px solid #999;-moz-box-shadow:0 3px 0 -1px rgba(0,0,0,.05);-webkit-box-shadow:0 3px 0 -1px rgba(0,0,0,.05);box-shadow:0 3px 0 -1px rgba(0,0,0,.05);height:162px;padding:5px;position:absolute;width:187px;z-index:999999;margin-top:-1px}.miniColors-colors,.miniColors-hues{top:5px;height:150px;cursor:crosshair;position:absolute}.miniColors-selector.black{background:#000;border-color:#000}.miniColors-colors{left:5px;width:150px;background:url(minicolor-colors.png) right no-repeat}.miniColors-hues{left:160px;width:20px;background:url(minicolor-colors.png) left no-repeat}.miniColors-colorPicker{position:absolute;width:9px;height:9px;border:1px solid #fff;-moz-border-radius:11px;-webkit-border-radius:11px;border-radius:11px}.miniColors-colorPicker-inner{position:absolute;top:0;left:0;width:7px;height:7px;border:1px solid #000;-moz-border-radius:9px;-webkit-border-radius:9px;border-radius:9px}.miniColors-huePicker{position:absolute;left:-3px;width:24px;height:1px;border:1px solid #fff;border-radius:2px;background:#000}.cf-color-picker .form-control::-moz-placeholder{color:#999;opacity:1}.cf-color-picker .form-control:-ms-input-placeholder{color:#999}.cf-color-picker .form-control::-webkit-input-placeholder{color:#999}.cf-color-picker .form-control[disabled],.cf-color-picker .form-control[readonly],.cf-color-picker fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}.cf-color-picker .input-group{position:relative;display:table;border-collapse:separate;max-width:120px}.cf-color-picker .input-group[class*=col-]{float:none;padding-left:0;padding-right:0}.cf-color-picker .input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.cf-color-picker .input-group-lg>.form-control,.cf-color-picker .input-group-lg>.input-group-addon,.cf-color-picker .input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.cf-color-picker .input-group-sm>.form-control,.cf-color-picker .input-group-sm>.input-group-addon,.cf-color-picker .input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.cf-color-picker .input-group .form-control,.cf-color-picker .input-group-addon,.cf-color-picker .input-group-btn{display:table-cell}.cf-color-picker .input-group .form-control:not(:first-child):not(:last-child),.cf-color-picker .input-group-addon:not(:first-child):not(:last-child),.cf-color-picker .input-group-btn:not(:first-child):not(:last-child){border-radius:0}.cf-color-picker .input-group-addon,.cf-color-picker .input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.cf-color-picker .input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.cf-color-picker .text-hide,.table-striped .cfdatepicker table tr td,.table-striped .cfdatepicker table tr th{background-color:transparent}.cf-color-picker .input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.cf-color-picker .input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.cf-color-picker .input-group .form-control:first-child,.cf-color-picker .input-group-addon:first-child,.cf-color-picker .input-group-btn:first-child>.btn,.cf-color-picker .input-group-btn:first-child>.btn-group>.btn,.cf-color-picker .input-group-btn:first-child>.dropdown-toggle,.cf-color-picker .input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.cf-color-picker .input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.cf-color-picker .input-group-addon:first-child{border-right:0}.cf-color-picker .input-group .form-control:last-child,.cf-color-picker .input-group-addon:last-child,.cf-color-picker .input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.cf-color-picker .input-group-btn:first-child>.btn:not(:first-child),.cf-color-picker .input-group-btn:last-child>.btn,.cf-color-picker .input-group-btn:last-child>.btn-group>.btn,.cf-color-picker .input-group-btn:last-child>.dropdown-toggle{border-bottom-left-radius:0;border-top-left-radius:0}.cf-color-picker .input-group-addon:last-child{border-left:0}.cf-color-picker .input-group-btn{position:relative;font-size:0;white-space:nowrap}.cf-color-picker .input-group-btn>.btn{position:relative}.cf-color-picker .input-group-btn>.btn:active,.cf-color-picker .input-group-btn>.btn:focus,.cf-color-picker .input-group-btn>.btn:hover{z-index:2}.cf-color-picker .input-group-btn:first-child>.btn,.cf-color-picker .input-group-btn:first-child>.btn-group{margin-right:-1px}.cf-color-picker .clearfix:after,.cf-color-picker .clearfix:before,.cf-color-picker .form-horizontal .form-group:after,.cf-color-picker .form-horizontal .form-group:before{content:" ";display:table}.cfdatepicker-dropdown:after,.cfdatepicker-dropdown:before{content:'';position:absolute;display:inline-block}.cf-color-picker .clearfix:after,.cf-color-picker .form-horizontal .form-group:after{clear:both}.cf-color-picker .center-block{display:block;margin-left:auto;margin-right:auto}.cf-color-picker .pull-right{float:right!important}.cf-color-picker .pull-left{float:left!important}.cf-color-picker .hide{display:none!important}.cf-color-picker .show{display:block!important}.cf-color-picker .invisible{visibility:hidden}.cf-color-picker .text-hide{font:0/0 a;color:transparent;text-shadow:none;border:0}.cf-color-picker .hidden{display:none!important;visibility:hidden!important}.cf-color-picker .affix{position:fixed}@-ms-viewport{width:device-width}.cf-color-picker .visible-lg,.cf-color-picker .visible-md,.cf-color-picker .visible-print,.cf-color-picker .visible-sm,.cf-color-picker .visible-xs{display:none!important}@media (max-width:767px){.cf-color-picker .visible-xs{display:block!important}.cf-color-picker table.visible-xs{display:table}.cf-color-picker tr.visible-xs{display:table-row!important}.cf-color-picker td.visible-xs,.cf-color-picker th.visible-xs{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.cf-color-picker .visible-sm{display:block!important}.cf-color-picker table.visible-sm{display:table}.cf-color-picker tr.visible-sm{display:table-row!important}.cf-color-picker td.visible-sm,.cf-color-picker th.visible-sm{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.cf-color-picker .visible-md{display:block!important}.cf-color-picker table.visible-md{display:table}.cf-color-picker tr.visible-md{display:table-row!important}.cf-color-picker td.visible-md,.cf-color-picker th.visible-md{display:table-cell!important}}@media (min-width:1200px){.cf-color-picker .visible-lg{display:block!important}.cf-color-picker table.visible-lg{display:table}.cf-color-picker tr.visible-lg{display:table-row!important}.cf-color-picker td.visible-lg,.cf-color-picker th.visible-lg{display:table-cell!important}.cf-color-picker .hidden-lg{display:none!important}}@media (max-width:767px){.cf-color-picker .hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.cf-color-picker .hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.cf-color-picker .hidden-md{display:none!important}}@media print{.cf-color-picker .visible-print{display:block!important}.cf-color-picker table.visible-print{display:table}.cf-color-picker tr.visible-print{display:table-row!important}.cf-color-picker td.visible-print,.cf-color-picker th.visible-print{display:table-cell!important}.cf-color-picker .hidden-print{display:none!important}}.cfdatepicker{padding:4px;border-radius:4px;direction:ltr}.cfdatepicker-inline{width:220px}.cfdatepicker.cfdatepicker-rtl{direction:rtl}.cfdatepicker.cfdatepicker-rtl table tr td span{float:right}.cfdatepicker-dropdown{top:0;left:0}.cfdatepicker-dropdown:before{border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-top:0;border-bottom-color:rgba(0,0,0,.2)}.cfdatepicker-dropdown:after{border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;border-top:0}.cfdatepicker-dropdown.cfdatepicker-orient-left:before{left:6px}.cfdatepicker-dropdown.cfdatepicker-orient-left:after{left:7px}.cfdatepicker-dropdown.cfdatepicker-orient-right:before{right:6px}.cfdatepicker-dropdown.cfdatepicker-orient-right:after{right:7px}.cfdatepicker-dropdown.cfdatepicker-orient-top:before{top:-7px}.cfdatepicker-dropdown.cfdatepicker-orient-top:after{top:-6px}.cfdatepicker-dropdown.cfdatepicker-orient-bottom:before{bottom:-7px;border-bottom:0;border-top:7px solid #999}.cfdatepicker-dropdown.cfdatepicker-orient-bottom:after{bottom:-6px;border-bottom:0;border-top:6px solid #fff}.cfdatepicker>div{display:none}.cfdatepicker.days div.cfdatepicker-days,.cfdatepicker.months div.cfdatepicker-months,.cfdatepicker.years div.cfdatepicker-years{display:block}.cfdatepicker table{border:0;width:auto;margin:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.cfdatepicker table tr td,.cfdatepicker table tr th{text-align:center;width:10px;height:10px;border-radius:4px;border:none}.cfdatepicker table tr td.day.focused,.cfdatepicker table tr td.day:hover{background:#eee;cursor:pointer}.cfdatepicker table tr td.new,.cfdatepicker table tr td.old{color:#999}.cfdatepicker table tr td.disabled,.cfdatepicker table tr td.disabled:hover{background:0 0;color:#999;cursor:default}.cfdatepicker table tr td.today,.cfdatepicker table tr td.today.disabled,.cfdatepicker table tr td.today.disabled:hover,.cfdatepicker table tr td.today:hover{color:#000;background-color:#ffdb99;border-color:#ffb733}.cfdatepicker table tr td.today.active,.cfdatepicker table tr td.today.disabled.active,.cfdatepicker table tr td.today.disabled:active,.cfdatepicker table tr td.today.disabled:focus,.cfdatepicker table tr td.today.disabled:hover,.cfdatepicker table tr td.today.disabled:hover.active,.cfdatepicker table tr td.today.disabled:hover:active,.cfdatepicker table tr td.today.disabled:hover:focus,.cfdatepicker table tr td.today.disabled:hover:hover,.cfdatepicker table tr td.today:active,.cfdatepicker table tr td.today:focus,.cfdatepicker table tr td.today:hover,.cfdatepicker table tr td.today:hover.active,.cfdatepicker table tr td.today:hover:active,.cfdatepicker table tr td.today:hover:focus,.cfdatepicker table tr td.today:hover:hover,.open .dropdown-toggle.cfdatepicker table tr td.today,.open .dropdown-toggle.cfdatepicker table tr td.today.disabled,.open .dropdown-toggle.cfdatepicker table tr td.today.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td.today:hover{color:#000;background-color:#ffcd70;border-color:#f59e00}.cfdatepicker table tr td.today.active,.cfdatepicker table tr td.today.disabled.active,.cfdatepicker table tr td.today.disabled:active,.cfdatepicker table tr td.today.disabled:hover.active,.cfdatepicker table tr td.today.disabled:hover:active,.cfdatepicker table tr td.today:active,.cfdatepicker table tr td.today:hover.active,.cfdatepicker table tr td.today:hover:active,.open .dropdown-toggle.cfdatepicker table tr td.today,.open .dropdown-toggle.cfdatepicker table tr td.today.disabled,.open .dropdown-toggle.cfdatepicker table tr td.today.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td.today:hover{background-image:none}.cfdatepicker table tr td.today.disabled,.cfdatepicker table tr td.today.disabled.active,.cfdatepicker table tr td.today.disabled.disabled,.cfdatepicker table tr td.today.disabled.disabled.active,.cfdatepicker table tr td.today.disabled.disabled:active,.cfdatepicker table tr td.today.disabled.disabled:focus,.cfdatepicker table tr td.today.disabled.disabled:hover,.cfdatepicker table tr td.today.disabled:active,.cfdatepicker table tr td.today.disabled:focus,.cfdatepicker table tr td.today.disabled:hover,.cfdatepicker table tr td.today.disabled:hover.disabled,.cfdatepicker table tr td.today.disabled:hover.disabled.active,.cfdatepicker table tr td.today.disabled:hover.disabled:active,.cfdatepicker table tr td.today.disabled:hover.disabled:focus,.cfdatepicker table tr td.today.disabled:hover.disabled:hover,.cfdatepicker table tr td.today.disabled:hover[disabled],.cfdatepicker table tr td.today.disabled:hover[disabled].active,.cfdatepicker table tr td.today.disabled:hover[disabled]:active,.cfdatepicker table tr td.today.disabled:hover[disabled]:focus,.cfdatepicker table tr td.today.disabled:hover[disabled]:hover,.cfdatepicker table tr td.today.disabled[disabled],.cfdatepicker table tr td.today.disabled[disabled].active,.cfdatepicker table tr td.today.disabled[disabled]:active,.cfdatepicker table tr td.today.disabled[disabled]:focus,.cfdatepicker table tr td.today.disabled[disabled]:hover,.cfdatepicker table tr td.today:hover.disabled,.cfdatepicker table tr td.today:hover.disabled.active,.cfdatepicker table tr td.today:hover.disabled:active,.cfdatepicker table tr td.today:hover.disabled:focus,.cfdatepicker table tr td.today:hover.disabled:hover,.cfdatepicker table tr td.today:hover[disabled],.cfdatepicker table tr td.today:hover[disabled].active,.cfdatepicker table tr td.today:hover[disabled]:active,.cfdatepicker table tr td.today:hover[disabled]:focus,.cfdatepicker table tr td.today:hover[disabled]:hover,.cfdatepicker table tr td.today[disabled],.cfdatepicker table tr td.today[disabled].active,.cfdatepicker table tr td.today[disabled]:active,.cfdatepicker table tr td.today[disabled]:focus,.cfdatepicker table tr td.today[disabled]:hover,fieldset[disabled] .cfdatepicker table tr td.today,fieldset[disabled] .cfdatepicker table tr td.today.active,fieldset[disabled] .cfdatepicker table tr td.today.disabled,fieldset[disabled] .cfdatepicker table tr td.today.disabled.active,fieldset[disabled] .cfdatepicker table tr td.today.disabled:active,fieldset[disabled] .cfdatepicker table tr td.today.disabled:focus,fieldset[disabled] .cfdatepicker table tr td.today.disabled:hover,fieldset[disabled] .cfdatepicker table tr td.today.disabled:hover.active,fieldset[disabled] .cfdatepicker table tr td.today.disabled:hover:active,fieldset[disabled] .cfdatepicker table tr td.today.disabled:hover:focus,fieldset[disabled] .cfdatepicker table tr td.today.disabled:hover:hover,fieldset[disabled] .cfdatepicker table tr td.today:active,fieldset[disabled] .cfdatepicker table tr td.today:focus,fieldset[disabled] .cfdatepicker table tr td.today:hover,fieldset[disabled] .cfdatepicker table tr td.today:hover.active,fieldset[disabled] .cfdatepicker table tr td.today:hover:active,fieldset[disabled] .cfdatepicker table tr td.today:hover:focus,fieldset[disabled] .cfdatepicker table tr td.today:hover:hover{background-color:#ffdb99;border-color:#ffb733}.cfdatepicker table tr td.today:hover:hover{color:#000}.cfdatepicker table tr td.today.active:hover{color:#fff}.cfdatepicker table tr td.range,.cfdatepicker table tr td.range.disabled,.cfdatepicker table tr td.range.disabled:hover,.cfdatepicker table tr td.range:hover{background:#eee;border-radius:0}.cfdatepicker table tr td.active.active,.cfdatepicker table tr td.active.disabled.active,.cfdatepicker table tr td.active.disabled:active,.cfdatepicker table tr td.active.disabled:hover.active,.cfdatepicker table tr td.active.disabled:hover:active,.cfdatepicker table tr td.active:active,.cfdatepicker table tr td.active:hover.active,.cfdatepicker table tr td.active:hover:active,.cfdatepicker table tr td.range.today.active,.cfdatepicker table tr td.range.today.disabled.active,.cfdatepicker table tr td.range.today.disabled:active,.cfdatepicker table tr td.range.today.disabled:hover.active,.cfdatepicker table tr td.range.today.disabled:hover:active,.cfdatepicker table tr td.range.today:active,.cfdatepicker table tr td.range.today:hover.active,.cfdatepicker table tr td.range.today:hover:active,.cfdatepicker table tr td.selected.active,.cfdatepicker table tr td.selected.disabled.active,.cfdatepicker table tr td.selected.disabled:active,.cfdatepicker table tr td.selected.disabled:hover.active,.cfdatepicker table tr td.selected.disabled:hover:active,.cfdatepicker table tr td.selected:active,.cfdatepicker table tr td.selected:hover.active,.cfdatepicker table tr td.selected:hover:active,.open .dropdown-toggle.cfdatepicker table tr td.active,.open .dropdown-toggle.cfdatepicker table tr td.active.disabled,.open .dropdown-toggle.cfdatepicker table tr td.active.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td.active:hover,.open .dropdown-toggle.cfdatepicker table tr td.range.today,.open .dropdown-toggle.cfdatepicker table tr td.range.today.disabled,.open .dropdown-toggle.cfdatepicker table tr td.range.today.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td.range.today:hover,.open .dropdown-toggle.cfdatepicker table tr td.selected,.open .dropdown-toggle.cfdatepicker table tr td.selected.disabled,.open .dropdown-toggle.cfdatepicker table tr td.selected.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td.selected:hover{background-image:none}.cfdatepicker table tr td.range.today,.cfdatepicker table tr td.range.today.disabled,.cfdatepicker table tr td.range.today.disabled:hover,.cfdatepicker table tr td.range.today:hover{color:#000;background-color:#f7ca77;border-color:#f1a417;border-radius:0}.cfdatepicker table tr td.range.today.active,.cfdatepicker table tr td.range.today.disabled.active,.cfdatepicker table tr td.range.today.disabled:active,.cfdatepicker table tr td.range.today.disabled:focus,.cfdatepicker table tr td.range.today.disabled:hover,.cfdatepicker table tr td.range.today.disabled:hover.active,.cfdatepicker table tr td.range.today.disabled:hover:active,.cfdatepicker table tr td.range.today.disabled:hover:focus,.cfdatepicker table tr td.range.today.disabled:hover:hover,.cfdatepicker table tr td.range.today:active,.cfdatepicker table tr td.range.today:focus,.cfdatepicker table tr td.range.today:hover,.cfdatepicker table tr td.range.today:hover.active,.cfdatepicker table tr td.range.today:hover:active,.cfdatepicker table tr td.range.today:hover:focus,.cfdatepicker table tr td.range.today:hover:hover,.open .dropdown-toggle.cfdatepicker table tr td.range.today,.open .dropdown-toggle.cfdatepicker table tr td.range.today.disabled,.open .dropdown-toggle.cfdatepicker table tr td.range.today.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td.range.today:hover{color:#000;background-color:#f4bb51;border-color:#bf800c}.cfdatepicker table tr td.range.today.disabled,.cfdatepicker table tr td.range.today.disabled.active,.cfdatepicker table tr td.range.today.disabled.disabled,.cfdatepicker table tr td.range.today.disabled.disabled.active,.cfdatepicker table tr td.range.today.disabled.disabled:active,.cfdatepicker table tr td.range.today.disabled.disabled:focus,.cfdatepicker table tr td.range.today.disabled.disabled:hover,.cfdatepicker table tr td.range.today.disabled:active,.cfdatepicker table tr td.range.today.disabled:focus,.cfdatepicker table tr td.range.today.disabled:hover,.cfdatepicker table tr td.range.today.disabled:hover.disabled,.cfdatepicker table tr td.range.today.disabled:hover.disabled.active,.cfdatepicker table tr td.range.today.disabled:hover.disabled:active,.cfdatepicker table tr td.range.today.disabled:hover.disabled:focus,.cfdatepicker table tr td.range.today.disabled:hover.disabled:hover,.cfdatepicker table tr td.range.today.disabled:hover[disabled],.cfdatepicker table tr td.range.today.disabled:hover[disabled].active,.cfdatepicker table tr td.range.today.disabled:hover[disabled]:active,.cfdatepicker table tr td.range.today.disabled:hover[disabled]:focus,.cfdatepicker table tr td.range.today.disabled:hover[disabled]:hover,.cfdatepicker table tr td.range.today.disabled[disabled],.cfdatepicker table tr td.range.today.disabled[disabled].active,.cfdatepicker table tr td.range.today.disabled[disabled]:active,.cfdatepicker table tr td.range.today.disabled[disabled]:focus,.cfdatepicker table tr td.range.today.disabled[disabled]:hover,.cfdatepicker table tr td.range.today:hover.disabled,.cfdatepicker table tr td.range.today:hover.disabled.active,.cfdatepicker table tr td.range.today:hover.disabled:active,.cfdatepicker table tr td.range.today:hover.disabled:focus,.cfdatepicker table tr td.range.today:hover.disabled:hover,.cfdatepicker table tr td.range.today:hover[disabled],.cfdatepicker table tr td.range.today:hover[disabled].active,.cfdatepicker table tr td.range.today:hover[disabled]:active,.cfdatepicker table tr td.range.today:hover[disabled]:focus,.cfdatepicker table tr td.range.today:hover[disabled]:hover,.cfdatepicker table tr td.range.today[disabled],.cfdatepicker table tr td.range.today[disabled].active,.cfdatepicker table tr td.range.today[disabled]:active,.cfdatepicker table tr td.range.today[disabled]:focus,.cfdatepicker table tr td.range.today[disabled]:hover,fieldset[disabled] .cfdatepicker table tr td.range.today,fieldset[disabled] .cfdatepicker table tr td.range.today.active,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled.active,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled:active,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled:focus,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled:hover,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled:hover.active,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled:hover:active,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled:hover:focus,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled:hover:hover,fieldset[disabled] .cfdatepicker table tr td.range.today:active,fieldset[disabled] .cfdatepicker table tr td.range.today:focus,fieldset[disabled] .cfdatepicker table tr td.range.today:hover,fieldset[disabled] .cfdatepicker table tr td.range.today:hover.active,fieldset[disabled] .cfdatepicker table tr td.range.today:hover:active,fieldset[disabled] .cfdatepicker table tr td.range.today:hover:focus,fieldset[disabled] .cfdatepicker table tr td.range.today:hover:hover{background-color:#f7ca77;border-color:#f1a417}.cfdatepicker table tr td.selected,.cfdatepicker table tr td.selected.disabled,.cfdatepicker table tr td.selected.disabled:hover,.cfdatepicker table tr td.selected:hover{color:#fff;background-color:#999;border-color:#555;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.cfdatepicker table tr td.selected.active,.cfdatepicker table tr td.selected.disabled.active,.cfdatepicker table tr td.selected.disabled:active,.cfdatepicker table tr td.selected.disabled:focus,.cfdatepicker table tr td.selected.disabled:hover,.cfdatepicker table tr td.selected.disabled:hover.active,.cfdatepicker table tr td.selected.disabled:hover:active,.cfdatepicker table tr td.selected.disabled:hover:focus,.cfdatepicker table tr td.selected.disabled:hover:hover,.cfdatepicker table tr td.selected:active,.cfdatepicker table tr td.selected:focus,.cfdatepicker table tr td.selected:hover,.cfdatepicker table tr td.selected:hover.active,.cfdatepicker table tr td.selected:hover:active,.cfdatepicker table tr td.selected:hover:focus,.cfdatepicker table tr td.selected:hover:hover,.open .dropdown-toggle.cfdatepicker table tr td.selected,.open .dropdown-toggle.cfdatepicker table tr td.selected.disabled,.open .dropdown-toggle.cfdatepicker table tr td.selected.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td.selected:hover{color:#fff;background-color:#858585;border-color:#373737}.cfdatepicker table tr td.selected.disabled,.cfdatepicker table tr td.selected.disabled.active,.cfdatepicker table tr td.selected.disabled.disabled,.cfdatepicker table tr td.selected.disabled.disabled.active,.cfdatepicker table tr td.selected.disabled.disabled:active,.cfdatepicker table tr td.selected.disabled.disabled:focus,.cfdatepicker table tr td.selected.disabled.disabled:hover,.cfdatepicker table tr td.selected.disabled:active,.cfdatepicker table tr td.selected.disabled:focus,.cfdatepicker table tr td.selected.disabled:hover,.cfdatepicker table tr td.selected.disabled:hover.disabled,.cfdatepicker table tr td.selected.disabled:hover.disabled.active,.cfdatepicker table tr td.selected.disabled:hover.disabled:active,.cfdatepicker table tr td.selected.disabled:hover.disabled:focus,.cfdatepicker table tr td.selected.disabled:hover.disabled:hover,.cfdatepicker table tr td.selected.disabled:hover[disabled],.cfdatepicker table tr td.selected.disabled:hover[disabled].active,.cfdatepicker table tr td.selected.disabled:hover[disabled]:active,.cfdatepicker table tr td.selected.disabled:hover[disabled]:focus,.cfdatepicker table tr td.selected.disabled:hover[disabled]:hover,.cfdatepicker table tr td.selected.disabled[disabled],.cfdatepicker table tr td.selected.disabled[disabled].active,.cfdatepicker table tr td.selected.disabled[disabled]:active,.cfdatepicker table tr td.selected.disabled[disabled]:focus,.cfdatepicker table tr td.selected.disabled[disabled]:hover,.cfdatepicker table tr td.selected:hover.disabled,.cfdatepicker table tr td.selected:hover.disabled.active,.cfdatepicker table tr td.selected:hover.disabled:active,.cfdatepicker table tr td.selected:hover.disabled:focus,.cfdatepicker table tr td.selected:hover.disabled:hover,.cfdatepicker table tr td.selected:hover[disabled],.cfdatepicker table tr td.selected:hover[disabled].active,.cfdatepicker table tr td.selected:hover[disabled]:active,.cfdatepicker table tr td.selected:hover[disabled]:focus,.cfdatepicker table tr td.selected:hover[disabled]:hover,.cfdatepicker table tr td.selected[disabled],.cfdatepicker table tr td.selected[disabled].active,.cfdatepicker table tr td.selected[disabled]:active,.cfdatepicker table tr td.selected[disabled]:focus,.cfdatepicker table tr td.selected[disabled]:hover,fieldset[disabled] .cfdatepicker table tr td.selected,fieldset[disabled] .cfdatepicker table tr td.selected.active,fieldset[disabled] .cfdatepicker table tr td.selected.disabled,fieldset[disabled] .cfdatepicker table tr td.selected.disabled.active,fieldset[disabled] .cfdatepicker table tr td.selected.disabled:active,fieldset[disabled] .cfdatepicker table tr td.selected.disabled:focus,fieldset[disabled] .cfdatepicker table tr td.selected.disabled:hover,fieldset[disabled] .cfdatepicker table tr td.selected.disabled:hover.active,fieldset[disabled] .cfdatepicker table tr td.selected.disabled:hover:active,fieldset[disabled] .cfdatepicker table tr td.selected.disabled:hover:focus,fieldset[disabled] .cfdatepicker table tr td.selected.disabled:hover:hover,fieldset[disabled] .cfdatepicker table tr td.selected:active,fieldset[disabled] .cfdatepicker table tr td.selected:focus,fieldset[disabled] .cfdatepicker table tr td.selected:hover,fieldset[disabled] .cfdatepicker table tr td.selected:hover.active,fieldset[disabled] .cfdatepicker table tr td.selected:hover:active,fieldset[disabled] .cfdatepicker table tr td.selected:hover:focus,fieldset[disabled] .cfdatepicker table tr td.selected:hover:hover{background-color:#999;border-color:#555}.cfdatepicker table tr td.active,.cfdatepicker table tr td.active.disabled,.cfdatepicker table tr td.active.disabled:hover,.cfdatepicker table tr td.active:hover{color:#fff;background-color:#428bca;border-color:#357ebd;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.cfdatepicker table tr td.active.active,.cfdatepicker table tr td.active.disabled.active,.cfdatepicker table tr td.active.disabled:active,.cfdatepicker table tr td.active.disabled:focus,.cfdatepicker table tr td.active.disabled:hover,.cfdatepicker table tr td.active.disabled:hover.active,.cfdatepicker table tr td.active.disabled:hover:active,.cfdatepicker table tr td.active.disabled:hover:focus,.cfdatepicker table tr td.active.disabled:hover:hover,.cfdatepicker table tr td.active:active,.cfdatepicker table tr td.active:focus,.cfdatepicker table tr td.active:hover,.cfdatepicker table tr td.active:hover.active,.cfdatepicker table tr td.active:hover:active,.cfdatepicker table tr td.active:hover:focus,.cfdatepicker table tr td.active:hover:hover,.open .dropdown-toggle.cfdatepicker table tr td.active,.open .dropdown-toggle.cfdatepicker table tr td.active.disabled,.open .dropdown-toggle.cfdatepicker table tr td.active.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td.active:hover{color:#fff;background-color:#3276b1;border-color:#285e8e}.cfdatepicker table tr td.active.disabled,.cfdatepicker table tr td.active.disabled.active,.cfdatepicker table tr td.active.disabled.disabled,.cfdatepicker table tr td.active.disabled.disabled.active,.cfdatepicker table tr td.active.disabled.disabled:active,.cfdatepicker table tr td.active.disabled.disabled:focus,.cfdatepicker table tr td.active.disabled.disabled:hover,.cfdatepicker table tr td.active.disabled:active,.cfdatepicker table tr td.active.disabled:focus,.cfdatepicker table tr td.active.disabled:hover,.cfdatepicker table tr td.active.disabled:hover.disabled,.cfdatepicker table tr td.active.disabled:hover.disabled.active,.cfdatepicker table tr td.active.disabled:hover.disabled:active,.cfdatepicker table tr td.active.disabled:hover.disabled:focus,.cfdatepicker table tr td.active.disabled:hover.disabled:hover,.cfdatepicker table tr td.active.disabled:hover[disabled],.cfdatepicker table tr td.active.disabled:hover[disabled].active,.cfdatepicker table tr td.active.disabled:hover[disabled]:active,.cfdatepicker table tr td.active.disabled:hover[disabled]:focus,.cfdatepicker table tr td.active.disabled:hover[disabled]:hover,.cfdatepicker table tr td.active.disabled[disabled],.cfdatepicker table tr td.active.disabled[disabled].active,.cfdatepicker table tr td.active.disabled[disabled]:active,.cfdatepicker table tr td.active.disabled[disabled]:focus,.cfdatepicker table tr td.active.disabled[disabled]:hover,.cfdatepicker table tr td.active:hover.disabled,.cfdatepicker table tr td.active:hover.disabled.active,.cfdatepicker table tr td.active:hover.disabled:active,.cfdatepicker table tr td.active:hover.disabled:focus,.cfdatepicker table tr td.active:hover.disabled:hover,.cfdatepicker table tr td.active:hover[disabled],.cfdatepicker table tr td.active:hover[disabled].active,.cfdatepicker table tr td.active:hover[disabled]:active,.cfdatepicker table tr td.active:hover[disabled]:focus,.cfdatepicker table tr td.active:hover[disabled]:hover,.cfdatepicker table tr td.active[disabled],.cfdatepicker table tr td.active[disabled].active,.cfdatepicker table tr td.active[disabled]:active,.cfdatepicker table tr td.active[disabled]:focus,.cfdatepicker table tr td.active[disabled]:hover,fieldset[disabled] .cfdatepicker table tr td.active,fieldset[disabled] .cfdatepicker table tr td.active.active,fieldset[disabled] .cfdatepicker table tr td.active.disabled,fieldset[disabled] .cfdatepicker table tr td.active.disabled.active,fieldset[disabled] .cfdatepicker table tr td.active.disabled:active,fieldset[disabled] .cfdatepicker table tr td.active.disabled:focus,fieldset[disabled] .cfdatepicker table tr td.active.disabled:hover,fieldset[disabled] .cfdatepicker table tr td.active.disabled:hover.active,fieldset[disabled] .cfdatepicker table tr td.active.disabled:hover:active,fieldset[disabled] .cfdatepicker table tr td.active.disabled:hover:focus,fieldset[disabled] .cfdatepicker table tr td.active.disabled:hover:hover,fieldset[disabled] .cfdatepicker table tr td.active:active,fieldset[disabled] .cfdatepicker table tr td.active:focus,fieldset[disabled] .cfdatepicker table tr td.active:hover,fieldset[disabled] .cfdatepicker table tr td.active:hover.active,fieldset[disabled] .cfdatepicker table tr td.active:hover:active,fieldset[disabled] .cfdatepicker table tr td.active:hover:focus,fieldset[disabled] .cfdatepicker table tr td.active:hover:hover{background-color:#428bca;border-color:#357ebd}.cfdatepicker table tr td span{display:block;width:23%;height:54px;line-height:54px;float:left;margin:1%;cursor:pointer;border-radius:4px}.cfdatepicker table tr td span:hover{background:#eee}.cfdatepicker table tr td span.disabled,.cfdatepicker table tr td span.disabled:hover{background:0 0;color:#999;cursor:default}.cfdatepicker table tr td span.active,.cfdatepicker table tr td span.active.disabled,.cfdatepicker table tr td span.active.disabled:hover,.cfdatepicker table tr td span.active:hover{color:#fff;background-color:#428bca;border-color:#357ebd;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.cfdatepicker table tr td span.active.active,.cfdatepicker table tr td span.active.disabled.active,.cfdatepicker table tr td span.active.disabled:active,.cfdatepicker table tr td span.active.disabled:focus,.cfdatepicker table tr td span.active.disabled:hover,.cfdatepicker table tr td span.active.disabled:hover.active,.cfdatepicker table tr td span.active.disabled:hover:active,.cfdatepicker table tr td span.active.disabled:hover:focus,.cfdatepicker table tr td span.active.disabled:hover:hover,.cfdatepicker table tr td span.active:active,.cfdatepicker table tr td span.active:focus,.cfdatepicker table tr td span.active:hover,.cfdatepicker table tr td span.active:hover.active,.cfdatepicker table tr td span.active:hover:active,.cfdatepicker table tr td span.active:hover:focus,.cfdatepicker table tr td span.active:hover:hover,.open .dropdown-toggle.cfdatepicker table tr td span.active,.open .dropdown-toggle.cfdatepicker table tr td span.active.disabled,.open .dropdown-toggle.cfdatepicker table tr td span.active.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td span.active:hover{color:#fff;background-color:#3276b1;border-color:#285e8e}.cfdatepicker table tr td span.active.active,.cfdatepicker table tr td span.active.disabled.active,.cfdatepicker table tr td span.active.disabled:active,.cfdatepicker table tr td span.active.disabled:hover.active,.cfdatepicker table tr td span.active.disabled:hover:active,.cfdatepicker table tr td span.active:active,.cfdatepicker table tr td span.active:hover.active,.cfdatepicker table tr td span.active:hover:active,.open .dropdown-toggle.cfdatepicker table tr td span.active,.open .dropdown-toggle.cfdatepicker table tr td span.active.disabled,.open .dropdown-toggle.cfdatepicker table tr td span.active.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td span.active:hover{background-image:none}.cfdatepicker table tr td span.active.disabled,.cfdatepicker table tr td span.active.disabled.active,.cfdatepicker table tr td span.active.disabled.disabled,.cfdatepicker table tr td span.active.disabled.disabled.active,.cfdatepicker table tr td span.active.disabled.disabled:active,.cfdatepicker table tr td span.active.disabled.disabled:focus,.cfdatepicker table tr td span.active.disabled.disabled:hover,.cfdatepicker table tr td span.active.disabled:active,.cfdatepicker table tr td span.active.disabled:focus,.cfdatepicker table tr td span.active.disabled:hover,.cfdatepicker table tr td span.active.disabled:hover.disabled,.cfdatepicker table tr td span.active.disabled:hover.disabled.active,.cfdatepicker table tr td span.active.disabled:hover.disabled:active,.cfdatepicker table tr td span.active.disabled:hover.disabled:focus,.cfdatepicker table tr td span.active.disabled:hover.disabled:hover,.cfdatepicker table tr td span.active.disabled:hover[disabled],.cfdatepicker table tr td span.active.disabled:hover[disabled].active,.cfdatepicker table tr td span.active.disabled:hover[disabled]:active,.cfdatepicker table tr td span.active.disabled:hover[disabled]:focus,.cfdatepicker table tr td span.active.disabled:hover[disabled]:hover,.cfdatepicker table tr td span.active.disabled[disabled],.cfdatepicker table tr td span.active.disabled[disabled].active,.cfdatepicker table tr td span.active.disabled[disabled]:active,.cfdatepicker table tr td span.active.disabled[disabled]:focus,.cfdatepicker table tr td span.active.disabled[disabled]:hover,.cfdatepicker table tr td span.active:hover.disabled,.cfdatepicker table tr td span.active:hover.disabled.active,.cfdatepicker table tr td span.active:hover.disabled:active,.cfdatepicker table tr td span.active:hover.disabled:focus,.cfdatepicker table tr td span.active:hover.disabled:hover,.cfdatepicker table tr td span.active:hover[disabled],.cfdatepicker table tr td span.active:hover[disabled].active,.cfdatepicker table tr td span.active:hover[disabled]:active,.cfdatepicker table tr td span.active:hover[disabled]:focus,.cfdatepicker table tr td span.active:hover[disabled]:hover,.cfdatepicker table tr td span.active[disabled],.cfdatepicker table tr td span.active[disabled].active,.cfdatepicker table tr td span.active[disabled]:active,.cfdatepicker table tr td span.active[disabled]:focus,.cfdatepicker table tr td span.active[disabled]:hover,fieldset[disabled] .cfdatepicker table tr td span.active,fieldset[disabled] .cfdatepicker table tr td span.active.active,fieldset[disabled] .cfdatepicker table tr td span.active.disabled,fieldset[disabled] .cfdatepicker table tr td span.active.disabled.active,fieldset[disabled] .cfdatepicker table tr td span.active.disabled:active,fieldset[disabled] .cfdatepicker table tr td span.active.disabled:focus,fieldset[disabled] .cfdatepicker table tr td span.active.disabled:hover,fieldset[disabled] .cfdatepicker table tr td span.active.disabled:hover.active,fieldset[disabled] .cfdatepicker table tr td span.active.disabled:hover:active,fieldset[disabled] .cfdatepicker table tr td span.active.disabled:hover:focus,fieldset[disabled] .cfdatepicker table tr td span.active.disabled:hover:hover,fieldset[disabled] .cfdatepicker table tr td span.active:active,fieldset[disabled] .cfdatepicker table tr td span.active:focus,fieldset[disabled] .cfdatepicker table tr td span.active:hover,fieldset[disabled] .cfdatepicker table tr td span.active:hover.active,fieldset[disabled] .cfdatepicker table tr td span.active:hover:active,fieldset[disabled] .cfdatepicker table tr td span.active:hover:focus,fieldset[disabled] .cfdatepicker table tr td span.active:hover:hover{background-color:#428bca;border-color:#357ebd}.cfdatepicker table tr td span.new,.cfdatepicker table tr td span.old{color:#999}.cfdatepicker th.cfdatepicker-switch{width:145px}.cfdatepicker tfoot tr th,.cfdatepicker thead tr:first-child th{cursor:pointer}.cfdatepicker tfoot tr th:hover,.cfdatepicker thead tr:first-child th:hover{background:#eee}.cfdatepicker .cw{font-size:10px;width:12px;padding:0 2px 0 5px;vertical-align:middle}.cfdatepicker thead tr:first-child th.cw{cursor:default;background-color:transparent}.input-group.date .input-group-addon i{cursor:pointer;width:16px;height:16px}.input-daterange input{text-align:center}.input-daterange input:first-child{border-radius:3px 0 0 3px}.input-daterange input:last-child{border-radius:0 3px 3px 0}.input-daterange .input-group-addon{width:auto;min-width:16px;padding:4px 5px;font-weight:400;line-height:1.42857143;text-align:center;text-shadow:0 1px 0 #fff;vertical-align:middle;background-color:#eee;border:solid #ccc;border-width:1px 0;margin-left:-5px;margin-right:-5px}.cfdatepicker.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;float:left;display:none;min-width:160px;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:5px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;color:#333;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:1.42857143}.cfdatepicker.dropdown-menu td,.cfdatepicker.dropdown-menu th{padding:4px 5px}.image-thumb{margin-left:63px;padding:6px 0 6px 6px}.image-picker-content.image-thumb-lrg{margin-bottom:6px}.image-picker-side-bar{float:left;margin-left:-68px;width:62px;max-width:100%}.image-thumb-lrg .image-picker-side-bar{background:#F6F6F6;border:1px solid #DFDFDF;float:none;margin:0 0 6px;padding:6px 6px 2px;text-align:center;width:auto}.image-picker-side-bar>img{border:1px solid #DFDFDF;width:62px}.image-thumb-lrg .image-picker-side-bar>img{-moz-box-sizing:border-box;box-sizing:border-box;max-width:100%;text-align:center;width:auto}.image-thumb .image-picker-main-content{margin-right:6px}.button.image-picker-button{margin:7px 0 0;width:110px;display:inline-block}.button.button-primary.image-picker-button{float:right;margin-left:6px;width:80px}.image-picker-main-content select{width:100%}.image-picker-sizer:disabled{opacity:.7;box-shadow:none;color:#A1A1A1}.button-primary.image-picker-button.image-picker-button-solo,.button.image-picker-button.image-picker-button-solo{width:170px;margin-top:0}.button-primary.image-picker-button.image-picker-button-solo{margin-top:7px;margin-left:0;float:none}.image-thumb-lrg .button.image-picker-button.cu-image-picker.image-picker-button-solo{width:120px}.image-thumb-lrg .button.button-primary.image-picker-button.cu-image-remover.image-picker-button-solo{float:right;margin:0 0 0 6px;width:auto}.image-thumb-lrg .button.button-primary.image-picker-button.cu-image-remover{width:45%}input.cu-image-picker-file-select[type=file]{display:none}.rangeslider,.rangeslider__fill{background:#e6e6e6;display:block;height:8px;width:100%;-webkit-border-radius:10px;-moz-border-radius:10px;-ms-border-radius:10px;-o-border-radius:10px;border-radius:10px}.rangeslider__handle,.toggle_option_row input{display:inline-block}.rangeslider{position:relative}.rangeslider--disabled{filter:alpha(Opacity=40);opacity:.4}.rangeslider__fill{background:#0f0;position:absolute;top:0}.rangeslider__handle{background:#fff;border:1px solid #ccc;cursor:pointer;width:18px;height:18px;position:absolute;top:-5px;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;-o-border-radius:50%;border-radius:50%}input[type=range]:focus+.rangeslider .rangeslider__handle{-webkit-box-shadow:0 0 3px rgba(100,100,100,.9);-moz-box-shadow:0 0 3px rgba(100,100,100,.9);box-shadow:0 0 3px rgba(100,100,100,.9)}.recaptchatable #recaptcha_response_field{height:21px!important}.toggle_option_row{margin:4px 0}.toggle_option_row .dashicons-sort{cursor:move}.toggle_option_row .toggle_label_field,.toggle_option_row .toggle_value_field{width:136px;line-height:20px}.toggle_option_preview .button{border-radius:0;margin-right:-5px}.toggle_option_preview .button:first-child{border-radius:3px 0 0 3px}.toggle_option_preview .button:last-child{border-radius:0 3px 3px 0}.toggle_option_preview.toggle_vertical .button{width:100%}.toggle_option_preview.toggle_vertical .button:first-child{border-radius:3px 3px 0 0}.toggle_option_preview.toggle_vertical .button:last-child{border-radius:0 0 3px 3px}.cf-toggle-switch html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}.cf-toggle-switch body{margin:0}.cf-toggle-switch article,.cf-toggle-switch aside,.cf-toggle-switch details,.cf-toggle-switch figcaption,.cf-toggle-switch figure,.cf-toggle-switch footer,.cf-toggle-switch header,.cf-toggle-switch hgroup,.cf-toggle-switch main,.cf-toggle-switch nav,.cf-toggle-switch section,.cf-toggle-switch summary{display:block}.cf-toggle-switch audio,.cf-toggle-switch canvas,.cf-toggle-switch progress,.cf-toggle-switch video{display:inline-block;vertical-align:baseline}.cf-toggle-switch audio:not([controls]){display:none;height:0}.cf-toggle-switch [hidden],.cf-toggle-switch template{display:none}.cf-toggle-switch a{background:0 0}.cf-toggle-switch a:active,.cf-toggle-switch a:hover{outline:0}.cf-toggle-switch abbr[title]{border-bottom:1px dotted}.cf-toggle-switch b,.cf-toggle-switch strong{font-weight:700}.cf-toggle-switch dfn{font-style:italic}.cf-toggle-switch h1{font-size:2em;margin:.67em 0}.cf-toggle-switch mark{background:#ff0;color:#000}.cf-toggle-switch .btn,.cf-toggle-switch .btn-danger.active,.cf-toggle-switch .btn-danger:active,.cf-toggle-switch .btn-default.active,.cf-toggle-switch .btn-default:active,.cf-toggle-switch .btn-info.active,.cf-toggle-switch .btn-info:active,.cf-toggle-switch .btn-primary.active,.cf-toggle-switch .btn-primary:active,.cf-toggle-switch .btn-success.active,.cf-toggle-switch .btn-success:active,.cf-toggle-switch .btn-warning.active,.cf-toggle-switch .btn-warning:active,.cf-toggle-switch .btn.active,.cf-toggle-switch .btn:active,.cf-toggle-switch .open .dropdown-toggle.btn-danger,.cf-toggle-switch .open .dropdown-toggle.btn-default,.cf-toggle-switch .open .dropdown-toggle.btn-info,.cf-toggle-switch .open .dropdown-toggle.btn-primary,.cf-toggle-switch .open .dropdown-toggle.btn-success,.cf-toggle-switch .open .dropdown-toggle.btn-warning{background-image:none}.cf-toggle-switch small{font-size:80%}.cf-toggle-switch sub,.cf-toggle-switch sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.cf-toggle-switch sup{top:-.5em}.cf-toggle-switch sub{bottom:-.25em}.cf-toggle-switch img{border:0}.cf-toggle-switch svg:not(:root){overflow:hidden}.cf-toggle-switch figure{margin:1em 40px}.cf-toggle-switch hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}.cf-toggle-switch pre{overflow:auto}.cf-toggle-switch code,.cf-toggle-switch kbd,.cf-toggle-switch pre,.cf-toggle-switch samp{font-family:monospace,monospace;font-size:1em}.cf-toggle-switch button,.cf-toggle-switch input,.cf-toggle-switch optgroup,.cf-toggle-switch select,.cf-toggle-switch textarea{color:inherit;font:inherit;margin:0}.cf-toggle-switch button{overflow:visible}.cf-toggle-switch button,.cf-toggle-switch select{text-transform:none}.cf-toggle-switch button,.cf-toggle-switch html input[type=button],.cf-toggle-switch input[type=reset],.cf-toggle-switch input[type=submit]{-webkit-appearance:button;cursor:pointer}.cf-toggle-switch button[disabled],.cf-toggle-switch html input[disabled]{cursor:default}.cf-toggle-switch button::-moz-focus-inner,.cf-toggle-switch input::-moz-focus-inner{border:0;padding:0}.cf-toggle-switch input{line-height:normal}.cf-toggle-switch input[type=checkbox],.cf-toggle-switch input[type=radio]{box-sizing:border-box;padding:0}.cf-toggle-switch input[type=number]::-webkit-inner-spin-button,.cf-toggle-switch input[type=number]::-webkit-outer-spin-button{height:auto}.cf-toggle-switch input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}.cf-toggle-switch input[type=search]::-webkit-search-cancel-button,.cf-toggle-switch input[type=search]::-webkit-search-decoration{-webkit-appearance:none}.cf-toggle-switch fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}.cf-toggle-switch legend{border:0;padding:0}.cf-toggle-switch textarea{overflow:auto}.cf-toggle-switch optgroup{font-weight:700}.cf-toggle-switch table{border-collapse:collapse;border-spacing:0}.cf-toggle-switch td,.cf-toggle-switch th{padding:0}.cf-toggle-switch .btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;cursor:pointer;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.cf-toggle-switch .btn.active:focus,.cf-toggle-switch .btn:active:focus,.cf-toggle-switch .btn:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.cf-toggle-switch .btn:focus,.cf-toggle-switch .btn:hover{color:#333;text-decoration:none}.cf-toggle-switch .btn.active,.cf-toggle-switch .btn:active{outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.cf-toggle-switch .btn.disabled,.cf-toggle-switch .btn[disabled],.cf-toggle-switch fieldset[disabled] .btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.cf-toggle-switch .btn-default{color:#333;background-color:#fff;border-color:#ccc}.cf-toggle-switch .btn-default.active,.cf-toggle-switch .btn-default:active,.cf-toggle-switch .btn-default:focus,.cf-toggle-switch .btn-default:hover,.cf-toggle-switch .open .dropdown-toggle.btn-default{color:#333;background-color:#ebebeb;border-color:#adadad}.cf-toggle-switch .btn-default.disabled,.cf-toggle-switch .btn-default.disabled.active,.cf-toggle-switch .btn-default.disabled:active,.cf-toggle-switch .btn-default.disabled:focus,.cf-toggle-switch .btn-default.disabled:hover,.cf-toggle-switch .btn-default[disabled],.cf-toggle-switch .btn-default[disabled].active,.cf-toggle-switch .btn-default[disabled]:active,.cf-toggle-switch .btn-default[disabled]:focus,.cf-toggle-switch .btn-default[disabled]:hover,.cf-toggle-switch fieldset[disabled] .btn-default,.cf-toggle-switch fieldset[disabled] .btn-default.active,.cf-toggle-switch fieldset[disabled] .btn-default:active,.cf-toggle-switch fieldset[disabled] .btn-default:focus,.cf-toggle-switch fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.cf-toggle-switch .btn-default .badge{color:#fff;background-color:#333}.cf-toggle-switch .btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.cf-toggle-switch .btn-primary.active,.cf-toggle-switch .btn-primary:active,.cf-toggle-switch .btn-primary:focus,.cf-toggle-switch .btn-primary:hover,.cf-toggle-switch .open .dropdown-toggle.btn-primary{color:#fff;background-color:#3276b1;border-color:#285e8e}.cf-toggle-switch .btn-primary.disabled,.cf-toggle-switch .btn-primary.disabled.active,.cf-toggle-switch .btn-primary.disabled:active,.cf-toggle-switch .btn-primary.disabled:focus,.cf-toggle-switch .btn-primary.disabled:hover,.cf-toggle-switch .btn-primary[disabled],.cf-toggle-switch .btn-primary[disabled].active,.cf-toggle-switch .btn-primary[disabled]:active,.cf-toggle-switch .btn-primary[disabled]:focus,.cf-toggle-switch .btn-primary[disabled]:hover,.cf-toggle-switch fieldset[disabled] .btn-primary,.cf-toggle-switch fieldset[disabled] .btn-primary.active,.cf-toggle-switch fieldset[disabled] .btn-primary:active,.cf-toggle-switch fieldset[disabled] .btn-primary:focus,.cf-toggle-switch fieldset[disabled] .btn-primary:hover{background-color:#428bca;border-color:#357ebd}.cf-toggle-switch .btn-primary .badge{color:#428bca;background-color:#fff}.cf-toggle-switch .btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.cf-toggle-switch .btn-success.active,.cf-toggle-switch .btn-success:active,.cf-toggle-switch .btn-success:focus,.cf-toggle-switch .btn-success:hover,.cf-toggle-switch .open .dropdown-toggle.btn-success{color:#fff;background-color:#47a447;border-color:#398439}.cf-toggle-switch .btn-success.disabled,.cf-toggle-switch .btn-success.disabled.active,.cf-toggle-switch .btn-success.disabled:active,.cf-toggle-switch .btn-success.disabled:focus,.cf-toggle-switch .btn-success.disabled:hover,.cf-toggle-switch .btn-success[disabled],.cf-toggle-switch .btn-success[disabled].active,.cf-toggle-switch .btn-success[disabled]:active,.cf-toggle-switch .btn-success[disabled]:focus,.cf-toggle-switch .btn-success[disabled]:hover,.cf-toggle-switch fieldset[disabled] .btn-success,.cf-toggle-switch fieldset[disabled] .btn-success.active,.cf-toggle-switch fieldset[disabled] .btn-success:active,.cf-toggle-switch fieldset[disabled] .btn-success:focus,.cf-toggle-switch fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.cf-toggle-switch .btn-success .badge{color:#5cb85c;background-color:#fff}.cf-toggle-switch .btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.cf-toggle-switch .btn-info.active,.cf-toggle-switch .btn-info:active,.cf-toggle-switch .btn-info:focus,.cf-toggle-switch .btn-info:hover,.cf-toggle-switch .open .dropdown-toggle.btn-info{color:#fff;background-color:#39b3d7;border-color:#269abc}.cf-toggle-switch .btn-info.disabled,.cf-toggle-switch .btn-info.disabled.active,.cf-toggle-switch .btn-info.disabled:active,.cf-toggle-switch .btn-info.disabled:focus,.cf-toggle-switch .btn-info.disabled:hover,.cf-toggle-switch .btn-info[disabled],.cf-toggle-switch .btn-info[disabled].active,.cf-toggle-switch .btn-info[disabled]:active,.cf-toggle-switch .btn-info[disabled]:focus,.cf-toggle-switch .btn-info[disabled]:hover,.cf-toggle-switch fieldset[disabled] .btn-info,.cf-toggle-switch fieldset[disabled] .btn-info.active,.cf-toggle-switch fieldset[disabled] .btn-info:active,.cf-toggle-switch fieldset[disabled] .btn-info:focus,.cf-toggle-switch fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.cf-toggle-switch .btn-info .badge{color:#5bc0de;background-color:#fff}.cf-toggle-switch .btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.cf-toggle-switch .btn-warning.active,.cf-toggle-switch .btn-warning:active,.cf-toggle-switch .btn-warning:focus,.cf-toggle-switch .btn-warning:hover,.cf-toggle-switch .open .dropdown-toggle.btn-warning{color:#fff;background-color:#ed9c28;border-color:#d58512}.cf-toggle-switch .btn-warning.disabled,.cf-toggle-switch .btn-warning.disabled.active,.cf-toggle-switch .btn-warning.disabled:active,.cf-toggle-switch .btn-warning.disabled:focus,.cf-toggle-switch .btn-warning.disabled:hover,.cf-toggle-switch .btn-warning[disabled],.cf-toggle-switch .btn-warning[disabled].active,.cf-toggle-switch .btn-warning[disabled]:active,.cf-toggle-switch .btn-warning[disabled]:focus,.cf-toggle-switch .btn-warning[disabled]:hover,.cf-toggle-switch fieldset[disabled] .btn-warning,.cf-toggle-switch fieldset[disabled] .btn-warning.active,.cf-toggle-switch fieldset[disabled] .btn-warning:active,.cf-toggle-switch fieldset[disabled] .btn-warning:focus,.cf-toggle-switch fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.cf-toggle-switch .btn-warning .badge{color:#f0ad4e;background-color:#fff}.cf-toggle-switch .btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.cf-toggle-switch .btn-danger.active,.cf-toggle-switch .btn-danger:active,.cf-toggle-switch .btn-danger:focus,.cf-toggle-switch .btn-danger:hover,.cf-toggle-switch .open .dropdown-toggle.btn-danger{color:#fff;background-color:#d2322d;border-color:#ac2925}.cf-toggle-switch .btn-danger.disabled,.cf-toggle-switch .btn-danger.disabled.active,.cf-toggle-switch .btn-danger.disabled:active,.cf-toggle-switch .btn-danger.disabled:focus,.cf-toggle-switch .btn-danger.disabled:hover,.cf-toggle-switch .btn-danger[disabled],.cf-toggle-switch .btn-danger[disabled].active,.cf-toggle-switch .btn-danger[disabled]:active,.cf-toggle-switch .btn-danger[disabled]:focus,.cf-toggle-switch .btn-danger[disabled]:hover,.cf-toggle-switch fieldset[disabled] .btn-danger,.cf-toggle-switch fieldset[disabled] .btn-danger.active,.cf-toggle-switch fieldset[disabled] .btn-danger:active,.cf-toggle-switch fieldset[disabled] .btn-danger:focus,.cf-toggle-switch fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.cf-toggle-switch .btn-danger .badge{color:#d9534f;background-color:#fff}.cf-toggle-switch .btn-link{color:#428bca;font-weight:400;cursor:pointer;border-radius:0}.cf-toggle-switch .btn-link,.cf-toggle-switch .btn-link:active,.cf-toggle-switch .btn-link[disabled],.cf-toggle-switch fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.cf-toggle-switch .btn-link,.cf-toggle-switch .btn-link:active,.cf-toggle-switch .btn-link:focus,.cf-toggle-switch .btn-link:hover{border-color:transparent}.cf-toggle-switch .btn-link:focus,.cf-toggle-switch .btn-link:hover{color:#2a6496;text-decoration:underline;background-color:transparent}.cf-toggle-switch .btn-link[disabled]:focus,.cf-toggle-switch .btn-link[disabled]:hover,.cf-toggle-switch fieldset[disabled] .btn-link:focus,.cf-toggle-switch fieldset[disabled] .btn-link:hover{color:#999;text-decoration:none}.cf-toggle-switch .btn-group-lg>.btn,.cf-toggle-switch .btn-lg{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.cf-toggle-switch .btn-group-sm>.btn,.cf-toggle-switch .btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.cf-toggle-switch .btn-group-xs>.btn,.cf-toggle-switch .btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.cf-toggle-switch .btn-group-vertical>.btn:not(:first-child):not(:last-child),.cf-toggle-switch .btn-group>.btn-group:not(:first-child):not(:last-child)>.btn,.cf-toggle-switch .btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.cf-toggle-switch .btn-group>.btn-group:first-child>.btn:last-child,.cf-toggle-switch .btn-group>.btn-group:first-child>.dropdown-toggle,.cf-toggle-switch .btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.cf-toggle-switch .btn-block{display:block;width:100%;padding-left:0;padding-right:0}.cf-toggle-switch input[type=button].btn-block,.cf-toggle-switch input[type=reset].btn-block,.cf-toggle-switch input[type=submit].btn-block{width:100%}.cf-toggle-switch .btn-group,.cf-toggle-switch .btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.cf-toggle-switch .btn-group-vertical>.btn,.cf-toggle-switch .btn-group>.btn{position:relative;float:left}.cf-toggle-switch .btn-group-vertical>.btn.active,.cf-toggle-switch .btn-group-vertical>.btn:active,.cf-toggle-switch .btn-group-vertical>.btn:focus,.cf-toggle-switch .btn-group-vertical>.btn:hover,.cf-toggle-switch .btn-group>.btn.active,.cf-toggle-switch .btn-group>.btn:active,.cf-toggle-switch .btn-group>.btn:focus,.cf-toggle-switch .btn-group>.btn:hover{z-index:2}.cf-toggle-switch .btn-group-vertical>.btn:focus,.cf-toggle-switch .btn-group>.btn:focus{outline:0}.cf-toggle-switch .btn-toolbar{margin-left:-5px}.cf-toggle-switch .btn-toolbar .btn-group,.cf-toggle-switch .btn-toolbar .input-group{float:left}.cf-toggle-switch .btn-toolbar>.btn,.cf-toggle-switch .btn-toolbar>.btn-group,.cf-toggle-switch .btn-toolbar>.input-group{margin-left:5px}.cf-toggle-switch .btn-group>.btn:first-child{margin-left:0}.cf-toggle-switch .btn-group>.btn:last-child:not(:first-child),.cf-toggle-switch .btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.cf-toggle-switch .btn-group>.btn-group{float:left}.cf-toggle-switch .btn-group>.btn-group:last-child>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.cf-toggle-switch .btn-group .dropdown-toggle:active,.cf-toggle-switch .btn-group.open .dropdown-toggle{outline:0}.cf-toggle-switch .btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.cf-toggle-switch .btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px}.cf-toggle-switch .btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.cf-toggle-switch .btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.cf-toggle-switch .btn .caret{margin-left:0}.cf-toggle-switch .btn-lg .caret{border-width:5px 5px 0}.cf-toggle-switch .dropup .btn-lg .caret{border-width:0 5px 5px}.cf-toggle-switch .btn-group-vertical>.btn,.cf-toggle-switch .btn-group-vertical>.btn-group,.cf-toggle-switch .btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.cf-toggle-switch .btn-group-vertical>.btn-group>.btn{float:none}.cf-toggle-switch .btn-group-vertical>.btn+.btn,.cf-toggle-switch .btn-group-vertical>.btn+.btn-group,.cf-toggle-switch .btn-group-vertical>.btn-group+.btn,.cf-toggle-switch .btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.cf-toggle-switch .btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.cf-toggle-switch .btn-group-vertical>.btn:last-child:not(:first-child){border-bottom-left-radius:4px;border-top-right-radius:0;border-top-left-radius:0}.cf-toggle-switch .btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.cf-toggle-switch .btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.cf-toggle-switch .btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.cf-toggle-switch .btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.cf-toggle-switch .btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.cf-toggle-switch .btn-group-justified>.btn,.cf-toggle-switch .btn-group-justified>.btn-group{float:none;display:table-cell;width:1%}.cf-toggle-switch .btn-group-justified>.btn-group .btn{width:100%}.cf-toggle-switch [data-toggle=buttons]>.btn>input[type=checkbox],.cf-toggle-switch [data-toggle=buttons]>.btn>input[type=radio]{display:none}.cf-toggle-switch .btn-group-vertical>.btn-group:after,.cf-toggle-switch .btn-group-vertical>.btn-group:before,.cf-toggle-switch .btn-toolbar:after,.cf-toggle-switch .btn-toolbar:before,.cf-toggle-switch .clearfix:after,.cf-toggle-switch .clearfix:before{content:" ";display:table}.cf-toggle-switch .btn-group-vertical>.btn-group:after,.cf-toggle-switch .btn-toolbar:after,.cf-toggle-switch .clearfix:after{clear:both}.cf-toggle-switch .center-block{display:block;margin-left:auto;margin-right:auto}.cf-toggle-switch .pull-right{float:right!important}.cf-toggle-switch .pull-left{float:left!important}.cf-toggle-switch .hide{display:none!important}.cf-toggle-switch .show{display:block!important}.cf-toggle-switch .invisible{visibility:hidden}.cf-toggle-switch .text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.cf-toggle-switch .hidden{display:none!important;visibility:hidden!important}.cf-toggle-switch .affix{position:fixed}@-ms-viewport{width:device-width}.cf-toggle-switch .visible-lg,.cf-toggle-switch .visible-md,.cf-toggle-switch .visible-print,.cf-toggle-switch .visible-sm,.cf-toggle-switch .visible-xs{display:none!important}@media (max-width:767px){.cf-toggle-switch .visible-xs{display:block!important}.cf-toggle-switch table.visible-xs{display:table}.cf-toggle-switch tr.visible-xs{display:table-row!important}.cf-toggle-switch td.visible-xs,.cf-toggle-switch th.visible-xs{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.cf-toggle-switch .visible-sm{display:block!important}.cf-toggle-switch table.visible-sm{display:table}.cf-toggle-switch tr.visible-sm{display:table-row!important}.cf-toggle-switch td.visible-sm,.cf-toggle-switch th.visible-sm{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.cf-toggle-switch .visible-md{display:block!important}.cf-toggle-switch table.visible-md{display:table}.cf-toggle-switch tr.visible-md{display:table-row!important}.cf-toggle-switch td.visible-md,.cf-toggle-switch th.visible-md{display:table-cell!important}}@media (min-width:1200px){.cf-toggle-switch .visible-lg{display:block!important}.cf-toggle-switch table.visible-lg{display:table}.cf-toggle-switch tr.visible-lg{display:table-row!important}.cf-toggle-switch td.visible-lg,.cf-toggle-switch th.visible-lg{display:table-cell!important}.cf-toggle-switch .hidden-lg{display:none!important}}@media (max-width:767px){.cf-toggle-switch .hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.cf-toggle-switch .hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.cf-toggle-switch .hidden-md{display:none!important}}@media print{.cf-toggle-switch .visible-print{display:block!important}.cf-toggle-switch table.visible-print{display:table}.cf-toggle-switch tr.visible-print{display:table-row!important}.cf-toggle-switch td.visible-print,.cf-toggle-switch th.visible-print{display:table-cell!important}.cf-toggle-switch .hidden-print{display:none!important}}.cf-toggle-group-buttons{width:100%;clear:both}input.form-control.parsley-success,select.form-control.parsley-success,textarea.form-control.parsley-success{color:#468847;background-color:#DFF0D8;border-color:#D6E9C6}input.form-control.parsley-error,select.form-control.parsley-error,textarea.form-control.parsley-error{color:#B94A48;background-color:#F2DEDE;border-color:#EED3D7}.form-control.parsley-errors-list{margin:2px 0 3px;padding:0;list-style-type:none;font-size:.9em;line-height:.9em;opacity:0;color:#468847;transition:all .3s ease-in;-o-transition:all .3s ease-in;-moz-transition:all .3s ease-in;-webkit-transition:all .3s ease-in}.form-control.parsley-errors-list.filled{opacity:1}.breadcrumb a.has-error{color:red}.form-group .parsley-errors-list.filled,.form-group .parsley-errors-list.filled .parsley-type{list-style:none}.caldera-grid .cf-multi-uploader-list>ul{list-style:none;margin:0 0 12px;padding:0}.caldera-grid .cf-multi-uploader-list>ul>li{margin:0;padding:0 0 22px;position:relative;clear:both}.caldera-grid .cf-multi-uploader-list>ul>li .file-name{display:inline-block;font-weight:700;left:16px;right:0;overflow:hidden;position:absolute;text-overflow:ellipsis;white-space:nowrap}.caldera-grid .cf-multi-uploader-list>ul>li .file-name.file-uploaded{left:0}.caldera-grid .cf-multi-uploader-list>ul>li .file-size{float:right}.caldera-grid .cf-multi-uploader-list>ul>li .file-type{float:left}.caldera-grid .cf-multi-uploader-list>ul>li .file-error{clear:both;display:block}.caldera-grid .cf-multi-uploader-list>ul>li .cf-file-remove{color:#cf0000;text-decoration:none;border:0}.caldera-grid .cf-multi-uploader-list>ul>li.has-error .bar{background-color:#cf0000!important}.caldera-grid .cf-multi-uploader-list>ul>li.has-error{color:#cf0000}.has-error.cf-toggle-switch .cf-toggle-group-buttons>a{background-color:#f2dede;border-color:#dd4b39}
|
1 |
+
/*! GENERATED SOURCE FILE caldera-forms - v1.9.4 - 2021-02-27 */@media (min-width:768px){.caldera-grid .container{width:750px}}@media (min-width:992px){.caldera-grid .container{width:970px}}@media (min-width:1200px){.caldera-grid .container{width:1170px}}.caldera-grid article,.caldera-grid aside,.caldera-grid details,.caldera-grid figcaption,.caldera-grid figure,.caldera-grid footer,.caldera-grid header,.caldera-grid hgroup,.caldera-grid main,.caldera-grid nav,.caldera-grid section,.caldera-grid summary{display:block}.caldera-grid a{background:0 0;text-decoration:none}.caldera-grid img{vertical-align:middle}.caldera-grid pre{overflow:auto}.caldera-grid *,.caldera-grid :after,.caldera-grid :before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.caldera-grid html{font-size:62.5%;-webkit-tap-highlight-color:transparent}.caldera-grid body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}.caldera-grid button,.caldera-grid input,.caldera-grid select,.caldera-grid textarea{font-family:inherit;font-size:inherit;line-height:inherit}.caldera-grid a:focus,.caldera-grid a:hover{color:#2a6496;text-decoration:underline}.caldera-grid a:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.caldera-grid .img-responsive{display:block;max-width:100%;height:auto}.caldera-grid .img-rounded{border-radius:6px}.caldera-grid .img-thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.caldera-grid .img-circle{border-radius:50%}.caldera-grid hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.caldera-grid .sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.caldera-grid .container,.caldera-grid .container-fluid{margin-right:auto;margin-left:auto;padding-left:7.5px;padding-right:7.5px}@media (min-width:768px){.caldera-grid .container{width:735px}}@media (min-width:992px){.caldera-grid .container{width:955px}}@media (min-width:1200px){.caldera-grid .container{width:1155px}}.caldera-grid .row{margin-left:-7.5px;margin-right:-7.5px;max-width:100%}.caldera-grid .col-lg-1,.caldera-grid .col-lg-10,.caldera-grid .col-lg-11,.caldera-grid .col-lg-12,.caldera-grid .col-lg-2,.caldera-grid .col-lg-3,.caldera-grid .col-lg-4,.caldera-grid .col-lg-5,.caldera-grid .col-lg-6,.caldera-grid .col-lg-7,.caldera-grid .col-lg-8,.caldera-grid .col-lg-9,.caldera-grid .col-md-1,.caldera-grid .col-md-10,.caldera-grid .col-md-11,.caldera-grid .col-md-12,.caldera-grid .col-md-2,.caldera-grid .col-md-3,.caldera-grid .col-md-4,.caldera-grid .col-md-5,.caldera-grid .col-md-6,.caldera-grid .col-md-7,.caldera-grid .col-md-8,.caldera-grid .col-md-9,.caldera-grid .col-sm-1,.caldera-grid .col-sm-10,.caldera-grid .col-sm-11,.caldera-grid .col-sm-12,.caldera-grid .col-sm-2,.caldera-grid .col-sm-3,.caldera-grid .col-sm-4,.caldera-grid .col-sm-5,.caldera-grid .col-sm-6,.caldera-grid .col-sm-7,.caldera-grid .col-sm-8,.caldera-grid .col-sm-9,.caldera-grid .col-xs-1,.caldera-grid .col-xs-10,.caldera-grid .col-xs-11,.caldera-grid .col-xs-12,.caldera-grid .col-xs-2,.caldera-grid .col-xs-3,.caldera-grid .col-xs-4,.caldera-grid .col-xs-5,.caldera-grid .col-xs-6,.caldera-grid .col-xs-7,.caldera-grid .col-xs-8,.caldera-grid .col-xs-9{position:relative;padding-left:7.5px;padding-right:7.5px}.caldera-grid .col-xs-1,.caldera-grid .col-xs-10,.caldera-grid .col-xs-11,.caldera-grid .col-xs-12,.caldera-grid .col-xs-2,.caldera-grid .col-xs-3,.caldera-grid .col-xs-4,.caldera-grid .col-xs-5,.caldera-grid .col-xs-6,.caldera-grid .col-xs-7,.caldera-grid .col-xs-8,.caldera-grid .col-xs-9{float:left}.caldera-grid .col-xs-12{width:100%}.caldera-grid .col-xs-11{width:91.66666667%}.caldera-grid .col-xs-10{width:83.33333333%}.caldera-grid .col-xs-9{width:75%}.caldera-grid .col-xs-8{width:66.66666667%}.caldera-grid .col-xs-7{width:58.33333333%}.caldera-grid .col-xs-6{width:50%}.caldera-grid .col-xs-5{width:41.66666667%}.caldera-grid .col-xs-4{width:33.33333333%}.caldera-grid .col-xs-3{width:25%}.caldera-grid .col-xs-2{width:16.66666667%}.caldera-grid .col-xs-1{width:8.33333333%}.caldera-grid .col-xs-pull-12{right:100%}.caldera-grid .col-xs-pull-11{right:91.66666667%}.caldera-grid .col-xs-pull-10{right:83.33333333%}.caldera-grid .col-xs-pull-9{right:75%}.caldera-grid .col-xs-pull-8{right:66.66666667%}.caldera-grid .col-xs-pull-7{right:58.33333333%}.caldera-grid .col-xs-pull-6{right:50%}.caldera-grid .col-xs-pull-5{right:41.66666667%}.caldera-grid .col-xs-pull-4{right:33.33333333%}.caldera-grid .col-xs-pull-3{right:25%}.caldera-grid .col-xs-pull-2{right:16.66666667%}.caldera-grid .col-xs-pull-1{right:8.33333333%}.caldera-grid .col-xs-pull-0{right:0}.caldera-grid .col-xs-push-12{left:100%}.caldera-grid .col-xs-push-11{left:91.66666667%}.caldera-grid .col-xs-push-10{left:83.33333333%}.caldera-grid .col-xs-push-9{left:75%}.caldera-grid .col-xs-push-8{left:66.66666667%}.caldera-grid .col-xs-push-7{left:58.33333333%}.caldera-grid .col-xs-push-6{left:50%}.caldera-grid .col-xs-push-5{left:41.66666667%}.caldera-grid .col-xs-push-4{left:33.33333333%}.caldera-grid .col-xs-push-3{left:25%}.caldera-grid .col-xs-push-2{left:16.66666667%}.caldera-grid .col-xs-push-1{left:8.33333333%}.caldera-grid .col-xs-push-0{left:0}.caldera-grid .col-xs-offset-12{margin-left:100%}.caldera-grid .col-xs-offset-11{margin-left:91.66666667%}.caldera-grid .col-xs-offset-10{margin-left:83.33333333%}.caldera-grid .col-xs-offset-9{margin-left:75%}.caldera-grid .col-xs-offset-8{margin-left:66.66666667%}.caldera-grid .col-xs-offset-7{margin-left:58.33333333%}.caldera-grid .col-xs-offset-6{margin-left:50%}.caldera-grid .col-xs-offset-5{margin-left:41.66666667%}.caldera-grid .col-xs-offset-4{margin-left:33.33333333%}.caldera-grid .col-xs-offset-3{margin-left:25%}.caldera-grid .col-xs-offset-2{margin-left:16.66666667%}.caldera-grid .col-xs-offset-1{margin-left:8.33333333%}.caldera-grid .col-xs-offset-0{margin-left:0}@media (min-width:768px){.caldera-grid .col-sm-1,.caldera-grid .col-sm-10,.caldera-grid .col-sm-11,.caldera-grid .col-sm-12,.caldera-grid .col-sm-2,.caldera-grid .col-sm-3,.caldera-grid .col-sm-4,.caldera-grid .col-sm-5,.caldera-grid .col-sm-6,.caldera-grid .col-sm-7,.caldera-grid .col-sm-8,.caldera-grid .col-sm-9{float:left}.caldera-grid .col-sm-12{width:100%}.caldera-grid .col-sm-11{width:91.66666667%}.caldera-grid .col-sm-10{width:83.33333333%}.caldera-grid .col-sm-9{width:75%}.caldera-grid .col-sm-8{width:66.66666667%}.caldera-grid .col-sm-7{width:58.33333333%}.caldera-grid .col-sm-6{width:50%}.caldera-grid .col-sm-5{width:41.66666667%}.caldera-grid .col-sm-4{width:33.33333333%}.caldera-grid .col-sm-3{width:25%}.caldera-grid .col-sm-2{width:16.66666667%}.caldera-grid .col-sm-1{width:8.33333333%}.caldera-grid .col-sm-pull-12{right:100%}.caldera-grid .col-sm-pull-11{right:91.66666667%}.caldera-grid .col-sm-pull-10{right:83.33333333%}.caldera-grid .col-sm-pull-9{right:75%}.caldera-grid .col-sm-pull-8{right:66.66666667%}.caldera-grid .col-sm-pull-7{right:58.33333333%}.caldera-grid .col-sm-pull-6{right:50%}.caldera-grid .col-sm-pull-5{right:41.66666667%}.caldera-grid .col-sm-pull-4{right:33.33333333%}.caldera-grid .col-sm-pull-3{right:25%}.caldera-grid .col-sm-pull-2{right:16.66666667%}.caldera-grid .col-sm-pull-1{right:8.33333333%}.caldera-grid .col-sm-pull-0{right:0}.caldera-grid .col-sm-push-12{left:100%}.caldera-grid .col-sm-push-11{left:91.66666667%}.caldera-grid .col-sm-push-10{left:83.33333333%}.caldera-grid .col-sm-push-9{left:75%}.caldera-grid .col-sm-push-8{left:66.66666667%}.caldera-grid .col-sm-push-7{left:58.33333333%}.caldera-grid .col-sm-push-6{left:50%}.caldera-grid .col-sm-push-5{left:41.66666667%}.caldera-grid .col-sm-push-4{left:33.33333333%}.caldera-grid .col-sm-push-3{left:25%}.caldera-grid .col-sm-push-2{left:16.66666667%}.caldera-grid .col-sm-push-1{left:8.33333333%}.caldera-grid .col-sm-push-0{left:0}.caldera-grid .col-sm-offset-12{margin-left:100%}.caldera-grid .col-sm-offset-11{margin-left:91.66666667%}.caldera-grid .col-sm-offset-10{margin-left:83.33333333%}.caldera-grid .col-sm-offset-9{margin-left:75%}.caldera-grid .col-sm-offset-8{margin-left:66.66666667%}.caldera-grid .col-sm-offset-7{margin-left:58.33333333%}.caldera-grid .col-sm-offset-6{margin-left:50%}.caldera-grid .col-sm-offset-5{margin-left:41.66666667%}.caldera-grid .col-sm-offset-4{margin-left:33.33333333%}.caldera-grid .col-sm-offset-3{margin-left:25%}.caldera-grid .col-sm-offset-2{margin-left:16.66666667%}.caldera-grid .col-sm-offset-1{margin-left:8.33333333%}.caldera-grid .col-sm-offset-0{margin-left:0}}@media (min-width:992px){.caldera-grid .col-md-1,.caldera-grid .col-md-10,.caldera-grid .col-md-11,.caldera-grid .col-md-12,.caldera-grid .col-md-2,.caldera-grid .col-md-3,.caldera-grid .col-md-4,.caldera-grid .col-md-5,.caldera-grid .col-md-6,.caldera-grid .col-md-7,.caldera-grid .col-md-8,.caldera-grid .col-md-9{float:left}.caldera-grid .col-md-12{width:100%}.caldera-grid .col-md-11{width:91.66666667%}.caldera-grid .col-md-10{width:83.33333333%}.caldera-grid .col-md-9{width:75%}.caldera-grid .col-md-8{width:66.66666667%}.caldera-grid .col-md-7{width:58.33333333%}.caldera-grid .col-md-6{width:50%}.caldera-grid .col-md-5{width:41.66666667%}.caldera-grid .col-md-4{width:33.33333333%}.caldera-grid .col-md-3{width:25%}.caldera-grid .col-md-2{width:16.66666667%}.caldera-grid .col-md-1{width:8.33333333%}.caldera-grid .col-md-pull-12{right:100%}.caldera-grid .col-md-pull-11{right:91.66666667%}.caldera-grid .col-md-pull-10{right:83.33333333%}.caldera-grid .col-md-pull-9{right:75%}.caldera-grid .col-md-pull-8{right:66.66666667%}.caldera-grid .col-md-pull-7{right:58.33333333%}.caldera-grid .col-md-pull-6{right:50%}.caldera-grid .col-md-pull-5{right:41.66666667%}.caldera-grid .col-md-pull-4{right:33.33333333%}.caldera-grid .col-md-pull-3{right:25%}.caldera-grid .col-md-pull-2{right:16.66666667%}.caldera-grid .col-md-pull-1{right:8.33333333%}.caldera-grid .col-md-pull-0{right:0}.caldera-grid .col-md-push-12{left:100%}.caldera-grid .col-md-push-11{left:91.66666667%}.caldera-grid .col-md-push-10{left:83.33333333%}.caldera-grid .col-md-push-9{left:75%}.caldera-grid .col-md-push-8{left:66.66666667%}.caldera-grid .col-md-push-7{left:58.33333333%}.caldera-grid .col-md-push-6{left:50%}.caldera-grid .col-md-push-5{left:41.66666667%}.caldera-grid .col-md-push-4{left:33.33333333%}.caldera-grid .col-md-push-3{left:25%}.caldera-grid .col-md-push-2{left:16.66666667%}.caldera-grid .col-md-push-1{left:8.33333333%}.caldera-grid .col-md-push-0{left:0}.caldera-grid .col-md-offset-12{margin-left:100%}.caldera-grid .col-md-offset-11{margin-left:91.66666667%}.caldera-grid .col-md-offset-10{margin-left:83.33333333%}.caldera-grid .col-md-offset-9{margin-left:75%}.caldera-grid .col-md-offset-8{margin-left:66.66666667%}.caldera-grid .col-md-offset-7{margin-left:58.33333333%}.caldera-grid .col-md-offset-6{margin-left:50%}.caldera-grid .col-md-offset-5{margin-left:41.66666667%}.caldera-grid .col-md-offset-4{margin-left:33.33333333%}.caldera-grid .col-md-offset-3{margin-left:25%}.caldera-grid .col-md-offset-2{margin-left:16.66666667%}.caldera-grid .col-md-offset-1{margin-left:8.33333333%}.caldera-grid .col-md-offset-0{margin-left:0}}@-ms-viewport{width:device-width}@media (min-width:1200px){.caldera-grid .col-lg-1,.caldera-grid .col-lg-10,.caldera-grid .col-lg-11,.caldera-grid .col-lg-12,.caldera-grid .col-lg-2,.caldera-grid .col-lg-3,.caldera-grid .col-lg-4,.caldera-grid .col-lg-5,.caldera-grid .col-lg-6,.caldera-grid .col-lg-7,.caldera-grid .col-lg-8,.caldera-grid .col-lg-9{float:left}.caldera-grid .col-lg-12{width:100%}.caldera-grid .col-lg-11{width:91.66666667%}.caldera-grid .col-lg-10{width:83.33333333%}.caldera-grid .col-lg-9{width:75%}.caldera-grid .col-lg-8{width:66.66666667%}.caldera-grid .col-lg-7{width:58.33333333%}.caldera-grid .col-lg-6{width:50%}.caldera-grid .col-lg-5{width:41.66666667%}.caldera-grid .col-lg-4{width:33.33333333%}.caldera-grid .col-lg-3{width:25%}.caldera-grid .col-lg-2{width:16.66666667%}.caldera-grid .col-lg-1{width:8.33333333%}.caldera-grid .col-lg-pull-12{right:100%}.caldera-grid .col-lg-pull-11{right:91.66666667%}.caldera-grid .col-lg-pull-10{right:83.33333333%}.caldera-grid .col-lg-pull-9{right:75%}.caldera-grid .col-lg-pull-8{right:66.66666667%}.caldera-grid .col-lg-pull-7{right:58.33333333%}.caldera-grid .col-lg-pull-6{right:50%}.caldera-grid .col-lg-pull-5{right:41.66666667%}.caldera-grid .col-lg-pull-4{right:33.33333333%}.caldera-grid .col-lg-pull-3{right:25%}.caldera-grid .col-lg-pull-2{right:16.66666667%}.caldera-grid .col-lg-pull-1{right:8.33333333%}.caldera-grid .col-lg-pull-0{right:0}.caldera-grid .col-lg-push-12{left:100%}.caldera-grid .col-lg-push-11{left:91.66666667%}.caldera-grid .col-lg-push-10{left:83.33333333%}.caldera-grid .col-lg-push-9{left:75%}.caldera-grid .col-lg-push-8{left:66.66666667%}.caldera-grid .col-lg-push-7{left:58.33333333%}.caldera-grid .col-lg-push-6{left:50%}.caldera-grid .col-lg-push-5{left:41.66666667%}.caldera-grid .col-lg-push-4{left:33.33333333%}.caldera-grid .col-lg-push-3{left:25%}.caldera-grid .col-lg-push-2{left:16.66666667%}.caldera-grid .col-lg-push-1{left:8.33333333%}.caldera-grid .col-lg-push-0{left:0}.caldera-grid .col-lg-offset-12{margin-left:100%}.caldera-grid .col-lg-offset-11{margin-left:91.66666667%}.caldera-grid .col-lg-offset-10{margin-left:83.33333333%}.caldera-grid .col-lg-offset-9{margin-left:75%}.caldera-grid .col-lg-offset-8{margin-left:66.66666667%}.caldera-grid .col-lg-offset-7{margin-left:58.33333333%}.caldera-grid .col-lg-offset-6{margin-left:50%}.caldera-grid .col-lg-offset-5{margin-left:41.66666667%}.caldera-grid .col-lg-offset-4{margin-left:33.33333333%}.caldera-grid .col-lg-offset-3{margin-left:25%}.caldera-grid .col-lg-offset-2{margin-left:16.66666667%}.caldera-grid .col-lg-offset-1{margin-left:8.33333333%}.caldera-grid .col-lg-offset-0{margin-left:0}}.caldera-grid .clearfix:after,.caldera-grid .clearfix:before,.caldera-grid .container-fluid:after,.caldera-grid .container-fluid:before,.caldera-grid .container:after,.caldera-grid .container:before,.caldera-grid .row:after,.caldera-grid .row:before{content:" ";display:table}.caldera-grid .clearfix:after,.caldera-grid .container-fluid:after,.caldera-grid .container:after,.caldera-grid .row:after{clear:both}.caldera-grid .center-block{display:block;margin-left:auto;margin-right:auto}.caldera-grid .pull-right{float:right!important}.caldera-grid .pull-left{float:left!important}.caldera-grid .hide{display:none!important}.caldera-grid .show{display:block!important}.caldera-grid .hidden,.caldera-grid .visible-lg,.caldera-grid .visible-md,.caldera-grid .visible-sm,.caldera-grid .visible-xs{display:none!important}.caldera-grid .invisible{visibility:hidden}.caldera-grid .text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.caldera-grid .hidden{visibility:hidden!important}.caldera-grid .affix{position:fixed}@-ms-viewport{width:device-width}@media (max-width:767px){.caldera-grid .visible-xs{display:block!important}.caldera-grid table.visible-xs{display:table}.caldera-grid tr.visible-xs{display:table-row!important}.caldera-grid td.visible-xs,.caldera-grid th.visible-xs{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.caldera-grid .visible-sm{display:block!important}.caldera-grid table.visible-sm{display:table}.caldera-grid tr.visible-sm{display:table-row!important}.caldera-grid td.visible-sm,.caldera-grid th.visible-sm{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.caldera-grid .visible-md{display:block!important}.caldera-grid table.visible-md{display:table}.caldera-grid tr.visible-md{display:table-row!important}.caldera-grid td.visible-md,.caldera-grid th.visible-md{display:table-cell!important}}@media (min-width:1200px){.caldera-grid .visible-lg{display:block!important}.caldera-grid table.visible-lg{display:table}.caldera-grid tr.visible-lg{display:table-row!important}.caldera-grid td.visible-lg,.caldera-grid th.visible-lg{display:table-cell!important}.caldera-grid .hidden-lg{display:none!important}}@media (max-width:767px){.caldera-grid .hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.caldera-grid .hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.caldera-grid .hidden-md{display:none!important}}.caldera-grid .visible-print{display:none!important}@media print{.caldera-grid .visible-print{display:block!important}.caldera-grid table.visible-print{display:table}.caldera-grid tr.visible-print{display:table-row!important}.caldera-grid td.visible-print,.caldera-grid th.visible-print{display:table-cell!important}.caldera-grid .hidden-print{display:none!important}}input.parsley-success,select.parsley-success,textarea.parsley-success{color:#468847;background-color:#DFF0D8;border:1px solid #D6E9C6}input.parsley-error,select.parsley-error,textarea.parsley-error{color:#B94A48;background-color:#F2DEDE;border:1px solid #EED3D7}.parsley-errors-list{margin:2px 0 3px;padding:0;list-style-type:none;font-size:.9em;line-height:.9em;opacity:0;transition:all .3s ease-in;-o-transition:all .3s ease-in;-moz-transition:all .3s ease-in;-webkit-transition:all .3s ease-in}.parsley-errors-list.filled{opacity:1}.caldera-grid .alert{padding:8px;margin-bottom:18px;border-radius:2px}.caldera-grid .alert .alert-link{font-weight:700}.caldera-grid .alert-dismissable{padding-right:28px}.caldera-grid .alert-success{background-color:#dff0d8;border-color:#a3d48e;color:#3c763d}.caldera-grid .alert-success hr{border-top-color:#93cd7c}.caldera-grid .alert-success .alert-link{color:#2b542c}.caldera-grid .alert-info{background-color:#d9edf7;border-color:#85c5e5;color:#31708f}.caldera-grid .alert-info hr{border-top-color:#70bbe1}.caldera-grid .alert-info .alert-link{color:#245269}.caldera-grid .alert-warning{background-color:#f9edbe;border-color:#f0c36d;color:#333}.caldera-grid .alert-warning hr{border-top-color:#eeb956}.caldera-grid .alert-warning .alert-link{color:#1a1a1a}.caldera-grid .alert-danger,.caldera-grid .alert-error{background-color:#f2dede;border-color:#d59595;color:#a94442}.caldera-grid .alert-danger hr,.caldera-grid .alert-error hr{border-top-color:#ce8383}.caldera-grid .alert-danger .alert-link,.caldera-grid .alert-error .alert-link{color:#843534}.caldera-grid .alert-danger,.caldera-grid .alert-error,.caldera-grid .alert-info,.caldera-grid .alert-success,.caldera-grid .alert-warning{text-shadow:0 1px 0 rgba(255,255,255,.5)}.caldera-grid .has-error .form-control:focus,.caldera-grid .has-error .form-control:hover{border-color:#dd4b39}.caldera-grid.cf_processing{background:url(../images/loading.gif) center center/30px auto no-repeat rgba(0,0,0,0)}.caldera-grid.cf_processing>*{opacity:.5}.caldera-grid html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}.caldera-grid body{margin:0}.caldera-grid article,.caldera-grid aside,.caldera-grid details,.caldera-grid figcaption,.caldera-grid figure,.caldera-grid footer,.caldera-grid header,.caldera-grid hgroup,.caldera-grid main,.caldera-grid menu,.caldera-grid nav,.caldera-grid section,.caldera-grid summary{display:block}.caldera-grid audio,.caldera-grid canvas,.caldera-grid progress,.caldera-grid video{display:inline-block;vertical-align:baseline}.caldera-grid audio:not([controls]){display:none;height:0}.caldera-grid [hidden],.caldera-grid template{display:none}.caldera-grid a{background-color:transparent}.caldera-grid a:active,.caldera-grid a:hover{outline:0}.caldera-grid abbr[title]{border-bottom:1px dotted}.caldera-grid b,.caldera-grid strong{font-weight:700}.caldera-grid dfn{font-style:italic}.caldera-grid h1{font-size:2em;margin:.67em 0}.caldera-grid mark{background:#ff0;color:#000}.caldera-grid small{font-size:80%}.caldera-grid sub,.caldera-grid sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.caldera-grid sup{top:-.5em}.caldera-grid sub{bottom:-.25em}.caldera-grid img{border:0}.caldera-grid svg:not(:root){overflow:hidden}.caldera-grid pre,.caldera-grid textarea{overflow:auto}.caldera-grid figure{margin:1em 40px}.caldera-grid hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}.caldera-grid code,.caldera-grid kbd,.caldera-grid pre,.caldera-grid samp{font-family:monospace,monospace;font-size:1em}.caldera-grid button,.caldera-grid input,.caldera-grid optgroup,.caldera-grid select,.caldera-grid textarea{font:inherit;margin:0}.caldera-grid button{overflow:visible}.caldera-grid button,.caldera-grid select{text-transform:none}.caldera-grid button,.caldera-grid html input[type=button],.caldera-grid input[type=reset],.caldera-grid input[type=submit]{-webkit-appearance:button;cursor:pointer}.caldera-grid button[disabled],.caldera-grid html input[disabled]{cursor:default}.caldera-grid button::-moz-focus-inner,.caldera-grid input::-moz-focus-inner{border:0;padding:0}.caldera-grid input{line-height:normal}.caldera-grid input[type=checkbox],.caldera-grid input[type=radio]{box-sizing:border-box;padding:0}.caldera-grid input[type=number]::-webkit-inner-spin-button,.caldera-grid input[type=number]::-webkit-outer-spin-button{height:auto}.caldera-grid input[type=search]{-webkit-appearance:textfield;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.caldera-grid input[type=search]::-webkit-search-cancel-button,.caldera-grid input[type=search]::-webkit-search-decoration{-webkit-appearance:none}.caldera-grid optgroup{font-weight:700}.caldera-grid table{border-collapse:collapse;border-spacing:0}.caldera-grid td,.caldera-grid th{padding:0}@media print{.caldera-grid *,.caldera-grid :after,.caldera-grid :before{background:0 0!important;color:#000!important;box-shadow:none!important;text-shadow:none!important}.caldera-grid a,.caldera-grid a:visited{text-decoration:underline}.caldera-grid a[href]:after{content:" (" attr(href) ")"}.caldera-grid abbr[title]:after{content:" (" attr(title) ")"}.caldera-grid a[href^="#"]:after,.caldera-grid a[href^="javascript:"]:after{content:""}.caldera-grid blockquote,.caldera-grid pre{border:1px solid #999;page-break-inside:avoid}.caldera-grid thead{display:table-header-group}.caldera-grid img,.caldera-grid tr{page-break-inside:avoid}.caldera-grid img{max-width:100%!important}.caldera-grid h2,.caldera-grid h3,.caldera-grid p{orphans:3;widows:3}.caldera-grid h2,.caldera-grid h3{page-break-after:avoid}.caldera-grid select{background:#fff!important}.caldera-grid .navbar{display:none}.caldera-grid .btn>.caret,.caldera-grid .dropup>.btn>.caret{border-top-color:#000!important}.caldera-grid .label{border:1px solid #000}.caldera-grid .table{border-collapse:collapse!important}.caldera-grid .table td,.caldera-grid .table th{background-color:#fff!important}.caldera-grid .table-bordered td,.caldera-grid .table-bordered th{border:1px solid #ddd!important}}.caldera-grid .btn,.caldera-grid .btn-danger.active,.caldera-grid .btn-danger:active,.caldera-grid .btn-default.active,.caldera-grid .btn-default:active,.caldera-grid .btn-info.active,.caldera-grid .btn-info:active,.caldera-grid .btn-primary.active,.caldera-grid .btn-primary:active,.caldera-grid .btn-success.active,.caldera-grid .btn-success:active,.caldera-grid .btn-warning.active,.caldera-grid .btn-warning:active,.caldera-grid .btn.active,.caldera-grid .btn:active,.caldera-grid .form-control,.open>.dropdown-toggle.caldera-grid .btn-danger,.open>.dropdown-toggle.caldera-grid .btn-default,.open>.dropdown-toggle.caldera-grid .btn-info,.open>.dropdown-toggle.caldera-grid .btn-primary,.open>.dropdown-toggle.caldera-grid .btn-success,.open>.dropdown-toggle.caldera-grid .btn-warning{background-image:none}.caldera-grid fieldset{padding:0;margin:0;border:0;min-width:0}.caldera-grid legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}.caldera-grid label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}.caldera-grid input[type=checkbox],.caldera-grid input[type=radio]{margin:0;line-height:normal}.caldera-grid .form-group,.cf-color-picker .form-group{margin-bottom:15px}.caldera-grid .form-control,.caldera-grid output{font-size:14px;line-height:1.42857143;color:#555;display:block}.caldera-grid input[type=file]{display:block}.caldera-grid input[type=range]{display:block;width:100%}.caldera-grid select[multiple],.caldera-grid select[size]{height:auto}.caldera-grid input[type=checkbox]:focus,.caldera-grid input[type=file]:focus,.caldera-grid input[type=radio]:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.caldera-grid input[type=checkbox]{-webkit-appearance:checkbox}.caldera-grid input[type=radio]{-webkit-appearance:radio}.caldera-grid output{padding-top:7px}.caldera-grid .form-control{width:100%;height:34px;padding:6px 12px;background-color:#fff;border:1px solid #ccc;border-radius:2px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.caldera-grid .form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.caldera-grid .form-control::-moz-placeholder{color:#999;opacity:1}.caldera-grid .form-control:-ms-input-placeholder{color:#999}.caldera-grid .form-control::-webkit-input-placeholder{color:#999}.caldera-grid .form-control[disabled],.caldera-grid .form-control[readonly],fieldset[disabled] .caldera-grid .form-control{background-color:#eee;opacity:1}.caldera-grid .form-control[disabled],fieldset[disabled] .caldera-grid .form-control{cursor:not-allowed}textarea .caldera-grid .form-control{height:auto}@media screen and (-webkit-min-device-pixel-ratio:0){.caldera-grid input[type=date],.caldera-grid input[type=datetime-local],.caldera-grid input[type=month],.caldera-grid input[type=time]{line-height:34px}.caldera-grid input[type=date].input-sm,.caldera-grid input[type=datetime-local].input-sm,.caldera-grid input[type=month].input-sm,.caldera-grid input[type=time].input-sm,.input-group-sm .caldera-grid input[type=date],.input-group-sm .caldera-grid input[type=datetime-local],.input-group-sm .caldera-grid input[type=month],.input-group-sm .caldera-grid input[type=time]{line-height:30px}.caldera-grid input[type=date].input-lg,.caldera-grid input[type=datetime-local].input-lg,.caldera-grid input[type=month].input-lg,.caldera-grid input[type=time].input-lg,.input-group-lg .caldera-grid input[type=date],.input-group-lg .caldera-grid input[type=datetime-local],.input-group-lg .caldera-grid input[type=month],.input-group-lg .caldera-grid input[type=time]{line-height:46px}}.caldera-grid .checkbox,.caldera-grid .radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.caldera-grid .checkbox label,.caldera-grid .radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.caldera-grid .checkbox input[type=checkbox],.caldera-grid .checkbox-inline input[type=checkbox],.caldera-grid .radio input[type=radio],.caldera-grid .radio-inline input[type=radio]{margin-left:-20px}.caldera-grid .checkbox+.checkbox,.caldera-grid .radio+.radio{margin-top:-5px}.caldera-grid .checkbox-inline,.caldera-grid .radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer}.caldera-grid .checkbox-inline+.checkbox-inline,.caldera-grid .radio-inline+.radio-inline{margin-top:0;margin-left:10px}.caldera-grid .btn-block+.btn-block,.caldera-grid .help-block,.cf-toggle-switch .btn-block+.btn-block{margin-top:5px}.caldera-grid .checkbox-inline.disabled,.caldera-grid .checkbox.disabled label,.caldera-grid .radio-inline.disabled,.caldera-grid .radio.disabled label,.caldera-grid input[type=checkbox].disabled,.caldera-grid input[type=checkbox][disabled],.caldera-grid input[type=radio].disabled,.caldera-grid input[type=radio][disabled],fieldset[disabled] .caldera-grid .checkbox label,fieldset[disabled] .caldera-grid .checkbox-inline,fieldset[disabled] .caldera-grid .radio label,fieldset[disabled] .caldera-grid .radio-inline,fieldset[disabled] .caldera-grid input[type=checkbox],fieldset[disabled] .caldera-grid input[type=radio]{cursor:not-allowed}.caldera-grid .form-control-static{padding-top:7px;padding-bottom:7px;margin-bottom:0;min-height:34px}.caldera-grid .form-control-static.input-lg,.caldera-grid .form-control-static.input-sm{padding-left:0;padding-right:0}.caldera-grid .input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:1px}select.caldera-grid .input-sm{height:30px;line-height:30px}select[multiple].caldera-grid .input-sm,textarea.caldera-grid .input-sm{height:auto}.caldera-grid .form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:1px}select.caldera-grid .form-group-sm .form-control{height:30px;line-height:30px}select[multiple].caldera-grid .form-group-sm .form-control,textarea.caldera-grid .form-group-sm .form-control{height:auto}.caldera-grid .form-group-sm .form-control-static{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;min-height:32px}.caldera-grid .input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:4px}select.caldera-grid .input-lg{height:46px;line-height:46px}select[multiple].caldera-grid .input-lg,textarea.caldera-grid .input-lg{height:auto}.caldera-grid .form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:4px}select.caldera-grid .form-group-lg .form-control{height:46px;line-height:46px}select[multiple].caldera-grid .form-group-lg .form-control,textarea.caldera-grid .form-group-lg .form-control{height:auto}.caldera-grid .form-group-lg .form-control-static{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;min-height:38px}.caldera-grid .has-feedback{position:relative}.caldera-grid .has-feedback .form-control{padding-right:42.5px}.caldera-grid .form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.caldera-grid .input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.caldera-grid .input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.caldera-grid .has-success .checkbox,.caldera-grid .has-success .checkbox-inline,.caldera-grid .has-success .control-label,.caldera-grid .has-success .help-block,.caldera-grid .has-success .radio,.caldera-grid .has-success .radio-inline,.caldera-grid .has-success.checkbox label,.caldera-grid .has-success.checkbox-inline label,.caldera-grid .has-success.radio label,.caldera-grid .has-success.radio-inline label{color:#3c763d}.caldera-grid .has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.caldera-grid .has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.caldera-grid .has-success .input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.caldera-grid .has-success .form-control-feedback{color:#3c763d}.caldera-grid .has-warning .checkbox,.caldera-grid .has-warning .checkbox-inline,.caldera-grid .has-warning .control-label,.caldera-grid .has-warning .help-block,.caldera-grid .has-warning .radio,.caldera-grid .has-warning .radio-inline,.caldera-grid .has-warning.checkbox label,.caldera-grid .has-warning.checkbox-inline label,.caldera-grid .has-warning.radio label,.caldera-grid .has-warning.radio-inline label{color:#8a6d3b}.caldera-grid .has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.caldera-grid .has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.caldera-grid .has-warning .input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.caldera-grid .has-warning .form-control-feedback{color:#8a6d3b}.caldera-grid .has-error .checkbox,.caldera-grid .has-error .checkbox-inline,.caldera-grid .has-error .control-label,.caldera-grid .has-error .help-block,.caldera-grid .has-error .radio,.caldera-grid .has-error .radio-inline,.caldera-grid .has-error.checkbox label,.caldera-grid .has-error.checkbox-inline label,.caldera-grid .has-error.radio label,.caldera-grid .has-error.radio-inline label{color:#a94442}.caldera-grid .has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.caldera-grid .has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.caldera-grid .has-error .input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.caldera-grid .has-error .form-control-feedback{color:#a94442}.caldera-grid .has-feedback label~.form-control-feedback{top:25px}.caldera-grid .has-feedback label.sr-only~.form-control-feedback{top:0}.caldera-grid .help-block{display:block;margin-bottom:10px;color:#737373}@media (min-width:768px){.caldera-grid .form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.caldera-grid .form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.caldera-grid .form-inline .form-control-static{display:inline-block}.caldera-grid .form-inline .input-group{display:inline-table;vertical-align:middle}.caldera-grid .form-inline .input-group .form-control,.caldera-grid .form-inline .input-group .input-group-addon,.caldera-grid .form-inline .input-group .input-group-btn{width:auto}.caldera-grid .form-inline .input-group>.form-control{width:100%}.caldera-grid .form-inline .control-label{margin-bottom:0;vertical-align:middle}.caldera-grid .form-inline .checkbox,.caldera-grid .form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.caldera-grid .form-inline .checkbox label,.caldera-grid .form-inline .radio label{padding-left:0}.caldera-grid .form-inline .checkbox input[type=checkbox],.caldera-grid .form-inline .radio input[type=radio]{position:relative;margin-left:0}.caldera-grid .form-inline .has-feedback .form-control-feedback{top:0}.caldera-grid .form-horizontal .control-label{text-align:right;margin-bottom:0;padding-top:7px}}.caldera-grid .form-horizontal .checkbox,.caldera-grid .form-horizontal .checkbox-inline,.caldera-grid .form-horizontal .radio,.caldera-grid .form-horizontal .radio-inline{margin-top:0;margin-bottom:0;padding-top:7px}.caldera-grid .form-horizontal .checkbox,.caldera-grid .form-horizontal .radio{min-height:27px}.caldera-grid .form-horizontal .form-group{margin-left:-15px;margin-right:-15px}.caldera-grid .form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.caldera-grid .form-horizontal .form-group-lg .control-label{padding-top:14.33px}.caldera-grid .form-horizontal .form-group-sm .control-label{padding-top:6px}}.caldera-grid .btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:2px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.caldera-grid .btn.active.focus,.caldera-grid .btn.active:focus,.caldera-grid .btn.focus,.caldera-grid .btn:active.focus,.caldera-grid .btn:active:focus,.caldera-grid .btn:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.caldera-grid .btn.focus,.caldera-grid .btn:focus,.caldera-grid .btn:hover{color:#333;text-decoration:none}.caldera-grid .btn.active,.caldera-grid .btn:active{outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.caldera-grid .btn.disabled,.caldera-grid .btn[disabled],fieldset[disabled] .caldera-grid .btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.caldera-grid .btn-default{color:#333;background-color:#fff;border-color:#ccc}.caldera-grid .btn-default.active,.caldera-grid .btn-default.focus,.caldera-grid .btn-default:active,.caldera-grid .btn-default:focus,.caldera-grid .btn-default:hover,.open>.dropdown-toggle.caldera-grid .btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.caldera-grid .btn-default.disabled,.caldera-grid .btn-default.disabled.active,.caldera-grid .btn-default.disabled.focus,.caldera-grid .btn-default.disabled:active,.caldera-grid .btn-default.disabled:focus,.caldera-grid .btn-default.disabled:hover,.caldera-grid .btn-default[disabled],.caldera-grid .btn-default[disabled].active,.caldera-grid .btn-default[disabled].focus,.caldera-grid .btn-default[disabled]:active,.caldera-grid .btn-default[disabled]:focus,.caldera-grid .btn-default[disabled]:hover,fieldset[disabled] .caldera-grid .btn-default,fieldset[disabled] .caldera-grid .btn-default.active,fieldset[disabled] .caldera-grid .btn-default.focus,fieldset[disabled] .caldera-grid .btn-default:active,fieldset[disabled] .caldera-grid .btn-default:focus,fieldset[disabled] .caldera-grid .btn-default:hover{background-color:#fff;border-color:#ccc}.caldera-grid .btn-default .badge{color:#fff;background-color:#333}.caldera-grid .btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.caldera-grid .btn-primary.active,.caldera-grid .btn-primary.focus,.caldera-grid .btn-primary:active,.caldera-grid .btn-primary:focus,.caldera-grid .btn-primary:hover,.open>.dropdown-toggle.caldera-grid .btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.caldera-grid .btn-primary.disabled,.caldera-grid .btn-primary.disabled.active,.caldera-grid .btn-primary.disabled.focus,.caldera-grid .btn-primary.disabled:active,.caldera-grid .btn-primary.disabled:focus,.caldera-grid .btn-primary.disabled:hover,.caldera-grid .btn-primary[disabled],.caldera-grid .btn-primary[disabled].active,.caldera-grid .btn-primary[disabled].focus,.caldera-grid .btn-primary[disabled]:active,.caldera-grid .btn-primary[disabled]:focus,.caldera-grid .btn-primary[disabled]:hover,fieldset[disabled] .caldera-grid .btn-primary,fieldset[disabled] .caldera-grid .btn-primary.active,fieldset[disabled] .caldera-grid .btn-primary.focus,fieldset[disabled] .caldera-grid .btn-primary:active,fieldset[disabled] .caldera-grid .btn-primary:focus,fieldset[disabled] .caldera-grid .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.caldera-grid .btn-primary .badge{color:#337ab7;background-color:#fff}.caldera-grid .btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.caldera-grid .btn-success.active,.caldera-grid .btn-success.focus,.caldera-grid .btn-success:active,.caldera-grid .btn-success:focus,.caldera-grid .btn-success:hover,.open>.dropdown-toggle.caldera-grid .btn-success{color:#fff;background-color:#449d44;border-color:#398439}.caldera-grid .btn-success.disabled,.caldera-grid .btn-success.disabled.active,.caldera-grid .btn-success.disabled.focus,.caldera-grid .btn-success.disabled:active,.caldera-grid .btn-success.disabled:focus,.caldera-grid .btn-success.disabled:hover,.caldera-grid .btn-success[disabled],.caldera-grid .btn-success[disabled].active,.caldera-grid .btn-success[disabled].focus,.caldera-grid .btn-success[disabled]:active,.caldera-grid .btn-success[disabled]:focus,.caldera-grid .btn-success[disabled]:hover,fieldset[disabled] .caldera-grid .btn-success,fieldset[disabled] .caldera-grid .btn-success.active,fieldset[disabled] .caldera-grid .btn-success.focus,fieldset[disabled] .caldera-grid .btn-success:active,fieldset[disabled] .caldera-grid .btn-success:focus,fieldset[disabled] .caldera-grid .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.caldera-grid .btn-success .badge{color:#5cb85c;background-color:#fff}.caldera-grid .btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.caldera-grid .btn-info.active,.caldera-grid .btn-info.focus,.caldera-grid .btn-info:active,.caldera-grid .btn-info:focus,.caldera-grid .btn-info:hover,.open>.dropdown-toggle.caldera-grid .btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.caldera-grid .btn-info.disabled,.caldera-grid .btn-info.disabled.active,.caldera-grid .btn-info.disabled.focus,.caldera-grid .btn-info.disabled:active,.caldera-grid .btn-info.disabled:focus,.caldera-grid .btn-info.disabled:hover,.caldera-grid .btn-info[disabled],.caldera-grid .btn-info[disabled].active,.caldera-grid .btn-info[disabled].focus,.caldera-grid .btn-info[disabled]:active,.caldera-grid .btn-info[disabled]:focus,.caldera-grid .btn-info[disabled]:hover,fieldset[disabled] .caldera-grid .btn-info,fieldset[disabled] .caldera-grid .btn-info.active,fieldset[disabled] .caldera-grid .btn-info.focus,fieldset[disabled] .caldera-grid .btn-info:active,fieldset[disabled] .caldera-grid .btn-info:focus,fieldset[disabled] .caldera-grid .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.caldera-grid .btn-info .badge{color:#5bc0de;background-color:#fff}.caldera-grid .btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.caldera-grid .btn-warning.active,.caldera-grid .btn-warning.focus,.caldera-grid .btn-warning:active,.caldera-grid .btn-warning:focus,.caldera-grid .btn-warning:hover,.open>.dropdown-toggle.caldera-grid .btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.caldera-grid .btn-warning.disabled,.caldera-grid .btn-warning.disabled.active,.caldera-grid .btn-warning.disabled.focus,.caldera-grid .btn-warning.disabled:active,.caldera-grid .btn-warning.disabled:focus,.caldera-grid .btn-warning.disabled:hover,.caldera-grid .btn-warning[disabled],.caldera-grid .btn-warning[disabled].active,.caldera-grid .btn-warning[disabled].focus,.caldera-grid .btn-warning[disabled]:active,.caldera-grid .btn-warning[disabled]:focus,.caldera-grid .btn-warning[disabled]:hover,fieldset[disabled] .caldera-grid .btn-warning,fieldset[disabled] .caldera-grid .btn-warning.active,fieldset[disabled] .caldera-grid .btn-warning.focus,fieldset[disabled] .caldera-grid .btn-warning:active,fieldset[disabled] .caldera-grid .btn-warning:focus,fieldset[disabled] .caldera-grid .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.caldera-grid .btn-warning .badge{color:#f0ad4e;background-color:#fff}.caldera-grid .btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.caldera-grid .btn-danger.active,.caldera-grid .btn-danger.focus,.caldera-grid .btn-danger:active,.caldera-grid .btn-danger:focus,.caldera-grid .btn-danger:hover,.open>.dropdown-toggle.caldera-grid .btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.caldera-grid .btn-danger.disabled,.caldera-grid .btn-danger.disabled.active,.caldera-grid .btn-danger.disabled.focus,.caldera-grid .btn-danger.disabled:active,.caldera-grid .btn-danger.disabled:focus,.caldera-grid .btn-danger.disabled:hover,.caldera-grid .btn-danger[disabled],.caldera-grid .btn-danger[disabled].active,.caldera-grid .btn-danger[disabled].focus,.caldera-grid .btn-danger[disabled]:active,.caldera-grid .btn-danger[disabled]:focus,.caldera-grid .btn-danger[disabled]:hover,fieldset[disabled] .caldera-grid .btn-danger,fieldset[disabled] .caldera-grid .btn-danger.active,fieldset[disabled] .caldera-grid .btn-danger.focus,fieldset[disabled] .caldera-grid .btn-danger:active,fieldset[disabled] .caldera-grid .btn-danger:focus,fieldset[disabled] .caldera-grid .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.caldera-grid .btn-danger .badge{color:#d9534f;background-color:#fff}.caldera-grid .btn-link{color:#337ab7;font-weight:400;border-radius:0}.caldera-grid .btn-link,.caldera-grid .btn-link.active,.caldera-grid .btn-link:active,.caldera-grid .btn-link[disabled],fieldset[disabled] .caldera-grid .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.caldera-grid .btn-link,.caldera-grid .btn-link:active,.caldera-grid .btn-link:focus,.caldera-grid .btn-link:hover{border-color:transparent}.caldera-grid .btn-link:focus,.caldera-grid .btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.caldera-grid .btn-link[disabled]:focus,.caldera-grid .btn-link[disabled]:hover,fieldset[disabled] .caldera-grid .btn-link:focus,fieldset[disabled] .caldera-grid .btn-link:hover{color:#777;text-decoration:none}.caldera-grid .btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:4px}.caldera-grid .btn-sm,.caldera-grid .btn-xs{font-size:12px;line-height:1.5;border-radius:1px}.caldera-grid .btn-sm{padding:5px 10px}.caldera-grid .btn-xs{padding:1px 5px}.caldera-grid .btn-block{display:block;width:100%}.caldera-grid input[type=button].btn-block,.caldera-grid input[type=reset].btn-block,.caldera-grid input[type=submit].btn-block{width:100%}.caldera-grid textarea.form-control{padding-right:4px;height:auto}.caldera-grid .breadcrumb{padding:6px 12px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.caldera-grid .breadcrumb>li{display:inline-block;margin:0}.caldera-grid .breadcrumb>li+li:before{content:"/\00a0";padding:0 5px;color:#ccc}.caldera-grid .breadcrumb>.active,.caldera-grid .breadcrumb>.active>a{color:#777}.breadcrumb>li.active.error>a,.breadcrumb>li.error>a{color:red}.caldera-grid .cf-credit-card{padding-left:42px;background-image:url(../images/credit-card.svg);background-repeat:no-repeat!important;background-position-x:4px!important;background-position-y:3px!important}.caldera-grid .screen-reader-text{clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;position:absolute!important;width:1px;word-wrap:normal!important}p.caldera-forms-consent-field-agreement{display:inline}@font-face{font-family:cf-raty;src:url(fonts/cf-raty.eot?40481674);src:url(fonts/cf-raty.eot?40481674#iefix) format('embedded-opentype'),url(fonts/cf-raty.woff?40481674) format('woff'),url(fonts/cf-raty.ttf?40481674) format('truetype'),url(fonts/cf-raty.svg?40481674#cf-raty) format('svg');font-weight:400;font-style:normal}[class*=" raty-"]:before,[class^=raty-]:before{font-family:cf-raty;font-style:normal;font-weight:400;speak:none;font-size:2em;display:inline-block;text-decoration:inherit;width:1em;text-align:center;font-variant:normal;text-transform:none;line-height:1em}.raty-heart-on:before{content:'\e800'}.raty-heart-off:before{content:'\e801'}.raty-star-on:before{content:'\e802'}.raty-star-off:before{content:'\e803'}.raty-circle-on:before{content:'\e804'}.raty-circle-off:before{content:'\e805'}.raty-dot-off:before{content:'\e806'}.raty-dot-on:before{content:'\e807'}.raty-face-off:before{content:'\e808'}.raty-face-on:before{content:'\e809'}.raty-cancel-off:before{content:'\e80a'}.raty-cancel-on:before{content:'\e80b'}.calculation-group{background:#FFF;box-shadow:0 1px 2px rgba(0,0,0,.05);padding:6px;margin:6px 0}.cf-color-picker .input-group-btn:last-child>.btn,.cf-color-picker .input-group-btn:last-child>.btn-group,.cf-color-picker .input-group-btn>.btn+.btn,.cf-toggle-switch .btn-group .btn+.btn,.cf-toggle-switch .btn-group .btn+.btn-group,.cf-toggle-switch .btn-group .btn-group+.btn,.cf-toggle-switch .btn-group .btn-group+.btn-group,.preview-color-selector{margin-left:-1px}.preview-color-selector{background:#F0F0F0;border:1px solid #E2E2E2;display:inline;padding:3px 12px;box-shadow:0 0 0 2px #fff inset}.miniColors-trigger{border:1px solid #999;-mz-border-radius:0 1px 1px 0;-webkit-border-radius:0 1px 1px 0;display:inline-block;height:24px;margin:0 0 -8px -1px;width:30px}.miniColors-selector{background:#FFF;border:1px solid #999;-moz-box-shadow:0 3px 0 -1px rgba(0,0,0,.05);-webkit-box-shadow:0 3px 0 -1px rgba(0,0,0,.05);box-shadow:0 3px 0 -1px rgba(0,0,0,.05);height:162px;padding:5px;position:absolute;width:187px;z-index:999999;margin-top:-1px}.miniColors-colors,.miniColors-hues{top:5px;height:150px;cursor:crosshair;position:absolute}.miniColors-selector.black{background:#000;border-color:#000}.miniColors-colors{left:5px;width:150px;background:url(minicolor-colors.png) right no-repeat}.miniColors-hues{left:160px;width:20px;background:url(minicolor-colors.png) left no-repeat}.miniColors-colorPicker{position:absolute;width:9px;height:9px;border:1px solid #fff;-moz-border-radius:11px;-webkit-border-radius:11px;border-radius:11px}.miniColors-colorPicker-inner{position:absolute;top:0;left:0;width:7px;height:7px;border:1px solid #000;-moz-border-radius:9px;-webkit-border-radius:9px;border-radius:9px}.miniColors-huePicker{position:absolute;left:-3px;width:24px;height:1px;border:1px solid #fff;border-radius:2px;background:#000}.cf-color-picker .form-control::-moz-placeholder{color:#999;opacity:1}.cf-color-picker .form-control:-ms-input-placeholder{color:#999}.cf-color-picker .form-control::-webkit-input-placeholder{color:#999}.cf-color-picker .form-control[disabled],.cf-color-picker .form-control[readonly],.cf-color-picker fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}.cf-color-picker .input-group{position:relative;display:table;border-collapse:separate;max-width:120px}.cf-color-picker .input-group[class*=col-]{float:none;padding-left:0;padding-right:0}.cf-color-picker .input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.cf-color-picker .input-group-lg>.form-control,.cf-color-picker .input-group-lg>.input-group-addon,.cf-color-picker .input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.cf-color-picker .input-group-sm>.form-control,.cf-color-picker .input-group-sm>.input-group-addon,.cf-color-picker .input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.cf-color-picker .input-group .form-control,.cf-color-picker .input-group-addon,.cf-color-picker .input-group-btn{display:table-cell}.cf-color-picker .input-group .form-control:not(:first-child):not(:last-child),.cf-color-picker .input-group-addon:not(:first-child):not(:last-child),.cf-color-picker .input-group-btn:not(:first-child):not(:last-child){border-radius:0}.cf-color-picker .input-group-addon,.cf-color-picker .input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.cf-color-picker .input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.cf-color-picker .text-hide,.table-striped .cfdatepicker table tr td,.table-striped .cfdatepicker table tr th{background-color:transparent}.cf-color-picker .input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.cf-color-picker .input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.cf-color-picker .input-group .form-control:first-child,.cf-color-picker .input-group-addon:first-child,.cf-color-picker .input-group-btn:first-child>.btn,.cf-color-picker .input-group-btn:first-child>.btn-group>.btn,.cf-color-picker .input-group-btn:first-child>.dropdown-toggle,.cf-color-picker .input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.cf-color-picker .input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.cf-color-picker .input-group-addon:first-child{border-right:0}.cf-color-picker .input-group .form-control:last-child,.cf-color-picker .input-group-addon:last-child,.cf-color-picker .input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.cf-color-picker .input-group-btn:first-child>.btn:not(:first-child),.cf-color-picker .input-group-btn:last-child>.btn,.cf-color-picker .input-group-btn:last-child>.btn-group>.btn,.cf-color-picker .input-group-btn:last-child>.dropdown-toggle{border-bottom-left-radius:0;border-top-left-radius:0}.cf-color-picker .input-group-addon:last-child{border-left:0}.cf-color-picker .input-group-btn{position:relative;font-size:0;white-space:nowrap}.cf-color-picker .input-group-btn>.btn{position:relative}.cf-color-picker .input-group-btn>.btn:active,.cf-color-picker .input-group-btn>.btn:focus,.cf-color-picker .input-group-btn>.btn:hover{z-index:2}.cf-color-picker .input-group-btn:first-child>.btn,.cf-color-picker .input-group-btn:first-child>.btn-group{margin-right:-1px}.cf-color-picker .clearfix:after,.cf-color-picker .clearfix:before,.cf-color-picker .form-horizontal .form-group:after,.cf-color-picker .form-horizontal .form-group:before{content:" ";display:table}.cfdatepicker-dropdown:after,.cfdatepicker-dropdown:before{content:'';position:absolute;display:inline-block}.cf-color-picker .clearfix:after,.cf-color-picker .form-horizontal .form-group:after{clear:both}.cf-color-picker .center-block{display:block;margin-left:auto;margin-right:auto}.cf-color-picker .pull-right{float:right!important}.cf-color-picker .pull-left{float:left!important}.cf-color-picker .hide{display:none!important}.cf-color-picker .show{display:block!important}.cf-color-picker .invisible{visibility:hidden}.cf-color-picker .text-hide{font:0/0 a;color:transparent;text-shadow:none;border:0}.cf-color-picker .hidden{display:none!important;visibility:hidden!important}.cf-color-picker .affix{position:fixed}@-ms-viewport{width:device-width}.cf-color-picker .visible-lg,.cf-color-picker .visible-md,.cf-color-picker .visible-print,.cf-color-picker .visible-sm,.cf-color-picker .visible-xs{display:none!important}@media (max-width:767px){.cf-color-picker .visible-xs{display:block!important}.cf-color-picker table.visible-xs{display:table}.cf-color-picker tr.visible-xs{display:table-row!important}.cf-color-picker td.visible-xs,.cf-color-picker th.visible-xs{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.cf-color-picker .visible-sm{display:block!important}.cf-color-picker table.visible-sm{display:table}.cf-color-picker tr.visible-sm{display:table-row!important}.cf-color-picker td.visible-sm,.cf-color-picker th.visible-sm{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.cf-color-picker .visible-md{display:block!important}.cf-color-picker table.visible-md{display:table}.cf-color-picker tr.visible-md{display:table-row!important}.cf-color-picker td.visible-md,.cf-color-picker th.visible-md{display:table-cell!important}}@media (min-width:1200px){.cf-color-picker .visible-lg{display:block!important}.cf-color-picker table.visible-lg{display:table}.cf-color-picker tr.visible-lg{display:table-row!important}.cf-color-picker td.visible-lg,.cf-color-picker th.visible-lg{display:table-cell!important}.cf-color-picker .hidden-lg{display:none!important}}@media (max-width:767px){.cf-color-picker .hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.cf-color-picker .hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.cf-color-picker .hidden-md{display:none!important}}@media print{.cf-color-picker .visible-print{display:block!important}.cf-color-picker table.visible-print{display:table}.cf-color-picker tr.visible-print{display:table-row!important}.cf-color-picker td.visible-print,.cf-color-picker th.visible-print{display:table-cell!important}.cf-color-picker .hidden-print{display:none!important}}.cfdatepicker{padding:4px;border-radius:4px;direction:ltr}.cfdatepicker-inline{width:220px}.cfdatepicker.cfdatepicker-rtl{direction:rtl}.cfdatepicker.cfdatepicker-rtl table tr td span{float:right}.cfdatepicker-dropdown{top:0;left:0}.cfdatepicker-dropdown:before{border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-top:0;border-bottom-color:rgba(0,0,0,.2)}.cfdatepicker-dropdown:after{border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;border-top:0}.cfdatepicker-dropdown.cfdatepicker-orient-left:before{left:6px}.cfdatepicker-dropdown.cfdatepicker-orient-left:after{left:7px}.cfdatepicker-dropdown.cfdatepicker-orient-right:before{right:6px}.cfdatepicker-dropdown.cfdatepicker-orient-right:after{right:7px}.cfdatepicker-dropdown.cfdatepicker-orient-top:before{top:-7px}.cfdatepicker-dropdown.cfdatepicker-orient-top:after{top:-6px}.cfdatepicker-dropdown.cfdatepicker-orient-bottom:before{bottom:-7px;border-bottom:0;border-top:7px solid #999}.cfdatepicker-dropdown.cfdatepicker-orient-bottom:after{bottom:-6px;border-bottom:0;border-top:6px solid #fff}.cfdatepicker>div{display:none}.cfdatepicker.days div.cfdatepicker-days,.cfdatepicker.months div.cfdatepicker-months,.cfdatepicker.years div.cfdatepicker-years{display:block}.cfdatepicker table{border:0;width:auto;margin:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.cfdatepicker table tr td,.cfdatepicker table tr th{text-align:center;width:10px;height:10px;border-radius:4px;border:none}.cfdatepicker table tr td.day.focused,.cfdatepicker table tr td.day:hover{background:#eee;cursor:pointer}.cfdatepicker table tr td.new,.cfdatepicker table tr td.old{color:#999}.cfdatepicker table tr td.disabled,.cfdatepicker table tr td.disabled:hover{background:0 0;color:#999;cursor:default}.cfdatepicker table tr td.today,.cfdatepicker table tr td.today.disabled,.cfdatepicker table tr td.today.disabled:hover,.cfdatepicker table tr td.today:hover{color:#000;background-color:#ffdb99;border-color:#ffb733}.cfdatepicker table tr td.today.active,.cfdatepicker table tr td.today.disabled.active,.cfdatepicker table tr td.today.disabled:active,.cfdatepicker table tr td.today.disabled:focus,.cfdatepicker table tr td.today.disabled:hover,.cfdatepicker table tr td.today.disabled:hover.active,.cfdatepicker table tr td.today.disabled:hover:active,.cfdatepicker table tr td.today.disabled:hover:focus,.cfdatepicker table tr td.today.disabled:hover:hover,.cfdatepicker table tr td.today:active,.cfdatepicker table tr td.today:focus,.cfdatepicker table tr td.today:hover,.cfdatepicker table tr td.today:hover.active,.cfdatepicker table tr td.today:hover:active,.cfdatepicker table tr td.today:hover:focus,.cfdatepicker table tr td.today:hover:hover,.open .dropdown-toggle.cfdatepicker table tr td.today,.open .dropdown-toggle.cfdatepicker table tr td.today.disabled,.open .dropdown-toggle.cfdatepicker table tr td.today.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td.today:hover{color:#000;background-color:#ffcd70;border-color:#f59e00}.cfdatepicker table tr td.today.active,.cfdatepicker table tr td.today.disabled.active,.cfdatepicker table tr td.today.disabled:active,.cfdatepicker table tr td.today.disabled:hover.active,.cfdatepicker table tr td.today.disabled:hover:active,.cfdatepicker table tr td.today:active,.cfdatepicker table tr td.today:hover.active,.cfdatepicker table tr td.today:hover:active,.open .dropdown-toggle.cfdatepicker table tr td.today,.open .dropdown-toggle.cfdatepicker table tr td.today.disabled,.open .dropdown-toggle.cfdatepicker table tr td.today.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td.today:hover{background-image:none}.cfdatepicker table tr td.today.disabled,.cfdatepicker table tr td.today.disabled.active,.cfdatepicker table tr td.today.disabled.disabled,.cfdatepicker table tr td.today.disabled.disabled.active,.cfdatepicker table tr td.today.disabled.disabled:active,.cfdatepicker table tr td.today.disabled.disabled:focus,.cfdatepicker table tr td.today.disabled.disabled:hover,.cfdatepicker table tr td.today.disabled:active,.cfdatepicker table tr td.today.disabled:focus,.cfdatepicker table tr td.today.disabled:hover,.cfdatepicker table tr td.today.disabled:hover.disabled,.cfdatepicker table tr td.today.disabled:hover.disabled.active,.cfdatepicker table tr td.today.disabled:hover.disabled:active,.cfdatepicker table tr td.today.disabled:hover.disabled:focus,.cfdatepicker table tr td.today.disabled:hover.disabled:hover,.cfdatepicker table tr td.today.disabled:hover[disabled],.cfdatepicker table tr td.today.disabled:hover[disabled].active,.cfdatepicker table tr td.today.disabled:hover[disabled]:active,.cfdatepicker table tr td.today.disabled:hover[disabled]:focus,.cfdatepicker table tr td.today.disabled:hover[disabled]:hover,.cfdatepicker table tr td.today.disabled[disabled],.cfdatepicker table tr td.today.disabled[disabled].active,.cfdatepicker table tr td.today.disabled[disabled]:active,.cfdatepicker table tr td.today.disabled[disabled]:focus,.cfdatepicker table tr td.today.disabled[disabled]:hover,.cfdatepicker table tr td.today:hover.disabled,.cfdatepicker table tr td.today:hover.disabled.active,.cfdatepicker table tr td.today:hover.disabled:active,.cfdatepicker table tr td.today:hover.disabled:focus,.cfdatepicker table tr td.today:hover.disabled:hover,.cfdatepicker table tr td.today:hover[disabled],.cfdatepicker table tr td.today:hover[disabled].active,.cfdatepicker table tr td.today:hover[disabled]:active,.cfdatepicker table tr td.today:hover[disabled]:focus,.cfdatepicker table tr td.today:hover[disabled]:hover,.cfdatepicker table tr td.today[disabled],.cfdatepicker table tr td.today[disabled].active,.cfdatepicker table tr td.today[disabled]:active,.cfdatepicker table tr td.today[disabled]:focus,.cfdatepicker table tr td.today[disabled]:hover,fieldset[disabled] .cfdatepicker table tr td.today,fieldset[disabled] .cfdatepicker table tr td.today.active,fieldset[disabled] .cfdatepicker table tr td.today.disabled,fieldset[disabled] .cfdatepicker table tr td.today.disabled.active,fieldset[disabled] .cfdatepicker table tr td.today.disabled:active,fieldset[disabled] .cfdatepicker table tr td.today.disabled:focus,fieldset[disabled] .cfdatepicker table tr td.today.disabled:hover,fieldset[disabled] .cfdatepicker table tr td.today.disabled:hover.active,fieldset[disabled] .cfdatepicker table tr td.today.disabled:hover:active,fieldset[disabled] .cfdatepicker table tr td.today.disabled:hover:focus,fieldset[disabled] .cfdatepicker table tr td.today.disabled:hover:hover,fieldset[disabled] .cfdatepicker table tr td.today:active,fieldset[disabled] .cfdatepicker table tr td.today:focus,fieldset[disabled] .cfdatepicker table tr td.today:hover,fieldset[disabled] .cfdatepicker table tr td.today:hover.active,fieldset[disabled] .cfdatepicker table tr td.today:hover:active,fieldset[disabled] .cfdatepicker table tr td.today:hover:focus,fieldset[disabled] .cfdatepicker table tr td.today:hover:hover{background-color:#ffdb99;border-color:#ffb733}.cfdatepicker table tr td.today:hover:hover{color:#000}.cfdatepicker table tr td.today.active:hover{color:#fff}.cfdatepicker table tr td.range,.cfdatepicker table tr td.range.disabled,.cfdatepicker table tr td.range.disabled:hover,.cfdatepicker table tr td.range:hover{background:#eee;border-radius:0}.cfdatepicker table tr td.active.active,.cfdatepicker table tr td.active.disabled.active,.cfdatepicker table tr td.active.disabled:active,.cfdatepicker table tr td.active.disabled:hover.active,.cfdatepicker table tr td.active.disabled:hover:active,.cfdatepicker table tr td.active:active,.cfdatepicker table tr td.active:hover.active,.cfdatepicker table tr td.active:hover:active,.cfdatepicker table tr td.range.today.active,.cfdatepicker table tr td.range.today.disabled.active,.cfdatepicker table tr td.range.today.disabled:active,.cfdatepicker table tr td.range.today.disabled:hover.active,.cfdatepicker table tr td.range.today.disabled:hover:active,.cfdatepicker table tr td.range.today:active,.cfdatepicker table tr td.range.today:hover.active,.cfdatepicker table tr td.range.today:hover:active,.cfdatepicker table tr td.selected.active,.cfdatepicker table tr td.selected.disabled.active,.cfdatepicker table tr td.selected.disabled:active,.cfdatepicker table tr td.selected.disabled:hover.active,.cfdatepicker table tr td.selected.disabled:hover:active,.cfdatepicker table tr td.selected:active,.cfdatepicker table tr td.selected:hover.active,.cfdatepicker table tr td.selected:hover:active,.open .dropdown-toggle.cfdatepicker table tr td.active,.open .dropdown-toggle.cfdatepicker table tr td.active.disabled,.open .dropdown-toggle.cfdatepicker table tr td.active.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td.active:hover,.open .dropdown-toggle.cfdatepicker table tr td.range.today,.open .dropdown-toggle.cfdatepicker table tr td.range.today.disabled,.open .dropdown-toggle.cfdatepicker table tr td.range.today.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td.range.today:hover,.open .dropdown-toggle.cfdatepicker table tr td.selected,.open .dropdown-toggle.cfdatepicker table tr td.selected.disabled,.open .dropdown-toggle.cfdatepicker table tr td.selected.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td.selected:hover{background-image:none}.cfdatepicker table tr td.range.today,.cfdatepicker table tr td.range.today.disabled,.cfdatepicker table tr td.range.today.disabled:hover,.cfdatepicker table tr td.range.today:hover{color:#000;background-color:#f7ca77;border-color:#f1a417;border-radius:0}.cfdatepicker table tr td.range.today.active,.cfdatepicker table tr td.range.today.disabled.active,.cfdatepicker table tr td.range.today.disabled:active,.cfdatepicker table tr td.range.today.disabled:focus,.cfdatepicker table tr td.range.today.disabled:hover,.cfdatepicker table tr td.range.today.disabled:hover.active,.cfdatepicker table tr td.range.today.disabled:hover:active,.cfdatepicker table tr td.range.today.disabled:hover:focus,.cfdatepicker table tr td.range.today.disabled:hover:hover,.cfdatepicker table tr td.range.today:active,.cfdatepicker table tr td.range.today:focus,.cfdatepicker table tr td.range.today:hover,.cfdatepicker table tr td.range.today:hover.active,.cfdatepicker table tr td.range.today:hover:active,.cfdatepicker table tr td.range.today:hover:focus,.cfdatepicker table tr td.range.today:hover:hover,.open .dropdown-toggle.cfdatepicker table tr td.range.today,.open .dropdown-toggle.cfdatepicker table tr td.range.today.disabled,.open .dropdown-toggle.cfdatepicker table tr td.range.today.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td.range.today:hover{color:#000;background-color:#f4bb51;border-color:#bf800c}.cfdatepicker table tr td.range.today.disabled,.cfdatepicker table tr td.range.today.disabled.active,.cfdatepicker table tr td.range.today.disabled.disabled,.cfdatepicker table tr td.range.today.disabled.disabled.active,.cfdatepicker table tr td.range.today.disabled.disabled:active,.cfdatepicker table tr td.range.today.disabled.disabled:focus,.cfdatepicker table tr td.range.today.disabled.disabled:hover,.cfdatepicker table tr td.range.today.disabled:active,.cfdatepicker table tr td.range.today.disabled:focus,.cfdatepicker table tr td.range.today.disabled:hover,.cfdatepicker table tr td.range.today.disabled:hover.disabled,.cfdatepicker table tr td.range.today.disabled:hover.disabled.active,.cfdatepicker table tr td.range.today.disabled:hover.disabled:active,.cfdatepicker table tr td.range.today.disabled:hover.disabled:focus,.cfdatepicker table tr td.range.today.disabled:hover.disabled:hover,.cfdatepicker table tr td.range.today.disabled:hover[disabled],.cfdatepicker table tr td.range.today.disabled:hover[disabled].active,.cfdatepicker table tr td.range.today.disabled:hover[disabled]:active,.cfdatepicker table tr td.range.today.disabled:hover[disabled]:focus,.cfdatepicker table tr td.range.today.disabled:hover[disabled]:hover,.cfdatepicker table tr td.range.today.disabled[disabled],.cfdatepicker table tr td.range.today.disabled[disabled].active,.cfdatepicker table tr td.range.today.disabled[disabled]:active,.cfdatepicker table tr td.range.today.disabled[disabled]:focus,.cfdatepicker table tr td.range.today.disabled[disabled]:hover,.cfdatepicker table tr td.range.today:hover.disabled,.cfdatepicker table tr td.range.today:hover.disabled.active,.cfdatepicker table tr td.range.today:hover.disabled:active,.cfdatepicker table tr td.range.today:hover.disabled:focus,.cfdatepicker table tr td.range.today:hover.disabled:hover,.cfdatepicker table tr td.range.today:hover[disabled],.cfdatepicker table tr td.range.today:hover[disabled].active,.cfdatepicker table tr td.range.today:hover[disabled]:active,.cfdatepicker table tr td.range.today:hover[disabled]:focus,.cfdatepicker table tr td.range.today:hover[disabled]:hover,.cfdatepicker table tr td.range.today[disabled],.cfdatepicker table tr td.range.today[disabled].active,.cfdatepicker table tr td.range.today[disabled]:active,.cfdatepicker table tr td.range.today[disabled]:focus,.cfdatepicker table tr td.range.today[disabled]:hover,fieldset[disabled] .cfdatepicker table tr td.range.today,fieldset[disabled] .cfdatepicker table tr td.range.today.active,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled.active,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled:active,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled:focus,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled:hover,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled:hover.active,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled:hover:active,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled:hover:focus,fieldset[disabled] .cfdatepicker table tr td.range.today.disabled:hover:hover,fieldset[disabled] .cfdatepicker table tr td.range.today:active,fieldset[disabled] .cfdatepicker table tr td.range.today:focus,fieldset[disabled] .cfdatepicker table tr td.range.today:hover,fieldset[disabled] .cfdatepicker table tr td.range.today:hover.active,fieldset[disabled] .cfdatepicker table tr td.range.today:hover:active,fieldset[disabled] .cfdatepicker table tr td.range.today:hover:focus,fieldset[disabled] .cfdatepicker table tr td.range.today:hover:hover{background-color:#f7ca77;border-color:#f1a417}.cfdatepicker table tr td.selected,.cfdatepicker table tr td.selected.disabled,.cfdatepicker table tr td.selected.disabled:hover,.cfdatepicker table tr td.selected:hover{color:#fff;background-color:#999;border-color:#555;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.cfdatepicker table tr td.selected.active,.cfdatepicker table tr td.selected.disabled.active,.cfdatepicker table tr td.selected.disabled:active,.cfdatepicker table tr td.selected.disabled:focus,.cfdatepicker table tr td.selected.disabled:hover,.cfdatepicker table tr td.selected.disabled:hover.active,.cfdatepicker table tr td.selected.disabled:hover:active,.cfdatepicker table tr td.selected.disabled:hover:focus,.cfdatepicker table tr td.selected.disabled:hover:hover,.cfdatepicker table tr td.selected:active,.cfdatepicker table tr td.selected:focus,.cfdatepicker table tr td.selected:hover,.cfdatepicker table tr td.selected:hover.active,.cfdatepicker table tr td.selected:hover:active,.cfdatepicker table tr td.selected:hover:focus,.cfdatepicker table tr td.selected:hover:hover,.open .dropdown-toggle.cfdatepicker table tr td.selected,.open .dropdown-toggle.cfdatepicker table tr td.selected.disabled,.open .dropdown-toggle.cfdatepicker table tr td.selected.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td.selected:hover{color:#fff;background-color:#858585;border-color:#373737}.cfdatepicker table tr td.selected.disabled,.cfdatepicker table tr td.selected.disabled.active,.cfdatepicker table tr td.selected.disabled.disabled,.cfdatepicker table tr td.selected.disabled.disabled.active,.cfdatepicker table tr td.selected.disabled.disabled:active,.cfdatepicker table tr td.selected.disabled.disabled:focus,.cfdatepicker table tr td.selected.disabled.disabled:hover,.cfdatepicker table tr td.selected.disabled:active,.cfdatepicker table tr td.selected.disabled:focus,.cfdatepicker table tr td.selected.disabled:hover,.cfdatepicker table tr td.selected.disabled:hover.disabled,.cfdatepicker table tr td.selected.disabled:hover.disabled.active,.cfdatepicker table tr td.selected.disabled:hover.disabled:active,.cfdatepicker table tr td.selected.disabled:hover.disabled:focus,.cfdatepicker table tr td.selected.disabled:hover.disabled:hover,.cfdatepicker table tr td.selected.disabled:hover[disabled],.cfdatepicker table tr td.selected.disabled:hover[disabled].active,.cfdatepicker table tr td.selected.disabled:hover[disabled]:active,.cfdatepicker table tr td.selected.disabled:hover[disabled]:focus,.cfdatepicker table tr td.selected.disabled:hover[disabled]:hover,.cfdatepicker table tr td.selected.disabled[disabled],.cfdatepicker table tr td.selected.disabled[disabled].active,.cfdatepicker table tr td.selected.disabled[disabled]:active,.cfdatepicker table tr td.selected.disabled[disabled]:focus,.cfdatepicker table tr td.selected.disabled[disabled]:hover,.cfdatepicker table tr td.selected:hover.disabled,.cfdatepicker table tr td.selected:hover.disabled.active,.cfdatepicker table tr td.selected:hover.disabled:active,.cfdatepicker table tr td.selected:hover.disabled:focus,.cfdatepicker table tr td.selected:hover.disabled:hover,.cfdatepicker table tr td.selected:hover[disabled],.cfdatepicker table tr td.selected:hover[disabled].active,.cfdatepicker table tr td.selected:hover[disabled]:active,.cfdatepicker table tr td.selected:hover[disabled]:focus,.cfdatepicker table tr td.selected:hover[disabled]:hover,.cfdatepicker table tr td.selected[disabled],.cfdatepicker table tr td.selected[disabled].active,.cfdatepicker table tr td.selected[disabled]:active,.cfdatepicker table tr td.selected[disabled]:focus,.cfdatepicker table tr td.selected[disabled]:hover,fieldset[disabled] .cfdatepicker table tr td.selected,fieldset[disabled] .cfdatepicker table tr td.selected.active,fieldset[disabled] .cfdatepicker table tr td.selected.disabled,fieldset[disabled] .cfdatepicker table tr td.selected.disabled.active,fieldset[disabled] .cfdatepicker table tr td.selected.disabled:active,fieldset[disabled] .cfdatepicker table tr td.selected.disabled:focus,fieldset[disabled] .cfdatepicker table tr td.selected.disabled:hover,fieldset[disabled] .cfdatepicker table tr td.selected.disabled:hover.active,fieldset[disabled] .cfdatepicker table tr td.selected.disabled:hover:active,fieldset[disabled] .cfdatepicker table tr td.selected.disabled:hover:focus,fieldset[disabled] .cfdatepicker table tr td.selected.disabled:hover:hover,fieldset[disabled] .cfdatepicker table tr td.selected:active,fieldset[disabled] .cfdatepicker table tr td.selected:focus,fieldset[disabled] .cfdatepicker table tr td.selected:hover,fieldset[disabled] .cfdatepicker table tr td.selected:hover.active,fieldset[disabled] .cfdatepicker table tr td.selected:hover:active,fieldset[disabled] .cfdatepicker table tr td.selected:hover:focus,fieldset[disabled] .cfdatepicker table tr td.selected:hover:hover{background-color:#999;border-color:#555}.cfdatepicker table tr td.active,.cfdatepicker table tr td.active.disabled,.cfdatepicker table tr td.active.disabled:hover,.cfdatepicker table tr td.active:hover{color:#fff;background-color:#428bca;border-color:#357ebd;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.cfdatepicker table tr td.active.active,.cfdatepicker table tr td.active.disabled.active,.cfdatepicker table tr td.active.disabled:active,.cfdatepicker table tr td.active.disabled:focus,.cfdatepicker table tr td.active.disabled:hover,.cfdatepicker table tr td.active.disabled:hover.active,.cfdatepicker table tr td.active.disabled:hover:active,.cfdatepicker table tr td.active.disabled:hover:focus,.cfdatepicker table tr td.active.disabled:hover:hover,.cfdatepicker table tr td.active:active,.cfdatepicker table tr td.active:focus,.cfdatepicker table tr td.active:hover,.cfdatepicker table tr td.active:hover.active,.cfdatepicker table tr td.active:hover:active,.cfdatepicker table tr td.active:hover:focus,.cfdatepicker table tr td.active:hover:hover,.open .dropdown-toggle.cfdatepicker table tr td.active,.open .dropdown-toggle.cfdatepicker table tr td.active.disabled,.open .dropdown-toggle.cfdatepicker table tr td.active.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td.active:hover{color:#fff;background-color:#3276b1;border-color:#285e8e}.cfdatepicker table tr td.active.disabled,.cfdatepicker table tr td.active.disabled.active,.cfdatepicker table tr td.active.disabled.disabled,.cfdatepicker table tr td.active.disabled.disabled.active,.cfdatepicker table tr td.active.disabled.disabled:active,.cfdatepicker table tr td.active.disabled.disabled:focus,.cfdatepicker table tr td.active.disabled.disabled:hover,.cfdatepicker table tr td.active.disabled:active,.cfdatepicker table tr td.active.disabled:focus,.cfdatepicker table tr td.active.disabled:hover,.cfdatepicker table tr td.active.disabled:hover.disabled,.cfdatepicker table tr td.active.disabled:hover.disabled.active,.cfdatepicker table tr td.active.disabled:hover.disabled:active,.cfdatepicker table tr td.active.disabled:hover.disabled:focus,.cfdatepicker table tr td.active.disabled:hover.disabled:hover,.cfdatepicker table tr td.active.disabled:hover[disabled],.cfdatepicker table tr td.active.disabled:hover[disabled].active,.cfdatepicker table tr td.active.disabled:hover[disabled]:active,.cfdatepicker table tr td.active.disabled:hover[disabled]:focus,.cfdatepicker table tr td.active.disabled:hover[disabled]:hover,.cfdatepicker table tr td.active.disabled[disabled],.cfdatepicker table tr td.active.disabled[disabled].active,.cfdatepicker table tr td.active.disabled[disabled]:active,.cfdatepicker table tr td.active.disabled[disabled]:focus,.cfdatepicker table tr td.active.disabled[disabled]:hover,.cfdatepicker table tr td.active:hover.disabled,.cfdatepicker table tr td.active:hover.disabled.active,.cfdatepicker table tr td.active:hover.disabled:active,.cfdatepicker table tr td.active:hover.disabled:focus,.cfdatepicker table tr td.active:hover.disabled:hover,.cfdatepicker table tr td.active:hover[disabled],.cfdatepicker table tr td.active:hover[disabled].active,.cfdatepicker table tr td.active:hover[disabled]:active,.cfdatepicker table tr td.active:hover[disabled]:focus,.cfdatepicker table tr td.active:hover[disabled]:hover,.cfdatepicker table tr td.active[disabled],.cfdatepicker table tr td.active[disabled].active,.cfdatepicker table tr td.active[disabled]:active,.cfdatepicker table tr td.active[disabled]:focus,.cfdatepicker table tr td.active[disabled]:hover,fieldset[disabled] .cfdatepicker table tr td.active,fieldset[disabled] .cfdatepicker table tr td.active.active,fieldset[disabled] .cfdatepicker table tr td.active.disabled,fieldset[disabled] .cfdatepicker table tr td.active.disabled.active,fieldset[disabled] .cfdatepicker table tr td.active.disabled:active,fieldset[disabled] .cfdatepicker table tr td.active.disabled:focus,fieldset[disabled] .cfdatepicker table tr td.active.disabled:hover,fieldset[disabled] .cfdatepicker table tr td.active.disabled:hover.active,fieldset[disabled] .cfdatepicker table tr td.active.disabled:hover:active,fieldset[disabled] .cfdatepicker table tr td.active.disabled:hover:focus,fieldset[disabled] .cfdatepicker table tr td.active.disabled:hover:hover,fieldset[disabled] .cfdatepicker table tr td.active:active,fieldset[disabled] .cfdatepicker table tr td.active:focus,fieldset[disabled] .cfdatepicker table tr td.active:hover,fieldset[disabled] .cfdatepicker table tr td.active:hover.active,fieldset[disabled] .cfdatepicker table tr td.active:hover:active,fieldset[disabled] .cfdatepicker table tr td.active:hover:focus,fieldset[disabled] .cfdatepicker table tr td.active:hover:hover{background-color:#428bca;border-color:#357ebd}.cfdatepicker table tr td span{display:block;width:23%;height:54px;line-height:54px;float:left;margin:1%;cursor:pointer;border-radius:4px}.cfdatepicker table tr td span:hover{background:#eee}.cfdatepicker table tr td span.disabled,.cfdatepicker table tr td span.disabled:hover{background:0 0;color:#999;cursor:default}.cfdatepicker table tr td span.active,.cfdatepicker table tr td span.active.disabled,.cfdatepicker table tr td span.active.disabled:hover,.cfdatepicker table tr td span.active:hover{color:#fff;background-color:#428bca;border-color:#357ebd;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.cfdatepicker table tr td span.active.active,.cfdatepicker table tr td span.active.disabled.active,.cfdatepicker table tr td span.active.disabled:active,.cfdatepicker table tr td span.active.disabled:focus,.cfdatepicker table tr td span.active.disabled:hover,.cfdatepicker table tr td span.active.disabled:hover.active,.cfdatepicker table tr td span.active.disabled:hover:active,.cfdatepicker table tr td span.active.disabled:hover:focus,.cfdatepicker table tr td span.active.disabled:hover:hover,.cfdatepicker table tr td span.active:active,.cfdatepicker table tr td span.active:focus,.cfdatepicker table tr td span.active:hover,.cfdatepicker table tr td span.active:hover.active,.cfdatepicker table tr td span.active:hover:active,.cfdatepicker table tr td span.active:hover:focus,.cfdatepicker table tr td span.active:hover:hover,.open .dropdown-toggle.cfdatepicker table tr td span.active,.open .dropdown-toggle.cfdatepicker table tr td span.active.disabled,.open .dropdown-toggle.cfdatepicker table tr td span.active.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td span.active:hover{color:#fff;background-color:#3276b1;border-color:#285e8e}.cfdatepicker table tr td span.active.active,.cfdatepicker table tr td span.active.disabled.active,.cfdatepicker table tr td span.active.disabled:active,.cfdatepicker table tr td span.active.disabled:hover.active,.cfdatepicker table tr td span.active.disabled:hover:active,.cfdatepicker table tr td span.active:active,.cfdatepicker table tr td span.active:hover.active,.cfdatepicker table tr td span.active:hover:active,.open .dropdown-toggle.cfdatepicker table tr td span.active,.open .dropdown-toggle.cfdatepicker table tr td span.active.disabled,.open .dropdown-toggle.cfdatepicker table tr td span.active.disabled:hover,.open .dropdown-toggle.cfdatepicker table tr td span.active:hover{background-image:none}.cfdatepicker table tr td span.active.disabled,.cfdatepicker table tr td span.active.disabled.active,.cfdatepicker table tr td span.active.disabled.disabled,.cfdatepicker table tr td span.active.disabled.disabled.active,.cfdatepicker table tr td span.active.disabled.disabled:active,.cfdatepicker table tr td span.active.disabled.disabled:focus,.cfdatepicker table tr td span.active.disabled.disabled:hover,.cfdatepicker table tr td span.active.disabled:active,.cfdatepicker table tr td span.active.disabled:focus,.cfdatepicker table tr td span.active.disabled:hover,.cfdatepicker table tr td span.active.disabled:hover.disabled,.cfdatepicker table tr td span.active.disabled:hover.disabled.active,.cfdatepicker table tr td span.active.disabled:hover.disabled:active,.cfdatepicker table tr td span.active.disabled:hover.disabled:focus,.cfdatepicker table tr td span.active.disabled:hover.disabled:hover,.cfdatepicker table tr td span.active.disabled:hover[disabled],.cfdatepicker table tr td span.active.disabled:hover[disabled].active,.cfdatepicker table tr td span.active.disabled:hover[disabled]:active,.cfdatepicker table tr td span.active.disabled:hover[disabled]:focus,.cfdatepicker table tr td span.active.disabled:hover[disabled]:hover,.cfdatepicker table tr td span.active.disabled[disabled],.cfdatepicker table tr td span.active.disabled[disabled].active,.cfdatepicker table tr td span.active.disabled[disabled]:active,.cfdatepicker table tr td span.active.disabled[disabled]:focus,.cfdatepicker table tr td span.active.disabled[disabled]:hover,.cfdatepicker table tr td span.active:hover.disabled,.cfdatepicker table tr td span.active:hover.disabled.active,.cfdatepicker table tr td span.active:hover.disabled:active,.cfdatepicker table tr td span.active:hover.disabled:focus,.cfdatepicker table tr td span.active:hover.disabled:hover,.cfdatepicker table tr td span.active:hover[disabled],.cfdatepicker table tr td span.active:hover[disabled].active,.cfdatepicker table tr td span.active:hover[disabled]:active,.cfdatepicker table tr td span.active:hover[disabled]:focus,.cfdatepicker table tr td span.active:hover[disabled]:hover,.cfdatepicker table tr td span.active[disabled],.cfdatepicker table tr td span.active[disabled].active,.cfdatepicker table tr td span.active[disabled]:active,.cfdatepicker table tr td span.active[disabled]:focus,.cfdatepicker table tr td span.active[disabled]:hover,fieldset[disabled] .cfdatepicker table tr td span.active,fieldset[disabled] .cfdatepicker table tr td span.active.active,fieldset[disabled] .cfdatepicker table tr td span.active.disabled,fieldset[disabled] .cfdatepicker table tr td span.active.disabled.active,fieldset[disabled] .cfdatepicker table tr td span.active.disabled:active,fieldset[disabled] .cfdatepicker table tr td span.active.disabled:focus,fieldset[disabled] .cfdatepicker table tr td span.active.disabled:hover,fieldset[disabled] .cfdatepicker table tr td span.active.disabled:hover.active,fieldset[disabled] .cfdatepicker table tr td span.active.disabled:hover:active,fieldset[disabled] .cfdatepicker table tr td span.active.disabled:hover:focus,fieldset[disabled] .cfdatepicker table tr td span.active.disabled:hover:hover,fieldset[disabled] .cfdatepicker table tr td span.active:active,fieldset[disabled] .cfdatepicker table tr td span.active:focus,fieldset[disabled] .cfdatepicker table tr td span.active:hover,fieldset[disabled] .cfdatepicker table tr td span.active:hover.active,fieldset[disabled] .cfdatepicker table tr td span.active:hover:active,fieldset[disabled] .cfdatepicker table tr td span.active:hover:focus,fieldset[disabled] .cfdatepicker table tr td span.active:hover:hover{background-color:#428bca;border-color:#357ebd}.cfdatepicker table tr td span.new,.cfdatepicker table tr td span.old{color:#999}.cfdatepicker th.cfdatepicker-switch{width:145px}.cfdatepicker tfoot tr th,.cfdatepicker thead tr:first-child th{cursor:pointer}.cfdatepicker tfoot tr th:hover,.cfdatepicker thead tr:first-child th:hover{background:#eee}.cfdatepicker .cw{font-size:10px;width:12px;padding:0 2px 0 5px;vertical-align:middle}.cfdatepicker thead tr:first-child th.cw{cursor:default;background-color:transparent}.input-group.date .input-group-addon i{cursor:pointer;width:16px;height:16px}.input-daterange input{text-align:center}.input-daterange input:first-child{border-radius:3px 0 0 3px}.input-daterange input:last-child{border-radius:0 3px 3px 0}.input-daterange .input-group-addon{width:auto;min-width:16px;padding:4px 5px;font-weight:400;line-height:1.42857143;text-align:center;text-shadow:0 1px 0 #fff;vertical-align:middle;background-color:#eee;border:solid #ccc;border-width:1px 0;margin-left:-5px;margin-right:-5px}.cfdatepicker.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;float:left;display:none;min-width:160px;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:5px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;color:#333;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:1.42857143}.cfdatepicker.dropdown-menu td,.cfdatepicker.dropdown-menu th{padding:4px 5px}.image-thumb{margin-left:63px;padding:6px 0 6px 6px}.image-picker-content.image-thumb-lrg{margin-bottom:6px}.image-picker-side-bar{float:left;margin-left:-68px;width:62px;max-width:100%}.image-thumb-lrg .image-picker-side-bar{background:#F6F6F6;border:1px solid #DFDFDF;float:none;margin:0 0 6px;padding:6px 6px 2px;text-align:center;width:auto}.image-picker-side-bar>img{border:1px solid #DFDFDF;width:62px}.image-thumb-lrg .image-picker-side-bar>img{-moz-box-sizing:border-box;box-sizing:border-box;max-width:100%;text-align:center;width:auto}.image-thumb .image-picker-main-content{margin-right:6px}.button.image-picker-button{margin:7px 0 0;width:110px;display:inline-block}.button.button-primary.image-picker-button{float:right;margin-left:6px;width:80px}.image-picker-main-content select{width:100%}.image-picker-sizer:disabled{opacity:.7;box-shadow:none;color:#A1A1A1}.button-primary.image-picker-button.image-picker-button-solo,.button.image-picker-button.image-picker-button-solo{width:170px;margin-top:0}.button-primary.image-picker-button.image-picker-button-solo{margin-top:7px;margin-left:0;float:none}.image-thumb-lrg .button.image-picker-button.cu-image-picker.image-picker-button-solo{width:120px}.image-thumb-lrg .button.button-primary.image-picker-button.cu-image-remover.image-picker-button-solo{float:right;margin:0 0 0 6px;width:auto}.image-thumb-lrg .button.button-primary.image-picker-button.cu-image-remover{width:45%}input.cu-image-picker-file-select[type=file]{display:none}.rangeslider,.rangeslider__fill{background:#e6e6e6;display:block;height:8px;width:100%;-webkit-border-radius:10px;-moz-border-radius:10px;-ms-border-radius:10px;-o-border-radius:10px;border-radius:10px}.rangeslider__handle,.toggle_option_row input{display:inline-block}.rangeslider{position:relative}.rangeslider--disabled{filter:alpha(Opacity=40);opacity:.4}.rangeslider__fill{background:#0f0;position:absolute;top:0}.rangeslider__handle{background:#fff;border:1px solid #ccc;cursor:pointer;width:18px;height:18px;position:absolute;top:-5px;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;-o-border-radius:50%;border-radius:50%}input[type=range]:focus+.rangeslider .rangeslider__handle{-webkit-box-shadow:0 0 3px rgba(100,100,100,.9);-moz-box-shadow:0 0 3px rgba(100,100,100,.9);box-shadow:0 0 3px rgba(100,100,100,.9)}.recaptchatable #recaptcha_response_field{height:21px!important}.toggle_option_row{margin:4px 0}.toggle_option_row .dashicons-sort{cursor:move}.toggle_option_row .toggle_label_field,.toggle_option_row .toggle_value_field{width:136px;line-height:20px}.toggle_option_preview .button{border-radius:0;margin-right:-5px}.toggle_option_preview .button:first-child{border-radius:3px 0 0 3px}.toggle_option_preview .button:last-child{border-radius:0 3px 3px 0}.toggle_option_preview.toggle_vertical .button{width:100%}.toggle_option_preview.toggle_vertical .button:first-child{border-radius:3px 3px 0 0}.toggle_option_preview.toggle_vertical .button:last-child{border-radius:0 0 3px 3px}.cf-toggle-switch html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}.cf-toggle-switch body{margin:0}.cf-toggle-switch article,.cf-toggle-switch aside,.cf-toggle-switch details,.cf-toggle-switch figcaption,.cf-toggle-switch figure,.cf-toggle-switch footer,.cf-toggle-switch header,.cf-toggle-switch hgroup,.cf-toggle-switch main,.cf-toggle-switch nav,.cf-toggle-switch section,.cf-toggle-switch summary{display:block}.cf-toggle-switch audio,.cf-toggle-switch canvas,.cf-toggle-switch progress,.cf-toggle-switch video{display:inline-block;vertical-align:baseline}.cf-toggle-switch audio:not([controls]){display:none;height:0}.cf-toggle-switch [hidden],.cf-toggle-switch template{display:none}.cf-toggle-switch a{background:0 0}.cf-toggle-switch a:active,.cf-toggle-switch a:hover{outline:0}.cf-toggle-switch abbr[title]{border-bottom:1px dotted}.cf-toggle-switch b,.cf-toggle-switch strong{font-weight:700}.cf-toggle-switch dfn{font-style:italic}.cf-toggle-switch h1{font-size:2em;margin:.67em 0}.cf-toggle-switch mark{background:#ff0;color:#000}.cf-toggle-switch .btn,.cf-toggle-switch .btn-danger.active,.cf-toggle-switch .btn-danger:active,.cf-toggle-switch .btn-default.active,.cf-toggle-switch .btn-default:active,.cf-toggle-switch .btn-info.active,.cf-toggle-switch .btn-info:active,.cf-toggle-switch .btn-primary.active,.cf-toggle-switch .btn-primary:active,.cf-toggle-switch .btn-success.active,.cf-toggle-switch .btn-success:active,.cf-toggle-switch .btn-warning.active,.cf-toggle-switch .btn-warning:active,.cf-toggle-switch .btn.active,.cf-toggle-switch .btn:active,.cf-toggle-switch .open .dropdown-toggle.btn-danger,.cf-toggle-switch .open .dropdown-toggle.btn-default,.cf-toggle-switch .open .dropdown-toggle.btn-info,.cf-toggle-switch .open .dropdown-toggle.btn-primary,.cf-toggle-switch .open .dropdown-toggle.btn-success,.cf-toggle-switch .open .dropdown-toggle.btn-warning{background-image:none}.cf-toggle-switch small{font-size:80%}.cf-toggle-switch sub,.cf-toggle-switch sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.cf-toggle-switch sup{top:-.5em}.cf-toggle-switch sub{bottom:-.25em}.cf-toggle-switch img{border:0}.cf-toggle-switch svg:not(:root){overflow:hidden}.cf-toggle-switch figure{margin:1em 40px}.cf-toggle-switch hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}.cf-toggle-switch pre{overflow:auto}.cf-toggle-switch code,.cf-toggle-switch kbd,.cf-toggle-switch pre,.cf-toggle-switch samp{font-family:monospace,monospace;font-size:1em}.cf-toggle-switch button,.cf-toggle-switch input,.cf-toggle-switch optgroup,.cf-toggle-switch select,.cf-toggle-switch textarea{color:inherit;font:inherit;margin:0}.cf-toggle-switch button{overflow:visible}.cf-toggle-switch button,.cf-toggle-switch select{text-transform:none}.cf-toggle-switch button,.cf-toggle-switch html input[type=button],.cf-toggle-switch input[type=reset],.cf-toggle-switch input[type=submit]{-webkit-appearance:button;cursor:pointer}.cf-toggle-switch button[disabled],.cf-toggle-switch html input[disabled]{cursor:default}.cf-toggle-switch button::-moz-focus-inner,.cf-toggle-switch input::-moz-focus-inner{border:0;padding:0}.cf-toggle-switch input{line-height:normal}.cf-toggle-switch input[type=checkbox],.cf-toggle-switch input[type=radio]{box-sizing:border-box;padding:0}.cf-toggle-switch input[type=number]::-webkit-inner-spin-button,.cf-toggle-switch input[type=number]::-webkit-outer-spin-button{height:auto}.cf-toggle-switch input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}.cf-toggle-switch input[type=search]::-webkit-search-cancel-button,.cf-toggle-switch input[type=search]::-webkit-search-decoration{-webkit-appearance:none}.cf-toggle-switch fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}.cf-toggle-switch legend{border:0;padding:0}.cf-toggle-switch textarea{overflow:auto}.cf-toggle-switch optgroup{font-weight:700}.cf-toggle-switch table{border-collapse:collapse;border-spacing:0}.cf-toggle-switch td,.cf-toggle-switch th{padding:0}.cf-toggle-switch .btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;cursor:pointer;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.cf-toggle-switch .btn.active:focus,.cf-toggle-switch .btn:active:focus,.cf-toggle-switch .btn:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.cf-toggle-switch .btn:focus,.cf-toggle-switch .btn:hover{color:#333;text-decoration:none}.cf-toggle-switch .btn.active,.cf-toggle-switch .btn:active{outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.cf-toggle-switch .btn.disabled,.cf-toggle-switch .btn[disabled],.cf-toggle-switch fieldset[disabled] .btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.cf-toggle-switch .btn-default{color:#333;background-color:#fff;border-color:#ccc}.cf-toggle-switch .btn-default.active,.cf-toggle-switch .btn-default:active,.cf-toggle-switch .btn-default:focus,.cf-toggle-switch .btn-default:hover,.cf-toggle-switch .open .dropdown-toggle.btn-default{color:#333;background-color:#ebebeb;border-color:#adadad}.cf-toggle-switch .btn-default.disabled,.cf-toggle-switch .btn-default.disabled.active,.cf-toggle-switch .btn-default.disabled:active,.cf-toggle-switch .btn-default.disabled:focus,.cf-toggle-switch .btn-default.disabled:hover,.cf-toggle-switch .btn-default[disabled],.cf-toggle-switch .btn-default[disabled].active,.cf-toggle-switch .btn-default[disabled]:active,.cf-toggle-switch .btn-default[disabled]:focus,.cf-toggle-switch .btn-default[disabled]:hover,.cf-toggle-switch fieldset[disabled] .btn-default,.cf-toggle-switch fieldset[disabled] .btn-default.active,.cf-toggle-switch fieldset[disabled] .btn-default:active,.cf-toggle-switch fieldset[disabled] .btn-default:focus,.cf-toggle-switch fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.cf-toggle-switch .btn-default .badge{color:#fff;background-color:#333}.cf-toggle-switch .btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.cf-toggle-switch .btn-primary.active,.cf-toggle-switch .btn-primary:active,.cf-toggle-switch .btn-primary:focus,.cf-toggle-switch .btn-primary:hover,.cf-toggle-switch .open .dropdown-toggle.btn-primary{color:#fff;background-color:#3276b1;border-color:#285e8e}.cf-toggle-switch .btn-primary.disabled,.cf-toggle-switch .btn-primary.disabled.active,.cf-toggle-switch .btn-primary.disabled:active,.cf-toggle-switch .btn-primary.disabled:focus,.cf-toggle-switch .btn-primary.disabled:hover,.cf-toggle-switch .btn-primary[disabled],.cf-toggle-switch .btn-primary[disabled].active,.cf-toggle-switch .btn-primary[disabled]:active,.cf-toggle-switch .btn-primary[disabled]:focus,.cf-toggle-switch .btn-primary[disabled]:hover,.cf-toggle-switch fieldset[disabled] .btn-primary,.cf-toggle-switch fieldset[disabled] .btn-primary.active,.cf-toggle-switch fieldset[disabled] .btn-primary:active,.cf-toggle-switch fieldset[disabled] .btn-primary:focus,.cf-toggle-switch fieldset[disabled] .btn-primary:hover{background-color:#428bca;border-color:#357ebd}.cf-toggle-switch .btn-primary .badge{color:#428bca;background-color:#fff}.cf-toggle-switch .btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.cf-toggle-switch .btn-success.active,.cf-toggle-switch .btn-success:active,.cf-toggle-switch .btn-success:focus,.cf-toggle-switch .btn-success:hover,.cf-toggle-switch .open .dropdown-toggle.btn-success{color:#fff;background-color:#47a447;border-color:#398439}.cf-toggle-switch .btn-success.disabled,.cf-toggle-switch .btn-success.disabled.active,.cf-toggle-switch .btn-success.disabled:active,.cf-toggle-switch .btn-success.disabled:focus,.cf-toggle-switch .btn-success.disabled:hover,.cf-toggle-switch .btn-success[disabled],.cf-toggle-switch .btn-success[disabled].active,.cf-toggle-switch .btn-success[disabled]:active,.cf-toggle-switch .btn-success[disabled]:focus,.cf-toggle-switch .btn-success[disabled]:hover,.cf-toggle-switch fieldset[disabled] .btn-success,.cf-toggle-switch fieldset[disabled] .btn-success.active,.cf-toggle-switch fieldset[disabled] .btn-success:active,.cf-toggle-switch fieldset[disabled] .btn-success:focus,.cf-toggle-switch fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.cf-toggle-switch .btn-success .badge{color:#5cb85c;background-color:#fff}.cf-toggle-switch .btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.cf-toggle-switch .btn-info.active,.cf-toggle-switch .btn-info:active,.cf-toggle-switch .btn-info:focus,.cf-toggle-switch .btn-info:hover,.cf-toggle-switch .open .dropdown-toggle.btn-info{color:#fff;background-color:#39b3d7;border-color:#269abc}.cf-toggle-switch .btn-info.disabled,.cf-toggle-switch .btn-info.disabled.active,.cf-toggle-switch .btn-info.disabled:active,.cf-toggle-switch .btn-info.disabled:focus,.cf-toggle-switch .btn-info.disabled:hover,.cf-toggle-switch .btn-info[disabled],.cf-toggle-switch .btn-info[disabled].active,.cf-toggle-switch .btn-info[disabled]:active,.cf-toggle-switch .btn-info[disabled]:focus,.cf-toggle-switch .btn-info[disabled]:hover,.cf-toggle-switch fieldset[disabled] .btn-info,.cf-toggle-switch fieldset[disabled] .btn-info.active,.cf-toggle-switch fieldset[disabled] .btn-info:active,.cf-toggle-switch fieldset[disabled] .btn-info:focus,.cf-toggle-switch fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.cf-toggle-switch .btn-info .badge{color:#5bc0de;background-color:#fff}.cf-toggle-switch .btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.cf-toggle-switch .btn-warning.active,.cf-toggle-switch .btn-warning:active,.cf-toggle-switch .btn-warning:focus,.cf-toggle-switch .btn-warning:hover,.cf-toggle-switch .open .dropdown-toggle.btn-warning{color:#fff;background-color:#ed9c28;border-color:#d58512}.cf-toggle-switch .btn-warning.disabled,.cf-toggle-switch .btn-warning.disabled.active,.cf-toggle-switch .btn-warning.disabled:active,.cf-toggle-switch .btn-warning.disabled:focus,.cf-toggle-switch .btn-warning.disabled:hover,.cf-toggle-switch .btn-warning[disabled],.cf-toggle-switch .btn-warning[disabled].active,.cf-toggle-switch .btn-warning[disabled]:active,.cf-toggle-switch .btn-warning[disabled]:focus,.cf-toggle-switch .btn-warning[disabled]:hover,.cf-toggle-switch fieldset[disabled] .btn-warning,.cf-toggle-switch fieldset[disabled] .btn-warning.active,.cf-toggle-switch fieldset[disabled] .btn-warning:active,.cf-toggle-switch fieldset[disabled] .btn-warning:focus,.cf-toggle-switch fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.cf-toggle-switch .btn-warning .badge{color:#f0ad4e;background-color:#fff}.cf-toggle-switch .btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.cf-toggle-switch .btn-danger.active,.cf-toggle-switch .btn-danger:active,.cf-toggle-switch .btn-danger:focus,.cf-toggle-switch .btn-danger:hover,.cf-toggle-switch .open .dropdown-toggle.btn-danger{color:#fff;background-color:#d2322d;border-color:#ac2925}.cf-toggle-switch .btn-danger.disabled,.cf-toggle-switch .btn-danger.disabled.active,.cf-toggle-switch .btn-danger.disabled:active,.cf-toggle-switch .btn-danger.disabled:focus,.cf-toggle-switch .btn-danger.disabled:hover,.cf-toggle-switch .btn-danger[disabled],.cf-toggle-switch .btn-danger[disabled].active,.cf-toggle-switch .btn-danger[disabled]:active,.cf-toggle-switch .btn-danger[disabled]:focus,.cf-toggle-switch .btn-danger[disabled]:hover,.cf-toggle-switch fieldset[disabled] .btn-danger,.cf-toggle-switch fieldset[disabled] .btn-danger.active,.cf-toggle-switch fieldset[disabled] .btn-danger:active,.cf-toggle-switch fieldset[disabled] .btn-danger:focus,.cf-toggle-switch fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.cf-toggle-switch .btn-danger .badge{color:#d9534f;background-color:#fff}.cf-toggle-switch .btn-link{color:#428bca;font-weight:400;cursor:pointer;border-radius:0}.cf-toggle-switch .btn-link,.cf-toggle-switch .btn-link:active,.cf-toggle-switch .btn-link[disabled],.cf-toggle-switch fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.cf-toggle-switch .btn-link,.cf-toggle-switch .btn-link:active,.cf-toggle-switch .btn-link:focus,.cf-toggle-switch .btn-link:hover{border-color:transparent}.cf-toggle-switch .btn-link:focus,.cf-toggle-switch .btn-link:hover{color:#2a6496;text-decoration:underline;background-color:transparent}.cf-toggle-switch .btn-link[disabled]:focus,.cf-toggle-switch .btn-link[disabled]:hover,.cf-toggle-switch fieldset[disabled] .btn-link:focus,.cf-toggle-switch fieldset[disabled] .btn-link:hover{color:#999;text-decoration:none}.cf-toggle-switch .btn-group-lg>.btn,.cf-toggle-switch .btn-lg{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.cf-toggle-switch .btn-group-sm>.btn,.cf-toggle-switch .btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.cf-toggle-switch .btn-group-xs>.btn,.cf-toggle-switch .btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.cf-toggle-switch .btn-group-vertical>.btn:not(:first-child):not(:last-child),.cf-toggle-switch .btn-group>.btn-group:not(:first-child):not(:last-child)>.btn,.cf-toggle-switch .btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.cf-toggle-switch .btn-group>.btn-group:first-child>.btn:last-child,.cf-toggle-switch .btn-group>.btn-group:first-child>.dropdown-toggle,.cf-toggle-switch .btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.cf-toggle-switch .btn-block{display:block;width:100%;padding-left:0;padding-right:0}.cf-toggle-switch input[type=button].btn-block,.cf-toggle-switch input[type=reset].btn-block,.cf-toggle-switch input[type=submit].btn-block{width:100%}.cf-toggle-switch .btn-group,.cf-toggle-switch .btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.cf-toggle-switch .btn-group-vertical>.btn,.cf-toggle-switch .btn-group>.btn{position:relative;float:left}.cf-toggle-switch .btn-group-vertical>.btn.active,.cf-toggle-switch .btn-group-vertical>.btn:active,.cf-toggle-switch .btn-group-vertical>.btn:focus,.cf-toggle-switch .btn-group-vertical>.btn:hover,.cf-toggle-switch .btn-group>.btn.active,.cf-toggle-switch .btn-group>.btn:active,.cf-toggle-switch .btn-group>.btn:focus,.cf-toggle-switch .btn-group>.btn:hover{z-index:2}.cf-toggle-switch .btn-group-vertical>.btn:focus,.cf-toggle-switch .btn-group>.btn:focus{outline:0}.cf-toggle-switch .btn-toolbar{margin-left:-5px}.cf-toggle-switch .btn-toolbar .btn-group,.cf-toggle-switch .btn-toolbar .input-group{float:left}.cf-toggle-switch .btn-toolbar>.btn,.cf-toggle-switch .btn-toolbar>.btn-group,.cf-toggle-switch .btn-toolbar>.input-group{margin-left:5px}.cf-toggle-switch .btn-group>.btn:first-child{margin-left:0}.cf-toggle-switch .btn-group>.btn:last-child:not(:first-child),.cf-toggle-switch .btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.cf-toggle-switch .btn-group>.btn-group{float:left}.cf-toggle-switch .btn-group>.btn-group:last-child>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.cf-toggle-switch .btn-group .dropdown-toggle:active,.cf-toggle-switch .btn-group.open .dropdown-toggle{outline:0}.cf-toggle-switch .btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.cf-toggle-switch .btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px}.cf-toggle-switch .btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.cf-toggle-switch .btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.cf-toggle-switch .btn .caret{margin-left:0}.cf-toggle-switch .btn-lg .caret{border-width:5px 5px 0}.cf-toggle-switch .dropup .btn-lg .caret{border-width:0 5px 5px}.cf-toggle-switch .btn-group-vertical>.btn,.cf-toggle-switch .btn-group-vertical>.btn-group,.cf-toggle-switch .btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.cf-toggle-switch .btn-group-vertical>.btn-group>.btn{float:none}.cf-toggle-switch .btn-group-vertical>.btn+.btn,.cf-toggle-switch .btn-group-vertical>.btn+.btn-group,.cf-toggle-switch .btn-group-vertical>.btn-group+.btn,.cf-toggle-switch .btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.cf-toggle-switch .btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.cf-toggle-switch .btn-group-vertical>.btn:last-child:not(:first-child){border-bottom-left-radius:4px;border-top-right-radius:0;border-top-left-radius:0}.cf-toggle-switch .btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.cf-toggle-switch .btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.cf-toggle-switch .btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.cf-toggle-switch .btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.cf-toggle-switch .btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.cf-toggle-switch .btn-group-justified>.btn,.cf-toggle-switch .btn-group-justified>.btn-group{float:none;display:table-cell;width:1%}.cf-toggle-switch .btn-group-justified>.btn-group .btn{width:100%}.cf-toggle-switch [data-toggle=buttons]>.btn>input[type=checkbox],.cf-toggle-switch [data-toggle=buttons]>.btn>input[type=radio]{display:none}.cf-toggle-switch .btn-group-vertical>.btn-group:after,.cf-toggle-switch .btn-group-vertical>.btn-group:before,.cf-toggle-switch .btn-toolbar:after,.cf-toggle-switch .btn-toolbar:before,.cf-toggle-switch .clearfix:after,.cf-toggle-switch .clearfix:before{content:" ";display:table}.cf-toggle-switch .btn-group-vertical>.btn-group:after,.cf-toggle-switch .btn-toolbar:after,.cf-toggle-switch .clearfix:after{clear:both}.cf-toggle-switch .center-block{display:block;margin-left:auto;margin-right:auto}.cf-toggle-switch .pull-right{float:right!important}.cf-toggle-switch .pull-left{float:left!important}.cf-toggle-switch .hide{display:none!important}.cf-toggle-switch .show{display:block!important}.cf-toggle-switch .invisible{visibility:hidden}.cf-toggle-switch .text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.cf-toggle-switch .hidden{display:none!important;visibility:hidden!important}.cf-toggle-switch .affix{position:fixed}@-ms-viewport{width:device-width}.cf-toggle-switch .visible-lg,.cf-toggle-switch .visible-md,.cf-toggle-switch .visible-print,.cf-toggle-switch .visible-sm,.cf-toggle-switch .visible-xs{display:none!important}@media (max-width:767px){.cf-toggle-switch .visible-xs{display:block!important}.cf-toggle-switch table.visible-xs{display:table}.cf-toggle-switch tr.visible-xs{display:table-row!important}.cf-toggle-switch td.visible-xs,.cf-toggle-switch th.visible-xs{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.cf-toggle-switch .visible-sm{display:block!important}.cf-toggle-switch table.visible-sm{display:table}.cf-toggle-switch tr.visible-sm{display:table-row!important}.cf-toggle-switch td.visible-sm,.cf-toggle-switch th.visible-sm{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.cf-toggle-switch .visible-md{display:block!important}.cf-toggle-switch table.visible-md{display:table}.cf-toggle-switch tr.visible-md{display:table-row!important}.cf-toggle-switch td.visible-md,.cf-toggle-switch th.visible-md{display:table-cell!important}}@media (min-width:1200px){.cf-toggle-switch .visible-lg{display:block!important}.cf-toggle-switch table.visible-lg{display:table}.cf-toggle-switch tr.visible-lg{display:table-row!important}.cf-toggle-switch td.visible-lg,.cf-toggle-switch th.visible-lg{display:table-cell!important}.cf-toggle-switch .hidden-lg{display:none!important}}@media (max-width:767px){.cf-toggle-switch .hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.cf-toggle-switch .hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.cf-toggle-switch .hidden-md{display:none!important}}@media print{.cf-toggle-switch .visible-print{display:block!important}.cf-toggle-switch table.visible-print{display:table}.cf-toggle-switch tr.visible-print{display:table-row!important}.cf-toggle-switch td.visible-print,.cf-toggle-switch th.visible-print{display:table-cell!important}.cf-toggle-switch .hidden-print{display:none!important}}.cf-toggle-group-buttons{width:100%;clear:both}input.form-control.parsley-success,select.form-control.parsley-success,textarea.form-control.parsley-success{color:#468847;background-color:#DFF0D8;border-color:#D6E9C6}input.form-control.parsley-error,select.form-control.parsley-error,textarea.form-control.parsley-error{color:#B94A48;background-color:#F2DEDE;border-color:#EED3D7}.form-control.parsley-errors-list{margin:2px 0 3px;padding:0;list-style-type:none;font-size:.9em;line-height:.9em;opacity:0;color:#468847;transition:all .3s ease-in;-o-transition:all .3s ease-in;-moz-transition:all .3s ease-in;-webkit-transition:all .3s ease-in}.form-control.parsley-errors-list.filled{opacity:1}.breadcrumb a.has-error{color:red}.form-group .parsley-errors-list.filled,.form-group .parsley-errors-list.filled .parsley-type{list-style:none}.caldera-grid .cf-multi-uploader-list>ul{list-style:none;margin:0 0 12px;padding:0}.caldera-grid .cf-multi-uploader-list>ul>li{margin:0;padding:0 0 22px;position:relative;clear:both}.caldera-grid .cf-multi-uploader-list>ul>li .file-name{display:inline-block;font-weight:700;left:16px;right:0;overflow:hidden;position:absolute;text-overflow:ellipsis;white-space:nowrap}.caldera-grid .cf-multi-uploader-list>ul>li .file-name.file-uploaded{left:0}.caldera-grid .cf-multi-uploader-list>ul>li .file-size{float:right}.caldera-grid .cf-multi-uploader-list>ul>li .file-type{float:left}.caldera-grid .cf-multi-uploader-list>ul>li .file-error{clear:both;display:block}.caldera-grid .cf-multi-uploader-list>ul>li .cf-file-remove{color:#cf0000;text-decoration:none;border:0}.caldera-grid .cf-multi-uploader-list>ul>li.has-error .bar{background-color:#cf0000!important}.caldera-grid .cf-multi-uploader-list>ul>li.has-error{color:#cf0000}.has-error.cf-toggle-switch .cf-toggle-group-buttons>a{background-color:#f2dede;border-color:#dd4b39}
|
assets/build/js/admin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function CalderaFormsButtonPulse(a){var b,c,d=!1;b=function(){a.animate({opacity:.25},500,function(){a.animate({opacity:1},500)})},this.startPulse=function(){!1===d&&(c=setInterval(function(){b()},1e3))},this.stopPulse=function(){d=!0,clearInterval(c)}}var baldrickTriggers,loop_loader;jQuery(document).ready(function(a){var b;b="object"==typeof CF_ADMIN?CF_ADMIN.adminAjax:ajaxurl,baldrickTriggers=function(){a(".ajax-trigger").baldrick({request:b,method:"POST",before:function(b,c){var d=a(b),e=a("#cf_toolbar_actions"),f=e.parent().find('[name="_wp_http_referer"]');if(e.length&&f.length&&(d.data("cf_toolbar_actions",e.val()),d.data("_wp_http_referer",f.val())),d.data("trigger")){c.preventDefault();var g=a(d.data("trigger"));return g.trigger(g.data("event")?g.data("event"):"click"),!1}},complete:function(){a(".init_field_type[data-type]").each(function(b,c){var d=a(c);"function"==typeof window[d.data("type")+"_init"]&&window[d.data("type")+"_init"](d.prop("id"),d[0])})}})},loop_loader=function(a,b){return{__id__:Math.round(1e7*Math.random())}},baldrickTriggers(),a("body").on("click",".modal-side-tab",function(b){b.preventDefault();var c=a(this),d=c.closest(".caldera-modal-body"),e=d.find(".tab-detail-panel"),f=a(c.attr("href"));d.find(".modal-side-tab.active").removeClass("active"),c.addClass("active"),e.hide(),f.show()}),a("body").on("click",".caldera-group-remover",function(b){b.preventDefault();var c=a(this),d=c.closest(".caldera-repeater-group");d.slideUp(200,function(){d.remove()})}),a("body").on("click",".form-delete a.form-control",function(b){var c=a(this);confirm(c.data("confirm"))||b.preventDefault()}),a("body").on("keyup change",'[data-format="key"]',function(a){this.value=this.value.replace(/[^a-z0-9]/gi,"-").toLowerCase()}),a("body").on("keyup change",'[data-format="slug"]',function(a){this.value=this.value.replace(/[^a-z0-9]/gi,"_").toLowerCase()}),a(window).on("resize",function(){var b=a("#cf_forms_toggle"),c=a(".form-panel-wrap");window.innerWidth<=1420&&b.is(":visible")&&c.is(":visible")&&b.trigger("click")}),a("#caldera-forms-delete-all-form-entries").click(function(b){b.preventDefault(),a("#caldera-forms-confirm-delete-all-form-entries").slideToggle("fast")}),a("#caldera-forms-no-confirm-delete-all-form-entries").click(function(b){b.preventDefault(),a("#caldera-forms-confirm-delete-all-form-entries").slideToggle("fast")}),a("#caldera-forms-yes-confirm-delete-all-form-entries").click(function(b){b.preventDefault();var c=CF_ADMIN.rest.delete_entries,d=jQuery("#caldera-forms-delete-entries-spinner");d.css({visibility:"visible",float:"none"}),wp.apiRequest({url:c,method:"GET"}).then(function(b){b.hasOwnProperty("message")&&(!0===b.deleted?(a("#caldera-forms-label-delete-all-entries").append("<div class='caldera-forms-deleted'>"+b.message+"</div>"),setTimeout(function(){a(".caldera-forms-deleted").remove()},5e3),a("#caldera-forms-confirm-delete-all-form-entries").slideToggle("fast")):(a("#caldera-forms-label-delete-all-entries").append("<div class='caldera-forms-not-deleted'>"+b.message+"</div>"),setTimeout(function(){a(".caldera-forms-not-deleted").remove()},5e3),a("#caldera-forms-confirm-delete-all-form-entries").slideToggle("fast"))),d.css({visibility:"hidden",float:"none"})}).fail(function(b){b.responseJSON.hasOwnProperty("message")&&(a("#caldera-forms-label-delete-all-entries").append("<div class='caldera-forms-not-deleted'>"+b.responseJSON.message+"</div>"),setTimeout(function(){a(".caldera-forms-not-deleted").remove()},5e3),a("#caldera-forms-confirm-delete-all-form-entries").slideToggle("fast")),d.css({visibility:"hidden",float:"none"})})})}),function(a){"use strict";var b=function(a,b){this.init("tooltip",a,b)};b.prototype={constructor:b,init:function(b,c,d){var e,f;this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.enabled=!0,"click"==this.options.trigger?this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this)):"manual"!=this.options.trigger&&(e="hover"==this.options.trigger?"mouseenter":"focus",f="hover"==this.options.trigger?"mouseleave":"blur",this.$element.on(e+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(f+"."+this.type,this.options.selector,a.proxy(this.leave,this))),this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(b){return b=a.extend({},a.fn[this.type].defaults,b,this.$element.data()),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},enter:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);return c.options.delay&&c.options.delay.show?(clearTimeout(this.timeout),c.hoverState="in",void(this.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show))):c.show()},leave:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);return this.timeout&&clearTimeout(this.timeout),c.options.delay&&c.options.delay.hide?(c.hoverState="out",void(this.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide))):c.hide()},show:function(){var a,b,c,d,e,f,g;if(this.hasContent()&&this.enabled){switch(a=this.tip(),this.setContent(),this.options.animation&&a.addClass("fade"),f="function"==typeof this.options.placement?this.options.placement.call(this,a[0],this.$element[0]):this.options.placement,b=/in/.test(f),a.detach().css({top:0,left:0,display:"block"}).insertAfter(this.$element),c=this.getPosition(b),d=a[0].offsetWidth,e=a[0].offsetHeight,b?f.split(" ")[1]:f){case"bottom":g={top:c.top+c.height,left:c.left+c.width/2-d/2};break;case"top":g={top:c.top-e,left:c.left+c.width/2-d/2};break;case"left":g={top:c.top+c.height/2-e/2,left:c.left-d};break;case"right":g={top:c.top+c.height/2-e/2,left:c.left+c.width}}a.offset(g).addClass(f).addClass("in")}},setContent:function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},hide:function(){var b=this.tip();return b.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?function(){var c=setTimeout(function(){b.off(a.support.transition.end).detach()},500);b.one(a.support.transition.end,function(){clearTimeout(c),b.detach()})}():b.detach(),this},fixTitle:function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(b){return a.extend({},b?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var a=this.$element,b=this.options;return a.attr("data-original-title")||("function"==typeof b.title?b.title.call(a[0]):b.title)},tip:function(){return this.$tip=this.$tip||a(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);c[c.tip().hasClass("in")?"hide":"show"]()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("tooltip"),f="object"==typeof c&&c;e||d.data("tooltip",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover",title:"",delay:0,html:!1},a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this}}(window.jQuery);var baldrickTriggers,loop_loader;jQuery(document).ready(function(a){baldrickTriggers=function(){a(".ajax-trigger").baldrick({request:ajaxurl,method:"POST",before:function(b,c){var d=a(b),e=a("#cf_toolbar_actions"),f=e.parent().find('[name="_wp_http_referer"]');if(e.length&&f.length&&(d.data("cf_toolbar_actions",e.val()),d.data("_wp_http_referer",f.val())),d.data("trigger")){c.preventDefault();var g=a(d.data("trigger"));return g.trigger(g.data("event")?g.data("event"):"click"),!1}},complete:function(){a(".init_field_type[data-type]").each(function(b,c){var d=a(c);"function"==typeof window[d.data("type")+"_init"]&&window[d.data("type")+"_init"](d.prop("id"),d[0])})}})},loop_loader=function(a,b){return{__id__:Math.round(1e7*Math.random())}},baldrickTriggers(),a("body").on("click",".modal-side-tab",function(b){b.preventDefault();var c=a(this),d=c.closest(".caldera-modal-body"),e=d.find(".tab-detail-panel"),f=a(c.attr("href"));d.find(".modal-side-tab.active").removeClass("active"),c.addClass("active"),e.hide(),f.show()}),a("body").on("click",".caldera-group-remover",function(b){b.preventDefault();var c=a(this),d=c.closest(".caldera-repeater-group");d.slideUp(200,function(){d.remove()})}),a("body").on("click",".form-delete a.form-control",function(b){var c=a(this);confirm(c.data("confirm"))||b.preventDefault()}),a("body").on("keyup change",'[data-format="key"]',function(a){this.value=this.value.replace(/[^a-z0-9]/gi,"-").toLowerCase()}),a("body").on("keyup change",'[data-format="slug"]',function(a){this.value=this.value.replace(/[^a-z0-9]/gi,"_").toLowerCase()}),a(window).on("resize",function(){var b=a("#cf_forms_toggle"),c=a(".form-panel-wrap");window.innerWidth<=1420&&b.is(":visible")&&c.is(":visible")&&b.trigger("click")});var b;void 0!=typeof CF_CLIPPY&&"object"==typeof CF_CLIPPY&&(b=new CalderaFormsAdminClippys(a(document.getElementById("caldera-forms-clippy")),CF_CLIPPY,a),b.init()),a(".cf-entry-viewer-link").on("click",function(){"object"==typeof b&&b.remove()})});
|
1 |
+
function CalderaFormsButtonPulse(a){var b,c,d=!1;b=function(){a.animate({opacity:.25},500,function(){a.animate({opacity:1},500)})},this.startPulse=function(){!1===d&&(c=setInterval(function(){b()},1e3))},this.stopPulse=function(){d=!0,clearInterval(c)}}var baldrickTriggers,loop_loader;jQuery(function(){var a;a="object"==typeof CF_ADMIN?CF_ADMIN.adminAjax:ajaxurl,baldrickTriggers=function(){jQuery(".ajax-trigger").baldrick({request:a,method:"POST",before:function(a,b){var c=jQuery(a),d=jQuery("#cf_toolbar_actions"),e=d.parent().find('[name="_wp_http_referer"]');if(d.length&&e.length&&(c.data("cf_toolbar_actions",d.val()),c.data("_wp_http_referer",e.val())),c.data("trigger")){b.preventDefault();var f=jQuery(c.data("trigger"));return f.trigger(f.data("event")?f.data("event"):"click"),!1}},complete:function(){jQuery(".init_field_type[data-type]").each(function(a,b){var c=jQuery(b);"function"==typeof window[c.data("type")+"_init"]&&window[c.data("type")+"_init"](c.prop("id"),c[0])})}})},loop_loader=function(a,b){return{__id__:Math.round(1e7*Math.random())}},baldrickTriggers(),jQuery("body").on("click",".modal-side-tab",function(a){a.preventDefault();var b=jQuery(this),c=b.closest(".caldera-modal-body"),d=c.find(".tab-detail-panel"),e=jQuery(b.attr("href"));c.find(".modal-side-tab.active").removeClass("active"),b.addClass("active"),d.hide(),e.show()}),jQuery("body").on("click",".caldera-group-remover",function(a){a.preventDefault();var b=jQuery(this),c=b.closest(".caldera-repeater-group");c.slideUp(200,function(){c.remove()})}),jQuery("body").on("click",".form-delete a.form-control",function(a){var b=jQuery(this);confirm(b.data("confirm"))||a.preventDefault()}),jQuery("body").on("keyup change",'[data-format="key"]',function(a){this.value=this.value.replace(/[^a-z0-9]/gi,"-").toLowerCase()}),jQuery("body").on("keyup change",'[data-format="slug"]',function(a){this.value=this.value.replace(/[^a-z0-9]/gi,"_").toLowerCase()}),jQuery(window).on("resize",function(){var a=jQuery("#cf_forms_toggle"),b=jQuery(".form-panel-wrap");window.innerWidth<=1420&&a.is(":visible")&&b.is(":visible")&&a.trigger("click")}),jQuery("#caldera-forms-delete-all-form-entries").on("click",function(a){a.preventDefault(),jQuery("#caldera-forms-confirm-delete-all-form-entries").slideToggle("fast")}),jQuery("#caldera-forms-no-confirm-delete-all-form-entries").on("click",function(a){a.preventDefault(),jQuery("#caldera-forms-confirm-delete-all-form-entries").slideToggle("fast")}),jQuery("#caldera-forms-yes-confirm-delete-all-form-entries").on("click",function(a){a.preventDefault();var b=CF_ADMIN.rest.delete_entries,c=jQuery("#caldera-forms-delete-entries-spinner");c.css({visibility:"visible",float:"none"}),wp.apiRequest({url:b,method:"GET"}).then(function(a){a.hasOwnProperty("message")&&(!0===a.deleted?(jQuery("#caldera-forms-label-delete-all-entries").append("<div class='caldera-forms-deleted'>"+a.message+"</div>"),setTimeout(function(){jQuery(".caldera-forms-deleted").remove()},5e3),jQuery("#caldera-forms-confirm-delete-all-form-entries").slideToggle("fast")):(jQuery("#caldera-forms-label-delete-all-entries").append("<div class='caldera-forms-not-deleted'>"+a.message+"</div>"),setTimeout(function(){jQuery(".caldera-forms-not-deleted").remove()},5e3),jQuery("#caldera-forms-confirm-delete-all-form-entries").slideToggle("fast"))),c.css({visibility:"hidden",float:"none"})}).fail(function(a){a.responseJSON.hasOwnProperty("message")&&(jQuery("#caldera-forms-label-delete-all-entries").append("<div class='caldera-forms-not-deleted'>"+a.responseJSON.message+"</div>"),setTimeout(function(){jQuery(".caldera-forms-not-deleted").remove()},5e3),jQuery("#caldera-forms-confirm-delete-all-form-entries").slideToggle("fast")),c.css({visibility:"hidden",float:"none"})})}),jQuery(".ajax-trigger").on("click",function(a){baldrickTriggers(this,a)})}),function(a){"use strict";var b=function(a,b){this.init("tooltip",a,b)};b.prototype={constructor:b,init:function(b,c,d){var e,f;this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.enabled=!0,"click"==this.options.trigger?this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this)):"manual"!=this.options.trigger&&(e="hover"==this.options.trigger?"mouseenter":"focus",f="hover"==this.options.trigger?"mouseleave":"blur",this.$element.on(e+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(f+"."+this.type,this.options.selector,a.proxy(this.leave,this))),this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(b){return b=a.extend({},a.fn[this.type].defaults,b,this.$element.data()),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},enter:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);return c.options.delay&&c.options.delay.show?(clearTimeout(this.timeout),c.hoverState="in",void(this.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show))):c.show()},leave:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);return this.timeout&&clearTimeout(this.timeout),c.options.delay&&c.options.delay.hide?(c.hoverState="out",void(this.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide))):c.hide()},show:function(){var a,b,c,d,e,f,g;if(this.hasContent()&&this.enabled){switch(a=this.tip(),this.setContent(),this.options.animation&&a.addClass("fade"),f="function"==typeof this.options.placement?this.options.placement.call(this,a[0],this.$element[0]):this.options.placement,b=/in/.test(f),a.detach().css({top:0,left:0,display:"block"}).insertAfter(this.$element),c=this.getPosition(b),d=a[0].offsetWidth,e=a[0].offsetHeight,b?f.split(" ")[1]:f){case"bottom":g={top:c.top+c.height,left:c.left+c.width/2-d/2};break;case"top":g={top:c.top-e,left:c.left+c.width/2-d/2};break;case"left":g={top:c.top+c.height/2-e/2,left:c.left-d};break;case"right":g={top:c.top+c.height/2-e/2,left:c.left+c.width}}a.offset(g).addClass(f).addClass("in")}},setContent:function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},hide:function(){var b=this.tip();return b.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?function(){var c=setTimeout(function(){b.off(a.support.transition.end).detach()},500);b.one(a.support.transition.end,function(){clearTimeout(c),b.detach()})}():b.detach(),this},fixTitle:function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(b){return a.extend({},b?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var a=this.$element,b=this.options;return a.attr("data-original-title")||("function"==typeof b.title?b.title.call(a[0]):b.title)},tip:function(){return this.$tip=this.$tip||a(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);c[c.tip().hasClass("in")?"hide":"show"]()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("tooltip"),f="object"==typeof c&&c;e||d.data("tooltip",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover",title:"",delay:0,html:!1},a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this}}(window.jQuery);var baldrickTriggers,loop_loader;jQuery(document).ready(function(a){baldrickTriggers=function(){a(".ajax-trigger").baldrick({request:ajaxurl,method:"POST",before:function(b,c){var d=a(b),e=a("#cf_toolbar_actions"),f=e.parent().find('[name="_wp_http_referer"]');if(e.length&&f.length&&(d.data("cf_toolbar_actions",e.val()),d.data("_wp_http_referer",f.val())),d.data("trigger")){c.preventDefault();var g=a(d.data("trigger"));return g.trigger(g.data("event")?g.data("event"):"click"),!1}},complete:function(){a(".init_field_type[data-type]").each(function(b,c){var d=a(c);"function"==typeof window[d.data("type")+"_init"]&&window[d.data("type")+"_init"](d.prop("id"),d[0])})}})},loop_loader=function(a,b){return{__id__:Math.round(1e7*Math.random())}},baldrickTriggers(),a("body").on("click",".modal-side-tab",function(b){b.preventDefault();var c=a(this),d=c.closest(".caldera-modal-body"),e=d.find(".tab-detail-panel"),f=a(c.attr("href"));d.find(".modal-side-tab.active").removeClass("active"),c.addClass("active"),e.hide(),f.show()}),a("body").on("click",".caldera-group-remover",function(b){b.preventDefault();var c=a(this),d=c.closest(".caldera-repeater-group");d.slideUp(200,function(){d.remove()})}),a("body").on("click",".form-delete a.form-control",function(b){var c=a(this);confirm(c.data("confirm"))||b.preventDefault()}),a("body").on("keyup change",'[data-format="key"]',function(a){this.value=this.value.replace(/[^a-z0-9]/gi,"-").toLowerCase()}),a("body").on("keyup change",'[data-format="slug"]',function(a){this.value=this.value.replace(/[^a-z0-9]/gi,"_").toLowerCase()}),a(window).on("resize",function(){var b=a("#cf_forms_toggle"),c=a(".form-panel-wrap");window.innerWidth<=1420&&b.is(":visible")&&c.is(":visible")&&b.trigger("click")});var b;void 0!=typeof CF_CLIPPY&&"object"==typeof CF_CLIPPY&&(b=new CalderaFormsAdminClippys(a(document.getElementById("caldera-forms-clippy")),CF_CLIPPY,a),b.init()),a(".cf-entry-viewer-link").on("click",function(){"object"==typeof b&&b.remove()})});
|
assets/build/js/ajax-core.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var resBaldrickTriggers;jQuery(function(a){function b(a,b,c){for(var d in a){var e=b.find('[data-field="'+d+'"]'),f=e.parent();if(e.length){f.is("label")&&(f=f.parent(),(f.hasClass("checkbox")||f.hasClass("radio"))&&(f=f.parent()));var g=f.find(".help-block").not(".caldera_ajax_error_block");f.addClass("has-error").addClass("caldera_ajax_error_wrap"),g.length&&g.hide(),f.append('<span class="help-block caldera_ajax_error_block">'+a[d]+"</span>")}else c.html('<p class="alert alert-danger ">'+a[d]+"</p>")}}var c=[],d=function(b,d
|
1 |
+
var resBaldrickTriggers;jQuery(function(a){function b(a,b,c){for(var d in a){var e=b.find('[data-field="'+d+'"]'),f=e.parent();if(e.length){f.is("label")&&(f=f.parent(),(f.hasClass("checkbox")||f.hasClass("radio"))&&(f=f.parent()));var g=f.find(".help-block").not(".caldera_ajax_error_block");f.addClass("has-error").addClass("caldera_ajax_error_wrap"),g.length&&g.hide(),f.append('<span class="help-block caldera_ajax_error_block">'+a[d]+"</span>")}else c.html('<p class="alert alert-danger ">'+a[d]+"</p>")}}var c=[],d=function(a,b,d){var e=jQuery("#progress-file-"+b),f=jQuery("."+b+" .file-size");c.push(1),cf_uploader_filelist[b].state=2,jQuery.ajax({xhr:function(){var a=new window.XMLHttpRequest;return a.upload.addEventListener("progress",function(a){if(a.lengthComputable){var b=a.loaded/a.total*100;e.width(b+"%"),f.html(size_format(a.loaded)+" / "+size_format(a.total))}},!1),a.addEventListener("progress",function(a){if(a.lengthComputable){a.loaded,a.total}},!1),a},url:a.data("request")+"/upload/",type:"POST",data:d,processData:!1,contentType:!1,success:function(d,e,f){if(d.success&&!0===d.success){c.pop();var g=jQuery('[data-file="'+b+'"]');g.next().addClass("file-uploaded"),g.remove(),cf_uploader_filelist[b].state=3,a.submit()}else if(d.data&&!d.success)return jQuery("."+b).addClass("has-error"),a.find(":submit").prop("disabled",!1),a.find(".cf-uploader-trigger").slideDown(),void jQuery("."+b+" .file-error").html(d.data)},error:function(b,c,d){a.data("postDisable")||buttons.prop("disabled",!1)}})};(resBaldrickTriggers=function(){var a=function(a){return jQuery("#caldera_notices_"+a.params.trigger.data("instance"))},e=function(a){return jQuery("#caldera-forms-breadcrumb_"+a.params.trigger.data("instance"))},f=function(a){var b=e(a);b.length&&b.show().attr("aria-hidden",!1).css("visibility","visible")},g=function(a){var b=e(a);b.length&&b.show().attr("aria-hidden",!0).css("visibility","hidden")};jQuery(".cfajax-trigger").baldrick({request:"./",method:"POST",init:function(a,e){e.preventDefault();var f=jQuery(a),g=f.find(":submit"),h=[];if(jQuery(document).trigger("cf.ajax.request",{$form:f,formIdAttr:f.attr("id"),displayFieldErrors:b,fieldsBlocking:h,$notice:jQuery("#caldera_notices_"+f.data("instance"))}),"object"==typeof window.cf2)var i=window.cf2[f.attr("id")];if("object"==typeof i){if(i.hasOwnProperty("pending")&&0!==i.pending.length)return!1;if(i.hasOwnProperty("fieldsBlocking")&&0!==i.fieldsBlocking.length)return!1}if(f.data("_cf_manual"))return f.find('[name="cfajax"]').remove(),!1;if(f.data("postDisable")||g.prop("disabled",!0),"object"==typeof cf_uploader_filelist){f.find(".cf-uploader-trigger").slideUp();var j=!1,k=c.length;for(var l in cf_uploader_filelist)if(!(cf_uploader_filelist[l].state>1||0===cf_uploader_filelist[l].state)){j=!0;var m=new FormData,n=l,o=jQuery("#"+n.split("_file_")[0]);if(m.append(o.data("field"),cf_uploader_filelist[l].file),m.append("field",o.data("field")),m.append("control",o.data("controlid")),d(f,n,m),o.val(""),o.attr("type","hidden"),o.val(o.data("controlid")),1===++k)break}if(!0===j||c.length)return!1}},error:function(b){if(404===b.jqxhr.status)this.trigger.data("_cf_manual",!0).trigger("submit");else{var c=a(b);b.jqxhr.responseJSON.data.html&&(c.html(b.jqxhr.responseJSON.data.html),jQuery("html,body").animate({scrollTop:c.offset().top-c.outerHeight()},300))}},callback:function(c){c.params.trigger.find(":submit").prop("disabled",!1);var d=a(c);if(c.params.trigger.data("customCallback")&&"function"==typeof window[c.params.trigger.data("customCallback")]&&window[c.params.trigger.data("customCallback")](c.data),c.params.trigger.data("inhibitnotice")||(jQuery(".caldera_ajax_error_wrap").removeClass("caldera_ajax_error_wrap").removeClass("has-error"),jQuery(".caldera_ajax_error_block").remove(),"complete"===c.data.status||"success"===c.data.type?(g(c),c.data.html&&c.params.target.html(c.data.html),c.params.trigger.data("hiderows")&&c.params.trigger.find("div.row").remove()):"preprocess"===c.data.status?(f(c),c.params.target.html(c.data.html)):"error"===c.data.status&&(f(c),c.params.target.html(c.data.html))),"complete"!==c.data.status&&"success"!==c.data.type||c.data.entry||c.params.trigger[0].reset(),c.data.url&&(c.params.trigger.hide(),window.location=c.data.url),c.params.trigger.find(".cf-uploader-trigger").slideDown(),c.data.fields){var e=c.params.trigger;b(c.data.fields,e,d)}if("undefined"!=c.data.scroll){var h=document.getElementById(c.data.scroll);if(null!=h){var i=jQuery(h);jQuery("html,body").animate({scrollTop:i.offset().top-i.outerHeight()-12},300)}}jQuery(document).trigger("cf.submission",c),jQuery(document).trigger("cf."+c.data.type)}})})()});var resBaldrickTriggers;jQuery(function(a){var b=[],c=function(c,d,e){var f=a("#progress-file-"+d),g=a("."+d+" .file-size");b.push(1),cf_uploader_filelist[d].state=2,a.ajax({xhr:function(){var a=new window.XMLHttpRequest;return a.upload.addEventListener("progress",function(a){if(a.lengthComputable){var b=a.loaded/a.total*100;f.width(b+"%"),g.html(size_format(a.loaded)+" / "+size_format(a.total))}},!1),a.addEventListener("progress",function(a){a.lengthComputable&&(a.loaded,a.total)},!1),a},url:c.data("request")+"/upload/",type:"POST",data:e,processData:!1,contentType:!1,success:function(e,f,g){if(e.success&&!0===e.success){b.pop();var h=a('[data-file="'+d+'"]');h.next().addClass("file-uploaded"),h.remove(),cf_uploader_filelist[d].state=3,c.submit()}else if(e.data&&!e.success)return a("."+d).addClass("has-error"),c.find(":submit").prop("disabled",!1),c.find(".cf-uploader-trigger").slideDown(),void a("."+d+" .file-error").html(e.data)},error:function(a,b,d){c.data("postDisable")||buttons.prop("disabled",!1)}})};(resBaldrickTriggers=function(){a(".cfajax-trigger").baldrick({request:"./",method:"POST",init:function(d,e){e.preventDefault();var f=a(d),g=f.find(":submit");if(f.data("_cf_manual"))return f.find('[name="cfajax"]').remove(),!1;if(f.data("postDisable")||g.prop("disabled",!0),"object"==typeof cf_uploader_filelist){f.find(".cf-uploader-trigger").slideUp();var h=!1,i=b.length;for(var j in cf_uploader_filelist)if(!(cf_uploader_filelist[j].state>1||0===cf_uploader_filelist[j].state)){h=!0;var k=new FormData,l=j,m=a("#"+l.split("_file_")[0]);if(k.append(m.data("field"),cf_uploader_filelist[j].file),k.append("field",m.data("field")),k.append("control",m.data("controlid")),c(f,l,k),1===++i)break}if(!0===h||b.length)return!1}},error:function(a){404===a.jqxhr.status&&this.trigger.data("_cf_manual",!0).trigger("submit")},callback:function(b){if(b.params.trigger.find(":submit").prop("disabled",!1),b.params.trigger.data("instance"),b.params.trigger.data("customCallback")&&"function"==typeof window[b.params.trigger.data("customCallback")]&&window[b.params.trigger.data("customCallback")](b.data),b.params.trigger.data("inhibitnotice")||(a(".caldera_ajax_error_wrap").removeClass("caldera_ajax_error_wrap").removeClass("has-error"),a(".caldera_ajax_error_block").remove(),"complete"===b.data.status||"success"===b.data.type?(b.data.html&&b.params.target.html(b.data.html),b.params.trigger.data("hiderows")&&b.params.trigger.find("div.row").remove()):"preprocess"===b.data.status?b.params.target.html(b.data.html):"error"===b.data.status&&b.params.target.html(b.data.html)),"complete"!==b.data.status&&"success"!==b.data.type||b.data.entry||b.params.trigger[0].reset(),b.data.url&&(b.params.trigger.hide(),window.location=b.data.url),b.params.trigger.find(".cf-uploader-trigger").slideDown(),b.data.fields)for(var c in b.data.fields){var d=b.params.trigger.find('[data-field="'+c+'"]'),e=d.parent();e.is("label")&&(e=e.parent(),(e.hasClass("checkbox")||e.hasClass("radio"))&&(e=e.parent()));var f=e.find(".help-block").not(".caldera_ajax_error_block");e.addClass("has-error").addClass("caldera_ajax_error_wrap"),f.length&&f.hide(),e.append('<span class="help-block caldera_ajax_error_block">'+b.data.fields[c]+"</span>")}a(document).trigger("cf.submission",b),a(document).trigger("cf."+b.data.type)}})})()});
|
assets/build/js/caldera-forms-front.min.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
function CFEvents(a){function b(a){return c.hasOwnProperty(a)}var c={};this.subscribe=function(a,d){b(a)||(c[a]=[]),c[a].push(d)},this.trigger=function(d,e){b(d)&&c[d].forEach(function(b){void 0===e&&(e=a.getState(d)),b(d,e)})},this.emit=function(a,d){b(a)&&c[a].forEach(function(b){b(d,a)})},this.detach=function(a,d){if(b(a))if(null===d)delete c[a];else for(var e in c[a])d===e&&c[a].splice(e,1)}}function CFState(a,b){function c(a){return m.hasOwnProperty(a)}function d(a){var c=b("#"+a);if(c.length)return c.on("change keyup",function(){var a=b(this);n[a.attr("id")]=f(a),j.mutateState([a.attr("id")],a.val())}),n[a]=f(b(document.getElementById(a))),j.mutateState([c.attr("id")],c.val()),c.trigger("cf.bind",{field:c.attr("id")}),!0;if(c=b("."+a),c.length){if("object"==typeof c){var d=[],e=0;c.each(function(c,h){var i=b(h),j=0;i.prop("checked")&&(j+=g(f(i)),e+=j,d.push(i.val())),n[a]=e})}return c.on("change",function(){var a,d,e=[],h=b(this),i=h.attr("type");switch(i){case"radio":a=h.data("radio-field"),d=b("[data-radio-field="+a+"]"),e="";break;case"checkbox":a=h.data("checkbox-field"),d=b("[data-checkbox-field="+a+"]");break;default:a=h.data("field"),d=b("[data-field="+a+"]")}if("checkbox"===i){var k,l=0;d.length?d.each(function(a,c){k=b(c),k.prop("checked")&&(l+=g(f(k)),e.push(k.val()))}):e=[],n[a]=l}else d.length?1==d.length?e=f(b(d[0])):d.each(function(c,d){var g=b(d);g.prop("checked")&&("radio"===i?(n[a]=f(g),e=g.val()):e.push(g.val()))}):e=0;j.mutateState(a,e),c.trigger("cf.bind",{field:c.attr("id")})}),!0}return j.unbind(a),!1}function e(a,b){m[a]=0,n[a]=0,j.events().subscribe(a,function(a,b){n[a]=b})}function f(a){if(a.is("select")&&a.has("option")&&(a=a.find(":selected")),!a.length)return 0;if(a.is("hidden"))return a.val();var b=0,c=a.attr("data-calc-value");return b=void 0===c||!1===c||isNaN(c)?a.val():a.data("calc-value"),g(b)}function g(a){return!a||isNaN(a)?0:window.parseFloat(a)}function h(a){return"number"==typeof a}function i(a){return"string"==typeof a}var j=this,k=new CFEvents(this),l={},m={},n={};this.init=function(a,b){for(var c in a)"object"==typeof b[c]?"calculation"==b[c].type&&e(c,b[c]):d(c)?(m[c]=a[c],b.hasOwnProperty(c)?n[c]=b[c]:n[c]=null):(m[c]="",l[c]=!0,n[c]=null)},this.getState=function(a){return!!c(a)&&m[a]},this.getCalcValue=function(a,d){var e=0;if(!c(a))return e;if(d){d=0;var k,l=d;return b("#"+a).each(function(){l=0,k=b(this),k.prop("checked")&&(l=f(k),g(l)>g(d)&&(d=g(l)))}),g(d)}if(n.hasOwnProperty(a)){if(!1===n[a]||null===n[a]||0===n[a]){var m=f(b(document.getElementById(a)));i(m)&&(m=g(m)),h(m)&&(n[a]=m)}e=n[a]}else e=j.getState(a),b.isArray(e)&&(e=e.reduce(function(a,b){return g(a)+g(b)},0)),h(e)&&(n[a]=e);return g(e)},this.mutateState=function(a,b){return!!c(a)&&(m[a]!=b&&(m[a]=b,k.trigger(a,b)),!0)},this.unbind=function(a){j.mutateState(a,""),l[a]=!0,delete n[a]},this.rebind=function(a){d(a),delete l[a]},this.events=function(){return{subscribe:function(a,b){c(a)&&k.subscribe(a,b)},detach:function(a,b){k.detach(a,b)},emit:function(a,b){k.emit(a,b)},attatchEvent:function(a,b){k.subscribe(a,b)}}}}function color_picker_init(){jQuery(".minicolor-picker").miniColors()}function toggle_button_init(a,b){var c=jQuery(b),d=c.find(".cf-toggle-group-radio:checked");d.length&&jQuery("#"+d.data("ref")).trigger("click")}function Caldera_Forms_Field_Config(a,b,c,d){function e(a,b,c,d){var e=b.parent().parent();return e.removeClass("has-error"),e.find(".help-block").remove(),a?(e.removeClass("has-error"),h(),!0):(e.addClass("has-error").append('<span id="cf-error-'+b.attr("id")+'" class="help-block '+d+'">'+c+"</span>"),b.prop("required")&&g(b),b.addClass("parsely-error"),!1)}function f(a){return!a.closest(".caldera-form-page").attr("aria-hidden")}function g(a){f(a)&&m.prop("disabled",!0).attr("aria-disabled",!0)}function h(){m.prop("disabled",!1).attr("aria-disabled",!1)}function i(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null,c||a.apply(e,f)},h=c&&!d;clearTimeout(d),d=setTimeout(g,b),h&&a.apply(e,f)}}function j(){c.prototype.inputmask&&b.find("[data-inputmask]").inputmask()}var k=this,l={},m=(b.data("instance"),b.find(":submit, .cf-page-btn-next"));this.init=function(){c.each(a,function(a,b){l[b.id]=k[b.type](b)}),j(),c(document).on("cf.add",j)},this.button=function(a){var b=a.id;c(document).on("click dblclick","#"+b,function(a){c("#"+b+"_btn").val(a.type).trigger("change")})},this.html=function(a){if(0!=a.sync){var b,e={},f=a.bindFields,g=c(document.getElementById(a.contentId));b=function(){if(g.length||(g=c(document.getElementById(a.contentId))),g.length){void 0==e[a.tmplId]&&(e[a.tmplId]=c(document.getElementById(a.tmplId)).html());for(var b,h=e[a.tmplId],i=0;i<=f.length;i++)"object"==typeof f[i]&&f[i].hasOwnProperty("to")&&f[i].hasOwnProperty("tag")&&(b=d.getState(f[i].to),b=0===b||"0"===b||b?isNaN(b)?"string"==typeof b?b.replace(/(?:\r\n|\r|\n)/g,"<br />"):b&&void 0!=b.join&&void 0!==b&&void 0!==b?b.join(", "):"":b.toString():"",h=h.replace(f[i].tag,b));g.html(h).trigger("change")}},function(){for(var a=0;a<=f.length;a++)"object"==typeof f[a]&&f[a].hasOwnProperty("to")&&d.events().subscribe(f[a].to,b);c(document).on("cf.pagenav cf.modal",b)}(),b()}},this.summary=this.html;var n={};this.range_slider=function(a){function b(b){b.parent().find(".rangeslider").css("backgroundColor",a.trackcolor),b.parent().find(".rangeslider__fill").css("backgroundColor",a.color),b.parent().find(".rangeslider__handle").css("backgroundColor",a.handle).css("borderColor",a.handleborder)}var e=c(document.getElementById(a.id));c(document).on("cf.pagenav cf.add cf.disable cf.modal",function(){var e=document.getElementById(a.id);if(null!=e){var f=c(e),g=n[a.id].value;if(!f.is(":visible"))return;f.val(g),f.rangeslider("destroy"),f.rangeslider(n[a.id].init),f.val(g).change(),b(f),d.mutateState(a.id,g)}}),function(){"object"!=n[a.id]&&(n[a.id]={value:a.default,init:{},inited:!1});var f={onSlide:function(b,c){d.mutateState(a.id,c),n[a.id].value=c},onInit:function(){this.value=d.getState(a.id),n[a.id].inited=!0,b(e)},polyfill:!1};n[a.id].init=f,d.events().subscribe(a.id,function(b,d){d.length<=0&&(d=a.default),c("#"+a.id+"_value").html(d)}),e.is(":visible")&&e.rangeslider(f)}()},this.star_rating=function(a){var b=a.options.score,d=c(document.getElementById(a.starFieldId)),e=(c(document.getElementById(a.id)),function(){var c=a.options;c.click=function(){b=d.raty("score"),d.trigger("change")},d.raty(c),d.raty("score",b)});e();var f=!1;jQuery(document).on("cf.add",function(){!1===f&&(f=!0,d.length&&(d.raty("destroy"),e()),setTimeout(function(){f=!1},500))})},this.toggle_switch=function(a){c(document).on("reset","#"+a.id,function(b){c.each(a.options,function(b,d){c(document.getElemenetById(d)).removeClass(a.selectedClassName).addClass(a.defaultClassName)}),c(document.getElementById(a.id)).prop("checked","")})},this.phone_better=function(a){var d=a.id,f=!0,g=function(){var a=document.getElementById("cf-error-"+d);f=!0,null!=a&&a.remove()},i=function(){var b=c(document.getElementById(d));g();var h,i=c.trim(b.val());i&&(h=!!b.intlTelInput("isValidNumber"));var j,k=b.intlTelInput("getValidationError"),l=b.intlTelInput("getSelectedCountryData");return 0==k?(h=!0,j=""):i=="+"+l.dialCode?(h=!0,j=""):i?j="undefined"!=a.messages[k]?a.messages[k]:a.messages.generic:(h=!0,j=""),f=h,e(h,b,j,"help-block-phone_better"),h},j=function(){$field=c(document.getElementById(d)),$field.intlTelInput(a.options),$field.on("keyup change",g),$field.blur(function(){g(),i()}),$field.on("keyup change",i),b.on("submit",function(){i()})};c(document).on("cf.pagenav cf.add cf.disable cf.modal",j),c(document).on("cf.add",function(){g(),i()}),c("#"+a.form_id_attr+' [data-page="next"], #'+a.form_id_attr+' form.caldera_forms_form [type="submit"]').click(function(a){!1===i()&&(a.preventDefault(),a.stopPropagation())}),c(document).on("cf.remove",function(a,b){b.hasOwnProperty("field")&&d===b.field&&(f||h())}),j()},this.wysiwyg=function(a){var b=document.getElementById(a.id);if(null!=b){var d=c(b);d.trumbowyg(a.options);var e=d.parent().find(".trumbowyg-editor");e.html(d.val()),e.bind("input propertychange",function(){d.val(e.html())})}},this.credit_card_number=function(a){function b(b){var e={0:"amex",1:"discover",2:"visa",3:"discover",4:"mastercard"},f="credit-card.svg";c.each(e,function(a,c){if(0===b.indexOf(c))return f="cc-"+c+".svg",!1}),d.css("background",'url("'+a.imgPath+f+'")')}var d=c(document.getElementById(a.id));0==a.exp&&0==a.cvc||function(){g(d);var b=c(document.getElementById(a.cvc)),e=c(document.getElementById(a.exp));b.blur(function(){b.val()&&k.creditCardUtil.validateCVC(d,b),e.val()&&k.creditCardUtil.validateExp(e)})}(),d.length&&(d.payment("formatCardNumber"),d.blur(function(){var f=d.val(),g=c.payment.validateCardNumber(f),h=c.payment.cardType(f);e(g,d,a.invalid,"help-block-credit_card_number help-block-credit_card"),g&&b(h)}))},this.credit_card_exp=function(a){var b=c(document.getElementById(a.id));b.length&&(b.payment("formatCardExpiry"),b.blur(function(){e(k.creditCardUtil.validateExp(b),b,a.invalid,"help-block-credit_card_exp help-block-credit_card")}))},this.credit_card_cvc=function(a){var b=c(document.getElementById(a.id));if(b.length&&(b.payment("formatCardCVC"),!1!==a.ccField)){var d=c(document.getElementById(a.ccField));b.blur(function(){e(k.creditCardUtil.validateExp(d,b),b,a.invalid,"help-block-credit_card_cvc help-block-credit_card")})}},this.creditCardUtil={validateCVC:function(a,b){var d=b.val(),e=c.payment.validateCardNumber(a.val()),f=!1;if(e){var g=c.payment.cardType(a.val());f=c.payment.validateCardCVC(d,g)}return f},validateExp:function(a){var b=a.val().split("/");if(b&&2==b.length)return c.payment.validateCardExpiry(b[0].trim(),b[1].trim())}},this.color_picker=function(a){c(document.getElementById(a.id)).miniColors(a.settings),c(document).on("cf.pagenav cf.add cf.disable cf.modal",function(){c(document.getElementById(a.id)).miniColors(a.settings)})},this.calculation=function(a){function b(b){b+="";for(var c=b.split("."),d=c[0],e=c.length>1?a.decimalSeparator+c[1]:"",f=/(\d+)(\d{3})/;f.test(d);)d=d.replace(f,"$1"+a.thousandSeparator+"$2");return d+e}var e=null,f=i(function(){g(d)},250),g=function(){var f=window[a.callback].apply(null,[d]);isFinite(f)||(f=0),e=f,d.mutateState(a.id,f),"number"!=typeof f&&(f=parseInt(f,10)),a.moneyFormat&&(f=f.toFixed(2)),c("#"+a.id).html(b(f)).data("calc-value",f),c("#"+a.targetId).val(f).trigger("change")};c.each(a.fieldBinds,function(a,b){d.events().subscribe(b,f)}),c(document).on("cf.pagenav cf.add cf.remove cf.modal",function(b,c){"cf"==b.type&&"remove"===b.namespace&&"object"==typeof c&&c.hasOwnProperty("field")&&c.field===a.id?e=null:f()}),f()},this.color_picker=function(){function a(){jQuery(".minicolor-picker").miniColors()}document.addEventListener("load",a,!1),jQuery(document).ajaxComplete(function(){a()})}}function CalderaFormsFieldSync(a,b,c,d,e){for(var f=0;f<b.length;f++)d(document).on("keyup change blur mouseover","[data-field='"+b[f]+"']",function(){if(a.data("sync")){var b=a.data("sync");if(id=a.data("field"),reg=new RegExp("{{([^}]*?)}}","g"),template=b.match(reg),!a.data("unsync")&&void 0!=template&&template.length){for(var f=0;f<template.length;f++){for(var g=template[f].replace(/\}/g,"").replace(/\{/g,""),h=new RegExp(template[f],"g"),i=c.find("[data-field='"+g+"']"),j="",k=0;k<i.length;k++){var l=d(i[k]);(!l.is(":radio")&&!l.is(":checkbox")||l.is(":checked"))&&(j+=l.val())}b=b.replace(h,j)}e.mutateState(a.attr("id"),j),a.val(b)}}}),d("[data-field='"+b[f]+"']").trigger("change"),a.on("keyup change",function(){a.attr("data-unsync","1"),a.removeAttr("data-sync"),a.removeAttr("data-binds")})}function CalderaFormsResetNonce(a,b,c){function d(a){return(new Date).getTime()-36e3>a}function e(){c.ajax({url:b.rest.tokens.nonce,method:"POST",beforeSend:function(a){a.setRequestHeader("X-WP-Nonce",b.rest.nonce)},data:{form_id:a}}).done(function(a){f.val(a.nonce),f.data("nonce-time",(new Date).getTime())})}var f;this.init=function(){f=c("#"+b.nonce.field+"_"+a),d(f.data("nonce-time"))&&e()}}function caldera_forms_check_protocol(a){var b=window.location.protocol,c=document.createElement("a");return c.href=a,c.protocol===b}function CalderaFormsCrossOriginWarning(a,b,c){function d(){b(a.data("target")).append('<div class="alert alert-warning">'+c.mixed_protocol+"</div>")}this.maybeWarn=function(){if(a.find('[name="cfajax"]').length){caldera_forms_check_protocol(a.data("request"))||d()}}}function CalderaFormsJQueryWarning(a,b,c){function d(){b(a.data("target")).append('<div class="alert alert-warning">'+c.jquery_old+"</div>")}function e(a){var b=a.split(".");if(1==b[0]){if(12>b[2])return!0;if(4>b[2])return!0}return!1}this.maybeWarn=function(){var a=b.fn.jquery;"string"==typeof a&&"1.12.4"!=a&&e(a)&&d()}}var resBaldrickTriggers;jQuery(function(a){function b(a,b,c){for(var d in a){var e=b.find('[data-field="'+d+'"]'),f=e.parent();if(e.length){f.is("label")&&(f=f.parent(),(f.hasClass("checkbox")||f.hasClass("radio"))&&(f=f.parent()));var g=f.find(".help-block").not(".caldera_ajax_error_block");f.addClass("has-error").addClass("caldera_ajax_error_wrap"),g.length&&g.hide(),f.append('<span class="help-block caldera_ajax_error_block">'+a[d]+"</span>")}else c.html('<p class="alert alert-danger ">'+a[d]+"</p>")}}var c=[],d=function(b,d,e){var f=a("#progress-file-"+d),g=a("."+d+" .file-size");c.push(1),cf_uploader_filelist[d].state=2,a.ajax({xhr:function(){var a=new window.XMLHttpRequest;return a.upload.addEventListener("progress",function(a){if(a.lengthComputable){var b=a.loaded/a.total*100;f.width(b+"%"),g.html(size_format(a.loaded)+" / "+size_format(a.total))}},!1),a.addEventListener("progress",function(a){if(a.lengthComputable){a.loaded,a.total}},!1),a},url:b.data("request")+"/upload/",type:"POST",data:e,processData:!1,contentType:!1,success:function(e,f,g){if(e.success&&!0===e.success){c.pop();var h=a('[data-file="'+d+'"]');h.next().addClass("file-uploaded"),h.remove(),cf_uploader_filelist[d].state=3,b.submit()}else if(e.data&&!e.success)return a("."+d).addClass("has-error"),b.find(":submit").prop("disabled",!1),b.find(".cf-uploader-trigger").slideDown(),void a("."+d+" .file-error").html(e.data)},error:function(a,c,d){b.data("postDisable")||buttons.prop("disabled",!1)}})};(resBaldrickTriggers=function(){var e=function(b){return a("#caldera_notices_"+b.params.trigger.data("instance"))},f=function(b){return a("#caldera-forms-breadcrumb_"+b.params.trigger.data("instance"))},g=function(a){var b=f(a);b.length&&b.show().attr("aria-hidden",!1).css("visibility","visible")},h=function(a){var b=f(a);b.length&&b.show().attr("aria-hidden",!0).css("visibility","hidden")};a(".cfajax-trigger").baldrick({request:"./",method:"POST",init:function(e,f){f.preventDefault();var g=a(e),h=g.find(":submit"),i=[];if(a(document).trigger("cf.ajax.request",{$form:g,formIdAttr:g.attr("id"),displayFieldErrors:b,fieldsBlocking:i,$notice:a("#caldera_notices_"+g.data("instance"))}),"object"==typeof window.cf2)var j=window.cf2[g.attr("id")];if("object"==typeof j){if(j.hasOwnProperty("pending")&&0!==j.pending.length)return!1;if(j.hasOwnProperty("fieldsBlocking")&&0!==j.fieldsBlocking.length)return!1}if(g.data("_cf_manual"))return g.find('[name="cfajax"]').remove(),!1;if(g.data("postDisable")||h.prop("disabled",!0),"object"==typeof cf_uploader_filelist){g.find(".cf-uploader-trigger").slideUp();var k=!1,l=c.length;for(var m in cf_uploader_filelist)if(!(cf_uploader_filelist[m].state>1||0===cf_uploader_filelist[m].state)){k=!0;var n=new FormData,o=m,p=a("#"+o.split("_file_")[0]);if(n.append(p.data("field"),cf_uploader_filelist[m].file),n.append("field",p.data("field")),n.append("control",p.data("controlid")),d(g,o,n),p.val(""),p.attr("type","hidden"),p.val(p.data("controlid")),1===++l)break}if(!0===k||c.length)return!1}},error:function(b){if(404===b.jqxhr.status)this.trigger.data("_cf_manual",!0).trigger("submit");else{var c=e(b);b.jqxhr.responseJSON.data.html&&(c.html(b.jqxhr.responseJSON.data.html),a("html,body").animate({scrollTop:c.offset().top-c.outerHeight()},300))}},callback:function(c){c.params.trigger.find(":submit").prop("disabled",!1);var d=e(c);if(c.params.trigger.data("customCallback")&&"function"==typeof window[c.params.trigger.data("customCallback")]&&window[c.params.trigger.data("customCallback")](c.data),c.params.trigger.data("inhibitnotice")||(a(".caldera_ajax_error_wrap").removeClass("caldera_ajax_error_wrap").removeClass("has-error"),a(".caldera_ajax_error_block").remove(),"complete"===c.data.status||"success"===c.data.type?(h(c),c.data.html&&c.params.target.html(c.data.html),c.params.trigger.data("hiderows")&&c.params.trigger.find("div.row").remove()):"preprocess"===c.data.status?(g(c),c.params.target.html(c.data.html)):"error"===c.data.status&&(g(c),c.params.target.html(c.data.html))),"complete"!==c.data.status&&"success"!==c.data.type||c.data.entry||c.params.trigger[0].reset(),c.data.url&&(c.params.trigger.hide(),window.location=c.data.url),c.params.trigger.find(".cf-uploader-trigger").slideDown(),c.data.fields){var f=c.params.trigger;b(c.data.fields,f,d)}if("undefined"!=c.data.scroll){var i=document.getElementById(c.data.scroll);if(null!=i){var j=a(i);a("html,body").animate({scrollTop:j.offset().top-j.outerHeight()-12},300)}}a(document).trigger("cf.submission",c),a(document).trigger("cf."+c.data.type)}})})()});var calders_forms_check_conditions,calders_forms_init_conditions;!function(a){var b={},c={};Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=this.length>>>0,c=Number(arguments[1])||0;for(c=c<0?Math.ceil(c):Math.floor(c),c<0&&(c+=b);c<b;c++)if(c in this&&this[c]===a)return c;return-1}),cf_debounce=function(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null,c||a.apply(e,f)},h=c&&!d;clearTimeout(d),d=setTimeout(g,b),h&&a.apply(e,f)}},calders_forms_check_conditions=function(d){function e(a){if(b[a])return b[a]}function f(a){return"object"==typeof window.cfstate&&window.cfstate.hasOwnProperty(a)?window.cfstate[a]:null}function g(a,b,c){var d=f(c);d&&d.events().emit(function(){return"cf.conditionals."+a}(),{fieldIdAttr:b,formIdAttr:c,eventType:a,fieldValue:e(b)})}if("undefined"!=typeof caldera_conditionals&&void 0!==caldera_conditionals[d]){var h=a(document.getElementById(d)),i=f(d);for(var j in caldera_conditionals[d]){if(jQuery("#conditional_"+j).length){var k=caldera_conditionals[d][j].type,l=caldera_conditionals[d][j].group,m=[];for(var n in l){var o={},p=l[n];for(var q in p){var r=h.find('[data-field="'+p[q].field+'"]'),s=[],t="function"==typeof p[q].value?p[q].value():p[q].value;if(void 0!==p[q].selectors)for(var u in p[q].selectors){var v=new RegExp(u,"g");t=t.replace(v,a(p[q].selectors[u]).val())}if(o[q]=!1,r.is(":radio,:checkbox"))r=r.filter(":checked");else if(r.is("div"))r=jQuery("<input>").val(r.html());else if(!r.length){var w=h.find('[data-calc-field="'+p[q].field+'"]');w.length&&(r=h.find('[data-calc-field="'+p[q].field+'"]'))}if(r.length)for(var x=0;x<r.length;x++)s.push(r[x].value);else s.push(p[q].field);switch(p[q].compare){case"is":s.length&&s.indexOf(t.toString())>=0&&(o[q]=!0);break;case"isnot":s.length&&s.indexOf(t)<0&&(o[q]=!0);break;case">":case"greater":o[q]=parseFloat(s.reduce(function(a,b){return a+b}))>parseFloat(t);break;case"<":case"smaller":o[q]=parseFloat(s.reduce(function(a,b){return a+b}))<parseFloat(t);break;case"startswith":for(var x=0;x<s.length;x++)s[x].toLowerCase().substr(0,t.toLowerCase().length)===t.toLowerCase()&&(o[q]=!0);break;case"endswith":for(var x=0;x<s.length;x++)s[x].toLowerCase().substr(s[x].toLowerCase().length-t.toLowerCase().length)===t.toLowerCase()&&(o[q]=!0);break;case"contains":for(var x=0;x<s.length;x++)s[x].toLowerCase().indexOf(t)>=0&&(o[q]=!0)}}istrue=!0;for(var y in o)if(!1===o[y]){istrue=!1;break}m.push(istrue)}var z,A=jQuery("#conditional-"+j+"-tmpl").html(),B=jQuery("#conditional_"+j),C=jQuery('[data-field="'+j+'"]');if(m.length&&m.indexOf(!0)>=0?"show"===k?z="show":"hide"===k?z="hide":"disable"===k&&(z="disable"):z="show"===k?"hide":"disable"===k?"enable":"show","show"===z)B.html().length||(B.html(A).trigger("cf.add",{field:j}),jQuery(document).trigger("cf.add",{field:j}),function(b,d){var f,g=e(b);if(void 0!=g)if("object"==typeof g)for(var i in g)!0===g[i]&&(f=a(document.getElementById(i)),f.prop("checked",!0));else f=a("#"+b),f.val(g);null!==d&&(d.rebind(b),void 0===f&&(f=a("#"+b)),c.hasOwnProperty(b)&&(f.attr("data-unsync","1"),f.removeAttr("data-sync"),f.removeAttr("data-binds")),void 0!==f&&f.data("sync")&&new CalderaFormsFieldSync(f,f.data("binds"),h,a,d))}(j,i)),g("show",j,d);else if("hide"===z)B.html().length&&(!function(d,e){var f=a(document.getElementById(d));if(f.length){var g=f.val();g&&(b[d]=g)}else{var h;f=a("."+d),b[d]={},f.each(function(c,e){h=a(e),h.prop("checked")?b[d][h.attr("id")]=!0:b[d][h.attr("id")]=!1})}f.data("unsync")&&(c[d]=!0),null!==e&&e.unbind(d),b[d]}(j,i),C.val("").empty().prop("checked",!1),B.empty().trigger("cf.remove",{field:j}),jQuery(document).trigger("cf.remove",{field:j})),g("hide",j,d);else if("enable"===z||"disable"===z){var D=jQuery("#"+j);"enable"==z?(B.html().length?D.prop("disabled",!1):(B.html(A).trigger("cf.add",{field:j}),jQuery(document).trigger("cf.add").trigger("cf.enable",{field:j}),D.prop("disabled",!1)),g("enable",j,d)):(B.html().length?D.prop("disabled","disabled",{field:j}):(B.html(A).trigger("cf.remove"),jQuery(document).trigger("cf.remove",{field:j}).trigger("cf.disable",{field:j}),D.prop("disabled","disabled",{field:j})),g("disable",j,d))}}}}},calders_forms_init_conditions=function(){jQuery(".caldera_forms_form").on("change keyup","[data-field]",cf_debounce(function(b){var c=a(this).closest(".caldera_forms_form").prop("id");calders_forms_check_conditions(c)},10))},"undefined"!=typeof caldera_conditionals&&(calders_forms_init_conditions(),jQuery(".caldera_forms_form").find("[data-field]").first().trigger("change"))}(jQuery),function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{configurable:!1,enumerable:!0,get:d})},b.n=function(a){var c=a&&a.__esModule?function(){return a.default}:function(){return a};return b.d(c,"a",c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p="",b(b.s=3)}([function(a,b,c){"use strict";var d,e,f,g;"function"==typeof Symbol&&Symbol.iterator,g=function(a){return a},e=[c(2)],void 0===(f="function"==typeof(d=g)?d.apply(b,e):d)||(a.exports=f)},function(a,b,c){"use strict";var d,e,f,g,h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};g=function(a,b,c,d){function e(b,c,g){if(!(this instanceof e))return new e(b,c,g);this.el=d,this.events={},this.maskset=d,this.refreshValue=!1,!0!==g&&(a.isPlainObject(b)?c=b:(c=c||{},b&&(c.alias=b)),this.opts=a.extend(!0,{},this.defaults,c),this.noMasksCache=c&&c.definitions!==d,this.userOptions=c||{},this.isRTL=this.opts.numericInput,f(this.opts.alias,c,this.opts))}function f(b,c,g){var h=e.prototype.aliases[b];return h?(h.alias&&f(h.alias,d,g),a.extend(!0,g,h),a.extend(!0,g,c),!0):(null===g.mask&&(g.mask=b),!1)}function g(b,c){function f(b,f,g){var h=!1;if(null!==b&&""!==b||((h=null!==g.regex)?b=(b=g.regex).replace(/^(\^)(.*)(\$)$/,"$2"):(h=!0,b=".*")),1===b.length&&!1===g.greedy&&0!==g.repeat&&(g.placeholder=""),g.repeat>0||"*"===g.repeat||"+"===g.repeat){var i="*"===g.repeat?0:"+"===g.repeat?1:g.repeat;b=g.groupmarker[0]+b+g.groupmarker[1]+g.quantifiermarker[0]+i+","+g.repeat+g.quantifiermarker[1]}var j,k=h?"regex_"+g.regex:g.numericInput?b.split("").reverse().join(""):b;return e.prototype.masksCache[k]===d||!0===c?(j={mask:b,maskToken:e.prototype.analyseMask(b,h,g),validPositions:{},_buffer:d,buffer:d,tests:{},excludes:{},metadata:f,maskLength:d},!0!==c&&(e.prototype.masksCache[k]=j,j=a.extend(!0,{},e.prototype.masksCache[k]))):j=a.extend(!0,{},e.prototype.masksCache[k]),j}if(a.isFunction(b.mask)&&(b.mask=b.mask(b)),a.isArray(b.mask)){if(b.mask.length>1){if(null===b.keepStatic){b.keepStatic="auto";for(var g=0;g<b.mask.length;g++)if(b.mask[g].charAt(0)!==b.mask[0].charAt(0)){b.keepStatic=!0;break}}var h=b.groupmarker[0];return a.each(b.isRTL?b.mask.reverse():b.mask,function(c,e){h.length>1&&(h+=b.groupmarker[1]+b.alternatormarker+b.groupmarker[0]),e.mask===d||a.isFunction(e.mask)?h+=e:h+=e.mask}),f(h+=b.groupmarker[1],b.mask,b)}b.mask=b.mask.pop()}return b.mask&&b.mask.mask!==d&&!a.isFunction(b.mask.mask)?f(b.mask.mask,b.mask,b):f(b.mask,b.mask,b)}function i(a){var b=c.createElement("input"),d="on"+a,e=d in b;return e||(b.setAttribute(d,"return;"),e="function"==typeof b[d]),b=null,e}function j(f,g,k){function o(a,b,c,e,f){var g=k.greedy;f&&(k.greedy=!1),b=b||0;var h,i,j,l=[],m=0,n=r();do{if(!0===a&&p().validPositions[m])i=(j=f&&!0===p().validPositions[m].match.optionality&&p().validPositions[m+1]===d&&(!0===p().validPositions[m].generatedInput||p().validPositions[m].input==k.skipOptionalPartCharacter&&m>0)?u(m,y(m,h,m-1)):p().validPositions[m]).match,h=j.locator.slice(),l.push(!0===c?j.input:!1===c?i.nativeDef:L(m,i));else{i=(j=v(m,h,m-1)).match,h=j.locator.slice();var o=!0!==e&&(!1!==k.jitMasking?k.jitMasking:i.jit);(!1===o||o===d||m<n||"number"==typeof o&&isFinite(o)&&o>m)&&l.push(!1===c?i.nativeDef:L(m,i))}"auto"===k.keepStatic&&i.newBlockMarker&&null!==i.fn&&(k.keepStatic=m-1),m++}while((Y===d||m<Y)&&(null!==i.fn||""!==i.def)||b>m);return""===l[l.length-1]&&l.pop(),!1===c&&p().maskLength!==d||(p().maskLength=m-1),k.greedy=g,l}function p(){return g}function q(a){var b=p();b.buffer=d,!0!==a&&(b.validPositions={},b.p=0)}function r(a,b,c){var e=-1,f=-1,g=c||p().validPositions;for(var h in a===d&&(a=-1),g){var i=parseInt(h);g[i]&&(b||!0!==g[i].generatedInput)&&(i<=a&&(e=i),i>=a&&(f=i))}return-1===e||e==a?f:-1==f?e:a-e<f-a?e:f}function s(a){var b=a.locator[a.alternation];return"string"==typeof b&&b.length>0&&(b=b.split(",")[0]),b!==d?b.toString():""}function t(a,b){var c=(a.alternation!=d?a.mloc[s(a)]:a.locator).join("");if(""!==c)for(;c.length<b;)c+="0";return c}function u(a,b){for(var c,e,f,g=t(w(a=a>0?a-1:0)),h=0;h<b.length;h++){var i=b[h];c=t(i,g.length);var j=Math.abs(c-g);(e===d||""!==c&&j<e||f&&f.match.optionality&&"master"===f.match.newBlockMarker&&(!i.match.optionality||!i.match.newBlockMarker)||f&&f.match.optionalQuantifier&&!i.match.optionalQuantifier)&&(e=j,f=i)}return f}function v(a,b,c){return p().validPositions[a]||u(a,y(a,b?b.slice():b,c))}function w(a,b){return p().validPositions[a]?p().validPositions[a]:(b||y(a))[0]}function x(a,b){for(var c=!1,d=y(a),e=0;e<d.length;e++)if(d[e].match&&d[e].match.def===b){c=!0;break}return c}function y(b,c,e){function f(c,e,h,j){function o(h,j,q){function r(b,c){var d=0===a.inArray(b,c.matches);return d||a.each(c.matches,function(a,e){if(!0===e.isQuantifier?d=r(b,c.matches[a-1]):!0===e.isOptional?d=r(b,e):!0===e.isAlternate&&(d=r(b,e)),d)return!1}),d}function s(b,c,e){var f,g;if((p().tests[b]||p().validPositions[b])&&a.each(p().tests[b]||[p().validPositions[b]],function(a,b){if(b.mloc[c])return f=b,!1;var h=e!==d?e:b.alternation,i=b.locator[h]!==d?b.locator[h].toString().indexOf(c):-1;(g===d||i<g)&&-1!==i&&(f=b,g=i)}),f){var h=f.locator[f.alternation];return(f.mloc[c]||f.mloc[h]||f.locator).slice((e!==d?e:f.alternation)+1)}return e!==d?s(b,c):d}function t(a,b){function c(a){for(var b,c,d=[],e=0,f=a.length;e<f;e++)if("-"===a.charAt(e))for(c=a.charCodeAt(e+1);++b<c;)d.push(String.fromCharCode(b));else b=a.charCodeAt(e),d.push(a.charAt(e));return d.join("")}return k.regex&&null!==a.match.fn&&null!==b.match.fn?-1!==c(b.match.def.replace(/[\[\]]/g,"")).indexOf(c(a.match.def.replace(/[\[\]]/g,""))):a.match.def===b.match.nativeDef}function u(a,b){if(b===d||a.alternation===b.alternation&&-1===a.locator[a.alternation].toString().indexOf(b.locator[b.alternation])){a.mloc=a.mloc||{};var c=a.locator[a.alternation];if(c!==d){if("string"==typeof c&&(c=c.split(",")[0]),a.mloc[c]===d&&(a.mloc[c]=a.locator.slice()),b!==d){for(var e in b.mloc)"string"==typeof e&&(e=e.split(",")[0]),a.mloc[e]===d&&(a.mloc[e]=b.mloc[e]);a.locator[a.alternation]=Object.keys(a.mloc).join(",")}return!0}a.alternation=d}return!1}if(i>5e3)throw"Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. "+p().mask;if(i===b&&h.matches===d)return l.push({match:h,locator:j.reverse(),cd:n,mloc:{}}),!0;if(h.matches!==d){if(h.isGroup&&q!==h){if(h=o(c.matches[a.inArray(h,c.matches)+1],j,q))return!0}else if(h.isOptional){var v=h;if(h=f(h,e,j,q)){if(a.each(l,function(a,b){b.match.optionality=!0}),g=l[l.length-1].match,q!==d||!r(g,v))return!0;m=!0,i=b}}else if(h.isAlternator){var w,x=h,y=[],z=l.slice(),A=j.length,B=e.length>0?e.shift():-1;if(-1===B||"string"==typeof B){var C,D=i,E=e.slice(),F=[];if("string"==typeof B)F=B.split(",");else for(C=0;C<x.matches.length;C++)F.push(C.toString());if(p().excludes[b]){for(var G=F.slice(),H=0,I=p().excludes[b].length;H<I;H++)F.splice(F.indexOf(p().excludes[b][H].toString()),1);0===F.length&&(p().excludes[b]=d,F=G)}(!0===k.keepStatic||isFinite(parseInt(k.keepStatic))&&D>=k.keepStatic)&&(F=F.slice(0,1));for(var J=!1,K=0;K<F.length;K++){C=parseInt(F[K]),l=[],e="string"==typeof B&&s(i,C,A)||E.slice(),x.matches[C]&&o(x.matches[C],[C].concat(j),q)?h=!0:0===K&&(J=!0),w=l.slice(),i=D,l=[];for(var L=0;L<w.length;L++){var M=w[L],N=!1;M.match.jit=M.match.jit||J,M.alternation=M.alternation||A,u(M);for(var O=0;O<y.length;O++){var P=y[O];if("string"!=typeof B||M.alternation!==d&&-1!==a.inArray(M.locator[M.alternation].toString(),F)){if(M.match.nativeDef===P.match.nativeDef){N=!0,u(P,M);break}if(t(M,P)){u(M,P)&&(N=!0,y.splice(y.indexOf(P),0,M));break}if(t(P,M)){u(P,M);break}if(U=P,null===(T=M).match.fn&&null!==U.match.fn&&U.match.fn.test(T.match.def,p(),b,!1,k,!1)){u(M,P)&&(N=!0,y.splice(y.indexOf(P),0,M));break}}}N||y.push(M)}}l=z.concat(y),i=b,m=l.length>0,h=y.length>0,e=E.slice()}else h=o(x.matches[B]||c.matches[B],[B].concat(j),q);if(h)return!0}else if(h.isQuantifier&&q!==c.matches[a.inArray(h,c.matches)-1])for(var Q=h,R=e.length>0?e.shift():0;R<(isNaN(Q.quantifier.max)?R+1:Q.quantifier.max)&&i<=b;R++){var S=c.matches[a.inArray(Q,c.matches)-1];if(h=o(S,[R].concat(j),S)){if((g=l[l.length-1].match).optionalQuantifier=R>Q.quantifier.min-1,g.jit=R+S.matches.indexOf(g)>=Q.quantifier.jit,r(g,S)&&R>Q.quantifier.min-1){m=!0,i=b;break}if(Q.quantifier.jit!==d&&isNaN(Q.quantifier.max)&&g.optionalQuantifier&&p().validPositions[b-1]===d){l.pop(),m=!0,i=b,n=d;break}return!0}}else if(h=f(h,e,j,q))return!0}else i++;var T,U}for(var q=e.length>0?e.shift():0;q<c.matches.length;q++)if(!0!==c.matches[q].isQuantifier){var r=o(c.matches[q],[q].concat(h),j);if(r&&i===b)return r;if(i>b)break}}var g,h=p().maskToken,i=c?e:0,j=c?c.slice():[0],l=[],m=!1,n=c?c.join(""):"";if(b>-1){if(c===d){for(var o,q=b-1;(o=p().validPositions[q]||p().tests[q])===d&&q>-1;)q--;o!==d&&q>-1&&(j=function(b,c){var e=[];return a.isArray(c)||(c=[c]),c.length>0&&(c[0].alternation===d?0===(e=u(b,c.slice()).locator.slice()).length&&(e=c[0].locator.slice()):a.each(c,function(a,b){if(""!==b.def)if(0===e.length)e=b.locator.slice();else for(var c=0;c<e.length;c++)b.locator[c]&&-1===e[c].toString().indexOf(b.locator[c])&&(e[c]+=","+b.locator[c])})),e}(q,o),n=j.join(""),i=q)}if(p().tests[b]&&p().tests[b][0].cd===n)return p().tests[b];for(var r=j.shift();r<h.length&&!(f(h[r],j,[r])&&i===b||i>b);r++);}return(0===l.length||m)&&l.push({match:{fn:null,optionality:!1,casing:null,def:"",placeholder:""},locator:[],mloc:{},cd:n}),c!==d&&p().tests[b]?a.extend(!0,[],l):(p().tests[b]=a.extend(!0,[],l),p().tests[b])}function z(){return p()._buffer===d&&(p()._buffer=o(!1,1),p().buffer===d&&(p().buffer=p()._buffer.slice())),p()._buffer}function A(a){
|
2 |
-
return p().buffer!==d&&!0!==a||(p().buffer=o(!0,r(),!0)),p().buffer}function B(a,b,c){var e,f;if(!0===a)q(),a=0,b=c.length;else for(e=a;e<b;e++)delete p().validPositions[e];for(f=a,e=a;e<b;e++)if(q(!0),c[e]!==k.skipOptionalPartCharacter){var g=E(f,c[e],!0,!0);!1!==g&&(q(!0),f=g.caret!==d?g.caret:g.pos+1)}}function C(b,c,e){for(var f,g=k.greedy?c:c.slice(0,1),h=!1,i=e!==d?e.split(","):[],j=0;j<i.length;j++)-1!==(f=b.indexOf(i[j]))&&b.splice(f,1);for(var l=0;l<b.length;l++)if(-1!==a.inArray(b[l],g)){h=!0;break}return h}function D(b,c,e,f,g){var h,i,j,k,l,m,n,o=a.extend(!0,{},p().validPositions),t=!1,u=g!==d?g:r();if(-1===u&&g===d)i=(k=w(h=0)).alternation;else for(;u>=0;u--)if((j=p().validPositions[u])&&j.alternation!==d){if(k&&k.locator[j.alternation]!==j.locator[j.alternation])break;h=u,i=p().validPositions[h].alternation,k=j}if(i!==d){n=parseInt(h),p().excludes[n]=p().excludes[n]||[],!0!==b&&p().excludes[n].push(s(k));var v=[],x=0;for(l=n;l<r(d,!0)+1;l++)(m=p().validPositions[l])&&!0!==m.generatedInput?v.push(m.input):l<b&&x++,delete p().validPositions[l];for(;p().excludes[n]&&p().excludes[n].length<10;){var y=-1*x,z=v.slice();for(p().tests[n]=d,q(!0),t=!0;z.length>0;){var A=z.shift();if(!(t=E(r(d,!0)+1,A,!1,f,!0)))break}if(t&&c!==d){var B=r(b)+1;for(l=n;l<r()+1;l++)((m=p().validPositions[l])===d||null==m.match.fn)&&l<b+y&&y++;t=E((b+=y)>B?B:b,c,e,f,!0)}if(t)break;if(q(),k=w(n),p().validPositions=a.extend(!0,{},o),!p().excludes[n]){t=D(b,c,e,f,n-1);break}var C=s(k);if(-1!==p().excludes[n].indexOf(C)){t=D(b,c,e,f,n-1);break}for(p().excludes[n].push(C),l=n;l<r(d,!0)+1;l++)delete p().validPositions[l]}}return p().excludes[n]=d,t}function E(b,c,f,g,h,i){function j(a){return ba?a.begin-a.end>1||a.begin-a.end==1:a.end-a.begin>1||a.end-a.begin==1}function l(c,f,h){var i=!1;return a.each(y(c),function(l,m){var n=m.match;if(A(!0),!1!==(i=null!=n.fn?n.fn.test(f,p(),c,h,k,j(b)):(f===n.def||f===k.skipOptionalPartCharacter)&&""!==n.def&&{c:L(c,n,!0)||n.def,pos:c})){var o=i.c!==d?i.c:f,q=c;return o=o===k.skipOptionalPartCharacter&&null===n.fn?L(c,n,!0)||n.def:o,i.remove!==d&&(a.isArray(i.remove)||(i.remove=[i.remove]),a.each(i.remove.sort(function(a,b){return b-a}),function(a,b){G({begin:b,end:b+1})})),i.insert!==d&&(a.isArray(i.insert)||(i.insert=[i.insert]),a.each(i.insert.sort(function(a,b){return a-b}),function(a,b){E(b.pos,b.c,!0,g)})),!0!==i&&i.pos!==d&&i.pos!==c&&(q=i.pos),(!0===i||i.pos!==d||i.c!==d)&&(G(b,a.extend({},m,{input:function(b,c,d){switch(k.casing||c.casing){case"upper":b=b.toUpperCase();break;case"lower":b=b.toLowerCase();break;case"title":var f=p().validPositions[d-1];b=0===d||f&&f.input===String.fromCharCode(e.keyCode.SPACE)?b.toUpperCase():b.toLowerCase();break;default:if(a.isFunction(k.casing)){var g=Array.prototype.slice.call(arguments);g.push(p().validPositions),b=k.casing.apply(this,g)}}return b}(o,n,q)}),g,q)||(i=!1),!1)}}),i}f=!0===f;var m=b;b.begin!==d&&(m=ba?b.end:b.begin);var n=!0,o=a.extend(!0,{},p().validPositions);if(a.isFunction(k.preValidation)&&!f&&!0!==g&&!0!==i&&(n=k.preValidation(A(),m,c,j(b),k,p())),!0===n){if(F(d,m,!0),(Y===d||m<Y)&&(n=l(m,c,f),(!f||!0===g)&&!1===n&&!0!==i)){var r=p().validPositions[m];if(!r||null!==r.match.fn||r.match.def!==c&&c!==k.skipOptionalPartCharacter){if((k.insertMode||p().validPositions[I(m)]===d)&&!H(m,!0))for(var s=m+1,t=I(m);s<=t;s++)if(!1!==(n=l(s,c,f))){n=F(m,n.pos!==d?n.pos:s)||n,m=s;break}}else n={caret:I(m)}}!1!==n||!1===k.keepStatic||null!=k.regex&&!S(A())||f||!0===h||(n=D(m,c,f,g)),!0===n&&(n={pos:m})}if(a.isFunction(k.postValidation)&&!1!==n&&!f&&!0!==g&&!0!==i){var u=k.postValidation(A(!0),n,k);if(u!==d){if(u.refreshFromBuffer&&u.buffer){var v=u.refreshFromBuffer;B(!0===v?v:v.start,v.end,u.buffer)}n=!0===u?n:u}}return n&&n.pos===d&&(n.pos=m),!1!==n&&!0!==i||(q(!0),p().validPositions=a.extend(!0,{},o)),n}function F(b,c,e){var f;if(b===d)for(b=c-1;b>0&&!p().validPositions[b];b--);for(var g=b;g<c;g++)if(p().validPositions[g]===d&&!H(g,!0)){var h=0==g?w(g):p().validPositions[g-1];if(h){var i,j=t(h),k=y(g).slice(),l=d,m=w(g);if(""===k[k.length-1].match.def&&k.pop(),a.each(k,function(a,b){i=t(b,j.length);var c=Math.abs(i-j);(l===d||c<l)&&null===b.match.fn&&!0!==b.match.optionality&&!0!==b.match.optionalQuantifier&&(l=c,m=b)}),(m=a.extend({},m,{input:L(g,m.match,!0)||m.match.def})).generatedInput=!0,G(g,m,!0),!0!==e){var n=p().validPositions[c].input;p().validPositions[c]=d,f=E(c,n,!0,!0)}}}return f}function G(b,c,e,f){var g=b.begin!==d?b.begin:b,h=b.end!==d?b.end:b;if(b.begin>b.end&&(g=b.end,h=b.begin),f=f!==d?f:g,g!==h||k.insertMode&&p().validPositions[f]!==d&&e===d){var i=a.extend(!0,{},p().validPositions),j=r(d,!0);for(p().p=g,s=j;s>=g;s--)p().validPositions[s]&&"+"===p().validPositions[s].match.nativeDef&&(k.isNegative=!1),delete p().validPositions[s];var l=!0,m=f,n=(p().validPositions,!1),o=m,s=m;for(c&&(p().validPositions[f]=a.extend(!0,{},c),o++,m++,g<h&&s++);s<=j;s++){var t=i[s];if(t!==d&&(s>=h||s>=g&&!0!==t.generatedInput&&function(a,b,c){var e=b[a];if(e!==d&&(null===e.match.fn&&!0!==e.match.optionality||e.input===k.radixPoint)){var f=c.begin<=a-1?b[a-1]&&null===b[a-1].match.fn&&b[a-1]:b[a-1],g=c.end>a+1?b[a+1]&&null===b[a+1].match.fn&&b[a+1]:b[a+1];return f&&g}return!1}(s,i,{begin:g,end:h}))){for(;""!==w(o).match.def;){if(!1===n&&i[o]&&i[o].match.nativeDef===t.match.nativeDef)p().validPositions[o]=a.extend(!0,{},i[o]),p().validPositions[o].input=t.input,F(d,o,!0),m=o+1,l=!0;else if(x(o,t.match.def)){var u=E(o,t.input,!0,!0);l=!1!==u,m=u.caret||u.insert?r():o+1,n=!0}else if(!(l=!0===t.generatedInput||t.input===k.radixPoint&&!0===k.numericInput)&&""===w(o).match.def)break;if(l)break;o++}""==w(o).match.def&&(l=!1),o=m}if(!l)break}if(!l)return p().validPositions=a.extend(!0,{},i),q(!0),!1}else c&&(p().validPositions[f]=a.extend(!0,{},c));return q(!0),!0}function H(a,b){var c=v(a).match;if(""===c.def&&(c=w(a).match),null!=c.fn)return c.fn;if(!0!==b&&a>-1){var d=y(a);return d.length>1+(""===d[d.length-1].match.def?1:0)}return!1}function I(a,b){for(var c=a+1;""!==w(c).match.def&&(!0===b&&(!0!==w(c).match.newBlockMarker||!H(c))||!0!==b&&!H(c));)c++;return c}function J(a,b){var c,d=a;if(d<=0)return 0;for(;--d>0&&(!0===b&&!0!==w(d).match.newBlockMarker||!0!==b&&!H(d)&&((c=y(d)).length<2||2===c.length&&""===c[1].match.def)););return d}function K(b,c,e,f,g){if(f&&a.isFunction(k.onBeforeWrite)){var h=k.onBeforeWrite.call(_,f,c,e,k);if(h){if(h.refreshFromBuffer){var i=h.refreshFromBuffer;B(!0===i?i:i.start,i.end,h.buffer||c),c=A(!0)}e!==d&&(e=h.caret!==d?h.caret:e)}}if(b!==d&&(b.inputmask._valueSet(c.join("")),e===d||f!==d&&"blur"===f.type?V(b,e,0===c.length):P(b,e),!0===g)){var j=a(b),l=b.inputmask._valueGet();da=!0,j.trigger("input"),setTimeout(function(){l===z().join("")?j.trigger("cleared"):!0===S(c)&&j.trigger("complete")},0)}}function L(b,c,e){if((c=c||w(b).match).placeholder!==d||!0===e)return a.isFunction(c.placeholder)?c.placeholder(k):c.placeholder;if(null===c.fn){if(b>-1&&p().validPositions[b]===d){var f,g=y(b),h=[];if(g.length>1+(""===g[g.length-1].match.def?1:0))for(var i=0;i<g.length;i++)if(!0!==g[i].match.optionality&&!0!==g[i].match.optionalQuantifier&&(null===g[i].match.fn||f===d||!1!==g[i].match.fn.test(f.match.def,p(),b,!0,k))&&(h.push(g[i]),null===g[i].match.fn&&(f=g[i]),h.length>1&&/[0-9a-bA-Z]/.test(h[0].match.def)))return k.placeholder.charAt(b%k.placeholder.length)}return c.def}return k.placeholder.charAt(b%k.placeholder.length)}function M(b,c,f,g,h){var i=this||b.inputmask,j=g.slice(),l="",m=-1,n=d;if(q(),f||!0===k.autoUnmask)m=I(m);else{var s=z().slice(0,I(-1)).join(""),t=j.join("").match(new RegExp("^"+e.escapeRegex(s),"g"));t&&t.length>0&&(j.splice(0,t.length*s.length),m=I(m))}-1===m?(p().p=I(m),m=0):p().p=m,i.caretPos={begin:m},a.each(j,function(c,e){if(e!==d)if(p().validPositions[c]===d&&j[c]===L(c)&&H(c,!0)&&!1===E(c,j[c],!0,d,d,!0))p().p++;else{var g=new a.Event("_checkval");g.which=e.charCodeAt(0),l+=e;var h=r(d,!0);!function(a,b){return-1!==o(!0,0,!1).slice(a,I(a)).join("").replace(/'/g,"").indexOf(b)&&!H(a)&&(w(a).match.nativeDef===b.charAt(0)||null===w(a).match.fn&&w(a).match.nativeDef==="'"+b.charAt(0)||" "===w(a).match.nativeDef&&(w(a+1).match.nativeDef===b.charAt(0)||null===w(a+1).match.fn&&w(a+1).match.nativeDef==="'"+b.charAt(0)))}(m,l)?(n=ha.keypressEvent.call(b,g,!0,!1,f,i.caretPos.begin))&&(m=i.caretPos.begin+1,l=""):n=ha.keypressEvent.call(b,g,!0,!1,f,h+1),n&&(K(d,A(),n.forwardPosition,g,!1),i.caretPos={begin:n.forwardPosition,end:n.forwardPosition})}}),c&&K(b,A(),n?n.forwardPosition:d,h||new a.Event("checkval"),h&&"input"===h.type)}function N(b){if(b){if(b.inputmask===d)return b.value;b.inputmask&&b.inputmask.refreshValue&&ha.setValueEvent.call(b)}var c=[],e=p().validPositions;for(var f in e)e[f].match&&null!=e[f].match.fn&&c.push(e[f].input);var g=0===c.length?"":(ba?c.reverse():c).join("");if(a.isFunction(k.onUnMask)){var h=(ba?A().slice().reverse():A()).join("");g=k.onUnMask.call(_,h,g,k)}return g}function O(a){return!ba||"number"!=typeof a||k.greedy&&""===k.placeholder||!aa||(a=aa.inputmask._valueGet().length-a),a}function P(e,f,g,h){var i;if(f===d)return e.setSelectionRange?(f=e.selectionStart,g=e.selectionEnd):b.getSelection?(i=b.getSelection().getRangeAt(0)).commonAncestorContainer.parentNode!==e&&i.commonAncestorContainer!==e||(f=i.startOffset,g=i.endOffset):c.selection&&c.selection.createRange&&(g=(f=0-(i=c.selection.createRange()).duplicate().moveStart("character",-e.inputmask._valueGet().length))+i.text.length),{begin:h?f:O(f),end:h?g:O(g)};if(a.isArray(f)&&(g=ba?f[0]:f[1],f=ba?f[1]:f[0]),f.begin!==d&&(g=ba?f.begin:f.end,f=ba?f.end:f.begin),"number"==typeof f){f=h?f:O(f),g="number"==typeof(g=h?g:O(g))?g:f;var j=parseInt(((e.ownerDocument.defaultView||b).getComputedStyle?(e.ownerDocument.defaultView||b).getComputedStyle(e,null):e.currentStyle).fontSize)*g;if(e.scrollLeft=j>e.scrollWidth?j:0,n||!1!==k.insertMode||f!==g||g++,e.inputmask.caretPos={begin:f,end:g},e.setSelectionRange)e.selectionStart=f,e.selectionEnd=g;else if(b.getSelection){if(i=c.createRange(),e.firstChild===d||null===e.firstChild){var l=c.createTextNode("");e.appendChild(l)}i.setStart(e.firstChild,f<e.inputmask._valueGet().length?f:e.inputmask._valueGet().length),i.setEnd(e.firstChild,g<e.inputmask._valueGet().length?g:e.inputmask._valueGet().length),i.collapse(!0);var m=b.getSelection();m.removeAllRanges(),m.addRange(i)}else e.createTextRange&&((i=e.createTextRange()).collapse(!0),i.moveEnd("character",g),i.moveStart("character",f),i.select());V(e,{begin:f,end:g})}}function Q(b){var c,e,f=o(!0,r(),!0,!0),g=f.length,h=r(),i={},j=p().validPositions[h],k=j!==d?j.locator.slice():d;for(c=h+1;c<f.length;c++)k=(e=v(c,k,c-1)).locator.slice(),i[c]=a.extend(!0,{},e);var l=j&&j.alternation!==d?j.locator[j.alternation]:d;for(c=g-1;c>h&&((e=i[c]).match.optionality||e.match.optionalQuantifier&&e.match.newBlockMarker||l&&(l!==i[c].locator[j.alternation]&&null!=e.match.fn||null===e.match.fn&&e.locator[j.alternation]&&C(e.locator[j.alternation].toString().split(","),l.toString().split(","))&&""!==y(c)[0].def))&&f[c]===L(c,e.match);c--)g--;return b?{l:g,def:i[g]?i[g].match:d}:g}function R(a){a.length=0;for(var b,c=o(!0,0,!0,d,!0);(b=c.shift())!==d;)a.push(b);return a}function S(b){if(a.isFunction(k.isComplete))return k.isComplete(b,k);if("*"===k.repeat)return d;var c=!1,e=Q(!0),f=J(e.l);if(e.def===d||e.def.newBlockMarker||e.def.optionality||e.def.optionalQuantifier){c=!0;for(var g=0;g<=f;g++){var h=v(g).match;if(null!==h.fn&&p().validPositions[g]===d&&!0!==h.optionality&&!0!==h.optionalQuantifier||null===h.fn&&b[g]!==L(g,h)){c=!1;break}}}return c}function T(a,b,c,f,g){if((k.numericInput||ba)&&(b===e.keyCode.BACKSPACE?b=e.keyCode.DELETE:b===e.keyCode.DELETE&&(b=e.keyCode.BACKSPACE),ba)){var h=c.end;c.end=c.begin,c.begin=h}if(b===e.keyCode.BACKSPACE&&(c.end-c.begin<1||!1===k.insertMode)?(c.begin=J(c.begin),p().validPositions[c.begin]!==d&&p().validPositions[c.begin].input===k.groupSeparator&&c.begin--,!1===k.insertMode&&c.end!==p().maskLength&&c.end--):b===e.keyCode.DELETE&&c.begin===c.end&&(c.end=H(c.end,!0)&&p().validPositions[c.end]&&p().validPositions[c.end].input!==k.radixPoint?c.end+1:I(c.end)+1,p().validPositions[c.begin]!==d&&p().validPositions[c.begin].input===k.groupSeparator&&c.end++),G(c),!0!==f&&!1!==k.keepStatic||null!==k.regex){var i=D(!0);if(i){var j=i.caret!==d?i.caret:i.pos?I(i.pos.begin?i.pos.begin:i.pos):r(-1,!0);(b!==e.keyCode.DELETE||c.begin>j)&&c.begin}}var l=r(c.begin,!0);if(l<c.begin||-1===c.begin)p().p=I(l);else if(!0!==f&&(p().p=c.begin,!0!==g))for(;p().p<l&&p().validPositions[p().p]===d;)p().p++}function U(d){var e=(d.ownerDocument.defaultView||b).getComputedStyle(d,null),f=c.createElement("div");f.style.width=e.width,f.style.textAlign=e.textAlign,Z=c.createElement("div"),d.inputmask.colorMask=Z,Z.className="im-colormask",d.parentNode.insertBefore(Z,d),d.parentNode.removeChild(d),Z.appendChild(d),Z.appendChild(f),d.style.left=f.offsetLeft+"px",a(Z).on("mouseleave",function(a){return ha.mouseleaveEvent.call(d,[a])}),a(Z).on("mouseenter",function(a){return ha.mouseenterEvent.call(d,[a])}),a(Z).on("click",function(a){return P(d,function(a){var b,f=c.createElement("span");for(var g in e)isNaN(g)&&-1!==g.indexOf("font")&&(f.style[g]=e[g]);f.style.textTransform=e.textTransform,f.style.letterSpacing=e.letterSpacing,f.style.position="absolute",f.style.height="auto",f.style.width="auto",f.style.visibility="hidden",f.style.whiteSpace="nowrap",c.body.appendChild(f);var h,i=d.inputmask._valueGet(),j=0;for(b=0,h=i.length;b<=h;b++){if(f.innerHTML+=i.charAt(b)||"_",f.offsetWidth>=a){var k=a-j,l=f.offsetWidth-a;f.innerHTML=i.charAt(b),b=(k-=f.offsetWidth/3)<l?b-1:b;break}j=f.offsetWidth}return c.body.removeChild(f),b}(a.clientX)),ha.clickEvent.call(d,[a])}),a(d).on("keydown",function(a){a.shiftKey||!1===k.insertMode||setTimeout(function(){V(d)},0)})}function V(a,b,e){function f(a){if(a===d&&(a=""),l||null!==g.fn&&h.input!==d)if(l&&(null!==g.fn&&h.input!==d||""===g.def)){l=!1;var b=j.length;j[b-1]=j[b-1]+"</span>",j.push(a)}else j.push(a);else l=!0,j.push("<span class='im-static'>"+a)}var g,h,i,j=[],l=!1,m=0;if(Z!==d){var n=A();if(b===d?b=P(a):b.begin===d&&(b={begin:b,end:b}),!0!==e){var o=r();do{p().validPositions[m]?(h=p().validPositions[m],g=h.match,i=h.locator.slice(),f(n[m])):(h=v(m,i,m-1),g=h.match,i=h.locator.slice(),!1===k.jitMasking||m<o||"number"==typeof k.jitMasking&&isFinite(k.jitMasking)&&k.jitMasking>m?f(L(m,g)):l=!1),m++}while((Y===d||m<Y)&&(null!==g.fn||""!==g.def)||o>m||l);l&&f(),c.activeElement===a&&(j.splice(b.begin,0,b.begin===b.end||b.end>p().maskLength?'<mark class="im-caret" style="border-right-width: 1px;border-right-style: solid;">':'<mark class="im-caret-select">'),j.splice(b.end+1,0,"</mark>"))}var q=Z.getElementsByTagName("div")[0];q.innerHTML=j.join(""),a.inputmask.positionColorMask(a,q)}}g=g||this.maskset,k=k||this.opts;var W,X,Y,Z,$,_=this,aa=this.el,ba=this.isRTL,ca=!1,da=!1,ea=!1,fa=!1,ga={on:function(b,c,f){var g=function(b){var c=this;if(c.inputmask===d&&"FORM"!==this.nodeName){var g=a.data(c,"_inputmask_opts");g?new e(g).mask(c):ga.off(c)}else{if("setvalue"===b.type||"FORM"===this.nodeName||!(c.disabled||c.readOnly&&!("keydown"===b.type&&b.ctrlKey&&67===b.keyCode||!1===k.tabThrough&&b.keyCode===e.keyCode.TAB))){switch(b.type){case"input":if(!0===da)return da=!1,b.preventDefault();if(l){var h=arguments;return setTimeout(function(){f.apply(c,h),P(c,c.inputmask.caretPos,d,!0)},0),!1}break;case"keydown":ca=!1,da=!1;break;case"keypress":if(!0===ca)return b.preventDefault();ca=!0;break;case"click":if(m||n)return h=arguments,setTimeout(function(){f.apply(c,h)},0),!1}var i=f.apply(c,arguments);return!1===i&&(b.preventDefault(),b.stopPropagation()),i}b.preventDefault()}};b.inputmask.events[c]=b.inputmask.events[c]||[],b.inputmask.events[c].push(g),-1!==a.inArray(c,["submit","reset"])?null!==b.form&&a(b.form).on(c,g):a(b).on(c,g)},off:function(b,c){var d;b.inputmask&&b.inputmask.events&&(c?(d=[])[c]=b.inputmask.events[c]:d=b.inputmask.events,a.each(d,function(c,d){for(;d.length>0;){var e=d.pop();-1!==a.inArray(c,["submit","reset"])?null!==b.form&&a(b.form).off(c,e):a(b).off(c,e)}delete b.inputmask.events[c]}))}},ha={keydownEvent:function(b){var c=this,d=a(c),f=b.keyCode,g=P(c);if(f===e.keyCode.BACKSPACE||f===e.keyCode.DELETE||n&&f===e.keyCode.BACKSPACE_SAFARI||b.ctrlKey&&f===e.keyCode.X&&!i("cut"))b.preventDefault(),T(c,f,g),K(c,A(!0),p().p,b,c.inputmask._valueGet()!==A().join(""));else if(f===e.keyCode.END||f===e.keyCode.PAGE_DOWN){b.preventDefault();var h=I(r());k.insertMode||h!==p().maskLength||b.shiftKey||h--,P(c,b.shiftKey?g.begin:h,h,!0)}else f===e.keyCode.HOME&&!b.shiftKey||f===e.keyCode.PAGE_UP?(b.preventDefault(),P(c,0,b.shiftKey?g.begin:0,!0)):(k.undoOnEscape&&f===e.keyCode.ESCAPE||90===f&&b.ctrlKey)&&!0!==b.altKey?(M(c,!0,!1,W.split("")),d.trigger("click")):f!==e.keyCode.INSERT||b.shiftKey||b.ctrlKey?!0===k.tabThrough&&f===e.keyCode.TAB?(!0===b.shiftKey?(null===w(g.begin).match.fn&&(g.begin=I(g.begin)),g.end=J(g.begin,!0),g.begin=J(g.end,!0)):(g.begin=I(g.begin,!0),g.end=I(g.begin,!0),g.end<p().maskLength&&g.end--),g.begin<p().maskLength&&(b.preventDefault(),P(c,g.begin,g.end))):b.shiftKey||!1===k.insertMode&&(f===e.keyCode.RIGHT?setTimeout(function(){var a=P(c);P(c,a.begin)},0):f===e.keyCode.LEFT&&setTimeout(function(){var a=P(c);P(c,ba?a.begin+1:a.begin-1)},0)):(k.insertMode=!k.insertMode,P(c,k.insertMode||g.begin!==p().maskLength?g.begin:g.begin-1));k.onKeyDown.call(this,b,A(),P(c).begin,k),ea=-1!==a.inArray(f,k.ignorables)},keypressEvent:function(b,c,f,g,h){var i=this,j=a(i),l=b.which||b.charCode||b.keyCode;if(!(!0===c||b.ctrlKey&&b.altKey)&&(b.ctrlKey||b.metaKey||ea))return l===e.keyCode.ENTER&&W!==A().join("")&&(W=A().join(""),setTimeout(function(){j.trigger("change")},0)),!0;if(l){46===l&&!1===b.shiftKey&&""!==k.radixPoint&&(l=k.radixPoint.charCodeAt(0));var m,n=c?{begin:h,end:h}:P(i),o=String.fromCharCode(l),r=0;if(k._radixDance&&k.numericInput){var s=A().indexOf(k.radixPoint.charAt(0))+1;n.begin<=s&&(l===k.radixPoint.charCodeAt(0)&&(r=1),n.begin-=1,n.end-=1)}p().writeOutBuffer=!0;var t=E(n,o,g);if(!1!==t&&(q(!0),m=t.caret!==d?t.caret:I(t.pos.begin?t.pos.begin:t.pos),p().p=m),m=(k.numericInput&&t.caret===d?J(m):m)+r,!1!==f&&(setTimeout(function(){k.onKeyValidation.call(i,l,t,k)},0),p().writeOutBuffer&&!1!==t)){var u=A();K(i,u,m,b,!0!==c)}if(b.preventDefault(),c)return!1!==t&&(t.forwardPosition=m),t}},pasteEvent:function(c){var d,e=c.originalEvent||c,f=(a(this),this.inputmask._valueGet(!0)),g=P(this);ba&&(d=g.end,g.end=g.begin,g.begin=d);var h=f.substr(0,g.begin),i=f.substr(g.end,f.length);if(h===(ba?z().reverse():z()).slice(0,g.begin).join("")&&(h=""),i===(ba?z().reverse():z()).slice(g.end).join("")&&(i=""),b.clipboardData&&b.clipboardData.getData)f=h+b.clipboardData.getData("Text")+i;else{if(!e.clipboardData||!e.clipboardData.getData)return!0;f=h+e.clipboardData.getData("text/plain")+i}var j=f;if(a.isFunction(k.onBeforePaste)){if(!1===(j=k.onBeforePaste.call(_,f,k)))return c.preventDefault();j||(j=f)}return M(this,!1,!1,j.toString().split("")),K(this,A(),I(r()),c,W!==A().join("")),c.preventDefault()},inputFallBackEvent:function(b){var c=this,d=c.inputmask._valueGet();if(A().join("")!==d){var f=P(c);if(d=function(a,b,c){if(m){var d=b.replace(A().join(""),"");if(1===d.length){var e=b.split("");e.splice(c.begin,0,d),b=e.join("")}}return b}(0,d=function(a,b,c){return"."===b.charAt(c.begin-1)&&""!==k.radixPoint&&((b=b.split(""))[c.begin-1]=k.radixPoint.charAt(0),b=b.join("")),b}(0,d,f),f),A().join("")!==d){var g=A().join(""),h=!k.numericInput&&d.length>g.length?-1:0,i=d.substr(0,f.begin),j=d.substr(f.begin),l=g.substr(0,f.begin+h),n=g.substr(f.begin+h),o=f,p="",q=!1;if(i!==l){for(var r=(q=i.length>=l.length)?i.length:l.length,s=0;i.charAt(s)===l.charAt(s)&&s<r;s++);q&&(0===h&&(o.begin=s),p+=i.slice(s,o.end))}if(j!==n&&(j.length>n.length?p+=j.slice(0,1):j.length<n.length&&(o.end+=n.length-j.length,q||""===k.radixPoint||""!==j||i.charAt(o.begin+h-1)!==k.radixPoint||(o.begin--,p=k.radixPoint))),K(c,A(),{begin:o.begin+h,end:o.end+h}),p.length>0)a.each(p.split(""),function(b,d){var e=new a.Event("keypress");e.which=d.charCodeAt(0),ea=!1,ha.keypressEvent.call(c,e)});else{o.begin===o.end-1&&(o.begin=J(o.begin+1),o.begin===o.end-1?P(c,o.begin):P(c,o.begin,o.end));var t=new a.Event("keydown");t.keyCode=k.numericInput?e.keyCode.BACKSPACE:e.keyCode.DELETE,ha.keydownEvent.call(c,t),!1===k.insertMode&&P(c,P(c).begin-1)}b.preventDefault()}}},beforeInputEvent:function(b){if(b.cancelable){var c=this;switch(b.inputType){case"insertText":return a.each(b.data.split(""),function(b,d){var e=new a.Event("keypress");e.which=d.charCodeAt(0),ea=!1,ha.keypressEvent.call(c,e)}),b.preventDefault();case"deleteContentBackward":return(d=new a.Event("keydown")).keyCode=e.keyCode.BACKSPACE,ha.keydownEvent.call(c,d),b.preventDefault();case"deleteContentForward":var d;return(d=new a.Event("keydown")).keyCode=e.keyCode.DELETE,ha.keydownEvent.call(c,d),b.preventDefault()}}},setValueEvent:function(b){this.inputmask.refreshValue=!1;var c=(c=b&&b.detail?b.detail[0]:arguments[1])||this.inputmask._valueGet(!0);a.isFunction(k.onBeforeMask)&&(c=k.onBeforeMask.call(_,c,k)||c),M(this,!0,!1,c=c.split("")),W=A().join(""),(k.clearMaskOnLostFocus||k.clearIncomplete)&&this.inputmask._valueGet()===z().join("")&&this.inputmask._valueSet("")},focusEvent:function(a){var b=this.inputmask._valueGet();k.showMaskOnFocus&&(!k.showMaskOnHover||k.showMaskOnHover&&""===b)&&(this.inputmask._valueGet()!==A().join("")?K(this,A(),I(r())):!1===fa&&P(this,I(r()))),!0===k.positionCaretOnTab&&!1===fa&&ha.clickEvent.apply(this,[a,!0]),W=A().join("")},mouseleaveEvent:function(a){if(fa=!1,k.clearMaskOnLostFocus&&c.activeElement!==this){var b=A().slice(),d=this.inputmask._valueGet();d!==this.getAttribute("placeholder")&&""!==d&&(-1===r()&&d===z().join("")?b=[]:R(b),K(this,b))}},clickEvent:function(b,e){var f=this;setTimeout(function(){if(c.activeElement===f){var b=P(f);if(e&&(ba?b.end=b.begin:b.begin=b.end),b.begin===b.end)switch(k.positionCaretOnClick){case"none":break;case"select":P(f,0,A().length);break;case"ignore":P(f,I(r()));break;case"radixFocus":if(function(b){if(""!==k.radixPoint){var c=p().validPositions;if(c[b]===d||c[b].input===L(b)){if(b<I(-1))return!0;var e=a.inArray(k.radixPoint,A());if(-1!==e){for(var f in c)if(e<f&&c[f].input!==L(f))return!1;return!0}}}return!1}(b.begin)){var g=A().join("").indexOf(k.radixPoint);P(f,k.numericInput?I(g):g);break}default:var h=b.begin,i=r(h,!0),j=I(i);if(h<j)P(f,H(h,!0)||H(h-1,!0)?h:I(h));else{var l=p().validPositions[i],m=v(j,l?l.match.locator:d,l),n=L(j,m.match);if(""!==n&&A()[j]!==n&&!0!==m.match.optionalQuantifier&&!0!==m.match.newBlockMarker||!H(j,k.keepStatic)&&m.match.def===n){var o=I(j);(h>=o||h===j)&&(j=o)}P(f,j)}}}},0)},dblclickEvent:function(a){var b=this;setTimeout(function(){P(b,0,I(r()))},0)},cutEvent:function(d){a(this);var f=P(this),g=d.originalEvent||d,h=b.clipboardData||g.clipboardData,i=ba?A().slice(f.end,f.begin):A().slice(f.begin,f.end);h.setData("text",ba?i.reverse().join(""):i.join("")),c.execCommand&&c.execCommand("copy"),T(this,e.keyCode.DELETE,f),K(this,A(),p().p,d,W!==A().join(""))},blurEvent:function(b){var c=a(this);if(this.inputmask){var e=this.inputmask._valueGet(),f=A().slice();""===e&&Z===d||(k.clearMaskOnLostFocus&&(-1===r()&&e===z().join("")?f=[]:R(f)),!1===S(f)&&(setTimeout(function(){c.trigger("incomplete")},0),k.clearIncomplete&&(q(),f=k.clearMaskOnLostFocus?[]:z().slice())),K(this,f,d,b)),W!==A().join("")&&(W=f.join(""),c.trigger("change"))}},mouseenterEvent:function(a){fa=!0,c.activeElement!==this&&k.showMaskOnHover&&this.inputmask._valueGet()!==A().join("")&&K(this,A())},submitEvent:function(a){W!==A().join("")&&X.trigger("change"),k.clearMaskOnLostFocus&&-1===r()&&aa.inputmask._valueGet&&aa.inputmask._valueGet()===z().join("")&&aa.inputmask._valueSet(""),k.clearIncomplete&&!1===S(A())&&aa.inputmask._valueSet(""),k.removeMaskOnSubmit&&(aa.inputmask._valueSet(aa.inputmask.unmaskedvalue(),!0),setTimeout(function(){K(aa,A())},0))},resetEvent:function(a){aa.inputmask.refreshValue=!0,setTimeout(function(){X.trigger("setvalue")},0)}};if(e.prototype.positionColorMask=function(a,b){a.style.left=b.offsetLeft+"px"},f!==d)switch(f.action){case"isComplete":return aa=f.el,S(A());case"unmaskedvalue":return aa!==d&&f.value===d||($=f.value,$=(a.isFunction(k.onBeforeMask)&&k.onBeforeMask.call(_,$,k)||$).split(""),M.call(this,d,!1,!1,$),a.isFunction(k.onBeforeWrite)&&k.onBeforeWrite.call(_,d,A(),0,k)),N(aa);case"mask":!function(b){ga.off(b);var e=function(b,e){var f=b.getAttribute("type"),g="INPUT"===b.tagName&&-1!==a.inArray(f,e.supportsInputType)||b.isContentEditable||"TEXTAREA"===b.tagName;if(!g)if("INPUT"===b.tagName){var i=c.createElement("input");i.setAttribute("type",f),g="text"===i.type,i=null}else g="partial";return!1!==g?function(b){function f(){return this.inputmask?this.inputmask.opts.autoUnmask?this.inputmask.unmaskedvalue():-1!==r()||!0!==e.nullable?c.activeElement===this&&e.clearMaskOnLostFocus?(ba?R(A().slice()).reverse():R(A().slice())).join(""):i.call(this):"":i.call(this)}function g(b){j.call(this,b),this.inputmask&&a(this).trigger("setvalue",[b])}var i,j;if(!b.inputmask.__valueGet){if(!0!==e.noValuePatching){if(Object.getOwnPropertyDescriptor){"function"!=typeof Object.getPrototypeOf&&(Object.getPrototypeOf="object"===h("test".__proto__)?function(a){return a.__proto__}:function(a){return a.constructor.prototype});var k=Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(b),"value"):d;k&&k.get&&k.set?(i=k.get,j=k.set,Object.defineProperty(b,"value",{get:f,set:g,configurable:!0})):"INPUT"!==b.tagName&&(i=function(){return this.textContent},j=function(a){this.textContent=a},Object.defineProperty(b,"value",{get:f,set:g,configurable:!0}))}else c.__lookupGetter__&&b.__lookupGetter__("value")&&(i=b.__lookupGetter__("value"),j=b.__lookupSetter__("value"),b.__defineGetter__("value",f),b.__defineSetter__("value",g));b.inputmask.__valueGet=i,b.inputmask.__valueSet=j}b.inputmask._valueGet=function(a){return ba&&!0!==a?i.call(this.el).split("").reverse().join(""):i.call(this.el)},b.inputmask._valueSet=function(a,b){j.call(this.el,null===a||a===d?"":!0!==b&&ba?a.split("").reverse().join(""):a)},i===d&&(i=function(){return this.value},j=function(a){this.value=a},function(b){if(a.valHooks&&(a.valHooks[b]===d||!0!==a.valHooks[b].inputmaskpatch)){var c=a.valHooks[b]&&a.valHooks[b].get?a.valHooks[b].get:function(a){return a.value},f=a.valHooks[b]&&a.valHooks[b].set?a.valHooks[b].set:function(a,b){return a.value=b,a};a.valHooks[b]={get:function(a){if(a.inputmask){if(a.inputmask.opts.autoUnmask)return a.inputmask.unmaskedvalue();var b=c(a);return-1!==r(d,d,a.inputmask.maskset.validPositions)||!0!==e.nullable?b:""}return c(a)},set:function(b,c){var d,e=a(b);return d=f(b,c),b.inputmask&&e.trigger("setvalue",[c]),d},inputmaskpatch:!0}}}(b.type),function(b){ga.on(b,"mouseenter",function(b){var c=a(this);this.inputmask._valueGet()!==A().join("")&&c.trigger("setvalue")})}(b))}}(b):b.inputmask=d,g}(b,k);if(!1!==e&&(X=a(aa=b),-1===(Y=aa!==d?aa.maxLength:d)&&(Y=d),!0===k.colorMask&&U(aa),l&&("inputmode"in aa&&(aa.inputmode=k.inputmode,aa.setAttribute("inputmode",k.inputmode)),!0===k.disablePredictiveText&&("autocorrect"in aa?aa.autocorrect=!1:(!0!==k.colorMask&&U(aa),aa.type="password"))),!0===e&&(ga.on(aa,"submit",ha.submitEvent),ga.on(aa,"reset",ha.resetEvent),ga.on(aa,"blur",ha.blurEvent),ga.on(aa,"focus",ha.focusEvent),!0!==k.colorMask&&(ga.on(aa,"click",ha.clickEvent),ga.on(aa,"mouseleave",ha.mouseleaveEvent),ga.on(aa,"mouseenter",ha.mouseenterEvent)),ga.on(aa,"dblclick",ha.dblclickEvent),ga.on(aa,"paste",ha.pasteEvent),ga.on(aa,"dragdrop",ha.pasteEvent),ga.on(aa,"drop",ha.pasteEvent),ga.on(aa,"cut",ha.cutEvent),ga.on(aa,"complete",k.oncomplete),ga.on(aa,"incomplete",k.onincomplete),ga.on(aa,"cleared",k.oncleared),l||!0===k.inputEventOnly?aa.removeAttribute("maxLength"):(ga.on(aa,"keydown",ha.keydownEvent),ga.on(aa,"keypress",ha.keypressEvent)),ga.on(aa,"compositionstart",a.noop),ga.on(aa,"compositionupdate",a.noop),ga.on(aa,"compositionend",a.noop),ga.on(aa,"keyup",a.noop),ga.on(aa,"input",ha.inputFallBackEvent),ga.on(aa,"beforeinput",ha.beforeInputEvent)),ga.on(aa,"setvalue",ha.setValueEvent),W=z().join(""),""!==aa.inputmask._valueGet(!0)||!1===k.clearMaskOnLostFocus||c.activeElement===aa)){var f=a.isFunction(k.onBeforeMask)&&k.onBeforeMask.call(_,aa.inputmask._valueGet(!0),k)||aa.inputmask._valueGet(!0);""!==f&&M(aa,!0,!1,f.split(""));var g=A().slice();W=g.join(""),!1===S(g)&&k.clearIncomplete&&q(),k.clearMaskOnLostFocus&&c.activeElement!==aa&&(-1===r()?g=[]:R(g)),(!1===k.clearMaskOnLostFocus||k.showMaskOnFocus&&c.activeElement===aa||""!==aa.inputmask._valueGet(!0))&&K(aa,g),c.activeElement===aa&&P(aa,I(r()))}}(aa);break;case"format":return $=(a.isFunction(k.onBeforeMask)&&k.onBeforeMask.call(_,f.value,k)||f.value).split(""),M.call(this,d,!0,!1,$),f.metadata?{value:ba?A().slice().reverse().join(""):A().join(""),metadata:j.call(this,{action:"getmetadata"},g,k)}:ba?A().slice().reverse().join(""):A().join("");case"isValid":f.value?($=f.value.split(""),M.call(this,d,!0,!0,$)):f.value=A().join("");for(var ia=A(),ja=Q(),ka=ia.length-1;ka>ja&&!H(ka);ka--);return ia.splice(ja,ka+1-ja),S(ia)&&f.value===A().join("");case"getemptymask":return z().join("");case"remove":return aa&&aa.inputmask&&(a.data(aa,"_inputmask_opts",null),X=a(aa),aa.inputmask._valueSet(k.autoUnmask?N(aa):aa.inputmask._valueGet(!0)),ga.off(aa),aa.inputmask.colorMask&&((Z=aa.inputmask.colorMask).removeChild(aa),Z.parentNode.insertBefore(aa,Z),Z.parentNode.removeChild(Z)),Object.getOwnPropertyDescriptor&&Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(aa),"value")&&aa.inputmask.__valueGet&&Object.defineProperty(aa,"value",{get:aa.inputmask.__valueGet,set:aa.inputmask.__valueSet,configurable:!0}):c.__lookupGetter__&&aa.__lookupGetter__("value")&&aa.inputmask.__valueGet&&(aa.__defineGetter__("value",aa.inputmask.__valueGet),aa.__defineSetter__("value",aa.inputmask.__valueSet)),aa.inputmask=d),aa;case"getmetadata":if(a.isArray(g.metadata)){var la=o(!0,0,!1).join("");return a.each(g.metadata,function(a,b){if(b.mask===la)return la=b,!1}),la}return g.metadata}}var k=navigator.userAgent,l=i("touchstart"),m=/iemobile/i.test(k),n=/iphone/i.test(k)&&!m;return e.prototype={dataAttribute:"data-inputmask",defaults:{placeholder:"_",optionalmarker:["[","]"],quantifiermarker:["{","}"],groupmarker:["(",")"],alternatormarker:"|",escapeChar:"\\",mask:null,regex:null,oncomplete:a.noop,onincomplete:a.noop,oncleared:a.noop,repeat:0,greedy:!1,autoUnmask:!1,removeMaskOnSubmit:!1,clearMaskOnLostFocus:!0,insertMode:!0,clearIncomplete:!1,alias:null,onKeyDown:a.noop,onBeforeMask:null,onBeforePaste:function(b,c){return a.isFunction(c.onBeforeMask)?c.onBeforeMask.call(this,b,c):b},onBeforeWrite:null,onUnMask:null,showMaskOnFocus:!0,showMaskOnHover:!0,onKeyValidation:a.noop,skipOptionalPartCharacter:" ",numericInput:!1,rightAlign:!1,undoOnEscape:!0,radixPoint:"",_radixDance:!1,groupSeparator:"",keepStatic:null,positionCaretOnTab:!0,tabThrough:!1,supportsInputType:["text","tel","password","search"],ignorables:[8,9,13,19,27,33,34,35,36,37,38,39,40,45,46,93,112,113,114,115,116,117,118,119,120,121,122,123,0,229],isComplete:null,preValidation:null,postValidation:null,staticDefinitionSymbol:d,jitMasking:!1,nullable:!0,inputEventOnly:!1,noValuePatching:!1,positionCaretOnClick:"lvp",casing:null,inputmode:"verbatim",colorMask:!1,disablePredictiveText:!1,importDataAttributes:!0},definitions:{9:{validator:"[0-91-9]",definitionSymbol:"*"},a:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",definitionSymbol:"*"},"*":{validator:"[0-91-9A-Za-zА-яЁёÀ-ÿµ]"}},aliases:{},masksCache:{},mask:function(h){var i=this;return"string"==typeof h&&(h=c.getElementById(h)||c.querySelectorAll(h)),h=h.nodeName?[h]:h,a.each(h,function(c,h){
|
3 |
-
var k=a.extend(!0,{},i.opts);if(function(c,e,g,h){if(!0===e.importDataAttributes){var i,j,k,l,m=function(a,e){null!==(e=e!==d?e:c.getAttribute(h+"-"+a))&&("string"==typeof e&&(0===a.indexOf("on")?e=b[e]:"false"===e?e=!1:"true"===e&&(e=!0)),g[a]=e)},n=c.getAttribute(h);if(n&&""!==n&&(n=n.replace(/'/g,'"'),j=JSON.parse("{"+n+"}")),j)for(l in k=d,j)if("alias"===l.toLowerCase()){k=j[l];break}for(i in m("alias",k),g.alias&&f(g.alias,g,e),e){if(j)for(l in k=d,j)if(l.toLowerCase()===i.toLowerCase()){k=j[l];break}m(i,k)}}return a.extend(!0,e,g),("rtl"===c.dir||e.rightAlign)&&(c.style.textAlign="right"),("rtl"===c.dir||e.numericInput)&&(c.dir="ltr",c.removeAttribute("dir"),e.isRTL=!0),Object.keys(g).length}(h,k,a.extend(!0,{},i.userOptions),i.dataAttribute)){var l=g(k,i.noMasksCache);l!==d&&(h.inputmask!==d&&(h.inputmask.opts.autoUnmask=!0,h.inputmask.remove()),h.inputmask=new e(d,d,!0),h.inputmask.opts=k,h.inputmask.noMasksCache=i.noMasksCache,h.inputmask.userOptions=a.extend(!0,{},i.userOptions),h.inputmask.isRTL=k.isRTL||k.numericInput,h.inputmask.el=h,h.inputmask.maskset=l,a.data(h,"_inputmask_opts",k),j.call(h.inputmask,{action:"mask"}))}}),h&&h[0]&&h[0].inputmask||this},option:function(b,c){return"string"==typeof b?this.opts[b]:"object"===(void 0===b?"undefined":h(b))?(a.extend(this.userOptions,b),this.el&&!0!==c&&this.mask(this.el),this):void 0},unmaskedvalue:function(a){return this.maskset=this.maskset||g(this.opts,this.noMasksCache),j.call(this,{action:"unmaskedvalue",value:a})},remove:function(){return j.call(this,{action:"remove"})},getemptymask:function(){return this.maskset=this.maskset||g(this.opts,this.noMasksCache),j.call(this,{action:"getemptymask"})},hasMaskedValue:function(){return!this.opts.autoUnmask},isComplete:function(){return this.maskset=this.maskset||g(this.opts,this.noMasksCache),j.call(this,{action:"isComplete"})},getmetadata:function(){return this.maskset=this.maskset||g(this.opts,this.noMasksCache),j.call(this,{action:"getmetadata"})},isValid:function(a){return this.maskset=this.maskset||g(this.opts,this.noMasksCache),j.call(this,{action:"isValid",value:a})},format:function(a,b){return this.maskset=this.maskset||g(this.opts,this.noMasksCache),j.call(this,{action:"format",value:a,metadata:b})},setValue:function(b){this.el&&a(this.el).trigger("setvalue",[b])},analyseMask:function(b,c,f){function g(a,b,c,d){this.matches=[],this.openGroup=a||!1,this.alternatorGroup=!1,this.isGroup=a||!1,this.isOptional=b||!1,this.isQuantifier=c||!1,this.isAlternator=d||!1,this.quantifier={min:1,max:1}}function h(b,g,h){h=h!==d?h:b.matches.length;var i=b.matches[h-1];if(c)0===g.indexOf("[")||s&&/\\d|\\s|\\w]/i.test(g)||"."===g?b.matches.splice(h++,0,{fn:new RegExp(g,f.casing?"i":""),optionality:!1,newBlockMarker:i===d?"master":i.def!==g,casing:null,def:g,placeholder:d,nativeDef:g}):(s&&(g=g[g.length-1]),a.each(g.split(""),function(a,c){i=b.matches[h-1],b.matches.splice(h++,0,{fn:null,optionality:!1,newBlockMarker:i===d?"master":i.def!==c&&null!==i.fn,casing:null,def:f.staticDefinitionSymbol||c,placeholder:f.staticDefinitionSymbol!==d?c:d,nativeDef:(s?"'":"")+c})})),s=!1;else{var j=(f.definitions?f.definitions[g]:d)||e.prototype.definitions[g];j&&!s?b.matches.splice(h++,0,{fn:j.validator?"string"==typeof j.validator?new RegExp(j.validator,f.casing?"i":""):new function(){this.test=j.validator}:new RegExp("."),optionality:!1,newBlockMarker:i===d?"master":i.def!==(j.definitionSymbol||g),casing:j.casing,def:j.definitionSymbol||g,placeholder:j.placeholder,nativeDef:g}):(b.matches.splice(h++,0,{fn:null,optionality:!1,newBlockMarker:i===d?"master":i.def!==g&&null!==i.fn,casing:null,def:f.staticDefinitionSymbol||g,placeholder:f.staticDefinitionSymbol!==d?g:d,nativeDef:(s?"'":"")+g}),s=!1)}}function i(){if(u.length>0){if(h(n=u[u.length-1],l),n.isAlternator){o=u.pop();for(var a=0;a<o.matches.length;a++)o.matches[a].isGroup&&(o.matches[a].isGroup=!1);u.length>0?(n=u[u.length-1]).matches.push(o):t.matches.push(o)}}else h(t,l)}function j(a){var b=new g(!0);return b.openGroup=!1,b.matches=a,b}var k,l,m,n,o,p,q=/(?:[?*+]|\{[0-9\+\*]+(?:,[0-9\+\*]*)?(?:\|[0-9\+\*]*)?\})|[^.?*+^${[]()|\\]+|./g,r=/\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g,s=!1,t=new g,u=[],v=[];for(c&&(f.optionalmarker[0]=d,f.optionalmarker[1]=d);k=c?r.exec(b):q.exec(b);){if(l=k[0],c)switch(l.charAt(0)){case"?":l="{0,1}";break;case"+":case"*":l="{"+l+"}"}if(s)i();else switch(l.charAt(0)){case"(?=":case"(?!":case"(?<=":case"(?<!":break;case f.escapeChar:s=!0,c&&i();break;case f.optionalmarker[1]:case f.groupmarker[1]:if((m=u.pop()).openGroup=!1,m!==d)if(u.length>0){if((n=u[u.length-1]).matches.push(m),n.isAlternator){o=u.pop();for(var w=0;w<o.matches.length;w++)o.matches[w].isGroup=!1,o.matches[w].alternatorGroup=!1;u.length>0?(n=u[u.length-1]).matches.push(o):t.matches.push(o)}}else t.matches.push(m);else i();break;case f.optionalmarker[0]:u.push(new g(!1,!0));break;case f.groupmarker[0]:u.push(new g(!0));break;case f.quantifiermarker[0]:var x=new g(!1,!1,!0),y=(l=l.replace(/[{}]/g,"")).split("|"),z=y[0].split(","),A=isNaN(z[0])?z[0]:parseInt(z[0]),B=1===z.length?A:isNaN(z[1])?z[1]:parseInt(z[1]);"*"!==A&&"+"!==A||(A="*"===B?0:1),x.quantifier={min:A,max:B,jit:y[1]};var C=u.length>0?u[u.length-1].matches:t.matches;if((k=C.pop()).isAlternator){C.push(k),C=k.matches;var D=new g(!0),E=C.pop();C.push(D),C=D.matches,k=E}k.isGroup||(k=j([k])),C.push(k),C.push(x);break;case f.alternatormarker:var F=function(a){var b=a.pop();return b.isQuantifier&&(b=j([a.pop(),b])),b};if(u.length>0){var G=(n=u[u.length-1]).matches[n.matches.length-1];p=n.openGroup&&(G.matches===d||!1===G.isGroup&&!1===G.isAlternator)?u.pop():F(n.matches)}else p=F(t.matches);if(p.isAlternator)u.push(p);else if(p.alternatorGroup?(o=u.pop(),p.alternatorGroup=!1):o=new g(!1,!1,!1,!0),o.matches.push(p),u.push(o),p.openGroup){p.openGroup=!1;var H=new g(!0);H.alternatorGroup=!0,u.push(H)}break;default:i()}}for(;u.length>0;)m=u.pop(),t.matches.push(m);return t.matches.length>0&&(function b(e){e&&e.matches&&a.each(e.matches,function(a,g){var i=e.matches[a+1];(i===d||i.matches===d||!1===i.isQuantifier)&&g&&g.isGroup&&(g.isGroup=!1,c||(h(g,f.groupmarker[0],0),!0!==g.openGroup&&h(g,f.groupmarker[1]))),b(g)})}(t),v.push(t)),(f.numericInput||f.isRTL)&&function a(b){for(var c in b.matches=b.matches.reverse(),b.matches)if(b.matches.hasOwnProperty(c)){var e=parseInt(c);if(b.matches[c].isQuantifier&&b.matches[e+1]&&b.matches[e+1].isGroup){var g=b.matches[c];b.matches.splice(c,1),b.matches.splice(e+1,0,g)}b.matches[c].matches!==d?b.matches[c]=a(b.matches[c]):b.matches[c]=((h=b.matches[c])===f.optionalmarker[0]?h=f.optionalmarker[1]:h===f.optionalmarker[1]?h=f.optionalmarker[0]:h===f.groupmarker[0]?h=f.groupmarker[1]:h===f.groupmarker[1]&&(h=f.groupmarker[0]),h)}var h;return b}(v[0]),v}},e.extendDefaults=function(b){a.extend(!0,e.prototype.defaults,b)},e.extendDefinitions=function(b){a.extend(!0,e.prototype.definitions,b)},e.extendAliases=function(b){a.extend(!0,e.prototype.aliases,b)},e.format=function(a,b,c){return e(b).format(a,c)},e.unmask=function(a,b){return e(b).unmaskedvalue(a)},e.isValid=function(a,b){return e(b).isValid(a)},e.remove=function(b){"string"==typeof b&&(b=c.getElementById(b)||c.querySelectorAll(b)),b=b.nodeName?[b]:b,a.each(b,function(a,b){b.inputmask&&b.inputmask.remove()})},e.setValue=function(b,d){"string"==typeof b&&(b=c.getElementById(b)||c.querySelectorAll(b)),b=b.nodeName?[b]:b,a.each(b,function(b,c){c.inputmask?c.inputmask.setValue(d):a(c).trigger("setvalue",[d])})},e.escapeRegex=function(a){return a.replace(new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^"].join("|\\")+")","gim"),"\\$1")},e.keyCode={BACKSPACE:8,BACKSPACE_SAFARI:127,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,RIGHT:39,SPACE:32,TAB:9,UP:38,X:88,CONTROL:17},e},e=[c(0),c(5),c(6)],void 0===(f="function"==typeof(d=g)?d.apply(b,e):d)||(a.exports=f)},function(a,b){a.exports=jQuery},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}c(4),c(7),c(8),c(9);var e=d(c(1)),f=d(c(0)),g=d(c(2));f.default===g.default&&c(10),window.Inputmask=e.default},function(a,b,c){"use strict";var d,e,f,g;"function"==typeof Symbol&&Symbol.iterator,g=function(a,b){function c(a){if(!a.tokenizer){var b=[];for(var c in g)-1===b.indexOf(c[0])&&b.push(c[0]);a.tokenizer="("+b.join("+|")+")+?|.",a.tokenizer=new RegExp(a.tokenizer,"g")}return a.tokenizer}function d(a,d,e){for(var f,h="";f=c(e).exec(a);)if(void 0===d)if(g[f[0]])h+="("+g[f[0]][0]+")";else switch(f[0]){case"[":h+="(";break;case"]":h+=")?";break;default:h+=b.escapeRegex(f[0])}else g[f[0]]?h+=g[f[0]][3].call(d.date):h+=f[0];return h}function e(a,b){for(a=String(a),b=b||2;a.length<b;)a="0"+a;return a}function f(a,b,d){function e(a){var b=4===a.length?a:(new Date).getFullYear().toString().substr(0,4-a.length)+a;return d.min&&d.min.year&&d.max&&d.max.year?(b=b.replace(/[^0-9]/g,""),b+=d.min.year==d.max.year?d.min.year.substr(b.length):(""!==b&&0==d.max.year.indexOf(b)?parseInt(d.max.year)-1:parseInt(d.min.year)+1).toString().substr(b.length)):b=b.replace(/[^0-9]/g,"0"),b}var f,h,i,j={date:new Date(1,0,1)},k=a;if("string"==typeof k){for(;h=c(d).exec(b);){var l=k.slice(0,h[0].length);g.hasOwnProperty(h[0])&&(f=g[h[0]][2],i=g[h[0]][1],function(a,b,c){"year"===f?(a[f]=e(b),a["raw"+f]=b):a[f]=c.min&&b.match(/[^0-9]/)?c.min[f]:b,void 0!==i&&i.call(a.date,"month"==f?parseInt(a[f])-1:a[f])}(j,l,d)),k=k.slice(l.length)}return j}}var g={d:["[1-9]|[12][0-9]|3[01]",Date.prototype.setDate,"day",Date.prototype.getDate],dd:["0[1-9]|[12][0-9]|3[01]",Date.prototype.setDate,"day",function(){return e(Date.prototype.getDate.call(this),2)}],ddd:[""],dddd:[""],m:["[1-9]|1[012]",Date.prototype.setMonth,"month",function(){return Date.prototype.getMonth.call(this)+1}],mm:["0[1-9]|1[012]",Date.prototype.setMonth,"month",function(){return e(Date.prototype.getMonth.call(this)+1,2)}],mmm:[""],mmmm:[""],yy:["[0-9]{2}",Date.prototype.setFullYear,"year",function(){return e(Date.prototype.getFullYear.call(this),2)}],yyyy:["[0-9]{4}",Date.prototype.setFullYear,"year",function(){return e(Date.prototype.getFullYear.call(this),4)}],h:["[1-9]|1[0-2]",Date.prototype.setHours,"hours",Date.prototype.getHours],hh:["0[1-9]|1[0-2]",Date.prototype.setHours,"hours",function(){return e(Date.prototype.getHours.call(this),2)}],hhh:["[0-9]+",Date.prototype.setHours,"hours",Date.prototype.getHours],H:["1?[0-9]|2[0-3]",Date.prototype.setHours,"hours",Date.prototype.getHours],HH:["[01][0-9]|2[0-3]",Date.prototype.setHours,"hours",function(){return e(Date.prototype.getHours.call(this),2)}],HHH:["[0-9]+",Date.prototype.setHours,"hours",Date.prototype.getHours],M:["[1-5]?[0-9]",Date.prototype.setMinutes,"minutes",Date.prototype.getMinutes],MM:["[0-5][0-9]",Date.prototype.setMinutes,"minutes",function(){return e(Date.prototype.getMinutes.call(this),2)}],s:["[1-5]?[0-9]",Date.prototype.setSeconds,"seconds",Date.prototype.getSeconds],ss:["[0-5][0-9]",Date.prototype.setSeconds,"seconds",function(){return e(Date.prototype.getSeconds.call(this),2)}],l:["[0-9]{3}",Date.prototype.setMilliseconds,"milliseconds",function(){return e(Date.prototype.getMilliseconds.call(this),3)}],L:["[0-9]{2}",Date.prototype.setMilliseconds,"milliseconds",function(){return e(Date.prototype.getMilliseconds.call(this),2)}],t:["[ap]"],tt:["[ap]m"],T:["[AP]"],TT:["[AP]M"],Z:[""],o:[""],S:[""]},h={isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"};return b.extendAliases({datetime:{mask:function(a){return g.S=a.i18n.ordinalSuffix.join("|"),a.inputFormat=h[a.inputFormat]||a.inputFormat,a.displayFormat=h[a.displayFormat]||a.displayFormat||a.inputFormat,a.outputFormat=h[a.outputFormat]||a.outputFormat||a.inputFormat,a.placeholder=""!==a.placeholder?a.placeholder:a.inputFormat.replace(/[\[\]]/,""),a.min=f(a.min,a.inputFormat,a),a.max=f(a.max,a.inputFormat,a),a.regex=d(a.inputFormat,void 0,a),null},placeholder:"",inputFormat:"isoDateTime",displayFormat:void 0,outputFormat:void 0,min:null,max:null,i18n:{dayNames:["Mon","Tue","Wed","Thu","Fri","Sat","Sun","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],ordinalSuffix:["st","nd","rd","th"]},postValidation:function(a,b,c){var d=b,e=f(a.join(""),c.inputFormat,c);return d&&e.date.getTime()==e.date.getTime()&&(d=(d=function(a,b){return(!isFinite(a.day)||"29"==a.day&&!isFinite(a.rawyear)||new Date(a.date.getFullYear(),isFinite(a.month)?a.month:a.date.getMonth()+1,0).getDate()>=a.day)&&b}(e,d))&&function(a,b){var c=!0;return b.min&&b.min.date.getTime()==b.min.date.getTime()&&(c=b.min.date.getTime()<=a.date.getTime()),c&&b.max&&b.max.date.getTime()==b.max.date.getTime()&&(c=b.max.date.getTime()>=a.date.getTime()),c}(e,c)),d},onKeyDown:function(d,f,g,h){if(d.ctrlKey&&d.keyCode===b.keyCode.RIGHT){for(var i,j=new Date,k="";i=c(h).exec(h.inputFormat);)"d"===i[0].charAt(0)?k+=e(j.getDate(),i[0].length):"m"===i[0].charAt(0)?k+=e(j.getMonth()+1,i[0].length):"yyyy"===i[0]?k+=j.getFullYear().toString():"y"===i[0].charAt(0)&&(k+=e(j.getYear(),i[0].length));this.inputmask._valueSet(k),a(this).trigger("setvalue")}},onUnMask:function(a,b,c){return d(c.outputFormat,f(a,c.inputFormat,c),c)},casing:function(a,b,c,d){return 0==b.nativeDef.indexOf("[ap]")?a.toLowerCase():0==b.nativeDef.indexOf("[AP]")?a.toUpperCase():a},insertMode:!1}}),b},e=[c(0),c(1)],void 0===(f="function"==typeof(d=g)?d.apply(b,e):d)||(a.exports=f)},function(a,b,c){"use strict";var d;"function"==typeof Symbol&&Symbol.iterator,void 0===(d=function(){return window}.call(b,c,b,a))||(a.exports=d)},function(a,b,c){"use strict";var d;"function"==typeof Symbol&&Symbol.iterator,void 0===(d=function(){return document}.call(b,c,b,a))||(a.exports=d)},function(a,b,c){"use strict";var d,e,f,g;"function"==typeof Symbol&&Symbol.iterator,g=function(a,b){return b.extendDefinitions({A:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",casing:"upper"},"&":{validator:"[0-9A-Za-zА-яЁёÀ-ÿµ]",casing:"upper"},"#":{validator:"[0-9A-Fa-f]",casing:"upper"}}),b.extendAliases({cssunit:{regex:"[+-]?[0-9]+\\.?([0-9]+)?(px|em|rem|ex|%|in|cm|mm|pt|pc)"},url:{regex:"(https?|ftp)//.*",autoUnmask:!1},ip:{mask:"i[i[i]].i[i[i]].i[i[i]].i[i[i]]",definitions:{i:{validator:function(a,b,c,d,e){return c-1>-1&&"."!==b.buffer[c-1]?(a=b.buffer[c-1]+a,a=c-2>-1&&"."!==b.buffer[c-2]?b.buffer[c-2]+a:"0"+a):a="00"+a,new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]").test(a)}}},onUnMask:function(a,b,c){return a},inputmode:"numeric"},email:{mask:"*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]",greedy:!1,casing:"lower",onBeforePaste:function(a,b){return(a=a.toLowerCase()).replace("mailto:","")},definitions:{"*":{validator:"[0-91-9A-Za-zА-яЁёÀ-ÿµ!#$%&'*+/=?^_`{|}~-]"},"-":{validator:"[0-9A-Za-z-]"}},onUnMask:function(a,b,c){return a},inputmode:"email"},mac:{mask:"##:##:##:##:##:##"},vin:{mask:"V{13}9{4}",definitions:{V:{validator:"[A-HJ-NPR-Za-hj-npr-z\\d]",casing:"upper"}},clearIncomplete:!0,autoUnmask:!0}}),b},e=[c(0),c(1)],void 0===(f="function"==typeof(d=g)?d.apply(b,e):d)||(a.exports=f)},function(a,b,c){"use strict";var d,e,f,g;"function"==typeof Symbol&&Symbol.iterator,g=function(a,b,c){function d(a,c){for(var d="",e=0;e<a.length;e++)b.prototype.definitions[a.charAt(e)]||c.definitions[a.charAt(e)]||c.optionalmarker.start===a.charAt(e)||c.optionalmarker.end===a.charAt(e)||c.quantifiermarker.start===a.charAt(e)||c.quantifiermarker.end===a.charAt(e)||c.groupmarker.start===a.charAt(e)||c.groupmarker.end===a.charAt(e)||c.alternatormarker===a.charAt(e)?d+="\\"+a.charAt(e):d+=a.charAt(e);return d}return b.extendAliases({numeric:{mask:function(a){if(0!==a.repeat&&isNaN(a.integerDigits)&&(a.integerDigits=a.repeat),a.repeat=0,a.groupSeparator===a.radixPoint&&a.digits&&"0"!==a.digits&&("."===a.radixPoint?a.groupSeparator=",":","===a.radixPoint?a.groupSeparator=".":a.groupSeparator="")," "===a.groupSeparator&&(a.skipOptionalPartCharacter=c),a.autoGroup=a.autoGroup&&""!==a.groupSeparator,a.autoGroup&&("string"==typeof a.groupSize&&isFinite(a.groupSize)&&(a.groupSize=parseInt(a.groupSize)),isFinite(a.integerDigits))){var b=Math.floor(a.integerDigits/a.groupSize),e=a.integerDigits%a.groupSize;a.integerDigits=parseInt(a.integerDigits)+(0===e?b-1:b),a.integerDigits<1&&(a.integerDigits="*")}a.placeholder.length>1&&(a.placeholder=a.placeholder.charAt(0)),"radixFocus"===a.positionCaretOnClick&&""===a.placeholder&&!1===a.integerOptional&&(a.positionCaretOnClick="lvp"),a.definitions[";"]=a.definitions["~"],a.definitions[";"].definitionSymbol="~",!0===a.numericInput&&(a.positionCaretOnClick="radixFocus"===a.positionCaretOnClick?"lvp":a.positionCaretOnClick,a.digitsOptional=!1,isNaN(a.digits)&&(a.digits=2),a.decimalProtect=!1);var f="[+]";if(f+=d(a.prefix,a),!0===a.integerOptional?f+="~{1,"+a.integerDigits+"}":f+="~{"+a.integerDigits+"}",a.digits!==c){var g=a.decimalProtect?":":a.radixPoint,h=a.digits.toString().split(",");isFinite(h[0])&&h[1]&&isFinite(h[1])?f+=g+";{"+a.digits+"}":(isNaN(a.digits)||parseInt(a.digits)>0)&&(a.digitsOptional?f+="["+g+";{1,"+a.digits+"}]":f+=g+";{"+a.digits+"}")}return f+=d(a.suffix,a),f+="[-]",a.greedy=!1,f},placeholder:"",greedy:!1,digits:"*",digitsOptional:!0,enforceDigitsOnBlur:!1,radixPoint:".",positionCaretOnClick:"radixFocus",groupSize:3,groupSeparator:"",autoGroup:!1,allowMinus:!0,negationSymbol:{front:"-",back:""},integerDigits:"+",integerOptional:!0,prefix:"",suffix:"",rightAlign:!0,decimalProtect:!0,min:null,max:null,step:1,insertMode:!0,autoUnmask:!1,unmaskAsNumber:!1,inputmode:"numeric",preValidation:function(b,d,e,f,g,h){if("-"===e||e===g.negationSymbol.front)return!0===g.allowMinus&&(g.isNegative=g.isNegative===c||!g.isNegative,""===b.join("")||{caret:d,dopost:!0});if(!1===f&&e===g.radixPoint&&g.digits!==c&&(isNaN(g.digits)||parseInt(g.digits)>0)){var i=a.inArray(g.radixPoint,b);if(-1!==i&&h.validPositions[i]!==c)return!0===g.numericInput?d===i:{caret:i+1}}return!0},postValidation:function(d,e,f){var g=f.suffix.split(""),h=f.prefix.split("");if(e.pos===c&&e.caret!==c&&!0!==e.dopost)return e;var i=e.caret!==c?e.caret:e.pos,j=d.slice();f.numericInput&&(i=j.length-i-1,j=j.reverse());var k=j[i];if(k===f.groupSeparator&&(k=j[i+=1]),i===j.length-f.suffix.length-1&&k===f.radixPoint)return e;k!==c&&k!==f.radixPoint&&k!==f.negationSymbol.front&&k!==f.negationSymbol.back&&(j[i]="?",f.prefix.length>0&&i>=(!1===f.isNegative?1:0)&&i<f.prefix.length-1+(!1===f.isNegative?1:0)?h[i-(!1===f.isNegative?1:0)]="?":f.suffix.length>0&&i>=j.length-f.suffix.length-(!1===f.isNegative?1:0)&&(g[i-(j.length-f.suffix.length-(!1===f.isNegative?1:0))]="?")),h=h.join(""),g=g.join("");var l=j.join("").replace(h,"");if(l=(l=(l=(l=l.replace(g,"")).replace(new RegExp(b.escapeRegex(f.groupSeparator),"g"),"")).replace(new RegExp("[-"+b.escapeRegex(f.negationSymbol.front)+"]","g"),"")).replace(new RegExp(b.escapeRegex(f.negationSymbol.back)+"$"),""),isNaN(f.placeholder)&&(l=l.replace(new RegExp(b.escapeRegex(f.placeholder),"g"),"")),l.length>1&&1!==l.indexOf(f.radixPoint)&&("0"===k&&(l=l.replace(/^\?/g,"")),l=l.replace(/^0/g,"")),l.charAt(0)===f.radixPoint&&""!==f.radixPoint&&!0!==f.numericInput&&(l="0"+l),""!==l){if(l=l.split(""),(!f.digitsOptional||f.enforceDigitsOnBlur&&"blur"===e.event)&&isFinite(f.digits)){var m=a.inArray(f.radixPoint,l),n=a.inArray(f.radixPoint,j);-1===m&&(l.push(f.radixPoint),m=l.length-1);for(var o=1;o<=f.digits;o++)f.digitsOptional&&(!f.enforceDigitsOnBlur||"blur"!==e.event)||l[m+o]!==c&&l[m+o]!==f.placeholder.charAt(0)?-1!==n&&j[n+o]!==c&&(l[m+o]=l[m+o]||j[n+o]):l[m+o]=e.placeholder||f.placeholder.charAt(0)}if(!0!==f.autoGroup||""===f.groupSeparator||k===f.radixPoint&&e.pos===c&&!e.dopost)l=l.join("");else{var p=l[l.length-1]===f.radixPoint&&e.c===f.radixPoint;l=b(function(a,b){var c="";if(c+="("+b.groupSeparator+"*{"+b.groupSize+"}){*}",""!==b.radixPoint){var d=a.join("").split(b.radixPoint);d[1]&&(c+=b.radixPoint+"*{"+d[1].match(/^\d*\??\d*/)[0].length+"}")}return c}(l,f),{numericInput:!0,jitMasking:!0,definitions:{"*":{validator:"[0-9?]",cardinality:1}}}).format(l.join("")),p&&(l+=f.radixPoint),l.charAt(0)===f.groupSeparator&&l.substr(1)}}if(f.isNegative&&"blur"===e.event&&(f.isNegative="0"!==l),l=h+l,l+=g,f.isNegative&&(l=f.negationSymbol.front+l,l+=f.negationSymbol.back),l=l.split(""),k!==c)if(k!==f.radixPoint&&k!==f.negationSymbol.front&&k!==f.negationSymbol.back)(i=a.inArray("?",l))>-1?l[i]=k:i=e.caret||0;else if(k===f.radixPoint||k===f.negationSymbol.front||k===f.negationSymbol.back){var q=a.inArray(k,l);-1!==q&&(i=q)}f.numericInput&&(i=l.length-i-1,l=l.reverse());var r={caret:k===c||e.pos!==c?i+(f.numericInput?-1:1):i,buffer:l,refreshFromBuffer:e.dopost||d.join("")!==l.join("")};return r.refreshFromBuffer?r:e},onBeforeWrite:function(d,e,f,g){if(d)switch(d.type){case"keydown":return g.postValidation(e,{caret:f,dopost:!0},g);case"blur":case"checkval":var h;if(function(a){a.parseMinMaxOptions===c&&(null!==a.min&&(a.min=a.min.toString().replace(new RegExp(b.escapeRegex(a.groupSeparator),"g"),""),","===a.radixPoint&&(a.min=a.min.replace(a.radixPoint,".")),a.min=isFinite(a.min)?parseFloat(a.min):NaN,isNaN(a.min)&&(a.min=Number.MIN_VALUE)),null!==a.max&&(a.max=a.max.toString().replace(new RegExp(b.escapeRegex(a.groupSeparator),"g"),""),","===a.radixPoint&&(a.max=a.max.replace(a.radixPoint,".")),a.max=isFinite(a.max)?parseFloat(a.max):NaN,isNaN(a.max)&&(a.max=Number.MAX_VALUE)),a.parseMinMaxOptions="done")}(g),null!==g.min||null!==g.max){if(h=g.onUnMask(e.join(""),c,a.extend({},g,{unmaskAsNumber:!0})),null!==g.min&&h<g.min)return g.isNegative=g.min<0,g.postValidation(g.min.toString().replace(".",g.radixPoint).split(""),{caret:f,dopost:!0,placeholder:"0"},g);if(null!==g.max&&h>g.max)return g.isNegative=g.max<0,g.postValidation(g.max.toString().replace(".",g.radixPoint).split(""),{caret:f,dopost:!0,placeholder:"0"},g)}return g.postValidation(e,{caret:f,placeholder:"0",event:"blur"},g);case"_checkval":return{caret:f}}},regex:{integerPart:function(a,c){return c?new RegExp("["+b.escapeRegex(a.negationSymbol.front)+"+]?"):new RegExp("["+b.escapeRegex(a.negationSymbol.front)+"+]?\\d+")},integerNPart:function(a){return new RegExp("[\\d"+b.escapeRegex(a.groupSeparator)+b.escapeRegex(a.placeholder.charAt(0))+"]+")}},definitions:{"~":{validator:function(a,d,e,f,g,h){var i;if("k"===a||"m"===a){i={insert:[],c:0};for(var j=0,k="k"===a?2:5;j<k;j++)i.insert.push({pos:e+j,c:0});return i.pos=e+k,i}if(!0===(i=f?new RegExp("[0-9"+b.escapeRegex(g.groupSeparator)+"]").test(a):new RegExp("[0-9]").test(a))){if(!0!==g.numericInput&&d.validPositions[e]!==c&&"~"===d.validPositions[e].match.def&&!h){var l=d.buffer.join(""),m=(l=(l=l.replace(new RegExp("[-"+b.escapeRegex(g.negationSymbol.front)+"]","g"),"")).replace(new RegExp(b.escapeRegex(g.negationSymbol.back)+"$"),"")).split(g.radixPoint);m.length>1&&(m[1]=m[1].replace(/0/g,g.placeholder.charAt(0))),"0"===m[0]&&(m[0]=m[0].replace(/0/g,g.placeholder.charAt(0))),l=m[0]+g.radixPoint+m[1]||"";var n=d._buffer.join("");for(l===g.radixPoint&&(l=n);null===l.match(b.escapeRegex(n)+"$");)n=n.slice(1);i=(l=(l=l.replace(n,"")).split(""))[e]===c?{pos:e,remove:e}:{pos:e}}}else f||a!==g.radixPoint||d.validPositions[e-1]!==c||(i={insert:{pos:e,c:0},pos:e+1});return i},cardinality:1},"+":{validator:function(a,b,c,d,e){return e.allowMinus&&("-"===a||a===e.negationSymbol.front)},cardinality:1,placeholder:""},"-":{validator:function(a,b,c,d,e){return e.allowMinus&&a===e.negationSymbol.back},cardinality:1,placeholder:""},":":{validator:function(a,c,d,e,f){var g="["+b.escapeRegex(f.radixPoint)+"]",h=new RegExp(g).test(a);return h&&c.validPositions[d]&&c.validPositions[d].match.placeholder===f.radixPoint&&(h={caret:d+1}),h},cardinality:1,placeholder:function(a){return a.radixPoint}}},onUnMask:function(a,c,d){if(""===c&&!0===d.nullable)return c;var e=a.replace(d.prefix,"");return e=(e=e.replace(d.suffix,"")).replace(new RegExp(b.escapeRegex(d.groupSeparator),"g"),""),""!==d.placeholder.charAt(0)&&(e=e.replace(new RegExp(d.placeholder.charAt(0),"g"),"0")),d.unmaskAsNumber?(""!==d.radixPoint&&-1!==e.indexOf(d.radixPoint)&&(e=e.replace(b.escapeRegex.call(this,d.radixPoint),".")),e=(e=e.replace(new RegExp("^"+b.escapeRegex(d.negationSymbol.front)),"-")).replace(new RegExp(b.escapeRegex(d.negationSymbol.back)+"$"),""),Number(e)):e},isComplete:function(a,c){var d=(c.numericInput?a.slice().reverse():a).join("");return d=(d=(d=(d=(d=d.replace(new RegExp("^"+b.escapeRegex(c.negationSymbol.front)),"-")).replace(new RegExp(b.escapeRegex(c.negationSymbol.back)+"$"),"")).replace(c.prefix,"")).replace(c.suffix,"")).replace(new RegExp(b.escapeRegex(c.groupSeparator)+"([0-9]{3})","g"),"$1"),","===c.radixPoint&&(d=d.replace(b.escapeRegex(c.radixPoint),".")),isFinite(d)},onBeforeMask:function(d,e){if(e.isNegative=c,"number"==typeof d&&""!==e.radixPoint&&(d=d.toString().replace(".",e.radixPoint)),d=d.toString().charAt(d.length-1)===e.radixPoint?d.toString().substr(0,d.length-1):d.toString(),""!==e.radixPoint&&isFinite(d)){var f=d.split("."),g=""!==e.groupSeparator?parseInt(e.groupSize):0;2===f.length&&(f[0].length>g||f[1].length>g||f[0].length<=g&&f[1].length<g)&&(d=d.replace(".",e.radixPoint))}var h=d.match(/,/g),i=d.match(/\./g);if(d=i&&h?i.length>h.length?(d=d.replace(/\./g,"")).replace(",",e.radixPoint):h.length>i.length?(d=d.replace(/,/g,"")).replace(".",e.radixPoint):d.indexOf(".")<d.indexOf(",")?d.replace(/\./g,""):d.replace(/,/g,""):d.replace(new RegExp(b.escapeRegex(e.groupSeparator),"g"),""),0===e.digits&&(-1!==d.indexOf(".")?d=d.substring(0,d.indexOf(".")):-1!==d.indexOf(",")&&(d=d.substring(0,d.indexOf(",")))),""!==e.radixPoint&&isFinite(e.digits)&&-1!==d.indexOf(e.radixPoint)){var j=d.split(e.radixPoint)[1].match(new RegExp("\\d*"))[0];if(parseInt(e.digits)<j.toString().length){var k=Math.pow(10,parseInt(e.digits));d=d.replace(b.escapeRegex(e.radixPoint),"."),d=(d=Math.round(parseFloat(d)*k)/k).toString().replace(".",e.radixPoint)}}return function(b,c){var d=a.inArray(c.radixPoint,b);-1===d&&(b.push(c.radixPoint),d=b.length-1);for(var e=1;e<=c.digits;e++)b[d+e]=b[d+e]||"0";return b}(d.toString().split(""),e).join("")},onKeyDown:function(c,d,e,f){var g=a(this);if(c.ctrlKey)switch(c.keyCode){case b.keyCode.UP:g.val(parseFloat(this.inputmask.unmaskedvalue())+parseInt(f.step)),g.trigger("setvalue");break;case b.keyCode.DOWN:g.val(parseFloat(this.inputmask.unmaskedvalue())-parseInt(f.step)),g.trigger("setvalue")}}},currency:{prefix:"$ ",groupSeparator:",",alias:"numeric",placeholder:"0",autoGroup:!0,digits:2,digitsOptional:!1,clearMaskOnLostFocus:!1},decimal:{alias:"numeric"},integer:{alias:"numeric",digits:0,radixPoint:""},percentage:{alias:"numeric",digits:2,digitsOptional:!0,radixPoint:".",placeholder:"0",autoGroup:!1,min:0,max:100,suffix:" %",allowMinus:!1}}),b},e=[c(0),c(1)],void 0===(f="function"==typeof(d=g)?d.apply(b,e):d)||(a.exports=f)},function(a,b,c){"use strict";var d,e,f,g;"function"==typeof Symbol&&Symbol.iterator,g=function(a,b){function c(a,b){var c=(a.mask||a).replace(/#/g,"0").replace(/\)/,"0").replace(/[+()#-]/g,""),d=(b.mask||b).replace(/#/g,"0").replace(/\)/,"0").replace(/[+()#-]/g,"");return c.localeCompare(d)}var d=b.prototype.analyseMask;return b.prototype.analyseMask=function(b,c,e){var f={};return e.phoneCodes&&(e.phoneCodes&&e.phoneCodes.length>1e3&&(function a(c,d,e){d=d||"",e=e||f,""!==d&&(e[d]={});for(var g="",h=e[d]||e,i=c.length-1;i>=0;i--)h[g=(b=c[i].mask||c[i]).substr(0,1)]=h[g]||[],h[g].unshift(b.substr(1)),c.splice(i,1);for(var j in h)h[j].length>500&&a(h[j].slice(),j,h)}((b=b.substr(1,b.length-2)).split(e.groupmarker[1]+e.alternatormarker+e.groupmarker[0])),b=function b(c){var d="",f=[];for(var g in c)a.isArray(c[g])?1===c[g].length?f.push(g+c[g]):f.push(g+e.groupmarker[0]+c[g].join(e.groupmarker[1]+e.alternatormarker+e.groupmarker[0])+e.groupmarker[1]):f.push(g+b(c[g]));return 1===f.length?d+=f[0]:d+=e.groupmarker[0]+f.join(e.groupmarker[1]+e.alternatormarker+e.groupmarker[0])+e.groupmarker[1],d}(f)),b=b.replace(/9/g,"\\9")),d.call(this,b,c,e)},b.extendAliases({abstractphone:{groupmarker:["<",">"],countrycode:"",phoneCodes:[],keepStatic:"auto",mask:function(a){return a.definitions={"#":b.prototype.definitions[9]},a.phoneCodes.sort(c)},onBeforeMask:function(a,b){var c=a.replace(/^0{1,2}/,"").replace(/[\s]/g,"");return(c.indexOf(b.countrycode)>1||-1===c.indexOf(b.countrycode))&&(c="+"+b.countrycode+c),c},onUnMask:function(a,b,c){return a.replace(/[()#-]/g,"")},inputmode:"tel"}}),b},e=[c(0),c(1)],void 0===(f="function"==typeof(d=g)?d.apply(b,e):d)||(a.exports=f)},function(a,b,c){"use strict";var d,e,f,g,h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};g=function(a,b){return void 0===a.fn.inputmask&&(a.fn.inputmask=function(c,d){var e,f=this[0];if(void 0===d&&(d={}),"string"==typeof c)switch(c){case"unmaskedvalue":return f&&f.inputmask?f.inputmask.unmaskedvalue():a(f).val();case"remove":return this.each(function(){this.inputmask&&this.inputmask.remove()});case"getemptymask":return f&&f.inputmask?f.inputmask.getemptymask():"";case"hasMaskedValue":return!(!f||!f.inputmask)&&f.inputmask.hasMaskedValue();case"isComplete":return!f||!f.inputmask||f.inputmask.isComplete();case"getmetadata":return f&&f.inputmask?f.inputmask.getmetadata():void 0;case"setvalue":b.setValue(f,d);break;case"option":if("string"!=typeof d)return this.each(function(){if(void 0!==this.inputmask)return this.inputmask.option(d)});if(f&&void 0!==f.inputmask)return f.inputmask.option(d);break;default:return d.alias=c,e=new b(d),this.each(function(){e.mask(this)})}else{if("object"==(void 0===c?"undefined":h(c)))return e=new b(c),void 0===c.mask&&void 0===c.alias?this.each(function(){if(void 0!==this.inputmask)return this.inputmask.option(c);e.mask(this)}):this.each(function(){e.mask(this)});if(void 0===c)return this.each(function(){(e=new b(d)).mask(this)})}}),a.fn.inputmask},e=[c(2),c(1)],void 0===(f="function"==typeof(d=g)?d.apply(b,e):d)||(a.exports=f)}]),jQuery&&function(a){a.extend(a.fn,{miniColors:function(b,c){var d=function(b,c,d){var e=s(b.val());e||(e="ffffff");var f=x(e),h=a('<span class="input-group-addon" style="background-color: #'+e+'" href="#"></span>');h.insertAfter(b),b.addClass("miniColors").data("original-maxlength",b.attr("maxlength")||null).data("original-autocomplete",b.attr("autocomplete")||null).data("letterCase",c.letterCase?c.letterCase:"uppercase").data("trigger",h).data("hsb",f).data("change",c.change?c.change:null).data("close",c.close?c.close:null).data("open",c.open?c.open:null).attr("maxlength",7).attr("autocomplete","off").val("#"+o(e,c.letterCase)).trigger("change"),c.readonly&&b.prop("readonly",!0),c.disabled&&g(b),h.on("click.miniColors",function(a){a.preventDefault(),""===b.val()&&b.val("#").trigger("change"),i(b)}),b.on("focus.miniColors",function(a){""===b.val()&&b.val("#").trigger("change"),i(b)}),b.on("blur.miniColors",function(a){var c=s(y(b.data("hsb")));b.val(c?"#"+o(c,b.data("letterCase")):"").trigger("change")}),b.on("keydown.miniColors",function(a){9===a.keyCode&&j(b)}),b.on("keyup.miniColors",function(a){n(b)}),b.on("paste.miniColors",function(a){setTimeout(function(){n(b)},5)})},e=function(b){j(),b=a(b),b.data("trigger").remove(),b.attr("autocomplete",b.data("original-autocomplete")).attr("maxlength",b.data("original-maxlength")).removeData().removeClass("miniColors").off(".miniColors"),a(document).off(".miniColors")},f=function(a){
|
4 |
-
a.prop("disabled",!1).data("trigger").css("opacity",1)},g=function(a){j(a),a.prop("disabled",!0).data("trigger").css("opacity",.5)},i=function(b){if(b.prop("disabled"))return!1;j();var c=a('<div class="miniColors-selector"></div>');c.append('<div class="miniColors-colors" style="background-color: #FFF;"><div class="miniColors-colorPicker"><div class="miniColors-colorPicker-inner"></div></div>').append('<div class="miniColors-hues"><div class="miniColors-huePicker"></div></div>').css("display","none").addClass(b.attr("class")).removeClass("form-control");var d=b.data("hsb");c.find(".miniColors-colors").css("backgroundColor","#"+y({h:d.h,s:100,b:100}));var e=b.data("colorPosition");e||(e=p(d)),c.find(".miniColors-colorPicker").css("top",e.y+"px").css("left",e.x+"px");var f=b.data("huePosition");f||(f=q(d)),c.find(".miniColors-huePicker").css("top",f.y+"px"),b.data("selector",c).data("huePicker",c.find(".miniColors-huePicker")).data("colorPicker",c.find(".miniColors-colorPicker")).data("mousebutton",0),a("BODY").append(c);var g=b.data("trigger"),h=!b.is(":visible"),i=h?g.offset().top+g.outerHeight():b.offset().top+b.outerHeight(),m=h?g.offset().left:b.offset().left,n=c.outerWidth(),o=c.outerHeight(),r=g.outerWidth(),s=g.outerHeight(),u=a(window).height(),v=a(window).width(),w=a(window).scrollTop(),x=a(window).scrollLeft();i+o>u+w&&(i=i-o-s),m+n>v+x&&(m=m-n+r),c.css({top:i,left:m}).fadeIn(100),c.on("selectstart",function(){return!1}),a(document).on("mousedown.miniColors touchstart.miniColors",function(c){b.data("mousebutton",1);var d=a(c.target).parents().andSelf();if(d.hasClass("miniColors-colors")&&(c.preventDefault(),b.data("moving","colors"),k(b,c)),d.hasClass("miniColors-hues")&&(c.preventDefault(),b.data("moving","hues"),l(b,c)),d.hasClass("miniColors-selector"))return void c.preventDefault();d.hasClass("miniColors")||j(b)}),a(document).on("mouseup.miniColors touchend.miniColors",function(a){a.preventDefault(),b.data("mousebutton",0).removeData("moving")}).on("mousemove.miniColors touchmove.miniColors",function(a){a.preventDefault(),1===b.data("mousebutton")&&("colors"===b.data("moving")&&k(b,a),"hues"===b.data("moving")&&l(b,a))}),b.data("open")&&b.data("open").call(b.get(0),"#"+y(d),t(d))},j=function(b){b||(b=a(".miniColors")),b.each(function(){var c=a(this).data("selector");a(this).removeData("selector"),a(c).fadeOut(100,function(){if(b.data("close")){var c=b.data("hsb"),d=y(c);b.data("close").call(b.get(0),"#"+d,t(c))}a(this).remove()})}),a(document).off(".miniColors")},k=function(a,b){var c=a.data("colorPicker");c.hide();var d={x:b.pageX,y:b.pageY};b.originalEvent.changedTouches&&(d.x=b.originalEvent.changedTouches[0].pageX,d.y=b.originalEvent.changedTouches[0].pageY),d.x=d.x-a.data("selector").find(".miniColors-colors").offset().left-5,d.y=d.y-a.data("selector").find(".miniColors-colors").offset().top-5,d.x<=-5&&(d.x=-5),d.x>=144&&(d.x=144),d.y<=-5&&(d.y=-5),d.y>=144&&(d.y=144),a.data("colorPosition",d),c.css("left",d.x).css("top",d.y).show();var e=Math.round(.67*(d.x+5));e<0&&(e=0),e>100&&(e=100);var f=100-Math.round(.67*(d.y+5));f<0&&(f=0),f>100&&(f=100);var g=a.data("hsb");g.s=e,g.b=f,m(a,g,!0)},l=function(a,b){var c=a.data("huePicker");c.hide();var d={y:b.pageY};b.originalEvent.changedTouches&&(d.y=b.originalEvent.changedTouches[0].pageY),d.y=d.y-a.data("selector").find(".miniColors-colors").offset().top-1,d.y<=-1&&(d.y=-1),d.y>=149&&(d.y=149),a.data("huePosition",d),c.css("top",d.y).show();var e=Math.round(2.4*(150-d.y-1));e<0&&(e=0),e>360&&(e=360);var f=a.data("hsb");f.h=e,m(a,f,!0)},m=function(a,b,c){a.data("hsb",b);var d=y(b);if(c&&a.val("#"+o(d,a.data("letterCase"))).trigger("change"),a.data("trigger").css("backgroundColor","#"+d),a.data("selector")&&a.data("selector").find(".miniColors-colors").css("backgroundColor","#"+y({h:b.h,s:100,b:100})),a.data("change")){if(d===a.data("lastChange"))return;a.data("change").call(a.get(0),"#"+d,t(b)),a.data("lastChange",d)}},n=function(b){b.val("#"+r(b.val())).trigger("change");var c=s(b.val());if(!c)return!1;var d=x(c),e=b.data("hsb");if(d.h===e.h&&d.s===e.s&&d.b===e.b)return!0;var f=p(d);a(b.data("colorPicker")).css("top",f.y+"px").css("left",f.x+"px"),b.data("colorPosition",f);var g=q(d);return a(b.data("huePicker")).css("top",g.y+"px"),b.data("huePosition",g),m(b,d),!0},o=function(a,b){return"lowercase"===b?a.toLowerCase():"uppercase"===b?a.toUpperCase():a},p=function(a){var b=Math.ceil(a.s/.67);b<0&&(b=0),b>150&&(b=150);var c=150-Math.ceil(a.b/.67);return c<0&&(c=0),c>150&&(c=150),{x:b-5,y:c-5}},q=function(a){var b=150-a.h/2.4;return b<0&&(h=0),b>150&&(h=150),{y:b-1}},r=function(a){return a.replace(/[^A-F0-9]/gi,"")},s=function(a){return(a=r(a))?(3===a.length&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]),6===a.length?a:null):null},t=function(a){var b={},c=Math.round(a.h),d=Math.round(255*a.s/100),e=Math.round(255*a.b/100);if(0===d)b.r=b.g=b.b=e;else{var f=e,g=(255-d)*e/255,h=c%60*(f-g)/60;360===c&&(c=0),c<60?(b.r=f,b.b=g,b.g=g+h):c<120?(b.g=f,b.b=g,b.r=f-h):c<180?(b.g=f,b.r=g,b.b=g+h):c<240?(b.b=f,b.r=g,b.g=f-h):c<300?(b.b=f,b.g=g,b.r=g+h):c<360?(b.r=f,b.g=g,b.b=f-h):(b.r=0,b.g=0,b.b=0)}return{r:Math.round(b.r),g:Math.round(b.g),b:Math.round(b.b)}},u=function(b){var c=[b.r.toString(16),b.g.toString(16),b.b.toString(16)];return a.each(c,function(a,b){1===b.length&&(c[a]="0"+b)}),c.join("")},v=function(a){return a=parseInt(a.indexOf("#")>-1?a.substring(1):a,16),{r:a>>16,g:(65280&a)>>8,b:255&a}},w=function(a){var b={h:0,s:0,b:0},c=Math.min(a.r,a.g,a.b),d=Math.max(a.r,a.g,a.b),e=d-c;return b.b=d,b.s=0!==d?255*e/d:0,0!==b.s?a.r===d?b.h=(a.g-a.b)/e:a.g===d?b.h=2+(a.b-a.r)/e:b.h=4+(a.r-a.g)/e:b.h=-1,b.h*=60,b.h<0&&(b.h+=360),b.s*=100/255,b.b*=100/255,b},x=function(a){var b=w(v(a));return 0===b.s&&(b.h=360),b},y=function(a){return u(t(a))};switch(b){case"readonly":return a(this).each(function(){a(this).hasClass("miniColors")&&a(this).prop("readonly",c)}),a(this);case"disabled":return a(this).each(function(){a(this).hasClass("miniColors")&&(c?g(a(this)):f(a(this)))}),a(this);case"value":if(void 0===c){if(!a(this).hasClass("miniColors"))return;var z=a(this),A=s(z.val());return A?"#"+o(A,z.data("letterCase")):null}return a(this).each(function(){a(this).hasClass("miniColors")&&(a(this).val(c).trigger("change"),n(a(this)))}),a(this);case"destroy":return a(this).each(function(){a(this).hasClass("miniColors")&&e(a(this))}),a(this);default:return b||(b={}),a(this).each(function(){"input"===a(this)[0].tagName.toLowerCase()&&(a(this).data("trigger")||d(a(this),b))}),a(this)}}})}(jQuery),document.addEventListener("load",color_picker_init,!1),jQuery(document).ajaxComplete(function(){color_picker_init()}),function(a,b){function c(){return new Date(Date.UTC.apply(Date,arguments))}function d(){var a=new Date;return c(a.getFullYear(),a.getMonth(),a.getDate())}function e(a){return function(){return this[a].apply(this,arguments)}}function f(b,c){function d(a,b){return b.toLowerCase()}var e,f=a(b).data(),g={},h=new RegExp("^"+c.toLowerCase()+"([A-Z])");c=new RegExp("^"+c.toLowerCase());for(var i in f)c.test(i)&&(e=i.replace(h,d),g[e]=f[i]);return g}function g(b){var c={};if(o[b]||(b=b.split("-")[0],o[b])){var d=o[b];return a.each(n,function(a,b){b in d&&(c[b]=d[b])}),c}}var h=a(window),i=function(){var b={get:function(a){return this.slice(a)[0]},contains:function(a){for(var b=a&&a.valueOf(),c=0,d=this.length;c<d;c++)if(this[c].valueOf()===b)return c;return-1},remove:function(a){this.splice(a,1)},replace:function(b){b&&(a.isArray(b)||(b=[b]),this.clear(),this.push.apply(this,b))},clear:function(){this.splice(0)},copy:function(){var a=new i;return a.replace(this),a}};return function(){var c=[];return c.push.apply(c,arguments),a.extend(c,b),c}}(),j=function(b,c){this.dates=new i,this.viewDate=d(),this.focusDate=null,this._process_options(c),this.element=a(b),this.isInline=!1,this.isInput=this.element.is("input"),this.component=!!this.element.is(".date")&&this.element.find(".add-on, .input-group-addon, .btn"),this.hasInput=this.component&&this.element.find("input").length,this.component&&0===this.component.length&&(this.component=!1),this.picker=a(p.template),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("cfdatepicker-inline").appendTo(this.element):this.picker.addClass("cfdatepicker-dropdown dropdown-menu"),this.o.rtl&&this.picker.addClass("cfdatepicker-rtl"),this.viewMode=this.o.startView,this.o.calendarWeeks&&this.picker.find("tfoot th.today").attr("colspan",function(a,b){return parseInt(b)+1}),this._allow_update=!1,this.setStartDate(this._o.startDate),this.setEndDate(this._o.endDate),this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled),this.fillDow(),this.fillMonths(),this._allow_update=!0,this.update(),this.showMode(),this.isInline&&this.show()};j.prototype={constructor:j,_process_options:function(b){this._o=a.extend({},this._o,b);var c=this.o=a.extend({},this._o),d=c.language;switch(o[d]||(d=d.split("-")[0],o[d]||(d=m.language)),c.language=d,c.startView){case 2:case"decade":c.startView=2;break;case 1:case"year":c.startView=1;break;default:c.startView=0}switch(c.minViewMode){case 1:case"months":c.minViewMode=1;break;case 2:case"years":c.minViewMode=2;break;default:c.minViewMode=0}c.startView=Math.max(c.startView,c.minViewMode),!0!==c.multidate&&(c.multidate=Number(c.multidate)||!1,!1!==c.multidate?c.multidate=Math.max(0,c.multidate):c.multidate=1),c.multidateSeparator=String(c.multidateSeparator),c.weekStart%=7,c.weekEnd=(c.weekStart+6)%7;var e=p.parseFormat(c.format);c.startDate!==-1/0&&(c.startDate?c.startDate instanceof Date?c.startDate=this._local_to_utc(this._zero_time(c.startDate)):c.startDate=p.parseDate(c.startDate,e,c.language):c.startDate=-1/0),c.endDate!==1/0&&(c.endDate?c.endDate instanceof Date?c.endDate=this._local_to_utc(this._zero_time(c.endDate)):c.endDate=p.parseDate(c.endDate,e,c.language):c.endDate=1/0),c.daysOfWeekDisabled=c.daysOfWeekDisabled||[],a.isArray(c.daysOfWeekDisabled)||(c.daysOfWeekDisabled=c.daysOfWeekDisabled.split(/[,\s]*/)),c.daysOfWeekDisabled=a.map(c.daysOfWeekDisabled,function(a){return parseInt(a,10)});var f=String(c.orientation).toLowerCase().split(/\s+/g),g=c.orientation.toLowerCase();if(f=a.grep(f,function(a){return/^auto|left|right|top|bottom$/.test(a)}),c.orientation={x:"auto",y:"auto"},g&&"auto"!==g)if(1===f.length)switch(f[0]){case"top":case"bottom":c.orientation.y=f[0];break;case"left":case"right":c.orientation.x=f[0]}else g=a.grep(f,function(a){return/^left|right$/.test(a)}),c.orientation.x=g[0]||"auto",g=a.grep(f,function(a){return/^top|bottom$/.test(a)}),c.orientation.y=g[0]||"auto";else;},_events:[],_secondaryEvents:[],_applyEvents:function(a){for(var b,c,d,e=0;e<a.length;e++)b=a[e][0],2===a[e].length?(c=void 0,d=a[e][1]):3===a[e].length&&(c=a[e][1],d=a[e][2]),b.on(d,c)},_unapplyEvents:function(a){for(var b,c,d,e=0;e<a.length;e++)b=a[e][0],2===a[e].length?(d=void 0,c=a[e][1]):3===a[e].length&&(d=a[e][1],c=a[e][2]),b.off(c,d)},_buildEvents:function(){this.isInput?this._events=[[this.element,{focus:a.proxy(this.show,this),keyup:a.proxy(function(b){-1===a.inArray(b.keyCode,[27,37,39,38,40,32,13,9])&&this.update()},this),keydown:a.proxy(this.keydown,this)}]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),{focus:a.proxy(this.show,this),keyup:a.proxy(function(b){-1===a.inArray(b.keyCode,[27,37,39,38,40,32,13,9])&&this.update()},this),keydown:a.proxy(this.keydown,this)}],[this.component,{click:a.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:a.proxy(this.show,this)}]],this._events.push([this.element,"*",{blur:a.proxy(function(a){this._focused_from=a.target},this)}],[this.element,{blur:a.proxy(function(a){this._focused_from=a.target},this)}]),this._secondaryEvents=[[this.picker,{click:a.proxy(this.click,this)}],[a(window),{resize:a.proxy(this.place,this)}],[a(document),{"mousedown touchstart":a.proxy(function(a){this.element.is(a.target)||this.element.find(a.target).length||this.picker.is(a.target)||this.picker.find(a.target).length||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(b,c){var d=c||this.dates.get(-1),e=this._utc_to_local(d);this.element.trigger({type:b,date:e,dates:a.map(this.dates,this._utc_to_local),format:a.proxy(function(a,b){0===arguments.length?(a=this.dates.length-1,b=this.o.format):"string"==typeof a&&(b=a,a=this.dates.length-1),b=b||this.o.format;var c=this.dates.get(a);return p.formatDate(c,b,this.o.language)},this)})},show:function(){this.isInline||this.picker.appendTo("body"),this.picker.show(),this.place(),this._attachSecondaryEvents(),this._trigger("show")},hide:function(){this.isInline||this.picker.is(":visible")&&(this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.o.startView,this.showMode(),this.o.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this._trigger("hide"))},remove:function(){this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().cfdatepicker,this.isInput||delete this.element.data().date},_utc_to_local:function(a){return a&&new Date(a.getTime()+6e4*a.getTimezoneOffset())},_local_to_utc:function(a){return a&&new Date(a.getTime()-6e4*a.getTimezoneOffset())},_zero_time:function(a){return a&&new Date(a.getFullYear(),a.getMonth(),a.getDate())},_zero_utc_time:function(a){return a&&new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()))},getDates:function(){return a.map(this.dates,this._utc_to_local)},getUTCDates:function(){return a.map(this.dates,function(a){return new Date(a)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){return new Date(this.dates.get(-1))},setDates:function(){var b=a.isArray(arguments[0])?arguments[0]:arguments;this.update.apply(this,b),this._trigger("changeDate"),this.setValue()},setUTCDates:function(){var b=a.isArray(arguments[0])?arguments[0]:arguments;this.update.apply(this,a.map(b,this._utc_to_local)),this._trigger("changeDate"),this.setValue()},setDate:e("setDates"),setUTCDate:e("setUTCDates"),setValue:function(){var a=this.getFormattedDate();this.isInput?this.element.val(a).change():this.component&&this.element.find("input").val(a).change()},getFormattedDate:function(b){void 0===b&&(b=this.o.format);var c=this.o.language;return a.map(this.dates,function(a){return p.formatDate(a,b,c)}).join(this.o.multidateSeparator)},setStartDate:function(a){this._process_options({startDate:a}),this.update(),this.updateNavArrows()},setEndDate:function(a){this._process_options({endDate:a}),this.update(),this.updateNavArrows()},setDaysOfWeekDisabled:function(a){this._process_options({daysOfWeekDisabled:a}),this.update(),this.updateNavArrows()},place:function(){if(!this.isInline){var b,c=this.picker.outerWidth(),d=this.picker.outerHeight(),e=h.width(),f=h.height(),g=h.scrollTop(),i=jQuery(this.element).data("form-id"),j=document.getElementById("modal-"+i+"-content");b=null!==j?1e4:parseInt(this.element.parents().filter(function(){return"auto"!==a(this).css("z-index")}).first().css("z-index"))+10;var k=this.component?this.component.parent().offset():this.element.offset(),l=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),m=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),n=k.left,o=k.top;this.picker.removeClass("cfdatepicker-orient-top cfdatepicker-orient-bottom cfdatepicker-orient-right cfdatepicker-orient-left"),"auto"!==this.o.orientation.x?(this.picker.addClass("cfdatepicker-orient-"+this.o.orientation.x),"right"===this.o.orientation.x&&(n-=c-m)):(this.picker.addClass("cfdatepicker-orient-left"),k.left<0?n-=k.left-10:k.left+c>e&&(n=e-c-10));var p,q,r=this.o.orientation.y;"auto"===r&&(p=-g+k.top-d,q=g+f-(k.top+l+d),r=Math.max(p,q)===q?"top":"bottom"),this.picker.addClass("cfdatepicker-orient-"+r),"top"===r?o+=l:o-=d+parseInt(this.picker.css("padding-top")),this.picker.css({top:o,left:n,zIndex:b})}},_allow_update:!0,update:function(){if(this._allow_update){var b=this.dates.copy(),c=[],d=!1;arguments.length?(a.each(arguments,a.proxy(function(a,b){b instanceof Date&&(b=this._local_to_utc(b)),c.push(b)},this)),d=!0):(c=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),c=c&&this.o.multidate?c.split(this.o.multidateSeparator):[c],delete this.element.data().date),c=a.map(c,a.proxy(function(a){return p.parseDate(a,this.o.format,this.o.language)},this)),c=a.grep(c,a.proxy(function(a){return a<this.o.startDate||a>this.o.endDate||!a},this),!0),this.dates.replace(c),this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate&&(this.viewDate=new Date(this.o.endDate)),d?this.setValue():c.length&&String(b)!==String(this.dates)&&this._trigger("changeDate"),!this.dates.length&&b.length&&this._trigger("clearDate"),this.fill()}},fillDow:function(){var a=this.o.weekStart,b="<tr>";if(this.o.calendarWeeks){var c='<th class="cw"> </th>';b+=c,this.picker.find(".cfdatepicker-days thead tr:first-child").prepend(c)}for(;a<this.o.weekStart+7;)b+='<th class="dow">'+o[this.o.language].daysMin[a++%7]+"</th>";b+="</tr>",this.picker.find(".cfdatepicker-days thead").append(b)},fillMonths:function(){for(var a="",b=0;b<12;)a+='<span class="month">'+o[this.o.language].monthsShort[b++]+"</span>";this.picker.find(".cfdatepicker-months td").html(a)},setRange:function(b){b&&b.length?this.range=a.map(b,function(a){return a.valueOf()}):delete this.range,this.fill()},getClassNames:function(b){var c=[],d=this.viewDate.getUTCFullYear(),e=this.viewDate.getUTCMonth(),f=new Date;return b.getUTCFullYear()<d||b.getUTCFullYear()===d&&b.getUTCMonth()<e?c.push("old"):(b.getUTCFullYear()>d||b.getUTCFullYear()===d&&b.getUTCMonth()>e)&&c.push("new"),this.focusDate&&b.valueOf()===this.focusDate.valueOf()&&c.push("focused"),this.o.todayHighlight&&b.getUTCFullYear()===f.getFullYear()&&b.getUTCMonth()===f.getMonth()&&b.getUTCDate()===f.getDate()&&c.push("today"),-1!==this.dates.contains(b)&&c.push("active"),(b.valueOf()<this.o.startDate||b.valueOf()>this.o.endDate||-1!==a.inArray(b.getUTCDay(),this.o.daysOfWeekDisabled))&&c.push("disabled"),this.range&&(b>this.range[0]&&b<this.range[this.range.length-1]&&c.push("range"),-1!==a.inArray(b.valueOf(),this.range)&&c.push("selected")),c},fill:function(){var b,d=new Date(this.viewDate),e=d.getUTCFullYear(),f=d.getUTCMonth(),g=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,h=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,i=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,j=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,k=o[this.o.language].today||o.en.today||"",l=o[this.o.language].clear||o.en.clear||"";this.picker.find(".cfdatepicker-days thead th.cfdatepicker-switch").text(o[this.o.language].months[f]+" "+e),this.picker.find("tfoot th.today").text(k).toggle(!1!==this.o.todayBtn),this.picker.find("tfoot th.clear").text(l).toggle(!1!==this.o.clearBtn),this.updateNavArrows(),this.fillMonths();var m=c(e,f-1,28),n=p.getDaysInMonth(m.getUTCFullYear(),m.getUTCMonth());m.setUTCDate(n),m.setUTCDate(n-(m.getUTCDay()-this.o.weekStart+7)%7);var q=new Date(m);q.setUTCDate(q.getUTCDate()+42),q=q.valueOf();for(var r,s=[];m.valueOf()<q;){if(m.getUTCDay()===this.o.weekStart&&(s.push("<tr>"),this.o.calendarWeeks)){var t=new Date(+m+(this.o.weekStart-m.getUTCDay()-7)%7*864e5),u=new Date(Number(t)+(11-t.getUTCDay())%7*864e5),v=new Date(Number(v=c(u.getUTCFullYear(),0,1))+(11-v.getUTCDay())%7*864e5),w=(u-v)/864e5/7+1;s.push('<td class="cw">'+w+"</td>")}if(r=this.getClassNames(m),r.push("day"),this.o.beforeShowDay!==a.noop){var x=this.o.beforeShowDay(this._utc_to_local(m));void 0===x?x={}:"boolean"==typeof x?x={enabled:x}:"string"==typeof x&&(x={classes:x}),!1===x.enabled&&r.push("disabled"),x.classes&&(r=r.concat(x.classes.split(/\s+/))),x.tooltip&&(b=x.tooltip)}r=a.unique(r),s.push('<td class="'+r.join(" ")+'"'+(b?' title="'+b+'"':"")+">"+m.getUTCDate()+"</td>"),m.getUTCDay()===this.o.weekEnd&&s.push("</tr>"),m.setUTCDate(m.getUTCDate()+1)}this.picker.find(".cfdatepicker-days tbody").empty().append(s.join(""));var y=this.picker.find(".cfdatepicker-months").find("th:eq(1)").text(e).end().find("span").removeClass("active");a.each(this.dates,function(a,b){b.getUTCFullYear()===e&&y.eq(b.getUTCMonth()).addClass("active")}),(e<g||e>i)&&y.addClass("disabled"),e===g&&y.slice(0,h).addClass("disabled"),e===i&&y.slice(j+1).addClass("disabled"),s="",e=10*parseInt(e/10,10);var z=this.picker.find(".cfdatepicker-years").find("th:eq(1)").text(e+"-"+(e+9)).end().find("td");e-=1;for(var A,B=a.map(this.dates,function(a){return a.getUTCFullYear()}),C=-1;C<11;C++)A=["year"],-1===C?A.push("old"):10===C&&A.push("new"),-1!==a.inArray(e,B)&&A.push("active"),(e<g||e>i)&&A.push("disabled"),s+='<span class="'+A.join(" ")+'">'+e+"</span>",e+=1;z.html(s)},updateNavArrows:function(){if(this._allow_update){var a=new Date(this.viewDate),b=a.getUTCFullYear(),c=a.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-1/0&&b<=this.o.startDate.getUTCFullYear()&&c<=this.o.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&b>=this.o.endDate.getUTCFullYear()&&c>=this.o.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:case 2:this.o.startDate!==-1/0&&b<=this.o.startDate.getUTCFullYear()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&b>=this.o.endDate.getUTCFullYear()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}}},click:function(b){b.preventDefault();var d,e,f,g=a(b.target).closest("span, td, th");if(1===g.length)switch(g[0].nodeName.toLowerCase()){case"th":switch(g[0].className){case"cfdatepicker-switch":this.showMode(1);break;case"prev":case"next":var h=p.modes[this.viewMode].navStep*("prev"===g[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,h),this._trigger("changeMonth",this.viewDate);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,h),1===this.viewMode&&this._trigger("changeYear",this.viewDate)}this.fill();break;case"today":var i=new Date;i=c(i.getFullYear(),i.getMonth(),i.getDate(),0,0,0),this.showMode(-2);var j="linked"===this.o.todayBtn?null:"view";this._setDate(i,j);break;case"clear":var k;this.isInput?k=this.element:this.component&&(k=this.element.find("input")),k&&k.val("").change(),this.update(),this._trigger("changeDate"),this.o.autoclose&&this.hide()}break;case"span":g.is(".disabled")||(this.viewDate.setUTCDate(1),g.is(".month")?(f=1,e=g.parent().find("span").index(g),d=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(e),this._trigger("changeMonth",this.viewDate),1===this.o.minViewMode&&this._setDate(c(d,e,f))):(f=1,e=0,d=parseInt(g.text(),10)||0,this.viewDate.setUTCFullYear(d),this._trigger("changeYear",this.viewDate),2===this.o.minViewMode&&this._setDate(c(d,e,f))),this.showMode(-1),this.fill());break;case"td":g.is(".day")&&!g.is(".disabled")&&(f=parseInt(g.text(),10)||1,d=this.viewDate.getUTCFullYear(),e=this.viewDate.getUTCMonth(),g.is(".old")?0===e?(e=11,d-=1):e-=1:g.is(".new")&&(11===e?(e=0,d+=1):e+=1),this._setDate(c(d,e,f)))}this.picker.is(":visible")&&this._focused_from&&a(this._focused_from).focus(),delete this._focused_from},_toggle_multidate:function(a){var b=this.dates.contains(a);if(a?-1!==b?this.dates.remove(b):this.dates.push(a):this.dates.clear(),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(a,b){b&&"date"!==b||this._toggle_multidate(a&&new Date(a)),b&&"view"!==b||(this.viewDate=a&&new Date(a)),this.fill(),this.setValue(),this._trigger("changeDate");var c;this.isInput?c=this.element:this.component&&(c=this.element.find("input")),c&&c.change(),!this.o.autoclose||b&&"date"!==b||this.hide()},moveMonth:function(a,b){if(a){if(!b)return a;var c,d,e=new Date(a.valueOf()),f=e.getUTCDate(),g=e.getUTCMonth(),h=Math.abs(b);if(b=b>0?1:-1,1===h)d=-1===b?function(){return e.getUTCMonth()===g}:function(){return e.getUTCMonth()!==c},c=g+b,e.setUTCMonth(c),(c<0||c>11)&&(c=(c+12)%12);else{for(var i=0;i<h;i++)e=this.moveMonth(e,b);c=e.getUTCMonth(),e.setUTCDate(f),d=function(){return c!==e.getUTCMonth()}}for(;d();)e.setUTCDate(--f),e.setUTCMonth(c);return e}},moveYear:function(a,b){return this.moveMonth(a,12*b)},dateWithinRange:function(a){return a>=this.o.startDate&&a<=this.o.endDate},keydown:function(a){if(this.picker.is(":not(:visible)"))return void(27===a.keyCode&&this.show());var b,c,e,f=!1,g=this.focusDate||this.viewDate;switch(a.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),a.preventDefault();break;case 37:case 39:if(!this.o.keyboardNavigation)break;b=37===a.keyCode?-1:1,a.ctrlKey?(c=this.moveYear(this.dates.get(-1)||d(),b),e=this.moveYear(g,b),this._trigger("changeYear",this.viewDate)):a.shiftKey?(c=this.moveMonth(this.dates.get(-1)||d(),b),e=this.moveMonth(g,b),this._trigger("changeMonth",this.viewDate)):(c=new Date(this.dates.get(-1)||d()),c.setUTCDate(c.getUTCDate()+b),e=new Date(g),e.setUTCDate(g.getUTCDate()+b)),this.dateWithinRange(c)&&(this.focusDate=this.viewDate=e,this.setValue(),this.fill(),a.preventDefault());break;case 38:case 40:if(!this.o.keyboardNavigation)break;b=38===a.keyCode?-1:1,a.ctrlKey?(c=this.moveYear(this.dates.get(-1)||d(),b),e=this.moveYear(g,b),this._trigger("changeYear",this.viewDate)):a.shiftKey?(c=this.moveMonth(this.dates.get(-1)||d(),b),e=this.moveMonth(g,b),this._trigger("changeMonth",this.viewDate)):(c=new Date(this.dates.get(-1)||d()),c.setUTCDate(c.getUTCDate()+7*b),e=new Date(g),e.setUTCDate(g.getUTCDate()+7*b)),this.dateWithinRange(c)&&(this.focusDate=this.viewDate=e,this.setValue(),this.fill(),a.preventDefault());break;case 32:break;case 13:g=this.focusDate||this.dates.get(-1)||this.viewDate,this._toggle_multidate(g),f=!0,this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(a.preventDefault(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}if(f){this.dates.length?this._trigger("changeDate"):this._trigger("clearDate");var h;this.isInput?h=this.element:this.component&&(h=this.element.find("input")),h&&h.change()}},showMode:function(a){a&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+a))),this.picker.find(">div").hide().filter(".cfdatepicker-"+p.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()}};var k=function(b,c){this.element=a(b),this.inputs=a.map(c.inputs,function(a){return a.jquery?a[0]:a}),delete c.inputs,a(this.inputs).cfdatepicker(c).bind("changeDate",a.proxy(this.dateUpdated,this)),this.pickers=a.map(this.inputs,function(b){return a(b).data("cfdatepicker")}),this.updateDates()};k.prototype={updateDates:function(){this.dates=a.map(this.pickers,function(a){return a.getUTCDate()}),this.updateRanges()},updateRanges:function(){var b=a.map(this.dates,function(a){return a.valueOf()});a.each(this.pickers,function(a,c){c.setRange(b)})},dateUpdated:function(b){if(!this.updating){this.updating=!0;var c=a(b.target).data("cfdatepicker"),d=c.getUTCDate(),e=a.inArray(b.target,this.inputs),f=this.inputs.length;if(-1!==e){if(a.each(this.pickers,function(a,b){b.getUTCDate()||b.setUTCDate(d)}),d<this.dates[e])for(;e>=0&&d<this.dates[e];)this.pickers[e--].setUTCDate(d);else if(d>this.dates[e])for(;e<f&&d>this.dates[e];)this.pickers[e++].setUTCDate(d);this.updateDates(),delete this.updating}}},remove:function(){a.map(this.pickers,function(a){a.remove()}),delete this.element.data().cfdatepicker}};var l=a.fn.cfdatepicker;a.fn.cfdatepicker=function(b){var c=Array.apply(null,arguments);c.shift();var d;return this.each(function(){var e=a(this),h=e.data("cfdatepicker"),i="object"==typeof b&&b;if(!h){var l=f(this,"date"),n=a.extend({},m,l,i),o=g(n.language),p=a.extend({},m,o,l,i);if(e.is(".input-daterange")||p.inputs){var q={inputs:p.inputs||e.find("input").toArray()};e.data("cfdatepicker",h=new k(this,a.extend(p,q)))}else e.data("cfdatepicker",h=new j(this,p))}if("string"==typeof b&&"function"==typeof h[b]&&void 0!==(d=h[b].apply(h,c)))return!1}),void 0!==d?d:this};var m=a.fn.cfdatepicker.defaults={autoclose:!1,beforeShowDay:a.noop,calendarWeeks:!1,clearBtn:!1,daysOfWeekDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-1/0,startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0},n=a.fn.cfdatepicker.locale_opts=["format","rtl","weekStart"];a.fn.cfdatepicker.Constructor=j;var o=a.fn.cfdatepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}},p={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(a){return a%4==0&&a%100!=0||a%400==0},getDaysInMonth:function(a,b){return[31,p.isLeapYear(a)?29:28,31,30,31,30,31,31,30,31,30,31][b]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(a){var b=a.replace(this.validParts,"\0").split("\0"),c=a.match(this.validParts);if(!b||!b.length||!c||0===c.length)throw new Error("Invalid date format.");return{separators:b,parts:c}},parseDate:function(b,d,e){function f(){var a=this.slice(0,l[i].length);return a===l[i].slice(0,a.length)}if(b){if(b instanceof Date)return b;"string"==typeof d&&(d=p.parseFormat(d));var g,h,i,k=/([\-+]\d+)([dmwy])/,l=b.match(/([\-+]\d+)([dmwy])/g);if(/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(b)){for(b=new Date,i=0;i<l.length;i++)switch(g=k.exec(l[i]),h=parseInt(g[1]),g[2]){case"d":b.setUTCDate(b.getUTCDate()+h);break;case"m":b=j.prototype.moveMonth.call(j.prototype,b,h);break;case"w":b.setUTCDate(b.getUTCDate()+7*h);break;case"y":b=j.prototype.moveYear.call(j.prototype,b,h)}return c(b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate(),0,0,0)}l=b&&b.match(this.nonpunctuation)||[],b=new Date;var m,n,q={},r=["yyyy","yy","M","MM","m","mm","d","dd"],s={yyyy:function(a,b){return a.setUTCFullYear(b)},yy:function(a,b){return a.setUTCFullYear(2e3+b)},m:function(a,b){if(isNaN(a))return a;for(b-=1;b<0;)b+=12;for(b%=12,a.setUTCMonth(b);a.getUTCMonth()!==b;)a.setUTCDate(a.getUTCDate()-1);return a},d:function(a,b){return a.setUTCDate(b)}};s.M=s.MM=s.mm=s.m,s.dd=s.d,b=c(b.getFullYear(),b.getMonth(),b.getDate(),0,0,0);var t=d.parts.slice();if(l.length!==t.length&&(t=a(t).filter(function(b,c){return-1!==a.inArray(c,r)}).toArray()),l.length===t.length){var u;for(i=0,u=t.length;i<u;i++){if(m=parseInt(l[i],10),g=t[i],isNaN(m))switch(g){case"MM":n=a(o[e].months).filter(f),m=a.inArray(n[0],o[e].months)+1;break;case"M":n=a(o[e].monthsShort).filter(f),m=a.inArray(n[0],o[e].monthsShort)+1}q[g]=m}var v,w
|
5 |
-
;for(i=0;i<r.length;i++)(w=r[i])in q&&!isNaN(q[w])&&(v=new Date(b),s[w](v,q[w]),isNaN(v)||(b=v))}return b}},formatDate:function(b,c,d){if(!b)return"";"string"==typeof c&&(c=p.parseFormat(c));var e={d:b.getUTCDate(),D:o[d].daysShort[b.getUTCDay()],DD:o[d].days[b.getUTCDay()],m:b.getUTCMonth()+1,M:o[d].monthsShort[b.getUTCMonth()],MM:o[d].months[b.getUTCMonth()],yy:b.getUTCFullYear().toString().substring(2),yyyy:b.getUTCFullYear()};e.dd=(e.d<10?"0":"")+e.d,e.mm=(e.m<10?"0":"")+e.m,b=[];for(var f=a.extend([],c.separators),g=0,h=c.parts.length;g<=h;g++)f.length&&b.push(f.shift()),b.push(e[c.parts[g]]);return b.join("")},headTemplate:'<thead><tr><th class="prev">«</th><th colspan="5" class="cfdatepicker-switch"></th><th class="next">»</th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};p.template='<div class="cfdatepicker"><div class="cfdatepicker-days"><table class=" table-condensed">'+p.headTemplate+"<tbody></tbody>"+p.footTemplate+'</table></div><div class="cfdatepicker-months"><table class="table-condensed">'+p.headTemplate+p.contTemplate+p.footTemplate+'</table></div><div class="cfdatepicker-years"><table class="table-condensed">'+p.headTemplate+p.contTemplate+p.footTemplate+"</table></div></div>",a.fn.cfdatepicker.DPGlobal=p,a.fn.cfdatepicker.noConflict=function(){return a.fn.cfdatepicker=l,this},a(document).on("focus.cfdatepicker.data-api click.cfdatepicker.data-api",'[data-provide="cfdatepicker"]',function(b){var c=a(this);c.data("cfdatepicker")||(b.preventDefault(),c.cfdatepicker("show").on("show",function(){a(this).trigger("blur")}).on("hide",function(){a(this).attr("disabled",!1),c.hasClass("parsley-error")&&""!==c.val()&&(c.removeClass("parsley-error"),c.addClass("parsley-success"),a("#parsley-id-"+c.data("parsley-id")).hide())}))})}(window.jQuery),function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){function b(a,b){var c=Array.prototype.slice.call(arguments,2);return setTimeout(function(){return a.apply(null,c)},b)}function c(a,b){return b=b||100,function(){if(!a.debouncing){var c=Array.prototype.slice.apply(arguments);a.lastReturnVal=a.apply(window,c),a.debouncing=!0}return clearTimeout(a.debounceTimeout),a.debounceTimeout=setTimeout(function(){a.debouncing=!1},b),a.lastReturnVal}}function d(d,f){if(this.$window=a(window),this.$document=a(document),this.$element=a(d),this.options=a.extend({},h,f),this._defaults=h,this._name=e,this.startEvent=this.options.startEvent.join("."+e+" ")+"."+e,this.moveEvent=this.options.moveEvent.join("."+e+" ")+"."+e,this.endEvent=this.options.endEvent.join("."+e+" ")+"."+e,this.polyfill=this.options.polyfill,this.onInit=this.options.onInit,this.onSlide=this.options.onSlide,this.onSlideEnd=this.options.onSlideEnd,this.polyfill&&g)return!1;this.identifier="js-"+e+"-"+ +new Date,this.min=parseFloat(this.$element[0].getAttribute("min")||0),this.max=parseFloat(this.$element[0].getAttribute("max")||100),this.value=parseFloat(this.$element[0].value||this.min+(this.max-this.min)/2),this.step=parseFloat(this.$element[0].getAttribute("step")||1),this.$fill=a('<div class="'+this.options.fillClass+'" />'),this.$handle=a('<div class="'+this.options.handleClass+'" />'),this.$range=a('<div class="'+this.options.rangeClass+'" id="'+this.identifier+'" />').insertAfter(this.$element).prepend(this.$fill,this.$handle),this.$element.css({position:"absolute",width:"1px",height:"1px",overflow:"hidden",opacity:"0"}),this.handleDown=a.proxy(this.handleDown,this),this.handleMove=a.proxy(this.handleMove,this),this.handleEnd=a.proxy(this.handleEnd,this),this.init();var i=this;this.$window.on("resize."+e,c(function(){b(function(){i.update()},300)},20)),this.$document.on(this.startEvent,"#"+this.identifier+":not(."+this.options.disabledClass+")",this.handleDown),this.$element.on("change."+e,function(a,b){if(!b||b.origin!==e){var c=a.target.value,d=i.getPositionFromValue(c);i.setPosition(d)}})}var e="rangeslider",f=[],g=function(){var a=document.createElement("input");return a.setAttribute("type","range"),"text"!==a.type}(),h={polyfill:!0,rangeClass:"rangeslider",disabledClass:"rangeslider--disabled",fillClass:"rangeslider__fill",handleClass:"rangeslider__handle",startEvent:["mousedown","touchstart","pointerdown"],moveEvent:["mousemove","touchmove","pointermove"],endEvent:["mouseup","touchend","pointerup"]};d.prototype.init=function(){this.onInit&&"function"==typeof this.onInit&&this.onInit(),this.update()},d.prototype.update=function(){this.handleWidth=this.$handle[0].offsetWidth,this.rangeWidth=this.$range[0].offsetWidth,this.maxHandleX=this.rangeWidth-this.handleWidth,this.grabX=this.handleWidth/2,this.position=this.getPositionFromValue(this.value),this.$element[0].disabled?this.$range.addClass(this.options.disabledClass):this.$range.removeClass(this.options.disabledClass),this.setPosition(this.position)},d.prototype.handleDown=function(a){if(a.preventDefault(),this.$document.on(this.moveEvent,this.handleMove),this.$document.on(this.endEvent,this.handleEnd),!((" "+a.target.className+" ").replace(/[\n\t]/g," ").indexOf(this.options.handleClass)>-1)){var b=this.getRelativePosition(this.$range[0],a),c=this.getPositionFromNode(this.$handle[0])-this.getPositionFromNode(this.$range[0]);this.setPosition(b-this.grabX),b>=c&&b<c+this.handleWidth&&(this.grabX=b-c)}},d.prototype.handleMove=function(a){a.preventDefault();var b=this.getRelativePosition(this.$range[0],a);this.setPosition(b-this.grabX)},d.prototype.handleEnd=function(a){a.preventDefault(),this.$document.off(this.moveEvent,this.handleMove),this.$document.off(this.endEvent,this.handleEnd);var b=this.getRelativePosition(this.$range[0],a);this.onSlideEnd&&"function"==typeof this.onSlideEnd&&this.onSlideEnd(b-this.grabX,this.value)},d.prototype.cap=function(a,b,c){return a<b?b:a>c?c:a},d.prototype.setPosition=function(a){var b,c;b=this.getValueFromPosition(this.cap(a,0,this.maxHandleX))/this.step*this.step,c=this.getPositionFromValue(b),this.$fill[0].style.width=c+this.grabX+"px",this.$handle[0].style.left=c+"px",this.setValue(b),this.position=c,this.value=b,this.onSlide&&"function"==typeof this.onSlide&&this.onSlide(c,b)},d.prototype.getPositionFromNode=function(a){for(var b=0;null!==a;)b+=a.offsetLeft,a=a.offsetParent;return b},d.prototype.getRelativePosition=function(a,b){return(b.pageX||b.originalEvent.clientX||b.originalEvent.touches[0].clientX||b.currentPoint.x)-this.getPositionFromNode(a)},d.prototype.getPositionFromValue=function(a){var b;return b=(a-this.min)/(this.max-this.min),b*this.maxHandleX},d.prototype.getValueFromPosition=function(a){var b,c;return b=a/(this.maxHandleX||1),c=this.step*Math.ceil((b*(this.max-this.min)+this.min)/this.step),Number(c.toFixed(2))},d.prototype.setValue=function(a){a!==this.value&&this.$element.val(a).trigger("change",{origin:e})},d.prototype.destroy=function(){this.$document.off(this.startEvent,"#"+this.identifier,this.handleDown),this.$element.off("."+e).removeAttr("style").removeData("plugin_"+e),this.$range&&this.$range.length&&this.$range[0].parentNode.removeChild(this.$range[0]),f.splice(f.indexOf(this.$element[0]),1),f.length||this.$window.off("."+e)},a.fn[e]=function(b){return this.each(function(){var c=a(this),g=c.data("plugin_"+e);g||(c.data("plugin_"+e,g=new d(this,b)),f.push(this)),"string"==typeof b&&g[b]()})}}),function(a){"use strict";var b={init:function(c){return this.each(function(){this.self=a(this),b.destroy.call(this.self),this.opt=a.extend(!0,{},a.fn.raty.defaults,c),b._adjustCallback.call(this),b._adjustNumber.call(this),"img"!==this.opt.starType&&b._adjustStarType.call(this),b._adjustPath.call(this),b._createStars.call(this),this.opt.cancel&&b._createCancel.call(this),this.opt.precision&&b._adjustPrecision.call(this),b._createScore.call(this),b._apply.call(this,this.opt.score),b._target.call(this,this.opt.score),this.opt.readOnly?b._lock.call(this):(this.style.cursor="pointer",b._binds.call(this)),this.self.data("options",this.opt)})},_adjustCallback:function(){for(var a=["number","readOnly","score","scoreName"],b=0;b<a.length;b++)"function"==typeof this.opt[a[b]]&&(this.opt[a[b]]=this.opt[a[b]].call(this))},_adjustNumber:function(){this.opt.number=b._between(this.opt.number,1,this.opt.numberMax)},_adjustPath:function(){this.opt.path=this.opt.path||"",this.opt.path&&"/"!==this.opt.path.charAt(this.opt.path.length-1)&&(this.opt.path+="/")},_adjustPrecision:function(){this.opt.half=!0,this.opt.targetType="score"},_adjustStarType:function(){this.opt.path="";for(var a=["cancelOff","cancelOn","starHalf","starOff","starOn"],b=0;b<a.length;b++)this.opt[a[b]]=this.opt[a[b]].replace(".","-")},_apply:function(a){b._fill.call(this,a),a&&(a>0&&this.score.val(b._between(a,0,this.opt.number)),b._roundStars.call(this,a))},_between:function(a,b,c){return Math.min(Math.max(parseFloat(a),b),c)},_binds:function(){this.cancel&&(b._bindOverCancel.call(this),b._bindClickCancel.call(this),b._bindOutCancel.call(this)),b._bindOver.call(this),b._bindClick.call(this),b._bindOut.call(this)},_bindClick:function(){var b=this;b.stars.on("click.raty",function(c){var d=a(this);b.score.val(b.opt.half||b.opt.precision?b.self.data("score"):this.alt||d.data("alt")),b.opt.click&&b.opt.click.call(b,+b.score.val(),c)})},_bindClickCancel:function(){var a=this;a.cancel.on("click.raty",function(b){a.score.removeAttr("value"),a.opt.click&&a.opt.click.call(a,null,b)})},_bindOut:function(){var a=this;a.self.on("mouseleave.raty",function(c){var d=+a.score.val()||void 0;b._apply.call(a,d),b._target.call(a,d,c),a.opt.mouseout&&a.opt.mouseout.call(a,d,c)})},_bindOutCancel:function(){var b=this;b.cancel.on("mouseleave.raty",function(c){var d=a(this),e=b.opt.path+b.opt.cancelOff;if("img"===b.opt.starType)d.attr("src",e);else{var f=b.opt.path+b.opt.cancelOn;d.removeClass(f).addClass(e)}if(b.opt.mouseout){var g=+b.score.val()||void 0;b.opt.mouseout.call(b,g,c)}})},_bindOver:function(){var a=this,c=a.opt.half?"mousemove.raty":"mouseover.raty";a.stars.on(c,function(c){var d=b._getScoreByPosition.call(a,c,this);b._fill.call(a,d),a.opt.half&&(b._roundStars.call(a,d),a.self.data("score",d)),b._target.call(a,d,c),a.opt.mouseover&&a.opt.mouseover.call(a,d,c)})},_bindOverCancel:function(){var c=this;c.cancel.on("mouseover.raty",function(d){var e=c.opt.path+c.opt.cancelOn,f=a(this),g=c.opt.path+c.opt.starOff;if("img"===c.opt.starType)f.attr("src",e),c.stars.attr("src",g);else{c.stars.attr("class",g);var h=c.opt.path+c.opt.cancelOff;f.removeClass(h).addClass(e).css("color",c.opt.starColor)}b._target.call(c,null,d),c.opt.mouseover&&c.opt.mouseover.call(c,null)})},_buildScoreField:function(){return a("<input />",{name:this.opt.scoreName,type:"hidden"}).appendTo(this)},_createCancel:function(){var b=this.opt.path+this.opt.cancelOff,c=a("<"+this.opt.starType+" />",{title:this.opt.cancelHint,class:"raty-cancel"}).css("marginRight",this.opt.space?this.opt.spaceWidth+"px":"0");"img"===this.opt.starType?c.attr({src:b,alt:"x"}):c.attr("data-alt","x").addClass(b),"left"===this.opt.cancelPlace?this.self.prepend(" ").prepend(c):this.self.append(" ").append(c),this.cancel=c},_createScore:function(){var c=a(this.opt.targetScore);this.score=c.length?c:b._buildScoreField.call(this)},_createStars:function(){for(var c=1;c<=this.opt.number;c++){var d,e=this.opt.score&&this.opt.score>=c?"starOn":"starOff",f=b._getHint.call(this,c);e=this.opt.path+this.opt[e],d="img"!==this.opt.starType?{"data-alt":c,class:e}:{src:e,alt:c},d.title=f,a("<"+this.opt.starType+" />",d).css("marginRight",c<this.opt.number&&this.opt.space?this.opt.spaceWidth+"px":"0").appendTo(this),this.opt.space}this.stars=this.self.children(this.opt.starType)},_error:function(b){a(this).text(b),a.error(b)},_fill:function(a){for(var c=0,d=1;d<=this.stars.length;d++){var e,f=this.stars.eq(d-1),g=b._turnOn.call(this,d,a);if(this.opt.iconRange&&this.opt.iconRange.length>c){var h=this.opt.iconRange[c];e=b._getIconRange.call(this,h,g),d<=h.range&&("img"===this.opt.starType?f.attr("src",e):f.attr("class",e)),d===h.range&&c++}else e=this.opt.path+this.opt[g?"starOn":"starOff"],"img"===this.opt.starType?f.attr("src",e):f.attr("class",e),g?f.css("color",this.opt.starColor):f.css("color","")}},_getIconRange:function(a,b){return this.opt.path+(b?a.on||this.opt.starOn:a.off||this.opt.starOff)},_getScoreByPosition:function(c,d){var e=a(d),f=parseInt(d.alt||e.data("alt"),10);if(this.opt.half){var g=b._getSize.call(this),h=parseFloat((c.pageX-e.offset().left)/g);f=this.opt.precision?f-1+h:f-1+(h>.5?1:.5)}return f},_getSize:function(){var a;return a="img"===this.opt.starType?this.stars[0].width:parseFloat(this.stars.eq(0).css("font-size")),a||b._error.call(this,"Could not be possible get the icon size!"),a},_turnOn:function(a,b){return this.opt.single?a===b:a<=b},_getHint:function(a){var b=this.opt.hints[a-1];return""===b?"":b||a},_lock:function(){var a=parseInt(this.score.val(),10),c=a?b._getHint.call(this,a):this.opt.noRatedMsg;this.style.cursor="",this.title=c,this.score.prop("readonly",!0),this.stars.prop("title",c),this.cancel&&this.cancel.hide(),this.self.data("readonly",!0)},_roundStars:function(a){var b=(a%1).toFixed(2);if(b>this.opt.round.down){var c="starOn";this.opt.halfShow&&b<this.opt.round.up?c="starHalf":b<this.opt.round.full&&(c="starOff");var d=this.stars[Math.ceil(a)-1];"img"===this.opt.starType?d.src=this.opt.path+this.opt[c]:d.style.className=this.opt[c]}},_target:function(c,d){if(this.opt.target){var e=a(this.opt.target);e.length||b._error.call(this,"Target selector invalid or missing!");var f=d&&"mouseover"===d.type;if(void 0===c)c=this.opt.targetText;else if(null===c)c=f?this.opt.cancelHint:this.opt.targetText;else{"hint"===this.opt.targetType?c=b._getHint.call(this,Math.ceil(c)):this.opt.precision&&(c=parseFloat(c).toFixed(1));var g=d&&"mousemove"===d.type;f||g||this.opt.targetKeep||(c=this.opt.targetText)}c&&(c=this.opt.targetFormat.toString().replace("{score}",c)),e.is(":input")?e.val(c):e.html(c)}},_unlock:function(){this.style.cursor="pointer",this.removeAttribute("title"),this.score.removeAttr("readonly"),this.self.data("readonly",!1);for(var a=0;a<this.opt.number;a++)this.stars[a].title=b._getHint.call(this,a+1);this.cancel&&this.cancel.css("display","")},cancel:function(c){return this.each(function(){var d=a(this);!0!==d.data("readonly")&&(b[c?"click":"score"].call(d,null),this.score.removeAttr("value"))})},click:function(c){return this.each(function(){!0!==a(this).data("readonly")&&(b._apply.call(this,c),this.opt.click&&this.opt.click.call(this,c,a.Event("click")),b._target.call(this,c))})},destroy:function(){return this.each(function(){var b=a(this),c=b.data("raw");c?b.off(".raty").empty().css({cursor:c.style.cursor}).removeData("readonly"):b.data("raw",b.clone()[0])})},getScore:function(){var a,b=[];return this.each(function(){a=this.score.val(),b.push(a?+a:void 0)}),b.length>1?b:b[0]},move:function(c){return this.each(function(){var d=parseInt(c,10),e=a(this).data("options"),f=(+c).toFixed(1).split(".")[1];d>=e.number&&(d=e.number-1,f=10);var g=b._getSize.call(this),h=g/10,i=a(this.stars[d]),j=i.offset().left+h*parseInt(f,10),k=a.Event("mousemove",{pageX:j});i.trigger(k)})},readOnly:function(c){return this.each(function(){var d=a(this);d.data("readonly")!==c&&(c?(d.off(".raty").children("img").off(".raty"),b._lock.call(this)):(b._binds.call(this),b._unlock.call(this)),d.data("readonly",c))})},reload:function(){return b.set.call(this,{})},score:function(){var c=a(this);return arguments.length?b.setScore.apply(c,arguments):b.getScore.call(c)},set:function(b){return this.each(function(){var c=a(this),d=c.data("options"),e=a.extend({},d,b);c.raty(e)})},setScore:function(c){return this.each(function(){!0!==a(this).data("readonly")&&(b._apply.call(this,c),b._target.call(this,c))})}};a.fn.raty=function(c){return b[c]?b[c].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof c&&c?void a.error("Method "+c+" does not exist!"):b.init.apply(this,arguments)},a.fn.raty.defaults={cancel:!1,cancelHint:"Cancel this rating!",cancelOff:"raty-cancel-off",cancelOn:"raty-cancel-on",cancelPlace:"left",click:void 0,half:!1,halfShow:!0,hints:["1"],iconRange:void 0,mouseout:void 0,mouseover:void 0,noRatedMsg:"Not rated yet!",number:5,numberMax:20,path:void 0,precision:!1,readOnly:!1,round:{down:.25,full:.6,up:.76},score:void 0,scoreName:"score",single:!1,space:!0,spaceWidth:3,starColor:"#ff00aa",starHalf:"star-half.png",starOff:"raty-dot-off",starOn:"raty-dot-on",starType:"img",target:void 0,targetFormat:"{score}",targetKeep:!1,targetScore:void 0,targetText:"",targetType:"hint"}}(jQuery),jQuery(function(a){a("body").on("click",".cf-toggle-group-buttons a",function(){var b=a(this),c=b.closest(".caldera-config-field"),d=c.find('[data-ref="'+b.attr("id")+'"]');c.find(".btn").removeClass(b.data("active")).addClass(b.data("default")),b.addClass(b.data("active")).removeClass(b.data("default")),d.prop("checked",!0).trigger("change")})}),jQuery(document).on("cf.init",function(){toggle_button_init()});var cf_jsfields_init,cf_presubmit;!function(a){cf_validate_form=function(b){return b.parsley({errorsWrapper:'<span class="help-block caldera_ajax_error_block"></span>',errorTemplate:"<span></span>",errorsContainer:function(a){return a.$element.closest(".form-group")}}).on("field:error",function(c){this.$element.closest(".form-group").addClass("has-error"),a(document).trigger("cf.validate.fieldError",{inst:c,form:b,el:this.$element})}).on("field:success",function(c){if("star"===this.$element.data("type")&&this.$element.prop("required")&&0==this.$element.val())return void(c.validationResult=!1);this.$element.closest(".form-group").removeClass("has-error"),a(document).trigger("cf.validate.fieldSuccess",{inst:c,form:b,el:this.$element})}).on("form:success",function(c){a(document).trigger("cf.validate.FormSuccess",{inst:c,form:b,el:this.$element})}).on("form:error",function(c){a(document).trigger("cf.validate.FormError",{inst:c,form:b,el:this.$element})})},cf_jsfields_init=function(){a(".init_field_type[data-type]").each(function(b,c){var d=a(c);"function"==typeof window[d.data("type")+"_init"]&&window[d.data("type")+"_init"](d.prop("id"),d[0])}),window.Parsley.on("field:validated",function(){setTimeout(function(){a(document).trigger("cf.error")},15)}),void 0===resBaldrickTriggers&&a(".caldera_forms_form").length,a(document).trigger("cf.fieldsInit")},a("document").ready(function(){cf_jsfields_init()}),a(".caldera-form-page").length&&a(".caldera-form-page").on("keypress","[data-field]:not(textarea)",function(a){13===a.keyCode&&a.preventDefault()}),a(document).on("click",".cf_modal_button",function(b){b.preventDefault();var c=a(this);a(c.attr("href")).show()}),a(document).on("click",".caldera-front-modal-closer",function(b){b.preventDefault(),a(this).closest(".caldera-front-modal-container").hide()}),a(document).on("cf.add cf.enable cf.disable cf.pagenav",cf_jsfields_init),a(document).on("click","[data-page]",function(b){function c(a,b,c){window=window||{};var d="object"==typeof window.cf2&&"object"==typeof window.cf2[b]?window.cf2[b]:null,e=a.attr("id");return function(a,b){return!(!d||!d.fields)&&(!!d.fields.hasOwnProperty(a)&&d.fields[a])}(e,b)?(c=d.component.isFieldValid(e))||d.component.addFieldMessage(e,ParsleyValidator.getErrorMessage("required"),!0):c=a.parsley().isValid(),c}var d,e,f,g=a(this),h=g.closest(".caldera-form-page"),i=g.closest("form.caldera_forms_form"),j=i.attr("id"),k=i.data("instance"),l=i.find(".caldera-form-page:visible").data("formpage"),m=h.data("formpage")?h.data("formpage"):g.data("page"),n=a('.breadcrumb[data-form="caldera_form_'+k+'"]'),o=!0,p=l;if(i.length){if(cf_validate_form(i).destroy(),f=i.find("[data-field]"),i.find(".has-error").removeClass("has-error"),"prev"!==g.data("page")&&m>=l){f=a("#caldera_form_"+k+' [data-formpage="'+l+'"] [data-field]');for(var q,r,s=0;s<f.length;s++)q=a(f[s]),q.hasClass("cf-multi-uploader")||q.hasClass("cf-multi-uploader-list")||!0!==(r=c(q,j,r))&&(b.preventDefault(),o=!1);if(!0===o&&m>l)for(var t=m-1;t>=1;t--){f=a("#caldera_form_"+k+' [data-formpage="'+t+'"] [data-field]');for(var s=0;s<f.length;s++)q=a(f[s]),!0!==(r=c(q,j,r))&&(b.preventDefault(),o=!1,t>p&&(p=t))}}if(!1===o)return p!==l&&(a("#form_page_"+k+"_pg_"+l).hide().attr("aria-hidden","true").css("visibility","hidden"),a("#form_page_"+k+"_pg_"+p).show().attr("aria-hidden","false").css("visibility","visible")),cf_validate_form(i).validate(),!1;"next"===g.data("page")?(n&&n.find("li.active").removeClass("active").children().attr("aria-expanded","false"),d=i.find('.caldera-form-page[data-formpage="'+(m+1)+'"]'),d.length&&(h.hide().attr("aria-hidden","true").css("visibility","hidden"),d.show().attr("aria-hidden","false").css("visibility","visible"),n&&n.find('a[data-page="'+(m+1)+'"]').attr("aria-expanded","true").parent().addClass("active"))):"prev"===g.data("page")?(n&&n.find("li.active").removeClass("active").children().attr("aria-expanded","false"),e=i.find('.caldera-form-page[data-formpage="'+(m-1)+'"]'),e.length&&(h.hide().attr("aria-hidden","true").css("visibility","hidden"),e.show().attr("aria-hidden","false").css("visibility","visible"),n&&n.find('a[data-page="'+(m-1)+'"]').attr("aria-expanded","true").parent().addClass("active"))):g.data("pagenav")&&(b.preventDefault(),g.closest(".breadcrumb").find("li.active").removeClass("active").children().attr("aria-expanded","false"),a("#"+g.data("pagenav")+" .caldera-form-page").hide().attr("aria-hidden","true").css("visibility","hidden"),a("#"+g.data("pagenav")+'\t.caldera-form-page[data-formpage="'+g.data("page")+'"]').show().attr("aria-hidden","false").css("visibility","visible"),g.parent().addClass("active").children().attr("aria-expanded","true")),a("html, body").animate({scrollTop:i.offset().top-100},200),a(document).trigger("cf.pagenav")}});var b;a(".caldera-grid .breadcrumb").each(function(c,d){a(d).find("a[data-pagenav]").each(function(c,d){var e=a(d),f=e.data("pagenav");a("#"+f+' .caldera-form-page[data-formpage="'+e.data("page")+'"]').find(".has-error").length&&(e.parent().addClass("error"),void 0===b&&(e.trigger("click"),b=!0))})}),a(document).on("click",'form.caldera_forms_form [type="submit"]',function(b){var c=a(this),d=c.closest(".caldera_forms_form"),e=cf_validate_form(d);if(a(document).trigger("cf.form.submit",{e:b,$form:d}),e.validate())a(document).trigger("cf.form.validated",{e:b,$form:d}),e.destroy();else{if(a(".caldera-form-page").length){var f=c.parents(".caldera-form-page").data("formpage"),g=[],h=[];if(e.fields.forEach(function(a,b){if(!0!==a.validationResult){var c=a.$element.parents(".caldera-form-page");if(void 0!=c&&c.length&&a.$element.parents(".caldera-form-page").data("formpage")>f)return void h.push(a.$element.data("field"));g.push(a)}}),!g.length)return h.length&&d.append('<input type="hidden" name="_cf_future" value="'+h.toString()+'">'),void e.destroy()}b.preventDefault()}})}(jQuery),window.addEventListener("load",function(){!function(a){"use strict";var b=void 0===typeof window.wp;if(window.CALDERA_FORMS={},"object"==typeof CFFIELD_CONFIG){var c,d,e,f,g,h,i,j,k,l=!1,m=!1;a(".caldera_forms_form").each(function(n,o){if(h=a(o),c=h.attr("id"),g=h.data("instance"),"object"==typeof CFFIELD_CONFIG[g])if(k=a(document.getElementById(c)),b)a(k.data("target")).append('<div class="alert alert-warning">'+CFFIELD_CONFIG[g].error_strings.wp_not_defined+"</div>");else{m||(i=new CalderaFormsCrossOriginWarning(h,a,CFFIELD_CONFIG[g].error_strings),i.maybeWarn(),m=!0),!l&&CFFIELD_CONFIG[g].error_strings.hasOwnProperty("jquery_old")&&(j=new CalderaFormsJQueryWarning(h,a,CFFIELD_CONFIG[g].error_strings),j.maybeWarn(),l=!0),d=h.data("form-id"),f=CFFIELD_CONFIG[g].configs;var p=new CFState(d,a);p.init(CFFIELD_CONFIG[g].fields.defaults,CFFIELD_CONFIG[g].fields.calcDefaults),"object"!=typeof window.cfstate&&(window.cfstate={}),window.cfstate[c]=p,k.find("[data-sync]").each(function(){var b=a(this);b.data("unsync")||new CalderaFormsFieldSync(b,b.data("binds"),k,a,p)}),e=new Caldera_Forms_Field_Config(f,a(document.getElementById(c)),a,p),e.init(),a(document).trigger("cf.form.init",{$form:k,idAttr:c,formId:d,state:p,fieldIds:CFFIELD_CONFIG[g].fields.hasOwnProperty("ids")?CFFIELD_CONFIG[g].fields.ids:[],nonce:jQuery("#_cf_verify_"+d).val()})}})}}(jQuery)});
|
1 |
+
function CFEvents(a){function b(a){return c.hasOwnProperty(a)}var c={};this.subscribe=function(a,d){b(a)||(c[a]=[]),c[a].push(d)},this.trigger=function(d,e){b(d)&&c[d].forEach(function(b){void 0===e&&(e=a.getState(d)),b(d,e)})},this.emit=function(a,d){b(a)&&c[a].forEach(function(b){b(d,a)})},this.detach=function(a,d){if(b(a))if(null===d)delete c[a];else for(var e in c[a])d===e&&c[a].splice(e,1)}}function CFState(a,b){function c(a){return m.hasOwnProperty(a)}function d(a){var c=b("#"+a);if(c.length)return c.on("change keyup",function(){var a=b(this);n[a.attr("id")]=f(a),j.mutateState([a.attr("id")],a.val())}),n[a]=f(b(document.getElementById(a))),j.mutateState([c.attr("id")],c.val()),c.trigger("cf.bind",{field:c.attr("id")}),!0;if(c=b("."+a),c.length){if("object"==typeof c){var d=[],e=0;c.each(function(c,h){var i=b(h),j=0;i.prop("checked")&&(j+=g(f(i)),e+=j,d.push(i.val())),n[a]=e})}return c.on("change",function(){var a,d,e=[],h=b(this),i=h.attr("type");switch(i){case"radio":a=h.data("radio-field"),d=b("[data-radio-field="+a+"]"),e="";break;case"checkbox":a=h.data("checkbox-field"),d=b("[data-checkbox-field="+a+"]");break;default:a=h.data("field"),d=b("[data-field="+a+"]")}if("checkbox"===i){var k,l=0;d.length?d.each(function(a,c){k=b(c),k.prop("checked")&&(l+=g(f(k)),e.push(k.val()))}):e=[],n[a]=l}else d.length?1==d.length?e=f(b(d[0])):d.each(function(c,d){var g=b(d);g.prop("checked")&&("radio"===i?(n[a]=f(g),e=g.val()):e.push(g.val()))}):e=0;j.mutateState(a,e),c.trigger("cf.bind",{field:c.attr("id")})}),!0}return j.unbind(a),!1}function e(a,b){m[a]=0,n[a]=0,j.events().subscribe(a,function(a,b){n[a]=b})}function f(a){if(a.is("select")&&a.has("option")&&(a=a.find(":selected")),!a.length)return 0;if(a.is("hidden"))return a.val();var b=0,c=a.attr("data-calc-value");return b=void 0===c||!1===c||isNaN(c)?a.val():a.data("calc-value"),g(b)}function g(a){return!a||isNaN(a)?0:window.parseFloat(a)}function h(a){return"number"==typeof a}function i(a){return"string"==typeof a}var j=this,k=new CFEvents(this),l={},m={},n={};this.init=function(a,b){for(var c in a)"object"==typeof b[c]?"calculation"==b[c].type&&e(c,b[c]):d(c)?(m[c]=a[c],b.hasOwnProperty(c)?n[c]=b[c]:n[c]=null):(m[c]="",l[c]=!0,n[c]=null)},this.getState=function(a){return!!c(a)&&m[a]},this.getCalcValue=function(a,d){var e=0;if(!c(a))return e;if(d){d=0;var k,l=d;return b("#"+a).each(function(){l=0,k=b(this),k.prop("checked")&&(l=f(k),g(l)>g(d)&&(d=g(l)))}),g(d)}if(n.hasOwnProperty(a)){if(!1===n[a]||null===n[a]||0===n[a]){var m=f(b(document.getElementById(a)));i(m)&&(m=g(m)),h(m)&&(n[a]=m)}e=n[a]}else e=j.getState(a),b.isArray(e)&&(e=e.reduce(function(a,b){return g(a)+g(b)},0)),h(e)&&(n[a]=e);return g(e)},this.mutateState=function(a,b){return!!c(a)&&(m[a]!=b&&(m[a]=b,k.trigger(a,b)),!0)},this.unbind=function(a){j.mutateState(a,""),l[a]=!0,delete n[a]},this.rebind=function(a){d(a),delete l[a]},this.events=function(){return{subscribe:function(a,b){c(a)&&k.subscribe(a,b)},detach:function(a,b){k.detach(a,b)},emit:function(a,b){k.emit(a,b)},attatchEvent:function(a,b){k.subscribe(a,b)}}}}function color_picker_init(){jQuery(".minicolor-picker").miniColors()}function toggle_button_init(a,b){var c=jQuery(b),d=c.find(".cf-toggle-group-radio:checked");d.length&&jQuery("#"+d.data("ref")).trigger("click")}function Caldera_Forms_Field_Config(a,b,c,d){function e(a,b,c,d){var e=b.parent().parent();return e.removeClass("has-error"),e.find(".help-block").remove(),a?(e.removeClass("has-error"),h(),!0):(e.addClass("has-error").append('<span id="cf-error-'+b.attr("id")+'" class="help-block '+d+'">'+c+"</span>"),b.prop("required")&&g(b),b.addClass("parsely-error"),!1)}function f(a){return!a.closest(".caldera-form-page").attr("aria-hidden")}function g(a){f(a)&&m.prop("disabled",!0).attr("aria-disabled",!0)}function h(){m.prop("disabled",!1).attr("aria-disabled",!1)}function i(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null,c||a.apply(e,f)},h=c&&!d;clearTimeout(d),d=setTimeout(g,b),h&&a.apply(e,f)}}function j(){c.prototype.inputmask&&b.find("[data-inputmask]").inputmask()}var k=this,l={},m=(b.data("instance"),b.find(":submit, .cf-page-btn-next"));this.init=function(){c.each(a,function(a,b){l[b.id]=k[b.type](b)}),j(),c(document).on("cf.add",j)},this.button=function(a){var b=a.id;c(document).on("click dblclick","#"+b,function(a){c("#"+b+"_btn").val(a.type).trigger("change")})},this.html=function(a){if(0!=a.sync){var b,e={},f=a.bindFields,g=c(document.getElementById(a.contentId));b=function(){if(g.length||(g=c(document.getElementById(a.contentId))),g.length){void 0==e[a.tmplId]&&(e[a.tmplId]=c(document.getElementById(a.tmplId)).html());for(var b,h=e[a.tmplId],i=0;i<=f.length;i++)"object"==typeof f[i]&&f[i].hasOwnProperty("to")&&f[i].hasOwnProperty("tag")&&(b=d.getState(f[i].to),b=0===b||"0"===b||b?isNaN(b)?"string"==typeof b?b.replace(/(?:\r\n|\r|\n)/g,"<br />"):b&&void 0!=b.join&&void 0!==b&&void 0!==b?b.join(", "):"":b.toString():"",h=h.replace(f[i].tag,b));g.html(h).trigger("change")}},function(){for(var a=0;a<=f.length;a++)"object"==typeof f[a]&&f[a].hasOwnProperty("to")&&d.events().subscribe(f[a].to,b);c(document).on("cf.pagenav cf.modal",b)}(),b()}},this.summary=this.html;var n={};this.range_slider=function(a){function b(b){b.parent().find(".rangeslider").css("backgroundColor",a.trackcolor),b.parent().find(".rangeslider__fill").css("backgroundColor",a.color),b.parent().find(".rangeslider__handle").css("backgroundColor",a.handle).css("borderColor",a.handleborder)}var e=c(document.getElementById(a.id));c(document).on("cf.pagenav cf.add cf.disable cf.modal",function(){var e=document.getElementById(a.id);if(null!=e){var f=c(e),g=n[a.id].value;if(!f.is(":visible"))return;f.val(g),f.rangeslider("destroy"),f.rangeslider(n[a.id].init),f.val(g).change(),b(f),d.mutateState(a.id,g)}}),function(){"object"!=n[a.id]&&(n[a.id]={value:a.default,init:{},inited:!1});var f={onSlide:function(b,c){d.mutateState(a.id,c),n[a.id].value=c},onInit:function(){this.value=d.getState(a.id),n[a.id].inited=!0,b(e)},polyfill:!1};n[a.id].init=f,d.events().subscribe(a.id,function(b,d){d.length<=0&&(d=a.default),c("#"+a.id+"_value").html(d)}),e.is(":visible")&&e.rangeslider(f)}()},this.star_rating=function(a){var b=a.options.score,d=c(document.getElementById(a.starFieldId)),e=(c(document.getElementById(a.id)),function(){var c=a.options;c.click=function(){b=d.raty("score"),d.trigger("change")},d.raty(c),d.raty("score",b)});e();var f=!1;jQuery(document).on("cf.add",function(){!1===f&&(f=!0,d.length&&(d.raty("destroy"),e()),setTimeout(function(){f=!1},500))})},this.toggle_switch=function(a){c(document).on("reset","#"+a.id,function(b){c.each(a.options,function(b,d){c(document.getElemenetById(d)).removeClass(a.selectedClassName).addClass(a.defaultClassName)}),c(document.getElementById(a.id)).prop("checked","")})},this.phone_better=function(a){var d=a.id,f=!0,g=function(){var a=document.getElementById("cf-error-"+d);f=!0,null!=a&&a.remove()},i=function(){var b=c(document.getElementById(d));g();var h,i=c.trim(b.val());i&&(h=!!b.intlTelInput("isValidNumber"));var j,k=b.intlTelInput("getValidationError"),l=b.intlTelInput("getSelectedCountryData");return 0==k?(h=!0,j=""):i=="+"+l.dialCode?(h=!0,j=""):i?j="undefined"!=a.messages[k]?a.messages[k]:a.messages.generic:(h=!0,j=""),f=h,e(h,b,j,"help-block-phone_better"),h},j=function(){$field=c(document.getElementById(d)),$field.intlTelInput(a.options),$field.on("keyup change",g),$field.blur(function(){g(),i()}),$field.on("keyup change",i),b.on("submit",function(){i()})};c(document).on("cf.pagenav cf.add cf.disable cf.modal",j),c(document).on("cf.add",function(){g(),i()}),c("#"+a.form_id_attr+' [data-page="next"], #'+a.form_id_attr+' form.caldera_forms_form [type="submit"]').click(function(a){!1===i()&&(a.preventDefault(),a.stopPropagation())}),c(document).on("cf.remove",function(a,b){b.hasOwnProperty("field")&&d===b.field&&(f||h())}),j()},this.wysiwyg=function(a){var b=document.getElementById(a.id);if(null!=b){var d=c(b);d.trumbowyg(a.options);var e=d.parent().find(".trumbowyg-editor");e.html(d.val()),e.bind("input propertychange",function(){d.val(e.html())})}},this.credit_card_number=function(a){function b(b){var e={0:"amex",1:"discover",2:"visa",3:"discover",4:"mastercard"},f="credit-card.svg";c.each(e,function(a,c){if(0===b.indexOf(c))return f="cc-"+c+".svg",!1}),d.css("background",'url("'+a.imgPath+f+'")')}var d=c(document.getElementById(a.id));0==a.exp&&0==a.cvc||function(){g(d);var b=c(document.getElementById(a.cvc)),e=c(document.getElementById(a.exp));b.blur(function(){b.val()&&k.creditCardUtil.validateCVC(d,b),e.val()&&k.creditCardUtil.validateExp(e)})}(),d.length&&(d.payment("formatCardNumber"),d.blur(function(){var f=d.val(),g=c.payment.validateCardNumber(f),h=c.payment.cardType(f);e(g,d,a.invalid,"help-block-credit_card_number help-block-credit_card"),g&&b(h)}))},this.credit_card_exp=function(a){var b=c(document.getElementById(a.id));b.length&&(b.payment("formatCardExpiry"),b.blur(function(){e(k.creditCardUtil.validateExp(b),b,a.invalid,"help-block-credit_card_exp help-block-credit_card")}))},this.credit_card_cvc=function(a){var b=c(document.getElementById(a.id));if(b.length&&(b.payment("formatCardCVC"),!1!==a.ccField)){var d=c(document.getElementById(a.ccField));b.blur(function(){e(k.creditCardUtil.validateExp(d,b),b,a.invalid,"help-block-credit_card_cvc help-block-credit_card")})}},this.creditCardUtil={validateCVC:function(a,b){var d=b.val(),e=c.payment.validateCardNumber(a.val()),f=!1;if(e){var g=c.payment.cardType(a.val());f=c.payment.validateCardCVC(d,g)}return f},validateExp:function(a){var b=a.val().split("/");if(b&&2==b.length)return c.payment.validateCardExpiry(b[0].trim(),b[1].trim())}},this.color_picker=function(a){c(document.getElementById(a.id)).miniColors(a.settings),c(document).on("cf.pagenav cf.add cf.disable cf.modal",function(){c(document.getElementById(a.id)).miniColors(a.settings)})},this.calculation=function(a){function b(b){b+="";for(var c=b.split("."),d=c[0],e=c.length>1?a.decimalSeparator+c[1]:"",f=/(\d+)(\d{3})/;f.test(d);)d=d.replace(f,"$1"+a.thousandSeparator+"$2");return d+e}var e=null,f=i(function(){g(d)},250),g=function(){var f=window[a.callback].apply(null,[d]);isFinite(f)||(f=0),e=f,d.mutateState(a.id,f),"number"!=typeof f&&(f=parseInt(f,10)),a.moneyFormat&&(f=f.toFixed(2)),c("#"+a.id).html(b(f)).data("calc-value",f),c("#"+a.targetId).val(f).trigger("change")};c.each(a.fieldBinds,function(a,b){d.events().subscribe(b,f)}),c(document).on("cf.pagenav cf.add cf.remove cf.modal",function(b,c){"cf"==b.type&&"remove"===b.namespace&&"object"==typeof c&&c.hasOwnProperty("field")&&c.field===a.id?e=null:f()}),f()},this.color_picker=function(){function a(){jQuery(".minicolor-picker").miniColors()}document.addEventListener("load",a,!1),jQuery(document).ajaxComplete(function(){a()})}}function CalderaFormsFieldSync(a,b,c,d,e){for(var f=0;f<b.length;f++)d(document).on("keyup change blur mouseover","[data-field='"+b[f]+"']",function(){if(a.data("sync")){var b=a.data("sync");if(id=a.data("field"),reg=new RegExp("{{([^}]*?)}}","g"),template=b.match(reg),!a.data("unsync")&&void 0!=template&&template.length){for(var f=0;f<template.length;f++){for(var g=template[f].replace(/\}/g,"").replace(/\{/g,""),h=new RegExp(template[f],"g"),i=c.find("[data-field='"+g+"']"),j="",k=0;k<i.length;k++){var l=d(i[k]);(!l.is(":radio")&&!l.is(":checkbox")||l.is(":checked"))&&(j+=l.val())}b=b.replace(h,j)}e.mutateState(a.attr("id"),j),a.val(b)}}}),d("[data-field='"+b[f]+"']").trigger("change"),a.on("keyup change",function(){a.attr("data-unsync","1"),a.removeAttr("data-sync"),a.removeAttr("data-binds")})}function CalderaFormsResetNonce(a,b,c){function d(a){return(new Date).getTime()-36e3>a}function e(){c.ajax({url:b.rest.tokens.nonce,method:"POST",beforeSend:function(a){a.setRequestHeader("X-WP-Nonce",b.rest.nonce)},data:{form_id:a}}).done(function(a){f.val(a.nonce),f.data("nonce-time",(new Date).getTime())})}var f;this.init=function(){f=c("#"+b.nonce.field+"_"+a),d(f.data("nonce-time"))&&e()}}function caldera_forms_check_protocol(a){var b=window.location.protocol,c=document.createElement("a");return c.href=a,c.protocol===b}function CalderaFormsCrossOriginWarning(a,b,c){function d(){b(a.data("target")).append('<div class="alert alert-warning">'+c.mixed_protocol+"</div>")}this.maybeWarn=function(){if(a.find('[name="cfajax"]').length){caldera_forms_check_protocol(a.data("request"))||d()}}}function CalderaFormsJQueryWarning(a,b,c){function d(){b(a.data("target")).append('<div class="alert alert-warning">'+c.jquery_old+"</div>")}function e(a){var b=a.split(".");if(1==b[0]){if(12>b[2])return!0;if(4>b[2])return!0}return!1}this.maybeWarn=function(){var a=b.fn.jquery;"string"==typeof a&&"1.12.4"!=a&&e(a)&&d()}}var resBaldrickTriggers;jQuery(function(a){function b(a,b,c){for(var d in a){var e=b.find('[data-field="'+d+'"]'),f=e.parent();if(e.length){f.is("label")&&(f=f.parent(),(f.hasClass("checkbox")||f.hasClass("radio"))&&(f=f.parent()));var g=f.find(".help-block").not(".caldera_ajax_error_block");f.addClass("has-error").addClass("caldera_ajax_error_wrap"),g.length&&g.hide(),f.append('<span class="help-block caldera_ajax_error_block">'+a[d]+"</span>")}else c.html('<p class="alert alert-danger ">'+a[d]+"</p>")}}var c=[],d=function(a,b,d){var e=jQuery("#progress-file-"+b),f=jQuery("."+b+" .file-size");c.push(1),cf_uploader_filelist[b].state=2,jQuery.ajax({xhr:function(){var a=new window.XMLHttpRequest;return a.upload.addEventListener("progress",function(a){if(a.lengthComputable){var b=a.loaded/a.total*100;e.width(b+"%"),f.html(size_format(a.loaded)+" / "+size_format(a.total))}},!1),a.addEventListener("progress",function(a){if(a.lengthComputable){a.loaded,a.total}},!1),a},url:a.data("request")+"/upload/",type:"POST",data:d,processData:!1,contentType:!1,success:function(d,e,f){if(d.success&&!0===d.success){c.pop();var g=jQuery('[data-file="'+b+'"]');g.next().addClass("file-uploaded"),g.remove(),cf_uploader_filelist[b].state=3,a.submit()}else if(d.data&&!d.success)return jQuery("."+b).addClass("has-error"),a.find(":submit").prop("disabled",!1),a.find(".cf-uploader-trigger").slideDown(),void jQuery("."+b+" .file-error").html(d.data)},error:function(b,c,d){a.data("postDisable")||buttons.prop("disabled",!1)}})};(resBaldrickTriggers=function(){var a=function(a){return jQuery("#caldera_notices_"+a.params.trigger.data("instance"))},e=function(a){return jQuery("#caldera-forms-breadcrumb_"+a.params.trigger.data("instance"))},f=function(a){var b=e(a);b.length&&b.show().attr("aria-hidden",!1).css("visibility","visible")},g=function(a){var b=e(a);b.length&&b.show().attr("aria-hidden",!0).css("visibility","hidden")};jQuery(".cfajax-trigger").baldrick({request:"./",method:"POST",init:function(a,e){e.preventDefault();var f=jQuery(a),g=f.find(":submit"),h=[];if(jQuery(document).trigger("cf.ajax.request",{$form:f,formIdAttr:f.attr("id"),displayFieldErrors:b,fieldsBlocking:h,$notice:jQuery("#caldera_notices_"+f.data("instance"))}),"object"==typeof window.cf2)var i=window.cf2[f.attr("id")];if("object"==typeof i){if(i.hasOwnProperty("pending")&&0!==i.pending.length)return!1;if(i.hasOwnProperty("fieldsBlocking")&&0!==i.fieldsBlocking.length)return!1}if(f.data("_cf_manual"))return f.find('[name="cfajax"]').remove(),!1;if(f.data("postDisable")||g.prop("disabled",!0),"object"==typeof cf_uploader_filelist){f.find(".cf-uploader-trigger").slideUp();var j=!1,k=c.length;for(var l in cf_uploader_filelist)if(!(cf_uploader_filelist[l].state>1||0===cf_uploader_filelist[l].state)){j=!0;var m=new FormData,n=l,o=jQuery("#"+n.split("_file_")[0]);if(m.append(o.data("field"),cf_uploader_filelist[l].file),m.append("field",o.data("field")),m.append("control",o.data("controlid")),d(f,n,m),o.val(""),o.attr("type","hidden"),o.val(o.data("controlid")),1===++k)break}if(!0===j||c.length)return!1}},error:function(b){if(404===b.jqxhr.status)this.trigger.data("_cf_manual",!0).trigger("submit");else{var c=a(b);b.jqxhr.responseJSON.data.html&&(c.html(b.jqxhr.responseJSON.data.html),jQuery("html,body").animate({scrollTop:c.offset().top-c.outerHeight()},300))}},callback:function(c){c.params.trigger.find(":submit").prop("disabled",!1);var d=a(c);if(c.params.trigger.data("customCallback")&&"function"==typeof window[c.params.trigger.data("customCallback")]&&window[c.params.trigger.data("customCallback")](c.data),c.params.trigger.data("inhibitnotice")||(jQuery(".caldera_ajax_error_wrap").removeClass("caldera_ajax_error_wrap").removeClass("has-error"),jQuery(".caldera_ajax_error_block").remove(),"complete"===c.data.status||"success"===c.data.type?(g(c),c.data.html&&c.params.target.html(c.data.html),c.params.trigger.data("hiderows")&&c.params.trigger.find("div.row").remove()):"preprocess"===c.data.status?(f(c),c.params.target.html(c.data.html)):"error"===c.data.status&&(f(c),c.params.target.html(c.data.html))),"complete"!==c.data.status&&"success"!==c.data.type||c.data.entry||c.params.trigger[0].reset(),c.data.url&&(c.params.trigger.hide(),window.location=c.data.url),c.params.trigger.find(".cf-uploader-trigger").slideDown(),c.data.fields){var e=c.params.trigger;b(c.data.fields,e,d)}if("undefined"!=c.data.scroll){var h=document.getElementById(c.data.scroll);if(null!=h){var i=jQuery(h);jQuery("html,body").animate({scrollTop:i.offset().top-i.outerHeight()-12},300)}}jQuery(document).trigger("cf.submission",c),jQuery(document).trigger("cf."+c.data.type)}})})()});var calders_forms_check_conditions,calders_forms_init_conditions;jQuery(function(a){var b={},c={};Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=this.length>>>0,c=Number(arguments[1])||0;for(c=c<0?Math.ceil(c):Math.floor(c),c<0&&(c+=b);c<b;c++)if(c in this&&this[c]===a)return c;return-1}),cf_debounce=function(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null,c||a.apply(e,f)},h=c&&!d;clearTimeout(d),d=setTimeout(g,b),h&&a.apply(e,f)}},calders_forms_check_conditions=function(d){function e(a){if(b[a])return b[a]}function f(a){return"object"==typeof window.cfstate&&window.cfstate.hasOwnProperty(a)?window.cfstate[a]:null}function g(a,b,c){var d=f(c);d&&d.events().emit(function(){return"cf.conditionals."+a}(),{fieldIdAttr:b,formIdAttr:c,eventType:a,fieldValue:e(b)})}if("undefined"!=typeof caldera_conditionals&&void 0!==caldera_conditionals[d]){var h=a(document.getElementById(d)),i=f(d);for(var j in caldera_conditionals[d]){if(jQuery("#conditional_"+j).length){var k=caldera_conditionals[d][j].type,l=caldera_conditionals[d][j].group,m=[];for(var n in l){var o={},p=l[n];for(var q in p){var r=h.find('[data-field="'+p[q].field+'"]'),s=[],t="function"==typeof p[q].value?p[q].value():p[q].value;if(void 0!==p[q].selectors)for(var u in p[q].selectors){var v=new RegExp(u,"g");t=t.replace(v,a(p[q].selectors[u]).val())}if(o[q]=!1,r.is(":radio,:checkbox"))r=r.filter(":checked");else if(r.is("div"))r=jQuery("<input>").val(r.html());else if(!r.length){var w=h.find('[data-calc-field="'+p[q].field+'"]');w.length&&(r=h.find('[data-calc-field="'+p[q].field+'"]'))}if(r.length)for(var x=0;x<r.length;x++)s.push(r[x].value);else s.push(p[q].field);switch(p[q].compare){case"is":s.length&&s.indexOf(t.toString())>=0&&(o[q]=!0);break;case"isnot":s.length&&s.indexOf(t)<0&&(o[q]=!0);break;case">":case"greater":o[q]=parseFloat(s.reduce(function(a,b){return a+b}))>parseFloat(t);break;case"<":case"smaller":o[q]=parseFloat(s.reduce(function(a,b){return a+b}))<parseFloat(t);break;case"startswith":for(var x=0;x<s.length;x++)s[x].toLowerCase().substr(0,t.toLowerCase().length)===t.toLowerCase()&&(o[q]=!0);break;case"endswith":for(var x=0;x<s.length;x++)s[x].toLowerCase().substr(s[x].toLowerCase().length-t.toLowerCase().length)===t.toLowerCase()&&(o[q]=!0);break;case"contains":for(var x=0;x<s.length;x++)s[x].toLowerCase().indexOf(t)>=0&&(o[q]=!0)}}istrue=!0;for(var y in o)if(!1===o[y]){istrue=!1;break}m.push(istrue)}var z,A=jQuery("#conditional-"+j+"-tmpl").html(),B=jQuery("#conditional_"+j),C=jQuery('[data-field="'+j+'"]');if(m.length&&m.indexOf(!0)>=0?"show"===k?z="show":"hide"===k?z="hide":"disable"===k&&(z="disable"):z="show"===k?"hide":"disable"===k?"enable":"show","show"===z)B.html().length||(B.html(A).trigger("cf.add",{field:j}),jQuery(document).trigger("cf.add",{field:j}),function(b,d){var f,g=e(b);if(void 0!=g)if("object"==typeof g)for(var i in g)!0===g[i]&&(f=a(document.getElementById(i)),f.prop("checked",!0));else f=a("#"+b),f.val(g);null!==d&&(d.rebind(b),void 0===f&&(f=a("#"+b)),c.hasOwnProperty(b)&&(f.attr("data-unsync","1"),f.removeAttr("data-sync"),f.removeAttr("data-binds")),void 0!==f&&f.data("sync")&&new CalderaFormsFieldSync(f,f.data("binds"),h,a,d))}(j,i)),g("show",j,d);else if("hide"===z)B.html().length&&(!function(d,e){var f=a(document.getElementById(d));if(f.length){var g=f.val();g&&(b[d]=g)}else{var h;f=a("."+d),b[d]={},f.each(function(c,e){h=a(e),h.prop("checked")?b[d][h.attr("id")]=!0:b[d][h.attr("id")]=!1})}f.data("unsync")&&(c[d]=!0),null!==e&&e.unbind(d),b[d]}(j,i),C.val("").empty().prop("checked",!1),B.empty().trigger("cf.remove",{field:j}),jQuery(document).trigger("cf.remove",{field:j})),g("hide",j,d);else if("enable"===z||"disable"===z){var D=jQuery("#"+j);"enable"==z?(B.html().length?D.prop("disabled",!1):(B.html(A).trigger("cf.add",{field:j}),jQuery(document).trigger("cf.add").trigger("cf.enable",{field:j}),D.prop("disabled",!1)),g("enable",j,d)):(B.html().length?D.prop("disabled","disabled",{field:j}):(B.html(A).trigger("cf.remove"),jQuery(document).trigger("cf.remove",{field:j}).trigger("cf.disable",{field:j}),D.prop("disabled","disabled",{field:j})),g("disable",j,d))}}}}},calders_forms_init_conditions=function(){jQuery(".caldera_forms_form").on("change keyup","[data-field]",cf_debounce(function(b){var c=a(this).closest(".caldera_forms_form").prop("id");calders_forms_check_conditions(c)},10))},"undefined"!=typeof caldera_conditionals&&(calders_forms_init_conditions(),jQuery(".caldera_forms_form").find("[data-field]").first().trigger("change"))}),function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{configurable:!1,enumerable:!0,get:d})},b.n=function(a){var c=a&&a.__esModule?function(){return a.default}:function(){return a};return b.d(c,"a",c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p="",b(b.s=3)}([function(a,b,c){"use strict";var d,e,f,g;"function"==typeof Symbol&&Symbol.iterator,g=function(a){return a},e=[c(2)],void 0===(f="function"==typeof(d=g)?d.apply(b,e):d)||(a.exports=f)},function(a,b,c){"use strict";var d,e,f,g,h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};g=function(a,b,c,d){function e(b,c,g){if(!(this instanceof e))return new e(b,c,g);this.el=d,this.events={},this.maskset=d,this.refreshValue=!1,!0!==g&&(a.isPlainObject(b)?c=b:(c=c||{},b&&(c.alias=b)),this.opts=a.extend(!0,{},this.defaults,c),this.noMasksCache=c&&c.definitions!==d,this.userOptions=c||{},this.isRTL=this.opts.numericInput,f(this.opts.alias,c,this.opts))}function f(b,c,g){var h=e.prototype.aliases[b];return h?(h.alias&&f(h.alias,d,g),a.extend(!0,g,h),a.extend(!0,g,c),!0):(null===g.mask&&(g.mask=b),!1)}function g(b,c){function f(b,f,g){var h=!1;if(null!==b&&""!==b||((h=null!==g.regex)?b=(b=g.regex).replace(/^(\^)(.*)(\$)$/,"$2"):(h=!0,b=".*")),1===b.length&&!1===g.greedy&&0!==g.repeat&&(g.placeholder=""),g.repeat>0||"*"===g.repeat||"+"===g.repeat){var i="*"===g.repeat?0:"+"===g.repeat?1:g.repeat;b=g.groupmarker[0]+b+g.groupmarker[1]+g.quantifiermarker[0]+i+","+g.repeat+g.quantifiermarker[1]}var j,k=h?"regex_"+g.regex:g.numericInput?b.split("").reverse().join(""):b;return e.prototype.masksCache[k]===d||!0===c?(j={mask:b,maskToken:e.prototype.analyseMask(b,h,g),validPositions:{},_buffer:d,buffer:d,tests:{},excludes:{},metadata:f,maskLength:d},!0!==c&&(e.prototype.masksCache[k]=j,j=a.extend(!0,{},e.prototype.masksCache[k]))):j=a.extend(!0,{},e.prototype.masksCache[k]),j}if(a.isFunction(b.mask)&&(b.mask=b.mask(b)),a.isArray(b.mask)){if(b.mask.length>1){if(null===b.keepStatic){b.keepStatic="auto";for(var g=0;g<b.mask.length;g++)if(b.mask[g].charAt(0)!==b.mask[0].charAt(0)){b.keepStatic=!0;break}}var h=b.groupmarker[0];return a.each(b.isRTL?b.mask.reverse():b.mask,function(c,e){h.length>1&&(h+=b.groupmarker[1]+b.alternatormarker+b.groupmarker[0]),e.mask===d||a.isFunction(e.mask)?h+=e:h+=e.mask}),f(h+=b.groupmarker[1],b.mask,b)}b.mask=b.mask.pop()}return b.mask&&b.mask.mask!==d&&!a.isFunction(b.mask.mask)?f(b.mask.mask,b.mask,b):f(b.mask,b.mask,b)}function i(a){var b=c.createElement("input"),d="on"+a,e=d in b;return e||(b.setAttribute(d,"return;"),e="function"==typeof b[d]),b=null,e}function j(f,g,k){function o(a,b,c,e,f){var g=k.greedy;f&&(k.greedy=!1),b=b||0;var h,i,j,l=[],m=0,n=r();do{if(!0===a&&p().validPositions[m])i=(j=f&&!0===p().validPositions[m].match.optionality&&p().validPositions[m+1]===d&&(!0===p().validPositions[m].generatedInput||p().validPositions[m].input==k.skipOptionalPartCharacter&&m>0)?u(m,y(m,h,m-1)):p().validPositions[m]).match,h=j.locator.slice(),l.push(!0===c?j.input:!1===c?i.nativeDef:L(m,i));else{i=(j=v(m,h,m-1)).match,h=j.locator.slice();var o=!0!==e&&(!1!==k.jitMasking?k.jitMasking:i.jit);(!1===o||o===d||m<n||"number"==typeof o&&isFinite(o)&&o>m)&&l.push(!1===c?i.nativeDef:L(m,i))}"auto"===k.keepStatic&&i.newBlockMarker&&null!==i.fn&&(k.keepStatic=m-1),m++}while((Y===d||m<Y)&&(null!==i.fn||""!==i.def)||b>m);return""===l[l.length-1]&&l.pop(),!1===c&&p().maskLength!==d||(p().maskLength=m-1),k.greedy=g,l}function p(){return g}function q(a){var b=p();b.buffer=d,!0!==a&&(b.validPositions={},b.p=0)}function r(a,b,c){var e=-1,f=-1,g=c||p().validPositions;for(var h in a===d&&(a=-1),g){var i=parseInt(h);g[i]&&(b||!0!==g[i].generatedInput)&&(i<=a&&(e=i),i>=a&&(f=i))}return-1===e||e==a?f:-1==f?e:a-e<f-a?e:f}function s(a){var b=a.locator[a.alternation];return"string"==typeof b&&b.length>0&&(b=b.split(",")[0]),b!==d?b.toString():""}function t(a,b){var c=(a.alternation!=d?a.mloc[s(a)]:a.locator).join("");if(""!==c)for(;c.length<b;)c+="0";return c}function u(a,b){for(var c,e,f,g=t(w(a=a>0?a-1:0)),h=0;h<b.length;h++){var i=b[h];c=t(i,g.length);var j=Math.abs(c-g);(e===d||""!==c&&j<e||f&&f.match.optionality&&"master"===f.match.newBlockMarker&&(!i.match.optionality||!i.match.newBlockMarker)||f&&f.match.optionalQuantifier&&!i.match.optionalQuantifier)&&(e=j,f=i)}return f}function v(a,b,c){return p().validPositions[a]||u(a,y(a,b?b.slice():b,c))}function w(a,b){return p().validPositions[a]?p().validPositions[a]:(b||y(a))[0]}function x(a,b){for(var c=!1,d=y(a),e=0;e<d.length;e++)if(d[e].match&&d[e].match.def===b){c=!0;break}return c}function y(b,c,e){function f(c,e,h,j){function o(h,j,q){function r(b,c){var d=0===a.inArray(b,c.matches);return d||a.each(c.matches,function(a,e){if(!0===e.isQuantifier?d=r(b,c.matches[a-1]):!0===e.isOptional?d=r(b,e):!0===e.isAlternate&&(d=r(b,e)),d)return!1}),d}function s(b,c,e){var f,g;if((p().tests[b]||p().validPositions[b])&&a.each(p().tests[b]||[p().validPositions[b]],function(a,b){if(b.mloc[c])return f=b,!1;var h=e!==d?e:b.alternation,i=b.locator[h]!==d?b.locator[h].toString().indexOf(c):-1;(g===d||i<g)&&-1!==i&&(f=b,g=i)}),f){var h=f.locator[f.alternation];return(f.mloc[c]||f.mloc[h]||f.locator).slice((e!==d?e:f.alternation)+1)}return e!==d?s(b,c):d}function t(a,b){function c(a){for(var b,c,d=[],e=0,f=a.length;e<f;e++)if("-"===a.charAt(e))for(c=a.charCodeAt(e+1);++b<c;)d.push(String.fromCharCode(b));else b=a.charCodeAt(e),d.push(a.charAt(e));return d.join("")}return k.regex&&null!==a.match.fn&&null!==b.match.fn?-1!==c(b.match.def.replace(/[\[\]]/g,"")).indexOf(c(a.match.def.replace(/[\[\]]/g,""))):a.match.def===b.match.nativeDef}function u(a,b){if(b===d||a.alternation===b.alternation&&-1===a.locator[a.alternation].toString().indexOf(b.locator[b.alternation])){a.mloc=a.mloc||{};var c=a.locator[a.alternation];if(c!==d){if("string"==typeof c&&(c=c.split(",")[0]),a.mloc[c]===d&&(a.mloc[c]=a.locator.slice()),b!==d){for(var e in b.mloc)"string"==typeof e&&(e=e.split(",")[0]),a.mloc[e]===d&&(a.mloc[e]=b.mloc[e]);a.locator[a.alternation]=Object.keys(a.mloc).join(",")}return!0}a.alternation=d}return!1}if(i>5e3)throw"Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. "+p().mask;if(i===b&&h.matches===d)return l.push({match:h,locator:j.reverse(),cd:n,mloc:{}}),!0;if(h.matches!==d){if(h.isGroup&&q!==h){if(h=o(c.matches[a.inArray(h,c.matches)+1],j,q))return!0}else if(h.isOptional){var v=h;if(h=f(h,e,j,q)){if(a.each(l,function(a,b){b.match.optionality=!0}),g=l[l.length-1].match,q!==d||!r(g,v))return!0;m=!0,i=b}}else if(h.isAlternator){var w,x=h,y=[],z=l.slice(),A=j.length,B=e.length>0?e.shift():-1;if(-1===B||"string"==typeof B){var C,D=i,E=e.slice(),F=[];if("string"==typeof B)F=B.split(",");else for(C=0;C<x.matches.length;C++)F.push(C.toString());if(p().excludes[b]){for(var G=F.slice(),H=0,I=p().excludes[b].length;H<I;H++)F.splice(F.indexOf(p().excludes[b][H].toString()),1);0===F.length&&(p().excludes[b]=d,F=G)}(!0===k.keepStatic||isFinite(parseInt(k.keepStatic))&&D>=k.keepStatic)&&(F=F.slice(0,1));for(var J=!1,K=0;K<F.length;K++){C=parseInt(F[K]),l=[],e="string"==typeof B&&s(i,C,A)||E.slice(),x.matches[C]&&o(x.matches[C],[C].concat(j),q)?h=!0:0===K&&(J=!0),w=l.slice(),i=D,l=[];for(var L=0;L<w.length;L++){var M=w[L],N=!1;M.match.jit=M.match.jit||J,M.alternation=M.alternation||A,u(M);for(var O=0;O<y.length;O++){var P=y[O];if("string"!=typeof B||M.alternation!==d&&-1!==a.inArray(M.locator[M.alternation].toString(),F)){if(M.match.nativeDef===P.match.nativeDef){N=!0,u(P,M);break}if(t(M,P)){u(M,P)&&(N=!0,y.splice(y.indexOf(P),0,M));break}if(t(P,M)){u(P,M);break}if(U=P,null===(T=M).match.fn&&null!==U.match.fn&&U.match.fn.test(T.match.def,p(),b,!1,k,!1)){u(M,P)&&(N=!0,y.splice(y.indexOf(P),0,M));break}}}N||y.push(M)}}l=z.concat(y),i=b,m=l.length>0,h=y.length>0,e=E.slice()}else h=o(x.matches[B]||c.matches[B],[B].concat(j),q);if(h)return!0}else if(h.isQuantifier&&q!==c.matches[a.inArray(h,c.matches)-1])for(var Q=h,R=e.length>0?e.shift():0;R<(isNaN(Q.quantifier.max)?R+1:Q.quantifier.max)&&i<=b;R++){var S=c.matches[a.inArray(Q,c.matches)-1];if(h=o(S,[R].concat(j),S)){if((g=l[l.length-1].match).optionalQuantifier=R>Q.quantifier.min-1,g.jit=R+S.matches.indexOf(g)>=Q.quantifier.jit,r(g,S)&&R>Q.quantifier.min-1){m=!0,i=b;break}if(Q.quantifier.jit!==d&&isNaN(Q.quantifier.max)&&g.optionalQuantifier&&p().validPositions[b-1]===d){l.pop(),m=!0,i=b,n=d;break}return!0}}else if(h=f(h,e,j,q))return!0}else i++;var T,U}for(var q=e.length>0?e.shift():0;q<c.matches.length;q++)if(!0!==c.matches[q].isQuantifier){var r=o(c.matches[q],[q].concat(h),j);if(r&&i===b)return r;if(i>b)break}}var g,h=p().maskToken,i=c?e:0,j=c?c.slice():[0],l=[],m=!1,n=c?c.join(""):"";if(b>-1){if(c===d){for(var o,q=b-1;(o=p().validPositions[q]||p().tests[q])===d&&q>-1;)q--;o!==d&&q>-1&&(j=function(b,c){var e=[];return a.isArray(c)||(c=[c]),c.length>0&&(c[0].alternation===d?0===(e=u(b,c.slice()).locator.slice()).length&&(e=c[0].locator.slice()):a.each(c,function(a,b){if(""!==b.def)if(0===e.length)e=b.locator.slice();else for(var c=0;c<e.length;c++)b.locator[c]&&-1===e[c].toString().indexOf(b.locator[c])&&(e[c]+=","+b.locator[c])})),e}(q,o),n=j.join(""),i=q)}if(p().tests[b]&&p().tests[b][0].cd===n)return p().tests[b];for(var r=j.shift();r<h.length&&!(f(h[r],j,[r])&&i===b||i>b);r++);}return(0===l.length||m)&&l.push({match:{fn:null,optionality:!1,casing:null,def:"",placeholder:""},locator:[],mloc:{},cd:n}),c!==d&&p().tests[b]?a.extend(!0,[],l):(p().tests[b]=a.extend(!0,[],l),p().tests[b])}function z(){
|
2 |
+
return p()._buffer===d&&(p()._buffer=o(!1,1),p().buffer===d&&(p().buffer=p()._buffer.slice())),p()._buffer}function A(a){return p().buffer!==d&&!0!==a||(p().buffer=o(!0,r(),!0)),p().buffer}function B(a,b,c){var e,f;if(!0===a)q(),a=0,b=c.length;else for(e=a;e<b;e++)delete p().validPositions[e];for(f=a,e=a;e<b;e++)if(q(!0),c[e]!==k.skipOptionalPartCharacter){var g=E(f,c[e],!0,!0);!1!==g&&(q(!0),f=g.caret!==d?g.caret:g.pos+1)}}function C(b,c,e){for(var f,g=k.greedy?c:c.slice(0,1),h=!1,i=e!==d?e.split(","):[],j=0;j<i.length;j++)-1!==(f=b.indexOf(i[j]))&&b.splice(f,1);for(var l=0;l<b.length;l++)if(-1!==a.inArray(b[l],g)){h=!0;break}return h}function D(b,c,e,f,g){var h,i,j,k,l,m,n,o=a.extend(!0,{},p().validPositions),t=!1,u=g!==d?g:r();if(-1===u&&g===d)i=(k=w(h=0)).alternation;else for(;u>=0;u--)if((j=p().validPositions[u])&&j.alternation!==d){if(k&&k.locator[j.alternation]!==j.locator[j.alternation])break;h=u,i=p().validPositions[h].alternation,k=j}if(i!==d){n=parseInt(h),p().excludes[n]=p().excludes[n]||[],!0!==b&&p().excludes[n].push(s(k));var v=[],x=0;for(l=n;l<r(d,!0)+1;l++)(m=p().validPositions[l])&&!0!==m.generatedInput?v.push(m.input):l<b&&x++,delete p().validPositions[l];for(;p().excludes[n]&&p().excludes[n].length<10;){var y=-1*x,z=v.slice();for(p().tests[n]=d,q(!0),t=!0;z.length>0;){var A=z.shift();if(!(t=E(r(d,!0)+1,A,!1,f,!0)))break}if(t&&c!==d){var B=r(b)+1;for(l=n;l<r()+1;l++)((m=p().validPositions[l])===d||null==m.match.fn)&&l<b+y&&y++;t=E((b+=y)>B?B:b,c,e,f,!0)}if(t)break;if(q(),k=w(n),p().validPositions=a.extend(!0,{},o),!p().excludes[n]){t=D(b,c,e,f,n-1);break}var C=s(k);if(-1!==p().excludes[n].indexOf(C)){t=D(b,c,e,f,n-1);break}for(p().excludes[n].push(C),l=n;l<r(d,!0)+1;l++)delete p().validPositions[l]}}return p().excludes[n]=d,t}function E(b,c,f,g,h,i){function j(a){return ba?a.begin-a.end>1||a.begin-a.end==1:a.end-a.begin>1||a.end-a.begin==1}function l(c,f,h){var i=!1;return a.each(y(c),function(l,m){var n=m.match;if(A(!0),!1!==(i=null!=n.fn?n.fn.test(f,p(),c,h,k,j(b)):(f===n.def||f===k.skipOptionalPartCharacter)&&""!==n.def&&{c:L(c,n,!0)||n.def,pos:c})){var o=i.c!==d?i.c:f,q=c;return o=o===k.skipOptionalPartCharacter&&null===n.fn?L(c,n,!0)||n.def:o,i.remove!==d&&(a.isArray(i.remove)||(i.remove=[i.remove]),a.each(i.remove.sort(function(a,b){return b-a}),function(a,b){G({begin:b,end:b+1})})),i.insert!==d&&(a.isArray(i.insert)||(i.insert=[i.insert]),a.each(i.insert.sort(function(a,b){return a-b}),function(a,b){E(b.pos,b.c,!0,g)})),!0!==i&&i.pos!==d&&i.pos!==c&&(q=i.pos),(!0===i||i.pos!==d||i.c!==d)&&(G(b,a.extend({},m,{input:function(b,c,d){switch(k.casing||c.casing){case"upper":b=b.toUpperCase();break;case"lower":b=b.toLowerCase();break;case"title":var f=p().validPositions[d-1];b=0===d||f&&f.input===String.fromCharCode(e.keyCode.SPACE)?b.toUpperCase():b.toLowerCase();break;default:if(a.isFunction(k.casing)){var g=Array.prototype.slice.call(arguments);g.push(p().validPositions),b=k.casing.apply(this,g)}}return b}(o,n,q)}),g,q)||(i=!1),!1)}}),i}f=!0===f;var m=b;b.begin!==d&&(m=ba?b.end:b.begin);var n=!0,o=a.extend(!0,{},p().validPositions);if(a.isFunction(k.preValidation)&&!f&&!0!==g&&!0!==i&&(n=k.preValidation(A(),m,c,j(b),k,p())),!0===n){if(F(d,m,!0),(Y===d||m<Y)&&(n=l(m,c,f),(!f||!0===g)&&!1===n&&!0!==i)){var r=p().validPositions[m];if(!r||null!==r.match.fn||r.match.def!==c&&c!==k.skipOptionalPartCharacter){if((k.insertMode||p().validPositions[I(m)]===d)&&!H(m,!0))for(var s=m+1,t=I(m);s<=t;s++)if(!1!==(n=l(s,c,f))){n=F(m,n.pos!==d?n.pos:s)||n,m=s;break}}else n={caret:I(m)}}!1!==n||!1===k.keepStatic||null!=k.regex&&!S(A())||f||!0===h||(n=D(m,c,f,g)),!0===n&&(n={pos:m})}if(a.isFunction(k.postValidation)&&!1!==n&&!f&&!0!==g&&!0!==i){var u=k.postValidation(A(!0),n,k);if(u!==d){if(u.refreshFromBuffer&&u.buffer){var v=u.refreshFromBuffer;B(!0===v?v:v.start,v.end,u.buffer)}n=!0===u?n:u}}return n&&n.pos===d&&(n.pos=m),!1!==n&&!0!==i||(q(!0),p().validPositions=a.extend(!0,{},o)),n}function F(b,c,e){var f;if(b===d)for(b=c-1;b>0&&!p().validPositions[b];b--);for(var g=b;g<c;g++)if(p().validPositions[g]===d&&!H(g,!0)){var h=0==g?w(g):p().validPositions[g-1];if(h){var i,j=t(h),k=y(g).slice(),l=d,m=w(g);if(""===k[k.length-1].match.def&&k.pop(),a.each(k,function(a,b){i=t(b,j.length);var c=Math.abs(i-j);(l===d||c<l)&&null===b.match.fn&&!0!==b.match.optionality&&!0!==b.match.optionalQuantifier&&(l=c,m=b)}),(m=a.extend({},m,{input:L(g,m.match,!0)||m.match.def})).generatedInput=!0,G(g,m,!0),!0!==e){var n=p().validPositions[c].input;p().validPositions[c]=d,f=E(c,n,!0,!0)}}}return f}function G(b,c,e,f){var g=b.begin!==d?b.begin:b,h=b.end!==d?b.end:b;if(b.begin>b.end&&(g=b.end,h=b.begin),f=f!==d?f:g,g!==h||k.insertMode&&p().validPositions[f]!==d&&e===d){var i=a.extend(!0,{},p().validPositions),j=r(d,!0);for(p().p=g,s=j;s>=g;s--)p().validPositions[s]&&"+"===p().validPositions[s].match.nativeDef&&(k.isNegative=!1),delete p().validPositions[s];var l=!0,m=f,n=(p().validPositions,!1),o=m,s=m;for(c&&(p().validPositions[f]=a.extend(!0,{},c),o++,m++,g<h&&s++);s<=j;s++){var t=i[s];if(t!==d&&(s>=h||s>=g&&!0!==t.generatedInput&&function(a,b,c){var e=b[a];if(e!==d&&(null===e.match.fn&&!0!==e.match.optionality||e.input===k.radixPoint)){var f=c.begin<=a-1?b[a-1]&&null===b[a-1].match.fn&&b[a-1]:b[a-1],g=c.end>a+1?b[a+1]&&null===b[a+1].match.fn&&b[a+1]:b[a+1];return f&&g}return!1}(s,i,{begin:g,end:h}))){for(;""!==w(o).match.def;){if(!1===n&&i[o]&&i[o].match.nativeDef===t.match.nativeDef)p().validPositions[o]=a.extend(!0,{},i[o]),p().validPositions[o].input=t.input,F(d,o,!0),m=o+1,l=!0;else if(x(o,t.match.def)){var u=E(o,t.input,!0,!0);l=!1!==u,m=u.caret||u.insert?r():o+1,n=!0}else if(!(l=!0===t.generatedInput||t.input===k.radixPoint&&!0===k.numericInput)&&""===w(o).match.def)break;if(l)break;o++}""==w(o).match.def&&(l=!1),o=m}if(!l)break}if(!l)return p().validPositions=a.extend(!0,{},i),q(!0),!1}else c&&(p().validPositions[f]=a.extend(!0,{},c));return q(!0),!0}function H(a,b){var c=v(a).match;if(""===c.def&&(c=w(a).match),null!=c.fn)return c.fn;if(!0!==b&&a>-1){var d=y(a);return d.length>1+(""===d[d.length-1].match.def?1:0)}return!1}function I(a,b){for(var c=a+1;""!==w(c).match.def&&(!0===b&&(!0!==w(c).match.newBlockMarker||!H(c))||!0!==b&&!H(c));)c++;return c}function J(a,b){var c,d=a;if(d<=0)return 0;for(;--d>0&&(!0===b&&!0!==w(d).match.newBlockMarker||!0!==b&&!H(d)&&((c=y(d)).length<2||2===c.length&&""===c[1].match.def)););return d}function K(b,c,e,f,g){if(f&&a.isFunction(k.onBeforeWrite)){var h=k.onBeforeWrite.call(_,f,c,e,k);if(h){if(h.refreshFromBuffer){var i=h.refreshFromBuffer;B(!0===i?i:i.start,i.end,h.buffer||c),c=A(!0)}e!==d&&(e=h.caret!==d?h.caret:e)}}if(b!==d&&(b.inputmask._valueSet(c.join("")),e===d||f!==d&&"blur"===f.type?V(b,e,0===c.length):P(b,e),!0===g)){var j=a(b),l=b.inputmask._valueGet();da=!0,j.trigger("input"),setTimeout(function(){l===z().join("")?j.trigger("cleared"):!0===S(c)&&j.trigger("complete")},0)}}function L(b,c,e){if((c=c||w(b).match).placeholder!==d||!0===e)return a.isFunction(c.placeholder)?c.placeholder(k):c.placeholder;if(null===c.fn){if(b>-1&&p().validPositions[b]===d){var f,g=y(b),h=[];if(g.length>1+(""===g[g.length-1].match.def?1:0))for(var i=0;i<g.length;i++)if(!0!==g[i].match.optionality&&!0!==g[i].match.optionalQuantifier&&(null===g[i].match.fn||f===d||!1!==g[i].match.fn.test(f.match.def,p(),b,!0,k))&&(h.push(g[i]),null===g[i].match.fn&&(f=g[i]),h.length>1&&/[0-9a-bA-Z]/.test(h[0].match.def)))return k.placeholder.charAt(b%k.placeholder.length)}return c.def}return k.placeholder.charAt(b%k.placeholder.length)}function M(b,c,f,g,h){var i=this||b.inputmask,j=g.slice(),l="",m=-1,n=d;if(q(),f||!0===k.autoUnmask)m=I(m);else{var s=z().slice(0,I(-1)).join(""),t=j.join("").match(new RegExp("^"+e.escapeRegex(s),"g"));t&&t.length>0&&(j.splice(0,t.length*s.length),m=I(m))}-1===m?(p().p=I(m),m=0):p().p=m,i.caretPos={begin:m},a.each(j,function(c,e){if(e!==d)if(p().validPositions[c]===d&&j[c]===L(c)&&H(c,!0)&&!1===E(c,j[c],!0,d,d,!0))p().p++;else{var g=new a.Event("_checkval");g.which=e.charCodeAt(0),l+=e;var h=r(d,!0);!function(a,b){return-1!==o(!0,0,!1).slice(a,I(a)).join("").replace(/'/g,"").indexOf(b)&&!H(a)&&(w(a).match.nativeDef===b.charAt(0)||null===w(a).match.fn&&w(a).match.nativeDef==="'"+b.charAt(0)||" "===w(a).match.nativeDef&&(w(a+1).match.nativeDef===b.charAt(0)||null===w(a+1).match.fn&&w(a+1).match.nativeDef==="'"+b.charAt(0)))}(m,l)?(n=ha.keypressEvent.call(b,g,!0,!1,f,i.caretPos.begin))&&(m=i.caretPos.begin+1,l=""):n=ha.keypressEvent.call(b,g,!0,!1,f,h+1),n&&(K(d,A(),n.forwardPosition,g,!1),i.caretPos={begin:n.forwardPosition,end:n.forwardPosition})}}),c&&K(b,A(),n?n.forwardPosition:d,h||new a.Event("checkval"),h&&"input"===h.type)}function N(b){if(b){if(b.inputmask===d)return b.value;b.inputmask&&b.inputmask.refreshValue&&ha.setValueEvent.call(b)}var c=[],e=p().validPositions;for(var f in e)e[f].match&&null!=e[f].match.fn&&c.push(e[f].input);var g=0===c.length?"":(ba?c.reverse():c).join("");if(a.isFunction(k.onUnMask)){var h=(ba?A().slice().reverse():A()).join("");g=k.onUnMask.call(_,h,g,k)}return g}function O(a){return!ba||"number"!=typeof a||k.greedy&&""===k.placeholder||!aa||(a=aa.inputmask._valueGet().length-a),a}function P(e,f,g,h){var i;if(f===d)return e.setSelectionRange?(f=e.selectionStart,g=e.selectionEnd):b.getSelection?(i=b.getSelection().getRangeAt(0)).commonAncestorContainer.parentNode!==e&&i.commonAncestorContainer!==e||(f=i.startOffset,g=i.endOffset):c.selection&&c.selection.createRange&&(g=(f=0-(i=c.selection.createRange()).duplicate().moveStart("character",-e.inputmask._valueGet().length))+i.text.length),{begin:h?f:O(f),end:h?g:O(g)};if(a.isArray(f)&&(g=ba?f[0]:f[1],f=ba?f[1]:f[0]),f.begin!==d&&(g=ba?f.begin:f.end,f=ba?f.end:f.begin),"number"==typeof f){f=h?f:O(f),g="number"==typeof(g=h?g:O(g))?g:f;var j=parseInt(((e.ownerDocument.defaultView||b).getComputedStyle?(e.ownerDocument.defaultView||b).getComputedStyle(e,null):e.currentStyle).fontSize)*g;if(e.scrollLeft=j>e.scrollWidth?j:0,n||!1!==k.insertMode||f!==g||g++,e.inputmask.caretPos={begin:f,end:g},e.setSelectionRange)e.selectionStart=f,e.selectionEnd=g;else if(b.getSelection){if(i=c.createRange(),e.firstChild===d||null===e.firstChild){var l=c.createTextNode("");e.appendChild(l)}i.setStart(e.firstChild,f<e.inputmask._valueGet().length?f:e.inputmask._valueGet().length),i.setEnd(e.firstChild,g<e.inputmask._valueGet().length?g:e.inputmask._valueGet().length),i.collapse(!0);var m=b.getSelection();m.removeAllRanges(),m.addRange(i)}else e.createTextRange&&((i=e.createTextRange()).collapse(!0),i.moveEnd("character",g),i.moveStart("character",f),i.select());V(e,{begin:f,end:g})}}function Q(b){var c,e,f=o(!0,r(),!0,!0),g=f.length,h=r(),i={},j=p().validPositions[h],k=j!==d?j.locator.slice():d;for(c=h+1;c<f.length;c++)k=(e=v(c,k,c-1)).locator.slice(),i[c]=a.extend(!0,{},e);var l=j&&j.alternation!==d?j.locator[j.alternation]:d;for(c=g-1;c>h&&((e=i[c]).match.optionality||e.match.optionalQuantifier&&e.match.newBlockMarker||l&&(l!==i[c].locator[j.alternation]&&null!=e.match.fn||null===e.match.fn&&e.locator[j.alternation]&&C(e.locator[j.alternation].toString().split(","),l.toString().split(","))&&""!==y(c)[0].def))&&f[c]===L(c,e.match);c--)g--;return b?{l:g,def:i[g]?i[g].match:d}:g}function R(a){a.length=0;for(var b,c=o(!0,0,!0,d,!0);(b=c.shift())!==d;)a.push(b);return a}function S(b){if(a.isFunction(k.isComplete))return k.isComplete(b,k);if("*"===k.repeat)return d;var c=!1,e=Q(!0),f=J(e.l);if(e.def===d||e.def.newBlockMarker||e.def.optionality||e.def.optionalQuantifier){c=!0;for(var g=0;g<=f;g++){var h=v(g).match;if(null!==h.fn&&p().validPositions[g]===d&&!0!==h.optionality&&!0!==h.optionalQuantifier||null===h.fn&&b[g]!==L(g,h)){c=!1;break}}}return c}function T(a,b,c,f,g){if((k.numericInput||ba)&&(b===e.keyCode.BACKSPACE?b=e.keyCode.DELETE:b===e.keyCode.DELETE&&(b=e.keyCode.BACKSPACE),ba)){var h=c.end;c.end=c.begin,c.begin=h}if(b===e.keyCode.BACKSPACE&&(c.end-c.begin<1||!1===k.insertMode)?(c.begin=J(c.begin),p().validPositions[c.begin]!==d&&p().validPositions[c.begin].input===k.groupSeparator&&c.begin--,!1===k.insertMode&&c.end!==p().maskLength&&c.end--):b===e.keyCode.DELETE&&c.begin===c.end&&(c.end=H(c.end,!0)&&p().validPositions[c.end]&&p().validPositions[c.end].input!==k.radixPoint?c.end+1:I(c.end)+1,p().validPositions[c.begin]!==d&&p().validPositions[c.begin].input===k.groupSeparator&&c.end++),G(c),!0!==f&&!1!==k.keepStatic||null!==k.regex){var i=D(!0);if(i){var j=i.caret!==d?i.caret:i.pos?I(i.pos.begin?i.pos.begin:i.pos):r(-1,!0);(b!==e.keyCode.DELETE||c.begin>j)&&c.begin}}var l=r(c.begin,!0);if(l<c.begin||-1===c.begin)p().p=I(l);else if(!0!==f&&(p().p=c.begin,!0!==g))for(;p().p<l&&p().validPositions[p().p]===d;)p().p++}function U(d){var e=(d.ownerDocument.defaultView||b).getComputedStyle(d,null),f=c.createElement("div");f.style.width=e.width,f.style.textAlign=e.textAlign,Z=c.createElement("div"),d.inputmask.colorMask=Z,Z.className="im-colormask",d.parentNode.insertBefore(Z,d),d.parentNode.removeChild(d),Z.appendChild(d),Z.appendChild(f),d.style.left=f.offsetLeft+"px",a(Z).on("mouseleave",function(a){return ha.mouseleaveEvent.call(d,[a])}),a(Z).on("mouseenter",function(a){return ha.mouseenterEvent.call(d,[a])}),a(Z).on("click",function(a){return P(d,function(a){var b,f=c.createElement("span");for(var g in e)isNaN(g)&&-1!==g.indexOf("font")&&(f.style[g]=e[g]);f.style.textTransform=e.textTransform,f.style.letterSpacing=e.letterSpacing,f.style.position="absolute",f.style.height="auto",f.style.width="auto",f.style.visibility="hidden",f.style.whiteSpace="nowrap",c.body.appendChild(f);var h,i=d.inputmask._valueGet(),j=0;for(b=0,h=i.length;b<=h;b++){if(f.innerHTML+=i.charAt(b)||"_",f.offsetWidth>=a){var k=a-j,l=f.offsetWidth-a;f.innerHTML=i.charAt(b),b=(k-=f.offsetWidth/3)<l?b-1:b;break}j=f.offsetWidth}return c.body.removeChild(f),b}(a.clientX)),ha.clickEvent.call(d,[a])}),a(d).on("keydown",function(a){a.shiftKey||!1===k.insertMode||setTimeout(function(){V(d)},0)})}function V(a,b,e){function f(a){if(a===d&&(a=""),l||null!==g.fn&&h.input!==d)if(l&&(null!==g.fn&&h.input!==d||""===g.def)){l=!1;var b=j.length;j[b-1]=j[b-1]+"</span>",j.push(a)}else j.push(a);else l=!0,j.push("<span class='im-static'>"+a)}var g,h,i,j=[],l=!1,m=0;if(Z!==d){var n=A();if(b===d?b=P(a):b.begin===d&&(b={begin:b,end:b}),!0!==e){var o=r();do{p().validPositions[m]?(h=p().validPositions[m],g=h.match,i=h.locator.slice(),f(n[m])):(h=v(m,i,m-1),g=h.match,i=h.locator.slice(),!1===k.jitMasking||m<o||"number"==typeof k.jitMasking&&isFinite(k.jitMasking)&&k.jitMasking>m?f(L(m,g)):l=!1),m++}while((Y===d||m<Y)&&(null!==g.fn||""!==g.def)||o>m||l);l&&f(),c.activeElement===a&&(j.splice(b.begin,0,b.begin===b.end||b.end>p().maskLength?'<mark class="im-caret" style="border-right-width: 1px;border-right-style: solid;">':'<mark class="im-caret-select">'),j.splice(b.end+1,0,"</mark>"))}var q=Z.getElementsByTagName("div")[0];q.innerHTML=j.join(""),a.inputmask.positionColorMask(a,q)}}g=g||this.maskset,k=k||this.opts;var W,X,Y,Z,$,_=this,aa=this.el,ba=this.isRTL,ca=!1,da=!1,ea=!1,fa=!1,ga={on:function(b,c,f){var g=function(b){var c=this;if(c.inputmask===d&&"FORM"!==this.nodeName){var g=a.data(c,"_inputmask_opts");g?new e(g).mask(c):ga.off(c)}else{if("setvalue"===b.type||"FORM"===this.nodeName||!(c.disabled||c.readOnly&&!("keydown"===b.type&&b.ctrlKey&&67===b.keyCode||!1===k.tabThrough&&b.keyCode===e.keyCode.TAB))){switch(b.type){case"input":if(!0===da)return da=!1,b.preventDefault();if(l){var h=arguments;return setTimeout(function(){f.apply(c,h),P(c,c.inputmask.caretPos,d,!0)},0),!1}break;case"keydown":ca=!1,da=!1;break;case"keypress":if(!0===ca)return b.preventDefault();ca=!0;break;case"click":if(m||n)return h=arguments,setTimeout(function(){f.apply(c,h)},0),!1}var i=f.apply(c,arguments);return!1===i&&(b.preventDefault(),b.stopPropagation()),i}b.preventDefault()}};b.inputmask.events[c]=b.inputmask.events[c]||[],b.inputmask.events[c].push(g),-1!==a.inArray(c,["submit","reset"])?null!==b.form&&a(b.form).on(c,g):a(b).on(c,g)},off:function(b,c){var d;b.inputmask&&b.inputmask.events&&(c?(d=[])[c]=b.inputmask.events[c]:d=b.inputmask.events,a.each(d,function(c,d){for(;d.length>0;){var e=d.pop();-1!==a.inArray(c,["submit","reset"])?null!==b.form&&a(b.form).off(c,e):a(b).off(c,e)}delete b.inputmask.events[c]}))}},ha={keydownEvent:function(b){var c=this,d=a(c),f=b.keyCode,g=P(c);if(f===e.keyCode.BACKSPACE||f===e.keyCode.DELETE||n&&f===e.keyCode.BACKSPACE_SAFARI||b.ctrlKey&&f===e.keyCode.X&&!i("cut"))b.preventDefault(),T(c,f,g),K(c,A(!0),p().p,b,c.inputmask._valueGet()!==A().join(""));else if(f===e.keyCode.END||f===e.keyCode.PAGE_DOWN){b.preventDefault();var h=I(r());k.insertMode||h!==p().maskLength||b.shiftKey||h--,P(c,b.shiftKey?g.begin:h,h,!0)}else f===e.keyCode.HOME&&!b.shiftKey||f===e.keyCode.PAGE_UP?(b.preventDefault(),P(c,0,b.shiftKey?g.begin:0,!0)):(k.undoOnEscape&&f===e.keyCode.ESCAPE||90===f&&b.ctrlKey)&&!0!==b.altKey?(M(c,!0,!1,W.split("")),d.trigger("click")):f!==e.keyCode.INSERT||b.shiftKey||b.ctrlKey?!0===k.tabThrough&&f===e.keyCode.TAB?(!0===b.shiftKey?(null===w(g.begin).match.fn&&(g.begin=I(g.begin)),g.end=J(g.begin,!0),g.begin=J(g.end,!0)):(g.begin=I(g.begin,!0),g.end=I(g.begin,!0),g.end<p().maskLength&&g.end--),g.begin<p().maskLength&&(b.preventDefault(),P(c,g.begin,g.end))):b.shiftKey||!1===k.insertMode&&(f===e.keyCode.RIGHT?setTimeout(function(){var a=P(c);P(c,a.begin)},0):f===e.keyCode.LEFT&&setTimeout(function(){var a=P(c);P(c,ba?a.begin+1:a.begin-1)},0)):(k.insertMode=!k.insertMode,P(c,k.insertMode||g.begin!==p().maskLength?g.begin:g.begin-1));k.onKeyDown.call(this,b,A(),P(c).begin,k),ea=-1!==a.inArray(f,k.ignorables)},keypressEvent:function(b,c,f,g,h){var i=this,j=a(i),l=b.which||b.charCode||b.keyCode;if(!(!0===c||b.ctrlKey&&b.altKey)&&(b.ctrlKey||b.metaKey||ea))return l===e.keyCode.ENTER&&W!==A().join("")&&(W=A().join(""),setTimeout(function(){j.trigger("change")},0)),!0;if(l){46===l&&!1===b.shiftKey&&""!==k.radixPoint&&(l=k.radixPoint.charCodeAt(0));var m,n=c?{begin:h,end:h}:P(i),o=String.fromCharCode(l),r=0;if(k._radixDance&&k.numericInput){var s=A().indexOf(k.radixPoint.charAt(0))+1;n.begin<=s&&(l===k.radixPoint.charCodeAt(0)&&(r=1),n.begin-=1,n.end-=1)}p().writeOutBuffer=!0;var t=E(n,o,g);if(!1!==t&&(q(!0),m=t.caret!==d?t.caret:I(t.pos.begin?t.pos.begin:t.pos),p().p=m),m=(k.numericInput&&t.caret===d?J(m):m)+r,!1!==f&&(setTimeout(function(){k.onKeyValidation.call(i,l,t,k)},0),p().writeOutBuffer&&!1!==t)){var u=A();K(i,u,m,b,!0!==c)}if(b.preventDefault(),c)return!1!==t&&(t.forwardPosition=m),t}},pasteEvent:function(c){var d,e=c.originalEvent||c,f=(a(this),this.inputmask._valueGet(!0)),g=P(this);ba&&(d=g.end,g.end=g.begin,g.begin=d);var h=f.substr(0,g.begin),i=f.substr(g.end,f.length);if(h===(ba?z().reverse():z()).slice(0,g.begin).join("")&&(h=""),i===(ba?z().reverse():z()).slice(g.end).join("")&&(i=""),b.clipboardData&&b.clipboardData.getData)f=h+b.clipboardData.getData("Text")+i;else{if(!e.clipboardData||!e.clipboardData.getData)return!0;f=h+e.clipboardData.getData("text/plain")+i}var j=f;if(a.isFunction(k.onBeforePaste)){if(!1===(j=k.onBeforePaste.call(_,f,k)))return c.preventDefault();j||(j=f)}return M(this,!1,!1,j.toString().split("")),K(this,A(),I(r()),c,W!==A().join("")),c.preventDefault()},inputFallBackEvent:function(b){var c=this,d=c.inputmask._valueGet();if(A().join("")!==d){var f=P(c);if(d=function(a,b,c){if(m){var d=b.replace(A().join(""),"");if(1===d.length){var e=b.split("");e.splice(c.begin,0,d),b=e.join("")}}return b}(0,d=function(a,b,c){return"."===b.charAt(c.begin-1)&&""!==k.radixPoint&&((b=b.split(""))[c.begin-1]=k.radixPoint.charAt(0),b=b.join("")),b}(0,d,f),f),A().join("")!==d){var g=A().join(""),h=!k.numericInput&&d.length>g.length?-1:0,i=d.substr(0,f.begin),j=d.substr(f.begin),l=g.substr(0,f.begin+h),n=g.substr(f.begin+h),o=f,p="",q=!1;if(i!==l){for(var r=(q=i.length>=l.length)?i.length:l.length,s=0;i.charAt(s)===l.charAt(s)&&s<r;s++);q&&(0===h&&(o.begin=s),p+=i.slice(s,o.end))}if(j!==n&&(j.length>n.length?p+=j.slice(0,1):j.length<n.length&&(o.end+=n.length-j.length,q||""===k.radixPoint||""!==j||i.charAt(o.begin+h-1)!==k.radixPoint||(o.begin--,p=k.radixPoint))),K(c,A(),{begin:o.begin+h,end:o.end+h}),p.length>0)a.each(p.split(""),function(b,d){var e=new a.Event("keypress");e.which=d.charCodeAt(0),ea=!1,ha.keypressEvent.call(c,e)});else{o.begin===o.end-1&&(o.begin=J(o.begin+1),o.begin===o.end-1?P(c,o.begin):P(c,o.begin,o.end));var t=new a.Event("keydown");t.keyCode=k.numericInput?e.keyCode.BACKSPACE:e.keyCode.DELETE,ha.keydownEvent.call(c,t),!1===k.insertMode&&P(c,P(c).begin-1)}b.preventDefault()}}},beforeInputEvent:function(b){if(b.cancelable){var c=this;switch(b.inputType){case"insertText":return a.each(b.data.split(""),function(b,d){var e=new a.Event("keypress");e.which=d.charCodeAt(0),ea=!1,ha.keypressEvent.call(c,e)}),b.preventDefault();case"deleteContentBackward":return(d=new a.Event("keydown")).keyCode=e.keyCode.BACKSPACE,ha.keydownEvent.call(c,d),b.preventDefault();case"deleteContentForward":var d;return(d=new a.Event("keydown")).keyCode=e.keyCode.DELETE,ha.keydownEvent.call(c,d),b.preventDefault()}}},setValueEvent:function(b){this.inputmask.refreshValue=!1;var c=(c=b&&b.detail?b.detail[0]:arguments[1])||this.inputmask._valueGet(!0);a.isFunction(k.onBeforeMask)&&(c=k.onBeforeMask.call(_,c,k)||c),M(this,!0,!1,c=c.split("")),W=A().join(""),(k.clearMaskOnLostFocus||k.clearIncomplete)&&this.inputmask._valueGet()===z().join("")&&this.inputmask._valueSet("")},focusEvent:function(a){var b=this.inputmask._valueGet();k.showMaskOnFocus&&(!k.showMaskOnHover||k.showMaskOnHover&&""===b)&&(this.inputmask._valueGet()!==A().join("")?K(this,A(),I(r())):!1===fa&&P(this,I(r()))),!0===k.positionCaretOnTab&&!1===fa&&ha.clickEvent.apply(this,[a,!0]),W=A().join("")},mouseleaveEvent:function(a){if(fa=!1,k.clearMaskOnLostFocus&&c.activeElement!==this){var b=A().slice(),d=this.inputmask._valueGet();d!==this.getAttribute("placeholder")&&""!==d&&(-1===r()&&d===z().join("")?b=[]:R(b),K(this,b))}},clickEvent:function(b,e){var f=this;setTimeout(function(){if(c.activeElement===f){var b=P(f);if(e&&(ba?b.end=b.begin:b.begin=b.end),b.begin===b.end)switch(k.positionCaretOnClick){case"none":break;case"select":P(f,0,A().length);break;case"ignore":P(f,I(r()));break;case"radixFocus":if(function(b){if(""!==k.radixPoint){var c=p().validPositions;if(c[b]===d||c[b].input===L(b)){if(b<I(-1))return!0;var e=a.inArray(k.radixPoint,A());if(-1!==e){for(var f in c)if(e<f&&c[f].input!==L(f))return!1;return!0}}}return!1}(b.begin)){var g=A().join("").indexOf(k.radixPoint);P(f,k.numericInput?I(g):g);break}default:var h=b.begin,i=r(h,!0),j=I(i);if(h<j)P(f,H(h,!0)||H(h-1,!0)?h:I(h));else{var l=p().validPositions[i],m=v(j,l?l.match.locator:d,l),n=L(j,m.match);if(""!==n&&A()[j]!==n&&!0!==m.match.optionalQuantifier&&!0!==m.match.newBlockMarker||!H(j,k.keepStatic)&&m.match.def===n){var o=I(j);(h>=o||h===j)&&(j=o)}P(f,j)}}}},0)},dblclickEvent:function(a){var b=this;setTimeout(function(){P(b,0,I(r()))},0)},cutEvent:function(d){a(this);var f=P(this),g=d.originalEvent||d,h=b.clipboardData||g.clipboardData,i=ba?A().slice(f.end,f.begin):A().slice(f.begin,f.end);h.setData("text",ba?i.reverse().join(""):i.join("")),c.execCommand&&c.execCommand("copy"),T(this,e.keyCode.DELETE,f),K(this,A(),p().p,d,W!==A().join(""))},blurEvent:function(b){var c=a(this);if(this.inputmask){var e=this.inputmask._valueGet(),f=A().slice();""===e&&Z===d||(k.clearMaskOnLostFocus&&(-1===r()&&e===z().join("")?f=[]:R(f)),!1===S(f)&&(setTimeout(function(){c.trigger("incomplete")},0),k.clearIncomplete&&(q(),f=k.clearMaskOnLostFocus?[]:z().slice())),K(this,f,d,b)),W!==A().join("")&&(W=f.join(""),c.trigger("change"))}},mouseenterEvent:function(a){fa=!0,c.activeElement!==this&&k.showMaskOnHover&&this.inputmask._valueGet()!==A().join("")&&K(this,A())},submitEvent:function(a){W!==A().join("")&&X.trigger("change"),k.clearMaskOnLostFocus&&-1===r()&&aa.inputmask._valueGet&&aa.inputmask._valueGet()===z().join("")&&aa.inputmask._valueSet(""),k.clearIncomplete&&!1===S(A())&&aa.inputmask._valueSet(""),k.removeMaskOnSubmit&&(aa.inputmask._valueSet(aa.inputmask.unmaskedvalue(),!0),setTimeout(function(){K(aa,A())},0))},resetEvent:function(a){aa.inputmask.refreshValue=!0,setTimeout(function(){X.trigger("setvalue")},0)}};if(e.prototype.positionColorMask=function(a,b){a.style.left=b.offsetLeft+"px"},f!==d)switch(f.action){case"isComplete":return aa=f.el,S(A());case"unmaskedvalue":return aa!==d&&f.value===d||($=f.value,$=(a.isFunction(k.onBeforeMask)&&k.onBeforeMask.call(_,$,k)||$).split(""),M.call(this,d,!1,!1,$),a.isFunction(k.onBeforeWrite)&&k.onBeforeWrite.call(_,d,A(),0,k)),N(aa);case"mask":!function(b){ga.off(b);var e=function(b,e){var f=b.getAttribute("type"),g="INPUT"===b.tagName&&-1!==a.inArray(f,e.supportsInputType)||b.isContentEditable||"TEXTAREA"===b.tagName;if(!g)if("INPUT"===b.tagName){var i=c.createElement("input");i.setAttribute("type",f),g="text"===i.type,i=null}else g="partial";return!1!==g?function(b){function f(){return this.inputmask?this.inputmask.opts.autoUnmask?this.inputmask.unmaskedvalue():-1!==r()||!0!==e.nullable?c.activeElement===this&&e.clearMaskOnLostFocus?(ba?R(A().slice()).reverse():R(A().slice())).join(""):i.call(this):"":i.call(this)}function g(b){j.call(this,b),this.inputmask&&a(this).trigger("setvalue",[b])}var i,j;if(!b.inputmask.__valueGet){if(!0!==e.noValuePatching){if(Object.getOwnPropertyDescriptor){"function"!=typeof Object.getPrototypeOf&&(Object.getPrototypeOf="object"===h("test".__proto__)?function(a){return a.__proto__}:function(a){return a.constructor.prototype});var k=Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(b),"value"):d;k&&k.get&&k.set?(i=k.get,j=k.set,Object.defineProperty(b,"value",{get:f,set:g,configurable:!0})):"INPUT"!==b.tagName&&(i=function(){return this.textContent},j=function(a){this.textContent=a},Object.defineProperty(b,"value",{get:f,set:g,configurable:!0}))}else c.__lookupGetter__&&b.__lookupGetter__("value")&&(i=b.__lookupGetter__("value"),j=b.__lookupSetter__("value"),b.__defineGetter__("value",f),b.__defineSetter__("value",g));b.inputmask.__valueGet=i,b.inputmask.__valueSet=j}b.inputmask._valueGet=function(a){return ba&&!0!==a?i.call(this.el).split("").reverse().join(""):i.call(this.el)},b.inputmask._valueSet=function(a,b){j.call(this.el,null===a||a===d?"":!0!==b&&ba?a.split("").reverse().join(""):a)},i===d&&(i=function(){return this.value},j=function(a){this.value=a},function(b){if(a.valHooks&&(a.valHooks[b]===d||!0!==a.valHooks[b].inputmaskpatch)){var c=a.valHooks[b]&&a.valHooks[b].get?a.valHooks[b].get:function(a){return a.value},f=a.valHooks[b]&&a.valHooks[b].set?a.valHooks[b].set:function(a,b){return a.value=b,a};a.valHooks[b]={get:function(a){if(a.inputmask){if(a.inputmask.opts.autoUnmask)return a.inputmask.unmaskedvalue();var b=c(a);return-1!==r(d,d,a.inputmask.maskset.validPositions)||!0!==e.nullable?b:""}return c(a)},set:function(b,c){var d,e=a(b);return d=f(b,c),b.inputmask&&e.trigger("setvalue",[c]),d},inputmaskpatch:!0}}}(b.type),function(b){ga.on(b,"mouseenter",function(b){var c=a(this);this.inputmask._valueGet()!==A().join("")&&c.trigger("setvalue")})}(b))}}(b):b.inputmask=d,g}(b,k);if(!1!==e&&(X=a(aa=b),-1===(Y=aa!==d?aa.maxLength:d)&&(Y=d),!0===k.colorMask&&U(aa),l&&("inputmode"in aa&&(aa.inputmode=k.inputmode,aa.setAttribute("inputmode",k.inputmode)),!0===k.disablePredictiveText&&("autocorrect"in aa?aa.autocorrect=!1:(!0!==k.colorMask&&U(aa),aa.type="password"))),!0===e&&(ga.on(aa,"submit",ha.submitEvent),ga.on(aa,"reset",ha.resetEvent),ga.on(aa,"blur",ha.blurEvent),ga.on(aa,"focus",ha.focusEvent),!0!==k.colorMask&&(ga.on(aa,"click",ha.clickEvent),ga.on(aa,"mouseleave",ha.mouseleaveEvent),ga.on(aa,"mouseenter",ha.mouseenterEvent)),ga.on(aa,"dblclick",ha.dblclickEvent),ga.on(aa,"paste",ha.pasteEvent),ga.on(aa,"dragdrop",ha.pasteEvent),ga.on(aa,"drop",ha.pasteEvent),ga.on(aa,"cut",ha.cutEvent),ga.on(aa,"complete",k.oncomplete),ga.on(aa,"incomplete",k.onincomplete),ga.on(aa,"cleared",k.oncleared),l||!0===k.inputEventOnly?aa.removeAttribute("maxLength"):(ga.on(aa,"keydown",ha.keydownEvent),ga.on(aa,"keypress",ha.keypressEvent)),ga.on(aa,"compositionstart",a.noop),ga.on(aa,"compositionupdate",a.noop),ga.on(aa,"compositionend",a.noop),ga.on(aa,"keyup",a.noop),ga.on(aa,"input",ha.inputFallBackEvent),ga.on(aa,"beforeinput",ha.beforeInputEvent)),ga.on(aa,"setvalue",ha.setValueEvent),W=z().join(""),""!==aa.inputmask._valueGet(!0)||!1===k.clearMaskOnLostFocus||c.activeElement===aa)){var f=a.isFunction(k.onBeforeMask)&&k.onBeforeMask.call(_,aa.inputmask._valueGet(!0),k)||aa.inputmask._valueGet(!0);""!==f&&M(aa,!0,!1,f.split(""));var g=A().slice();W=g.join(""),!1===S(g)&&k.clearIncomplete&&q(),k.clearMaskOnLostFocus&&c.activeElement!==aa&&(-1===r()?g=[]:R(g)),(!1===k.clearMaskOnLostFocus||k.showMaskOnFocus&&c.activeElement===aa||""!==aa.inputmask._valueGet(!0))&&K(aa,g),c.activeElement===aa&&P(aa,I(r()))}}(aa);break;case"format":return $=(a.isFunction(k.onBeforeMask)&&k.onBeforeMask.call(_,f.value,k)||f.value).split(""),M.call(this,d,!0,!1,$),f.metadata?{value:ba?A().slice().reverse().join(""):A().join(""),metadata:j.call(this,{action:"getmetadata"},g,k)}:ba?A().slice().reverse().join(""):A().join("");case"isValid":f.value?($=f.value.split(""),M.call(this,d,!0,!0,$)):f.value=A().join("");for(var ia=A(),ja=Q(),ka=ia.length-1;ka>ja&&!H(ka);ka--);return ia.splice(ja,ka+1-ja),S(ia)&&f.value===A().join("");case"getemptymask":return z().join("");case"remove":return aa&&aa.inputmask&&(a.data(aa,"_inputmask_opts",null),X=a(aa),aa.inputmask._valueSet(k.autoUnmask?N(aa):aa.inputmask._valueGet(!0)),ga.off(aa),aa.inputmask.colorMask&&((Z=aa.inputmask.colorMask).removeChild(aa),Z.parentNode.insertBefore(aa,Z),Z.parentNode.removeChild(Z)),Object.getOwnPropertyDescriptor&&Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(aa),"value")&&aa.inputmask.__valueGet&&Object.defineProperty(aa,"value",{get:aa.inputmask.__valueGet,set:aa.inputmask.__valueSet,configurable:!0}):c.__lookupGetter__&&aa.__lookupGetter__("value")&&aa.inputmask.__valueGet&&(aa.__defineGetter__("value",aa.inputmask.__valueGet),aa.__defineSetter__("value",aa.inputmask.__valueSet)),aa.inputmask=d),aa;case"getmetadata":if(a.isArray(g.metadata)){var la=o(!0,0,!1).join("");return a.each(g.metadata,function(a,b){if(b.mask===la)return la=b,!1}),la}return g.metadata}}var k=navigator.userAgent,l=i("touchstart"),m=/iemobile/i.test(k),n=/iphone/i.test(k)&&!m;return e.prototype={dataAttribute:"data-inputmask",defaults:{placeholder:"_",optionalmarker:["[","]"],quantifiermarker:["{","}"],groupmarker:["(",")"],alternatormarker:"|",escapeChar:"\\",mask:null,regex:null,oncomplete:a.noop,onincomplete:a.noop,oncleared:a.noop,repeat:0,greedy:!1,autoUnmask:!1,removeMaskOnSubmit:!1,clearMaskOnLostFocus:!0,insertMode:!0,clearIncomplete:!1,alias:null,onKeyDown:a.noop,onBeforeMask:null,onBeforePaste:function(b,c){return a.isFunction(c.onBeforeMask)?c.onBeforeMask.call(this,b,c):b},onBeforeWrite:null,onUnMask:null,showMaskOnFocus:!0,showMaskOnHover:!0,onKeyValidation:a.noop,skipOptionalPartCharacter:" ",numericInput:!1,rightAlign:!1,undoOnEscape:!0,radixPoint:"",_radixDance:!1,groupSeparator:"",keepStatic:null,positionCaretOnTab:!0,tabThrough:!1,supportsInputType:["text","tel","password","search"],ignorables:[8,9,13,19,27,33,34,35,36,37,38,39,40,45,46,93,112,113,114,115,116,117,118,119,120,121,122,123,0,229],isComplete:null,preValidation:null,postValidation:null,staticDefinitionSymbol:d,jitMasking:!1,nullable:!0,inputEventOnly:!1,noValuePatching:!1,positionCaretOnClick:"lvp",casing:null,inputmode:"verbatim",colorMask:!1,disablePredictiveText:!1,importDataAttributes:!0},definitions:{9:{validator:"[0-91-9]",definitionSymbol:"*"},a:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",definitionSymbol:"*"},"*":{validator:"[0-91-9A-Za-zА-яЁёÀ-ÿµ]"}},aliases:{},masksCache:{},mask:function(h){var i=this
|
3 |
+
;return"string"==typeof h&&(h=c.getElementById(h)||c.querySelectorAll(h)),h=h.nodeName?[h]:h,a.each(h,function(c,h){var k=a.extend(!0,{},i.opts);if(function(c,e,g,h){if(!0===e.importDataAttributes){var i,j,k,l,m=function(a,e){null!==(e=e!==d?e:c.getAttribute(h+"-"+a))&&("string"==typeof e&&(0===a.indexOf("on")?e=b[e]:"false"===e?e=!1:"true"===e&&(e=!0)),g[a]=e)},n=c.getAttribute(h);if(n&&""!==n&&(n=n.replace(/'/g,'"'),j=JSON.parse("{"+n+"}")),j)for(l in k=d,j)if("alias"===l.toLowerCase()){k=j[l];break}for(i in m("alias",k),g.alias&&f(g.alias,g,e),e){if(j)for(l in k=d,j)if(l.toLowerCase()===i.toLowerCase()){k=j[l];break}m(i,k)}}return a.extend(!0,e,g),("rtl"===c.dir||e.rightAlign)&&(c.style.textAlign="right"),("rtl"===c.dir||e.numericInput)&&(c.dir="ltr",c.removeAttribute("dir"),e.isRTL=!0),Object.keys(g).length}(h,k,a.extend(!0,{},i.userOptions),i.dataAttribute)){var l=g(k,i.noMasksCache);l!==d&&(h.inputmask!==d&&(h.inputmask.opts.autoUnmask=!0,h.inputmask.remove()),h.inputmask=new e(d,d,!0),h.inputmask.opts=k,h.inputmask.noMasksCache=i.noMasksCache,h.inputmask.userOptions=a.extend(!0,{},i.userOptions),h.inputmask.isRTL=k.isRTL||k.numericInput,h.inputmask.el=h,h.inputmask.maskset=l,a.data(h,"_inputmask_opts",k),j.call(h.inputmask,{action:"mask"}))}}),h&&h[0]&&h[0].inputmask||this},option:function(b,c){return"string"==typeof b?this.opts[b]:"object"===(void 0===b?"undefined":h(b))?(a.extend(this.userOptions,b),this.el&&!0!==c&&this.mask(this.el),this):void 0},unmaskedvalue:function(a){return this.maskset=this.maskset||g(this.opts,this.noMasksCache),j.call(this,{action:"unmaskedvalue",value:a})},remove:function(){return j.call(this,{action:"remove"})},getemptymask:function(){return this.maskset=this.maskset||g(this.opts,this.noMasksCache),j.call(this,{action:"getemptymask"})},hasMaskedValue:function(){return!this.opts.autoUnmask},isComplete:function(){return this.maskset=this.maskset||g(this.opts,this.noMasksCache),j.call(this,{action:"isComplete"})},getmetadata:function(){return this.maskset=this.maskset||g(this.opts,this.noMasksCache),j.call(this,{action:"getmetadata"})},isValid:function(a){return this.maskset=this.maskset||g(this.opts,this.noMasksCache),j.call(this,{action:"isValid",value:a})},format:function(a,b){return this.maskset=this.maskset||g(this.opts,this.noMasksCache),j.call(this,{action:"format",value:a,metadata:b})},setValue:function(b){this.el&&a(this.el).trigger("setvalue",[b])},analyseMask:function(b,c,f){function g(a,b,c,d){this.matches=[],this.openGroup=a||!1,this.alternatorGroup=!1,this.isGroup=a||!1,this.isOptional=b||!1,this.isQuantifier=c||!1,this.isAlternator=d||!1,this.quantifier={min:1,max:1}}function h(b,g,h){h=h!==d?h:b.matches.length;var i=b.matches[h-1];if(c)0===g.indexOf("[")||s&&/\\d|\\s|\\w]/i.test(g)||"."===g?b.matches.splice(h++,0,{fn:new RegExp(g,f.casing?"i":""),optionality:!1,newBlockMarker:i===d?"master":i.def!==g,casing:null,def:g,placeholder:d,nativeDef:g}):(s&&(g=g[g.length-1]),a.each(g.split(""),function(a,c){i=b.matches[h-1],b.matches.splice(h++,0,{fn:null,optionality:!1,newBlockMarker:i===d?"master":i.def!==c&&null!==i.fn,casing:null,def:f.staticDefinitionSymbol||c,placeholder:f.staticDefinitionSymbol!==d?c:d,nativeDef:(s?"'":"")+c})})),s=!1;else{var j=(f.definitions?f.definitions[g]:d)||e.prototype.definitions[g];j&&!s?b.matches.splice(h++,0,{fn:j.validator?"string"==typeof j.validator?new RegExp(j.validator,f.casing?"i":""):new function(){this.test=j.validator}:new RegExp("."),optionality:!1,newBlockMarker:i===d?"master":i.def!==(j.definitionSymbol||g),casing:j.casing,def:j.definitionSymbol||g,placeholder:j.placeholder,nativeDef:g}):(b.matches.splice(h++,0,{fn:null,optionality:!1,newBlockMarker:i===d?"master":i.def!==g&&null!==i.fn,casing:null,def:f.staticDefinitionSymbol||g,placeholder:f.staticDefinitionSymbol!==d?g:d,nativeDef:(s?"'":"")+g}),s=!1)}}function i(){if(u.length>0){if(h(n=u[u.length-1],l),n.isAlternator){o=u.pop();for(var a=0;a<o.matches.length;a++)o.matches[a].isGroup&&(o.matches[a].isGroup=!1);u.length>0?(n=u[u.length-1]).matches.push(o):t.matches.push(o)}}else h(t,l)}function j(a){var b=new g(!0);return b.openGroup=!1,b.matches=a,b}var k,l,m,n,o,p,q=/(?:[?*+]|\{[0-9\+\*]+(?:,[0-9\+\*]*)?(?:\|[0-9\+\*]*)?\})|[^.?*+^${[]()|\\]+|./g,r=/\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g,s=!1,t=new g,u=[],v=[];for(c&&(f.optionalmarker[0]=d,f.optionalmarker[1]=d);k=c?r.exec(b):q.exec(b);){if(l=k[0],c)switch(l.charAt(0)){case"?":l="{0,1}";break;case"+":case"*":l="{"+l+"}"}if(s)i();else switch(l.charAt(0)){case"(?=":case"(?!":case"(?<=":case"(?<!":break;case f.escapeChar:s=!0,c&&i();break;case f.optionalmarker[1]:case f.groupmarker[1]:if((m=u.pop()).openGroup=!1,m!==d)if(u.length>0){if((n=u[u.length-1]).matches.push(m),n.isAlternator){o=u.pop();for(var w=0;w<o.matches.length;w++)o.matches[w].isGroup=!1,o.matches[w].alternatorGroup=!1;u.length>0?(n=u[u.length-1]).matches.push(o):t.matches.push(o)}}else t.matches.push(m);else i();break;case f.optionalmarker[0]:u.push(new g(!1,!0));break;case f.groupmarker[0]:u.push(new g(!0));break;case f.quantifiermarker[0]:var x=new g(!1,!1,!0),y=(l=l.replace(/[{}]/g,"")).split("|"),z=y[0].split(","),A=isNaN(z[0])?z[0]:parseInt(z[0]),B=1===z.length?A:isNaN(z[1])?z[1]:parseInt(z[1]);"*"!==A&&"+"!==A||(A="*"===B?0:1),x.quantifier={min:A,max:B,jit:y[1]};var C=u.length>0?u[u.length-1].matches:t.matches;if((k=C.pop()).isAlternator){C.push(k),C=k.matches;var D=new g(!0),E=C.pop();C.push(D),C=D.matches,k=E}k.isGroup||(k=j([k])),C.push(k),C.push(x);break;case f.alternatormarker:var F=function(a){var b=a.pop();return b.isQuantifier&&(b=j([a.pop(),b])),b};if(u.length>0){var G=(n=u[u.length-1]).matches[n.matches.length-1];p=n.openGroup&&(G.matches===d||!1===G.isGroup&&!1===G.isAlternator)?u.pop():F(n.matches)}else p=F(t.matches);if(p.isAlternator)u.push(p);else if(p.alternatorGroup?(o=u.pop(),p.alternatorGroup=!1):o=new g(!1,!1,!1,!0),o.matches.push(p),u.push(o),p.openGroup){p.openGroup=!1;var H=new g(!0);H.alternatorGroup=!0,u.push(H)}break;default:i()}}for(;u.length>0;)m=u.pop(),t.matches.push(m);return t.matches.length>0&&(function b(e){e&&e.matches&&a.each(e.matches,function(a,g){var i=e.matches[a+1];(i===d||i.matches===d||!1===i.isQuantifier)&&g&&g.isGroup&&(g.isGroup=!1,c||(h(g,f.groupmarker[0],0),!0!==g.openGroup&&h(g,f.groupmarker[1]))),b(g)})}(t),v.push(t)),(f.numericInput||f.isRTL)&&function a(b){for(var c in b.matches=b.matches.reverse(),b.matches)if(b.matches.hasOwnProperty(c)){var e=parseInt(c);if(b.matches[c].isQuantifier&&b.matches[e+1]&&b.matches[e+1].isGroup){var g=b.matches[c];b.matches.splice(c,1),b.matches.splice(e+1,0,g)}b.matches[c].matches!==d?b.matches[c]=a(b.matches[c]):b.matches[c]=((h=b.matches[c])===f.optionalmarker[0]?h=f.optionalmarker[1]:h===f.optionalmarker[1]?h=f.optionalmarker[0]:h===f.groupmarker[0]?h=f.groupmarker[1]:h===f.groupmarker[1]&&(h=f.groupmarker[0]),h)}var h;return b}(v[0]),v}},e.extendDefaults=function(b){a.extend(!0,e.prototype.defaults,b)},e.extendDefinitions=function(b){a.extend(!0,e.prototype.definitions,b)},e.extendAliases=function(b){a.extend(!0,e.prototype.aliases,b)},e.format=function(a,b,c){return e(b).format(a,c)},e.unmask=function(a,b){return e(b).unmaskedvalue(a)},e.isValid=function(a,b){return e(b).isValid(a)},e.remove=function(b){"string"==typeof b&&(b=c.getElementById(b)||c.querySelectorAll(b)),b=b.nodeName?[b]:b,a.each(b,function(a,b){b.inputmask&&b.inputmask.remove()})},e.setValue=function(b,d){"string"==typeof b&&(b=c.getElementById(b)||c.querySelectorAll(b)),b=b.nodeName?[b]:b,a.each(b,function(b,c){c.inputmask?c.inputmask.setValue(d):a(c).trigger("setvalue",[d])})},e.escapeRegex=function(a){return a.replace(new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^"].join("|\\")+")","gim"),"\\$1")},e.keyCode={BACKSPACE:8,BACKSPACE_SAFARI:127,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,RIGHT:39,SPACE:32,TAB:9,UP:38,X:88,CONTROL:17},e},e=[c(0),c(5),c(6)],void 0===(f="function"==typeof(d=g)?d.apply(b,e):d)||(a.exports=f)},function(a,b){a.exports=jQuery},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}c(4),c(7),c(8),c(9);var e=d(c(1)),f=d(c(0)),g=d(c(2));f.default===g.default&&c(10),window.Inputmask=e.default},function(a,b,c){"use strict";var d,e,f,g;"function"==typeof Symbol&&Symbol.iterator,g=function(a,b){function c(a){if(!a.tokenizer){var b=[];for(var c in g)-1===b.indexOf(c[0])&&b.push(c[0]);a.tokenizer="("+b.join("+|")+")+?|.",a.tokenizer=new RegExp(a.tokenizer,"g")}return a.tokenizer}function d(a,d,e){for(var f,h="";f=c(e).exec(a);)if(void 0===d)if(g[f[0]])h+="("+g[f[0]][0]+")";else switch(f[0]){case"[":h+="(";break;case"]":h+=")?";break;default:h+=b.escapeRegex(f[0])}else g[f[0]]?h+=g[f[0]][3].call(d.date):h+=f[0];return h}function e(a,b){for(a=String(a),b=b||2;a.length<b;)a="0"+a;return a}function f(a,b,d){function e(a){var b=4===a.length?a:(new Date).getFullYear().toString().substr(0,4-a.length)+a;return d.min&&d.min.year&&d.max&&d.max.year?(b=b.replace(/[^0-9]/g,""),b+=d.min.year==d.max.year?d.min.year.substr(b.length):(""!==b&&0==d.max.year.indexOf(b)?parseInt(d.max.year)-1:parseInt(d.min.year)+1).toString().substr(b.length)):b=b.replace(/[^0-9]/g,"0"),b}var f,h,i,j={date:new Date(1,0,1)},k=a;if("string"==typeof k){for(;h=c(d).exec(b);){var l=k.slice(0,h[0].length);g.hasOwnProperty(h[0])&&(f=g[h[0]][2],i=g[h[0]][1],function(a,b,c){"year"===f?(a[f]=e(b),a["raw"+f]=b):a[f]=c.min&&b.match(/[^0-9]/)?c.min[f]:b,void 0!==i&&i.call(a.date,"month"==f?parseInt(a[f])-1:a[f])}(j,l,d)),k=k.slice(l.length)}return j}}var g={d:["[1-9]|[12][0-9]|3[01]",Date.prototype.setDate,"day",Date.prototype.getDate],dd:["0[1-9]|[12][0-9]|3[01]",Date.prototype.setDate,"day",function(){return e(Date.prototype.getDate.call(this),2)}],ddd:[""],dddd:[""],m:["[1-9]|1[012]",Date.prototype.setMonth,"month",function(){return Date.prototype.getMonth.call(this)+1}],mm:["0[1-9]|1[012]",Date.prototype.setMonth,"month",function(){return e(Date.prototype.getMonth.call(this)+1,2)}],mmm:[""],mmmm:[""],yy:["[0-9]{2}",Date.prototype.setFullYear,"year",function(){return e(Date.prototype.getFullYear.call(this),2)}],yyyy:["[0-9]{4}",Date.prototype.setFullYear,"year",function(){return e(Date.prototype.getFullYear.call(this),4)}],h:["[1-9]|1[0-2]",Date.prototype.setHours,"hours",Date.prototype.getHours],hh:["0[1-9]|1[0-2]",Date.prototype.setHours,"hours",function(){return e(Date.prototype.getHours.call(this),2)}],hhh:["[0-9]+",Date.prototype.setHours,"hours",Date.prototype.getHours],H:["1?[0-9]|2[0-3]",Date.prototype.setHours,"hours",Date.prototype.getHours],HH:["[01][0-9]|2[0-3]",Date.prototype.setHours,"hours",function(){return e(Date.prototype.getHours.call(this),2)}],HHH:["[0-9]+",Date.prototype.setHours,"hours",Date.prototype.getHours],M:["[1-5]?[0-9]",Date.prototype.setMinutes,"minutes",Date.prototype.getMinutes],MM:["[0-5][0-9]",Date.prototype.setMinutes,"minutes",function(){return e(Date.prototype.getMinutes.call(this),2)}],s:["[1-5]?[0-9]",Date.prototype.setSeconds,"seconds",Date.prototype.getSeconds],ss:["[0-5][0-9]",Date.prototype.setSeconds,"seconds",function(){return e(Date.prototype.getSeconds.call(this),2)}],l:["[0-9]{3}",Date.prototype.setMilliseconds,"milliseconds",function(){return e(Date.prototype.getMilliseconds.call(this),3)}],L:["[0-9]{2}",Date.prototype.setMilliseconds,"milliseconds",function(){return e(Date.prototype.getMilliseconds.call(this),2)}],t:["[ap]"],tt:["[ap]m"],T:["[AP]"],TT:["[AP]M"],Z:[""],o:[""],S:[""]},h={isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"};return b.extendAliases({datetime:{mask:function(a){return g.S=a.i18n.ordinalSuffix.join("|"),a.inputFormat=h[a.inputFormat]||a.inputFormat,a.displayFormat=h[a.displayFormat]||a.displayFormat||a.inputFormat,a.outputFormat=h[a.outputFormat]||a.outputFormat||a.inputFormat,a.placeholder=""!==a.placeholder?a.placeholder:a.inputFormat.replace(/[\[\]]/,""),a.min=f(a.min,a.inputFormat,a),a.max=f(a.max,a.inputFormat,a),a.regex=d(a.inputFormat,void 0,a),null},placeholder:"",inputFormat:"isoDateTime",displayFormat:void 0,outputFormat:void 0,min:null,max:null,i18n:{dayNames:["Mon","Tue","Wed","Thu","Fri","Sat","Sun","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],ordinalSuffix:["st","nd","rd","th"]},postValidation:function(a,b,c){var d=b,e=f(a.join(""),c.inputFormat,c);return d&&e.date.getTime()==e.date.getTime()&&(d=(d=function(a,b){return(!isFinite(a.day)||"29"==a.day&&!isFinite(a.rawyear)||new Date(a.date.getFullYear(),isFinite(a.month)?a.month:a.date.getMonth()+1,0).getDate()>=a.day)&&b}(e,d))&&function(a,b){var c=!0;return b.min&&b.min.date.getTime()==b.min.date.getTime()&&(c=b.min.date.getTime()<=a.date.getTime()),c&&b.max&&b.max.date.getTime()==b.max.date.getTime()&&(c=b.max.date.getTime()>=a.date.getTime()),c}(e,c)),d},onKeyDown:function(d,f,g,h){if(d.ctrlKey&&d.keyCode===b.keyCode.RIGHT){for(var i,j=new Date,k="";i=c(h).exec(h.inputFormat);)"d"===i[0].charAt(0)?k+=e(j.getDate(),i[0].length):"m"===i[0].charAt(0)?k+=e(j.getMonth()+1,i[0].length):"yyyy"===i[0]?k+=j.getFullYear().toString():"y"===i[0].charAt(0)&&(k+=e(j.getYear(),i[0].length));this.inputmask._valueSet(k),a(this).trigger("setvalue")}},onUnMask:function(a,b,c){return d(c.outputFormat,f(a,c.inputFormat,c),c)},casing:function(a,b,c,d){return 0==b.nativeDef.indexOf("[ap]")?a.toLowerCase():0==b.nativeDef.indexOf("[AP]")?a.toUpperCase():a},insertMode:!1}}),b},e=[c(0),c(1)],void 0===(f="function"==typeof(d=g)?d.apply(b,e):d)||(a.exports=f)},function(a,b,c){"use strict";var d;"function"==typeof Symbol&&Symbol.iterator,void 0===(d=function(){return window}.call(b,c,b,a))||(a.exports=d)},function(a,b,c){"use strict";var d;"function"==typeof Symbol&&Symbol.iterator,void 0===(d=function(){return document}.call(b,c,b,a))||(a.exports=d)},function(a,b,c){"use strict";var d,e,f,g;"function"==typeof Symbol&&Symbol.iterator,g=function(a,b){return b.extendDefinitions({A:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",casing:"upper"},"&":{validator:"[0-9A-Za-zА-яЁёÀ-ÿµ]",casing:"upper"},"#":{validator:"[0-9A-Fa-f]",casing:"upper"}}),b.extendAliases({cssunit:{regex:"[+-]?[0-9]+\\.?([0-9]+)?(px|em|rem|ex|%|in|cm|mm|pt|pc)"},url:{regex:"(https?|ftp)//.*",autoUnmask:!1},ip:{mask:"i[i[i]].i[i[i]].i[i[i]].i[i[i]]",definitions:{i:{validator:function(a,b,c,d,e){return c-1>-1&&"."!==b.buffer[c-1]?(a=b.buffer[c-1]+a,a=c-2>-1&&"."!==b.buffer[c-2]?b.buffer[c-2]+a:"0"+a):a="00"+a,new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]").test(a)}}},onUnMask:function(a,b,c){return a},inputmode:"numeric"},email:{mask:"*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]",greedy:!1,casing:"lower",onBeforePaste:function(a,b){return(a=a.toLowerCase()).replace("mailto:","")},definitions:{"*":{validator:"[0-91-9A-Za-zА-яЁёÀ-ÿµ!#$%&'*+/=?^_`{|}~-]"},"-":{validator:"[0-9A-Za-z-]"}},onUnMask:function(a,b,c){return a},inputmode:"email"},mac:{mask:"##:##:##:##:##:##"},vin:{mask:"V{13}9{4}",definitions:{V:{validator:"[A-HJ-NPR-Za-hj-npr-z\\d]",casing:"upper"}},clearIncomplete:!0,autoUnmask:!0}}),b},e=[c(0),c(1)],void 0===(f="function"==typeof(d=g)?d.apply(b,e):d)||(a.exports=f)},function(a,b,c){"use strict";var d,e,f,g;"function"==typeof Symbol&&Symbol.iterator,g=function(a,b,c){function d(a,c){for(var d="",e=0;e<a.length;e++)b.prototype.definitions[a.charAt(e)]||c.definitions[a.charAt(e)]||c.optionalmarker.start===a.charAt(e)||c.optionalmarker.end===a.charAt(e)||c.quantifiermarker.start===a.charAt(e)||c.quantifiermarker.end===a.charAt(e)||c.groupmarker.start===a.charAt(e)||c.groupmarker.end===a.charAt(e)||c.alternatormarker===a.charAt(e)?d+="\\"+a.charAt(e):d+=a.charAt(e);return d}return b.extendAliases({numeric:{mask:function(a){if(0!==a.repeat&&isNaN(a.integerDigits)&&(a.integerDigits=a.repeat),a.repeat=0,a.groupSeparator===a.radixPoint&&a.digits&&"0"!==a.digits&&("."===a.radixPoint?a.groupSeparator=",":","===a.radixPoint?a.groupSeparator=".":a.groupSeparator="")," "===a.groupSeparator&&(a.skipOptionalPartCharacter=c),a.autoGroup=a.autoGroup&&""!==a.groupSeparator,a.autoGroup&&("string"==typeof a.groupSize&&isFinite(a.groupSize)&&(a.groupSize=parseInt(a.groupSize)),isFinite(a.integerDigits))){var b=Math.floor(a.integerDigits/a.groupSize),e=a.integerDigits%a.groupSize;a.integerDigits=parseInt(a.integerDigits)+(0===e?b-1:b),a.integerDigits<1&&(a.integerDigits="*")}a.placeholder.length>1&&(a.placeholder=a.placeholder.charAt(0)),"radixFocus"===a.positionCaretOnClick&&""===a.placeholder&&!1===a.integerOptional&&(a.positionCaretOnClick="lvp"),a.definitions[";"]=a.definitions["~"],a.definitions[";"].definitionSymbol="~",!0===a.numericInput&&(a.positionCaretOnClick="radixFocus"===a.positionCaretOnClick?"lvp":a.positionCaretOnClick,a.digitsOptional=!1,isNaN(a.digits)&&(a.digits=2),a.decimalProtect=!1);var f="[+]";if(f+=d(a.prefix,a),!0===a.integerOptional?f+="~{1,"+a.integerDigits+"}":f+="~{"+a.integerDigits+"}",a.digits!==c){var g=a.decimalProtect?":":a.radixPoint,h=a.digits.toString().split(",");isFinite(h[0])&&h[1]&&isFinite(h[1])?f+=g+";{"+a.digits+"}":(isNaN(a.digits)||parseInt(a.digits)>0)&&(a.digitsOptional?f+="["+g+";{1,"+a.digits+"}]":f+=g+";{"+a.digits+"}")}return f+=d(a.suffix,a),f+="[-]",a.greedy=!1,f},placeholder:"",greedy:!1,digits:"*",digitsOptional:!0,enforceDigitsOnBlur:!1,radixPoint:".",positionCaretOnClick:"radixFocus",groupSize:3,groupSeparator:"",autoGroup:!1,allowMinus:!0,negationSymbol:{front:"-",back:""},integerDigits:"+",integerOptional:!0,prefix:"",suffix:"",rightAlign:!0,decimalProtect:!0,min:null,max:null,step:1,insertMode:!0,autoUnmask:!1,unmaskAsNumber:!1,inputmode:"numeric",preValidation:function(b,d,e,f,g,h){if("-"===e||e===g.negationSymbol.front)return!0===g.allowMinus&&(g.isNegative=g.isNegative===c||!g.isNegative,""===b.join("")||{caret:d,dopost:!0});if(!1===f&&e===g.radixPoint&&g.digits!==c&&(isNaN(g.digits)||parseInt(g.digits)>0)){var i=a.inArray(g.radixPoint,b);if(-1!==i&&h.validPositions[i]!==c)return!0===g.numericInput?d===i:{caret:i+1}}return!0},postValidation:function(d,e,f){var g=f.suffix.split(""),h=f.prefix.split("");if(e.pos===c&&e.caret!==c&&!0!==e.dopost)return e;var i=e.caret!==c?e.caret:e.pos,j=d.slice();f.numericInput&&(i=j.length-i-1,j=j.reverse());var k=j[i];if(k===f.groupSeparator&&(k=j[i+=1]),i===j.length-f.suffix.length-1&&k===f.radixPoint)return e;k!==c&&k!==f.radixPoint&&k!==f.negationSymbol.front&&k!==f.negationSymbol.back&&(j[i]="?",f.prefix.length>0&&i>=(!1===f.isNegative?1:0)&&i<f.prefix.length-1+(!1===f.isNegative?1:0)?h[i-(!1===f.isNegative?1:0)]="?":f.suffix.length>0&&i>=j.length-f.suffix.length-(!1===f.isNegative?1:0)&&(g[i-(j.length-f.suffix.length-(!1===f.isNegative?1:0))]="?")),h=h.join(""),g=g.join("");var l=j.join("").replace(h,"");if(l=(l=(l=(l=l.replace(g,"")).replace(new RegExp(b.escapeRegex(f.groupSeparator),"g"),"")).replace(new RegExp("[-"+b.escapeRegex(f.negationSymbol.front)+"]","g"),"")).replace(new RegExp(b.escapeRegex(f.negationSymbol.back)+"$"),""),isNaN(f.placeholder)&&(l=l.replace(new RegExp(b.escapeRegex(f.placeholder),"g"),"")),l.length>1&&1!==l.indexOf(f.radixPoint)&&("0"===k&&(l=l.replace(/^\?/g,"")),l=l.replace(/^0/g,"")),l.charAt(0)===f.radixPoint&&""!==f.radixPoint&&!0!==f.numericInput&&(l="0"+l),""!==l){if(l=l.split(""),(!f.digitsOptional||f.enforceDigitsOnBlur&&"blur"===e.event)&&isFinite(f.digits)){var m=a.inArray(f.radixPoint,l),n=a.inArray(f.radixPoint,j);-1===m&&(l.push(f.radixPoint),m=l.length-1);for(var o=1;o<=f.digits;o++)f.digitsOptional&&(!f.enforceDigitsOnBlur||"blur"!==e.event)||l[m+o]!==c&&l[m+o]!==f.placeholder.charAt(0)?-1!==n&&j[n+o]!==c&&(l[m+o]=l[m+o]||j[n+o]):l[m+o]=e.placeholder||f.placeholder.charAt(0)}if(!0!==f.autoGroup||""===f.groupSeparator||k===f.radixPoint&&e.pos===c&&!e.dopost)l=l.join("");else{var p=l[l.length-1]===f.radixPoint&&e.c===f.radixPoint;l=b(function(a,b){var c="";if(c+="("+b.groupSeparator+"*{"+b.groupSize+"}){*}",""!==b.radixPoint){var d=a.join("").split(b.radixPoint);d[1]&&(c+=b.radixPoint+"*{"+d[1].match(/^\d*\??\d*/)[0].length+"}")}return c}(l,f),{numericInput:!0,jitMasking:!0,definitions:{"*":{validator:"[0-9?]",cardinality:1}}}).format(l.join("")),p&&(l+=f.radixPoint),l.charAt(0)===f.groupSeparator&&l.substr(1)}}if(f.isNegative&&"blur"===e.event&&(f.isNegative="0"!==l),l=h+l,l+=g,f.isNegative&&(l=f.negationSymbol.front+l,l+=f.negationSymbol.back),l=l.split(""),k!==c)if(k!==f.radixPoint&&k!==f.negationSymbol.front&&k!==f.negationSymbol.back)(i=a.inArray("?",l))>-1?l[i]=k:i=e.caret||0;else if(k===f.radixPoint||k===f.negationSymbol.front||k===f.negationSymbol.back){var q=a.inArray(k,l);-1!==q&&(i=q)}f.numericInput&&(i=l.length-i-1,l=l.reverse());var r={caret:k===c||e.pos!==c?i+(f.numericInput?-1:1):i,buffer:l,refreshFromBuffer:e.dopost||d.join("")!==l.join("")};return r.refreshFromBuffer?r:e},onBeforeWrite:function(d,e,f,g){if(d)switch(d.type){case"keydown":return g.postValidation(e,{caret:f,dopost:!0},g);case"blur":case"checkval":var h;if(function(a){a.parseMinMaxOptions===c&&(null!==a.min&&(a.min=a.min.toString().replace(new RegExp(b.escapeRegex(a.groupSeparator),"g"),""),","===a.radixPoint&&(a.min=a.min.replace(a.radixPoint,".")),a.min=isFinite(a.min)?parseFloat(a.min):NaN,isNaN(a.min)&&(a.min=Number.MIN_VALUE)),null!==a.max&&(a.max=a.max.toString().replace(new RegExp(b.escapeRegex(a.groupSeparator),"g"),""),","===a.radixPoint&&(a.max=a.max.replace(a.radixPoint,".")),a.max=isFinite(a.max)?parseFloat(a.max):NaN,isNaN(a.max)&&(a.max=Number.MAX_VALUE)),a.parseMinMaxOptions="done")}(g),null!==g.min||null!==g.max){if(h=g.onUnMask(e.join(""),c,a.extend({},g,{unmaskAsNumber:!0})),null!==g.min&&h<g.min)return g.isNegative=g.min<0,g.postValidation(g.min.toString().replace(".",g.radixPoint).split(""),{caret:f,dopost:!0,placeholder:"0"},g);if(null!==g.max&&h>g.max)return g.isNegative=g.max<0,g.postValidation(g.max.toString().replace(".",g.radixPoint).split(""),{caret:f,dopost:!0,placeholder:"0"},g)}return g.postValidation(e,{caret:f,placeholder:"0",event:"blur"},g);case"_checkval":return{caret:f}}},regex:{integerPart:function(a,c){return c?new RegExp("["+b.escapeRegex(a.negationSymbol.front)+"+]?"):new RegExp("["+b.escapeRegex(a.negationSymbol.front)+"+]?\\d+")},integerNPart:function(a){return new RegExp("[\\d"+b.escapeRegex(a.groupSeparator)+b.escapeRegex(a.placeholder.charAt(0))+"]+")}},definitions:{"~":{validator:function(a,d,e,f,g,h){var i;if("k"===a||"m"===a){i={insert:[],c:0};for(var j=0,k="k"===a?2:5;j<k;j++)i.insert.push({pos:e+j,c:0});return i.pos=e+k,i}if(!0===(i=f?new RegExp("[0-9"+b.escapeRegex(g.groupSeparator)+"]").test(a):new RegExp("[0-9]").test(a))){if(!0!==g.numericInput&&d.validPositions[e]!==c&&"~"===d.validPositions[e].match.def&&!h){var l=d.buffer.join(""),m=(l=(l=l.replace(new RegExp("[-"+b.escapeRegex(g.negationSymbol.front)+"]","g"),"")).replace(new RegExp(b.escapeRegex(g.negationSymbol.back)+"$"),"")).split(g.radixPoint);m.length>1&&(m[1]=m[1].replace(/0/g,g.placeholder.charAt(0))),"0"===m[0]&&(m[0]=m[0].replace(/0/g,g.placeholder.charAt(0))),l=m[0]+g.radixPoint+m[1]||"";var n=d._buffer.join("");for(l===g.radixPoint&&(l=n);null===l.match(b.escapeRegex(n)+"$");)n=n.slice(1);i=(l=(l=l.replace(n,"")).split(""))[e]===c?{pos:e,remove:e}:{pos:e}}}else f||a!==g.radixPoint||d.validPositions[e-1]!==c||(i={insert:{pos:e,c:0},pos:e+1});return i},cardinality:1},"+":{validator:function(a,b,c,d,e){return e.allowMinus&&("-"===a||a===e.negationSymbol.front)},cardinality:1,placeholder:""},"-":{validator:function(a,b,c,d,e){return e.allowMinus&&a===e.negationSymbol.back},cardinality:1,placeholder:""},":":{validator:function(a,c,d,e,f){var g="["+b.escapeRegex(f.radixPoint)+"]",h=new RegExp(g).test(a);return h&&c.validPositions[d]&&c.validPositions[d].match.placeholder===f.radixPoint&&(h={caret:d+1}),h},cardinality:1,placeholder:function(a){return a.radixPoint}}},onUnMask:function(a,c,d){if(""===c&&!0===d.nullable)return c;var e=a.replace(d.prefix,"");return e=(e=e.replace(d.suffix,"")).replace(new RegExp(b.escapeRegex(d.groupSeparator),"g"),""),""!==d.placeholder.charAt(0)&&(e=e.replace(new RegExp(d.placeholder.charAt(0),"g"),"0")),d.unmaskAsNumber?(""!==d.radixPoint&&-1!==e.indexOf(d.radixPoint)&&(e=e.replace(b.escapeRegex.call(this,d.radixPoint),".")),e=(e=e.replace(new RegExp("^"+b.escapeRegex(d.negationSymbol.front)),"-")).replace(new RegExp(b.escapeRegex(d.negationSymbol.back)+"$"),""),Number(e)):e},isComplete:function(a,c){var d=(c.numericInput?a.slice().reverse():a).join("");return d=(d=(d=(d=(d=d.replace(new RegExp("^"+b.escapeRegex(c.negationSymbol.front)),"-")).replace(new RegExp(b.escapeRegex(c.negationSymbol.back)+"$"),"")).replace(c.prefix,"")).replace(c.suffix,"")).replace(new RegExp(b.escapeRegex(c.groupSeparator)+"([0-9]{3})","g"),"$1"),","===c.radixPoint&&(d=d.replace(b.escapeRegex(c.radixPoint),".")),isFinite(d)},onBeforeMask:function(d,e){if(e.isNegative=c,"number"==typeof d&&""!==e.radixPoint&&(d=d.toString().replace(".",e.radixPoint)),d=d.toString().charAt(d.length-1)===e.radixPoint?d.toString().substr(0,d.length-1):d.toString(),""!==e.radixPoint&&isFinite(d)){var f=d.split("."),g=""!==e.groupSeparator?parseInt(e.groupSize):0;2===f.length&&(f[0].length>g||f[1].length>g||f[0].length<=g&&f[1].length<g)&&(d=d.replace(".",e.radixPoint))}var h=d.match(/,/g),i=d.match(/\./g);if(d=i&&h?i.length>h.length?(d=d.replace(/\./g,"")).replace(",",e.radixPoint):h.length>i.length?(d=d.replace(/,/g,"")).replace(".",e.radixPoint):d.indexOf(".")<d.indexOf(",")?d.replace(/\./g,""):d.replace(/,/g,""):d.replace(new RegExp(b.escapeRegex(e.groupSeparator),"g"),""),0===e.digits&&(-1!==d.indexOf(".")?d=d.substring(0,d.indexOf(".")):-1!==d.indexOf(",")&&(d=d.substring(0,d.indexOf(",")))),""!==e.radixPoint&&isFinite(e.digits)&&-1!==d.indexOf(e.radixPoint)){var j=d.split(e.radixPoint)[1].match(new RegExp("\\d*"))[0];if(parseInt(e.digits)<j.toString().length){var k=Math.pow(10,parseInt(e.digits));d=d.replace(b.escapeRegex(e.radixPoint),"."),d=(d=Math.round(parseFloat(d)*k)/k).toString().replace(".",e.radixPoint)}}return function(b,c){var d=a.inArray(c.radixPoint,b);-1===d&&(b.push(c.radixPoint),d=b.length-1);for(var e=1;e<=c.digits;e++)b[d+e]=b[d+e]||"0";return b}(d.toString().split(""),e).join("")},onKeyDown:function(c,d,e,f){var g=a(this);if(c.ctrlKey)switch(c.keyCode){case b.keyCode.UP:g.val(parseFloat(this.inputmask.unmaskedvalue())+parseInt(f.step)),g.trigger("setvalue");break;case b.keyCode.DOWN:g.val(parseFloat(this.inputmask.unmaskedvalue())-parseInt(f.step)),g.trigger("setvalue")}}},currency:{prefix:"$ ",groupSeparator:",",alias:"numeric",placeholder:"0",autoGroup:!0,digits:2,digitsOptional:!1,clearMaskOnLostFocus:!1},decimal:{alias:"numeric"},integer:{alias:"numeric",digits:0,radixPoint:""},percentage:{alias:"numeric",digits:2,digitsOptional:!0,radixPoint:".",placeholder:"0",autoGroup:!1,min:0,max:100,suffix:" %",allowMinus:!1}}),b},e=[c(0),c(1)],void 0===(f="function"==typeof(d=g)?d.apply(b,e):d)||(a.exports=f)},function(a,b,c){"use strict";var d,e,f,g;"function"==typeof Symbol&&Symbol.iterator,g=function(a,b){function c(a,b){var c=(a.mask||a).replace(/#/g,"0").replace(/\)/,"0").replace(/[+()#-]/g,""),d=(b.mask||b).replace(/#/g,"0").replace(/\)/,"0").replace(/[+()#-]/g,"");return c.localeCompare(d)}var d=b.prototype.analyseMask;return b.prototype.analyseMask=function(b,c,e){var f={};return e.phoneCodes&&(e.phoneCodes&&e.phoneCodes.length>1e3&&(function a(c,d,e){d=d||"",e=e||f,""!==d&&(e[d]={});for(var g="",h=e[d]||e,i=c.length-1;i>=0;i--)h[g=(b=c[i].mask||c[i]).substr(0,1)]=h[g]||[],h[g].unshift(b.substr(1)),c.splice(i,1);for(var j in h)h[j].length>500&&a(h[j].slice(),j,h)}((b=b.substr(1,b.length-2)).split(e.groupmarker[1]+e.alternatormarker+e.groupmarker[0])),b=function b(c){var d="",f=[];for(var g in c)a.isArray(c[g])?1===c[g].length?f.push(g+c[g]):f.push(g+e.groupmarker[0]+c[g].join(e.groupmarker[1]+e.alternatormarker+e.groupmarker[0])+e.groupmarker[1]):f.push(g+b(c[g]));return 1===f.length?d+=f[0]:d+=e.groupmarker[0]+f.join(e.groupmarker[1]+e.alternatormarker+e.groupmarker[0])+e.groupmarker[1],d}(f)),b=b.replace(/9/g,"\\9")),d.call(this,b,c,e)},b.extendAliases({abstractphone:{groupmarker:["<",">"],countrycode:"",phoneCodes:[],keepStatic:"auto",mask:function(a){return a.definitions={"#":b.prototype.definitions[9]},a.phoneCodes.sort(c)},onBeforeMask:function(a,b){var c=a.replace(/^0{1,2}/,"").replace(/[\s]/g,"");return(c.indexOf(b.countrycode)>1||-1===c.indexOf(b.countrycode))&&(c="+"+b.countrycode+c),c},onUnMask:function(a,b,c){return a.replace(/[()#-]/g,"")},inputmode:"tel"}}),b},e=[c(0),c(1)],void 0===(f="function"==typeof(d=g)?d.apply(b,e):d)||(a.exports=f)},function(a,b,c){"use strict";var d,e,f,g,h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};g=function(a,b){return void 0===a.fn.inputmask&&(a.fn.inputmask=function(c,d){var e,f=this[0];if(void 0===d&&(d={}),"string"==typeof c)switch(c){case"unmaskedvalue":return f&&f.inputmask?f.inputmask.unmaskedvalue():a(f).val();case"remove":return this.each(function(){this.inputmask&&this.inputmask.remove()});case"getemptymask":return f&&f.inputmask?f.inputmask.getemptymask():"";case"hasMaskedValue":return!(!f||!f.inputmask)&&f.inputmask.hasMaskedValue();case"isComplete":return!f||!f.inputmask||f.inputmask.isComplete();case"getmetadata":return f&&f.inputmask?f.inputmask.getmetadata():void 0;case"setvalue":b.setValue(f,d);break;case"option":if("string"!=typeof d)return this.each(function(){if(void 0!==this.inputmask)return this.inputmask.option(d)});if(f&&void 0!==f.inputmask)return f.inputmask.option(d);break;default:return d.alias=c,e=new b(d),this.each(function(){e.mask(this)})}else{if("object"==(void 0===c?"undefined":h(c)))return e=new b(c),void 0===c.mask&&void 0===c.alias?this.each(function(){if(void 0!==this.inputmask)return this.inputmask.option(c);e.mask(this)}):this.each(function(){e.mask(this)});if(void 0===c)return this.each(function(){(e=new b(d)).mask(this)})}}),a.fn.inputmask},e=[c(2),c(1)],void 0===(f="function"==typeof(d=g)?d.apply(b,e):d)||(a.exports=f)}]),jQuery&&function(a){a.extend(a.fn,{miniColors:function(b,c){var d=function(b,c,d){var e=s(b.val());e||(e="ffffff");var f=x(e),h=a('<span class="input-group-addon" style="background-color: #'+e+'" href="#"></span>');h.insertAfter(b),b.addClass("miniColors").data("original-maxlength",b.attr("maxlength")||null).data("original-autocomplete",b.attr("autocomplete")||null).data("letterCase",c.letterCase?c.letterCase:"uppercase").data("trigger",h).data("hsb",f).data("change",c.change?c.change:null).data("close",c.close?c.close:null).data("open",c.open?c.open:null).attr("maxlength",7).attr("autocomplete","off").val("#"+o(e,c.letterCase)).trigger("change"),c.readonly&&b.prop("readonly",!0),c.disabled&&g(b),h.on("click.miniColors",function(a){a.preventDefault(),""===b.val()&&b.val("#").trigger("change"),i(b)}),b.on("focus.miniColors",function(a){""===b.val()&&b.val("#").trigger("change"),i(b)}),b.on("blur.miniColors",function(a){var c=s(y(b.data("hsb")));b.val(c?"#"+o(c,b.data("letterCase")):"").trigger("change")}),b.on("keydown.miniColors",function(a){9===a.keyCode&&j(b)}),b.on("keyup.miniColors",function(a){n(b)}),b.on("paste.miniColors",function(a){setTimeout(function(){n(b)},5)})},e=function(b){j(),b=a(b),b.data("trigger").remove(),
|
4 |
+
b.attr("autocomplete",b.data("original-autocomplete")).attr("maxlength",b.data("original-maxlength")).removeData().removeClass("miniColors").off(".miniColors"),a(document).off(".miniColors")},f=function(a){a.prop("disabled",!1).data("trigger").css("opacity",1)},g=function(a){j(a),a.prop("disabled",!0).data("trigger").css("opacity",.5)},i=function(b){if(b.prop("disabled"))return!1;j();var c=a('<div class="miniColors-selector"></div>');c.append('<div class="miniColors-colors" style="background-color: #FFF;"><div class="miniColors-colorPicker"><div class="miniColors-colorPicker-inner"></div></div>').append('<div class="miniColors-hues"><div class="miniColors-huePicker"></div></div>').css("display","none").addClass(b.attr("class")).removeClass("form-control");var d=b.data("hsb");c.find(".miniColors-colors").css("backgroundColor","#"+y({h:d.h,s:100,b:100}));var e=b.data("colorPosition");e||(e=p(d)),c.find(".miniColors-colorPicker").css("top",e.y+"px").css("left",e.x+"px");var f=b.data("huePosition");f||(f=q(d)),c.find(".miniColors-huePicker").css("top",f.y+"px"),b.data("selector",c).data("huePicker",c.find(".miniColors-huePicker")).data("colorPicker",c.find(".miniColors-colorPicker")).data("mousebutton",0),a("BODY").append(c);var g=b.data("trigger"),h=!b.is(":visible"),i=h?g.offset().top+g.outerHeight():b.offset().top+b.outerHeight(),m=h?g.offset().left:b.offset().left,n=c.outerWidth(),o=c.outerHeight(),r=g.outerWidth(),s=g.outerHeight(),u=a(window).height(),v=a(window).width(),w=a(window).scrollTop(),x=a(window).scrollLeft();i+o>u+w&&(i=i-o-s),m+n>v+x&&(m=m-n+r),c.css({top:i,left:m}).fadeIn(100),c.on("selectstart",function(){return!1}),a(document).on("mousedown.miniColors touchstart.miniColors",function(c){b.data("mousebutton",1);var d=a(c.target).parents().andSelf();if(d.hasClass("miniColors-colors")&&(c.preventDefault(),b.data("moving","colors"),k(b,c)),d.hasClass("miniColors-hues")&&(c.preventDefault(),b.data("moving","hues"),l(b,c)),d.hasClass("miniColors-selector"))return void c.preventDefault();d.hasClass("miniColors")||j(b)}),a(document).on("mouseup.miniColors touchend.miniColors",function(a){a.preventDefault(),b.data("mousebutton",0).removeData("moving")}).on("mousemove.miniColors touchmove.miniColors",function(a){a.preventDefault(),1===b.data("mousebutton")&&("colors"===b.data("moving")&&k(b,a),"hues"===b.data("moving")&&l(b,a))}),b.data("open")&&b.data("open").call(b.get(0),"#"+y(d),t(d))},j=function(b){b||(b=a(".miniColors")),b.each(function(){var c=a(this).data("selector");a(this).removeData("selector"),a(c).fadeOut(100,function(){if(b.data("close")){var c=b.data("hsb"),d=y(c);b.data("close").call(b.get(0),"#"+d,t(c))}a(this).remove()})}),a(document).off(".miniColors")},k=function(a,b){var c=a.data("colorPicker");c.hide();var d={x:b.pageX,y:b.pageY};b.originalEvent.changedTouches&&(d.x=b.originalEvent.changedTouches[0].pageX,d.y=b.originalEvent.changedTouches[0].pageY),d.x=d.x-a.data("selector").find(".miniColors-colors").offset().left-5,d.y=d.y-a.data("selector").find(".miniColors-colors").offset().top-5,d.x<=-5&&(d.x=-5),d.x>=144&&(d.x=144),d.y<=-5&&(d.y=-5),d.y>=144&&(d.y=144),a.data("colorPosition",d),c.css("left",d.x).css("top",d.y).show();var e=Math.round(.67*(d.x+5));e<0&&(e=0),e>100&&(e=100);var f=100-Math.round(.67*(d.y+5));f<0&&(f=0),f>100&&(f=100);var g=a.data("hsb");g.s=e,g.b=f,m(a,g,!0)},l=function(a,b){var c=a.data("huePicker");c.hide();var d={y:b.pageY};b.originalEvent.changedTouches&&(d.y=b.originalEvent.changedTouches[0].pageY),d.y=d.y-a.data("selector").find(".miniColors-colors").offset().top-1,d.y<=-1&&(d.y=-1),d.y>=149&&(d.y=149),a.data("huePosition",d),c.css("top",d.y).show();var e=Math.round(2.4*(150-d.y-1));e<0&&(e=0),e>360&&(e=360);var f=a.data("hsb");f.h=e,m(a,f,!0)},m=function(a,b,c){a.data("hsb",b);var d=y(b);if(c&&a.val("#"+o(d,a.data("letterCase"))).trigger("change"),a.data("trigger").css("backgroundColor","#"+d),a.data("selector")&&a.data("selector").find(".miniColors-colors").css("backgroundColor","#"+y({h:b.h,s:100,b:100})),a.data("change")){if(d===a.data("lastChange"))return;a.data("change").call(a.get(0),"#"+d,t(b)),a.data("lastChange",d)}},n=function(b){b.val("#"+r(b.val())).trigger("change");var c=s(b.val());if(!c)return!1;var d=x(c),e=b.data("hsb");if(d.h===e.h&&d.s===e.s&&d.b===e.b)return!0;var f=p(d);a(b.data("colorPicker")).css("top",f.y+"px").css("left",f.x+"px"),b.data("colorPosition",f);var g=q(d);return a(b.data("huePicker")).css("top",g.y+"px"),b.data("huePosition",g),m(b,d),!0},o=function(a,b){return"lowercase"===b?a.toLowerCase():"uppercase"===b?a.toUpperCase():a},p=function(a){var b=Math.ceil(a.s/.67);b<0&&(b=0),b>150&&(b=150);var c=150-Math.ceil(a.b/.67);return c<0&&(c=0),c>150&&(c=150),{x:b-5,y:c-5}},q=function(a){var b=150-a.h/2.4;return b<0&&(h=0),b>150&&(h=150),{y:b-1}},r=function(a){return a.replace(/[^A-F0-9]/gi,"")},s=function(a){return(a=r(a))?(3===a.length&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]),6===a.length?a:null):null},t=function(a){var b={},c=Math.round(a.h),d=Math.round(255*a.s/100),e=Math.round(255*a.b/100);if(0===d)b.r=b.g=b.b=e;else{var f=e,g=(255-d)*e/255,h=c%60*(f-g)/60;360===c&&(c=0),c<60?(b.r=f,b.b=g,b.g=g+h):c<120?(b.g=f,b.b=g,b.r=f-h):c<180?(b.g=f,b.r=g,b.b=g+h):c<240?(b.b=f,b.r=g,b.g=f-h):c<300?(b.b=f,b.g=g,b.r=g+h):c<360?(b.r=f,b.g=g,b.b=f-h):(b.r=0,b.g=0,b.b=0)}return{r:Math.round(b.r),g:Math.round(b.g),b:Math.round(b.b)}},u=function(b){var c=[b.r.toString(16),b.g.toString(16),b.b.toString(16)];return a.each(c,function(a,b){1===b.length&&(c[a]="0"+b)}),c.join("")},v=function(a){return a=parseInt(a.indexOf("#")>-1?a.substring(1):a,16),{r:a>>16,g:(65280&a)>>8,b:255&a}},w=function(a){var b={h:0,s:0,b:0},c=Math.min(a.r,a.g,a.b),d=Math.max(a.r,a.g,a.b),e=d-c;return b.b=d,b.s=0!==d?255*e/d:0,0!==b.s?a.r===d?b.h=(a.g-a.b)/e:a.g===d?b.h=2+(a.b-a.r)/e:b.h=4+(a.r-a.g)/e:b.h=-1,b.h*=60,b.h<0&&(b.h+=360),b.s*=100/255,b.b*=100/255,b},x=function(a){var b=w(v(a));return 0===b.s&&(b.h=360),b},y=function(a){return u(t(a))};switch(b){case"readonly":return a(this).each(function(){a(this).hasClass("miniColors")&&a(this).prop("readonly",c)}),a(this);case"disabled":return a(this).each(function(){a(this).hasClass("miniColors")&&(c?g(a(this)):f(a(this)))}),a(this);case"value":if(void 0===c){if(!a(this).hasClass("miniColors"))return;var z=a(this),A=s(z.val());return A?"#"+o(A,z.data("letterCase")):null}return a(this).each(function(){a(this).hasClass("miniColors")&&(a(this).val(c).trigger("change"),n(a(this)))}),a(this);case"destroy":return a(this).each(function(){a(this).hasClass("miniColors")&&e(a(this))}),a(this);default:return b||(b={}),a(this).each(function(){"input"===a(this)[0].tagName.toLowerCase()&&(a(this).data("trigger")||d(a(this),b))}),a(this)}}})}(jQuery),document.addEventListener("load",color_picker_init,!1),jQuery(document).ajaxComplete(function(){color_picker_init()}),function(a,b){function c(){return new Date(Date.UTC.apply(Date,arguments))}function d(){var a=new Date;return c(a.getFullYear(),a.getMonth(),a.getDate())}function e(a){return function(){return this[a].apply(this,arguments)}}function f(b,c){function d(a,b){return b.toLowerCase()}var e,f=a(b).data(),g={},h=new RegExp("^"+c.toLowerCase()+"([A-Z])");c=new RegExp("^"+c.toLowerCase());for(var i in f)c.test(i)&&(e=i.replace(h,d),g[e]=f[i]);return g}function g(b){var c={};if(o[b]||(b=b.split("-")[0],o[b])){var d=o[b];return a.each(n,function(a,b){b in d&&(c[b]=d[b])}),c}}var h=a(window),i=function(){var b={get:function(a){return this.slice(a)[0]},contains:function(a){for(var b=a&&a.valueOf(),c=0,d=this.length;c<d;c++)if(this[c].valueOf()===b)return c;return-1},remove:function(a){this.splice(a,1)},replace:function(b){b&&(a.isArray(b)||(b=[b]),this.clear(),this.push.apply(this,b))},clear:function(){this.splice(0)},copy:function(){var a=new i;return a.replace(this),a}};return function(){var c=[];return c.push.apply(c,arguments),a.extend(c,b),c}}(),j=function(b,c){this.dates=new i,this.viewDate=d(),this.focusDate=null,this._process_options(c),this.element=a(b),this.isInline=!1,this.isInput=this.element.is("input"),this.component=!!this.element.is(".date")&&this.element.find(".add-on, .input-group-addon, .btn"),this.hasInput=this.component&&this.element.find("input").length,this.component&&0===this.component.length&&(this.component=!1),this.picker=a(p.template),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("cfdatepicker-inline").appendTo(this.element):this.picker.addClass("cfdatepicker-dropdown dropdown-menu"),this.o.rtl&&this.picker.addClass("cfdatepicker-rtl"),this.viewMode=this.o.startView,this.o.calendarWeeks&&this.picker.find("tfoot th.today").attr("colspan",function(a,b){return parseInt(b)+1}),this._allow_update=!1,this.setStartDate(this._o.startDate),this.setEndDate(this._o.endDate),this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled),this.fillDow(),this.fillMonths(),this._allow_update=!0,this.update(),this.showMode(),this.isInline&&this.show()};j.prototype={constructor:j,_process_options:function(b){this._o=a.extend({},this._o,b);var c=this.o=a.extend({},this._o),d=c.language;switch(o[d]||(d=d.split("-")[0],o[d]||(d=m.language)),c.language=d,c.startView){case 2:case"decade":c.startView=2;break;case 1:case"year":c.startView=1;break;default:c.startView=0}switch(c.minViewMode){case 1:case"months":c.minViewMode=1;break;case 2:case"years":c.minViewMode=2;break;default:c.minViewMode=0}c.startView=Math.max(c.startView,c.minViewMode),!0!==c.multidate&&(c.multidate=Number(c.multidate)||!1,!1!==c.multidate?c.multidate=Math.max(0,c.multidate):c.multidate=1),c.multidateSeparator=String(c.multidateSeparator),c.weekStart%=7,c.weekEnd=(c.weekStart+6)%7;var e=p.parseFormat(c.format);c.startDate!==-1/0&&(c.startDate?c.startDate instanceof Date?c.startDate=this._local_to_utc(this._zero_time(c.startDate)):c.startDate=p.parseDate(c.startDate,e,c.language):c.startDate=-1/0),c.endDate!==1/0&&(c.endDate?c.endDate instanceof Date?c.endDate=this._local_to_utc(this._zero_time(c.endDate)):c.endDate=p.parseDate(c.endDate,e,c.language):c.endDate=1/0),c.daysOfWeekDisabled=c.daysOfWeekDisabled||[],a.isArray(c.daysOfWeekDisabled)||(c.daysOfWeekDisabled=c.daysOfWeekDisabled.split(/[,\s]*/)),c.daysOfWeekDisabled=a.map(c.daysOfWeekDisabled,function(a){return parseInt(a,10)});var f=String(c.orientation).toLowerCase().split(/\s+/g),g=c.orientation.toLowerCase();if(f=a.grep(f,function(a){return/^auto|left|right|top|bottom$/.test(a)}),c.orientation={x:"auto",y:"auto"},g&&"auto"!==g)if(1===f.length)switch(f[0]){case"top":case"bottom":c.orientation.y=f[0];break;case"left":case"right":c.orientation.x=f[0]}else g=a.grep(f,function(a){return/^left|right$/.test(a)}),c.orientation.x=g[0]||"auto",g=a.grep(f,function(a){return/^top|bottom$/.test(a)}),c.orientation.y=g[0]||"auto";else;},_events:[],_secondaryEvents:[],_applyEvents:function(a){for(var b,c,d,e=0;e<a.length;e++)b=a[e][0],2===a[e].length?(c=void 0,d=a[e][1]):3===a[e].length&&(c=a[e][1],d=a[e][2]),b.on(d,c)},_unapplyEvents:function(a){for(var b,c,d,e=0;e<a.length;e++)b=a[e][0],2===a[e].length?(d=void 0,c=a[e][1]):3===a[e].length&&(d=a[e][1],c=a[e][2]),b.off(c,d)},_buildEvents:function(){this.isInput?this._events=[[this.element,{focus:a.proxy(this.show,this),keyup:a.proxy(function(b){-1===a.inArray(b.keyCode,[27,37,39,38,40,32,13,9])&&this.update()},this),keydown:a.proxy(this.keydown,this)}]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),{focus:a.proxy(this.show,this),keyup:a.proxy(function(b){-1===a.inArray(b.keyCode,[27,37,39,38,40,32,13,9])&&this.update()},this),keydown:a.proxy(this.keydown,this)}],[this.component,{click:a.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:a.proxy(this.show,this)}]],this._events.push([this.element,"*",{blur:a.proxy(function(a){this._focused_from=a.target},this)}],[this.element,{blur:a.proxy(function(a){this._focused_from=a.target},this)}]),this._secondaryEvents=[[this.picker,{click:a.proxy(this.click,this)}],[a(window),{resize:a.proxy(this.place,this)}],[a(document),{"mousedown touchstart":a.proxy(function(a){this.element.is(a.target)||this.element.find(a.target).length||this.picker.is(a.target)||this.picker.find(a.target).length||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(b,c){var d=c||this.dates.get(-1),e=this._utc_to_local(d);this.element.trigger({type:b,date:e,dates:a.map(this.dates,this._utc_to_local),format:a.proxy(function(a,b){0===arguments.length?(a=this.dates.length-1,b=this.o.format):"string"==typeof a&&(b=a,a=this.dates.length-1),b=b||this.o.format;var c=this.dates.get(a);return p.formatDate(c,b,this.o.language)},this)})},show:function(){this.isInline||this.picker.appendTo("body"),this.picker.show(),this.place(),this._attachSecondaryEvents(),this._trigger("show")},hide:function(){this.isInline||this.picker.is(":visible")&&(this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.o.startView,this.showMode(),this.o.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this._trigger("hide"))},remove:function(){this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().cfdatepicker,this.isInput||delete this.element.data().date},_utc_to_local:function(a){return a&&new Date(a.getTime()+6e4*a.getTimezoneOffset())},_local_to_utc:function(a){return a&&new Date(a.getTime()-6e4*a.getTimezoneOffset())},_zero_time:function(a){return a&&new Date(a.getFullYear(),a.getMonth(),a.getDate())},_zero_utc_time:function(a){return a&&new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()))},getDates:function(){return a.map(this.dates,this._utc_to_local)},getUTCDates:function(){return a.map(this.dates,function(a){return new Date(a)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){return new Date(this.dates.get(-1))},setDates:function(){var b=a.isArray(arguments[0])?arguments[0]:arguments;this.update.apply(this,b),this._trigger("changeDate"),this.setValue()},setUTCDates:function(){var b=a.isArray(arguments[0])?arguments[0]:arguments;this.update.apply(this,a.map(b,this._utc_to_local)),this._trigger("changeDate"),this.setValue()},setDate:e("setDates"),setUTCDate:e("setUTCDates"),setValue:function(){var a=this.getFormattedDate();this.isInput?this.element.val(a).change():this.component&&this.element.find("input").val(a).change()},getFormattedDate:function(b){void 0===b&&(b=this.o.format);var c=this.o.language;return a.map(this.dates,function(a){return p.formatDate(a,b,c)}).join(this.o.multidateSeparator)},setStartDate:function(a){this._process_options({startDate:a}),this.update(),this.updateNavArrows()},setEndDate:function(a){this._process_options({endDate:a}),this.update(),this.updateNavArrows()},setDaysOfWeekDisabled:function(a){this._process_options({daysOfWeekDisabled:a}),this.update(),this.updateNavArrows()},place:function(){if(!this.isInline){var b,c=this.picker.outerWidth(),d=this.picker.outerHeight(),e=h.width(),f=h.height(),g=h.scrollTop(),i=jQuery(this.element).data("form-id"),j=document.getElementById("modal-"+i+"-content");b=null!==j?1e4:parseInt(this.element.parents().filter(function(){return"auto"!==a(this).css("z-index")}).first().css("z-index"))+10;var k=this.component?this.component.parent().offset():this.element.offset(),l=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),m=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),n=k.left,o=k.top;this.picker.removeClass("cfdatepicker-orient-top cfdatepicker-orient-bottom cfdatepicker-orient-right cfdatepicker-orient-left"),"auto"!==this.o.orientation.x?(this.picker.addClass("cfdatepicker-orient-"+this.o.orientation.x),"right"===this.o.orientation.x&&(n-=c-m)):(this.picker.addClass("cfdatepicker-orient-left"),k.left<0?n-=k.left-10:k.left+c>e&&(n=e-c-10));var p,q,r=this.o.orientation.y;"auto"===r&&(p=-g+k.top-d,q=g+f-(k.top+l+d),r=Math.max(p,q)===q?"top":"bottom"),this.picker.addClass("cfdatepicker-orient-"+r),"top"===r?o+=l:o-=d+parseInt(this.picker.css("padding-top")),this.picker.css({top:o,left:n,zIndex:b})}},_allow_update:!0,update:function(){if(this._allow_update){var b=this.dates.copy(),c=[],d=!1;arguments.length?(a.each(arguments,a.proxy(function(a,b){b instanceof Date&&(b=this._local_to_utc(b)),c.push(b)},this)),d=!0):(c=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),c=c&&this.o.multidate?c.split(this.o.multidateSeparator):[c],delete this.element.data().date),c=a.map(c,a.proxy(function(a){return p.parseDate(a,this.o.format,this.o.language)},this)),c=a.grep(c,a.proxy(function(a){return a<this.o.startDate||a>this.o.endDate||!a},this),!0),this.dates.replace(c),this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate&&(this.viewDate=new Date(this.o.endDate)),d?this.setValue():c.length&&String(b)!==String(this.dates)&&this._trigger("changeDate"),!this.dates.length&&b.length&&this._trigger("clearDate"),this.fill()}},fillDow:function(){var a=this.o.weekStart,b="<tr>";if(this.o.calendarWeeks){var c='<th class="cw"> </th>';b+=c,this.picker.find(".cfdatepicker-days thead tr:first-child").prepend(c)}for(;a<this.o.weekStart+7;)b+='<th class="dow">'+o[this.o.language].daysMin[a++%7]+"</th>";b+="</tr>",this.picker.find(".cfdatepicker-days thead").append(b)},fillMonths:function(){for(var a="",b=0;b<12;)a+='<span class="month">'+o[this.o.language].monthsShort[b++]+"</span>";this.picker.find(".cfdatepicker-months td").html(a)},setRange:function(b){b&&b.length?this.range=a.map(b,function(a){return a.valueOf()}):delete this.range,this.fill()},getClassNames:function(b){var c=[],d=this.viewDate.getUTCFullYear(),e=this.viewDate.getUTCMonth(),f=new Date;return b.getUTCFullYear()<d||b.getUTCFullYear()===d&&b.getUTCMonth()<e?c.push("old"):(b.getUTCFullYear()>d||b.getUTCFullYear()===d&&b.getUTCMonth()>e)&&c.push("new"),this.focusDate&&b.valueOf()===this.focusDate.valueOf()&&c.push("focused"),this.o.todayHighlight&&b.getUTCFullYear()===f.getFullYear()&&b.getUTCMonth()===f.getMonth()&&b.getUTCDate()===f.getDate()&&c.push("today"),-1!==this.dates.contains(b)&&c.push("active"),(b.valueOf()<this.o.startDate||b.valueOf()>this.o.endDate||-1!==a.inArray(b.getUTCDay(),this.o.daysOfWeekDisabled))&&c.push("disabled"),this.range&&(b>this.range[0]&&b<this.range[this.range.length-1]&&c.push("range"),-1!==a.inArray(b.valueOf(),this.range)&&c.push("selected")),c},fill:function(){var b,d=new Date(this.viewDate),e=d.getUTCFullYear(),f=d.getUTCMonth(),g=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,h=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,i=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,j=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,k=o[this.o.language].today||o.en.today||"",l=o[this.o.language].clear||o.en.clear||"";this.picker.find(".cfdatepicker-days thead th.cfdatepicker-switch").text(o[this.o.language].months[f]+" "+e),this.picker.find("tfoot th.today").text(k).toggle(!1!==this.o.todayBtn),this.picker.find("tfoot th.clear").text(l).toggle(!1!==this.o.clearBtn),this.updateNavArrows(),this.fillMonths();var m=c(e,f-1,28),n=p.getDaysInMonth(m.getUTCFullYear(),m.getUTCMonth());m.setUTCDate(n),m.setUTCDate(n-(m.getUTCDay()-this.o.weekStart+7)%7);var q=new Date(m);q.setUTCDate(q.getUTCDate()+42),q=q.valueOf();for(var r,s=[];m.valueOf()<q;){if(m.getUTCDay()===this.o.weekStart&&(s.push("<tr>"),this.o.calendarWeeks)){var t=new Date(+m+(this.o.weekStart-m.getUTCDay()-7)%7*864e5),u=new Date(Number(t)+(11-t.getUTCDay())%7*864e5),v=new Date(Number(v=c(u.getUTCFullYear(),0,1))+(11-v.getUTCDay())%7*864e5),w=(u-v)/864e5/7+1;s.push('<td class="cw">'+w+"</td>")}if(r=this.getClassNames(m),r.push("day"),this.o.beforeShowDay!==a.noop){var x=this.o.beforeShowDay(this._utc_to_local(m));void 0===x?x={}:"boolean"==typeof x?x={enabled:x}:"string"==typeof x&&(x={classes:x}),!1===x.enabled&&r.push("disabled"),x.classes&&(r=r.concat(x.classes.split(/\s+/))),x.tooltip&&(b=x.tooltip)}r=a.unique(r),s.push('<td class="'+r.join(" ")+'"'+(b?' title="'+b+'"':"")+">"+m.getUTCDate()+"</td>"),m.getUTCDay()===this.o.weekEnd&&s.push("</tr>"),m.setUTCDate(m.getUTCDate()+1)}this.picker.find(".cfdatepicker-days tbody").empty().append(s.join(""));var y=this.picker.find(".cfdatepicker-months").find("th:eq(1)").text(e).end().find("span").removeClass("active");a.each(this.dates,function(a,b){b.getUTCFullYear()===e&&y.eq(b.getUTCMonth()).addClass("active")}),(e<g||e>i)&&y.addClass("disabled"),e===g&&y.slice(0,h).addClass("disabled"),e===i&&y.slice(j+1).addClass("disabled"),s="",e=10*parseInt(e/10,10);var z=this.picker.find(".cfdatepicker-years").find("th:eq(1)").text(e+"-"+(e+9)).end().find("td");e-=1;for(var A,B=a.map(this.dates,function(a){return a.getUTCFullYear()}),C=-1;C<11;C++)A=["year"],-1===C?A.push("old"):10===C&&A.push("new"),-1!==a.inArray(e,B)&&A.push("active"),(e<g||e>i)&&A.push("disabled"),s+='<span class="'+A.join(" ")+'">'+e+"</span>",e+=1;z.html(s)},updateNavArrows:function(){if(this._allow_update){var a=new Date(this.viewDate),b=a.getUTCFullYear(),c=a.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-1/0&&b<=this.o.startDate.getUTCFullYear()&&c<=this.o.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&b>=this.o.endDate.getUTCFullYear()&&c>=this.o.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:case 2:this.o.startDate!==-1/0&&b<=this.o.startDate.getUTCFullYear()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&b>=this.o.endDate.getUTCFullYear()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}}},click:function(b){b.preventDefault();var d,e,f,g=a(b.target).closest("span, td, th");if(1===g.length)switch(g[0].nodeName.toLowerCase()){case"th":switch(g[0].className){case"cfdatepicker-switch":this.showMode(1);break;case"prev":case"next":var h=p.modes[this.viewMode].navStep*("prev"===g[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,h),this._trigger("changeMonth",this.viewDate);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,h),1===this.viewMode&&this._trigger("changeYear",this.viewDate)}this.fill();break;case"today":var i=new Date;i=c(i.getFullYear(),i.getMonth(),i.getDate(),0,0,0),this.showMode(-2);var j="linked"===this.o.todayBtn?null:"view";this._setDate(i,j);break;case"clear":var k;this.isInput?k=this.element:this.component&&(k=this.element.find("input")),k&&k.val("").change(),this.update(),this._trigger("changeDate"),this.o.autoclose&&this.hide()}break;case"span":g.is(".disabled")||(this.viewDate.setUTCDate(1),g.is(".month")?(f=1,e=g.parent().find("span").index(g),d=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(e),this._trigger("changeMonth",this.viewDate),1===this.o.minViewMode&&this._setDate(c(d,e,f))):(f=1,e=0,d=parseInt(g.text(),10)||0,this.viewDate.setUTCFullYear(d),this._trigger("changeYear",this.viewDate),2===this.o.minViewMode&&this._setDate(c(d,e,f))),this.showMode(-1),this.fill());break;case"td":g.is(".day")&&!g.is(".disabled")&&(f=parseInt(g.text(),10)||1,d=this.viewDate.getUTCFullYear(),e=this.viewDate.getUTCMonth(),g.is(".old")?0===e?(e=11,d-=1):e-=1:g.is(".new")&&(11===e?(e=0,d+=1):e+=1),this._setDate(c(d,e,f)))}this.picker.is(":visible")&&this._focused_from&&a(this._focused_from).focus(),delete this._focused_from},_toggle_multidate:function(a){var b=this.dates.contains(a);if(a?-1!==b?this.dates.remove(b):this.dates.push(a):this.dates.clear(),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(a,b){b&&"date"!==b||this._toggle_multidate(a&&new Date(a)),b&&"view"!==b||(this.viewDate=a&&new Date(a)),this.fill(),this.setValue(),this._trigger("changeDate");var c;this.isInput?c=this.element:this.component&&(c=this.element.find("input")),c&&c.change(),!this.o.autoclose||b&&"date"!==b||this.hide()},moveMonth:function(a,b){if(a){if(!b)return a;var c,d,e=new Date(a.valueOf()),f=e.getUTCDate(),g=e.getUTCMonth(),h=Math.abs(b);if(b=b>0?1:-1,1===h)d=-1===b?function(){return e.getUTCMonth()===g}:function(){return e.getUTCMonth()!==c},c=g+b,e.setUTCMonth(c),(c<0||c>11)&&(c=(c+12)%12);else{for(var i=0;i<h;i++)e=this.moveMonth(e,b);c=e.getUTCMonth(),e.setUTCDate(f),d=function(){return c!==e.getUTCMonth()}}for(;d();)e.setUTCDate(--f),e.setUTCMonth(c);return e}},moveYear:function(a,b){return this.moveMonth(a,12*b)},dateWithinRange:function(a){return a>=this.o.startDate&&a<=this.o.endDate},keydown:function(a){if(this.picker.is(":not(:visible)"))return void(27===a.keyCode&&this.show());var b,c,e,f=!1,g=this.focusDate||this.viewDate;switch(a.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),a.preventDefault();break;case 37:case 39:if(!this.o.keyboardNavigation)break;b=37===a.keyCode?-1:1,a.ctrlKey?(c=this.moveYear(this.dates.get(-1)||d(),b),e=this.moveYear(g,b),this._trigger("changeYear",this.viewDate)):a.shiftKey?(c=this.moveMonth(this.dates.get(-1)||d(),b),e=this.moveMonth(g,b),this._trigger("changeMonth",this.viewDate)):(c=new Date(this.dates.get(-1)||d()),c.setUTCDate(c.getUTCDate()+b),e=new Date(g),e.setUTCDate(g.getUTCDate()+b)),this.dateWithinRange(c)&&(this.focusDate=this.viewDate=e,this.setValue(),this.fill(),a.preventDefault());break;case 38:case 40:if(!this.o.keyboardNavigation)break;b=38===a.keyCode?-1:1,a.ctrlKey?(c=this.moveYear(this.dates.get(-1)||d(),b),e=this.moveYear(g,b),this._trigger("changeYear",this.viewDate)):a.shiftKey?(c=this.moveMonth(this.dates.get(-1)||d(),b),e=this.moveMonth(g,b),this._trigger("changeMonth",this.viewDate)):(c=new Date(this.dates.get(-1)||d()),c.setUTCDate(c.getUTCDate()+7*b),e=new Date(g),e.setUTCDate(g.getUTCDate()+7*b)),this.dateWithinRange(c)&&(this.focusDate=this.viewDate=e,this.setValue(),this.fill(),a.preventDefault());break;case 32:break;case 13:g=this.focusDate||this.dates.get(-1)||this.viewDate,this._toggle_multidate(g),f=!0,this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(a.preventDefault(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}if(f){this.dates.length?this._trigger("changeDate"):this._trigger("clearDate");var h;this.isInput?h=this.element:this.component&&(h=this.element.find("input")),h&&h.change()}},showMode:function(a){a&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+a))),this.picker.find(">div").hide().filter(".cfdatepicker-"+p.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()}};var k=function(b,c){this.element=a(b),this.inputs=a.map(c.inputs,function(a){return a.jquery?a[0]:a}),delete c.inputs,a(this.inputs).cfdatepicker(c).bind("changeDate",a.proxy(this.dateUpdated,this)),this.pickers=a.map(this.inputs,function(b){return a(b).data("cfdatepicker")}),this.updateDates()};k.prototype={updateDates:function(){this.dates=a.map(this.pickers,function(a){return a.getUTCDate()}),this.updateRanges()},updateRanges:function(){var b=a.map(this.dates,function(a){return a.valueOf()});a.each(this.pickers,function(a,c){c.setRange(b)})},dateUpdated:function(b){if(!this.updating){this.updating=!0;var c=a(b.target).data("cfdatepicker"),d=c.getUTCDate(),e=a.inArray(b.target,this.inputs),f=this.inputs.length;if(-1!==e){if(a.each(this.pickers,function(a,b){b.getUTCDate()||b.setUTCDate(d)}),d<this.dates[e])for(;e>=0&&d<this.dates[e];)this.pickers[e--].setUTCDate(d);else if(d>this.dates[e])for(;e<f&&d>this.dates[e];)this.pickers[e++].setUTCDate(d);this.updateDates(),delete this.updating}}},remove:function(){a.map(this.pickers,function(a){a.remove()}),delete this.element.data().cfdatepicker}};var l=a.fn.cfdatepicker;a.fn.cfdatepicker=function(b){var c=Array.apply(null,arguments);c.shift();var d;return this.each(function(){var e=a(this),h=e.data("cfdatepicker"),i="object"==typeof b&&b;if(!h){var l=f(this,"date"),n=a.extend({},m,l,i),o=g(n.language),p=a.extend({},m,o,l,i);if(e.is(".input-daterange")||p.inputs){var q={inputs:p.inputs||e.find("input").toArray()};e.data("cfdatepicker",h=new k(this,a.extend(p,q)))}else e.data("cfdatepicker",h=new j(this,p))}if("string"==typeof b&&"function"==typeof h[b]&&void 0!==(d=h[b].apply(h,c)))return!1}),void 0!==d?d:this};var m=a.fn.cfdatepicker.defaults={autoclose:!1,beforeShowDay:a.noop,calendarWeeks:!1,clearBtn:!1,daysOfWeekDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-1/0,startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0},n=a.fn.cfdatepicker.locale_opts=["format","rtl","weekStart"];a.fn.cfdatepicker.Constructor=j;var o=a.fn.cfdatepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}},p={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(a){return a%4==0&&a%100!=0||a%400==0},getDaysInMonth:function(a,b){return[31,p.isLeapYear(a)?29:28,31,30,31,30,31,31,30,31,30,31][b]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(a){var b=a.replace(this.validParts,"\0").split("\0"),c=a.match(this.validParts);if(!b||!b.length||!c||0===c.length)throw new Error("Invalid date format.");return{separators:b,parts:c}},parseDate:function(b,d,e){function f(){var a=this.slice(0,l[i].length);return a===l[i].slice(0,a.length)}if(b){if(b instanceof Date)return b;"string"==typeof d&&(d=p.parseFormat(d));var g,h,i,k=/([\-+]\d+)([dmwy])/,l=b.match(/([\-+]\d+)([dmwy])/g);if(/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(b)){for(b=new Date,i=0;i<l.length;i++)switch(g=k.exec(l[i]),h=parseInt(g[1]),g[2]){case"d":b.setUTCDate(b.getUTCDate()+h);break;case"m":b=j.prototype.moveMonth.call(j.prototype,b,h);break;case"w":b.setUTCDate(b.getUTCDate()+7*h);break;case"y":b=j.prototype.moveYear.call(j.prototype,b,h)}return c(b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate(),0,0,0)}l=b&&b.match(this.nonpunctuation)||[],b=new Date;var m,n,q={},r=["yyyy","yy","M","MM","m","mm","d","dd"],s={yyyy:function(a,b){return a.setUTCFullYear(b)},yy:function(a,b){return a.setUTCFullYear(2e3+b)},m:function(a,b){if(isNaN(a))return a;for(b-=1;b<0;)b+=12;for(b%=12,a.setUTCMonth(b);a.getUTCMonth()!==b;)a.setUTCDate(a.getUTCDate()-1);return a},d:function(a,b){return a.setUTCDate(b)}};s.M=s.MM=s.mm=s.m,s.dd=s.d,b=c(b.getFullYear(),b.getMonth(),b.getDate(),0,0,0);var t=d.parts.slice();if(l.length!==t.length&&(t=a(t).filter(function(b,c){return-1!==a.inArray(c,r)}).toArray()),l.length===t.length){var u;for(i=0,u=t.length;i<u;i++){if(m=parseInt(l[i],10),g=t[i],isNaN(m))switch(g){case"MM":
|
5 |
+
n=a(o[e].months).filter(f),m=a.inArray(n[0],o[e].months)+1;break;case"M":n=a(o[e].monthsShort).filter(f),m=a.inArray(n[0],o[e].monthsShort)+1}q[g]=m}var v,w;for(i=0;i<r.length;i++)(w=r[i])in q&&!isNaN(q[w])&&(v=new Date(b),s[w](v,q[w]),isNaN(v)||(b=v))}return b}},formatDate:function(b,c,d){if(!b)return"";"string"==typeof c&&(c=p.parseFormat(c));var e={d:b.getUTCDate(),D:o[d].daysShort[b.getUTCDay()],DD:o[d].days[b.getUTCDay()],m:b.getUTCMonth()+1,M:o[d].monthsShort[b.getUTCMonth()],MM:o[d].months[b.getUTCMonth()],yy:b.getUTCFullYear().toString().substring(2),yyyy:b.getUTCFullYear()};e.dd=(e.d<10?"0":"")+e.d,e.mm=(e.m<10?"0":"")+e.m,b=[];for(var f=a.extend([],c.separators),g=0,h=c.parts.length;g<=h;g++)f.length&&b.push(f.shift()),b.push(e[c.parts[g]]);return b.join("")},headTemplate:'<thead><tr><th class="prev">«</th><th colspan="5" class="cfdatepicker-switch"></th><th class="next">»</th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};p.template='<div class="cfdatepicker"><div class="cfdatepicker-days"><table class=" table-condensed">'+p.headTemplate+"<tbody></tbody>"+p.footTemplate+'</table></div><div class="cfdatepicker-months"><table class="table-condensed">'+p.headTemplate+p.contTemplate+p.footTemplate+'</table></div><div class="cfdatepicker-years"><table class="table-condensed">'+p.headTemplate+p.contTemplate+p.footTemplate+"</table></div></div>",a.fn.cfdatepicker.DPGlobal=p,a.fn.cfdatepicker.noConflict=function(){return a.fn.cfdatepicker=l,this},a(document).on("focus.cfdatepicker.data-api click.cfdatepicker.data-api",'[data-provide="cfdatepicker"]',function(b){var c=a(this);c.data("cfdatepicker")||(b.preventDefault(),c.cfdatepicker("show").on("show",function(){a(this).trigger("blur")}).on("hide",function(){a(this).attr("disabled",!1),c.hasClass("parsley-error")&&""!==c.val()&&(c.removeClass("parsley-error"),c.addClass("parsley-success"),a("#parsley-id-"+c.data("parsley-id")).hide())}))})}(window.jQuery),function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){function b(a,b){var c=Array.prototype.slice.call(arguments,2);return setTimeout(function(){return a.apply(null,c)},b)}function c(a,b){return b=b||100,function(){if(!a.debouncing){var c=Array.prototype.slice.apply(arguments);a.lastReturnVal=a.apply(window,c),a.debouncing=!0}return clearTimeout(a.debounceTimeout),a.debounceTimeout=setTimeout(function(){a.debouncing=!1},b),a.lastReturnVal}}function d(d,f){if(this.$window=a(window),this.$document=a(document),this.$element=a(d),this.options=a.extend({},h,f),this._defaults=h,this._name=e,this.startEvent=this.options.startEvent.join("."+e+" ")+"."+e,this.moveEvent=this.options.moveEvent.join("."+e+" ")+"."+e,this.endEvent=this.options.endEvent.join("."+e+" ")+"."+e,this.polyfill=this.options.polyfill,this.onInit=this.options.onInit,this.onSlide=this.options.onSlide,this.onSlideEnd=this.options.onSlideEnd,this.polyfill&&g)return!1;this.identifier="js-"+e+"-"+ +new Date,this.min=parseFloat(this.$element[0].getAttribute("min")||0),this.max=parseFloat(this.$element[0].getAttribute("max")||100),this.value=parseFloat(this.$element[0].value||this.min+(this.max-this.min)/2),this.step=parseFloat(this.$element[0].getAttribute("step")||1),this.$fill=a('<div class="'+this.options.fillClass+'" />'),this.$handle=a('<div class="'+this.options.handleClass+'" />'),this.$range=a('<div class="'+this.options.rangeClass+'" id="'+this.identifier+'" />').insertAfter(this.$element).prepend(this.$fill,this.$handle),this.$element.css({position:"absolute",width:"1px",height:"1px",overflow:"hidden",opacity:"0"}),this.handleDown=a.proxy(this.handleDown,this),this.handleMove=a.proxy(this.handleMove,this),this.handleEnd=a.proxy(this.handleEnd,this),this.init();var i=this;this.$window.on("resize."+e,c(function(){b(function(){i.update()},300)},20)),this.$document.on(this.startEvent,"#"+this.identifier+":not(."+this.options.disabledClass+")",this.handleDown),this.$element.on("change."+e,function(a,b){if(!b||b.origin!==e){var c=a.target.value,d=i.getPositionFromValue(c);i.setPosition(d)}})}var e="rangeslider",f=[],g=function(){var a=document.createElement("input");return a.setAttribute("type","range"),"text"!==a.type}(),h={polyfill:!0,rangeClass:"rangeslider",disabledClass:"rangeslider--disabled",fillClass:"rangeslider__fill",handleClass:"rangeslider__handle",startEvent:["mousedown","touchstart","pointerdown"],moveEvent:["mousemove","touchmove","pointermove"],endEvent:["mouseup","touchend","pointerup"]};d.prototype.init=function(){this.onInit&&"function"==typeof this.onInit&&this.onInit(),this.update()},d.prototype.update=function(){this.handleWidth=this.$handle[0].offsetWidth,this.rangeWidth=this.$range[0].offsetWidth,this.maxHandleX=this.rangeWidth-this.handleWidth,this.grabX=this.handleWidth/2,this.position=this.getPositionFromValue(this.value),this.$element[0].disabled?this.$range.addClass(this.options.disabledClass):this.$range.removeClass(this.options.disabledClass),this.setPosition(this.position)},d.prototype.handleDown=function(a){if(a.preventDefault(),this.$document.on(this.moveEvent,this.handleMove),this.$document.on(this.endEvent,this.handleEnd),!((" "+a.target.className+" ").replace(/[\n\t]/g," ").indexOf(this.options.handleClass)>-1)){var b=this.getRelativePosition(this.$range[0],a),c=this.getPositionFromNode(this.$handle[0])-this.getPositionFromNode(this.$range[0]);this.setPosition(b-this.grabX),b>=c&&b<c+this.handleWidth&&(this.grabX=b-c)}},d.prototype.handleMove=function(a){a.preventDefault();var b=this.getRelativePosition(this.$range[0],a);this.setPosition(b-this.grabX)},d.prototype.handleEnd=function(a){a.preventDefault(),this.$document.off(this.moveEvent,this.handleMove),this.$document.off(this.endEvent,this.handleEnd);var b=this.getRelativePosition(this.$range[0],a);this.onSlideEnd&&"function"==typeof this.onSlideEnd&&this.onSlideEnd(b-this.grabX,this.value)},d.prototype.cap=function(a,b,c){return a<b?b:a>c?c:a},d.prototype.setPosition=function(a){var b,c;b=this.getValueFromPosition(this.cap(a,0,this.maxHandleX))/this.step*this.step,c=this.getPositionFromValue(b),this.$fill[0].style.width=c+this.grabX+"px",this.$handle[0].style.left=c+"px",this.setValue(b),this.position=c,this.value=b,this.onSlide&&"function"==typeof this.onSlide&&this.onSlide(c,b)},d.prototype.getPositionFromNode=function(a){for(var b=0;null!==a;)b+=a.offsetLeft,a=a.offsetParent;return b},d.prototype.getRelativePosition=function(a,b){return(b.pageX||b.originalEvent.clientX||b.originalEvent.touches[0].clientX||b.currentPoint.x)-this.getPositionFromNode(a)},d.prototype.getPositionFromValue=function(a){var b;return b=(a-this.min)/(this.max-this.min),b*this.maxHandleX},d.prototype.getValueFromPosition=function(a){var b,c;return b=a/(this.maxHandleX||1),c=this.step*Math.ceil((b*(this.max-this.min)+this.min)/this.step),Number(c.toFixed(2))},d.prototype.setValue=function(a){a!==this.value&&this.$element.val(a).trigger("change",{origin:e})},d.prototype.destroy=function(){this.$document.off(this.startEvent,"#"+this.identifier,this.handleDown),this.$element.off("."+e).removeAttr("style").removeData("plugin_"+e),this.$range&&this.$range.length&&this.$range[0].parentNode.removeChild(this.$range[0]),f.splice(f.indexOf(this.$element[0]),1),f.length||this.$window.off("."+e)},a.fn[e]=function(b){return this.each(function(){var c=a(this),g=c.data("plugin_"+e);g||(c.data("plugin_"+e,g=new d(this,b)),f.push(this)),"string"==typeof b&&g[b]()})}}),function(a){"use strict";var b={init:function(c){return this.each(function(){this.self=a(this),b.destroy.call(this.self),this.opt=a.extend(!0,{},a.fn.raty.defaults,c),b._adjustCallback.call(this),b._adjustNumber.call(this),"img"!==this.opt.starType&&b._adjustStarType.call(this),b._adjustPath.call(this),b._createStars.call(this),this.opt.cancel&&b._createCancel.call(this),this.opt.precision&&b._adjustPrecision.call(this),b._createScore.call(this),b._apply.call(this,this.opt.score),b._target.call(this,this.opt.score),this.opt.readOnly?b._lock.call(this):(this.style.cursor="pointer",b._binds.call(this)),this.self.data("options",this.opt)})},_adjustCallback:function(){for(var a=["number","readOnly","score","scoreName"],b=0;b<a.length;b++)"function"==typeof this.opt[a[b]]&&(this.opt[a[b]]=this.opt[a[b]].call(this))},_adjustNumber:function(){this.opt.number=b._between(this.opt.number,1,this.opt.numberMax)},_adjustPath:function(){this.opt.path=this.opt.path||"",this.opt.path&&"/"!==this.opt.path.charAt(this.opt.path.length-1)&&(this.opt.path+="/")},_adjustPrecision:function(){this.opt.half=!0,this.opt.targetType="score"},_adjustStarType:function(){this.opt.path="";for(var a=["cancelOff","cancelOn","starHalf","starOff","starOn"],b=0;b<a.length;b++)this.opt[a[b]]=this.opt[a[b]].replace(".","-")},_apply:function(a){b._fill.call(this,a),a&&(a>0&&this.score.val(b._between(a,0,this.opt.number)),b._roundStars.call(this,a))},_between:function(a,b,c){return Math.min(Math.max(parseFloat(a),b),c)},_binds:function(){this.cancel&&(b._bindOverCancel.call(this),b._bindClickCancel.call(this),b._bindOutCancel.call(this)),b._bindOver.call(this),b._bindClick.call(this),b._bindOut.call(this)},_bindClick:function(){var b=this;b.stars.on("click.raty",function(c){var d=a(this);b.score.val(b.opt.half||b.opt.precision?b.self.data("score"):this.alt||d.data("alt")),b.opt.click&&b.opt.click.call(b,+b.score.val(),c)})},_bindClickCancel:function(){var a=this;a.cancel.on("click.raty",function(b){a.score.removeAttr("value"),a.opt.click&&a.opt.click.call(a,null,b)})},_bindOut:function(){var a=this;a.self.on("mouseleave.raty",function(c){var d=+a.score.val()||void 0;b._apply.call(a,d),b._target.call(a,d,c),a.opt.mouseout&&a.opt.mouseout.call(a,d,c)})},_bindOutCancel:function(){var b=this;b.cancel.on("mouseleave.raty",function(c){var d=a(this),e=b.opt.path+b.opt.cancelOff;if("img"===b.opt.starType)d.attr("src",e);else{var f=b.opt.path+b.opt.cancelOn;d.removeClass(f).addClass(e)}if(b.opt.mouseout){var g=+b.score.val()||void 0;b.opt.mouseout.call(b,g,c)}})},_bindOver:function(){var a=this,c=a.opt.half?"mousemove.raty":"mouseover.raty";a.stars.on(c,function(c){var d=b._getScoreByPosition.call(a,c,this);b._fill.call(a,d),a.opt.half&&(b._roundStars.call(a,d),a.self.data("score",d)),b._target.call(a,d,c),a.opt.mouseover&&a.opt.mouseover.call(a,d,c)})},_bindOverCancel:function(){var c=this;c.cancel.on("mouseover.raty",function(d){var e=c.opt.path+c.opt.cancelOn,f=a(this),g=c.opt.path+c.opt.starOff;if("img"===c.opt.starType)f.attr("src",e),c.stars.attr("src",g);else{c.stars.attr("class",g);var h=c.opt.path+c.opt.cancelOff;f.removeClass(h).addClass(e).css("color",c.opt.starColor)}b._target.call(c,null,d),c.opt.mouseover&&c.opt.mouseover.call(c,null)})},_buildScoreField:function(){return a("<input />",{name:this.opt.scoreName,type:"hidden"}).appendTo(this)},_createCancel:function(){var b=this.opt.path+this.opt.cancelOff,c=a("<"+this.opt.starType+" />",{title:this.opt.cancelHint,class:"raty-cancel"}).css("marginRight",this.opt.space?this.opt.spaceWidth+"px":"0");"img"===this.opt.starType?c.attr({src:b,alt:"x"}):c.attr("data-alt","x").addClass(b),"left"===this.opt.cancelPlace?this.self.prepend(" ").prepend(c):this.self.append(" ").append(c),this.cancel=c},_createScore:function(){var c=a(this.opt.targetScore);this.score=c.length?c:b._buildScoreField.call(this)},_createStars:function(){for(var c=1;c<=this.opt.number;c++){var d,e=this.opt.score&&this.opt.score>=c?"starOn":"starOff",f=b._getHint.call(this,c);e=this.opt.path+this.opt[e],d="img"!==this.opt.starType?{"data-alt":c,class:e}:{src:e,alt:c},d.title=f,a("<"+this.opt.starType+" />",d).css("marginRight",c<this.opt.number&&this.opt.space?this.opt.spaceWidth+"px":"0").appendTo(this),this.opt.space}this.stars=this.self.children(this.opt.starType)},_error:function(b){a(this).text(b),a.error(b)},_fill:function(a){for(var c=0,d=1;d<=this.stars.length;d++){var e,f=this.stars.eq(d-1),g=b._turnOn.call(this,d,a);if(this.opt.iconRange&&this.opt.iconRange.length>c){var h=this.opt.iconRange[c];e=b._getIconRange.call(this,h,g),d<=h.range&&("img"===this.opt.starType?f.attr("src",e):f.attr("class",e)),d===h.range&&c++}else e=this.opt.path+this.opt[g?"starOn":"starOff"],"img"===this.opt.starType?f.attr("src",e):f.attr("class",e),g?f.css("color",this.opt.starColor):f.css("color","")}},_getIconRange:function(a,b){return this.opt.path+(b?a.on||this.opt.starOn:a.off||this.opt.starOff)},_getScoreByPosition:function(c,d){var e=a(d),f=parseInt(d.alt||e.data("alt"),10);if(this.opt.half){var g=b._getSize.call(this),h=parseFloat((c.pageX-e.offset().left)/g);f=this.opt.precision?f-1+h:f-1+(h>.5?1:.5)}return f},_getSize:function(){var a;return a="img"===this.opt.starType?this.stars[0].width:parseFloat(this.stars.eq(0).css("font-size")),a||b._error.call(this,"Could not be possible get the icon size!"),a},_turnOn:function(a,b){return this.opt.single?a===b:a<=b},_getHint:function(a){var b=this.opt.hints[a-1];return""===b?"":b||a},_lock:function(){var a=parseInt(this.score.val(),10),c=a?b._getHint.call(this,a):this.opt.noRatedMsg;this.style.cursor="",this.title=c,this.score.prop("readonly",!0),this.stars.prop("title",c),this.cancel&&this.cancel.hide(),this.self.data("readonly",!0)},_roundStars:function(a){var b=(a%1).toFixed(2);if(b>this.opt.round.down){var c="starOn";this.opt.halfShow&&b<this.opt.round.up?c="starHalf":b<this.opt.round.full&&(c="starOff");var d=this.stars[Math.ceil(a)-1];"img"===this.opt.starType?d.src=this.opt.path+this.opt[c]:d.style.className=this.opt[c]}},_target:function(c,d){if(this.opt.target){var e=a(this.opt.target);e.length||b._error.call(this,"Target selector invalid or missing!");var f=d&&"mouseover"===d.type;if(void 0===c)c=this.opt.targetText;else if(null===c)c=f?this.opt.cancelHint:this.opt.targetText;else{"hint"===this.opt.targetType?c=b._getHint.call(this,Math.ceil(c)):this.opt.precision&&(c=parseFloat(c).toFixed(1));var g=d&&"mousemove"===d.type;f||g||this.opt.targetKeep||(c=this.opt.targetText)}c&&(c=this.opt.targetFormat.toString().replace("{score}",c)),e.is(":input")?e.val(c):e.html(c)}},_unlock:function(){this.style.cursor="pointer",this.removeAttribute("title"),this.score.removeAttr("readonly"),this.self.data("readonly",!1);for(var a=0;a<this.opt.number;a++)this.stars[a].title=b._getHint.call(this,a+1);this.cancel&&this.cancel.css("display","")},cancel:function(c){return this.each(function(){var d=a(this);!0!==d.data("readonly")&&(b[c?"click":"score"].call(d,null),this.score.removeAttr("value"))})},click:function(c){return this.each(function(){!0!==a(this).data("readonly")&&(b._apply.call(this,c),this.opt.click&&this.opt.click.call(this,c,a.Event("click")),b._target.call(this,c))})},destroy:function(){return this.each(function(){var b=a(this),c=b.data("raw");c?b.off(".raty").empty().css({cursor:c.style.cursor}).removeData("readonly"):b.data("raw",b.clone()[0])})},getScore:function(){var a,b=[];return this.each(function(){a=this.score.val(),b.push(a?+a:void 0)}),b.length>1?b:b[0]},move:function(c){return this.each(function(){var d=parseInt(c,10),e=a(this).data("options"),f=(+c).toFixed(1).split(".")[1];d>=e.number&&(d=e.number-1,f=10);var g=b._getSize.call(this),h=g/10,i=a(this.stars[d]),j=i.offset().left+h*parseInt(f,10),k=a.Event("mousemove",{pageX:j});i.trigger(k)})},readOnly:function(c){return this.each(function(){var d=a(this);d.data("readonly")!==c&&(c?(d.off(".raty").children("img").off(".raty"),b._lock.call(this)):(b._binds.call(this),b._unlock.call(this)),d.data("readonly",c))})},reload:function(){return b.set.call(this,{})},score:function(){var c=a(this);return arguments.length?b.setScore.apply(c,arguments):b.getScore.call(c)},set:function(b){return this.each(function(){var c=a(this),d=c.data("options"),e=a.extend({},d,b);c.raty(e)})},setScore:function(c){return this.each(function(){!0!==a(this).data("readonly")&&(b._apply.call(this,c),b._target.call(this,c))})}};a.fn.raty=function(c){return b[c]?b[c].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof c&&c?void a.error("Method "+c+" does not exist!"):b.init.apply(this,arguments)},a.fn.raty.defaults={cancel:!1,cancelHint:"Cancel this rating!",cancelOff:"raty-cancel-off",cancelOn:"raty-cancel-on",cancelPlace:"left",click:void 0,half:!1,halfShow:!0,hints:["1"],iconRange:void 0,mouseout:void 0,mouseover:void 0,noRatedMsg:"Not rated yet!",number:5,numberMax:20,path:void 0,precision:!1,readOnly:!1,round:{down:.25,full:.6,up:.76},score:void 0,scoreName:"score",single:!1,space:!0,spaceWidth:3,starColor:"#ff00aa",starHalf:"star-half.png",starOff:"raty-dot-off",starOn:"raty-dot-on",starType:"img",target:void 0,targetFormat:"{score}",targetKeep:!1,targetScore:void 0,targetText:"",targetType:"hint"}}(jQuery),jQuery(function(a){a("body").on("click",".cf-toggle-group-buttons a",function(){var b=a(this),c=b.closest(".caldera-config-field"),d=c.find('[data-ref="'+b.attr("id")+'"]');c.find(".btn").removeClass(b.data("active")).addClass(b.data("default")),b.addClass(b.data("active")).removeClass(b.data("default")),d.prop("checked",!0).trigger("change")})}),jQuery(document).on("cf.init",function(){toggle_button_init()});var cf_jsfields_init,cf_presubmit;!function(a){cf_validate_form=function(b){return b.parsley({errorsWrapper:'<span class="help-block caldera_ajax_error_block"></span>',errorTemplate:"<span></span>",errorsContainer:function(a){return a.$element.closest(".form-group")}}).on("field:error",function(c){this.$element.closest(".form-group").addClass("has-error"),a(document).trigger("cf.validate.fieldError",{inst:c,form:b,el:this.$element})}).on("field:success",function(c){if("star"===this.$element.data("type")&&this.$element.prop("required")&&0==this.$element.val())return void(c.validationResult=!1);this.$element.closest(".form-group").removeClass("has-error"),a(document).trigger("cf.validate.fieldSuccess",{inst:c,form:b,el:this.$element})}).on("form:success",function(c){a(document).trigger("cf.validate.FormSuccess",{inst:c,form:b,el:this.$element})}).on("form:error",function(c){a(document).trigger("cf.validate.FormError",{inst:c,form:b,el:this.$element})})},cf_jsfields_init=function(){a(".init_field_type[data-type]").each(function(b,c){var d=a(c);"function"==typeof window[d.data("type")+"_init"]&&window[d.data("type")+"_init"](d.prop("id"),d[0])}),window.Parsley.on("field:validated",function(){setTimeout(function(){a(document).trigger("cf.error")},15)}),void 0===resBaldrickTriggers&&a(".caldera_forms_form").length,a(document).trigger("cf.fieldsInit")},jQuery(function(){cf_jsfields_init()}),a(".caldera-form-page").length&&a(".caldera-form-page").on("keypress","[data-field]:not(textarea)",function(a){13===a.keyCode&&a.preventDefault()}),a(document).on("click",".cf_modal_button",function(b){b.preventDefault();var c=a(this);a(c.attr("href")).show()}),a(document).on("click",".caldera-front-modal-closer",function(b){b.preventDefault(),a(this).closest(".caldera-front-modal-container").hide()}),a(document).on("cf.add cf.enable cf.disable cf.pagenav",cf_jsfields_init),a(document).on("click","[data-page]",function(b){function c(a,b,c){window=window||{};var d="object"==typeof window.cf2&&"object"==typeof window.cf2[b]?window.cf2[b]:null,e=a.attr("id");return function(a,b){return!(!d||!d.fields)&&(!!d.fields.hasOwnProperty(a)&&d.fields[a])}(e,b)?(c=d.component.isFieldValid(e))||d.component.addFieldMessage(e,ParsleyValidator.getErrorMessage("required"),!0):c=a.parsley().isValid(),c}var d,e,f,g=a(this),h=g.closest(".caldera-form-page"),i=g.closest("form.caldera_forms_form"),j=i.attr("id"),k=i.data("instance"),l=i.find(".caldera-form-page:visible").data("formpage"),m=h.data("formpage")?h.data("formpage"):g.data("page"),n=a('.breadcrumb[data-form="caldera_form_'+k+'"]'),o=!0,p=l;if(i.length){if(cf_validate_form(i).destroy(),f=i.find("[data-field]"),i.find(".has-error").removeClass("has-error"),"prev"!==g.data("page")&&m>=l){f=a("#caldera_form_"+k+' [data-formpage="'+l+'"] [data-field]');for(var q,r,s=0;s<f.length;s++)q=a(f[s]),q.hasClass("cf-multi-uploader")||q.hasClass("cf-multi-uploader-list")||!0!==(r=c(q,j,r))&&(b.preventDefault(),o=!1);if(!0===o&&m>l)for(var t=m-1;t>=1;t--){f=a("#caldera_form_"+k+' [data-formpage="'+t+'"] [data-field]');for(var s=0;s<f.length;s++)q=a(f[s]),!0!==(r=c(q,j,r))&&(b.preventDefault(),o=!1,t>p&&(p=t))}}if(!1===o)return p!==l&&(a("#form_page_"+k+"_pg_"+l).hide().attr("aria-hidden","true").css("visibility","hidden"),a("#form_page_"+k+"_pg_"+p).show().attr("aria-hidden","false").css("visibility","visible")),cf_validate_form(i).validate(),!1;"next"===g.data("page")?(n&&n.find("li.active").removeClass("active").children().attr("aria-expanded","false"),d=i.find('.caldera-form-page[data-formpage="'+(m+1)+'"]'),d.length&&(h.hide().attr("aria-hidden","true").css("visibility","hidden"),d.show().attr("aria-hidden","false").css("visibility","visible"),n&&n.find('a[data-page="'+(m+1)+'"]').attr("aria-expanded","true").parent().addClass("active"))):"prev"===g.data("page")?(n&&n.find("li.active").removeClass("active").children().attr("aria-expanded","false"),e=i.find('.caldera-form-page[data-formpage="'+(m-1)+'"]'),e.length&&(h.hide().attr("aria-hidden","true").css("visibility","hidden"),e.show().attr("aria-hidden","false").css("visibility","visible"),n&&n.find('a[data-page="'+(m-1)+'"]').attr("aria-expanded","true").parent().addClass("active"))):g.data("pagenav")&&(b.preventDefault(),g.closest(".breadcrumb").find("li.active").removeClass("active").children().attr("aria-expanded","false"),a("#"+g.data("pagenav")+" .caldera-form-page").hide().attr("aria-hidden","true").css("visibility","hidden"),a("#"+g.data("pagenav")+'\t.caldera-form-page[data-formpage="'+g.data("page")+'"]').show().attr("aria-hidden","false").css("visibility","visible"),g.parent().addClass("active").children().attr("aria-expanded","true")),a("html, body").animate({scrollTop:i.offset().top-100},200),a(document).trigger("cf.pagenav")}});var b;a(".caldera-grid .breadcrumb").each(function(c,d){a(d).find("a[data-pagenav]").each(function(c,d){var e=a(d),f=e.data("pagenav");a("#"+f+' .caldera-form-page[data-formpage="'+e.data("page")+'"]').find(".has-error").length&&(e.parent().addClass("error"),void 0===b&&(e.trigger("click"),b=!0))})}),a(document).on("click",'form.caldera_forms_form [type="submit"]',function(b){var c=a(this),d=c.closest(".caldera_forms_form"),e=cf_validate_form(d);if(a(document).trigger("cf.form.submit",{e:b,$form:d}),e.validate())a(document).trigger("cf.form.validated",{e:b,$form:d}),e.destroy();else{if(a(".caldera-form-page").length){var f=c.parents(".caldera-form-page").data("formpage"),g=[],h=[];if(e.fields.forEach(function(a,b){if(!0!==a.validationResult){var c=a.$element.parents(".caldera-form-page");if(void 0!=c&&c.length&&a.$element.parents(".caldera-form-page").data("formpage")>f)return void h.push(a.$element.data("field"));g.push(a)}}),!g.length)return h.length&&d.append('<input type="hidden" name="_cf_future" value="'+h.toString()+'">'),void e.destroy()}b.preventDefault()}})}(jQuery),window.addEventListener("load",function(){!function(a){"use strict";var b=void 0===typeof window.wp;if(window.CALDERA_FORMS={},"object"==typeof CFFIELD_CONFIG){var c,d,e,f,g,h,i,j,k,l=!1,m=!1;a(".caldera_forms_form").each(function(n,o){if(h=a(o),c=h.attr("id"),g=h.data("instance"),"object"==typeof CFFIELD_CONFIG[g])if(k=a(document.getElementById(c)),b)a(k.data("target")).append('<div class="alert alert-warning">'+CFFIELD_CONFIG[g].error_strings.wp_not_defined+"</div>");else{m||(i=new CalderaFormsCrossOriginWarning(h,a,CFFIELD_CONFIG[g].error_strings),i.maybeWarn(),m=!0),!l&&CFFIELD_CONFIG[g].error_strings.hasOwnProperty("jquery_old")&&(j=new CalderaFormsJQueryWarning(h,a,CFFIELD_CONFIG[g].error_strings),j.maybeWarn(),l=!0),d=h.data("form-id"),f=CFFIELD_CONFIG[g].configs;var p=new CFState(d,a);p.init(CFFIELD_CONFIG[g].fields.defaults,CFFIELD_CONFIG[g].fields.calcDefaults),"object"!=typeof window.cfstate&&(window.cfstate={}),window.cfstate[c]=p,k.find("[data-sync]").each(function(){var b=a(this);b.data("unsync")||new CalderaFormsFieldSync(b,b.data("binds"),k,a,p)}),e=new Caldera_Forms_Field_Config(f,a(document.getElementById(c)),a,p),e.init(),a(document).trigger("cf.form.init",{$form:k,idAttr:c,formId:d,state:p,fieldIds:CFFIELD_CONFIG[g].fields.hasOwnProperty("ids")?CFFIELD_CONFIG[g].fields.ids:[],nonce:jQuery("#_cf_verify_"+d).val()})}})}}(jQuery)});
|
assets/build/js/conditionals.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var calders_forms_check_conditions,calders_forms_init_conditions
|
1 |
+
var calders_forms_check_conditions,calders_forms_init_conditions;jQuery(function(a){var b={},c={};Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=this.length>>>0,c=Number(arguments[1])||0;for(c=c<0?Math.ceil(c):Math.floor(c),c<0&&(c+=b);c<b;c++)if(c in this&&this[c]===a)return c;return-1}),cf_debounce=function(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null,c||a.apply(e,f)},h=c&&!d;clearTimeout(d),d=setTimeout(g,b),h&&a.apply(e,f)}},calders_forms_check_conditions=function(d){function e(a){if(b[a])return b[a]}function f(a){return"object"==typeof window.cfstate&&window.cfstate.hasOwnProperty(a)?window.cfstate[a]:null}function g(a,b,c){var d=f(c);d&&d.events().emit(function(){return"cf.conditionals."+a}(),{fieldIdAttr:b,formIdAttr:c,eventType:a,fieldValue:e(b)})}if("undefined"!=typeof caldera_conditionals&&void 0!==caldera_conditionals[d]){var h=a(document.getElementById(d)),i=f(d);for(var j in caldera_conditionals[d]){if(jQuery("#conditional_"+j).length){var k=caldera_conditionals[d][j].type,l=caldera_conditionals[d][j].group,m=[];for(var n in l){var o={},p=l[n];for(var q in p){var r=h.find('[data-field="'+p[q].field+'"]'),s=[],t="function"==typeof p[q].value?p[q].value():p[q].value;if(void 0!==p[q].selectors)for(var u in p[q].selectors){var v=new RegExp(u,"g");t=t.replace(v,a(p[q].selectors[u]).val())}if(o[q]=!1,r.is(":radio,:checkbox"))r=r.filter(":checked");else if(r.is("div"))r=jQuery("<input>").val(r.html());else if(!r.length){var w=h.find('[data-calc-field="'+p[q].field+'"]');w.length&&(r=h.find('[data-calc-field="'+p[q].field+'"]'))}if(r.length)for(var x=0;x<r.length;x++)s.push(r[x].value);else s.push(p[q].field);switch(p[q].compare){case"is":s.length&&s.indexOf(t.toString())>=0&&(o[q]=!0);break;case"isnot":s.length&&s.indexOf(t)<0&&(o[q]=!0);break;case">":case"greater":o[q]=parseFloat(s.reduce(function(a,b){return a+b}))>parseFloat(t);break;case"<":case"smaller":o[q]=parseFloat(s.reduce(function(a,b){return a+b}))<parseFloat(t);break;case"startswith":for(var x=0;x<s.length;x++)s[x].toLowerCase().substr(0,t.toLowerCase().length)===t.toLowerCase()&&(o[q]=!0);break;case"endswith":for(var x=0;x<s.length;x++)s[x].toLowerCase().substr(s[x].toLowerCase().length-t.toLowerCase().length)===t.toLowerCase()&&(o[q]=!0);break;case"contains":for(var x=0;x<s.length;x++)s[x].toLowerCase().indexOf(t)>=0&&(o[q]=!0)}}istrue=!0;for(var y in o)if(!1===o[y]){istrue=!1;break}m.push(istrue)}var z,A=jQuery("#conditional-"+j+"-tmpl").html(),B=jQuery("#conditional_"+j),C=jQuery('[data-field="'+j+'"]');if(m.length&&m.indexOf(!0)>=0?"show"===k?z="show":"hide"===k?z="hide":"disable"===k&&(z="disable"):z="show"===k?"hide":"disable"===k?"enable":"show","show"===z)B.html().length||(B.html(A).trigger("cf.add",{field:j}),jQuery(document).trigger("cf.add",{field:j}),function(b,d){var f,g=e(b);if(void 0!=g)if("object"==typeof g)for(var i in g)!0===g[i]&&(f=a(document.getElementById(i)),f.prop("checked",!0));else f=a("#"+b),f.val(g);null!==d&&(d.rebind(b),void 0===f&&(f=a("#"+b)),c.hasOwnProperty(b)&&(f.attr("data-unsync","1"),f.removeAttr("data-sync"),f.removeAttr("data-binds")),void 0!==f&&f.data("sync")&&new CalderaFormsFieldSync(f,f.data("binds"),h,a,d))}(j,i)),g("show",j,d);else if("hide"===z)B.html().length&&(!function(d,e){var f=a(document.getElementById(d));if(f.length){var g=f.val();g&&(b[d]=g)}else{var h;f=a("."+d),b[d]={},f.each(function(c,e){h=a(e),h.prop("checked")?b[d][h.attr("id")]=!0:b[d][h.attr("id")]=!1})}f.data("unsync")&&(c[d]=!0),null!==e&&e.unbind(d),b[d]}(j,i),C.val("").empty().prop("checked",!1),B.empty().trigger("cf.remove",{field:j}),jQuery(document).trigger("cf.remove",{field:j})),g("hide",j,d);else if("enable"===z||"disable"===z){var D=jQuery("#"+j);"enable"==z?(B.html().length?D.prop("disabled",!1):(B.html(A).trigger("cf.add",{field:j}),jQuery(document).trigger("cf.add").trigger("cf.enable",{field:j}),D.prop("disabled",!1)),g("enable",j,d)):(B.html().length?D.prop("disabled","disabled",{field:j}):(B.html(A).trigger("cf.remove"),jQuery(document).trigger("cf.remove",{field:j}).trigger("cf.disable",{field:j}),D.prop("disabled","disabled",{field:j})),g("disable",j,d))}}}}},calders_forms_init_conditions=function(){jQuery(".caldera_forms_form").on("change keyup","[data-field]",cf_debounce(function(b){var c=a(this).closest(".caldera_forms_form").prop("id");calders_forms_check_conditions(c)},10))},"undefined"!=typeof caldera_conditionals&&(calders_forms_init_conditions(),jQuery(".caldera_forms_form").find("[data-field]").first().trigger("change"))});var calders_forms_check_conditions,calders_forms_init_conditions;!function(a){var b={},c={};Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=this.length>>>0,c=Number(arguments[1])||0;for((c=c<0?Math.ceil(c):Math.floor(c))<0&&(c+=b);c<b;c++)if(c in this&&this[c]===a)return c;return-1}),cf_debounce=function(a,b,c){var d;return function(){var e=this,f=arguments,g=c&&!d;clearTimeout(d),d=setTimeout(function(){d=null,c||a.apply(e,f)},b),g&&a.apply(e,f)}},calders_forms_check_conditions=function(d){if("undefined"!=typeof caldera_conditionals&&void 0!==caldera_conditionals[d]){var e=a(document.getElementById(d)),f=function(a){return"object"==typeof window.cfstate&&window.cfstate.hasOwnProperty(a)?window.cfstate[a]:null}(d);for(var g in caldera_conditionals[d])if(jQuery("#conditional_"+g).length){var h=caldera_conditionals[d][g].type,i=caldera_conditionals[d][g].group,j=[];for(var k in i){var l={},m=i[k];for(var n in m){var o=e.find('[data-field="'+m[n].field+'"]'),p=[],q="function"==typeof m[n].value?m[n].value():m[n].value;if(void 0!==m[n].selectors)for(var r in m[n].selectors){var s=new RegExp(r,"g");q=q.replace(s,a(m[n].selectors[r]).val())}if(l[n]=!1,o.is(":radio,:checkbox")?o=o.filter(":checked"):o.is("div")?o=jQuery("<input>").val(o.html()):o.length||e.find('[data-calc-field="'+m[n].field+'"]').length&&(o=e.find('[data-calc-field="'+m[n].field+'"]')),o.length)for(var t=0;t<o.length;t++)p.push(o[t].value);else p.push(m[n].field);switch(m[n].compare){case"is":p.length&&p.indexOf(q.toString())>=0&&(l[n]=!0);break;case"isnot":p.length&&p.indexOf(q)<0&&(l[n]=!0);break;case">":case"greater":l[n]=parseFloat(p.reduce(function(a,b){return a+b}))>parseFloat(q);break;case"<":case"smaller":l[n]=parseFloat(p.reduce(function(a,b){return a+b}))<parseFloat(q);break;case"startswith":for(t=0;t<p.length;t++)p[t].toLowerCase().substr(0,q.toLowerCase().length)===q.toLowerCase()&&(l[n]=!0);break;case"endswith":for(t=0;t<p.length;t++)p[t].toLowerCase().substr(p[t].toLowerCase().length-q.toLowerCase().length)===q.toLowerCase()&&(l[n]=!0);break;case"contains":for(t=0;t<p.length;t++)p[t].toLowerCase().indexOf(q)>=0&&(l[n]=!0)}}istrue=!0;for(var u in l)if(!1===l[u]){istrue=!1;break}j.push(istrue)}var v,w=jQuery("#conditional-"+g+"-tmpl").html(),x=jQuery("#conditional_"+g),y=jQuery('[data-field="'+g+'"]');if(j.length&&j.indexOf(!0)>=0?"show"===h?v="show":"hide"===h?v="hide":"disable"===h&&(v="disable"):v="show"===h?"hide":"disable"===h?"enable":"show","show"===v)x.html().length||(x.html(w).trigger("cf.add",{field:g}),jQuery(document).trigger("cf.add",{field:g}),function(d,f){var g,h=function(a){if(b[a])return b[a]}(d);if(void 0!=h)if("object"==typeof h)for(var i in h)!0===h[i]&&(g=a(document.getElementById(i))).prop("checked",!0);else(g=a("#"+d)).val(h);null!==f&&(f.rebind(d),void 0===g&&(g=a("#"+d)),c.hasOwnProperty(d)&&(g.attr("data-unsync","1"),g.removeAttr("data-sync"),g.removeAttr("data-binds")),void 0!==g&&g.data("sync")&&new CalderaFormsFieldSync(g,g.data("binds"),e,a,f))}(g,f));else if("hide"===v)x.html().length&&(function(d,e){var f=a(document.getElementById(d));if(f.length){var g=f.val();g&&(b[d]=g)}else{var h;f=a("."+d),b[d]={},f.each(function(c,e){(h=a(e)).prop("checked")?b[d][h.attr("id")]=!0:b[d][h.attr("id")]=!1})}f.data("unsync")&&(c[d]=!0),null!==e&&e.unbind(d)}(g,f),y.val("").empty().prop("checked",!1),x.empty().trigger("cf.remove",{field:g}),jQuery(document).trigger("cf.remove",{field:g}));else if("enable"===v||"disable"===v){var z=jQuery("#"+g);"enable"==v?x.html().length?z.prop("disabled",!1):(x.html(w).trigger("cf.add",{field:g}),jQuery(document).trigger("cf.add").trigger("cf.enable",{field:g}),z.prop("disabled",!1)):x.html().length?z.prop("disabled","disabled",{field:g}):(x.html(w).trigger("cf.remove"),jQuery(document).trigger("cf.remove",{field:g}).trigger("cf.disable",{field:g}),z.prop("disabled","disabled",{field:g}))}}}},"undefined"!=typeof caldera_conditionals&&((calders_forms_init_conditions=function(){jQuery(".caldera_forms_form").on("change keyup","[data-field]",cf_debounce(function(b){var c=a(this).closest(".caldera_forms_form").prop("id");calders_forms_check_conditions(c)},10))})(),jQuery(".caldera_forms_form").find("[data-field]").first().trigger("change"))}(jQuery);
|
assets/build/js/edit.min.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
function pre_compile_templates(){for(var a=jQuery(".cf-editor-template"),b=0;b<a.length;b++)compiled_templates[a[b].id]=Handlebars.compile(a[b].innerHTML)}function get_compiled_template(a){return"object"!=typeof compiled_templates&&pre_compile_templates(),compiled_templates[a+"_tmpl"]?compiled_templates[a+"_tmpl"]:compiled_templates.noconfig_field_templ}function setup_field_type(a){return{id:a.trigger.prop("id")}}function check_required_bindings(a){var b,c=(jQuery(".caldera-header-save-button"),jQuery(".layout-form-field")),d=jQuery(".caldera-processor-nav"),e=!0;b=a?jQuery(a):jQuery(".caldera-config-field .required"),b.removeClass("has-error"),c.removeClass("has-error"),d.removeClass("has-error"),jQuery(".error-tag").remove(),required_errors={},b.each(function(a,b){var c=jQuery(b),d=c.closest(".caldera-config-editor-panel");if(b.value.length){if(c.hasClass("field-slug"))for(var f=jQuery(".field-slug").not(c),g=0;g<f.length;g++)if(f[g].value===b.value){var c=jQuery(f[g]);required_errors[d.prop("id")]||(required_errors[d.prop("id")]=0);var h=c.closest(".caldera-editor-field-config-wrapper"),i=c.closest(".caldera-editor-processor-config-wrapper");h.length&&jQuery('.layout-form-field[data-config="'+h.prop("id")+'"]').addClass("has-error"),i.length&&jQuery("."+i.prop("id")).addClass("has-error"),required_errors[d.prop("id")]+=1,c.addClass("has-error"),e=!1;break}if(c.hasClass("toggle_value_field"))for(var j=c.closest(".caldera-config-group").find(".toggle_value_field").not(c),g=0;g<j.length;g++)if(j[g].value===b.value){var c=jQuery(j[g]);required_errors[d.prop("id")]||(required_errors[d.prop("id")]=0);var h=c.closest(".caldera-editor-field-config-wrapper"),i=c.closest(".caldera-editor-processor-config-wrapper");h.length&&jQuery('.layout-form-field[data-config="'+h.prop("id")+'"]').addClass("has-error"),i.length&&jQuery("."+i.prop("id")).addClass("has-error"),required_errors[d.prop("id")]+=1,c.addClass("has-error"),e=!1;break}}else{required_errors[d.prop("id")]||(required_errors[d.prop("id")]=0);var h=c.closest(".caldera-editor-field-config-wrapper"),i=c.closest(".caldera-editor-processor-config-wrapper");h.length&&jQuery('.layout-form-field[data-config="'+h.prop("id")+'"]').addClass("has-error"),i.length&&jQuery("."+i.prop("id")).addClass("has-error"),required_errors[d.prop("id")]+=1,c.addClass("has-error"),e=!1}});for(var f in required_errors)jQuery(".caldera-forms-options-form").find('a[href="#'+f+'"]').append('<span class="error-tag">'+required_errors[f]+"</span>");return jQuery(".caldera-conditional-field-set").trigger("change"),e}function cf_revisions_ui(){var a=CF_ADMIN.rest.revisions,b=document.getElementById("tmpl--revisions");if(null!==b){var c=jQuery("#caldera-forms-revisions-spinner");c.css({visibility:"visible",float:"none"}),jQuery.get(a,function(a){if(a.hasOwnProperty("message"))document.getElementById("caldera-forms-revisions").innerHTML='<p class="notice notice-large notice-info">'+a.message+"</p>";else{var d={revisions:a};revisions=a;var e=b.innerHTML,f=jQuery("#tmpl--revisions").html();e=Handlebars.compile(f),document.getElementById("caldera-forms-revisions").innerHTML=e(d)}c.css({visibility:"hidden",float:"none"}),jQuery("input[type=radio][name=caldera-forms-revision]").change(function(){jQuery("#caldera-forms-revision-go").attr("href",jQuery(this).data("edit")).css({display:"inline-block",visibility:"visible"}).attr("aria-hidden",!1)})}).fail(function(){c.css({visibility:"hidden",float:"none"})})}}function new_conditional_group(a){var b=a.trigger.data("id"),c="cl"+Math.round(18746582734*Math.random());return{group:[{id:"rw"+Math.round(98347598345*Math.random()),type:a.trigger.data("type"),lines:[{id:c}]}],id:b}}function new_conditional_line(a){var b=a.trigger.data("id"),c=a.trigger.data("group"),d=a.trigger.data("type"),e="cl"+Math.round(18746582734*Math.random());return{id:b,type:d,lineid:e,rowid:c,name:"config["+d+"]["+b+"][conditions][group]["+c+"]["+e+"]"}}function build_conditions_config(a){var b=JSON.parse(a.trigger.val());return b.id=a.trigger.data("id"),b}function setup_field_type(a){return{id:a.trigger.prop("id")}}function check_required_bindings(a){var b,c=(jQuery(".caldera-header-save-button"),jQuery(".layout-form-field")),d=jQuery(".caldera-processor-nav"),e=!0;b=a?jQuery(a):jQuery(".caldera-config-field .required"),b.removeClass("has-error"),c.removeClass("has-error"),d.removeClass("has-error"),jQuery(".error-tag").remove(),required_errors={},b.each(function(a,b){var c=jQuery(b),d=c.closest(".caldera-config-editor-panel");if(b.value.length){if(c.hasClass("field-slug"))for(var f=jQuery(".field-slug").not(c),g=0;g<f.length;g++)if(f[g].value===b.value){var c=jQuery(f[g]);required_errors[d.prop("id")]||(required_errors[d.prop("id")]=0);var h=c.closest(".caldera-editor-field-config-wrapper"),i=c.closest(".caldera-editor-processor-config-wrapper");h.length&&jQuery('.layout-form-field[data-config="'+h.prop("id")+'"]').addClass("has-error"),i.length&&jQuery("."+i.prop("id")).addClass("has-error"),required_errors[d.prop("id")]+=1,c.addClass("has-error"),e=!1;break}if(c.hasClass("toggle_value_field"))for(var j=c.closest(".caldera-config-group").find(".toggle_value_field").not(c),g=0;g<j.length;g++)if(j[g].value===b.value){var c=jQuery(j[g]);required_errors[d.prop("id")]||(required_errors[d.prop("id")]=0);var h=c.closest(".caldera-editor-field-config-wrapper"),i=c.closest(".caldera-editor-processor-config-wrapper");h.length&&jQuery('.layout-form-field[data-config="'+h.prop("id")+'"]').addClass("has-error"),i.length&&jQuery("."+i.prop("id")).addClass("has-error"),required_errors[d.prop("id")]+=1,c.addClass("has-error"),e=!1;break}}else{required_errors[d.prop("id")]||(required_errors[d.prop("id")]=0);var h=c.closest(".caldera-editor-field-config-wrapper"),i=c.closest(".caldera-editor-processor-config-wrapper");h.length&&jQuery('.layout-form-field[data-config="'+h.prop("id")+'"]').addClass("has-error"),i.length&&jQuery("."+i.prop("id")).addClass("has-error"),required_errors[d.prop("id")]+=1,c.addClass("has-error"),e=!1}});for(var f in required_errors)jQuery(".caldera-forms-options-form").find('a[href="#'+f+'"]').append('<span class="error-tag">'+required_errors[f]+"</span>");return jQuery(".caldera-conditional-field-set").trigger("change"),e}var cfAdminAJAX;cfAdminAJAX="object"==typeof CF_ADMIN?CF_ADMIN.adminAjax:ajaxurl,jQuery(document).ready(function(a){function b(b){var d=a(b),e=d.val(),f=d.closest(".caldera-editor-field-config-wrapper"),g=f.find(".caldera-config-field-setup"),h=get_compiled_template(e),i=f.find(".field_config_string").val(),j=d.data("type");if(f.find(".caldera-config-group").show(),d.addClass("field-initialized"),i=i.length&&j===d.val()?JSON.parse(i):fieldtype_defaults[d.val()+"_cfg"],i||(i={}),i._id=d.data("field"),i._name="config[fields]["+d.data("field")+"][config]",h=a("<div>").html(h(i)),g.html(h.html()),"function"==typeof window[d.val()+"_init"]&&window[d.val()+"_init"](d.data("field"),g),fieldtype_defaults[d.val()+"_nosupport"]&&(fieldtype_defaults[d.val()+"_nosupport"].indexOf("hide_label")>=0&&f.find(".hide-label-field").hide().find(".field-config").prop("checked",!1),fieldtype_defaults[d.val()+"_nosupport"].indexOf("caption")>=0&&f.find(".caption-field").hide().find(".field-config").val(""),fieldtype_defaults[d.val()+"_nosupport"].indexOf("required")>=0&&f.find(".required-field").hide().find(".field-config").prop("checked",!1),fieldtype_defaults[d.val()+"_nosupport"].indexOf("custom_class")>=0&&f.find(".customclass-field").hide().find(".field-config").val(""),fieldtype_defaults[d.val()+"_nosupport"].indexOf("entry_list")>=0&&f.find(".entrylist-field").hide().find(".field-config").prop("checked",!1)),f.find(".toggle_show_values").trigger("change"),!a(".caldera-select-field-type").not(".field-initialized").length){if(core_form||(core_form=jQuery(".caldera-forms-options-form")),core_form.hasClass("builder-loaded"))c(d.data("field"));else{for(var k=a(".caldera-select-field-type.field-initialized"),l=0;l<k.length;l++)c(a(k[l]).data("field"));core_form.addClass("builder-loaded")}a(".caldera-header-save-button").prop("disabled",!1),rebuild_field_binding(),baldrickTriggers()}if(a(".color-field").length&&a(".color-field").wpColorPicker({change:function(b){var c=a(this);c.data("ev")&&clearTimeout(c.data("ev")),c.data("ev",setTimeout(function(){c.trigger("record")},200)),c.data("target")&&(a(c.data("target")).css(c.data("style"),c.val()),a(c.data("target")).val(c.val()))}}),["html","section_break"].indexOf(d.val())>=0){var m=f.find(".field-label");m.val()||m.val(d.val()+"__"+f.find(".field-id").val()).trigger("change")}}function c(b){var c=a("#"+b),d=c.find(".caldera-select-field-type"),e=d.val(),f=a('.layout-form-field[data-config="'+b+'"]'),g=f.find(".field_preview"),h=(a("#preview-"+e+"_tmpl").html(),get_compiled_template("preview-"+e)),i={id:b},j=c.find(".field-config");j.each(function(c,d){for(var e=a(d),f=e.prop("name").split("["+b+"]")[1].substr(1),g=f.substr(0,f.length-1).split("]["),h=e.is(":checkbox,:radio")?e.filter(":checked").val():e.val(),j={},k=g.length-1;k>=0;k--)if(k===g.length-1)j[g[k]]=h;else{var l=j;j={},j[g[k]]=l}a.extend(!0,i,j)}),g.html(h(i)),f.removeClass("button"),a(".preview-field-config").prop("disabled",!0)}function d(b){var c,d=a(".caldera-editor-fields-panel"),e=(a(".caldera-editor-groups-panel"),a(".caldera-group-nav")),f=a('[data-group="'+b+'"]'),g=f.find(".caldera-config-group-name"),h=f.find(".caldera-config-group-slug"),i=f.find(".caldera-config-group-desc"),j=f.find(".caldera-config-group-admin"),k=a(".active-group-name"),l=a(".active-group-slug"),m=a(".active-group-desc"),n=a(".active-group-admin"),o=a(".caldera-editor-fields-list ul"),p=f.find(".caldera-config-group-repeat"),q=a(".repeat-config-button"),r=(a(".caldera-editor-group-settings"),a(".caldera-config-group-remove"));a(".new-group-input").remove(),a(".new-field-input").remove(),e.removeClass("active"),d.show(),o.hide(),o.removeClass("active").find("li.active").removeClass("active"),o.hide(),f.addClass("active"),c=a(".caldera-editor-fields-list ul.active li"),c.length?r.hide():r.show(),a(".caldera-editor-field-config-wrapper").hide(),f.show(),k.val(g.val()),l.val(h.val()),m.val(i.val()),"1"===j.val()?n.prop("checked",!0):n.prop("checked",!1),"1"===p.val()?q.addClass("field-edit-open"):q.removeClass("field-edit-open")}var e=a("#save_indicator");a("#caldera-forms-restore-revision").on("click",function(b){b.preventDefault();var c=a(this);e.addClass("loading"),a.post({url:"admin.php?page=caldera-forms",data:{cf_edit_nonce:a("#cf_edit_nonce").val(),form:c.data("form"),cf_revision:a("#form_db_id_field").val(),restore:!0},success:function(){window.location=c.data("edit-link")}})}),a("body").on("click",".toggle_processor_event input",function(b){var c=a(this),d=c.closest(".wrapper-instance-pane"),e=d.find(".caldera-config-processor-setup"),f=d.find(".caldera-config-processor-notice"),g=c.is(":checked");g?(c.parent().addClass("activated"),c.parent().find(".is_active").show().attr("aria-hidden",!1).css("visibility","visible"),c.parent().find(".not_active").hide().attr("aria-hidden",!0).css("visibility","hidden"),a(document).trigger("processor.enabled",{processorId:c.parent().data("pid")})):(c.parent().removeClass("activated"),c.parent().find(".is_active").hide().attr("aria-hidden",!0).css("visibility","hidden"),c.parent().find(".not_active").show().attr("aria-hidden",!1).css("visibility","visible"),a(document).trigger("processor.disabled",{processorId:c.parent().data("pid")})),g?(e.slideDown(100),f.slideUp(100)):(e.slideUp(100),f.slideDown(100))}),a("body").on("click",".toggle_option_tab > a",function(b){b.preventDefault();var c=a(this),d=a(c.attr("href")),e=c.parent().find("a"),f=c.closest(".caldera-editor-config-wrapper").find(".wrapper-instance-pane");e.removeClass("button-primary"),f.hide(),d.show(),c.addClass("button-primary")}),a(".caldera-editor-body").on("change",".caldera-select-field-type",function(a){b(this)}),a(".caldera-editor-body").on("click",".caldera-group-nav a",function(b){b.preventDefault(),d(a(this).attr("href").substr(1))}),a(".caldera-editor-body").on("click",".caldera-editor-fields-list a",function(b){b.preventDefault();var c=a(this),d=a(c.attr("href"));a(".new-group-input").remove(),a(".new-field-input").remove(),a(".caldera-editor-fields-list li.active").removeClass("active"),c.parent().addClass("active"),a(".caldera-editor-field-config-wrapper").hide(),d.show()}),a(".caldera-editor-body").on("click",".group-config-button",function(b){var c=a(this),d=a(".caldera-editor-group-settings"),e=c.closest(".caldera-editor-fields-panel"),f=a(".caldera-config-group-remove");e.find(".caldera-field-line").length?f.hide():f.show(),c.hasClass("field-edit-open")?(d.slideUp(100),c.removeClass("field-edit-open")):(d.slideDown(100),c.addClass("field-edit-open"))}),a(".caldera-editor-body").on("keydown",".field-config",function(b){a(this).is("textarea")||13===b.which&&b.preventDefault()}),a(".caldera-editor-body").on("change",".field-label",function(b){var c=a(this).closest(".caldera-editor-field-config-wrapper").prop("id"),d=a('[data-field="'+c+'"]'),e=a("#"+c+" .caldera-editor-field-title, .layout-form-field.field-edit-open .layout_field_name"),f=a("#"+c+" .field-slug");d.find("a").html('<i class="icn-field"></i> '+this.value),e.text(this.value),"change"===b.type&&f.trigger("change"),rebuild_field_binding()}),a(".caldera-editor-body").on("change",".active-group-name",function(b){b.preventDefault();var c=a(".caldera-group-nav.active"),d=(c.data("group"),c.find(".caldera-config-group-name")),e=c.find("span");"focusout"!==b.type||this.value.length||(this.value="Group "+(parseInt(c.index())+1)),d.val(this.value),e.text(this.value)}),a(".caldera-editor-body").on("change",".active-group-slug",function(b){b.preventDefault();var c=a(".caldera-group-nav.active"),d=(c.data("group"),c.find(".caldera-config-group-name").val()),e=c.find(".caldera-config-group-slug"),f=(c.find("span"),this.value.split(" ").join("_").split("-").join("_").replace(/[^a-z0-9_]/gi,"").toLowerCase());"focusout"!==b.type||this.value.length||(f=d.split(" ").join("_").split("-").join("_").replace(/[^a-z0-9_]/gi,"").toLowerCase()),e.val(f),this.value=f}),a(".caldera-editor-body").on("change",".active-group-desc",function(b){b.preventDefault();var c=a(".caldera-group-nav.active");c.data("group");c.find(".caldera-config-group-desc").val(this.value)}),a(".caldera-editor-body").on("change",".active-group-admin",function(b){b.preventDefault();var c=a(".caldera-group-nav.active"),d=(c.data("group"),c.find(".caldera-config-group-name").val(),c.find(".caldera-config-group-admin"));c.find("span"),this.value.split(" ").join("_").split("-").join("_").replace(/[^a-z0-9_]/gi,"").toLowerCase();a(this).prop("checked")?(d.val(1),c.addClass("is-admin")):(d.val(0),c.removeClass("is-admin"))}),a(".caldera-editor-body").on("click",".repeat-config-button",function(b){b.preventDefault();var c=a(".caldera-group-nav.active"),d=(c.data("group"),c.find("a .group-type")),e=c.find(".caldera-config-group-repeat"),f=a(this);f.hasClass("field-edit-open")?(e.val("0"),d.removeClass("icn-repeat").addClass("icn-folder"),f.removeClass("field-edit-open")):(e.val("1"),d.addClass("icn-repeat").removeClass("icn-folder"),f.addClass("field-edit-open"))}),a(".caldera-editor-body").on("click",".delete-field",function(){var b=a(this),c=b.closest(".caldera-editor-field-config-wrapper").prop("id");confirm(b.data("confirm"))&&(a("#"+c).remove(),a('option[value="'+c+'"]').remove(),a('[data-bind="'+c+'"]').remove(),delete current_form_fields[c],a('[data-config="'+c+'"]').slideUp(200,function(){a(this).remove(),rebuild_field_binding(),a(document).trigger("field.removed",{fieldId:c})}))}),a(".caldera-editor-body").on("click",".add-new-group,.add-field",function(){var b=a(this);if(a(".new-group-input").remove(),a(".new-field-input").remove(),b.hasClass("add-field")){a('<input type="text" class="new-field-input block-input">').appendTo(a(".caldera-editor-fields-list ul.active")).focus()}else{a('<input type="text" class="new-group-input block-input">').appendTo(a(".caldera-editor-groups-panel")).focus()}}),a(".caldera-editor-body").on("change keypress",".new-group-input",function(b){if("keypress"===b.type){if(13!==b.which)return;b.preventDefault()}var c,e,f=this.value,g=a(this),h=a(".caldera-editor-groups-panel ul"),i=a(".caldera-editor-fields-list");if(f.length){c=Handlebars.compile(a("#caldera_group_line_templ").html()),e={id:f.split(" ").join("_").split("-").join("_").replace(/[^a-z0-9_]/gi,"").toLowerCase(),name:f},h.append(c(e));a('<ul data-group="'+e.id+'">').hide().appendTo(i),g.remove(),d(e.id)}else g.remove()}),a(".caldera-editor-body").on("change keypress",".new-field-input",function(b){if("keypress"===b.type){if(13!==b.which)return;b.preventDefault()}var c,d,e,f=this.value,g=a(this),h=g.parent(),i=a(".caldera-editor-field-config"),j=a(".caldera-config-group-remove");if(f.length){j.hide(),c=Handlebars.compile(a("#caldera_field_line_templ").html()),d=Handlebars.compile(a("#caldera_field_config_wrapper_templ").html()),e={id:f.split(" ").join("_").split("-").join("_").replace(/[^a-z0-9_]/gi,"").toLowerCase(),label:f,slug:f.split(" ").join("_").split("-").join("_").replace(/[^a-z0-9_]/gi,"").toLowerCase(),group:a(".caldera-group-nav.active").data("group")};var k=a(c(e));k.appendTo(h),i.append(d(e)),k.find("a").trigger("click"),g.remove()}else g.remove()}),a(".caldera-editor-body").on("change",".field-slug",function(b){this.value.length?this.value=this.value.split(" ").join("_").split("-").join("_").replace(/[^a-z0-9_]/gi,"").toLowerCase():"change"===b.type&&(this.value=a(this).closest(".caldera-editor-field-config-wrapper").find(".field-label").val().split(" ").join("_").split("-").join("_").replace(/[^a-z0-9_]/gi,"").toLowerCase())}),a(".caldera-editor-body").on("click",".caldera-add-group",function(b){var c=a(this),d=c.data("group"),e=a("#"+d+"_panel_tmpl").html();c.parent().parent().append(e)}),a(".caldera-editor-body").on("click",".caldera-config-group-remove",function(b){var c=a(".active-group-slug").val();a('[data-group="'+c+'"]').hide(0,function(){a(this).remove();var b=a(".caldera-group-nav");b.length?b.first().find("a").trigger("click"):a(".caldera-editor-fields-panel").hide()})}),a("body").on("click",".set-current-field",function(b){b.preventDefault();var c=a(this);a("#"+c.data("field")+"_type").val(c.data("type")).trigger("change"),a("#"+c.data("field")+"_lable").focus(),a("#field_setup_baldrickModalCloser").trigger("click")}),a(".caldera-editor-body").on("change record",".field-config",function(b){a(document).trigger("field.config-change",{name:b.target.name,value:b.target.value});var d=a(this),e=d.closest(".caldera-editor-field-config-wrapper");current_form_fields&&(d.prop("id")===e.prop("id")+"_lable"&&(current_form_fields[e.prop("id")].label=this.value),d.prop("id")===e.prop("id")+"_slug"&&(current_form_fields[e.prop("id")].slug=this.value),d.prop("id")===e.prop("id")+"_type"&&(current_form_fields[e.prop("id")].type=this.value),e.length&&c(e.prop("id")))}),a(".caldera-editor-body").on("focus",".caldera-field-bind",function(b){var c=a(this),d=this.value;if(b.type&&"focusin"===b.type)return c.removeClass("bound_field").addClass("reload-binding"),rebind_field_bindings(),void(this.value=d)}),a(".caldera-group-nav").first().find("a").trigger("click"),a(".caldera-editor-body").on("change",".toggle_show_values",function(b){var c=a(this),d=c.closest(".caldera-config-group-toggle-options"),e=d.find(".toggle_label_field"),f=d.find(".toggle_value_field, .toggle_calc_value_field"),g=d.find(".option-setting-label-for-value"),h=d.find(".option-setting-label-for-label"),i=(d.find(".option-group-control"),{width:"100%",display:"inline",float:"left"});c.prop("checked")?(f.show().css(i).attr("aria-hidden",!1),e.show().css(i).attr("aria-hidden",!1),g.show().css({display:"inline-block"}),h.css("display","inline")):(f.hide().attr("aria-hidden",!0),g.hide().attr("aria-hidden",!0),e.css("width",245),h.css("display","inline")),e.trigger("toggle.values"),init_magic_tags()}),a(".caldera-editor-body").on("change",".auto-populate-type",function(){a(this).closest(".wrapper-instance-pane").find(".auto-populate-options").trigger("change")}),a(".caldera-editor-body").on("change",".auto-populate-options",function(){var b=a(this),c=b.closest(".wrapper-instance-pane"),d=c.find(".caldera-config-group-toggle-options"),e=c.find(".caldera-config-group-auto-options"),f=e.find(".auto-populate-type");e.find(".auto-populate-type-panel").hide(),b.prop("checked")?(d.hide(),e.show()):(d.show(),e.hide()),e.find(".caldera-config-group-auto-"+f.val()).show()}),a("body").on("change",".pin-toggle-roles",function(){var b=a(this),c=a("#caldera-pin-rules");"1"===b.val()?c.show():c.hide()}),a("body").on("click",".magic-tag-init",function(b){a(this).prev().focus().trigger("init.magic")}),a("body").on("keyup focus select click init.magic",".magic-tag-enabled",function(b){init_magic_tags();var c=a(this),d=c.parent(),e=d.closest(".wrapper-instance-pane").find(".caldera-select-field-type").val()?d.closest(".wrapper-instance-pane").find(".caldera-select-field-type").val():"hidden",f=d.find(".magic-tags-autocomplete"),g=f.find("ul"),h=this.value,i=[],j="",k=this.selectionStart,l=this.selectionEnd;if(f.length&&f.data("focus"))return void b.preventDefault();if(c.data("tag",""),this.selectionEnd>this.selectionStart)j=this.value.substr(this.selectionStart,this.selectionEnd-this.selectionStart);else if(("select"===b.type||"keyup"===b.type)&&40!==b.which&&38!==b.which&&39!==b.which&&37!==b.which){for(k=this.selectionStart;k>0;k--){var m=h.substr(k-1,1);if(" "===m||"\n"===m||("%"===m||"}"===m)&&this.selectionStart===k)break}for(l=this.selectionStart;l<h.length;l++){var m=h.substr(l,1);if(" "===m||"\n"===m||("%"===m||"{"===m)&&this.selectionStart===l)break}j=h.substr(k,l-k)}if("focusout"!==b.type){"init"!==b.type&&j.length<3&&f.length&&f.remove(),f.length||(f=a('<div class="magic-tags-autocomplete"></div>'),g=a("<ul></ul>"),g.appendTo(f),f.insertAfter(c),f.on("mouseenter",function(){a(this).data("focus",!0)}),f.on("mouseleave",function(){a(this).data("focus",!1),setTimeout(function(){f.remove()},200),c.is(":focus")||c.trigger("focusout")})),g.empty();var n="system",o=!1;"hidden"===e||"dropdown"===e||"radio"===e||"toggle_switch"===e||"checkbox"===e?(o=!0,e="text",n="all"):"paragraph"!==e&&"html"!==e||(e="text"),c.data("type")&&(e=c.data("type")),e=e.split(","),e.push("vars");for(var p=0;p<e.length;p++)for(var q in system_values)if(system_values[q]&&void 0!==system_values[q].tags&&void 0!==system_values[q].tags[e[p]]){if(i=[q],"system"!==q&&"variable"!==q&&"field"!==q){var r=jQuery(".processor-"+q),s=c.closest(".caldera-editor-processor-config-wrapper"),t=s.prop("id");i=[];for(var u=0;u<r.length;u++)if(s.length||!0!==o){if(t===r[u].id)continue;jQuery("li."+r[u].id).index()<jQuery("li."+t).index()&&i.push(r[u].id)}else i.push(r[u].id)}for(var v=0;v<i.length;v++)if("all"===n||n===q||"variable"===q){var w=a('<li class="header">'+system_values[q].type+(v>0?" ["+(v+1)+"]":"")+"</li>"),x=0;w.appendTo(g);for(var y=0;y<system_values[q].tags[e[p]].length;y++)if(!c.data("parent")||"variable:"+c.data("parent")!==system_values[q].tags[e[p]][y]){var z=system_values[q].wrap[0]+system_values[q].tags[e[p]][y]+system_values[q].wrap[1];if(i[v]!==q&&i.length>1&&(z=system_values[q].wrap[0]+system_values[q].tags[e[p]][y]+":"+i[v]+system_values[q].wrap[1]),z.indexOf(j)>=0||"init"===b.type){x+=1;var A=z.replace(j,"<strong>"+j+"</strong>"),B=a('<li class="tag" data-tag="'+z+'">'+A+"</li>");B.on("click",function(){var b=a(this).data("tag");c.val(h.substr(0,k)+b+h.substr(l)).trigger("change").focus(),c[0].selectionStart=k+b.length-(b.indexOf("*")>0?2:0),c[0].selectionEnd=k+b.length-(b.indexOf("*")>0?1:0),l=k=c[0].selectionEnd,h+=b,c.trigger("init.magic")}),B.appendTo(g)}}0===x&&w.remove()}}}g.children().length||f.remove(),"focusout"===b.type&&setTimeout(function(){f.remove()},200)}),pre_compile_templates(),a(".caldera-select-field-type").not(".field-initialized").each(function(a,c){b(c)})});var rebuild_field_binding,rebind_field_bindings,current_form_fields={},required_errors={},add_new_grid_page,add_page_grid,init_magic_tags,core_form,compiled_templates={};init_magic_tags=function(){jQuery(".magic-tag-enabled").each(function(a,b){var c=jQuery(b);if(c.hasClass("magic-tag-init-bound")){var d=c.parent().find(".magic-tag-init");return void(c.is(":visible")?d.show():d.hide())}var e=jQuery('<span class=""></span>'),f=jQuery('<span style="position:relative;display:inline-block; width:100%;"></span>');c.is("input")&&e.css("borderBottom","none"),c.hasClass("caldera-conditional-value-field")&&f.width("auto"),c.wrap(f),e.insertAfter(c),c.addClass("magic-tag-init-bound"),c.is(":visible")?e.show():e.hide()})},rebuild_field_binding=function(){if(core_form||(core_form=jQuery(".caldera-forms-options-form")),core_form.hasClass("builder-loaded")){var a=jQuery(".caldera-editor-field-config-wrapper");system_values.field={tags:{text:[]},type:"Fields",wrap:["%","%"]};for(var b=0;b<a.length;b++){var c=a[b].id,d=jQuery("#"+c+"_lable").val(),e=jQuery("#"+c+"_slug").val(),f=jQuery("#"+c+"_type").val();void 0===system_values.field.tags[f]&&(system_values.field.tags[f]=[]),system_values.field.tags[f].push(e),"text"!==f&&system_values.field.tags.text.push(e),current_form_fields[c]={label:d,slug:e,type:f},jQuery("option.bound-field").trigger("change").each(function(a,b){var c=jQuery(b);0!==c.prop("value").indexOf("{")?c.text(jQuery("#"+c.prop("value")+"_lable").val()+" ["+jQuery("#"+c.prop("value")+"_lable").val()+"]"):c.text(c.prop("value").replace("{","").replace("}",""))}).removeClass("bound-field")}}},rebind_field_bindings=function(){var a,b,c=jQuery(".caldera-field-bind").not(".bound_field");if(c.length){c.addClass("bound_field");for(var d=0;d<c.length;d++){var e=jQuery(c[d]),f=e.val(),g=e.data("default"),h=e.data("exclude"),i=0,j=e.closest(".caldera-editor-processor-config-wrapper"),k=j.prop("id"),l="";if(g&&!e.hasClass("reload-binding")&&(f=g),e.is("select")){e.empty();var m=jQuery('<optgroup label="Fields">');for(var n in current_form_fields)e.data("type")&&e.data("type").split(",").indexOf(current_form_fields[n].type)<0||(e.data("id")!==n&&m.append('<option value="'+n+'"'+(f===n?'selected="selected"':"")+">"+current_form_fields[n].label+" ["+current_form_fields[n].slug+"]</option>"),i+=1);m.appendTo(e),0===i&&e.empty();for(var o in system_values)if(a=[],!(h&&h.split(",").indexOf(o)>=0)){if("system"!==o&&"variable"!==o)for(var p=jQuery(".processor-"+o),q=0;q<p.length;q++)k!==p[q].id&&(a.push(p[q].id),p.length>1&&(b=jQuery("li."+p[q].id+" .processor-line-number"))&&b.html("["+(q+1)+"]"));else a.push("__system__");var r=[];e.data("type")?(r=e.data("type").split(","),r.push("vars")):r=["text","vars"];for(var s=0;s<r.length;s++)if(null!==system_values[o]&&system_values[o].tags&&system_values[o].tags[r[s]])for(var t=0;t<a.length;t++){jQuery("li."+a[t]).index()>jQuery("li."+k).index()&&"__system__"!==a[t]?e.closest(".caldera-editor-processors-panel-wrap").length&&(l=' disabled="disabled"'):l="";for(var m=jQuery('<optgroup label="'+system_values[o].type+("__system__"!==a[t]?" "+jQuery("li."+a[t]).find(".processor-line-number").html():"")+'"'+l+">"),u=0;u<system_values[o].tags[r[s]].length;u++){var v=system_values[o].tags[r[s]][u];"__system__"!==a[t]&&(v=v.replace(o,a[t])),m.append('<option value="{'+v+'}"'+(f==="{"+v+"}"?'selected="selected"':"")+l+">"+system_values[o].tags[r[s]][u]+"</option>"),i+=1}m.children().length&&m.appendTo(e)}}if(0===i){if(e.empty(),e.data("type")){e.append('<option value="">No '+e.data("type").split(",").join(" or ")+" in form</option>");var w=!0}}else e.prop("disabled",!1);e.hasClass("required")||void 0!==w||e.prepend('<option value=""></option>'),e.val(f)}}init_magic_tags(),jQuery(document).trigger("bound.fields"),jQuery(".caldera-header-save-button").prop("disabled",!1),void 0!=typeof cf_revisions_ui&&cf_revisions_ui()}},jQuery(document).ready(function(a){function b(){var b=a(".layout-grid-panel"),c=0;b.each(function(b,d){var e=a(d),f=e.find(".layout-structure"),g=e.find(".row"),h=[];g.each(function(b,d){var e=a(d),f=e.children().not(".column-merge"),g=[];c+=1,f.each(function(b,d){span=a(d).attr("class").split("-"),g.push(span[2]);var e=a(d).find(".field-location");e.length&&e.each(function(d,e){a(e).val(c+":"+(b+1)).removeAttr("disabled")})}),h.push(g.join(":"))}),f.val(h.join("|"))})}function c(b,c,e){var f,g,h="fld_"+Math.round(1e7*Math.random()),i=h,j=a("#field_config_panels");b.prop("id","").prop("title",""),f=Handlebars.compile(a("#caldera_field_config_wrapper_templ").html()),g=a.extend({},{id:i,label:"",slug:""},e),g.slug="";f(g);j.append(f(g)),b.removeClass("button-small").removeClass("button").removeClass("button-primary").removeClass("ui-draggable").removeClass("layout-new-form-field").addClass("layout-form-field").attr("data-config",h).css({display:"",opacity:""}),b.find(".layout_field_name").remove(),b.find(".field-location").prop("name","config[layout_grid][fields]["+h+"]"),b.find(".settings-panel").show(),b.appendTo(c),d(),b.find(".icon-edit").trigger("click"),a("#"+h+"_lable").focus().select(),baldrickTriggers(),a(document).trigger("field.added",{field:g}),e?a("#"+i+"_type").data("type",g.type).trigger("change"):a("#"+h).trigger("field.drop"),rebuild_field_binding()}function d(){a(".toggle-options").sortable({handle:".dashicons-sort"}),a("#grid-pages-panel").sortable({placeholder:"row-drop-helper",handle:".sort-handle",items:".first-row-level",axis:"y",stop:function(){b()}}),a(".layout-column").sortable({connectWith:".layout-column",appendTo:"#grid-pages-panel",helper:"clone",items:".layout-form-field",handle:".drag-handle",cursor:"move",opacity:.7,cursorAt:{left:100,top:15},start:function(a,b){b.helper.css({width:"200px",height:"35px",paddingTop:"20px"})},stop:function(a,c){c.item.removeAttr("style"),b()}}),a("h3 .layout-new-form-field").draggable({helper:"clone",appendTo:"body"}),a(".page-toggle.button").droppable({accept:".layout-form-field",over:function(b,c){a(this).trigger("click"),a(".layout-column").sortable("refresh")}}),a(".layout-column").droppable({greedy:!0,activeClass:"ui-state-dropper",hoverClass:"ui-state-hoverable",accept:".layout-new-form-field",drop:function(b,d){c(d.draggable.clone(),a(this))}}),b()}function e(){if(h){var b=a(".column-fieldinsert");b.length?(b.stop().fadeToggle(700),a(".layout-new-form-field").stop().fadeToggle(700)):cf_clear_puler()}}function f(){a(".caldera-editor-processors-panel ul").sortable({update:function(){rebuild_field_binding()},create:function(){0==a(".caldera-editor-processors-panel ul").children().length&&(j.addClass("button-primary"),i=new CalderaFormsButtonPulse(j),window.setTimeout(function(){i.startPulse()},3e3))}})}function g(b){var c=a(b),d=a("#"+c.val()+"-tmpl").length?a("#"+c.val()+"-tmpl").html():"",e=c.closest(".caldera-editor-processor-config-wrapper"),f=e.find(".caldera-config-processor-setup"),g=Handlebars.compile(d),h=e.find(".processor_config_string").val(),i=c.data("type");h=h.length&&i===c.val()?JSON.parse(h):processor_defaults[c.val()+"_cfg"],h||(h={}),h._id=e.prop("id"),h._name="config[processors]["+e.prop("id")+"][config]",g=a("<div>").html(g(h)),f.html(g.html()),"function"==typeof window[c.val()+"_init"]&&window[c.val()+"_init"](e.prop("id"),f),e.find(".no-conditions").length&&e.find(".toggle_option_tab").remove(),rebuild_field_binding(),baldrickTriggers(),a(".wp-baldrick").baldrick({request:cfAdminAJAX,method:"POST",before:function(b){var c=a(b);c.data("addNode")&&!c.data("request")&&c.data("request","cf_get_default_setting")}})}add_new_grid_page=function(a){return{page_no:"pg_"+Math.round(1e7*Math.random())}},add_page_grid=function(b){
|
2 |
-
var c=a(".page-toggle").length+1,e=a('<button type="button" data-name="Page '+c+'" data-page="'+b.rawData.page_no+'" class="page-toggle button">'+b.params.trigger.data("addtitle")+" "+c+"</button> "),f=a("#page-toggles");e.appendTo(f),f.show(),d(),e.trigger("click"),1===c&&f.hide(),a(document).trigger("add.page")},a(document).on("remove.page add.page load.page",function(b){var c=a(".page-toggle").length,d=a("#tab_pages");c<=1?d.hide():d.show()}),d(),a("#grid-pages-panel").on("click",".column-fieldinsert .dashicons-plus-alt",function(b){var d=a(this).closest(".column-container");c(a("#newfield-tool").clone().css("display",""),d)}),a("#grid-pages-panel").on("click",".column-split",function(b){var c=a(this).parent().parent(),e=c.attr("class").split("-"),f=a("<div>").insertAfter(c),g=Math.ceil(e[2]/2),h=Math.floor(e[2]/2);e[2]=g,c.attr("class",e.join("-")),e[2]=h,f.addClass(e.join("-")).append('<div class="layout-column column-container">'),a(this).remove(),d(),jQuery(".column-tools").remove(),jQuery(".column-merge").remove()}),a("#grid-pages-panel").on("click",".column-remove",function(c){var d=a(this).closest(".row"),e=d.find(".layout-form-field"),f=d.closest(".layout-grid-panel");if(e.length){if(!confirm(a("#row-remove-fields-message").text()))return;e.each(function(b,c){var d=a(c).data("config");a("#"+d).remove(),a('option[value="'+d+'"]').remove(),a('[data-bind="'+d+'"]').remove(),delete current_form_fields[d]})}d.slideUp(200,function(){if(a(this).remove(),b(),rebuild_field_binding(),!f.find(".row").length){f.remove();var c=a("#page-toggles .button-primary"),d=c.prev(),e=c.next();c.remove(),d.length?d.trigger("click"):e.trigger("click")}a(document).trigger("remove.page")}),jQuery(".column-tools").remove(),jQuery(".column-merge").remove()}),a(".caldera-config-editor-main-panel").on("click",".caldera-add-row",function(c){if(c.preventDefault(),!a(".page-active").length)return void a(".caldera-add-page").trigger("click");var e=a('<div style="display:none;" class="first-row-level row"><div class="col-xs-12"><div class="layout-column column-container"></div></div></div>');a(".page-active").append(e),e.slideDown(200),d(),b()}),a("#grid-pages-panel").on("click",".column-join",function(c){var d=a(this).parent().parent().parent(),e=d.prev(),f=e.attr("class").split("-"),g=d.attr("class").split("-");f[2]=parseFloat(f[2])+parseFloat(g[2]),d.find(".layout-column").contents().appendTo(e.find(".layout-column")),e.attr("class",f.join("-")),d.remove(),b(),jQuery(".column-tools").remove(),jQuery(".column-merge").remove()}),a("#grid-pages-panel").on("mouseenter",".row",function(c){var d=jQuery(this);jQuery(".column-tools,.column-merge").remove(),d.children().children().first().append('<div class="column-remove column-tools" data-placement="top" title="'+CF_ADMIN_TOOLTIPS.delete_row+'" ><i class="icon-remove"></i></div>'),d.children().children().last().append('<div class="column-sort column-tools" style="text-align:right;"><i class="dashicons dashicons-menu drag-handle sort-handle"></i></div>'),d.children().children().not(":first").prepend('<div class="column-merge"><div class="column-join column-tools"><i class="icon-join"></i></div></div>');var e=d.parent().parent().parent().width()/12-1;d.children().children().each(function(b,c){var d=a(c),e=d.width()/2-5;d.prepend('<div class="column-fieldinsert column-tools"><i class="dashicons dashicons-plus-alt" data-toggle="tooltip" data-placement="top" title="'+CF_ADMIN_TOOLTIPS.add_field_row+'"></i></div>'),d.parent().hasClass("col-xs-1")||(d.prepend('<div class="column-split column-tools" data-placement="top" title="'+CF_ADMIN_TOOLTIPS.split_row+'"><i class="dashicons dashicons-leftright"></i></div>'),d.find(".column-split").css("left",e))}),jQuery(".column-merge").draggable({axis:"x",helper:"clone",appendTo:d,grid:[e,0],drag:function(c,d){a(this).addClass("dragging"),a(".column-tools").remove(),a(".column-split").remove();var e=a(this).parent().parent(),f=d.helper,g=d.originalPosition.left>f.position().left?"left":"right",h=e.prev(),i=Math.round(e.parent().width()/12-10),j=Math.abs(d.originalPosition.left-f.position().left);if(e.parent().addClass("sizing"),j>=i){var k=h.attr("class").split("-"),l=e.attr("class").split("-");k[2]=parseFloat(k[2]),l[2]=parseFloat(l[2]),"left"===g?(k[2]--,l[2]++,k[2]>0&&k[2]<k[2]+l[2]?(h.attr("class",k.join("-")),e.attr("class",l.join("-")),d.originalPosition.left=f.position().left):a(this).draggable("option","disabled",!0)):(k[2]++,l[2]--,l[2]>0&&l[2]<l[2]+l[2]?(h.attr("class",k.join("-")),e.attr("class",l.join("-")),d.originalPosition.left=f.position().left):a(this).draggable("option","disabled",!0)),b()}},stop:function(){a(this).removeClass("dragging").parent().parent().parent().removeClass("sizing")}})}),a("#grid-pages-panel").on("mouseleave",".row",function(a){jQuery(".column-tools").remove(),jQuery(".column-merge").remove()}),a("#grid-pages-panel").on("click",".layout-form-field .icon-remove",function(){var b=a(this),c=b.parent(),d=a("#"+c.data("config"));c.slideUp(100,function(){a(this).remove()}),d.slideUp(100,function(){a(this).remove()})}),a(document).on("click",".layout-form-field .dashicons-admin-page",function(){var b=a(this),d=b.parent(),e=d.data("config"),f=a("#"+e).formJSON(),g=b.closest(".column-container"),h=d.clone().css("display",""),i={};d.hasClass("field-edit-open")&&(d.removeClass("field-edit-open"),h.removeClass("field-edit-open"),a(".caldera-editor-field-config-wrapper").hide()),f.config.fields[e]&&(i=f.config.fields[e],delete i.ID),c(h,g,i)}),a(document).on("click",".layout-form-field .icon-edit",function(){var b=a(this),c=b.parent(),d=a("#"+c.data("config")+"_type").val();a(".caldera-editor-field-config-wrapper").hide(),c.hasClass("field-edit-open")?c.removeClass("field-edit-open"):(a(".layout-form-field").removeClass("field-edit-open"),c.addClass("field-edit-open"),a("#"+c.data("config")).show()),a(document).trigger("show."+c.data("config")),a(document).trigger("show.fieldedit"),"radio"!==d&&"checkbox"!==d&&"dropdown"!==d&&"toggle_switch"!==d||a("#"+c.data("config")+"_auto").trigger("change")}),a("body").on("click",".layout-modal-edit-closer,.layout-modal-save-action",function(b){b.preventDefault();var c=a(this),d=a(".layout-form-field.edit-open"),e=c.closest(".layout-modal-container");settings=e.find(".settings-panel").first(),a(".edit-open").removeClass("edit-open"),settings.appendTo(d.find(".settings-wrapper")).hide(),e.hide()}),a(".layout-editor-body").on("change",".layout-core-pod-query",function(){a(this).parent().find(".settings-panel-row").remove(),a(".edit-open").find(".drag-handle .set-pod").html(" - "+a(this).val())}),a(".layout-editor-body").on("click",".remove-where",function(){a(this).closest(".settings-panel-row").remove()}),a(".layout-editor-body").on("click",".use-pod-container",function(){var b=a(this),c=b.prev(),d=c.val();if(d.length){a(".edit-open").find(".drag-handle .set-pod").html(" - "+c.val()),b.parent().parent().find(".spinner").css("display","inline-block");var e={action:"pq_loadpod",pod_reference:{pod:d}};a.post(cfAdminAJAX,e,function(c){b.parent().find(".spinner").css("display","none");var d=a("#where-line-tmpl").html(),e="",f=b.closest(".settings-panel").data("container");for(var g in c)e+='<option value="'+c[g]+'">'+c[g]+"</option>";d=d.replace(/{{fields}}/g,e).replace(/{{container_id}}/g,f),b.parent().append(d)})}}),a(".caldera-editor-header").on("click",".column-sort .icon-edit",function(a){}),a(".layout-editor-body").on("tray_loaded",".layout-template-tray",function(){d()}),a(".caldera-editor-header").on("click",".caldera-editor-header-nav a",function(b){b.preventDefault();var c=a(this);a(".caldera-editor-header-nav li").removeClass("active"),a(".caldera-editor-body").hide(),a(c.attr("href")).show(),c.parent().addClass("active"),rebind_field_bindings()}),a("body").on("change",".required",function(){check_required_bindings(this)}),a("body").on("submit",".caldera-forms-options-form",function(b){a(".required.has-error").length&&b.preventDefault()}),a(".caldera-editor-body").on("click",".add-toggle-option",function(b){var c=a(this);if(c.data("bulk"))return a(c.data("bulk")).toggle(),void a(c.data("bulk")).find("textarea").focus();var d=c.closest(".caldera-editor-field-config-wrapper"),e=d.find(".toggle-options"),f=a("#field-option-row-tmpl").html(),g=Handlebars.compile(f),h="opt"+parseInt(1048576*(Math.random()+1)),i={_name:"config[fields]["+d.prop("id")+"][config]",option:{}};if(c.data("options")){for(var j=a(c.data("options")),k=j.val().split("\n"),l=!1,m=0;m<k.length;m++){var n=k[m],o=n,p=o.split("|");if(p.length>1){o=p[0],n=p[1],l=!0;var q=p[2]||!1}i.option["opt"+parseInt(1048576*(Math.random()+m))]={value:o,calc_value:q||o,label:n,default:!1}}a(c.data("options")).parent().hide(),j.val(""),!0===l?d.find(".toggle_show_values").prop("checked",!0):d.find(".toggle_show_values").prop("checked",!1),e.empty()}else i.option[h]={value:"",label:"",calc_value:"",default:!1};a(".preset_options").val(""),e.append(g(i)),d.find(".toggle_show_values").trigger("change"),a(".toggle-options").sortable({handle:".dashicons-sort"}),k||e.find(".toggle_label_field").last().focus()}),a(".caldera-editor-body").on("change",".preset_options",function(b){var c=a(this),d=c.val(),e=a(c.data("bulk"));preset_options&&preset_options[d]&&preset_options[d].data&&("object"==typeof preset_options[d].data&&preset_options[d].data.length&&(preset_options[d].data=preset_options[d].data.join("\n")),e.val(preset_options[d].data))}),a(".caldera-editor-body").on("click",".toggle-remove-option",function(b){var c=a(this).closest(".caldera-editor-field-config-wrapper").find(".field-config").first();a(this).parent().remove(),c.trigger("change"),a(document).trigger("option.remove")}),a(".caldera-editor-body").on("click",".page-toggle",function(b){var c=a(this),d=c.parent(),e=d.find(".button");e.removeClass("button-primary"),a(".layout-grid-panel").hide().removeClass("page-active"),a("#"+c.data("page")).show().addClass("page-active"),c.addClass("button-primary"),e.each(function(b,c){a(c).html(d.data("title")+" "+(b+1))}),1===e.length&&d.hide()}),a(".caldera-editor-body").on("blur toggle.values",".toggle_label_field",function(b){var c=a(this),d=a('.toggle_value_field[data-opt="'+c.data("option")+'"]');d.is(":visible")||d.val(c.val())}),a(document).on("change focusout",".toggle_value_field",function(){a(document).trigger("show.fieldedit")}),a(document).on("show.fieldedit option.remove",function(b){a(".toggle_value_field.has-error").removeClass("has-error");for(var c=a("#"+a(".layout-form-field.field-edit-open").data("config")),d=c.find(".toggle_value_field"),e=c.find(".notice"),f=0,g=0;g<d.length;g++){for(var h=(d[g].value,0),i=0;i<d.length;i++)d[g]!==d[i]&&d[g].value===d[i].value&&(a(d[i]).addClass("has-error"),h++);h>0&&(a(d[g]).addClass("has-error"),f++)}f>0?(e.slideDown(),b.preventDefault()):e.slideUp()});var h=!1;focus_initial_field=function(b){var c=a(".layout-grid-panel .icon-edit").first();c.length?c.trigger("click"):(a(".layout-column.column-container").first().trigger("mouseover"),h=setInterval(e,500)),a(document).off("load.page",focus_initial_field)},a(document).on("load.page",focus_initial_field),cf_clear_puler=function(){h&&(clearTimeout(h),a(document).off("mouseover",".layout-new-form-field, .column-fieldinsert",cf_clear_puler)),a(".layout-new-form-field, .column-fieldinsert").fadeIn()},a(document).on("mouseover",".layout-new-form-field, .column-fieldinsert",cf_clear_puler),rebuild_field_binding(),a(document).trigger("load.page");var i,j=a(".new-processor-button");a("body").on("click",".caldera-processor-nav a",function(b){b.preventDefault();var c=a(this);a(".caldera-processor-nav").removeClass("active"),a(".caldera-editor-processor-config-wrapper").hide(),a(c.attr("href")).show(),c.parent().addClass("active")}),a("body").on("click",".add-new-processor",function(b){"object"==typeof i&&(j.removeClass("button-primary"),i.stopPulse());var c=a(this),d=Handlebars.compile(a("#processor-wrapper-tmpl").html());wrap=a(".active-processors-list"),process_conf=a(".caldera-editor-processor-config"),processid=Math.round(1e8*Math.random()),new_templ=Handlebars.compile(a("#processor-line-tmpl").html()),new_proc={id:"fp_"+processid,type:c.data("type")},wrap.append(new_templ(new_proc)),process_conf.append(d(new_proc)),a("#form_processor_baldrickModalCloser").trigger("click"),a(".caldera-processor-nav a").last().trigger("click"),a("#fp_"+processid+"_type").val(c.data("type")).trigger("change"),f(),baldrickTriggers(),a(document).trigger("processor.added",{processor:new_proc})}),a("body").on("click",".delete-processor",function(b){var c=a(this),d=c.closest(".caldera-editor-processor-config-wrapper");d.data("type");confirm(c.data("confirm"))&&(a("."+d.prop("id")).remove(),d.remove(),a(".caldera-processor-nav a").first().trigger("click"),rebuild_field_binding())}),a("body").on("change",".caldera-select-processor-type",function(b){var c=a(this),d=c.closest(".caldera-editor-processor-config-wrapper"),e=c.find('option[value="'+c.val()+'"]').text(),f=d.find(".caldera-editor-processor-title"),h=a(".caldera-processor-nav.active a");""===e&&(e=f.data("title")),f.html(e),h.html(e+' <span class="processor-line-number"></span>').parent().addClass("processor_type_"+c.val()),g(this),rebuild_field_binding()}),a(document).on("click","#cf-shortcode-preview",function(){a(this).focus().select()}),a(document).on("change",".cf-email-preview-toggle",function(){var b=a(this),c=a(".caldera-header-email-preview-button");b.is(":checked")?c.show().attr("aria-hidden","false").css("visibility","visible"):c.hide().attr("aria-hidden","true").css("visibility","hidden")}),rebuild_field_binding(),a(".caldera-select-processor-type").each(function(a,b){g(b)}),f()}),Handlebars.registerHelper("_field",function(a){var b=this,c="",d="",e="",f=this[a.hash.slug]?' data-default="'+this[a.hash.slug]+'"':"";a.hash.required&&(c=" required"),a.hash.exclude&&(e='data-exclude="'+a.hash.exclude+'"'),a.hash.array&&(d="[]","true"!==a.hash.array&&(f='value="'+a.hash.array+'"')),out="<select "+(a.hash.type?'data-type="'+a.hash.type+'"':"")+f+" "+e+' name="'+this._name+"["+a.hash.slug+"]"+d+'" id="'+this._id+"_"+a.hash.slug+'" class="block-input field-config caldera-field-bind'+c+'">',this[a.hash.slug]?out+='<option class="bound-field" value="'+this[a.hash.slug]+'" class="bound-field"></option>':a.hash.required||(out+='<option value=""></option>');for(var g in current_form_fields){var h="";a.hash.type&¤t_form_fields[g].type!==a.hash.type||(b[a.hash.slug]&&b[a.hash.slug]===g&&(h=' selected="selected"'),out+='<option value="'+g+'"'+h+">"+current_form_fields[g].label+" ["+current_form_fields[g].slug+"]</option>")}return out+="</select>",a.hash.required&&(out+='<input class="field-config" name="'+this._name+'[_required_bounds][]" type="hidden" value="'+a.hash.slug+'">'),out}),Handlebars.registerHelper("console",function(a,b){console.log(this)});var revisions={};jQuery(document).ready(function(a){function b(b){var d=a(b),e=d.closest(".caldera-editor-field-config-wrapper"),f=e.find(".caldera-config-field-setup"),g=compiled_templates[d.val()+"_tmpl"]?compiled_templates[d.val()+"_tmpl"]:compiled_templates.noconfig_field_templ,h=e.find(".field_config_string").val(),i=d.data("type");if(e.find(".caldera-config-group").show(),d.addClass("field-initialized"),h=h.length&&i===d.val()?JSON.parse(h):fieldtype_defaults[d.val()+"_cfg"],h||(h={}),h._id=d.data("field"),h._name="config[fields]["+d.data("field")+"][config]",g=a("<div>").html(g(h)),f.html(g.html()),"function"==typeof window[d.val()+"_init"]&&window[d.val()+"_init"](d.data("field"),f),fieldtype_defaults[d.val()+"_nosupport"]&&(fieldtype_defaults[d.val()+"_nosupport"].indexOf("hide_label")>=0&&e.find(".hide-label-field").hide().find(".field-config").prop("checked",!1),fieldtype_defaults[d.val()+"_nosupport"].indexOf("caption")>=0&&e.find(".caption-field").hide().find(".field-config").val(""),fieldtype_defaults[d.val()+"_nosupport"].indexOf("required")>=0&&e.find(".required-field").hide().find(".field-config").prop("checked",!1),fieldtype_defaults[d.val()+"_nosupport"].indexOf("custom_class")>=0&&e.find(".customclass-field").hide().find(".field-config").val(""),fieldtype_defaults[d.val()+"_nosupport"].indexOf("entry_list")>=0&&e.find(".entrylist-field").hide().find(".field-config").prop("checked",!1)),e.find(".toggle_show_values").trigger("change"),!a(".caldera-select-field-type").not(".field-initialized").length){if(core_form||(core_form=jQuery(".caldera-forms-options-form")),core_form.hasClass("builder-loaded"))c(d.data("field"));else{for(var j=a(".caldera-select-field-type.field-initialized"),k=0;k<j.length;k++)c(a(j[k]).data("field"));core_form.addClass("builder-loaded")}a(".caldera-header-save-button").prop("disabled",!1),rebuild_field_binding(),baldrickTriggers()}a(".color-field").length&&a(".color-field").wpColorPicker({change:function(b){var c=a(this);c.data("ev")&&clearTimeout(c.data("ev")),c.data("ev",setTimeout(function(){c.trigger("record")},200)),c.data("target")&&(a(c.data("target")).css(c.data("style"),c.val()),a(c.data("target")).val(c.val()))}})}function c(b){var c=a("#"+b),d=c.find(".caldera-select-field-type"),e=a('.layout-form-field[data-config="'+b+'"]'),f=e.find(".field_preview"),g=(a("#preview-"+d.val()+"_tmpl").html(),compiled_templates["preview-"+d.val()+"_tmpl"]),h={id:b};c.find(".field-config").each(function(c,d){for(var e=a(d),f=e.prop("name").split("["+b+"]")[1].substr(1),g=f.substr(0,f.length-1).split("]["),i=e.is(":checkbox,:radio")?e.filter(":checked").val():e.val(),j={},k=g.length-1;k>=0;k--)if(k===g.length-1)j[g[k]]=i;else{var l=j;j={},j[g[k]]=l}a.extend(!0,h,j)}),f.html(g(h)),e.removeClass("button"),a(".preview-field-config").prop("disabled",!0)}function d(b){var c,d=a(".caldera-editor-fields-panel"),e=(a(".caldera-editor-groups-panel"),a(".caldera-group-nav")),f=a('[data-group="'+b+'"]'),g=f.find(".caldera-config-group-name"),h=f.find(".caldera-config-group-slug"),i=f.find(".caldera-config-group-desc"),j=f.find(".caldera-config-group-admin"),k=a(".active-group-name"),l=a(".active-group-slug"),m=a(".active-group-desc"),n=a(".active-group-admin"),o=a(".caldera-editor-fields-list ul"),p=f.find(".caldera-config-group-repeat"),q=a(".repeat-config-button"),r=(a(".caldera-editor-group-settings"),a(".caldera-config-group-remove"));a(".new-group-input").remove(),a(".new-field-input").remove(),e.removeClass("active"),d.show(),o.hide(),o.removeClass("active").find("li.active").removeClass("active"),o.hide(),f.addClass("active"),c=a(".caldera-editor-fields-list ul.active li"),c.length?r.hide():r.show(),a(".caldera-editor-field-config-wrapper").hide(),f.show(),k.val(g.val()),l.val(h.val()),m.val(i.val()),"1"===j.val()?n.prop("checked",!0):n.prop("checked",!1),"1"===p.val()?q.addClass("field-edit-open"):q.removeClass("field-edit-open")}a(".caldera-header-save-button").baldrick({method:"POST",request:"admin.php?page=caldera-forms",before:function(b,c){if(c.preventDefault(),!check_required_bindings())return!1;a("#save_indicator").addClass("loading"),"undefined"!=typeof tinyMCE&&tinyMCE.triggerSave();var d=a(".caldera-forms-options-form").formJSON();return d.conditions&&(d.config.conditional_groups={conditions:d.conditions}),a(b).data("cf_edit_nonce",d.cf_edit_nonce),a(b).data("_wp_http_referer",d._wp_http_referer),a(b).data("sender","ajax"),a(b).data("config",JSON.stringify(d.config)),!0},callback:function(b){if(!1===b.data){var c=a(".updated_notice_box");c.stop().animate({top:0},200,function(){setTimeout(function(){c.stop().animate({top:-75},200)},2e3)})}},complete:function(b){a(".wrapper-instance-pane .field-config").prop("disabled",!1)}}),a("body").on("click",".toggle_processor_event input",function(b){var c=a(this),d=c.closest(".wrapper-instance-pane"),e=d.find(".caldera-config-processor-setup"),f=d.find(".caldera-config-processor-notice");c.is(":checked")?(c.parent().addClass("activated"),c.parent().find(".is_active").show().attr("aria-hidden",!1).css("visibility","visible"),c.parent().find(".not_active").hide().attr("aria-hidden",!0).css("visibility","hidden")):(c.parent().removeClass("activated"),c.parent().find(".is_active").hide().attr("aria-hidden",!0).css("visibility","hidden"),c.parent().find(".not_active").show().attr("aria-hidden",!1).css("visibility","visible")),d.find(".toggle_processor_event .activated").length?(e.slideDown(100),f.slideUp(100)):(e.slideUp(100),f.slideDown(100))}),a("body").on("click",".toggle_option_tab > a",function(b){b.preventDefault();var c=a(this),d=a(c.attr("href")),e=c.parent().find("a"),f=c.closest(".caldera-editor-config-wrapper").find(".wrapper-instance-pane");e.removeClass("button-primary"),f.hide(),d.show(),c.addClass("button-primary"),a(".caldera-conditionals-usetype").trigger("change")}),a(".caldera-editor-body").on("change",".caldera-select-field-type",function(a){b(this)}),a(".caldera-editor-body").on("click",".caldera-group-nav a",function(b){b.preventDefault(),d(a(this).attr("href").substr(1))}),a(".caldera-editor-body").on("click",".caldera-editor-fields-list a",function(b){b.preventDefault();var c=a(this),d=a(c.attr("href"));a(".new-group-input").remove(),a(".new-field-input").remove(),a(".caldera-editor-fields-list li.active").removeClass("active"),c.parent().addClass("active"),a(".caldera-editor-field-config-wrapper").hide(),d.show()}),a(".caldera-editor-body").on("click",".group-config-button",function(b){var c=a(this),d=a(".caldera-editor-group-settings"),e=c.closest(".caldera-editor-fields-panel"),f=a(".caldera-config-group-remove");e.find(".caldera-field-line").length?f.hide():f.show(),c.hasClass("field-edit-open")?(d.slideUp(100),c.removeClass("field-edit-open")):(d.slideDown(100),c.addClass("field-edit-open"))}),a(".caldera-editor-body").on("keydown",".field-config",function(b){a(this).is("textarea")||13===b.which&&b.preventDefault()}),a(".caldera-editor-body").on("change",".field-label",function(b){var c=a(this).closest(".caldera-editor-field-config-wrapper").prop("id");field_line=a('[data-field="'+c+'"]'),field_title=a("#"+c+" .caldera-editor-field-title, .layout-form-field.field-edit-open .layout_field_name"),slug=a("#"+c+" .field-slug"),field_line.find("a").html('<i class="icn-field"></i> '+this.value),field_title.text(this.value),"change"===b.type&&slug.trigger("change"),rebuild_field_binding()}),a(".caldera-editor-body").on("change",".active-group-name",function(b){b.preventDefault();var c=a(".caldera-group-nav.active"),d=(c.data("group"),c.find(".caldera-config-group-name")),e=c.find("span");"focusout"!==b.type||this.value.length||(this.value="Group "+(parseInt(c.index())+1)),d.val(this.value),e.text(this.value)}),a(".caldera-editor-body").on("change",".active-group-slug",function(b){b.preventDefault();var c=a(".caldera-group-nav.active"),d=(c.data("group"),c.find(".caldera-config-group-name").val()),e=c.find(".caldera-config-group-slug"),f=(c.find("span"),this.value.split(" ").join("_").split("-").join("_").replace(/[^a-z0-9_]/gi,"").toLowerCase());"focusout"!==b.type||this.value.length||(f=d.split(" ").join("_").split("-").join("_").replace(/[^a-z0-9_]/gi,"").toLowerCase()),e.val(f),this.value=f}),a(".caldera-editor-body").on("change",".active-group-desc",function(b){b.preventDefault();var c=a(".caldera-group-nav.active");(c.data("group"),c.find(".caldera-config-group-desc")).val(this.value)}),a(".caldera-editor-body").on("change",".active-group-admin",function(b){b.preventDefault();var c=a(".caldera-group-nav.active"),d=(c.data("group"),c.find(".caldera-config-group-name").val(),c.find(".caldera-config-group-admin"));c.find("span"),this.value.split(" ").join("_").split("-").join("_").replace(/[^a-z0-9_]/gi,"").toLowerCase(),a(this).prop("checked")?(d.val(1),c.addClass("is-admin")):(d.val(0),c.removeClass("is-admin"))}),a(".caldera-editor-body").on("click",".repeat-config-button",function(b){b.preventDefault();var c=a(".caldera-group-nav.active"),d=(c.data("group"),c.find("a .group-type")),e=c.find(".caldera-config-group-repeat"),f=a(this);f.hasClass("field-edit-open")?(e.val("0"),d.removeClass("icn-repeat").addClass("icn-folder"),f.removeClass("field-edit-open")):(e.val("1"),d.addClass("icn-repeat").removeClass("icn-folder"),f.addClass("field-edit-open"))}),a(".caldera-editor-body").on("click",".delete-field",function(){var b=a(this),c=b.closest(".caldera-editor-field-config-wrapper").prop("id");confirm(b.data("confirm"))&&(a("#"+c).remove(),a('option[value="'+c+'"]').remove(),a('[data-bind="'+c+'"]').remove(),delete current_form_fields[c],a('[data-config="'+c+'"]').slideUp(200,function(){a(this).remove(),rebuild_field_binding(),a(document).trigger("field.removed")}))}),a(".caldera-editor-body").on("click",".add-new-group,.add-field",function(){var b=a(this);if(a(".new-group-input").remove(),a(".new-field-input").remove(),b.hasClass("add-field")){a('<input type="text" class="new-field-input block-input">').appendTo(a(".caldera-editor-fields-list ul.active")).focus()}else{a('<input type="text" class="new-group-input block-input">').appendTo(a(".caldera-editor-groups-panel")).focus()}}),a(".caldera-editor-body").on("change keypress",".new-group-input",function(b){if("keypress"===b.type){if(13!==b.which)return;b.preventDefault()}var c,e,f=this.value,g=a(this),h=a(".caldera-editor-groups-panel ul"),i=a(".caldera-editor-fields-list");if(f.length){c=Handlebars.compile(a("#caldera_group_line_templ").html()),e={id:f.split(" ").join("_").split("-").join("_").replace(/[^a-z0-9_]/gi,"").toLowerCase(),name:f},h.append(c(e));a('<ul data-group="'+e.id+'">').hide().appendTo(i),g.remove(),d(e.id)}else g.remove()}),a(".caldera-editor-body").on("change keypress",".new-field-input",function(b){if("keypress"===b.type){if(13!==b.which)return;b.preventDefault()}var c,d,e,f=this.value,g=a(this),h=g.parent(),i=a(".caldera-editor-field-config"),j=a(".caldera-config-group-remove");if(f.length){j.hide(),c=Handlebars.compile(a("#caldera_field_line_templ").html()),d=Handlebars.compile(a("#caldera_field_config_wrapper_templ").html()),e={id:f.split(" ").join("_").split("-").join("_").replace(/[^a-z0-9_]/gi,"").toLowerCase(),label:f,slug:f.split(" ").join("_").split("-").join("_").replace(/[^a-z0-9_]/gi,"").toLowerCase(),group:a(".caldera-group-nav.active").data("group")};var k=a(c(e));k.appendTo(h),i.append(d(e)),k.find("a").trigger("click"),g.remove()}else g.remove()}),a(".caldera-editor-body").on("change",".field-slug",function(b){this.value.length?this.value=this.value.split(" ").join("_").split("-").join("_").replace(/[^a-z0-9_]/gi,"").toLowerCase():"change"===b.type&&(this.value=a(this).closest(".caldera-editor-field-config-wrapper").find(".field-label").val().split(" ").join("_").split("-").join("_").replace(/[^a-z0-9_]/gi,"").toLowerCase())}),a(".caldera-editor-body").on("click",".caldera-add-group",function(b){var c=a(this),d=c.data("group"),e=a("#"+d+"_panel_tmpl").html();c.parent().parent().append(e)}),a(".caldera-editor-body").on("click",".caldera-config-group-remove",function(b){var c=a(".active-group-slug").val();a('[data-group="'+c+'"]').hide(0,function(){a(this).remove();var b=a(".caldera-group-nav");b.length?b.first().find("a").trigger("click"):a(".caldera-editor-fields-panel").hide()})}),a("body").on("click",".set-current-field",function(b){b.preventDefault();var c=a(this);a("#"+c.data("field")+"_type").val(c.data("type")).trigger("change"),a("#"+c.data("field")+"_lable").focus(),a("#field_setup_baldrickModalCloser").trigger("click")}),a(".caldera-editor-body").on("change record",".field-config",function(b){var d=a(this),e=d.closest(".caldera-editor-field-config-wrapper");current_form_fields&&(d.prop("id")===e.prop("id")+"_lable"&&(current_form_fields[e.prop("id")].label=this.value),d.prop("id")===e.prop("id")+"_slug"&&(current_form_fields[e.prop("id")].slug=this.value),d.prop("id")===e.prop("id")+"_type"&&(current_form_fields[e.prop("id")].type=this.value),e.length&&c(e.prop("id")))}),a(".caldera-editor-body").on("focus",".caldera-field-bind",function(b){var c=a(this),d=this.value;if(b.type&&"focusin"===b.type)return c.removeClass("bound_field").addClass("reload-binding"),rebind_field_bindings(),void(this.value=d)}),a(".caldera-editor-body").on("change",".caldera-conditional-field-set",function(b){var c,d,e=a(this),f=e.parent().find(".compare-type"),g=e.data("condition"),h=e.data("id"),i="config["+g+"]["+h+"][conditions][group]["+e.data("row")+"]["+e.data("line")+"]",j=e.data("line"),k=a("#"+j+"_value"),l=k.find(".caldera-conditional-value-field").first(),m=[],n=this.value;if("{"!==n.substr(0,1)&&(c=a("#"+n),d=c.find(".field-button-type"),m=c.find(".caldera-config-group-toggle-options")),e.hasClass(".bind_init")&&e.addClass("bound_triggered"),l.length&&l.val().length&&k.data("value",l.val()),f.show(),m.length){var o=m.find(".toggle_option_row"),p='<select name="'+i+'[value]" class="caldera-processor-value-bind caldera-conditional-value-field" data-field="'+n+'" style="max-width: 220px; width: 220px;">';p+='<option value=""></option>',o.each(function(b,c){var d=a(c).find(".toggle_label_field"),e=d.data("option"),f="";k.data("value")&&(k.data("value").toString()!==e&&k.data("value").toString()!==a(c).find(".toggle_value_field").val()||(f=' selected="selected"')),p+='<option value="'+e+'"'+f+">"+d.val()+"</option>"}),p+="</select>"}else d&&"button"==d.val()?(f.val("is").hide(),p='<select name="'+i+'[value]" class="caldera-processor-value-bind caldera-conditional-value-field" data-field="'+n+'" style="max-width: 220px; width: 220px;">',p+='<option value="click" '+("click"===k.data("value")?'selected="selected"':"")+">Click</option>",p+='<option value="dblclick" '+("dblclick"===k.data("value")?'selected="selected"':"")+">Double Click</option>",p+="</select>"):p='<input name="'+i+'[value]" type="text" class="caldera-conditional-value-field magic-tag-enabled" value="'+(k.data("value")?k.data("value"):"")+'" style="max-width: 205px;">';k.html(p),init_magic_tags()}),a(".caldera-editor-body").on("change",".caldera-conditionals-usetype",function(b){var c=a(this);"show"===this.value||"hide"===this.value||"disable"===this.value||"use"===this.value||"not"===this.value?(a("#"+c.data("id")+"_condition_group_add").show(),a("#"+c.data("id")+"_conditional_wrap").show()):(a("#"+c.data("id")+"_condition_group_add").hide(),a("#"+c.data("id")+"_conditional_wrap").hide())}),a(".caldera-editor-body").on("click",".remove-conditional-line",function(b){b.preventDefault();var c=a(this),d=c.closest(".caldera-condition-line"),e=c.closest(".caldera-condition-group");d.remove(),e.find(".caldera-condition-line").length||e.remove()}),a(".caldera-group-nav").first().find("a").trigger("click"),a(".caldera-editor-body").on("change",".toggle_show_values",function(b){var c=a(this),d=c.closest(".caldera-config-group-toggle-options");values=d.find(".toggle_value_field"),lables=d.find(".toggle_label_field"),field_lables=d.find(".caldera-config-group-option-labels"),c.prop("checked")?(values.show().parent().show(),values.show().parent().parent().show(),lables.css("width",""),field_lables.show()):(values.hide().parent().hide(),lables.css("width",245),field_lables.hide()),lables.trigger("toggle.values"),init_magic_tags()}),a(".caldera-editor-body").on("change",".auto-populate-type",function(){a(this).closest(".wrapper-instance-pane").find(".auto-populate-options").trigger("change")}),a(".caldera-editor-body").on("change",".auto-populate-options",function(){var b=a(this),c=b.closest(".wrapper-instance-pane"),d=c.find(".caldera-config-group-toggle-options"),e=c.find(".caldera-config-group-auto-options"),f=e.find(".auto-populate-type");e.find(".auto-populate-type-panel").hide(),b.prop("checked")?(d.hide(),e.show()):(d.show(),e.hide()),e.find(".caldera-config-group-auto-"+f.val()).show()}),a("body").on("change",".pin-toggle-roles",function(){var b=a(this),c=a("#caldera-pin-rules");"1"===b.val()?c.show():c.hide()}),a("body").on("click",".magic-tag-init",function(b){
|
3 |
-
a(this).prev().focus().trigger("init.magic")}),a("body").on("keyup focus select click init.magic",".magic-tag-enabled",function(b){init_magic_tags();var c=a(this),d=c.parent(),e=d.closest(".wrapper-instance-pane").find(".caldera-select-field-type").val()?d.closest(".wrapper-instance-pane").find(".caldera-select-field-type").val():"hidden",f=d.find(".magic-tags-autocomplete"),g=f.find("ul"),h=this.value,i=[],j="",k=this.selectionStart,l=this.selectionEnd;if(f.length&&f.data("focus"))return void b.preventDefault();if(c.data("tag",""),this.selectionEnd>this.selectionStart)j=this.value.substr(this.selectionStart,this.selectionEnd-this.selectionStart);else if(("select"===b.type||"keyup"===b.type)&&40!==b.which&&38!==b.which&&39!==b.which&&37!==b.which){for(k=this.selectionStart;k>0;k--){var m=h.substr(k-1,1);if(" "===m||"\n"===m||("%"===m||"}"===m)&&this.selectionStart===k)break}for(l=this.selectionStart;l<h.length;l++){var m=h.substr(l,1);if(" "===m||"\n"===m||("%"===m||"{"===m)&&this.selectionStart===l)break}j=h.substr(k,l-k)}if("focusout"!==b.type){"init"!==b.type&&j.length<3&&f.length&&f.remove(),f.length||(f=a('<div class="magic-tags-autocomplete"></div>'),g=a("<ul></ul>"),g.appendTo(f),f.insertAfter(c),f.on("mouseenter",function(){a(this).data("focus",!0)}),f.on("mouseleave",function(){a(this).data("focus",!1),setTimeout(function(){f.remove()},200),c.is(":focus")||c.trigger("focusout")})),g.empty();var n="system",o=!1;"hidden"===e||"dropdown"===e||"radio"===e||"toggle_switch"===e||"checkbox"===e?(o=!0,e="text",n="all"):"paragraph"!==e&&"html"!==e||(e="text"),c.data("type")&&(e=c.data("type")),e=e.split(","),e.push("vars");for(var p=0;p<e.length;p++)for(var q in system_values)if(void 0!==system_values[q].tags&&void 0!==system_values[q].tags[e[p]]){if(i=[q],"system"!==q&&"variable"!==q&&"field"!==q){var r=jQuery(".processor-"+q),s=c.closest(".caldera-editor-processor-config-wrapper"),t=s.prop("id");i=[];for(var u=0;u<r.length;u++)if(s.length||!0!==o){if(t===r[u].id)continue;jQuery("li."+r[u].id).index()<jQuery("li."+t).index()&&i.push(r[u].id)}else i.push(r[u].id)}for(var v=0;v<i.length;v++)if("all"===n||n===q||"variable"===q){var w=a('<li class="header">'+system_values[q].type+(v>0?" ["+(v+1)+"]":"")+"</li>"),x=0;w.appendTo(g);for(var y=0;y<system_values[q].tags[e[p]].length;y++)if(!c.data("parent")||"variable:"+c.data("parent")!==system_values[q].tags[e[p]][y]){var z=system_values[q].wrap[0]+system_values[q].tags[e[p]][y]+system_values[q].wrap[1];if(i[v]!==q&&i.length>1&&(z=system_values[q].wrap[0]+system_values[q].tags[e[p]][y]+":"+i[v]+system_values[q].wrap[1]),z.indexOf(j)>=0||"init"===b.type){x+=1;var A=z.replace(j,"<strong>"+j+"</strong>"),B=a('<li class="tag" data-tag="'+z+'">'+A+"</li>");B.on("click",function(){var b=a(this).data("tag");c.val(h.substr(0,k)+b+h.substr(l)).trigger("change").focus(),c[0].selectionStart=k+b.length-(b.indexOf("*")>0?2:0),c[0].selectionEnd=k+b.length-(b.indexOf("*")>0?1:0),l=k=c[0].selectionEnd,h+=b,c.trigger("init.magic")}),B.appendTo(g)}}0===x&&w.remove()}}}g.children().length||f.remove(),"focusout"===b.type&&setTimeout(function(){f.remove()},200)});for(var e=a(".cf-editor-template"),f=0;f<e.length;f++)compiled_templates[e[f].id]=Handlebars.compile(e[f].innerHTML);a(".caldera-select-field-type").not(".field-initialized").each(function(a,c){b(c)})});var rebuild_field_binding,rebind_field_bindings,current_form_fields={},required_errors={},add_new_grid_page,add_page_grid,init_magic_tags,core_form,compiled_templates={};init_magic_tags=function(){jQuery(".magic-tag-enabled").each(function(a,b){var c=jQuery(b);if(c.hasClass("magic-tag-init-bound")){var d=c.parent().find(".magic-tag-init");return void(c.is(":visible")?d.show():d.hide())}var e=jQuery('<span class=""></span>'),f=jQuery('<span style="position:relative;display:inline-block; width:100%;"></span>');c.is("input")&&e.css("borderBottom","none"),c.hasClass("caldera-conditional-value-field")&&f.width("auto"),c.wrap(f),e.insertAfter(c),c.addClass("magic-tag-init-bound"),c.is(":visible")?e.show():e.hide()})},rebuild_field_binding=function(){if(core_form||(core_form=jQuery(".caldera-forms-options-form")),core_form.hasClass("builder-loaded")){var a=jQuery(".caldera-editor-field-config-wrapper");system_values.field={tags:{text:[]},type:"Fields",wrap:["%","%"]};for(var b=0;b<a.length;b++){var c=a[b].id,d=jQuery("#"+c+"_lable").val(),e=jQuery("#"+c+"_slug").val(),f=jQuery("#"+c+"_type").val();void 0===system_values.field.tags[f]&&(system_values.field.tags[f]=[]),system_values.field.tags[f].push(e),"text"!==f&&system_values.field.tags.text.push(e),current_form_fields[c]={label:d,slug:e,type:f},jQuery("option.bound-field").trigger("change").each(function(a,b){var c=jQuery(b);0!==c.prop("value").indexOf("{")?c.text(jQuery("#"+c.prop("value")+"_lable").val()+" ["+jQuery("#"+c.prop("value")+"_lable").val()+"]"):c.text(c.prop("value").replace("{","").replace("}",""))}).removeClass("bound-field")}}},rebind_field_bindings=function(){var a,b,c=jQuery(".caldera-field-bind").not(".bound_field");if(c.length){c.addClass("bound_field");for(var d=0;d<c.length;d++){var e=jQuery(c[d]),f=e.val(),g=e.data("default"),h=e.data("exclude"),i=0,j=e.closest(".caldera-editor-processor-config-wrapper"),k=j.prop("id"),l="";if(g&&!e.hasClass("reload-binding")&&(f=g),e.is("select")){e.empty();var m=jQuery('<optgroup label="Fields">');for(var n in current_form_fields)e.data("type")&&e.data("type").split(",").indexOf(current_form_fields[n].type)<0||(e.data("id")!==n&&m.append('<option value="'+n+'"'+(f===n?'selected="selected"':"")+">"+current_form_fields[n].label+" ["+current_form_fields[n].slug+"]</option>"),i+=1);m.appendTo(e),0===i&&e.empty();for(var o in system_values)if(a=[],!(h&&h.split(",").indexOf(o)>=0)){if("system"!==o&&"variable"!==o)for(var p=jQuery(".processor-"+o),q=0;q<p.length;q++)k!==p[q].id&&(a.push(p[q].id),p.length>1&&(b=jQuery("li."+p[q].id+" .processor-line-number"))&&b.html("["+(q+1)+"]"));else a.push("__system__");var r=[];e.data("type")?(r=e.data("type").split(","),r.push("vars")):r=["text","vars"];for(var s=0;s<r.length;s++)if(system_values[o].tags&&system_values[o].tags[r[s]])for(var t=0;t<a.length;t++){jQuery("li."+a[t]).index()>jQuery("li."+k).index()&&"__system__"!==a[t]?e.closest(".caldera-editor-processors-panel-wrap").length&&(l=' disabled="disabled"'):l="";for(var m=jQuery('<optgroup label="'+system_values[o].type+("__system__"!==a[t]?" "+jQuery("li."+a[t]).find(".processor-line-number").html():"")+'"'+l+">"),u=0;u<system_values[o].tags[r[s]].length;u++){var v=system_values[o].tags[r[s]][u];"__system__"!==a[t]&&(v=v.replace(o,a[t])),m.append('<option value="{'+v+'}"'+(f==="{"+v+"}"?'selected="selected"':"")+l+">"+system_values[o].tags[r[s]][u]+"</option>"),i+=1}m.children().length&&m.appendTo(e)}}if(0===i){if(e.empty(),e.data("type")){e.append('<option value="">No '+e.data("type").split(",").join(" or ")+" in form</option>");var w=!0}}else e.prop("disabled",!1);e.hasClass("required")||void 0!==w||e.prepend('<option value=""></option>'),e.val(f)}}init_magic_tags(),jQuery(document).trigger("bound.fields"),jQuery(".caldera-header-save-button").prop("disabled",!1)}},jQuery(document).ready(function(a){function b(){var b=a(".layout-grid-panel"),c=0;b.each(function(b,d){var e=a(d),f=e.find(".layout-structure"),g=e.find(".row"),h=[];g.each(function(b,d){var e=a(d),f=e.children().not(".column-merge"),g=[];c+=1,f.each(function(b,d){span=a(d).attr("class").split("-"),g.push(span[2]);var e=a(d).find(".field-location");e.length&&e.each(function(d,e){a(e).val(c+":"+(b+1)).removeAttr("disabled")})}),h.push(g.join(":"))}),f.val(h.join("|"))})}function c(b,c,e){var f,g,h="fld_"+Math.round(1e7*Math.random()),i=h,j=a("#field_config_panels");b.prop("id","").prop("title",""),f=Handlebars.compile(a("#caldera_field_config_wrapper_templ").html()),g=a.extend({},{id:i,label:"",slug:""},e),g.slug="",j.append(f(g)),b.removeClass("button-small").removeClass("button").removeClass("button-primary").removeClass("ui-draggable").removeClass("layout-new-form-field").addClass("layout-form-field").attr("data-config",h).css({display:"",opacity:""}),b.find(".layout_field_name").remove(),b.find(".field-location").prop("name","config[layout_grid][fields]["+h+"]"),b.find(".settings-panel").show(),b.appendTo(c),d(),b.find(".icon-edit").trigger("click"),a("#"+h+"_lable").focus().select(),baldrickTriggers(),a(document).trigger("field.added"),e?a("#"+i+"_type").data("type",g.type).trigger("change"):a("#"+h).trigger("field.drop"),rebuild_field_binding()}function d(){a(".toggle-options").sortable({handle:".dashicons-sort"}),a("#grid-pages-panel").sortable({placeholder:"row-drop-helper",handle:".sort-handle",items:".first-row-level",axis:"y",stop:function(){b()}}),a(".layout-column").sortable({connectWith:".layout-column",appendTo:"#grid-pages-panel",helper:"clone",items:".layout-form-field",handle:".drag-handle",cursor:"move",opacity:.7,cursorAt:{left:100,top:15},start:function(a,b){b.helper.css({width:"200px",height:"35px",paddingTop:"20px"})},stop:function(a,c){c.item.removeAttr("style"),b()}}),a("h3 .layout-new-form-field").draggable({helper:"clone",appendTo:"body"}),a(".page-toggle.button").droppable({accept:".layout-form-field",over:function(b,c){a(this).trigger("click"),a(".layout-column").sortable("refresh")}}),a(".layout-column").droppable({greedy:!0,activeClass:"ui-state-dropper",hoverClass:"ui-state-hoverable",accept:".layout-new-form-field",drop:function(b,d){c(d.draggable.clone(),a(this))}}),b()}function e(){if(h){var b=a(".column-fieldinsert");b.length?(b.stop().fadeToggle(700),a(".layout-new-form-field").stop().fadeToggle(700)):cf_clear_puler()}}function f(){a(".caldera-editor-processors-panel ul").sortable({update:function(){rebuild_field_binding()}})}function g(b){var c=a(b),d=a("#"+c.val()+"-tmpl").length?a("#"+c.val()+"-tmpl").html():"",e=c.closest(".caldera-editor-processor-config-wrapper"),f=e.find(".caldera-config-processor-setup"),g=Handlebars.compile(d),h=e.find(".processor_config_string").val(),i=c.data("type");h=h.length&&i===c.val()?JSON.parse(h):processor_defaults[c.val()+"_cfg"],h||(h={}),h._id=e.prop("id"),h._name="config[processors]["+e.prop("id")+"][config]",g=a("<div>").html(g(h)),f.html(g.html()),"function"==typeof window[c.val()+"_init"]&&window[c.val()+"_init"](e.prop("id"),f),e.find(".no-conditions").length&&e.find(".toggle_option_tab").remove(),rebuild_field_binding(),baldrickTriggers(),a(".wp-baldrick").baldrick({request:ajaxurl,method:"POST",before:function(b){var c=a(b);c.data("addNode")&&!c.data("request")&&c.data("request","cf_get_default_setting")}})}add_new_grid_page=function(a){return{page_no:"pg_"+Math.round(1e7*Math.random())}},add_page_grid=function(b){var c=a(".page-toggle").length+1,e=a('<button type="button" data-name="Page '+c+'" data-page="'+b.rawData.page_no+'" class="page-toggle button">'+b.params.trigger.data("addtitle")+" "+c+"</button> "),f=a("#page-toggles");e.appendTo(f),f.show(),d(),e.trigger("click"),1===c&&f.hide(),a(document).trigger("add.page")},a(document).on("remove.page add.page load.page",function(b){var c=a(".page-toggle").length,d=a("#tab_pages");c<=1?d.hide():d.show()}),d(),a("#grid-pages-panel").on("click",".column-fieldinsert .dashicons-plus-alt",function(b){var d=a(this).closest(".column-container");c(a("#newfield-tool").clone().css("display",""),d)}),a("#grid-pages-panel").on("click",".column-split",function(b){var c=a(this).parent().parent(),e=c.attr("class").split("-"),f=a("<div>").insertAfter(c),g=Math.ceil(e[2]/2),h=Math.floor(e[2]/2);e[2]=g,c.attr("class",e.join("-")),e[2]=h,f.addClass(e.join("-")).append('<div class="layout-column column-container">'),a(this).remove(),d(),jQuery(".column-tools").remove(),jQuery(".column-merge").remove()}),a("#grid-pages-panel").on("click",".column-remove",function(c){var d=a(this).closest(".row"),e=d.find(".layout-form-field"),f=d.closest(".layout-grid-panel");if(e.length){if(!confirm(a("#row-remove-fields-message").text()))return;e.each(function(b,c){var d=a(c).data("config");a("#"+d).remove(),a('option[value="'+d+'"]').remove(),a('[data-bind="'+d+'"]').remove(),delete current_form_fields[d]})}d.slideUp(200,function(){if(a(this).remove(),b(),rebuild_field_binding(),!f.find(".row").length){f.remove();var c=a("#page-toggles .button-primary"),d=c.prev(),e=c.next();c.remove(),d.length?d.trigger("click"):e.trigger("click")}a(document).trigger("remove.page")}),jQuery(".column-tools").remove(),jQuery(".column-merge").remove()}),a(".caldera-config-editor-main-panel").on("click",".caldera-add-row",function(c){if(c.preventDefault(),!a(".page-active").length)return void a(".caldera-add-page").trigger("click");var e=a('<div style="display:none;" class="first-row-level row"><div class="col-xs-12"><div class="layout-column column-container"></div></div></div>');a(".page-active").append(e),e.slideDown(200),d(),b()}),a("#grid-pages-panel").on("click",".column-join",function(c){var d=a(this).parent().parent().parent(),e=d.prev(),f=e.attr("class").split("-"),g=d.attr("class").split("-");f[2]=parseFloat(f[2])+parseFloat(g[2]),d.find(".layout-column").contents().appendTo(e.find(".layout-column")),e.attr("class",f.join("-")),d.remove(),b(),jQuery(".column-tools").remove(),jQuery(".column-merge").remove()}),a("#grid-pages-panel").on("mouseenter",".row",function(c){var d=jQuery(this);jQuery(".column-tools,.column-merge").remove(),d.children().children().first().append('<div class="column-remove column-tools"><i class="icon-remove"></i></div>'),d.children().children().last().append('<div class="column-sort column-tools" style="text-align:right;"><i class="dashicons dashicons-menu drag-handle sort-handle"></i></div>'),d.children().children().not(":first").prepend('<div class="column-merge"><div class="column-join column-tools"><i class="icon-join"></i></div></div>');var e=d.parent().parent().parent().width()/12-1;d.children().children().each(function(b,c){var d=a(c),e=d.width()/2-5;d.prepend('<div class="column-fieldinsert column-tools"><i class="dashicons dashicons-plus-alt"></i></div>'),d.parent().hasClass("col-xs-1")||(d.prepend('<div class="column-split column-tools"><i class="dashicons dashicons-leftright"></i></div>'),d.find(".column-split").css("left",e))}),jQuery(".column-merge").draggable({axis:"x",helper:"clone",appendTo:d,grid:[e,0],drag:function(c,d){a(this).addClass("dragging"),a(".column-tools").remove(),a(".column-split").remove();var e=a(this).parent().parent(),f=d.helper,g=d.originalPosition.left>f.position().left?"left":"right",h=e.prev(),i=Math.round(e.parent().width()/12-10),j=Math.abs(d.originalPosition.left-f.position().left);if(e.parent().addClass("sizing"),j>=i){var k=h.attr("class").split("-"),l=e.attr("class").split("-");k[2]=parseFloat(k[2]),l[2]=parseFloat(l[2]),"left"===g?(k[2]--,l[2]++,k[2]>0&&k[2]<k[2]+l[2]?(h.attr("class",k.join("-")),e.attr("class",l.join("-")),d.originalPosition.left=f.position().left):a(this).draggable("option","disabled",!0)):(k[2]++,l[2]--,l[2]>0&&l[2]<l[2]+l[2]?(h.attr("class",k.join("-")),e.attr("class",l.join("-")),d.originalPosition.left=f.position().left):a(this).draggable("option","disabled",!0)),b()}},stop:function(){a(this).removeClass("dragging").parent().parent().parent().removeClass("sizing")}})}),a("#grid-pages-panel").on("mouseleave",".row",function(a){jQuery(".column-tools").remove(),jQuery(".column-merge").remove()}),a("#grid-pages-panel").on("click",".layout-form-field .icon-remove",function(){var b=a(this),c=b.parent(),d=a("#"+c.data("config"));c.slideUp(100,function(){a(this).remove()}),d.slideUp(100,function(){a(this).remove()})}),a(document).on("click",".layout-form-field .dashicons-admin-page",function(){var b=a(this),d=b.parent(),e=d.data("config"),f=a("#"+e).formJSON(),g=b.closest(".column-container"),h=d.clone().css("display",""),i={};d.hasClass("field-edit-open")&&(d.removeClass("field-edit-open"),h.removeClass("field-edit-open"),a(".caldera-editor-field-config-wrapper").hide()),f.config.fields[e]&&(i=f.config.fields[e],delete i.ID),c(h,g,i)}),a(document).on("click",".layout-form-field .icon-edit",function(){var b=a(this),c=b.parent(),d=a("#"+c.data("config")+"_type").val();a(".caldera-editor-field-config-wrapper").hide(),c.hasClass("field-edit-open")?c.removeClass("field-edit-open"):(a(".layout-form-field").removeClass("field-edit-open"),c.addClass("field-edit-open"),a("#"+c.data("config")).show()),a(document).trigger("show."+c.data("config")),a(document).trigger("show.fieldedit"),"radio"!==d&&"checkbox"!==d&&"dropdown"!==d&&"toggle_switch"!==d||a("#"+c.data("config")+"_auto").trigger("change")}),a("body").on("click",".layout-modal-edit-closer,.layout-modal-save-action",function(b){b.preventDefault();var c=a(this),d=a(".layout-form-field.edit-open"),e=c.closest(".layout-modal-container");settings=e.find(".settings-panel").first(),a(".edit-open").removeClass("edit-open"),settings.appendTo(d.find(".settings-wrapper")).hide(),e.hide()}),a(".layout-editor-body").on("change",".layout-core-pod-query",function(){a(this).parent().find(".settings-panel-row").remove(),a(".edit-open").find(".drag-handle .set-pod").html(" - "+a(this).val())}),a(".layout-editor-body").on("click",".remove-where",function(){a(this).closest(".settings-panel-row").remove()}),a(".layout-editor-body").on("click",".use-pod-container",function(){var b=a(this),c=b.prev(),d=c.val();if(d.length){a(".edit-open").find(".drag-handle .set-pod").html(" - "+c.val()),b.parent().parent().find(".spinner").css("display","inline-block");var e={action:"pq_loadpod",pod_reference:{pod:d}};a.post(ajaxurl,e,function(c){b.parent().find(".spinner").css("display","none");var d=a("#where-line-tmpl").html(),e="",f=b.closest(".settings-panel").data("container");for(var g in c)e+='<option value="'+c[g]+'">'+c[g]+"</option>";d=d.replace(/{{fields}}/g,e).replace(/{{container_id}}/g,f),b.parent().append(d)})}}),a(".caldera-editor-header").on("click",".column-sort .icon-edit",function(a){}),a(".layout-editor-body").on("tray_loaded",".layout-template-tray",function(){d()}),a(".caldera-editor-header").on("click",".caldera-editor-header-nav a",function(b){b.preventDefault();var c=a(this);a(".caldera-editor-header-nav li").removeClass("active"),a(".caldera-editor-body").hide(),a(c.attr("href")).show(),c.parent().addClass("active"),rebind_field_bindings()}),a("body").on("change",".required",function(){check_required_bindings(this)}),a("body").on("submit",".caldera-forms-options-form",function(b){a(".required.has-error").length&&b.preventDefault()}),a(".caldera-editor-body").on("click",".add-toggle-option",function(b){var c=a(this);if(c.data("bulk"))return a(c.data("bulk")).toggle(),void a(c.data("bulk")).find("textarea").focus();var d=c.closest(".caldera-editor-field-config-wrapper"),e=d.find(".toggle-options"),f=a("#field-option-row-tmpl").html(),g=Handlebars.compile(f),h="opt"+parseInt(1048576*(Math.random()+1)),i={_name:"config[fields]["+d.prop("id")+"][config]",option:{}};if(c.data("options")){for(var j=a(c.data("options")),k=j.val().split("\n"),l=!1,m=0;m<k.length;m++){var n=k[m],o=n,p=o.split("|");p.length>1&&(o=p[0],n=p[1],l=!0),i.option["opt"+parseInt(1048576*(Math.random()+m))]={value:o,label:n,default:!1}}a(c.data("options")).parent().hide(),j.val(""),!0===l?d.find(".toggle_show_values").prop("checked",!0):d.find(".toggle_show_values").prop("checked",!1),e.empty()}else i.option[h]={value:"",label:"",default:!1};a(".preset_options").val(""),e.append(g(i)),d.find(".toggle_show_values").trigger("change"),a(".toggle-options").sortable({handle:".dashicons-sort"}),k||e.find(".toggle_label_field").last().focus()}),a(".caldera-editor-body").on("change",".preset_options",function(b){var c=a(this),d=c.val(),e=a(c.data("bulk"));preset_options&&preset_options[d]&&preset_options[d].data&&("object"==typeof preset_options[d].data&&preset_options[d].data.length&&(preset_options[d].data=preset_options[d].data.join("\n")),e.val(preset_options[d].data))}),a(".caldera-editor-body").on("click",".toggle-remove-option",function(b){var c=a(this).closest(".caldera-editor-field-config-wrapper").find(".field-config").first();a(this).parent().remove(),c.trigger("change"),a(document).trigger("option.remove")}),a(".caldera-editor-body").on("click",".page-toggle",function(b){var c=a(this),d=c.parent(),e=d.find(".button");e.removeClass("button-primary"),a(".layout-grid-panel").hide().removeClass("page-active"),a("#"+c.data("page")).show().addClass("page-active"),c.addClass("button-primary"),e.each(function(b,c){a(c).html(d.data("title")+" "+(b+1))}),1===e.length&&d.hide()}),a(".caldera-editor-body").on("blur toggle.values",".toggle_label_field",function(b){var c=a(this),d=c.prev();d.val().length||d.val(c.val())}),a(document).on("change focusout",".toggle_value_field",function(){a(document).trigger("show.fieldedit")}),a(document).on("show.fieldedit option.remove",function(b){a(".toggle_value_field.has-error").removeClass("has-error");for(var c=a("#"+a(".layout-form-field.field-edit-open").data("config")),d=c.find(".toggle_value_field"),e=c.find(".notice"),f=0,g=0;g<d.length;g++){for(var h=(d[g].value,0),i=0;i<d.length;i++)d[g]!==d[i]&&d[g].value===d[i].value&&(a(d[i]).addClass("has-error"),h++);h>0&&(a(d[g]).addClass("has-error"),f++)}f>0?(e.slideDown(),b.preventDefault()):e.slideUp()});var h=!1;focus_initial_field=function(b){var c=a(".layout-grid-panel .icon-edit").first();c.length?c.trigger("click"):(a(".layout-column.column-container").first().trigger("mouseover"),h=setInterval(e,500)),a(document).off("load.page",focus_initial_field)},a(document).on("load.page",focus_initial_field),cf_clear_puler=function(){h&&(clearTimeout(h),a(document).off("mouseover",".layout-new-form-field, .column-fieldinsert",cf_clear_puler)),a(".layout-new-form-field, .column-fieldinsert").fadeIn()},a(document).on("mouseover",".layout-new-form-field, .column-fieldinsert",cf_clear_puler),rebuild_field_binding(),a(document).trigger("load.page"),a("body").on("click",".caldera-processor-nav a",function(b){b.preventDefault();var c=a(this);a(".caldera-processor-nav").removeClass("active"),a(".caldera-editor-processor-config-wrapper").hide(),a(c.attr("href")).show(),c.parent().addClass("active")}),a("body").on("click",".add-new-processor",function(b){var c=a(this),d=Handlebars.compile(a("#processor-wrapper-tmpl").html());wrap=a(".active-processors-list"),process_conf=a(".caldera-editor-processor-config"),processid=Math.round(1e8*Math.random()),new_templ=Handlebars.compile(a("#processor-line-tmpl").html()),new_proc={id:"fp_"+processid,type:c.data("type")},wrap.append(new_templ(new_proc)),process_conf.append(d(new_proc)),a("#form_processor_baldrickModalCloser").trigger("click"),a(".caldera-processor-nav a").last().trigger("click"),a("#fp_"+processid+"_type").val(c.data("type")).trigger("change"),f(),baldrickTriggers()}),a("body").on("click",".delete-processor",function(b){var c=a(this),d=c.closest(".caldera-editor-processor-config-wrapper");d.data("type"),confirm(c.data("confirm"))&&(a("."+d.prop("id")).remove(),d.remove(),a(".caldera-processor-nav a").first().trigger("click"),rebuild_field_binding())}),a("body").on("change",".caldera-select-processor-type",function(b){var c=a(this),d=c.closest(".caldera-editor-processor-config-wrapper"),e=c.find('option[value="'+c.val()+'"]').text(),f=d.find(".caldera-editor-processor-title"),h=a(".caldera-processor-nav.active a");""===e&&(e=f.data("title")),f.html(e),h.html(e+' <span class="processor-line-number"></span>').parent().addClass("processor_type_"+c.val()),g(this),rebuild_field_binding()}),a(document).on("click","#cf-shortcode-preview",function(){a(this).focus().select()}),a(document).on("change",".cf-email-preview-toggle",function(){var b=a(this),c=a(".caldera-header-email-preview-button");b.is(":checked")?c.show().attr("aria-hidden","false").css("visibility","visible"):c.hide().attr("aria-hidden","true").css("visibility","hidden")}),rebuild_field_binding(),a(".caldera-select-processor-type").each(function(a,b){g(b)}),f()}),Handlebars.registerHelper("_field",function(a){var b=this,c="",d="",e="",f=this[a.hash.slug]?' data-default="'+this[a.hash.slug]+'"':"";a.hash.required&&(c=" required"),a.hash.exclude&&(e='data-exclude="'+a.hash.exclude+'"'),a.hash.array&&(d="[]","true"!==a.hash.array&&(f='value="'+a.hash.array+'"')),out="<select "+(a.hash.type?'data-type="'+a.hash.type+'"':"")+f+" "+e+' name="'+this._name+"["+a.hash.slug+"]"+d+'" id="'+this._id+"_"+a.hash.slug+'" class="block-input field-config caldera-field-bind'+c+'">',this[a.hash.slug]?out+='<option class="bound-field" value="'+this[a.hash.slug]+'" class="bound-field"></option>':a.hash.required||(out+='<option value=""></option>');for(var g in current_form_fields){var h="";a.hash.type&¤t_form_fields[g].type!==a.hash.type||(b[a.hash.slug]&&b[a.hash.slug]===g&&(h=' selected="selected"'),out+='<option value="'+g+'"'+h+">"+current_form_fields[g].label+" ["+current_form_fields[g].slug+"]</option>")}return out+="</select>",a.hash.required&&(out+='<input class="field-config" name="'+this._name+'[_required_bounds][]" type="hidden" value="'+a.hash.slug+'">'),out}),Handlebars.registerHelper("console",function(a,b){console.log(this)});
|
1 |
+
function pre_compile_templates(){for(var a=jQuery(".cf-editor-template"),b=0;b<a.length;b++)compiled_templates[a[b].id]=Handlebars.compile(a[b].innerHTML)}function get_compiled_template(a){return"object"!=typeof compiled_templates&&pre_compile_templates(),compiled_templates[a+"_tmpl"]?compiled_templates[a+"_tmpl"]:compiled_templates.noconfig_field_templ}function setup_field_type(a){return{id:a.trigger.prop("id")}}function check_required_bindings(a){var b,c=(jQuery(".caldera-header-save-button"),jQuery(".layout-form-field")),d=jQuery(".caldera-processor-nav"),e=!0;b=a?jQuery(a):jQuery(".caldera-config-field .required"),b.removeClass("has-error"),c.removeClass("has-error"),d.removeClass("has-error"),jQuery(".error-tag").remove(),required_errors={},b.each(function(a,b){var c=jQuery(b),d=c.closest(".caldera-config-editor-panel");if(b.value.length){if(c.hasClass("field-slug"))for(var f=jQuery(".field-slug").not(c),g=0;g<f.length;g++)if(f[g].value===b.value){var c=jQuery(f[g]);required_errors[d.prop("id")]||(required_errors[d.prop("id")]=0);var h=c.closest(".caldera-editor-field-config-wrapper"),i=c.closest(".caldera-editor-processor-config-wrapper");h.length&&jQuery('.layout-form-field[data-config="'+h.prop("id")+'"]').addClass("has-error"),i.length&&jQuery("."+i.prop("id")).addClass("has-error"),required_errors[d.prop("id")]+=1,c.addClass("has-error"),e=!1;break}if(c.hasClass("toggle_value_field"))for(var j=c.closest(".caldera-config-group").find(".toggle_value_field").not(c),g=0;g<j.length;g++)if(j[g].value===b.value){var c=jQuery(j[g]);required_errors[d.prop("id")]||(required_errors[d.prop("id")]=0);var h=c.closest(".caldera-editor-field-config-wrapper"),i=c.closest(".caldera-editor-processor-config-wrapper");h.length&&jQuery('.layout-form-field[data-config="'+h.prop("id")+'"]').addClass("has-error"),i.length&&jQuery("."+i.prop("id")).addClass("has-error"),required_errors[d.prop("id")]+=1,c.addClass("has-error"),e=!1;break}}else{required_errors[d.prop("id")]||(required_errors[d.prop("id")]=0);var h=c.closest(".caldera-editor-field-config-wrapper"),i=c.closest(".caldera-editor-processor-config-wrapper");h.length&&jQuery('.layout-form-field[data-config="'+h.prop("id")+'"]').addClass("has-error"),i.length&&jQuery("."+i.prop("id")).addClass("has-error"),required_errors[d.prop("id")]+=1,c.addClass("has-error"),e=!1}});for(var f in required_errors)jQuery(".caldera-forms-options-form").find('a[href="#'+f+'"]').append('<span class="error-tag">'+required_errors[f]+"</span>");return jQuery(".caldera-conditional-field-set").trigger("change"),e}function cf_revisions_ui(){var a=CF_ADMIN.rest.revisions,b=document.getElementById("tmpl--revisions");if(null!==b){var c=jQuery("#caldera-forms-revisions-spinner");c.css({visibility:"visible",float:"none"}),jQuery.get(a,function(a){if(a.hasOwnProperty("message"))document.getElementById("caldera-forms-revisions").innerHTML='<p class="notice notice-large notice-info">'+a.message+"</p>";else{var d={revisions:a};revisions=a;var e=b.innerHTML,f=jQuery("#tmpl--revisions").html();e=Handlebars.compile(f),document.getElementById("caldera-forms-revisions").innerHTML=e(d)}c.css({visibility:"hidden",float:"none"}),jQuery("input[type=radio][name=caldera-forms-revision]").change(function(){jQuery("#caldera-forms-revision-go").attr("href",jQuery(this).data("edit")).css({display:"inline-block",visibility:"visible"}).attr("aria-hidden",!1)})}).fail(function(){c.css({visibility:"hidden",float:"none"})})}}function new_conditional_group(a){var b=a.trigger.data("id"),c="cl"+Math.round(18746582734*Math.random());return{group:[{id:"rw"+Math.round(98347598345*Math.random()),type:a.trigger.data("type"),lines:[{id:c}]}],id:b}}function new_conditional_line(a){var b=a.trigger.data("id"),c=a.trigger.data("group"),d=a.trigger.data("type"),e="cl"+Math.round(18746582734*Math.random());return{id:b,type:d,lineid:e,rowid:c,name:"config["+d+"]["+b+"][conditions][group]["+c+"]["+e+"]"}}function build_conditions_config(a){var b=JSON.parse(a.trigger.val());return b.id=a.trigger.data("id"),b}function setup_field_type(a){return{id:a.trigger.prop("id")}}function check_required_bindings(a){var b,c=(jQuery(".caldera-header-save-button"),jQuery(".layout-form-field")),d=jQuery(".caldera-processor-nav"),e=!0;b=a?jQuery(a):jQuery(".caldera-config-field .required"),b.removeClass("has-error"),c.removeClass("has-error"),d.removeClass("has-error"),jQuery(".error-tag").remove(),required_errors={},b.each(function(a,b){var c=jQuery(b),d=c.closest(".caldera-config-editor-panel");if(b.value.length){if(c.hasClass("field-slug"))for(var f=jQuery(".field-slug").not(c),g=0;g<f.length;g++)if(f[g].value===b.value){var c=jQuery(f[g]);required_errors[d.prop("id")]||(required_errors[d.prop("id")]=0);var h=c.closest(".caldera-editor-field-config-wrapper"),i=c.closest(".caldera-editor-processor-config-wrapper");h.length&&jQuery('.layout-form-field[data-config="'+h.prop("id")+'"]').addClass("has-error"),i.length&&jQuery("."+i.prop("id")).addClass("has-error"),required_errors[d.prop("id")]+=1,c.addClass("has-error"),e=!1;break}if(c.hasClass("toggle_value_field"))for(var j=c.closest(".caldera-config-group").find(".toggle_value_field").not(c),g=0;g<j.length;g++)if(j[g].value===b.value){var c=jQuery(j[g]);required_errors[d.prop("id")]||(required_errors[d.prop("id")]=0);var h=c.closest(".caldera-editor-field-config-wrapper"),i=c.closest(".caldera-editor-processor-config-wrapper");h.length&&jQuery('.layout-form-field[data-config="'+h.prop("id")+'"]').addClass("has-error"),i.length&&jQuery("."+i.prop("id")).addClass("has-error"),required_errors[d.prop("id")]+=1,c.addClass("has-error"),e=!1;break}}else{required_errors[d.prop("id")]||(required_errors[d.prop("id")]=0);var h=c.closest(".caldera-editor-field-config-wrapper"),i=c.closest(".caldera-editor-processor-config-wrapper");h.length&&jQuery('.layout-form-field[data-config="'+h.prop("id")+'"]').addClass("has-error"),i.length&&jQuery("."+i.prop("id")).addClass("has-error"),required_errors[d.prop("id")]+=1,c.addClass("has-error"),e=!1}});for(var f in required_errors)jQuery(".caldera-forms-options-form").find('a[href="#'+f+'"]').append('<span class="error-tag">'+required_errors[f]+"</span>");return jQuery(".caldera-conditional-field-set").trigger("change"),e}var cfAdminAJAX;cfAdminAJAX="object"==typeof CF_ADMIN?CF_ADMIN.adminAjax:ajaxurl,jQuery(function(a){function b(a){var b=jQuery(a),d=b.val(),e=b.closest(".caldera-editor-field-config-wrapper"),f=e.find(".caldera-config-field-setup"),g=get_compiled_template(d),h=e.find(".field_config_string").val(),i=b.data("type");if(e.find(".caldera-config-group").show(),b.addClass("field-initialized"),h=h.length&&i===b.val()?JSON.parse(h):fieldtype_defaults[b.val()+"_cfg"],h||(h={}),h._id=b.data("field"),h._name="config[fields]["+b.data("field")+"][config]",g=jQuery("<div>").html(g(h)),f.html(g.html()),"function"==typeof window[b.val()+"_init"]&&window[b.val()+"_init"](b.data("field"),f),fieldtype_defaults[b.val()+"_nosupport"]&&(fieldtype_defaults[b.val()+"_nosupport"].indexOf("hide_label")>=0&&e.find(".hide-label-field").hide().find(".field-config").prop("checked",!1),fieldtype_defaults[b.val()+"_nosupport"].indexOf("caption")>=0&&e.find(".caption-field").hide().find(".field-config").val(""),fieldtype_defaults[b.val()+"_nosupport"].indexOf("required")>=0&&e.find(".required-field").hide().find(".field-config").prop("checked",!1),fieldtype_defaults[b.val()+"_nosupport"].indexOf("custom_class")>=0&&e.find(".customclass-field").hide().find(".field-config").val(""),fieldtype_defaults[b.val()+"_nosupport"].indexOf("entry_list")>=0&&e.find(".entrylist-field").hide().find(".field-config").prop("checked",!1)),e.find(".toggle_show_values").trigger("change"),!jQuery(".caldera-select-field-type").not(".field-initialized").length){if(core_form||(core_form=jQuery(".caldera-forms-options-form")),core_form.hasClass("builder-loaded"))c(b.data("field"));else{for(var j=jQuery(".caldera-select-field-type.field-initialized"),k=0;k<j.length;k++)c(jQuery(j[k]).data("field"));core_form.addClass("builder-loaded")}jQuery(".caldera-header-save-button").prop("disabled",!1),rebuild_field_binding(),baldrickTriggers()}if(jQuery(".color-field").length&&jQuery(".color-field").wpColorPicker({change:function(a){var b=jQuery(this);b.data("ev")&&clearTimeout(b.data("ev")),b.data("ev",setTimeout(function(){b.trigger("record")},200)),b.data("target")&&(jQuery(b.data("target")).css(b.data("style"),b.val()),jQuery(b.data("target")).val(b.val()))}}),["html","section_break"].indexOf(b.val())>=0){var l=e.find(".field-label");l.val()||l.val(b.val()+"__"+e.find(".field-id").val()).trigger("change")}}function c(a){var b=jQuery("#"+a),c=b.find(".caldera-select-field-type"),d=c.val(),e=jQuery('.layout-form-field[data-config="'+a+'"]'),f=e.find(".field_preview"),g=(jQuery("#preview-"+d+"_tmpl").html(),get_compiled_template("preview-"+d)),h={id:a},i=b.find(".field-config");i.each(function(b,c){for(var d=jQuery(c),e=d.prop("name").split("["+a+"]")[1].substr(1),f=e.substr(0,e.length-1).split("]["),g=d.is(":checkbox,:radio")?d.filter(":checked").val():d.val(),i={},j=f.length-1;j>=0;j--)if(j===f.length-1)i[f[j]]=g;else{var k=i;i={},i[f[j]]=k}jQuery.extend(!0,h,i)}),f.html(g(h)),e.removeClass("button"),jQuery(".preview-field-config").prop("disabled",!0)}function d(a){var b,c=jQuery(".caldera-editor-fields-panel"),d=(jQuery(".caldera-editor-groups-panel"),jQuery(".caldera-group-nav")),e=jQuery('[data-group="'+a+'"]'),f=e.find(".caldera-config-group-name"),g=e.find(".caldera-config-group-slug"),h=e.find(".caldera-config-group-desc"),i=e.find(".caldera-config-group-admin"),j=jQuery(".active-group-name"),k=jQuery(".active-group-slug"),l=jQuery(".active-group-desc"),m=jQuery(".active-group-admin"),n=jQuery(".caldera-editor-fields-list ul"),o=e.find(".caldera-config-group-repeat"),p=jQuery(".repeat-config-button"),q=(jQuery(".caldera-editor-group-settings"),jQuery(".caldera-config-group-remove"));jQuery(".new-group-input").remove(),jQuery(".new-field-input").remove(),d.removeClass("active"),c.show(),n.hide(),n.removeClass("active").find("li.active").removeClass("active"),n.hide(),e.addClass("active"),b=jQuery(".caldera-editor-fields-list ul.active li"),b.length?q.hide():q.show(),jQuery(".caldera-editor-field-config-wrapper").hide(),e.show(),j.val(f.val()),k.val(g.val()),l.val(h.val()),"1"===i.val()?m.prop("checked",!0):m.prop("checked",!1),"1"===o.val()?p.addClass("field-edit-open"):p.removeClass("field-edit-open")}var e=jQuery("#save_indicator");jQuery("#caldera-forms-restore-revision").on("click",function(a){a.preventDefault();var b=jQuery(this);e.addClass("loading"),jQuery.post({url:"admin.php?page=caldera-forms",data:{cf_edit_nonce:jQuery("#cf_edit_nonce").val(),form:b.data("form"),cf_revision:jQuery("#form_db_id_field").val(),restore:!0},success:function(){window.location=b.data("edit-link")}})}),jQuery("body").on("click",".toggle_processor_event input",function(a){var b=jQuery(this),c=b.closest(".wrapper-instance-pane"),d=c.find(".caldera-config-processor-setup"),e=c.find(".caldera-config-processor-notice"),f=b.is(":checked");f?(b.parent().addClass("activated"),b.parent().find(".is_active").show().attr("aria-hidden",!1).css("visibility","visible"),b.parent().find(".not_active").hide().attr("aria-hidden",!0).css("visibility","hidden"),jQuery(document).trigger("processor.enabled",{processorId:b.parent().data("pid")})):(b.parent().removeClass("activated"),b.parent().find(".is_active").hide().attr("aria-hidden",!0).css("visibility","hidden"),b.parent().find(".not_active").show().attr("aria-hidden",!1).css("visibility","visible"),jQuery(document).trigger("processor.disabled",{processorId:b.parent().data("pid")})),f?(d.slideDown(100),e.slideUp(100)):(d.slideUp(100),e.slideDown(100))}),jQuery("body").on("click",".toggle_option_tab > a",function(a){a.preventDefault();var b=jQuery(this),c=jQuery(b.attr("href")),d=b.parent().find("a"),e=b.closest(".caldera-editor-config-wrapper").find(".wrapper-instance-pane");d.removeClass("button-primary"),e.hide(),c.show(),b.addClass("button-primary")}),jQuery(".caldera-editor-body").on("change",".caldera-select-field-type",function(a){b(this)}),jQuery(".caldera-editor-body").on("click",".caldera-group-nav a",function(a){a.preventDefault(),d(jQuery(this).attr("href").substr(1))}),jQuery(".caldera-editor-body").on("click",".caldera-editor-fields-list a",function(a){a.preventDefault();var b=jQuery(this),c=jQuery(b.attr("href"));jQuery(".new-group-input").remove(),jQuery(".new-field-input").remove(),jQuery(".caldera-editor-fields-list li.active").removeClass("active"),b.parent().addClass("active"),jQuery(".caldera-editor-field-config-wrapper").hide(),c.show()}),jQuery(".caldera-editor-body").on("click",".group-config-button",function(a){var b=jQuery(this),c=jQuery(".caldera-editor-group-settings"),d=b.closest(".caldera-editor-fields-panel"),e=jQuery(".caldera-config-group-remove");d.find(".caldera-field-line").length?e.hide():e.show(),b.hasClass("field-edit-open")?(c.slideUp(100),b.removeClass("field-edit-open")):(c.slideDown(100),b.addClass("field-edit-open"))}),jQuery(".caldera-editor-body").on("keydown",".field-config",function(a){jQuery(this).is("textarea")||13===a.which&&a.preventDefault()}),jQuery(".caldera-editor-body").on("change",".field-label",function(a){var b=jQuery(this).closest(".caldera-editor-field-config-wrapper").prop("id"),c=jQuery('[data-field="'+b+'"]'),d=jQuery("#"+b+" .caldera-editor-field-title, .layout-form-field.field-edit-open .layout_field_name"),e=jQuery("#"+b+" .field-slug");c.find("a").html('<i class="icn-field"></i> '+this.value),d.text(this.value),"change"===a.type&&e.trigger("change"),rebuild_field_binding()}),jQuery(".caldera-editor-body").on("change",".active-group-name",function(a){a.preventDefault();var b=jQuery(".caldera-group-nav.active"),c=(b.data("group"),b.find(".caldera-config-group-name")),d=b.find("span");"focusout"!==a.type||this.value.length||(this.value="Group "+(parseInt(b.index())+1)),c.val(this.value),d.text(this.value)}),jQuery(".caldera-editor-body").on("change",".active-group-slug",function(a){a.preventDefault();var b=jQuery(".caldera-group-nav.active"),c=(b.data("group"),b.find(".caldera-config-group-name").val()),d=b.find(".caldera-config-group-slug"),e=(b.find("span"),this.value.split(" ").join("_").split("-").join("_").replace(/[^a-z0-9_]/gi,"").toLowerCase());"focusout"!==a.type||this.value.length||(e=c.split(" ").join("_").split("-").join("_").replace(/[^a-z0-9_]/gi,"").toLowerCase()),d.val(e),this.value=e}),jQuery(".caldera-editor-body").on("change",".active-group-desc",function(a){a.preventDefault();var b=jQuery(".caldera-group-nav.active");b.data("group");b.find(".caldera-config-group-desc").val(this.value)}),jQuery(".caldera-editor-body").on("change",".active-group-admin",function(a){a.preventDefault();var b=jQuery(".caldera-group-nav.active"),c=(b.data("group"),b.find(".caldera-config-group-name").val(),b.find(".caldera-config-group-admin"));b.find("span"),this.value.split(" ").join("_").split("-").join("_").replace(/[^a-z0-9_]/gi,"").toLowerCase();jQuery(this).prop("checked")?(c.val(1),b.addClass("is-admin")):(c.val(0),b.removeClass("is-admin"))}),jQuery(".caldera-editor-body").on("click",".repeat-config-button",function(a){a.preventDefault();var b=jQuery(".caldera-group-nav.active"),c=(b.data("group"),b.find("a .group-type")),d=b.find(".caldera-config-group-repeat"),e=jQuery(this);e.hasClass("field-edit-open")?(d.val("0"),c.removeClass("icn-repeat").addClass("icn-folder"),e.removeClass("field-edit-open")):(d.val("1"),c.addClass("icn-repeat").removeClass("icn-folder"),e.addClass("field-edit-open"))}),jQuery(".caldera-editor-body").on("click",".delete-field",function(){var a=jQuery(this),b=a.closest(".caldera-editor-field-config-wrapper").prop("id");confirm(a.data("confirm"))&&(jQuery("#"+b).remove(),jQuery('option[value="'+b+'"]').remove(),jQuery('[data-bind="'+b+'"]').remove(),delete current_form_fields[b],jQuery('[data-config="'+b+'"]').slideUp(200,function(){jQuery(this).remove(),rebuild_field_binding(),jQuery(document).trigger("field.removed",{fieldId:b})}))}),jQuery(".caldera-editor-body").on("click",".add-new-group,.add-field",function(){var a=jQuery(this);if(jQuery(".new-group-input").remove(),jQuery(".new-field-input").remove(),a.hasClass("add-field")){jQuery('<input type="text" class="new-field-input block-input">').appendTo(jQuery(".caldera-editor-fields-list ul.active")).focus()}else{jQuery('<input type="text" class="new-group-input block-input">').appendTo(jQuery(".caldera-editor-groups-panel")).focus()}}),jQuery(".caldera-editor-body").on("change keypress",".new-group-input",function(a){if("keypress"===a.type){if(13!==a.which)return;a.preventDefault()}var b,c,e=this.value,f=jQuery(this),g=jQuery(".caldera-editor-groups-panel ul"),h=jQuery(".caldera-editor-fields-list");if(e.length){b=Handlebars.compile(jQuery("#caldera_group_line_templ").html()),c={id:e.split(" ").join("_").split("-").join("_").replace(/[^a-z0-9_]/gi,"").toLowerCase(),name:e},g.append(b(c));jQuery('<ul data-group="'+c.id+'">').hide().appendTo(h),f.remove(),d(c.id)}else f.remove()}),jQuery(".caldera-editor-body").on("change keypress",".new-field-input",function(a){if("keypress"===a.type){if(13!==a.which)return;a.preventDefault()}var b,c,d,e=this.value,f=jQuery(this),g=f.parent(),h=jQuery(".caldera-editor-field-config"),i=jQuery(".caldera-config-group-remove");if(e.length){i.hide(),b=Handlebars.compile(jQuery("#caldera_field_line_templ").html()),c=Handlebars.compile(jQuery("#caldera_field_config_wrapper_templ").html()),d={id:e.split(" ").join("_").split("-").join("_").replace(/[^a-z0-9_]/gi,"").toLowerCase(),label:e,slug:e.split(" ").join("_").split("-").join("_").replace(/[^a-z0-9_]/gi,"").toLowerCase(),group:jQuery(".caldera-group-nav.active").data("group")};var j=jQuery(b(d));j.appendTo(g),h.append(c(d)),j.find("a").trigger("click"),f.remove()}else f.remove()}),jQuery(".caldera-editor-body").on("change",".field-slug",function(a){this.value.length?this.value=this.value.split(" ").join("_").split("-").join("_").replace(/[^a-z0-9_]/gi,"").toLowerCase():"change"===a.type&&(this.value=jQuery(this).closest(".caldera-editor-field-config-wrapper").find(".field-label").val().split(" ").join("_").split("-").join("_").replace(/[^a-z0-9_]/gi,"").toLowerCase())}),jQuery(".caldera-editor-body").on("click",".caldera-add-group",function(a){var b=jQuery(this),c=b.data("group"),d=jQuery("#"+c+"_panel_tmpl").html();b.parent().parent().append(d)}),jQuery(".caldera-editor-body").on("click",".caldera-config-group-remove",function(a){var b=jQuery(".active-group-slug").val();jQuery('[data-group="'+b+'"]').hide(0,function(){jQuery(this).remove();var a=jQuery(".caldera-group-nav");a.length?a.first().find("a").trigger("click"):jQuery(".caldera-editor-fields-panel").hide()})}),jQuery("body").on("click",".set-current-field",function(a){a.preventDefault();var b=jQuery(this);jQuery("#"+b.data("field")+"_type").val(b.data("type")).trigger("change"),jQuery("#"+b.data("field")+"_lable").focus(),jQuery("#field_setup_baldrickModalCloser").trigger("click")}),jQuery(".caldera-editor-body").on("change record",".field-config",function(a){void 0!==a.target.name&&void 0!==a.target.value&&jQuery(document).trigger("field.config-change",{name:a.target.name,value:a.target.value});var b=jQuery(this),d=b.closest(".caldera-editor-field-config-wrapper");current_form_fields&&(b.prop("id")===d.prop("id")+"_lable"&&(current_form_fields[d.prop("id")].label=this.value),b.prop("id")===d.prop("id")+"_slug"&&(current_form_fields[d.prop("id")].slug=this.value),b.prop("id")===d.prop("id")+"_type"&&(current_form_fields[d.prop("id")].type=this.value),d.length&&c(d.prop("id")))}),jQuery(".caldera-editor-body").on("focus",".caldera-field-bind",function(a){var b=jQuery(this),c=this.value;if(a.type&&"focusin"===a.type)return b.removeClass("bound_field").addClass("reload-binding"),rebind_field_bindings(),void(this.value=c)}),jQuery(".caldera-group-nav").first().find("a").trigger("click"),jQuery(".caldera-editor-body").on("change",".toggle_show_values",function(a){var b=jQuery(this),c=b.closest(".caldera-config-group-toggle-options"),d=c.find(".toggle_label_field"),e=c.find(".toggle_value_field, .toggle_calc_value_field"),f=c.find(".option-setting-label-for-value"),g=c.find(".option-setting-label-for-label"),h=(c.find(".option-group-control"),{width:"100%",display:"inline",float:"left"});b.prop("checked")?(e.show().css(h).attr("aria-hidden",!1),d.show().css(h).attr("aria-hidden",!1),f.show().css({display:"inline-block"}),g.css("display","inline")):(e.hide().attr("aria-hidden",!0),f.hide().attr("aria-hidden",!0),d.css("width",245),g.css("display","inline")),d.trigger("toggle.values"),init_magic_tags()}),jQuery(".caldera-editor-body").on("change",".auto-populate-type",function(){jQuery(this).closest(".wrapper-instance-pane").find(".auto-populate-options").trigger("change")}),jQuery(".caldera-editor-body").on("change",".auto-populate-options",function(){var a=jQuery(this),b=a.closest(".wrapper-instance-pane"),c=b.find(".caldera-config-group-toggle-options"),d=b.find(".caldera-config-group-auto-options"),e=d.find(".auto-populate-type");d.find(".auto-populate-type-panel").hide(),a.prop("checked")?(c.hide(),d.show()):(c.show(),d.hide()),d.find(".caldera-config-group-auto-"+e.val()).show()}),jQuery("body").on("change",".pin-toggle-roles",function(){var a=jQuery(this),b=jQuery("#caldera-pin-rules");"1"===a.val()?b.show():b.hide()}),jQuery("body").on("click",".magic-tag-init",function(a){jQuery(this).prev().focus().trigger("init.magic")}),jQuery("body").on("keyup focus select click init.magic",".magic-tag-enabled",function(a){init_magic_tags();var b=jQuery(this),c=b.parent(),d=c.closest(".wrapper-instance-pane").find(".caldera-select-field-type").val()?c.closest(".wrapper-instance-pane").find(".caldera-select-field-type").val():"hidden",e=c.find(".magic-tags-autocomplete"),f=e.find("ul"),g=this.value,h=[],i="",j=this.selectionStart,k=this.selectionEnd;if(e.length&&e.data("focus"))return void a.preventDefault();if(b.data("tag",""),this.selectionEnd>this.selectionStart)i=this.value.substr(this.selectionStart,this.selectionEnd-this.selectionStart);else if(("select"===a.type||"keyup"===a.type)&&40!==a.which&&38!==a.which&&39!==a.which&&37!==a.which){for(j=this.selectionStart;j>0;j--){var l=g.substr(j-1,1);if(" "===l||"\n"===l||("%"===l||"}"===l)&&this.selectionStart===j)break}for(k=this.selectionStart;k<g.length;k++){var l=g.substr(k,1);if(" "===l||"\n"===l||("%"===l||"{"===l)&&this.selectionStart===k)break}i=g.substr(j,k-j)}if("focusout"!==a.type){"init"!==a.type&&i.length<3&&e.length&&e.remove(),e.length||(e=jQuery('<div class="magic-tags-autocomplete"></div>'),f=jQuery("<ul></ul>"),f.appendTo(e),e.insertAfter(b),e.on("mouseenter",function(){jQuery(this).data("focus",!0)}),e.on("mouseleave",function(){jQuery(this).data("focus",!1),setTimeout(function(){e.remove()},200),b.is(":focus")||b.trigger("focusout")})),f.empty();var m="system",n=!1;"hidden"===d||"dropdown"===d||"radio"===d||"toggle_switch"===d||"checkbox"===d?(n=!0,d="text",m="all"):"paragraph"!==d&&"html"!==d||(d="text"),b.data("type")&&(d=b.data("type")),d=d.split(","),d.push("vars");for(var o=0;o<d.length;o++)for(var p in system_values)if(system_values[p]&&void 0!==system_values[p].tags&&void 0!==system_values[p].tags[d[o]]){if(h=[p],"system"!==p&&"variable"!==p&&"field"!==p){var q=jQuery(".processor-"+p),r=b.closest(".caldera-editor-processor-config-wrapper"),s=r.prop("id");h=[];for(var t=0;t<q.length;t++)if(r.length||!0!==n){if(s===q[t].id)continue;jQuery("li."+q[t].id).index()<jQuery("li."+s).index()&&h.push(q[t].id)}else h.push(q[t].id)}for(var u=0;u<h.length;u++)if("all"===m||m===p||"variable"===p){var v=jQuery('<li class="header">'+system_values[p].type+(u>0?" ["+(u+1)+"]":"")+"</li>"),w=0;v.appendTo(f);for(var x=0;x<system_values[p].tags[d[o]].length;x++)if(!b.data("parent")||"variable:"+b.data("parent")!==system_values[p].tags[d[o]][x]){var y=system_values[p].wrap[0]+system_values[p].tags[d[o]][x]+system_values[p].wrap[1];if(h[u]!==p&&h.length>1&&(y=system_values[p].wrap[0]+system_values[p].tags[d[o]][x]+":"+h[u]+system_values[p].wrap[1]),y.indexOf(i)>=0||"init"===a.type){w+=1;var z=y.replace(i,"<strong>"+i+"</strong>"),A=jQuery('<li class="tag" data-tag="'+y+'">'+z+"</li>");A.on("click",function(){var a=jQuery(this).data("tag");b.val(g.substr(0,j)+a+g.substr(k)).trigger("change").focus(),b[0].selectionStart=j+a.length-(a.indexOf("*")>0?2:0),b[0].selectionEnd=j+a.length-(a.indexOf("*")>0?1:0),k=j=b[0].selectionEnd,g+=a,b.trigger("init.magic")}),A.appendTo(f)}}0===w&&v.remove()}}}f.children().length||e.remove(),"focusout"===a.type&&setTimeout(function(){e.remove()},200)}),pre_compile_templates(),jQuery(".caldera-select-field-type").not(".field-initialized").each(function(a,c){b(c)})});var rebuild_field_binding,rebind_field_bindings,current_form_fields={},required_errors={},add_new_grid_page,add_page_grid,init_magic_tags,core_form,compiled_templates={};init_magic_tags=function(){jQuery(".magic-tag-enabled").each(function(a,b){var c=jQuery(b);if(c.hasClass("magic-tag-init-bound")){var d=c.parent().find(".magic-tag-init");return void(c.is(":visible")?d.show():d.hide())}var e=jQuery('<span class=""></span>'),f=jQuery('<span style="position:relative;display:inline-block; width:100%;"></span>');c.is("input")&&e.css("borderBottom","none"),c.hasClass("caldera-conditional-value-field")&&f.width("auto"),c.wrap(f),e.insertAfter(c),c.addClass("magic-tag-init-bound"),c.is(":visible")?e.show():e.hide()})},rebuild_field_binding=function(){if(core_form||(core_form=jQuery(".caldera-forms-options-form")),core_form.hasClass("builder-loaded")){var a=jQuery(".caldera-editor-field-config-wrapper");system_values.field={tags:{text:[]},type:"Fields",wrap:["%","%"]};for(var b=0;b<a.length;b++){var c=a[b].id,d=jQuery("#"+c+"_lable").val(),e=jQuery("#"+c+"_slug").val(),f=jQuery("#"+c+"_type").val();void 0===system_values.field.tags[f]&&(system_values.field.tags[f]=[]),system_values.field.tags[f].push(e),"text"!==f&&system_values.field.tags.text.push(e),current_form_fields[c]={label:d,slug:e,type:f},jQuery("option.bound-field").trigger("change").each(function(a,b){var c=jQuery(b);0!==c.prop("value").indexOf("{")?c.text(jQuery("#"+c.prop("value")+"_lable").val()+" ["+jQuery("#"+c.prop("value")+"_lable").val()+"]"):c.text(c.prop("value").replace("{","").replace("}",""))}).removeClass("bound-field")}}},rebind_field_bindings=function(){var a,b,c=jQuery(".caldera-field-bind").not(".bound_field");if(c.length){c.addClass("bound_field");for(var d=0;d<c.length;d++){var e=jQuery(c[d]),f=e.val(),g=e.data("default"),h=e.data("exclude"),i=0,j=e.closest(".caldera-editor-processor-config-wrapper"),k=j.prop("id"),l="";if(g&&!e.hasClass("reload-binding")&&(f=g),e.is("select")){e.empty();var m=jQuery('<optgroup label="Fields">');for(var n in current_form_fields)e.data("type")&&e.data("type").split(",").indexOf(current_form_fields[n].type)<0||(e.data("id")!==n&&m.append('<option value="'+n+'"'+(f===n?'selected="selected"':"")+">"+current_form_fields[n].label+" ["+current_form_fields[n].slug+"]</option>"),i+=1);m.appendTo(e),0===i&&e.empty();for(var o in system_values)if(a=[],!(h&&h.split(",").indexOf(o)>=0)){if("system"!==o&&"variable"!==o)for(var p=jQuery(".processor-"+o),q=0;q<p.length;q++)k!==p[q].id&&(a.push(p[q].id),p.length>1&&(b=jQuery("li."+p[q].id+" .processor-line-number"))&&b.html("["+(q+1)+"]"));else a.push("__system__");var r=[];e.data("type")?(r=e.data("type").split(","),r.push("vars")):r=["text","vars"];for(var s=0;s<r.length;s++)if(null!==system_values[o]&&system_values[o].tags&&system_values[o].tags[r[s]])for(var t=0;t<a.length;t++){jQuery("li."+a[t]).index()>jQuery("li."+k).index()&&"__system__"!==a[t]?e.closest(".caldera-editor-processors-panel-wrap").length&&(l=' disabled="disabled"'):l="";for(var m=jQuery('<optgroup label="'+system_values[o].type+("__system__"!==a[t]?" "+jQuery("li."+a[t]).find(".processor-line-number").html():"")+'"'+l+">"),u=0;u<system_values[o].tags[r[s]].length;u++){var v=system_values[o].tags[r[s]][u];"__system__"!==a[t]&&(v=v.replace(o,a[t])),m.append('<option value="{'+v+'}"'+(f==="{"+v+"}"?'selected="selected"':"")+l+">"+system_values[o].tags[r[s]][u]+"</option>"),i+=1}m.children().length&&m.appendTo(e)}}if(0===i){if(e.empty(),e.data("type")){e.append('<option value="">No '+e.data("type").split(",").join(" or ")+" in form</option>");var w=!0}}else e.prop("disabled",!1);e.hasClass("required")||void 0!==w||e.prepend('<option value=""></option>'),e.val(f)}}init_magic_tags(),jQuery(document).trigger("bound.fields"),jQuery(".caldera-header-save-button").prop("disabled",!1),void 0!=typeof cf_revisions_ui&&cf_revisions_ui()}},jQuery(function(a){function b(){var a=jQuery(".layout-grid-panel"),b=0;a.each(function(a,c){var d=jQuery(c),e=d.find(".layout-structure"),f=d.find(".row"),g=[];f.each(function(a,c){var d=jQuery(c),e=d.children().not(".column-merge"),f=[];b+=1,e.each(function(a,c){span=jQuery(c).attr("class").split("-"),f.push(span[2]);var d=jQuery(c).find(".field-location");d.length&&d.each(function(c,d){jQuery(d).val(b+":"+(a+1)).removeAttr("disabled")})}),g.push(f.join(":"))}),e.val(g.join("|"))})}function c(a,b,c){var e,f,g="fld_"+Math.round(1e7*Math.random()),h=g,i=jQuery("#field_config_panels");a.prop("id","").prop("title",""),e=Handlebars.compile(jQuery("#caldera_field_config_wrapper_templ").html()),f=jQuery.extend({},{id:h,label:"",slug:""},c),f.slug="";e(f);i.append(e(f)),a.removeClass("button-small").removeClass("button").removeClass("button-primary").removeClass("ui-draggable").removeClass("layout-new-form-field").addClass("layout-form-field").attr("data-config",g).css({display:"",opacity:""}),a.find(".layout_field_name").remove(),a.find(".field-location").prop("name","config[layout_grid][fields]["+g+"]"),a.find(".settings-panel").show(),a.appendTo(b),d(),a.find(".icon-edit").trigger("click"),jQuery("#"+g+"_lable").focus().select(),baldrickTriggers(),jQuery(document).trigger("field.added",{field:f}),c?jQuery("#"+h+"_type").data("type",f.type).trigger("change"):jQuery("#"+g).trigger("field.drop"),rebuild_field_binding()}function d(){jQuery(".toggle-options").sortable({handle:".dashicons-sort"}),jQuery("#grid-pages-panel").sortable({placeholder:"row-drop-helper",handle:".sort-handle",items:".first-row-level",axis:"y",stop:function(){b()}}),jQuery(".layout-column").sortable({connectWith:".layout-column",appendTo:"#grid-pages-panel",helper:"clone",items:".layout-form-field",handle:".drag-handle",cursor:"move",opacity:.7,cursorAt:{left:100,top:15},start:function(a,b){b.helper.css({width:"200px",height:"35px",paddingTop:"20px"})},stop:function(a,c){c.item.removeAttr("style"),b()}}),jQuery("h3 .layout-new-form-field").draggable({helper:"clone",appendTo:"body"}),jQuery(".page-toggle.button").droppable({accept:".layout-form-field",over:function(a,b){jQuery(this).trigger("click"),jQuery(".layout-column").sortable("refresh")}}),jQuery(".layout-column").droppable({greedy:!0,activeClass:"ui-state-dropper",hoverClass:"ui-state-hoverable",accept:".layout-new-form-field",drop:function(a,b){c(b.draggable.clone(),jQuery(this))}}),b()}function e(){if(h){var a=jQuery(".column-fieldinsert");a.length?(a.stop().fadeToggle(700),jQuery(".layout-new-form-field").stop().fadeToggle(700)):cf_clear_puler()}}function f(){jQuery(".caldera-editor-processors-panel ul").sortable({update:function(){rebuild_field_binding()},create:function(){0==jQuery(".caldera-editor-processors-panel ul").children().length&&(j.addClass("button-primary"),i=new CalderaFormsButtonPulse(j),window.setTimeout(function(){i.startPulse()},3e3))}})}function g(a){
|
2 |
+
var b=jQuery(a),c=jQuery("#"+b.val()+"-tmpl").length?jQuery("#"+b.val()+"-tmpl").html():"",d=b.closest(".caldera-editor-processor-config-wrapper"),e=d.find(".caldera-config-processor-setup"),f=Handlebars.compile(c),g=d.find(".processor_config_string").val(),h=b.data("type");g=g.length&&h===b.val()?JSON.parse(g):processor_defaults[b.val()+"_cfg"],g||(g={}),g._id=d.prop("id"),g._name="config[processors]["+d.prop("id")+"][config]",f=jQuery("<div>").html(f(g)),e.html(f.html()),"function"==typeof window[b.val()+"_init"]&&window[b.val()+"_init"](d.prop("id"),e),d.find(".no-conditions").length&&d.find(".toggle_option_tab").remove(),rebuild_field_binding(),baldrickTriggers(),jQuery(".wp-baldrick").baldrick({request:cfAdminAJAX,method:"POST",before:function(a){var b=jQuery(a);b.data("addNode")&&!b.data("request")&&b.data("request","cf_get_default_setting")}})}add_new_grid_page=function(a){return{page_no:"pg_"+Math.round(1e7*Math.random())}},add_page_grid=function(a){var b=jQuery(".page-toggle").length+1,c=jQuery('<button type="button" data-name="Page '+b+'" data-page="'+a.rawData.page_no+'" class="page-toggle button">'+a.params.trigger.data("addtitle")+" "+b+"</button> "),e=jQuery("#page-toggles");c.appendTo(e),e.show(),d(),c.trigger("click"),1===b&&e.hide(),jQuery(document).trigger("add.page")},jQuery(document).on("remove.page add.page load.page",function(a){var b=jQuery(".page-toggle").length,c=jQuery("#tab_pages");b<=1?c.hide():c.show()}),d(),jQuery("#grid-pages-panel").on("click",".column-fieldinsert .dashicons-plus-alt",function(a){var b=jQuery(this).closest(".column-container");c(jQuery("#newfield-tool").clone().css("display",""),b)}),jQuery("#grid-pages-panel").on("click",".column-split",function(a){var b=jQuery(this).parent().parent(),c=b.attr("class").split("-"),e=jQuery("<div>").insertAfter(b),f=Math.ceil(c[2]/2),g=Math.floor(c[2]/2);c[2]=f,b.attr("class",c.join("-")),c[2]=g,e.addClass(c.join("-")).append('<div class="layout-column column-container">'),jQuery(this).remove(),d(),jQuery(".column-tools").remove(),jQuery(".column-merge").remove()}),jQuery("#grid-pages-panel").on("click",".column-remove",function(a){var c=jQuery(this).closest(".row"),d=c.find(".layout-form-field"),e=c.closest(".layout-grid-panel");if(d.length){if(!confirm(jQuery("#row-remove-fields-message").text()))return;d.each(function(a,b){var c=jQuery(b).data("config");jQuery("#"+c).remove(),jQuery('option[value="'+c+'"]').remove(),jQuery('[data-bind="'+c+'"]').remove(),delete current_form_fields[c]})}c.slideUp(200,function(){if(jQuery(this).remove(),b(),rebuild_field_binding(),!e.find(".row").length){e.remove();var a=jQuery("#page-toggles .button-primary"),c=a.prev(),d=a.next();a.remove(),c.length?c.trigger("click"):d.trigger("click")}jQuery(document).trigger("remove.page")}),jQuery(".column-tools").remove(),jQuery(".column-merge").remove()}),jQuery(".caldera-config-editor-main-panel").on("click",".caldera-add-row",function(a){if(a.preventDefault(),!jQuery(".page-active").length)return void jQuery(".caldera-add-page").trigger("click");var c=jQuery('<div style="display:none;" class="first-row-level row"><div class="col-xs-12"><div class="layout-column column-container"></div></div></div>');jQuery(".page-active").append(c),c.slideDown(200),d(),b()}),jQuery("#grid-pages-panel").on("click",".column-join",function(a){var c=jQuery(this).parent().parent().parent(),d=c.prev(),e=d.attr("class").split("-"),f=c.attr("class").split("-");e[2]=parseFloat(e[2])+parseFloat(f[2]),c.find(".layout-column").contents().appendTo(d.find(".layout-column")),d.attr("class",e.join("-")),c.remove(),b(),jQuery(".column-tools").remove(),jQuery(".column-merge").remove()}),jQuery("#grid-pages-panel").on("mouseenter",".row",function(a){var c=jQuery(this);jQuery(".column-tools,.column-merge").remove(),c.children().children().first().append('<div class="column-remove column-tools" data-placement="top" title="'+CF_ADMIN_TOOLTIPS.delete_row+'" ><i class="icon-remove"></i></div>'),c.children().children().last().append('<div class="column-sort column-tools" style="text-align:right;"><i class="dashicons dashicons-menu drag-handle sort-handle"></i></div>'),c.children().children().not(":first").prepend('<div class="column-merge"><div class="column-join column-tools"><i class="icon-join"></i></div></div>');var d=c.parent().parent().parent().width()/12-1;c.children().children().each(function(a,b){var c=jQuery(b),d=c.width()/2-5;c.prepend('<div class="column-fieldinsert column-tools"><i class="dashicons dashicons-plus-alt" data-toggle="tooltip" data-placement="top" title="'+CF_ADMIN_TOOLTIPS.add_field_row+'"></i></div>'),c.parent().hasClass("col-xs-1")||(c.prepend('<div class="column-split column-tools" data-placement="top" title="'+CF_ADMIN_TOOLTIPS.split_row+'"><i class="dashicons dashicons-leftright"></i></div>'),c.find(".column-split").css("left",d))}),jQuery(".column-merge").draggable({axis:"x",helper:"clone",appendTo:c,grid:[d,0],drag:function(a,c){jQuery(this).addClass("dragging"),jQuery(".column-tools").remove(),jQuery(".column-split").remove();var d=jQuery(this).parent().parent(),e=c.helper,f=c.originalPosition.left>e.position().left?"left":"right",g=d.prev(),h=Math.round(d.parent().width()/12-10),i=Math.abs(c.originalPosition.left-e.position().left);if(d.parent().addClass("sizing"),i>=h){var j=g.attr("class").split("-"),k=d.attr("class").split("-");j[2]=parseFloat(j[2]),k[2]=parseFloat(k[2]),"left"===f?(j[2]--,k[2]++,j[2]>0&&j[2]<j[2]+k[2]?(g.attr("class",j.join("-")),d.attr("class",k.join("-")),c.originalPosition.left=e.position().left):jQuery(this).draggable("option","disabled",!0)):(j[2]++,k[2]--,k[2]>0&&k[2]<k[2]+k[2]?(g.attr("class",j.join("-")),d.attr("class",k.join("-")),c.originalPosition.left=e.position().left):jQuery(this).draggable("option","disabled",!0)),b()}},stop:function(){jQuery(this).removeClass("dragging").parent().parent().parent().removeClass("sizing")}})}),jQuery("#grid-pages-panel").on("mouseleave",".row",function(a){jQuery(".column-tools").remove(),jQuery(".column-merge").remove()}),jQuery("#grid-pages-panel").on("click",".layout-form-field .icon-remove",function(){var a=jQuery(this),b=a.parent(),c=jQuery("#"+b.data("config"));b.slideUp(100,function(){jQuery(this).remove()}),c.slideUp(100,function(){jQuery(this).remove()})}),jQuery(document).on("click",".layout-form-field .dashicons-admin-page",function(){var a=jQuery(this),b=a.parent(),d=b.data("config"),e=jQuery("#"+d).formJSON(),f=a.closest(".column-container"),g=b.clone().css("display",""),h={};b.hasClass("field-edit-open")&&(b.removeClass("field-edit-open"),g.removeClass("field-edit-open"),jQuery(".caldera-editor-field-config-wrapper").hide()),e.config.fields[d]&&(h=e.config.fields[d],delete h.ID),c(g,f,h)}),jQuery(document).on("click",".layout-form-field .icon-edit",function(){var a=jQuery(this),b=a.parent(),c=jQuery("#"+b.data("config")+"_type").val();jQuery(".caldera-editor-field-config-wrapper").hide(),b.hasClass("field-edit-open")?b.removeClass("field-edit-open"):(jQuery(".layout-form-field").removeClass("field-edit-open"),b.addClass("field-edit-open"),jQuery("#"+b.data("config")).show()),jQuery(document).trigger("show."+b.data("config")),jQuery(document).trigger("show.fieldedit"),"radio"!==c&&"checkbox"!==c&&"dropdown"!==c&&"toggle_switch"!==c||jQuery("#"+b.data("config")+"_auto").trigger("change")}),jQuery("body").on("click",".layout-modal-edit-closer,.layout-modal-save-action",function(a){a.preventDefault();var b=jQuery(this),c=jQuery(".layout-form-field.edit-open"),d=b.closest(".layout-modal-container");settings=d.find(".settings-panel").first(),jQuery(".edit-open").removeClass("edit-open"),settings.appendTo(c.find(".settings-wrapper")).hide(),d.hide()}),jQuery(".layout-editor-body").on("change",".layout-core-pod-query",function(){jQuery(this).parent().find(".settings-panel-row").remove(),jQuery(".edit-open").find(".drag-handle .set-pod").html(" - "+jQuery(this).val())}),jQuery(".layout-editor-body").on("click",".remove-where",function(){jQuery(this).closest(".settings-panel-row").remove()}),jQuery(".layout-editor-body").on("click",".use-pod-container",function(){var a=jQuery(this),b=a.prev(),c=b.val();if(c.length){jQuery(".edit-open").find(".drag-handle .set-pod").html(" - "+b.val()),a.parent().parent().find(".spinner").css("display","inline-block");var d={action:"pq_loadpod",pod_reference:{pod:c}};jQuery.post(cfAdminAJAX,d,function(b){a.parent().find(".spinner").css("display","none");var c=jQuery("#where-line-tmpl").html(),d="",e=a.closest(".settings-panel").data("container");for(var f in b)d+='<option value="'+b[f]+'">'+b[f]+"</option>";c=c.replace(/{{fields}}/g,d).replace(/{{container_id}}/g,e),a.parent().append(c)})}}),jQuery(".caldera-editor-header").on("click",".column-sort .icon-edit",function(a){}),jQuery(".layout-editor-body").on("tray_loaded",".layout-template-tray",function(){d()}),jQuery(".caldera-editor-header").on("click",".caldera-editor-header-nav a",function(a){a.preventDefault();var b=jQuery(this);jQuery(".caldera-editor-header-nav li").removeClass("active"),jQuery(".caldera-editor-body").hide(),jQuery(b.attr("href")).show(),b.parent().addClass("active"),rebind_field_bindings()}),jQuery("body").on("change",".required",function(){check_required_bindings(this)}),jQuery("body").on("submit",".caldera-forms-options-form",function(a){jQuery(".required.has-error").length&&a.preventDefault()}),jQuery(".caldera-editor-body").on("click",".add-toggle-option",function(a){var b=jQuery(this);if(b.data("bulk"))return jQuery(b.data("bulk")).toggle(),void jQuery(b.data("bulk")).find("textarea").focus();var c=b.closest(".caldera-editor-field-config-wrapper"),d=c.find(".toggle-options"),e=jQuery("#field-option-row-tmpl").html(),f=Handlebars.compile(e),g="opt"+parseInt(1048576*(Math.random()+1)),h={_name:"config[fields]["+c.prop("id")+"][config]",option:{}};if(b.data("options")){for(var i=jQuery(b.data("options")),j=i.val().split("\n"),k=!1,l=0;l<j.length;l++){var m=j[l],n=m,o=n.split("|");if(o.length>1){n=o[0],m=o[1],k=!0;var p=o[2]||!1}h.option["opt"+parseInt(1048576*(Math.random()+l))]={value:n,calc_value:p||n,label:m,default:!1}}jQuery(b.data("options")).parent().hide(),i.val(""),!0===k?c.find(".toggle_show_values").prop("checked",!0):c.find(".toggle_show_values").prop("checked",!1),d.empty()}else h.option[g]={value:"",label:"",calc_value:"",default:!1};jQuery(".preset_options").val(""),d.append(f(h)),c.find(".toggle_show_values").trigger("change"),jQuery(".toggle-options").sortable({handle:".dashicons-sort"}),j||d.find(".toggle_label_field").last().focus()}),jQuery(".caldera-editor-body").on("change",".preset_options",function(a){var b=jQuery(this),c=b.val(),d=jQuery(b.data("bulk"));preset_options&&preset_options[c]&&preset_options[c].data&&("object"==typeof preset_options[c].data&&preset_options[c].data.length&&(preset_options[c].data=preset_options[c].data.join("\n")),d.val(preset_options[c].data))}),jQuery(".caldera-editor-body").on("click",".toggle-remove-option",function(a){var b=jQuery(this).closest(".caldera-editor-field-config-wrapper").find(".field-config").first();jQuery(this).parent().remove(),b.trigger("change"),jQuery(document).trigger("option.remove")}),jQuery(".caldera-editor-body").on("click",".page-toggle",function(a){var b=jQuery(this),c=b.parent(),d=c.find(".button");d.removeClass("button-primary"),jQuery(".layout-grid-panel").hide().removeClass("page-active"),jQuery("#"+b.data("page")).show().addClass("page-active"),b.addClass("button-primary"),d.each(function(a,b){jQuery(b).html(c.data("title")+" "+(a+1))}),1===d.length&&c.hide()}),jQuery(".caldera-editor-body").on("blur toggle.values",".toggle_label_field",function(a){var b=jQuery(this),c=jQuery('.toggle_value_field[data-opt="'+b.data("option")+'"]');c.is(":visible")||c.val(b.val())}),jQuery(document).on("change focusout",".toggle_value_field",function(){jQuery(document).trigger("show.fieldedit")}),jQuery(document).on("show.fieldedit option.remove",function(a){jQuery(".toggle_value_field.has-error").removeClass("has-error");for(var b=jQuery("#"+jQuery(".layout-form-field.field-edit-open").data("config")),c=b.find(".toggle_value_field"),d=b.find(".notice"),e=0,f=0;f<c.length;f++){for(var g=(c[f].value,0),h=0;h<c.length;h++)c[f]!==c[h]&&c[f].value===c[h].value&&(jQuery(c[h]).addClass("has-error"),g++);g>0&&(jQuery(c[f]).addClass("has-error"),e++)}e>0?(d.slideDown(),a.preventDefault()):d.slideUp()});var h=!1;focus_initial_field=function(a){var b=jQuery(".layout-grid-panel .icon-edit").first();b.length?b.trigger("click"):(jQuery(".layout-column.column-container").first().trigger("mouseover"),h=setInterval(e,500)),jQuery(document).off("load.page",focus_initial_field)},jQuery(document).on("load.page",focus_initial_field),cf_clear_puler=function(){h&&(clearTimeout(h),jQuery(document).off("mouseover",".layout-new-form-field, .column-fieldinsert",cf_clear_puler)),jQuery(".layout-new-form-field, .column-fieldinsert").fadeIn()},jQuery(document).on("mouseover",".layout-new-form-field, .column-fieldinsert",cf_clear_puler),rebuild_field_binding(),jQuery(document).trigger("load.page");var i,j=jQuery(".new-processor-button");jQuery("body").on("click",".caldera-processor-nav a",function(a){a.preventDefault();var b=jQuery(this);jQuery(".caldera-processor-nav").removeClass("active"),jQuery(".caldera-editor-processor-config-wrapper").hide(),jQuery(b.attr("href")).show(),b.parent().addClass("active")}),jQuery("body").on("click",".add-new-processor",function(a){"object"==typeof i&&(j.removeClass("button-primary"),i.stopPulse());var b=jQuery(this),c=Handlebars.compile(jQuery("#processor-wrapper-tmpl").html());wrap=jQuery(".active-processors-list"),process_conf=jQuery(".caldera-editor-processor-config"),processid=Math.round(1e8*Math.random()),new_templ=Handlebars.compile(jQuery("#processor-line-tmpl").html()),new_proc={id:"fp_"+processid,type:b.data("type")},wrap.append(new_templ(new_proc)),process_conf.append(c(new_proc)),jQuery("#form_processor_baldrickModalCloser").trigger("click"),jQuery(".caldera-processor-nav a").last().trigger("click"),jQuery("#fp_"+processid+"_type").val(b.data("type")).trigger("change"),f(),baldrickTriggers(),jQuery(document).trigger("processor.added",{processor:new_proc})}),jQuery("body").on("click",".delete-processor",function(a){var b=jQuery(this),c=b.closest(".caldera-editor-processor-config-wrapper");c.data("type");confirm(b.data("confirm"))&&(jQuery("."+c.prop("id")).remove(),c.remove(),jQuery(".caldera-processor-nav a").first().trigger("click"),rebuild_field_binding())}),jQuery("body").on("change",".caldera-select-processor-type",function(a){var b=jQuery(this),c=b.closest(".caldera-editor-processor-config-wrapper"),d=b.find('option[value="'+b.val()+'"]').text(),e=c.find(".caldera-editor-processor-title"),f=jQuery(".caldera-processor-nav.active a");""===d&&(d=e.data("title")),e.html(d),f.html(d+' <span class="processor-line-number"></span>').parent().addClass("processor_type_"+b.val()),g(this),rebuild_field_binding()}),jQuery(document).on("click","#cf-shortcode-preview",function(){jQuery(this).focus().select()}),jQuery(document).on("change",".cf-email-preview-toggle",function(){var a=jQuery(this),b=jQuery(".caldera-header-email-preview-button");a.is(":checked")?b.show().attr("aria-hidden","false").css("visibility","visible"):b.hide().attr("aria-hidden","true").css("visibility","hidden")}),rebuild_field_binding(),jQuery(".caldera-select-processor-type").each(function(a,b){g(b)}),f()}),Handlebars.registerHelper("_field",function(a){var b=this,c="",d="",e="",f=this[a.hash.slug]?' data-default="'+this[a.hash.slug]+'"':"";a.hash.required&&(c=" required"),a.hash.exclude&&(e='data-exclude="'+a.hash.exclude+'"'),a.hash.array&&(d="[]","true"!==a.hash.array&&(f='value="'+a.hash.array+'"')),out="<select "+(a.hash.type?'data-type="'+a.hash.type+'"':"")+f+" "+e+' name="'+this._name+"["+a.hash.slug+"]"+d+'" id="'+this._id+"_"+a.hash.slug+'" class="block-input field-config caldera-field-bind'+c+'">',this[a.hash.slug]?out+='<option class="bound-field" value="'+this[a.hash.slug]+'" class="bound-field"></option>':a.hash.required||(out+='<option value=""></option>');for(var g in current_form_fields){var h="";a.hash.type&¤t_form_fields[g].type!==a.hash.type||(b[a.hash.slug]&&b[a.hash.slug]===g&&(h=' selected="selected"'),out+='<option value="'+g+'"'+h+">"+current_form_fields[g].label+" ["+current_form_fields[g].slug+"]</option>")}return out+="</select>",a.hash.required&&(out+='<input class="field-config" name="'+this._name+'[_required_bounds][]" type="hidden" value="'+a.hash.slug+'">'),out}),Handlebars.registerHelper("console",function(a,b){console.log(this)});var revisions={};jQuery(document).ready(function(a){function b(b){var d=a(b),e=d.closest(".caldera-editor-field-config-wrapper"),f=e.find(".caldera-config-field-setup"),g=compiled_templates[d.val()+"_tmpl"]?compiled_templates[d.val()+"_tmpl"]:compiled_templates.noconfig_field_templ,h=e.find(".field_config_string").val(),i=d.data("type");if(e.find(".caldera-config-group").show(),d.addClass("field-initialized"),h=h.length&&i===d.val()?JSON.parse(h):fieldtype_defaults[d.val()+"_cfg"],h||(h={}),h._id=d.data("field"),h._name="config[fields]["+d.data("field")+"][config]",g=a("<div>").html(g(h)),f.html(g.html()),"function"==typeof window[d.val()+"_init"]&&window[d.val()+"_init"](d.data("field"),f),fieldtype_defaults[d.val()+"_nosupport"]&&(fieldtype_defaults[d.val()+"_nosupport"].indexOf("hide_label")>=0&&e.find(".hide-label-field").hide().find(".field-config").prop("checked",!1),fieldtype_defaults[d.val()+"_nosupport"].indexOf("caption")>=0&&e.find(".caption-field").hide().find(".field-config").val(""),fieldtype_defaults[d.val()+"_nosupport"].indexOf("required")>=0&&e.find(".required-field").hide().find(".field-config").prop("checked",!1),fieldtype_defaults[d.val()+"_nosupport"].indexOf("custom_class")>=0&&e.find(".customclass-field").hide().find(".field-config").val(""),fieldtype_defaults[d.val()+"_nosupport"].indexOf("entry_list")>=0&&e.find(".entrylist-field").hide().find(".field-config").prop("checked",!1)),e.find(".toggle_show_values").trigger("change"),!a(".caldera-select-field-type").not(".field-initialized").length){if(core_form||(core_form=jQuery(".caldera-forms-options-form")),core_form.hasClass("builder-loaded"))c(d.data("field"));else{for(var j=a(".caldera-select-field-type.field-initialized"),k=0;k<j.length;k++)c(a(j[k]).data("field"));core_form.addClass("builder-loaded")}a(".caldera-header-save-button").prop("disabled",!1),rebuild_field_binding(),baldrickTriggers()}a(".color-field").length&&a(".color-field").wpColorPicker({change:function(b){var c=a(this);c.data("ev")&&clearTimeout(c.data("ev")),c.data("ev",setTimeout(function(){c.trigger("record")},200)),c.data("target")&&(a(c.data("target")).css(c.data("style"),c.val()),a(c.data("target")).val(c.val()))}})}function c(b){var c=a("#"+b),d=c.find(".caldera-select-field-type"),e=a('.layout-form-field[data-config="'+b+'"]'),f=e.find(".field_preview"),g=(a("#preview-"+d.val()+"_tmpl").html(),compiled_templates["preview-"+d.val()+"_tmpl"]),h={id:b};c.find(".field-config").each(function(c,d){for(var e=a(d),f=e.prop("name").split("["+b+"]")[1].substr(1),g=f.substr(0,f.length-1).split("]["),i=e.is(":checkbox,:radio")?e.filter(":checked").val():e.val(),j={},k=g.length-1;k>=0;k--)if(k===g.length-1)j[g[k]]=i;else{var l=j;j={},j[g[k]]=l}a.extend(!0,h,j)}),f.html(g(h)),e.removeClass("button"),a(".preview-field-config").prop("disabled",!0)}function d(b){var c,d=a(".caldera-editor-fields-panel"),e=(a(".caldera-editor-groups-panel"),a(".caldera-group-nav")),f=a('[data-group="'+b+'"]'),g=f.find(".caldera-config-group-name"),h=f.find(".caldera-config-group-slug"),i=f.find(".caldera-config-group-desc"),j=f.find(".caldera-config-group-admin"),k=a(".active-group-name"),l=a(".active-group-slug"),m=a(".active-group-desc"),n=a(".active-group-admin"),o=a(".caldera-editor-fields-list ul"),p=f.find(".caldera-config-group-repeat"),q=a(".repeat-config-button"),r=(a(".caldera-editor-group-settings"),a(".caldera-config-group-remove"));a(".new-group-input").remove(),a(".new-field-input").remove(),e.removeClass("active"),d.show(),o.hide(),o.removeClass("active").find("li.active").removeClass("active"),o.hide(),f.addClass("active"),c=a(".caldera-editor-fields-list ul.active li"),c.length?r.hide():r.show(),a(".caldera-editor-field-config-wrapper").hide(),f.show(),k.val(g.val()),l.val(h.val()),m.val(i.val()),"1"===j.val()?n.prop("checked",!0):n.prop("checked",!1),"1"===p.val()?q.addClass("field-edit-open"):q.removeClass("field-edit-open")}a(".caldera-header-save-button").baldrick({method:"POST",request:"admin.php?page=caldera-forms",before:function(b,c){if(c.preventDefault(),!check_required_bindings())return!1;a("#save_indicator").addClass("loading"),"undefined"!=typeof tinyMCE&&tinyMCE.triggerSave();var d=a(".caldera-forms-options-form").formJSON();return d.conditions&&(d.config.conditional_groups={conditions:d.conditions}),a(b).data("cf_edit_nonce",d.cf_edit_nonce),a(b).data("_wp_http_referer",d._wp_http_referer),a(b).data("sender","ajax"),a(b).data("config",JSON.stringify(d.config)),!0},callback:function(b){if(!1===b.data){var c=a(".updated_notice_box");c.stop().animate({top:0},200,function(){setTimeout(function(){c.stop().animate({top:-75},200)},2e3)})}},complete:function(b){a(".wrapper-instance-pane .field-config").prop("disabled",!1)}}),a("body").on("click",".toggle_processor_event input",function(b){var c=a(this),d=c.closest(".wrapper-instance-pane"),e=d.find(".caldera-config-processor-setup"),f=d.find(".caldera-config-processor-notice");c.is(":checked")?(c.parent().addClass("activated"),c.parent().find(".is_active").show().attr("aria-hidden",!1).css("visibility","visible"),c.parent().find(".not_active").hide().attr("aria-hidden",!0).css("visibility","hidden")):(c.parent().removeClass("activated"),c.parent().find(".is_active").hide().attr("aria-hidden",!0).css("visibility","hidden"),c.parent().find(".not_active").show().attr("aria-hidden",!1).css("visibility","visible")),d.find(".toggle_processor_event .activated").length?(e.slideDown(100),f.slideUp(100)):(e.slideUp(100),f.slideDown(100))}),a("body").on("click",".toggle_option_tab > a",function(b){b.preventDefault();var c=a(this),d=a(c.attr("href")),e=c.parent().find("a"),f=c.closest(".caldera-editor-config-wrapper").find(".wrapper-instance-pane");e.removeClass("button-primary"),f.hide(),d.show(),c.addClass("button-primary"),a(".caldera-conditionals-usetype").trigger("change")}),a(".caldera-editor-body").on("change",".caldera-select-field-type",function(a){b(this)}),a(".caldera-editor-body").on("click",".caldera-group-nav a",function(b){b.preventDefault(),d(a(this).attr("href").substr(1))}),a(".caldera-editor-body").on("click",".caldera-editor-fields-list a",function(b){b.preventDefault();var c=a(this),d=a(c.attr("href"));a(".new-group-input").remove(),a(".new-field-input").remove(),a(".caldera-editor-fields-list li.active").removeClass("active"),c.parent().addClass("active"),a(".caldera-editor-field-config-wrapper").hide(),d.show()}),a(".caldera-editor-body").on("click",".group-config-button",function(b){var c=a(this),d=a(".caldera-editor-group-settings"),e=c.closest(".caldera-editor-fields-panel"),f=a(".caldera-config-group-remove");e.find(".caldera-field-line").length?f.hide():f.show(),c.hasClass("field-edit-open")?(d.slideUp(100),c.removeClass("field-edit-open")):(d.slideDown(100),c.addClass("field-edit-open"))}),a(".caldera-editor-body").on("keydown",".field-config",function(b){a(this).is("textarea")||13===b.which&&b.preventDefault()}),a(".caldera-editor-body").on("change",".field-label",function(b){var c=a(this).closest(".caldera-editor-field-config-wrapper").prop("id");field_line=a('[data-field="'+c+'"]'),field_title=a("#"+c+" .caldera-editor-field-title, .layout-form-field.field-edit-open .layout_field_name"),slug=a("#"+c+" .field-slug"),field_line.find("a").html('<i class="icn-field"></i> '+this.value),field_title.text(this.value),"change"===b.type&&slug.trigger("change"),rebuild_field_binding()}),a(".caldera-editor-body").on("change",".active-group-name",function(b){b.preventDefault();var c=a(".caldera-group-nav.active"),d=(c.data("group"),c.find(".caldera-config-group-name")),e=c.find("span");"focusout"!==b.type||this.value.length||(this.value="Group "+(parseInt(c.index())+1)),d.val(this.value),e.text(this.value)}),a(".caldera-editor-body").on("change",".active-group-slug",function(b){b.preventDefault();var c=a(".caldera-group-nav.active"),d=(c.data("group"),c.find(".caldera-config-group-name").val()),e=c.find(".caldera-config-group-slug"),f=(c.find("span"),this.value.split(" ").join("_").split("-").join("_").replace(/[^a-z0-9_]/gi,"").toLowerCase());"focusout"!==b.type||this.value.length||(f=d.split(" ").join("_").split("-").join("_").replace(/[^a-z0-9_]/gi,"").toLowerCase()),e.val(f),this.value=f}),a(".caldera-editor-body").on("change",".active-group-desc",function(b){b.preventDefault();var c=a(".caldera-group-nav.active");(c.data("group"),c.find(".caldera-config-group-desc")).val(this.value)}),a(".caldera-editor-body").on("change",".active-group-admin",function(b){b.preventDefault();var c=a(".caldera-group-nav.active"),d=(c.data("group"),c.find(".caldera-config-group-name").val(),c.find(".caldera-config-group-admin"));c.find("span"),this.value.split(" ").join("_").split("-").join("_").replace(/[^a-z0-9_]/gi,"").toLowerCase(),a(this).prop("checked")?(d.val(1),c.addClass("is-admin")):(d.val(0),c.removeClass("is-admin"))}),a(".caldera-editor-body").on("click",".repeat-config-button",function(b){b.preventDefault();var c=a(".caldera-group-nav.active"),d=(c.data("group"),c.find("a .group-type")),e=c.find(".caldera-config-group-repeat"),f=a(this);f.hasClass("field-edit-open")?(e.val("0"),d.removeClass("icn-repeat").addClass("icn-folder"),f.removeClass("field-edit-open")):(e.val("1"),d.addClass("icn-repeat").removeClass("icn-folder"),f.addClass("field-edit-open"))}),a(".caldera-editor-body").on("click",".delete-field",function(){var b=a(this),c=b.closest(".caldera-editor-field-config-wrapper").prop("id");confirm(b.data("confirm"))&&(a("#"+c).remove(),a('option[value="'+c+'"]').remove(),a('[data-bind="'+c+'"]').remove(),delete current_form_fields[c],a('[data-config="'+c+'"]').slideUp(200,function(){a(this).remove(),rebuild_field_binding(),a(document).trigger("field.removed")}))}),a(".caldera-editor-body").on("click",".add-new-group,.add-field",function(){var b=a(this);if(a(".new-group-input").remove(),a(".new-field-input").remove(),b.hasClass("add-field")){a('<input type="text" class="new-field-input block-input">').appendTo(a(".caldera-editor-fields-list ul.active")).focus()}else{a('<input type="text" class="new-group-input block-input">').appendTo(a(".caldera-editor-groups-panel")).focus()}}),a(".caldera-editor-body").on("change keypress",".new-group-input",function(b){if("keypress"===b.type){if(13!==b.which)return;b.preventDefault()}var c,e,f=this.value,g=a(this),h=a(".caldera-editor-groups-panel ul"),i=a(".caldera-editor-fields-list");if(f.length){c=Handlebars.compile(a("#caldera_group_line_templ").html()),e={id:f.split(" ").join("_").split("-").join("_").replace(/[^a-z0-9_]/gi,"").toLowerCase(),name:f},h.append(c(e));a('<ul data-group="'+e.id+'">').hide().appendTo(i),g.remove(),d(e.id)}else g.remove()}),a(".caldera-editor-body").on("change keypress",".new-field-input",function(b){if("keypress"===b.type){if(13!==b.which)return;b.preventDefault()}var c,d,e,f=this.value,g=a(this),h=g.parent(),i=a(".caldera-editor-field-config"),j=a(".caldera-config-group-remove");if(f.length){j.hide(),c=Handlebars.compile(a("#caldera_field_line_templ").html()),d=Handlebars.compile(a("#caldera_field_config_wrapper_templ").html()),e={id:f.split(" ").join("_").split("-").join("_").replace(/[^a-z0-9_]/gi,"").toLowerCase(),label:f,slug:f.split(" ").join("_").split("-").join("_").replace(/[^a-z0-9_]/gi,"").toLowerCase(),group:a(".caldera-group-nav.active").data("group")};var k=a(c(e));k.appendTo(h),i.append(d(e)),k.find("a").trigger("click"),g.remove()}else g.remove()}),a(".caldera-editor-body").on("change",".field-slug",function(b){this.value.length?this.value=this.value.split(" ").join("_").split("-").join("_").replace(/[^a-z0-9_]/gi,"").toLowerCase():"change"===b.type&&(this.value=a(this).closest(".caldera-editor-field-config-wrapper").find(".field-label").val().split(" ").join("_").split("-").join("_").replace(/[^a-z0-9_]/gi,"").toLowerCase())}),a(".caldera-editor-body").on("click",".caldera-add-group",function(b){var c=a(this),d=c.data("group"),e=a("#"+d+"_panel_tmpl").html();c.parent().parent().append(e)}),a(".caldera-editor-body").on("click",".caldera-config-group-remove",function(b){var c=a(".active-group-slug").val();a('[data-group="'+c+'"]').hide(0,function(){a(this).remove();var b=a(".caldera-group-nav");b.length?b.first().find("a").trigger("click"):a(".caldera-editor-fields-panel").hide()})}),a("body").on("click",".set-current-field",function(b){b.preventDefault();var c=a(this);a("#"+c.data("field")+"_type").val(c.data("type")).trigger("change"),a("#"+c.data("field")+"_lable").focus(),a("#field_setup_baldrickModalCloser").trigger("click")}),a(".caldera-editor-body").on("change record",".field-config",function(b){var d=a(this),e=d.closest(".caldera-editor-field-config-wrapper");current_form_fields&&(d.prop("id")===e.prop("id")+"_lable"&&(current_form_fields[e.prop("id")].label=this.value),d.prop("id")===e.prop("id")+"_slug"&&(current_form_fields[e.prop("id")].slug=this.value),d.prop("id")===e.prop("id")+"_type"&&(current_form_fields[e.prop("id")].type=this.value),e.length&&c(e.prop("id")))}),a(".caldera-editor-body").on("focus",".caldera-field-bind",function(b){var c=a(this),d=this.value;if(b.type&&"focusin"===b.type)return c.removeClass("bound_field").addClass("reload-binding"),rebind_field_bindings(),void(this.value=d)}),a(".caldera-editor-body").on("change",".caldera-conditional-field-set",function(b){var c,d,e=a(this),f=e.parent().find(".compare-type"),g=e.data("condition"),h=e.data("id"),i="config["+g+"]["+h+"][conditions][group]["+e.data("row")+"]["+e.data("line")+"]",j=e.data("line"),k=a("#"+j+"_value"),l=k.find(".caldera-conditional-value-field").first(),m=[],n=this.value;if("{"!==n.substr(0,1)&&(c=a("#"+n),d=c.find(".field-button-type"),m=c.find(".caldera-config-group-toggle-options")),e.hasClass(".bind_init")&&e.addClass("bound_triggered"),l.length&&l.val().length&&k.data("value",l.val()),f.show(),m.length){var o=m.find(".toggle_option_row"),p='<select name="'+i+'[value]" class="caldera-processor-value-bind caldera-conditional-value-field" data-field="'+n+'" style="max-width: 220px; width: 220px;">';p+='<option value=""></option>',o.each(function(b,c){var d=a(c).find(".toggle_label_field"),e=d.data("option"),f="";k.data("value")&&(k.data("value").toString()!==e&&k.data("value").toString()!==a(c).find(".toggle_value_field").val()||(f=' selected="selected"')),p+='<option value="'+e+'"'+f+">"+d.val()+"</option>"}),p+="</select>"}else d&&"button"==d.val()?(f.val("is").hide(),p='<select name="'+i+'[value]" class="caldera-processor-value-bind caldera-conditional-value-field" data-field="'+n+'" style="max-width: 220px; width: 220px;">',p+='<option value="click" '+("click"===k.data("value")?'selected="selected"':"")+">Click</option>",p+='<option value="dblclick" '+("dblclick"===k.data("value")?'selected="selected"':"")+">Double Click</option>",p+="</select>"):p='<input name="'+i+'[value]" type="text" class="caldera-conditional-value-field magic-tag-enabled" value="'+(k.data("value")?k.data("value"):"")+'" style="max-width: 205px;">';k.html(p),init_magic_tags()}),a(".caldera-editor-body").on("change",".caldera-conditionals-usetype",function(b){var c=a(this);"show"===this.value||"hide"===this.value||"disable"===this.value||"use"===this.value||"not"===this.value?(a("#"+c.data("id")+"_condition_group_add").show(),
|
3 |
+
a("#"+c.data("id")+"_conditional_wrap").show()):(a("#"+c.data("id")+"_condition_group_add").hide(),a("#"+c.data("id")+"_conditional_wrap").hide())}),a(".caldera-editor-body").on("click",".remove-conditional-line",function(b){b.preventDefault();var c=a(this),d=c.closest(".caldera-condition-line"),e=c.closest(".caldera-condition-group");d.remove(),e.find(".caldera-condition-line").length||e.remove()}),a(".caldera-group-nav").first().find("a").trigger("click"),a(".caldera-editor-body").on("change",".toggle_show_values",function(b){var c=a(this),d=c.closest(".caldera-config-group-toggle-options");values=d.find(".toggle_value_field"),lables=d.find(".toggle_label_field"),field_lables=d.find(".caldera-config-group-option-labels"),c.prop("checked")?(values.show().parent().show(),values.show().parent().parent().show(),lables.css("width",""),field_lables.show()):(values.hide().parent().hide(),lables.css("width",245),field_lables.hide()),lables.trigger("toggle.values"),init_magic_tags()}),a(".caldera-editor-body").on("change",".auto-populate-type",function(){a(this).closest(".wrapper-instance-pane").find(".auto-populate-options").trigger("change")}),a(".caldera-editor-body").on("change",".auto-populate-options",function(){var b=a(this),c=b.closest(".wrapper-instance-pane"),d=c.find(".caldera-config-group-toggle-options"),e=c.find(".caldera-config-group-auto-options"),f=e.find(".auto-populate-type");e.find(".auto-populate-type-panel").hide(),b.prop("checked")?(d.hide(),e.show()):(d.show(),e.hide()),e.find(".caldera-config-group-auto-"+f.val()).show()}),a("body").on("change",".pin-toggle-roles",function(){var b=a(this),c=a("#caldera-pin-rules");"1"===b.val()?c.show():c.hide()}),a("body").on("click",".magic-tag-init",function(b){a(this).prev().focus().trigger("init.magic")}),a("body").on("keyup focus select click init.magic",".magic-tag-enabled",function(b){init_magic_tags();var c=a(this),d=c.parent(),e=d.closest(".wrapper-instance-pane").find(".caldera-select-field-type").val()?d.closest(".wrapper-instance-pane").find(".caldera-select-field-type").val():"hidden",f=d.find(".magic-tags-autocomplete"),g=f.find("ul"),h=this.value,i=[],j="",k=this.selectionStart,l=this.selectionEnd;if(f.length&&f.data("focus"))return void b.preventDefault();if(c.data("tag",""),this.selectionEnd>this.selectionStart)j=this.value.substr(this.selectionStart,this.selectionEnd-this.selectionStart);else if(("select"===b.type||"keyup"===b.type)&&40!==b.which&&38!==b.which&&39!==b.which&&37!==b.which){for(k=this.selectionStart;k>0;k--){var m=h.substr(k-1,1);if(" "===m||"\n"===m||("%"===m||"}"===m)&&this.selectionStart===k)break}for(l=this.selectionStart;l<h.length;l++){var m=h.substr(l,1);if(" "===m||"\n"===m||("%"===m||"{"===m)&&this.selectionStart===l)break}j=h.substr(k,l-k)}if("focusout"!==b.type){"init"!==b.type&&j.length<3&&f.length&&f.remove(),f.length||(f=a('<div class="magic-tags-autocomplete"></div>'),g=a("<ul></ul>"),g.appendTo(f),f.insertAfter(c),f.on("mouseenter",function(){a(this).data("focus",!0)}),f.on("mouseleave",function(){a(this).data("focus",!1),setTimeout(function(){f.remove()},200),c.is(":focus")||c.trigger("focusout")})),g.empty();var n="system",o=!1;"hidden"===e||"dropdown"===e||"radio"===e||"toggle_switch"===e||"checkbox"===e?(o=!0,e="text",n="all"):"paragraph"!==e&&"html"!==e||(e="text"),c.data("type")&&(e=c.data("type")),e=e.split(","),e.push("vars");for(var p=0;p<e.length;p++)for(var q in system_values)if(void 0!==system_values[q].tags&&void 0!==system_values[q].tags[e[p]]){if(i=[q],"system"!==q&&"variable"!==q&&"field"!==q){var r=jQuery(".processor-"+q),s=c.closest(".caldera-editor-processor-config-wrapper"),t=s.prop("id");i=[];for(var u=0;u<r.length;u++)if(s.length||!0!==o){if(t===r[u].id)continue;jQuery("li."+r[u].id).index()<jQuery("li."+t).index()&&i.push(r[u].id)}else i.push(r[u].id)}for(var v=0;v<i.length;v++)if("all"===n||n===q||"variable"===q){var w=a('<li class="header">'+system_values[q].type+(v>0?" ["+(v+1)+"]":"")+"</li>"),x=0;w.appendTo(g);for(var y=0;y<system_values[q].tags[e[p]].length;y++)if(!c.data("parent")||"variable:"+c.data("parent")!==system_values[q].tags[e[p]][y]){var z=system_values[q].wrap[0]+system_values[q].tags[e[p]][y]+system_values[q].wrap[1];if(i[v]!==q&&i.length>1&&(z=system_values[q].wrap[0]+system_values[q].tags[e[p]][y]+":"+i[v]+system_values[q].wrap[1]),z.indexOf(j)>=0||"init"===b.type){x+=1;var A=z.replace(j,"<strong>"+j+"</strong>"),B=a('<li class="tag" data-tag="'+z+'">'+A+"</li>");B.on("click",function(){var b=a(this).data("tag");c.val(h.substr(0,k)+b+h.substr(l)).trigger("change").focus(),c[0].selectionStart=k+b.length-(b.indexOf("*")>0?2:0),c[0].selectionEnd=k+b.length-(b.indexOf("*")>0?1:0),l=k=c[0].selectionEnd,h+=b,c.trigger("init.magic")}),B.appendTo(g)}}0===x&&w.remove()}}}g.children().length||f.remove(),"focusout"===b.type&&setTimeout(function(){f.remove()},200)});for(var e=a(".cf-editor-template"),f=0;f<e.length;f++)compiled_templates[e[f].id]=Handlebars.compile(e[f].innerHTML);a(".caldera-select-field-type").not(".field-initialized").each(function(a,c){b(c)})});var rebuild_field_binding,rebind_field_bindings,current_form_fields={},required_errors={},add_new_grid_page,add_page_grid,init_magic_tags,core_form,compiled_templates={};init_magic_tags=function(){jQuery(".magic-tag-enabled").each(function(a,b){var c=jQuery(b);if(c.hasClass("magic-tag-init-bound")){var d=c.parent().find(".magic-tag-init");return void(c.is(":visible")?d.show():d.hide())}var e=jQuery('<span class=""></span>'),f=jQuery('<span style="position:relative;display:inline-block; width:100%;"></span>');c.is("input")&&e.css("borderBottom","none"),c.hasClass("caldera-conditional-value-field")&&f.width("auto"),c.wrap(f),e.insertAfter(c),c.addClass("magic-tag-init-bound"),c.is(":visible")?e.show():e.hide()})},rebuild_field_binding=function(){if(core_form||(core_form=jQuery(".caldera-forms-options-form")),core_form.hasClass("builder-loaded")){var a=jQuery(".caldera-editor-field-config-wrapper");system_values.field={tags:{text:[]},type:"Fields",wrap:["%","%"]};for(var b=0;b<a.length;b++){var c=a[b].id,d=jQuery("#"+c+"_lable").val(),e=jQuery("#"+c+"_slug").val(),f=jQuery("#"+c+"_type").val();void 0===system_values.field.tags[f]&&(system_values.field.tags[f]=[]),system_values.field.tags[f].push(e),"text"!==f&&system_values.field.tags.text.push(e),current_form_fields[c]={label:d,slug:e,type:f},jQuery("option.bound-field").trigger("change").each(function(a,b){var c=jQuery(b);0!==c.prop("value").indexOf("{")?c.text(jQuery("#"+c.prop("value")+"_lable").val()+" ["+jQuery("#"+c.prop("value")+"_lable").val()+"]"):c.text(c.prop("value").replace("{","").replace("}",""))}).removeClass("bound-field")}}},rebind_field_bindings=function(){var a,b,c=jQuery(".caldera-field-bind").not(".bound_field");if(c.length){c.addClass("bound_field");for(var d=0;d<c.length;d++){var e=jQuery(c[d]),f=e.val(),g=e.data("default"),h=e.data("exclude"),i=0,j=e.closest(".caldera-editor-processor-config-wrapper"),k=j.prop("id"),l="";if(g&&!e.hasClass("reload-binding")&&(f=g),e.is("select")){e.empty();var m=jQuery('<optgroup label="Fields">');for(var n in current_form_fields)e.data("type")&&e.data("type").split(",").indexOf(current_form_fields[n].type)<0||(e.data("id")!==n&&m.append('<option value="'+n+'"'+(f===n?'selected="selected"':"")+">"+current_form_fields[n].label+" ["+current_form_fields[n].slug+"]</option>"),i+=1);m.appendTo(e),0===i&&e.empty();for(var o in system_values)if(a=[],!(h&&h.split(",").indexOf(o)>=0)){if("system"!==o&&"variable"!==o)for(var p=jQuery(".processor-"+o),q=0;q<p.length;q++)k!==p[q].id&&(a.push(p[q].id),p.length>1&&(b=jQuery("li."+p[q].id+" .processor-line-number"))&&b.html("["+(q+1)+"]"));else a.push("__system__");var r=[];e.data("type")?(r=e.data("type").split(","),r.push("vars")):r=["text","vars"];for(var s=0;s<r.length;s++)if(system_values[o].tags&&system_values[o].tags[r[s]])for(var t=0;t<a.length;t++){jQuery("li."+a[t]).index()>jQuery("li."+k).index()&&"__system__"!==a[t]?e.closest(".caldera-editor-processors-panel-wrap").length&&(l=' disabled="disabled"'):l="";for(var m=jQuery('<optgroup label="'+system_values[o].type+("__system__"!==a[t]?" "+jQuery("li."+a[t]).find(".processor-line-number").html():"")+'"'+l+">"),u=0;u<system_values[o].tags[r[s]].length;u++){var v=system_values[o].tags[r[s]][u];"__system__"!==a[t]&&(v=v.replace(o,a[t])),m.append('<option value="{'+v+'}"'+(f==="{"+v+"}"?'selected="selected"':"")+l+">"+system_values[o].tags[r[s]][u]+"</option>"),i+=1}m.children().length&&m.appendTo(e)}}if(0===i){if(e.empty(),e.data("type")){e.append('<option value="">No '+e.data("type").split(",").join(" or ")+" in form</option>");var w=!0}}else e.prop("disabled",!1);e.hasClass("required")||void 0!==w||e.prepend('<option value=""></option>'),e.val(f)}}init_magic_tags(),jQuery(document).trigger("bound.fields"),jQuery(".caldera-header-save-button").prop("disabled",!1)}},jQuery(document).ready(function(a){function b(){var b=a(".layout-grid-panel"),c=0;b.each(function(b,d){var e=a(d),f=e.find(".layout-structure"),g=e.find(".row"),h=[];g.each(function(b,d){var e=a(d),f=e.children().not(".column-merge"),g=[];c+=1,f.each(function(b,d){span=a(d).attr("class").split("-"),g.push(span[2]);var e=a(d).find(".field-location");e.length&&e.each(function(d,e){a(e).val(c+":"+(b+1)).removeAttr("disabled")})}),h.push(g.join(":"))}),f.val(h.join("|"))})}function c(b,c,e){var f,g,h="fld_"+Math.round(1e7*Math.random()),i=h,j=a("#field_config_panels");b.prop("id","").prop("title",""),f=Handlebars.compile(a("#caldera_field_config_wrapper_templ").html()),g=a.extend({},{id:i,label:"",slug:""},e),g.slug="",j.append(f(g)),b.removeClass("button-small").removeClass("button").removeClass("button-primary").removeClass("ui-draggable").removeClass("layout-new-form-field").addClass("layout-form-field").attr("data-config",h).css({display:"",opacity:""}),b.find(".layout_field_name").remove(),b.find(".field-location").prop("name","config[layout_grid][fields]["+h+"]"),b.find(".settings-panel").show(),b.appendTo(c),d(),b.find(".icon-edit").trigger("click"),a("#"+h+"_lable").focus().select(),baldrickTriggers(),a(document).trigger("field.added"),e?a("#"+i+"_type").data("type",g.type).trigger("change"):a("#"+h).trigger("field.drop"),rebuild_field_binding()}function d(){a(".toggle-options").sortable({handle:".dashicons-sort"}),a("#grid-pages-panel").sortable({placeholder:"row-drop-helper",handle:".sort-handle",items:".first-row-level",axis:"y",stop:function(){b()}}),a(".layout-column").sortable({connectWith:".layout-column",appendTo:"#grid-pages-panel",helper:"clone",items:".layout-form-field",handle:".drag-handle",cursor:"move",opacity:.7,cursorAt:{left:100,top:15},start:function(a,b){b.helper.css({width:"200px",height:"35px",paddingTop:"20px"})},stop:function(a,c){c.item.removeAttr("style"),b()}}),a("h3 .layout-new-form-field").draggable({helper:"clone",appendTo:"body"}),a(".page-toggle.button").droppable({accept:".layout-form-field",over:function(b,c){a(this).trigger("click"),a(".layout-column").sortable("refresh")}}),a(".layout-column").droppable({greedy:!0,activeClass:"ui-state-dropper",hoverClass:"ui-state-hoverable",accept:".layout-new-form-field",drop:function(b,d){c(d.draggable.clone(),a(this))}}),b()}function e(){if(h){var b=a(".column-fieldinsert");b.length?(b.stop().fadeToggle(700),a(".layout-new-form-field").stop().fadeToggle(700)):cf_clear_puler()}}function f(){a(".caldera-editor-processors-panel ul").sortable({update:function(){rebuild_field_binding()}})}function g(b){var c=a(b),d=a("#"+c.val()+"-tmpl").length?a("#"+c.val()+"-tmpl").html():"",e=c.closest(".caldera-editor-processor-config-wrapper"),f=e.find(".caldera-config-processor-setup"),g=Handlebars.compile(d),h=e.find(".processor_config_string").val(),i=c.data("type");h=h.length&&i===c.val()?JSON.parse(h):processor_defaults[c.val()+"_cfg"],h||(h={}),h._id=e.prop("id"),h._name="config[processors]["+e.prop("id")+"][config]",g=a("<div>").html(g(h)),f.html(g.html()),"function"==typeof window[c.val()+"_init"]&&window[c.val()+"_init"](e.prop("id"),f),e.find(".no-conditions").length&&e.find(".toggle_option_tab").remove(),rebuild_field_binding(),baldrickTriggers(),a(".wp-baldrick").baldrick({request:ajaxurl,method:"POST",before:function(b){var c=a(b);c.data("addNode")&&!c.data("request")&&c.data("request","cf_get_default_setting")}})}add_new_grid_page=function(a){return{page_no:"pg_"+Math.round(1e7*Math.random())}},add_page_grid=function(b){var c=a(".page-toggle").length+1,e=a('<button type="button" data-name="Page '+c+'" data-page="'+b.rawData.page_no+'" class="page-toggle button">'+b.params.trigger.data("addtitle")+" "+c+"</button> "),f=a("#page-toggles");e.appendTo(f),f.show(),d(),e.trigger("click"),1===c&&f.hide(),a(document).trigger("add.page")},a(document).on("remove.page add.page load.page",function(b){var c=a(".page-toggle").length,d=a("#tab_pages");c<=1?d.hide():d.show()}),d(),a("#grid-pages-panel").on("click",".column-fieldinsert .dashicons-plus-alt",function(b){var d=a(this).closest(".column-container");c(a("#newfield-tool").clone().css("display",""),d)}),a("#grid-pages-panel").on("click",".column-split",function(b){var c=a(this).parent().parent(),e=c.attr("class").split("-"),f=a("<div>").insertAfter(c),g=Math.ceil(e[2]/2),h=Math.floor(e[2]/2);e[2]=g,c.attr("class",e.join("-")),e[2]=h,f.addClass(e.join("-")).append('<div class="layout-column column-container">'),a(this).remove(),d(),jQuery(".column-tools").remove(),jQuery(".column-merge").remove()}),a("#grid-pages-panel").on("click",".column-remove",function(c){var d=a(this).closest(".row"),e=d.find(".layout-form-field"),f=d.closest(".layout-grid-panel");if(e.length){if(!confirm(a("#row-remove-fields-message").text()))return;e.each(function(b,c){var d=a(c).data("config");a("#"+d).remove(),a('option[value="'+d+'"]').remove(),a('[data-bind="'+d+'"]').remove(),delete current_form_fields[d]})}d.slideUp(200,function(){if(a(this).remove(),b(),rebuild_field_binding(),!f.find(".row").length){f.remove();var c=a("#page-toggles .button-primary"),d=c.prev(),e=c.next();c.remove(),d.length?d.trigger("click"):e.trigger("click")}a(document).trigger("remove.page")}),jQuery(".column-tools").remove(),jQuery(".column-merge").remove()}),a(".caldera-config-editor-main-panel").on("click",".caldera-add-row",function(c){if(c.preventDefault(),!a(".page-active").length)return void a(".caldera-add-page").trigger("click");var e=a('<div style="display:none;" class="first-row-level row"><div class="col-xs-12"><div class="layout-column column-container"></div></div></div>');a(".page-active").append(e),e.slideDown(200),d(),b()}),a("#grid-pages-panel").on("click",".column-join",function(c){var d=a(this).parent().parent().parent(),e=d.prev(),f=e.attr("class").split("-"),g=d.attr("class").split("-");f[2]=parseFloat(f[2])+parseFloat(g[2]),d.find(".layout-column").contents().appendTo(e.find(".layout-column")),e.attr("class",f.join("-")),d.remove(),b(),jQuery(".column-tools").remove(),jQuery(".column-merge").remove()}),a("#grid-pages-panel").on("mouseenter",".row",function(c){var d=jQuery(this);jQuery(".column-tools,.column-merge").remove(),d.children().children().first().append('<div class="column-remove column-tools"><i class="icon-remove"></i></div>'),d.children().children().last().append('<div class="column-sort column-tools" style="text-align:right;"><i class="dashicons dashicons-menu drag-handle sort-handle"></i></div>'),d.children().children().not(":first").prepend('<div class="column-merge"><div class="column-join column-tools"><i class="icon-join"></i></div></div>');var e=d.parent().parent().parent().width()/12-1;d.children().children().each(function(b,c){var d=a(c),e=d.width()/2-5;d.prepend('<div class="column-fieldinsert column-tools"><i class="dashicons dashicons-plus-alt"></i></div>'),d.parent().hasClass("col-xs-1")||(d.prepend('<div class="column-split column-tools"><i class="dashicons dashicons-leftright"></i></div>'),d.find(".column-split").css("left",e))}),jQuery(".column-merge").draggable({axis:"x",helper:"clone",appendTo:d,grid:[e,0],drag:function(c,d){a(this).addClass("dragging"),a(".column-tools").remove(),a(".column-split").remove();var e=a(this).parent().parent(),f=d.helper,g=d.originalPosition.left>f.position().left?"left":"right",h=e.prev(),i=Math.round(e.parent().width()/12-10),j=Math.abs(d.originalPosition.left-f.position().left);if(e.parent().addClass("sizing"),j>=i){var k=h.attr("class").split("-"),l=e.attr("class").split("-");k[2]=parseFloat(k[2]),l[2]=parseFloat(l[2]),"left"===g?(k[2]--,l[2]++,k[2]>0&&k[2]<k[2]+l[2]?(h.attr("class",k.join("-")),e.attr("class",l.join("-")),d.originalPosition.left=f.position().left):a(this).draggable("option","disabled",!0)):(k[2]++,l[2]--,l[2]>0&&l[2]<l[2]+l[2]?(h.attr("class",k.join("-")),e.attr("class",l.join("-")),d.originalPosition.left=f.position().left):a(this).draggable("option","disabled",!0)),b()}},stop:function(){a(this).removeClass("dragging").parent().parent().parent().removeClass("sizing")}})}),a("#grid-pages-panel").on("mouseleave",".row",function(a){jQuery(".column-tools").remove(),jQuery(".column-merge").remove()}),a("#grid-pages-panel").on("click",".layout-form-field .icon-remove",function(){var b=a(this),c=b.parent(),d=a("#"+c.data("config"));c.slideUp(100,function(){a(this).remove()}),d.slideUp(100,function(){a(this).remove()})}),a(document).on("click",".layout-form-field .dashicons-admin-page",function(){var b=a(this),d=b.parent(),e=d.data("config"),f=a("#"+e).formJSON(),g=b.closest(".column-container"),h=d.clone().css("display",""),i={};d.hasClass("field-edit-open")&&(d.removeClass("field-edit-open"),h.removeClass("field-edit-open"),a(".caldera-editor-field-config-wrapper").hide()),f.config.fields[e]&&(i=f.config.fields[e],delete i.ID),c(h,g,i)}),a(document).on("click",".layout-form-field .icon-edit",function(){var b=a(this),c=b.parent(),d=a("#"+c.data("config")+"_type").val();a(".caldera-editor-field-config-wrapper").hide(),c.hasClass("field-edit-open")?c.removeClass("field-edit-open"):(a(".layout-form-field").removeClass("field-edit-open"),c.addClass("field-edit-open"),a("#"+c.data("config")).show()),a(document).trigger("show."+c.data("config")),a(document).trigger("show.fieldedit"),"radio"!==d&&"checkbox"!==d&&"dropdown"!==d&&"toggle_switch"!==d||a("#"+c.data("config")+"_auto").trigger("change")}),a("body").on("click",".layout-modal-edit-closer,.layout-modal-save-action",function(b){b.preventDefault();var c=a(this),d=a(".layout-form-field.edit-open"),e=c.closest(".layout-modal-container");settings=e.find(".settings-panel").first(),a(".edit-open").removeClass("edit-open"),settings.appendTo(d.find(".settings-wrapper")).hide(),e.hide()}),a(".layout-editor-body").on("change",".layout-core-pod-query",function(){a(this).parent().find(".settings-panel-row").remove(),a(".edit-open").find(".drag-handle .set-pod").html(" - "+a(this).val())}),a(".layout-editor-body").on("click",".remove-where",function(){a(this).closest(".settings-panel-row").remove()}),a(".layout-editor-body").on("click",".use-pod-container",function(){var b=a(this),c=b.prev(),d=c.val();if(d.length){a(".edit-open").find(".drag-handle .set-pod").html(" - "+c.val()),b.parent().parent().find(".spinner").css("display","inline-block");var e={action:"pq_loadpod",pod_reference:{pod:d}};a.post(ajaxurl,e,function(c){b.parent().find(".spinner").css("display","none");var d=a("#where-line-tmpl").html(),e="",f=b.closest(".settings-panel").data("container");for(var g in c)e+='<option value="'+c[g]+'">'+c[g]+"</option>";d=d.replace(/{{fields}}/g,e).replace(/{{container_id}}/g,f),b.parent().append(d)})}}),a(".caldera-editor-header").on("click",".column-sort .icon-edit",function(a){}),a(".layout-editor-body").on("tray_loaded",".layout-template-tray",function(){d()}),a(".caldera-editor-header").on("click",".caldera-editor-header-nav a",function(b){b.preventDefault();var c=a(this);a(".caldera-editor-header-nav li").removeClass("active"),a(".caldera-editor-body").hide(),a(c.attr("href")).show(),c.parent().addClass("active"),rebind_field_bindings()}),a("body").on("change",".required",function(){check_required_bindings(this)}),a("body").on("submit",".caldera-forms-options-form",function(b){a(".required.has-error").length&&b.preventDefault()}),a(".caldera-editor-body").on("click",".add-toggle-option",function(b){var c=a(this);if(c.data("bulk"))return a(c.data("bulk")).toggle(),void a(c.data("bulk")).find("textarea").focus();var d=c.closest(".caldera-editor-field-config-wrapper"),e=d.find(".toggle-options"),f=a("#field-option-row-tmpl").html(),g=Handlebars.compile(f),h="opt"+parseInt(1048576*(Math.random()+1)),i={_name:"config[fields]["+d.prop("id")+"][config]",option:{}};if(c.data("options")){for(var j=a(c.data("options")),k=j.val().split("\n"),l=!1,m=0;m<k.length;m++){var n=k[m],o=n,p=o.split("|");p.length>1&&(o=p[0],n=p[1],l=!0),i.option["opt"+parseInt(1048576*(Math.random()+m))]={value:o,label:n,default:!1}}a(c.data("options")).parent().hide(),j.val(""),!0===l?d.find(".toggle_show_values").prop("checked",!0):d.find(".toggle_show_values").prop("checked",!1),e.empty()}else i.option[h]={value:"",label:"",default:!1};a(".preset_options").val(""),e.append(g(i)),d.find(".toggle_show_values").trigger("change"),a(".toggle-options").sortable({handle:".dashicons-sort"}),k||e.find(".toggle_label_field").last().focus()}),a(".caldera-editor-body").on("change",".preset_options",function(b){var c=a(this),d=c.val(),e=a(c.data("bulk"));preset_options&&preset_options[d]&&preset_options[d].data&&("object"==typeof preset_options[d].data&&preset_options[d].data.length&&(preset_options[d].data=preset_options[d].data.join("\n")),e.val(preset_options[d].data))}),a(".caldera-editor-body").on("click",".toggle-remove-option",function(b){var c=a(this).closest(".caldera-editor-field-config-wrapper").find(".field-config").first();a(this).parent().remove(),c.trigger("change"),a(document).trigger("option.remove")}),a(".caldera-editor-body").on("click",".page-toggle",function(b){var c=a(this),d=c.parent(),e=d.find(".button");e.removeClass("button-primary"),a(".layout-grid-panel").hide().removeClass("page-active"),a("#"+c.data("page")).show().addClass("page-active"),c.addClass("button-primary"),e.each(function(b,c){a(c).html(d.data("title")+" "+(b+1))}),1===e.length&&d.hide()}),a(".caldera-editor-body").on("blur toggle.values",".toggle_label_field",function(b){var c=a(this),d=c.prev();d.val().length||d.val(c.val())}),a(document).on("change focusout",".toggle_value_field",function(){a(document).trigger("show.fieldedit")}),a(document).on("show.fieldedit option.remove",function(b){a(".toggle_value_field.has-error").removeClass("has-error");for(var c=a("#"+a(".layout-form-field.field-edit-open").data("config")),d=c.find(".toggle_value_field"),e=c.find(".notice"),f=0,g=0;g<d.length;g++){for(var h=(d[g].value,0),i=0;i<d.length;i++)d[g]!==d[i]&&d[g].value===d[i].value&&(a(d[i]).addClass("has-error"),h++);h>0&&(a(d[g]).addClass("has-error"),f++)}f>0?(e.slideDown(),b.preventDefault()):e.slideUp()});var h=!1;focus_initial_field=function(b){var c=a(".layout-grid-panel .icon-edit").first();c.length?c.trigger("click"):(a(".layout-column.column-container").first().trigger("mouseover"),h=setInterval(e,500)),a(document).off("load.page",focus_initial_field)},a(document).on("load.page",focus_initial_field),cf_clear_puler=function(){h&&(clearTimeout(h),a(document).off("mouseover",".layout-new-form-field, .column-fieldinsert",cf_clear_puler)),a(".layout-new-form-field, .column-fieldinsert").fadeIn()},a(document).on("mouseover",".layout-new-form-field, .column-fieldinsert",cf_clear_puler),rebuild_field_binding(),a(document).trigger("load.page"),a("body").on("click",".caldera-processor-nav a",function(b){b.preventDefault();var c=a(this);a(".caldera-processor-nav").removeClass("active"),a(".caldera-editor-processor-config-wrapper").hide(),a(c.attr("href")).show(),c.parent().addClass("active")}),a("body").on("click",".add-new-processor",function(b){var c=a(this),d=Handlebars.compile(a("#processor-wrapper-tmpl").html());wrap=a(".active-processors-list"),process_conf=a(".caldera-editor-processor-config"),processid=Math.round(1e8*Math.random()),new_templ=Handlebars.compile(a("#processor-line-tmpl").html()),new_proc={id:"fp_"+processid,type:c.data("type")},wrap.append(new_templ(new_proc)),process_conf.append(d(new_proc)),a("#form_processor_baldrickModalCloser").trigger("click"),a(".caldera-processor-nav a").last().trigger("click"),a("#fp_"+processid+"_type").val(c.data("type")).trigger("change"),f(),baldrickTriggers()}),a("body").on("click",".delete-processor",function(b){var c=a(this),d=c.closest(".caldera-editor-processor-config-wrapper");d.data("type"),confirm(c.data("confirm"))&&(a("."+d.prop("id")).remove(),d.remove(),a(".caldera-processor-nav a").first().trigger("click"),rebuild_field_binding())}),a("body").on("change",".caldera-select-processor-type",function(b){var c=a(this),d=c.closest(".caldera-editor-processor-config-wrapper"),e=c.find('option[value="'+c.val()+'"]').text(),f=d.find(".caldera-editor-processor-title"),h=a(".caldera-processor-nav.active a");""===e&&(e=f.data("title")),f.html(e),h.html(e+' <span class="processor-line-number"></span>').parent().addClass("processor_type_"+c.val()),g(this),rebuild_field_binding()}),a(document).on("click","#cf-shortcode-preview",function(){a(this).focus().select()}),a(document).on("change",".cf-email-preview-toggle",function(){var b=a(this),c=a(".caldera-header-email-preview-button");b.is(":checked")?c.show().attr("aria-hidden","false").css("visibility","visible"):c.hide().attr("aria-hidden","true").css("visibility","hidden")}),rebuild_field_binding(),a(".caldera-select-processor-type").each(function(a,b){g(b)}),f()}),Handlebars.registerHelper("_field",function(a){var b=this,c="",d="",e="",f=this[a.hash.slug]?' data-default="'+this[a.hash.slug]+'"':"";a.hash.required&&(c=" required"),a.hash.exclude&&(e='data-exclude="'+a.hash.exclude+'"'),a.hash.array&&(d="[]","true"!==a.hash.array&&(f='value="'+a.hash.array+'"')),out="<select "+(a.hash.type?'data-type="'+a.hash.type+'"':"")+f+" "+e+' name="'+this._name+"["+a.hash.slug+"]"+d+'" id="'+this._id+"_"+a.hash.slug+'" class="block-input field-config caldera-field-bind'+c+'">',this[a.hash.slug]?out+='<option class="bound-field" value="'+this[a.hash.slug]+'" class="bound-field"></option>':a.hash.required||(out+='<option value=""></option>');for(var g in current_form_fields){var h="";a.hash.type&¤t_form_fields[g].type!==a.hash.type||(b[a.hash.slug]&&b[a.hash.slug]===g&&(h=' selected="selected"'),out+='<option value="'+g+'"'+h+">"+current_form_fields[g].label+" ["+current_form_fields[g].slug+"]</option>")}return out+="</select>",a.hash.required&&(out+='<input class="field-config" name="'+this._name+'[_required_bounds][]" type="hidden" value="'+a.hash.slug+'">'),out}),Handlebars.registerHelper("console",function(a,b){console.log(this)});
|
assets/build/js/entry-viewer-2.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function CFAPI(a,b,c,d,e){function f(a){a.setRequestHeader("X-CF-ENTRY-TOKEN",h),a.setRequestHeader("X-WP-Nonce",g)}var g,h;return"object"==typeof d?(g="string"==typeof d.nonce&&d.nonce,h="string"==typeof d.nonce&&d.token):g=d,{getForm:function(){return e.ajax({url:a.form+c,method:"GET",beforeSend:function(a){f(a)}}).done(function(a){return a}).fail(function(a){console.log(a)})},getEntries:function(a){return e.ajax({url:this.paginatedEntryURL(c,a,b),method:"GET",beforeSend:function(a){f(a)}}).done(function(a){return a}).fail(function(a){console.log(a)})},paginatedEntryURL:function(c,d){var f=e.param({page:d,per_page:b}),g=-1===a.entries.indexOf("?")?"?":"&";return a.entries+c+g+f},setPerPage:function(a){b=a},getPerPage:function(){return b},savePerPage:function(){return e.ajax({url:a.entrySettings,method:"POST",dataType:"json",beforeSend:function(a){f(a)},data:{per_page:b}}).done(function(a){return a.per_page}).fail(function(a){console.log(a)})}}}function CFFormStoreFactory(a,b,c){return{state:{formId:a,allFields:b,listFields:c},setFormId:function(a){this.state.formId=a},setAllFields:function(a){this.state.allFields=a},setListFields:function(a){this.state.listFields=a},getAllFields:function(){return this.state.allFields}}}function CFEntriesStoreFactory(a,b){return{state:{formId:a,entries:b,total:0,totalPages:0,page:0},setEntries:function(a){this.state.entries=a},setTotal:function(a){this.state.total=a},getTotal:function(){return this.state.total},setTotalPages:function(a){this.state.totalPages=a},getTotalPages:function(){return this.state.totalPages},setPage:function(a){this.state.page=a},getPage:function(){return this.state.page},getEntry:function(a){return"object"==typeof this.state.entries[a]&&this.state.entries[a]},getFieldFromEntry:function(a,b){return"object"==typeof a.fields[b]&&a.fields[b]}}}function CFEntryViewer2(a,b,c,d,e){var f=jQuery(document.getElementById(e.targets.entry));return new Vue({data:function(){return{form:b.state,entries:c.state,page:1,perPage:d.getPerPage(),totalPages:c.getTotalPages(),singleEntry:{},currentView:"empty"}},el:"#caldera-forms-entries",components:{"single-entry":{template:"#"+e.targets.entries,data:function(){return{singleEntryFields:Object,singleEntry:Object}}}},mounted:function(){this.paginationButtons()},methods:{paginationButtons:function(){var a=jQuery(this.$el),b=a.find(".caldera-forms-entry-viewer-next-button"),c=a.find(".caldera-forms-entry-viewer-prev-button");this.page>=this.totalPages?b.prop("disabled",!0).attr("aria-disabled",!0):b.prop("disabled",!1).attr("aria-disabled",!1),1==this.page?c.prop("disabled",!0).attr("aria-disabled",!0):c.prop("disabled",!1).attr("aria-disabled",!1)},nextPage:function(){var a=this;this.$set(this,"page",this.page+1),jQuery.when(d.getEntries(a.page)).then(function(b){c.setEntries(b),a.$set(a,"entries",c.state),a.paginationButtons()},function(){a.notAllowed()})},prevPage:function(){if(0>=this.page-1)return!1;var a=this;this.$set(this,"page",this.page-1),jQuery.when(d.getEntries(a.page)).then(function(b){c.setEntries(b),a.$set(a,"entries",c.state),a.paginationButtons()},function(){a.notAllowed()})},entryHasField:function(a,b){var d=c.getEntry(b);return!1!==d&&c.getFieldFromEntry(d,a)},updatePerPage:function(){var a=this;d.setPerPage(this.perPage),jQuery.when(d.getEntries(a.page)).then(function(b){c.setEntries(b),a.$set(a,"entries",c.state)}),d.savePerPage(this.perPage)},fieldValue:function(a,b){return"string"==typeof b[a]?b[a]:"object"==typeof b.fields[a]?b.fields[a].value:""},showSingle:function(a){var d,g=c.getEntry(a),h=b.getAllFields(),i=Vue.extend({template:"#"+e.templates.entry,data:function(){return{fields:h,entry:g}},methods:{fieldValue:function(a){return"string"==typeof g[a]?g[a]:"object"==typeof g.fields[a]?this.checkResult(g.fields[a].value):""},close:function(){f.empty(),d.destroy()},checkResult:function(a){return"object"==typeof a&&(a=Object.values(a)),a}}});f.empty();var j=document.createElement("div");jQuery(j).attr("id",e.targets.entry+"-"+a),jQuery(j).appendTo(f),(new i).$mount("#"+e.targets.entry+"-"+a),d=jQuery("[data-remodal-id="+a+"]").remodal(),d.open()},notAllowed:function(a){"object"!=typeof a&&404!=a.status&&(f.remove(),jQuery("#caldera-forms-entries-nav").remove(),jQuery(document.getElementById("caldera-forms-entries")).html('<div class="alert alert-warning">'+e.strings.not_allowed+"</div>"))}}})}jQuery(
|
1 |
+
function CFAPI(a,b,c,d,e){function f(a){a.setRequestHeader("X-CF-ENTRY-TOKEN",h),a.setRequestHeader("X-WP-Nonce",g)}var g,h;return"object"==typeof d?(g="string"==typeof d.nonce&&d.nonce,h="string"==typeof d.nonce&&d.token):g=d,{getForm:function(){return e.ajax({url:a.form+c,method:"GET",beforeSend:function(a){f(a)}}).done(function(a){return a}).fail(function(a){console.log(a)})},getEntries:function(a){return e.ajax({url:this.paginatedEntryURL(c,a,b),method:"GET",beforeSend:function(a){f(a)}}).done(function(a){return a}).fail(function(a){console.log(a)})},paginatedEntryURL:function(c,d){var f=e.param({page:d,per_page:b}),g=-1===a.entries.indexOf("?")?"?":"&";return a.entries+c+g+f},setPerPage:function(a){b=a},getPerPage:function(){return b},savePerPage:function(){return e.ajax({url:a.entrySettings,method:"POST",dataType:"json",beforeSend:function(a){f(a)},data:{per_page:b}}).done(function(a){return a.per_page}).fail(function(a){console.log(a)})}}}function CFFormStoreFactory(a,b,c){return{state:{formId:a,allFields:b,listFields:c},setFormId:function(a){this.state.formId=a},setAllFields:function(a){this.state.allFields=a},setListFields:function(a){this.state.listFields=a},getAllFields:function(){return this.state.allFields}}}function CFEntriesStoreFactory(a,b){return{state:{formId:a,entries:b,total:0,totalPages:0,page:0},setEntries:function(a){this.state.entries=a},setTotal:function(a){this.state.total=a},getTotal:function(){return this.state.total},setTotalPages:function(a){this.state.totalPages=a},getTotalPages:function(){return this.state.totalPages},setPage:function(a){this.state.page=a},getPage:function(){return this.state.page},getEntry:function(a){return"object"==typeof this.state.entries[a]&&this.state.entries[a]},getFieldFromEntry:function(a,b){return"object"==typeof a.fields[b]&&a.fields[b]}}}function CFEntryViewer2(a,b,c,d,e){var f=jQuery(document.getElementById(e.targets.entry));return new Vue({data:function(){return{form:b.state,entries:c.state,page:1,perPage:d.getPerPage(),totalPages:c.getTotalPages(),singleEntry:{},currentView:"empty"}},el:"#caldera-forms-entries",components:{"single-entry":{template:"#"+e.targets.entries,data:function(){return{singleEntryFields:Object,singleEntry:Object}}}},mounted:function(){this.paginationButtons()},methods:{paginationButtons:function(){var a=jQuery(this.$el),b=a.find(".caldera-forms-entry-viewer-next-button"),c=a.find(".caldera-forms-entry-viewer-prev-button");this.page>=this.totalPages?b.prop("disabled",!0).attr("aria-disabled",!0):b.prop("disabled",!1).attr("aria-disabled",!1),1==this.page?c.prop("disabled",!0).attr("aria-disabled",!0):c.prop("disabled",!1).attr("aria-disabled",!1)},nextPage:function(){var a=this;this.$set(this,"page",this.page+1),jQuery.when(d.getEntries(a.page)).then(function(b){c.setEntries(b),a.$set(a,"entries",c.state),a.paginationButtons()},function(){a.notAllowed()})},prevPage:function(){if(0>=this.page-1)return!1;var a=this;this.$set(this,"page",this.page-1),jQuery.when(d.getEntries(a.page)).then(function(b){c.setEntries(b),a.$set(a,"entries",c.state),a.paginationButtons()},function(){a.notAllowed()})},entryHasField:function(a,b){var d=c.getEntry(b);return!1!==d&&c.getFieldFromEntry(d,a)},updatePerPage:function(){var a=this;d.setPerPage(this.perPage),jQuery.when(d.getEntries(a.page)).then(function(b){c.setEntries(b),a.$set(a,"entries",c.state)}),d.savePerPage(this.perPage)},fieldValue:function(a,b){return"string"==typeof b[a]?b[a]:"object"==typeof b.fields[a]?b.fields[a].value:""},showSingle:function(a){var d,g=c.getEntry(a),h=b.getAllFields(),i=Vue.extend({template:"#"+e.templates.entry,data:function(){return{fields:h,entry:g}},methods:{fieldValue:function(a){return"string"==typeof g[a]?g[a]:"object"==typeof g.fields[a]?this.checkResult(g.fields[a].value):""},close:function(){f.empty(),d.destroy()},checkResult:function(a){return"object"==typeof a&&(a=Object.values(a)),a}}});f.empty();var j=document.createElement("div");jQuery(j).attr("id",e.targets.entry+"-"+a),jQuery(j).appendTo(f),(new i).$mount("#"+e.targets.entry+"-"+a),d=jQuery("[data-remodal-id="+a+"]").remodal(),d.open()},notAllowed:function(a){"object"!=typeof a&&404!=a.status&&(f.remove(),jQuery("#caldera-forms-entries-nav").remove(),jQuery(document.getElementById("caldera-forms-entries")).html('<div class="alert alert-warning">'+e.strings.not_allowed+"</div>"))}}})}jQuery(function(a){if("object"==typeof CF_ENTRY_VIEWER_2_CONFIG){var b=CF_ENTRY_VIEWER_2_CONFIG.formId,c={nonce:CF_ENTRY_VIEWER_2_CONFIG.api.nonce,token:CF_ENTRY_VIEWER_2_CONFIG.api.token},d=new CFAPI(CF_ENTRY_VIEWER_2_CONFIG.api,CF_ENTRY_VIEWER_2_CONFIG.perPage,b,c,a);a.when(d.getForm(),d.getEntries(1)).then(function(a,c){var e=a[0],f=c[0],g=new CFFormStoreFactory(b,e.field_details.order,e.field_details.entry_list),h=new CFEntriesStoreFactory(b,f);h.setPage(1),null!=c[2].getResponseHeader("X-CF-API-TOTAL-PAGES")&&h.setTotalPages(c[2].getResponseHeader("X-CF-API-TOTAL-PAGES")),null!=c[2].getResponseHeader("X-CF-API-TOTAL")&&h.setTotal(c[2].getResponseHeader("X-CF-API-TOTAL"));new CFEntryViewer2(b,g,h,d,CF_ENTRY_VIEWER_2_CONFIG)},function(a){var b="object"==typeof CF_ENTRY_VIEWER_2_CONFIG.targets&&"string"==typeof CF_ENTRY_VIEWER_2_CONFIG.targets.entries?CF_ENTRY_VIEWER_2_CONFIG.targets.entries:"caldera-forms-entries",c="object"==typeof CF_ENTRY_VIEWER_2_CONFIG.targets&&"string"==typeof CF_ENTRY_VIEWER_2_CONFIG.targets.nav?CF_ENTRY_VIEWER_2_CONFIG.targets.nav:"caldera-forms-entries-nav";jQuery("#"+c).remove(),"object"==typeof a&&404==a.status?jQuery("#"+b).html('<div class="alert alert-error">'+CF_ENTRY_VIEWER_2_CONFIG.strings.no_entries+"</div>"):jQuery("#"+b).html('<div class="alert alert-error">'+CF_ENTRY_VIEWER_2_CONFIG.strings.not_allowed+"</div>")})}});
|
assets/build/js/frontend-script-init.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function CalderaFormsFieldSync(a,b,c,d,e){for(var f=0;f<b.length;f++)d(document).on("keyup change blur mouseover","[data-field='"+b[f]+"']",function(){if(a.data("sync")){var b=a.data("sync");if(id=a.data("field"),reg=new RegExp("{{([^}]*?)}}","g"),template=b.match(reg),!a.data("unsync")&&void 0!=template&&template.length){for(var f=0;f<template.length;f++){for(var g=template[f].replace(/\}/g,"").replace(/\{/g,""),h=new RegExp(template[f],"g"),i=c.find("[data-field='"+g+"']"),j="",k=0;k<i.length;k++){var l=d(i[k]);(!l.is(":radio")&&!l.is(":checkbox")||l.is(":checked"))&&(j+=l.val())}b=b.replace(h,j)}e.mutateState(a.attr("id"),j),a.val(b)}}}),d("[data-field='"+b[f]+"']").trigger("change"),a.on("keyup change",function(){a.attr("data-unsync","1"),a.removeAttr("data-sync"),a.removeAttr("data-binds")})}function CalderaFormsResetNonce(a,b,c){function d(a){return(new Date).getTime()-36e3>a}function e(){c.ajax({url:b.rest.tokens.nonce,method:"POST",beforeSend:function(a){a.setRequestHeader("X-WP-Nonce",b.rest.nonce)},data:{form_id:a}}).done(function(a){f.val(a.nonce),f.data("nonce-time",(new Date).getTime())})}var f;this.init=function(){f=c("#"+b.nonce.field+"_"+a),d(f.data("nonce-time"))&&e()}}function caldera_forms_check_protocol(a){var b=window.location.protocol,c=document.createElement("a");return c.href=a,c.protocol===b}function CalderaFormsCrossOriginWarning(a,b,c){function d(){b(a.data("target")).append('<div class="alert alert-warning">'+c.mixed_protocol+"</div>")}this.maybeWarn=function(){if(a.find('[name="cfajax"]').length){caldera_forms_check_protocol(a.data("request"))||d()}}}function CalderaFormsJQueryWarning(a,b,c){function d(){b(a.data("target")).append('<div class="alert alert-warning">'+c.jquery_old+"</div>")}function e(a){var b=a.split(".");if(1==b[0]){if(12>b[2])return!0;if(4>b[2])return!0}return!1}this.maybeWarn=function(){var a=b.fn.jquery;"string"==typeof a&&"1.12.4"!=a&&e(a)&&d()}}var cf_jsfields_init,cf_presubmit;!function(a){cf_validate_form=function(b){return b.parsley({errorsWrapper:'<span class="help-block caldera_ajax_error_block"></span>',errorTemplate:"<span></span>",errorsContainer:function(a){return a.$element.closest(".form-group")}}).on("field:error",function(c){this.$element.closest(".form-group").addClass("has-error"),a(document).trigger("cf.validate.fieldError",{inst:c,form:b,el:this.$element})}).on("field:success",function(c){if("star"===this.$element.data("type")&&this.$element.prop("required")&&0==this.$element.val())return void(c.validationResult=!1);this.$element.closest(".form-group").removeClass("has-error"),a(document).trigger("cf.validate.fieldSuccess",{inst:c,form:b,el:this.$element})}).on("form:success",function(c){a(document).trigger("cf.validate.FormSuccess",{inst:c,form:b,el:this.$element})}).on("form:error",function(c){a(document).trigger("cf.validate.FormError",{inst:c,form:b,el:this.$element})})},cf_jsfields_init=function(){a(".init_field_type[data-type]").each(function(b,c){var d=a(c);"function"==typeof window[d.data("type")+"_init"]&&window[d.data("type")+"_init"](d.prop("id"),d[0])}),window.Parsley.on("field:validated",function(){setTimeout(function(){a(document).trigger("cf.error")},15)}),"undefined"==typeof resBaldrickTriggers&&a(".caldera_forms_form").length,a(document).trigger("cf.fieldsInit")},a("document").ready(function(){cf_jsfields_init()}),a(".caldera-form-page").length&&a(".caldera-form-page").on("keypress","[data-field]:not(textarea)",function(a){13===a.keyCode&&a.preventDefault()}),a(document).on("click",".cf_modal_button",function(b){b.preventDefault();var c=a(this);a(c.attr("href")).show()}),a(document).on("click",".caldera-front-modal-closer",function(b){b.preventDefault(),a(this).closest(".caldera-front-modal-container").hide()}),a(document).on("cf.add cf.enable cf.disable cf.pagenav",cf_jsfields_init),a(document).on("click","[data-page]",function(b){function c(a,b,c){window=window||{};var d="object"==typeof window.cf2&&"object"==typeof window.cf2[b]?window.cf2[b]:null,e=a.attr("id");return function(a,b){return!(!d||!d.fields)&&(!!d.fields.hasOwnProperty(a)&&d.fields[a])}(e,b)?(c=d.component.isFieldValid(e))||d.component.addFieldMessage(e,ParsleyValidator.getErrorMessage("required"),!0):c=a.parsley().isValid(),c}var d,e,f,g=a(this),h=g.closest(".caldera-form-page"),i=g.closest("form.caldera_forms_form"),j=i.attr("id"),k=i.data("instance"),l=i.find(".caldera-form-page:visible").data("formpage"),m=h.data("formpage")?h.data("formpage"):g.data("page"),n=a('.breadcrumb[data-form="caldera_form_'+k+'"]'),o=!0,p=l;if(i.length){if(cf_validate_form(i).destroy(),f=i.find("[data-field]"),i.find(".has-error").removeClass("has-error"),"prev"!==g.data("page")&&m>=l){f=a("#caldera_form_"+k+' [data-formpage="'+l+'"] [data-field]');for(var q,r,s=0;s<f.length;s++)q=a(f[s]),q.hasClass("cf-multi-uploader")||q.hasClass("cf-multi-uploader-list")||!0!==(r=c(q,j,r))&&(b.preventDefault(),o=!1);if(!0===o&&m>l)for(var t=m-1;t>=1;t--){f=a("#caldera_form_"+k+' [data-formpage="'+t+'"] [data-field]');for(var s=0;s<f.length;s++)q=a(f[s]),!0!==(r=c(q,j,r))&&(b.preventDefault(),o=!1,t>p&&(p=t))}}if(!1===o)return p!==l&&(a("#form_page_"+k+"_pg_"+l).hide().attr("aria-hidden","true").css("visibility","hidden"),a("#form_page_"+k+"_pg_"+p).show().attr("aria-hidden","false").css("visibility","visible")),cf_validate_form(i).validate(),!1;"next"===g.data("page")?(n&&n.find("li.active").removeClass("active").children().attr("aria-expanded","false"),d=i.find('.caldera-form-page[data-formpage="'+(m+1)+'"]'),d.length&&(h.hide().attr("aria-hidden","true").css("visibility","hidden"),d.show().attr("aria-hidden","false").css("visibility","visible"),n&&n.find('a[data-page="'+(m+1)+'"]').attr("aria-expanded","true").parent().addClass("active"))):"prev"===g.data("page")?(n&&n.find("li.active").removeClass("active").children().attr("aria-expanded","false"),e=i.find('.caldera-form-page[data-formpage="'+(m-1)+'"]'),e.length&&(h.hide().attr("aria-hidden","true").css("visibility","hidden"),e.show().attr("aria-hidden","false").css("visibility","visible"),n&&n.find('a[data-page="'+(m-1)+'"]').attr("aria-expanded","true").parent().addClass("active"))):g.data("pagenav")&&(b.preventDefault(),g.closest(".breadcrumb").find("li.active").removeClass("active").children().attr("aria-expanded","false"),a("#"+g.data("pagenav")+" .caldera-form-page").hide().attr("aria-hidden","true").css("visibility","hidden"),a("#"+g.data("pagenav")+'\t.caldera-form-page[data-formpage="'+g.data("page")+'"]').show().attr("aria-hidden","false").css("visibility","visible"),g.parent().addClass("active").children().attr("aria-expanded","true")),a("html, body").animate({scrollTop:i.offset().top-100},200),a(document).trigger("cf.pagenav")}});var b;a(".caldera-grid .breadcrumb").each(function(c,d){a(d).find("a[data-pagenav]").each(function(c,d){var e=a(d),f=e.data("pagenav");a("#"+f+' .caldera-form-page[data-formpage="'+e.data("page")+'"]').find(".has-error").length&&(e.parent().addClass("error"),void 0===b&&(e.trigger("click"),b=!0))})}),a(document).on("click",'form.caldera_forms_form [type="submit"]',function(b){var c=a(this),d=c.closest(".caldera_forms_form"),e=cf_validate_form(d);if(a(document).trigger("cf.form.submit",{e:b,$form:d}),e.validate())a(document).trigger("cf.form.validated",{e:b,$form:d}),e.destroy();else{if(a(".caldera-form-page").length){var f=c.parents(".caldera-form-page").data("formpage"),g=[],h=[];if(e.fields.forEach(function(a,b){if(!0!==a.validationResult){var c=a.$element.parents(".caldera-form-page");if(void 0!=c&&c.length&&a.$element.parents(".caldera-form-page").data("formpage")>f)return void h.push(a.$element.data("field"));g.push(a)}}),!g.length)return h.length&&d.append('<input type="hidden" name="_cf_future" value="'+h.toString()+'">'),void e.destroy()}b.preventDefault()}})}(jQuery),window.addEventListener("load",function(){!function(a){"use strict";var b=void 0===typeof window.wp;if(window.CALDERA_FORMS={},"object"==typeof CFFIELD_CONFIG){var c,d,e,f,g,h,i,j,k,l=!1,m=!1;a(".caldera_forms_form").each(function(n,o){if(h=a(o),c=h.attr("id"),g=h.data("instance"),"object"==typeof CFFIELD_CONFIG[g])if(k=a(document.getElementById(c)),b)a(k.data("target")).append('<div class="alert alert-warning">'+CFFIELD_CONFIG[g].error_strings.wp_not_defined+"</div>");else{m||(i=new CalderaFormsCrossOriginWarning(h,a,CFFIELD_CONFIG[g].error_strings),i.maybeWarn(),m=!0),!l&&CFFIELD_CONFIG[g].error_strings.hasOwnProperty("jquery_old")&&(j=new CalderaFormsJQueryWarning(h,a,CFFIELD_CONFIG[g].error_strings),j.maybeWarn(),l=!0),d=h.data("form-id"),f=CFFIELD_CONFIG[g].configs;var p=new CFState(d,a);p.init(CFFIELD_CONFIG[g].fields.defaults,CFFIELD_CONFIG[g].fields.calcDefaults),"object"!=typeof window.cfstate&&(window.cfstate={}),window.cfstate[c]=p,k.find("[data-sync]").each(function(){var b=a(this);b.data("unsync")||new CalderaFormsFieldSync(b,b.data("binds"),k,a,p)}),e=new Caldera_Forms_Field_Config(f,a(document.getElementById(c)),a,p),e.init(),a(document).trigger("cf.form.init",{$form:k,idAttr:c,formId:d,state:p,fieldIds:CFFIELD_CONFIG[g].fields.hasOwnProperty("ids")?CFFIELD_CONFIG[g].fields.ids:[],nonce:jQuery("#_cf_verify_"+d).val()})}})}}(jQuery)});var cf_jsfields_init,cf_validate_form;!function(a){cf_validate_form=function(a){return a.parsley({errorsWrapper:'<span class="help-block caldera_ajax_error_block"></span>',errorTemplate:"<span></span>",errorsContainer:function(a){return a.$element.closest(".form-group")}}).on("field:error",function(){this.$element.closest(".form-group").addClass("has-error")}).on("field:success",function(){this.$element.closest(".form-group").removeClass("has-error")})},a("[data-sync]").each(function(){for(var b=a(this),c=b.data("binds"),d=b.closest("form"),e=0;e<c.length;e++)a(document).on("keyup change blur mouseover","[data-field='"+c[e]+"']",function(){var c=b.data("sync");if(id=a(this).data("field"),reg=new RegExp("{{([^}]*?)}}","g"),template=c.match(reg),!b.data("unsync")){for(var e=0;e<template.length;e++){for(var f=template[e].replace(/\}/g,"").replace(/\{/g,""),g=new RegExp(template[e],"g"),h=d.find("[data-field='"+f+"']"),i="",j=0;j<h.length;j++){var k=a(h[j]);(!k.is(":radio")&&!k.is(":checkbox")||k.is(":checked"))&&(i+=k.val())}c=c.replace(g,i)}b.val(c)}}),a("[data-field='"+c[e]+"']").trigger("change")}),a(document).on("change keypress","[data-sync]",function(){a(this).data("unsync",!0)}),cf_jsfields_init=function(){a(".init_field_type[data-type]").each(function(b,c){var d=a(c);"function"==typeof window[d.data("type")+"_init"]&&window[d.data("type")+"_init"](d.prop("id"),d[0])}),"undefined"!=typeof cfValidatorLocal&&window.Parsley.setLocale(cfValidatorLocal),"undefined"!=typeof cfModals&&void 0!==cfModals.config&&void 0!==cfModals.config.validator_lang&&window.Parsley.setLocale(cfModals.config.validator_lang),window.Parsley.on("field:validated",function(){setTimeout(function(){a(document).trigger("cf.error")},15)}),"undefined"==typeof resBaldrickTriggers&&a(".caldera_forms_form").length},a("document").ready(function(){cf_jsfields_init()}),a(".caldera-form-page").length&&a(".caldera-form-page").on("keypress","[data-field]:not(textarea)",function(a){13===a.keyCode&&a.preventDefault()}),a(document).on("click",".cf_modal_button",function(b){b.preventDefault();var c=a(this);a(c.attr("href")).show()}),a(document).on("click",".caldera-front-modal-closer",function(b){b.preventDefault(),a(this).closest(".caldera-front-modal-container").hide()}),a(document).on("cf.add cf.enable cf.disable cf.pagenav",cf_jsfields_init),a(document).on("click","[data-page]",function(b){var c,d,e,f=a(this),g=f.closest(".caldera-form-page"),h=f.closest("form.caldera_forms_form"),i=h.data("instance"),j=h.find(".caldera-form-page:visible").data("formpage"),k=g.data("formpage")?g.data("formpage"):f.data("page"),l=a('.breadcrumb[data-form="caldera_form_'+i+'"]'),m=!0,n={};if(h.length){if(cf_validate_form(h).destroy(),e=h.find("[data-field]"),h.find(".has-error").removeClass("has-error"),"prev"!==f.data("page")&&k>=j)for(var o=0;o<e.length;o++){var p=a(e[o]);if(p.is(":radio,:checkbox")){if(!p.hasClass("option-required")||!1===p.is(":visible"))continue;n[p.data("field")]||(n[p.data("field")]=[]),n[p.data("field")].push(p.prop("checked"))}else{if(p.prop("required")&&!1===p.is(":visible"))continue;if(p.prop("required")&&!0!==p.parsley().isValid()){if(p.is(":visible"))p.parsley().validate(),b.preventDefault();else{var q=parseFloat(p.closest(".caldera-form-page[data-formpage]").data("formpage"));q<parseFloat(k)&&h.find('[data-page="'+q+'"]').addClass("has-error")}m=!1}}}for(var r in n)n[r].indexOf(!0)<0?(a('[for="'+r+"_"+i+'"]').parent().addClass("has-error"),m=!1):a('[for="'+r+"_"+i+'"]').parent().removeClass("has-error");if(!1===m)return cf_validate_form(h).validate(),!1;"next"===f.data("page")?(l&&l.find("li.active").removeClass("active").children().attr("aria-expanded","false"),c=h.find('.caldera-form-page[data-formpage="'+(k+1)+'"]'),c.length&&(g.hide().attr("aria-hidden","true").css("visibility","hidden"),c.show().attr("aria-hidden","false").css("visibility","visible"),l&&l.find('a[data-page="'+(k+1)+'"]').attr("aria-expanded","true").parent().addClass("active"))):"prev"===f.data("page")?(l&&l.find("li.active").removeClass("active").children().attr("aria-expanded","false"),d=h.find('.caldera-form-page[data-formpage="'+(k-1)+'"]'),d.length&&(g.hide().attr("aria-hidden","true").css("visibility","hidden"),d.show().attr("aria-hidden","false").css("visibility","visible"),l&&l.find('a[data-page="'+(k-1)+'"]').attr("aria-expanded","true").parent().addClass("active"))):f.data("pagenav")&&(b.preventDefault(),f.closest(".breadcrumb").find("li.active").removeClass("active").children().attr("aria-expanded","false"),a("#"+f.data("pagenav")+" .caldera-form-page").hide().attr("aria-hidden","true").css("visibility","hidden"),a("#"+f.data("pagenav")+'\t.caldera-form-page[data-formpage="'+f.data("page")+'"]').show().attr("aria-hidden","false").css("visibility","visible"),f.parent().addClass("active").children().attr("aria-expanded","true")),a("html, body").animate({scrollTop:h.offset().top-100},200),a(document).trigger("cf.pagenav")}});var b;a(".caldera-grid .breadcrumb").each(function(c,d){a(d).find("a[data-pagenav]").each(function(c,d){var e=a(d),f=e.data("pagenav");a("#"+f+' .caldera-form-page[data-formpage="'+e.data("page")+'"]').find(".has-error").length&&(e.parent().addClass("error"),void 0===b&&(e.trigger("click"),b=!0))})}),a(document).on("click",'form.caldera_forms_form [type="submit"]',function(b){var c=a(this),d=c.closest(".caldera_forms_form"),e=cf_validate_form(d);e.validate()?e.destroy():b.preventDefault()})}(jQuery);
|
1 |
+
function CalderaFormsFieldSync(a,b,c,d,e){for(var f=0;f<b.length;f++)d(document).on("keyup change blur mouseover","[data-field='"+b[f]+"']",function(){if(a.data("sync")){var b=a.data("sync");if(id=a.data("field"),reg=new RegExp("{{([^}]*?)}}","g"),template=b.match(reg),!a.data("unsync")&&void 0!=template&&template.length){for(var f=0;f<template.length;f++){for(var g=template[f].replace(/\}/g,"").replace(/\{/g,""),h=new RegExp(template[f],"g"),i=c.find("[data-field='"+g+"']"),j="",k=0;k<i.length;k++){var l=d(i[k]);(!l.is(":radio")&&!l.is(":checkbox")||l.is(":checked"))&&(j+=l.val())}b=b.replace(h,j)}e.mutateState(a.attr("id"),j),a.val(b)}}}),d("[data-field='"+b[f]+"']").trigger("change"),a.on("keyup change",function(){a.attr("data-unsync","1"),a.removeAttr("data-sync"),a.removeAttr("data-binds")})}function CalderaFormsResetNonce(a,b,c){function d(a){return(new Date).getTime()-36e3>a}function e(){c.ajax({url:b.rest.tokens.nonce,method:"POST",beforeSend:function(a){a.setRequestHeader("X-WP-Nonce",b.rest.nonce)},data:{form_id:a}}).done(function(a){f.val(a.nonce),f.data("nonce-time",(new Date).getTime())})}var f;this.init=function(){f=c("#"+b.nonce.field+"_"+a),d(f.data("nonce-time"))&&e()}}function caldera_forms_check_protocol(a){var b=window.location.protocol,c=document.createElement("a");return c.href=a,c.protocol===b}function CalderaFormsCrossOriginWarning(a,b,c){function d(){b(a.data("target")).append('<div class="alert alert-warning">'+c.mixed_protocol+"</div>")}this.maybeWarn=function(){if(a.find('[name="cfajax"]').length){caldera_forms_check_protocol(a.data("request"))||d()}}}function CalderaFormsJQueryWarning(a,b,c){function d(){b(a.data("target")).append('<div class="alert alert-warning">'+c.jquery_old+"</div>")}function e(a){var b=a.split(".");if(1==b[0]){if(12>b[2])return!0;if(4>b[2])return!0}return!1}this.maybeWarn=function(){var a=b.fn.jquery;"string"==typeof a&&"1.12.4"!=a&&e(a)&&d()}}var cf_jsfields_init,cf_presubmit;!function(a){cf_validate_form=function(b){return b.parsley({errorsWrapper:'<span class="help-block caldera_ajax_error_block"></span>',errorTemplate:"<span></span>",errorsContainer:function(a){return a.$element.closest(".form-group")}}).on("field:error",function(c){this.$element.closest(".form-group").addClass("has-error"),a(document).trigger("cf.validate.fieldError",{inst:c,form:b,el:this.$element})}).on("field:success",function(c){if("star"===this.$element.data("type")&&this.$element.prop("required")&&0==this.$element.val())return void(c.validationResult=!1);this.$element.closest(".form-group").removeClass("has-error"),a(document).trigger("cf.validate.fieldSuccess",{inst:c,form:b,el:this.$element})}).on("form:success",function(c){a(document).trigger("cf.validate.FormSuccess",{inst:c,form:b,el:this.$element})}).on("form:error",function(c){a(document).trigger("cf.validate.FormError",{inst:c,form:b,el:this.$element})})},cf_jsfields_init=function(){a(".init_field_type[data-type]").each(function(b,c){var d=a(c);"function"==typeof window[d.data("type")+"_init"]&&window[d.data("type")+"_init"](d.prop("id"),d[0])}),window.Parsley.on("field:validated",function(){setTimeout(function(){a(document).trigger("cf.error")},15)}),"undefined"==typeof resBaldrickTriggers&&a(".caldera_forms_form").length,a(document).trigger("cf.fieldsInit")},jQuery(function(){cf_jsfields_init()}),a(".caldera-form-page").length&&a(".caldera-form-page").on("keypress","[data-field]:not(textarea)",function(a){13===a.keyCode&&a.preventDefault()}),a(document).on("click",".cf_modal_button",function(b){b.preventDefault();var c=a(this);a(c.attr("href")).show()}),a(document).on("click",".caldera-front-modal-closer",function(b){b.preventDefault(),a(this).closest(".caldera-front-modal-container").hide()}),a(document).on("cf.add cf.enable cf.disable cf.pagenav",cf_jsfields_init),a(document).on("click","[data-page]",function(b){function c(a,b,c){window=window||{};var d="object"==typeof window.cf2&&"object"==typeof window.cf2[b]?window.cf2[b]:null,e=a.attr("id");return function(a,b){return!(!d||!d.fields)&&(!!d.fields.hasOwnProperty(a)&&d.fields[a])}(e,b)?(c=d.component.isFieldValid(e))||d.component.addFieldMessage(e,ParsleyValidator.getErrorMessage("required"),!0):c=a.parsley().isValid(),c}var d,e,f,g=a(this),h=g.closest(".caldera-form-page"),i=g.closest("form.caldera_forms_form"),j=i.attr("id"),k=i.data("instance"),l=i.find(".caldera-form-page:visible").data("formpage"),m=h.data("formpage")?h.data("formpage"):g.data("page"),n=a('.breadcrumb[data-form="caldera_form_'+k+'"]'),o=!0,p=l;if(i.length){if(cf_validate_form(i).destroy(),f=i.find("[data-field]"),i.find(".has-error").removeClass("has-error"),"prev"!==g.data("page")&&m>=l){f=a("#caldera_form_"+k+' [data-formpage="'+l+'"] [data-field]');for(var q,r,s=0;s<f.length;s++)q=a(f[s]),q.hasClass("cf-multi-uploader")||q.hasClass("cf-multi-uploader-list")||!0!==(r=c(q,j,r))&&(b.preventDefault(),o=!1);if(!0===o&&m>l)for(var t=m-1;t>=1;t--){f=a("#caldera_form_"+k+' [data-formpage="'+t+'"] [data-field]');for(var s=0;s<f.length;s++)q=a(f[s]),!0!==(r=c(q,j,r))&&(b.preventDefault(),o=!1,t>p&&(p=t))}}if(!1===o)return p!==l&&(a("#form_page_"+k+"_pg_"+l).hide().attr("aria-hidden","true").css("visibility","hidden"),a("#form_page_"+k+"_pg_"+p).show().attr("aria-hidden","false").css("visibility","visible")),cf_validate_form(i).validate(),!1;"next"===g.data("page")?(n&&n.find("li.active").removeClass("active").children().attr("aria-expanded","false"),d=i.find('.caldera-form-page[data-formpage="'+(m+1)+'"]'),d.length&&(h.hide().attr("aria-hidden","true").css("visibility","hidden"),d.show().attr("aria-hidden","false").css("visibility","visible"),n&&n.find('a[data-page="'+(m+1)+'"]').attr("aria-expanded","true").parent().addClass("active"))):"prev"===g.data("page")?(n&&n.find("li.active").removeClass("active").children().attr("aria-expanded","false"),e=i.find('.caldera-form-page[data-formpage="'+(m-1)+'"]'),e.length&&(h.hide().attr("aria-hidden","true").css("visibility","hidden"),e.show().attr("aria-hidden","false").css("visibility","visible"),n&&n.find('a[data-page="'+(m-1)+'"]').attr("aria-expanded","true").parent().addClass("active"))):g.data("pagenav")&&(b.preventDefault(),g.closest(".breadcrumb").find("li.active").removeClass("active").children().attr("aria-expanded","false"),a("#"+g.data("pagenav")+" .caldera-form-page").hide().attr("aria-hidden","true").css("visibility","hidden"),a("#"+g.data("pagenav")+'\t.caldera-form-page[data-formpage="'+g.data("page")+'"]').show().attr("aria-hidden","false").css("visibility","visible"),g.parent().addClass("active").children().attr("aria-expanded","true")),a("html, body").animate({scrollTop:i.offset().top-100},200),a(document).trigger("cf.pagenav")}});var b;a(".caldera-grid .breadcrumb").each(function(c,d){a(d).find("a[data-pagenav]").each(function(c,d){var e=a(d),f=e.data("pagenav");a("#"+f+' .caldera-form-page[data-formpage="'+e.data("page")+'"]').find(".has-error").length&&(e.parent().addClass("error"),void 0===b&&(e.trigger("click"),b=!0))})}),a(document).on("click",'form.caldera_forms_form [type="submit"]',function(b){var c=a(this),d=c.closest(".caldera_forms_form"),e=cf_validate_form(d);if(a(document).trigger("cf.form.submit",{e:b,$form:d}),e.validate())a(document).trigger("cf.form.validated",{e:b,$form:d}),e.destroy();else{if(a(".caldera-form-page").length){var f=c.parents(".caldera-form-page").data("formpage"),g=[],h=[];if(e.fields.forEach(function(a,b){if(!0!==a.validationResult){var c=a.$element.parents(".caldera-form-page");if(void 0!=c&&c.length&&a.$element.parents(".caldera-form-page").data("formpage")>f)return void h.push(a.$element.data("field"));g.push(a)}}),!g.length)return h.length&&d.append('<input type="hidden" name="_cf_future" value="'+h.toString()+'">'),void e.destroy()}b.preventDefault()}})}(jQuery),window.addEventListener("load",function(){!function(a){"use strict";var b=void 0===typeof window.wp;if(window.CALDERA_FORMS={},"object"==typeof CFFIELD_CONFIG){var c,d,e,f,g,h,i,j,k,l=!1,m=!1;a(".caldera_forms_form").each(function(n,o){if(h=a(o),c=h.attr("id"),g=h.data("instance"),"object"==typeof CFFIELD_CONFIG[g])if(k=a(document.getElementById(c)),b)a(k.data("target")).append('<div class="alert alert-warning">'+CFFIELD_CONFIG[g].error_strings.wp_not_defined+"</div>");else{m||(i=new CalderaFormsCrossOriginWarning(h,a,CFFIELD_CONFIG[g].error_strings),i.maybeWarn(),m=!0),!l&&CFFIELD_CONFIG[g].error_strings.hasOwnProperty("jquery_old")&&(j=new CalderaFormsJQueryWarning(h,a,CFFIELD_CONFIG[g].error_strings),j.maybeWarn(),l=!0),d=h.data("form-id"),f=CFFIELD_CONFIG[g].configs;var p=new CFState(d,a);p.init(CFFIELD_CONFIG[g].fields.defaults,CFFIELD_CONFIG[g].fields.calcDefaults),"object"!=typeof window.cfstate&&(window.cfstate={}),window.cfstate[c]=p,k.find("[data-sync]").each(function(){var b=a(this);b.data("unsync")||new CalderaFormsFieldSync(b,b.data("binds"),k,a,p)}),e=new Caldera_Forms_Field_Config(f,a(document.getElementById(c)),a,p),e.init(),a(document).trigger("cf.form.init",{$form:k,idAttr:c,formId:d,state:p,fieldIds:CFFIELD_CONFIG[g].fields.hasOwnProperty("ids")?CFFIELD_CONFIG[g].fields.ids:[],nonce:jQuery("#_cf_verify_"+d).val()})}})}}(jQuery)});var cf_jsfields_init,cf_validate_form;!function(a){cf_validate_form=function(a){return a.parsley({errorsWrapper:'<span class="help-block caldera_ajax_error_block"></span>',errorTemplate:"<span></span>",errorsContainer:function(a){return a.$element.closest(".form-group")}}).on("field:error",function(){this.$element.closest(".form-group").addClass("has-error")}).on("field:success",function(){this.$element.closest(".form-group").removeClass("has-error")})},a("[data-sync]").each(function(){for(var b=a(this),c=b.data("binds"),d=b.closest("form"),e=0;e<c.length;e++)a(document).on("keyup change blur mouseover","[data-field='"+c[e]+"']",function(){var c=b.data("sync");if(id=a(this).data("field"),reg=new RegExp("{{([^}]*?)}}","g"),template=c.match(reg),!b.data("unsync")){for(var e=0;e<template.length;e++){for(var f=template[e].replace(/\}/g,"").replace(/\{/g,""),g=new RegExp(template[e],"g"),h=d.find("[data-field='"+f+"']"),i="",j=0;j<h.length;j++){var k=a(h[j]);(!k.is(":radio")&&!k.is(":checkbox")||k.is(":checked"))&&(i+=k.val())}c=c.replace(g,i)}b.val(c)}}),a("[data-field='"+c[e]+"']").trigger("change")}),a(document).on("change keypress","[data-sync]",function(){a(this).data("unsync",!0)}),cf_jsfields_init=function(){a(".init_field_type[data-type]").each(function(b,c){var d=a(c);"function"==typeof window[d.data("type")+"_init"]&&window[d.data("type")+"_init"](d.prop("id"),d[0])}),"undefined"!=typeof cfValidatorLocal&&window.Parsley.setLocale(cfValidatorLocal),"undefined"!=typeof cfModals&&void 0!==cfModals.config&&void 0!==cfModals.config.validator_lang&&window.Parsley.setLocale(cfModals.config.validator_lang),window.Parsley.on("field:validated",function(){setTimeout(function(){a(document).trigger("cf.error")},15)}),"undefined"==typeof resBaldrickTriggers&&a(".caldera_forms_form").length},a("document").ready(function(){cf_jsfields_init()}),a(".caldera-form-page").length&&a(".caldera-form-page").on("keypress","[data-field]:not(textarea)",function(a){13===a.keyCode&&a.preventDefault()}),a(document).on("click",".cf_modal_button",function(b){b.preventDefault();var c=a(this);a(c.attr("href")).show()}),a(document).on("click",".caldera-front-modal-closer",function(b){b.preventDefault(),a(this).closest(".caldera-front-modal-container").hide()}),a(document).on("cf.add cf.enable cf.disable cf.pagenav",cf_jsfields_init),a(document).on("click","[data-page]",function(b){var c,d,e,f=a(this),g=f.closest(".caldera-form-page"),h=f.closest("form.caldera_forms_form"),i=h.data("instance"),j=h.find(".caldera-form-page:visible").data("formpage"),k=g.data("formpage")?g.data("formpage"):f.data("page"),l=a('.breadcrumb[data-form="caldera_form_'+i+'"]'),m=!0,n={};if(h.length){if(cf_validate_form(h).destroy(),e=h.find("[data-field]"),h.find(".has-error").removeClass("has-error"),"prev"!==f.data("page")&&k>=j)for(var o=0;o<e.length;o++){var p=a(e[o]);if(p.is(":radio,:checkbox")){if(!p.hasClass("option-required")||!1===p.is(":visible"))continue;n[p.data("field")]||(n[p.data("field")]=[]),n[p.data("field")].push(p.prop("checked"))}else{if(p.prop("required")&&!1===p.is(":visible"))continue;if(p.prop("required")&&!0!==p.parsley().isValid()){if(p.is(":visible"))p.parsley().validate(),b.preventDefault();else{var q=parseFloat(p.closest(".caldera-form-page[data-formpage]").data("formpage"));q<parseFloat(k)&&h.find('[data-page="'+q+'"]').addClass("has-error")}m=!1}}}for(var r in n)n[r].indexOf(!0)<0?(a('[for="'+r+"_"+i+'"]').parent().addClass("has-error"),m=!1):a('[for="'+r+"_"+i+'"]').parent().removeClass("has-error");if(!1===m)return cf_validate_form(h).validate(),!1;"next"===f.data("page")?(l&&l.find("li.active").removeClass("active").children().attr("aria-expanded","false"),c=h.find('.caldera-form-page[data-formpage="'+(k+1)+'"]'),c.length&&(g.hide().attr("aria-hidden","true").css("visibility","hidden"),c.show().attr("aria-hidden","false").css("visibility","visible"),l&&l.find('a[data-page="'+(k+1)+'"]').attr("aria-expanded","true").parent().addClass("active"))):"prev"===f.data("page")?(l&&l.find("li.active").removeClass("active").children().attr("aria-expanded","false"),d=h.find('.caldera-form-page[data-formpage="'+(k-1)+'"]'),d.length&&(g.hide().attr("aria-hidden","true").css("visibility","hidden"),d.show().attr("aria-hidden","false").css("visibility","visible"),l&&l.find('a[data-page="'+(k-1)+'"]').attr("aria-expanded","true").parent().addClass("active"))):f.data("pagenav")&&(b.preventDefault(),f.closest(".breadcrumb").find("li.active").removeClass("active").children().attr("aria-expanded","false"),a("#"+f.data("pagenav")+" .caldera-form-page").hide().attr("aria-hidden","true").css("visibility","hidden"),a("#"+f.data("pagenav")+'\t.caldera-form-page[data-formpage="'+f.data("page")+'"]').show().attr("aria-hidden","false").css("visibility","visible"),f.parent().addClass("active").children().attr("aria-expanded","true")),a("html, body").animate({scrollTop:h.offset().top-100},200),a(document).trigger("cf.pagenav")}});var b;a(".caldera-grid .breadcrumb").each(function(c,d){a(d).find("a[data-pagenav]").each(function(c,d){var e=a(d),f=e.data("pagenav");a("#"+f+' .caldera-form-page[data-formpage="'+e.data("page")+'"]').find(".has-error").length&&(e.parent().addClass("error"),void 0===b&&(e.trigger("click"),b=!0))})}),a(document).on("click",'form.caldera_forms_form [type="submit"]',function(b){var c=a(this),d=c.closest(".caldera_forms_form"),e=cf_validate_form(d);e.validate()?e.destroy():b.preventDefault()})}(jQuery);
|
assets/build/js/jquery-12-4.min.js
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
/*! jQuery v1.12.4 | (c) jQuery Foundation | jquery.org/license */
|
2 |
-
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="1.12.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!k.call(a,"constructor")&&!k.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(!l.ownFirst)for(b in a)return k.call(a,b);for(b in a);return void 0===b||k.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(h)return h.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=e.call(arguments,2),d=function(){return a.apply(b||this,c.concat(e.call(arguments)))},d.guid=a.guid=a.guid||n.guid++,d):void 0},now:function(){return+new Date},support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\r\\' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fa.selectors={cacheLength:50,createPseudo:ha,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fa.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(P," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Y.test(a.nodeName)},input:function(a){return X.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=la(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=ma(b);function pa(){}pa.prototype=d.filters=d.pseudos,d.setFilters=new pa,g=fa.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){c&&!(e=R.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=S.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(Q," ")}),h=h.slice(c.length));for(g in d.filter)!(e=W[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fa.error(a):z(a,i).slice(0)};function qa(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>-1!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}if(f=d.getElementById(e[2]),f&&f.parentNode){if(f.id!==e[2])return A.find(a);this.length=1,this[0]=f}return this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=w.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(E[a]||(e=n.uniqueSort(e)),D.test(a)&&(e=e.reverse())),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h<f.length)f[h].apply(c[0],c[1])===!1&&a.stopOnFalse&&(h=f.length,c=!1)}a.memory||(c=!1),b=!1,e&&(f=c?[]:"")},j={add:function(){return f&&(c&&!b&&(h=f.length-1,g.push(c)),function d(b){n.each(b,function(b,c){n.isFunction(c)?a.unique&&j.has(c)||f.push(c):c&&c.length&&"string"!==n.type(c)&&d(c)})}(arguments),c&&!b&&i()),this},remove:function(){return n.each(arguments,function(a,b){var c;while((c=n.inArray(b,f,c))>-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=!0,c||j.disable(),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.addEventListener?(d.removeEventListener("DOMContentLoaded",K),a.removeEventListener("load",K)):(d.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(d.addEventListener||"load"===a.event.type||"complete"===d.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll)a.setTimeout(n.ready);else if(d.addEventListener)d.addEventListener("DOMContentLoaded",K),a.addEventListener("load",K);else{d.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&d.documentElement}catch(e){}c&&c.doScroll&&!function f(){if(!n.isReady){try{c.doScroll("left")}catch(b){return a.setTimeout(f,50)}J(),n.ready()}}()}return I.promise(b)},n.ready.promise();var L;for(L in n(l))break;l.ownFirst="0"===L,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c,e;c=d.getElementsByTagName("body")[0],c&&c.style&&(b=d.createElement("div"),e=d.createElement("div"),e.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(e).appendChild(b),"undefined"!=typeof b.style.zoom&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",l.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(e))}),function(){var a=d.createElement("div");l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}a=null}();var M=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b},N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0;
|
3 |
-
}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(M(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),"object"!=typeof b&&"function"!=typeof b||(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f}}function S(a,b,c){if(M(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=void 0)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}}),function(){var a;l.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,e;return c=d.getElementsByTagName("body")[0],c&&c.style?(b=d.createElement("div"),e=d.createElement("div"),e.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(e).appendChild(b),"undefined"!=typeof b.style.zoom&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(d.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(e),a):void 0}}();var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),V=["Top","Right","Bottom","Left"],W=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)};function X(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return n.css(a,b,"")},i=h(),j=c&&c[3]||(n.cssNumber[b]?"":"px"),k=(n.cssNumber[b]||"px"!==j&&+i)&&U.exec(n.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,n.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var Y=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)Y(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},Z=/^(?:checkbox|radio)$/i,$=/<([\w:-]+)/,_=/^$|\/(?:java|ecma)script/i,aa=/^\s+/,ba="abbr|article|aside|audio|bdi|canvas|data|datalist|details|dialog|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|picture|progress|section|summary|template|time|video";function ca(a){var b=ba.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}!function(){var a=d.createElement("div"),b=d.createDocumentFragment(),c=d.createElement("input");a.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",l.leadingWhitespace=3===a.firstChild.nodeType,l.tbody=!a.getElementsByTagName("tbody").length,l.htmlSerialize=!!a.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==d.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,b.appendChild(c),l.appendChecked=c.checked,a.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!a.cloneNode(!0).lastChild.defaultValue,b.appendChild(a),c=d.createElement("input"),c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),a.appendChild(c),l.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!!a.addEventListener,a[n.expando]=1,l.attributes=!a.getAttribute(n.expando)}();var da={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]};da.optgroup=da.option,da.tbody=da.tfoot=da.colgroup=da.caption=da.thead,da.th=da.td;function ea(a,b){var c,d,e=0,f="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,ea(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function fa(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}var ga=/<|&#?\w+;/,ha=/<tbody/i;function ia(a){Z.test(a.type)&&(a.defaultChecked=a.checked)}function ja(a,b,c,d,e){for(var f,g,h,i,j,k,m,o=a.length,p=ca(b),q=[],r=0;o>r;r++)if(g=a[r],g||0===g)if("object"===n.type(g))n.merge(q,g.nodeType?[g]:g);else if(ga.test(g)){i=i||p.appendChild(b.createElement("div")),j=($.exec(g)||["",""])[1].toLowerCase(),m=da[j]||da._default,i.innerHTML=m[1]+n.htmlPrefilter(g)+m[2],f=m[0];while(f--)i=i.lastChild;if(!l.leadingWhitespace&&aa.test(g)&&q.push(b.createTextNode(aa.exec(g)[0])),!l.tbody){g="table"!==j||ha.test(g)?"<table>"!==m[1]||ha.test(g)?0:i:i.firstChild,f=g&&g.childNodes.length;while(f--)n.nodeName(k=g.childNodes[f],"tbody")&&!k.childNodes.length&&g.removeChild(k)}n.merge(q,i.childNodes),i.textContent="";while(i.firstChild)i.removeChild(i.firstChild);i=p.lastChild}else q.push(b.createTextNode(g));i&&p.removeChild(i),l.appendChecked||n.grep(ea(q,"input"),ia),r=0;while(g=q[r++])if(d&&n.inArray(g,d)>-1)e&&e.push(g);else if(h=n.contains(g.ownerDocument,g),i=ea(p.appendChild(g),"script"),h&&fa(i),c){f=0;while(g=i[f++])_.test(g.type||"")&&c.push(g)}return i=null,p}!function(){var b,c,e=d.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b]=c in a)||(e.setAttribute(c,"t"),l[b]=e.attributes[c].expando===!1);e=null}();var ka=/^(?:input|select|textarea)$/i,la=/^key/,ma=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,na=/^(?:focusinfocus|focusoutblur)$/,oa=/^([^.]*)(?:\.(.+)|)/;function pa(){return!0}function qa(){return!1}function ra(){try{return d.activeElement}catch(a){}}function sa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)sa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=qa;else if(!e)return a;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return"undefined"==typeof n||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(G)||[""],h=b.length;while(h--)f=oa.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(G)||[""],j=b.length;while(j--)if(h=oa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,e,f){var g,h,i,j,l,m,o,p=[e||d],q=k.call(b,"type")?b.type:b,r=k.call(b,"namespace")?b.namespace.split("."):[];if(i=m=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!na.test(q+n.event.triggered)&&(q.indexOf(".")>-1&&(r=q.split("."),q=r.shift(),r.sort()),h=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=r.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:n.makeArray(c,[b]),l=n.event.special[q]||{},f||!l.trigger||l.trigger.apply(e,c)!==!1)){if(!f&&!l.noBubble&&!n.isWindow(e)){for(j=l.delegateType||q,na.test(j+q)||(i=i.parentNode);i;i=i.parentNode)p.push(i),m=i;m===(e.ownerDocument||d)&&p.push(m.defaultView||m.parentWindow||a)}o=0;while((i=p[o++])&&!b.isPropagationStopped())b.type=o>1?j:l.bindType||q,g=(n._data(i,"events")||{})[b.type]&&n._data(i,"handle"),g&&g.apply(i,c),g=h&&i[h],g&&g.apply&&M(i)&&(b.result=g.apply(i,c),b.result===!1&&b.preventDefault());if(b.type=q,!f&&!b.isDefaultPrevented()&&(!l._default||l._default.apply(p.pop(),c)===!1)&&M(e)&&h&&e[q]&&!n.isWindow(e)){m=e[h],m&&(e[h]=null),n.event.triggered=q;try{e[q]()}catch(s){}n.event.triggered=void 0,m&&(e[h]=m)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,d,f,g,h=[],i=e.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())a.rnamespace&&!a.rnamespace.test(g.namespace)||(a.handleObj=g,a.data=g.data,d=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>-1:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[n.expando])return a;var b,c,e,f=a.type,g=a,h=this.fixHooks[f];h||(this.fixHooks[f]=h=ma.test(f)?this.mouseHooks:la.test(f)?this.keyHooks:{}),e=h.props?this.props.concat(h.props):this.props,a=new n.Event(g),b=e.length;while(b--)c=e[b],a[c]=g[c];return a.target||(a.target=g.srcElement||d),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,h.filter?h.filter(a,g):a},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,e,f,g=b.button,h=b.fromElement;return null==a.pageX&&null!=b.clientX&&(e=a.target.ownerDocument||d,f=e.documentElement,c=e.body,a.pageX=b.clientX+(f&&f.scrollLeft||c&&c.scrollLeft||0)-(f&&f.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(f&&f.scrollTop||c&&c.scrollTop||0)-(f&&f.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&h&&(a.relatedTarget=h===a.target?b.toElement:h),a.which||void 0===g||(a.which=1&g?1:2&g?3:4&g?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ra()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===ra()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c){var d=n.extend(new n.Event,c,{type:a,isSimulated:!0});n.event.trigger(d,null,b),d.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=d.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c)}:function(a,b,c){var d="on"+b;a.detachEvent&&("undefined"==typeof a[d]&&(a[d]=null),a.detachEvent(d,c))},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?pa:qa):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={constructor:n.Event,isDefaultPrevented:qa,isPropagationStopped:qa,isImmediatePropagationStopped:qa,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=pa,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=pa,a&&!this.isSimulated&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=pa,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||n.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.submit||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?n.prop(b,"form"):void 0;c&&!n._data(c,"submit")&&(n.event.add(c,"submit._submit",function(a){a._submitBubble=!0}),n._data(c,"submit",!0))})},postDispatch:function(a){a._submitBubble&&(delete a._submitBubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.change||(n.event.special.change={setup:function(){return ka.test(this.nodeName)?("checkbox"!==this.type&&"radio"!==this.type||(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._justChanged=!0)}),n.event.add(this,"click._change",function(a){this._justChanged&&!a.isTrigger&&(this._justChanged=!1),n.event.simulate("change",this,a)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;ka.test(b.nodeName)&&!n._data(b,"change")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a)}),n._data(b,"change",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return n.event.remove(this,"._change"),!ka.test(this.nodeName)}}),l.focusin||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a))};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(d,b))}}}),n.fn.extend({on:function(a,b,c,d){return sa(this,a,b,c,d)},one:function(a,b,c,d){return sa(this,a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return b!==!1&&"function"!=typeof b||(c=b,b=void 0),c===!1&&(c=qa),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ta=/ jQuery\d+="(?:null|\d+)"/g,ua=new RegExp("<(?:"+ba+")[\\s/>]","i"),va=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,wa=/<script|<style|<link/i,xa=/checked\s*(?:[^=]|=\s*.checked.)/i,ya=/^true\/(.*)/,za=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Aa=ca(d),Ba=Aa.appendChild(d.createElement("div"));function Ca(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function Da(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function Ea(a){var b=ya.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Fa(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Ga(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(Da(b).text=a.text,Ea(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&Z.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}}function Ha(a,b,c,d){b=f.apply([],b);var e,g,h,i,j,k,m=0,o=a.length,p=o-1,q=b[0],r=n.isFunction(q);if(r||o>1&&"string"==typeof q&&!l.checkClone&&xa.test(q))return a.each(function(e){var f=a.eq(e);r&&(b[0]=q.call(this,e,f.html())),Ha(f,b,c,d)});if(o&&(k=ja(b,a[0].ownerDocument,!1,a,d),e=k.firstChild,1===k.childNodes.length&&(k=e),e||d)){for(i=n.map(ea(k,"script"),Da),h=i.length;o>m;m++)g=k,m!==p&&(g=n.clone(g,!0,!0),h&&n.merge(i,ea(g,"script"))),c.call(a[m],g,m);if(h)for(j=i[i.length-1].ownerDocument,n.map(i,Ea),m=0;h>m;m++)g=i[m],_.test(g.type||"")&&!n._data(g,"globalEval")&&n.contains(j,g)&&(g.src?n._evalUrl&&n._evalUrl(g.src):n.globalEval((g.text||g.textContent||g.innerHTML||"").replace(za,"")));k=e=null}return a}function Ia(a,b,c){for(var d,e=b?n.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||n.cleanData(ea(d)),d.parentNode&&(c&&n.contains(d.ownerDocument,d)&&fa(ea(d,"script")),d.parentNode.removeChild(d));return a}n.extend({htmlPrefilter:function(a){return a.replace(va,"<$1></$2>")},clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!ua.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(Ba.innerHTML=a.outerHTML,Ba.removeChild(f=Ba.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=ea(f),h=ea(a),g=0;null!=(e=h[g]);++g)d[g]&&Ga(e,d[g]);if(b)if(c)for(h=h||ea(a),d=d||ea(f),g=0;null!=(e=h[g]);g++)Fa(e,d[g]);else Fa(a,f);return d=ea(f,"script"),d.length>0&&fa(d,!i&&ea(a,"script")),d=h=e=null,f},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.attributes,m=n.event.special;null!=(d=a[h]);h++)if((b||M(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k||"undefined"==typeof d.removeAttribute?d[i]=void 0:d.removeAttribute(i),c.push(f))}}}),n.fn.extend({domManip:Ha,detach:function(a){return Ia(this,a,!0)},remove:function(a){return Ia(this,a)},text:function(a){return Y(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||d).createTextNode(a))},null,a,arguments.length)},append:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.appendChild(a)}})},prepend:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(ea(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return Y(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(ta,""):void 0;if("string"==typeof a&&!wa.test(a)&&(l.htmlSerialize||!ua.test(a))&&(l.leadingWhitespace||!aa.test(a))&&!da[($.exec(a)||["",""])[1].toLowerCase()]){a=n.htmlPrefilter(a);try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ea(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return Ha(this,arguments,function(b){var c=this.parentNode;n.inArray(this,a)<0&&(n.cleanData(ea(this)),c&&c.replaceChild(b,this))},a)}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],f=n(a),h=f.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(f[d])[b](c),g.apply(e,c.get());return this.pushStack(e)}});var Ja,Ka={HTML:"block",BODY:"block"};function La(a,b){var c=n(b.createElement(a)).appendTo(b.body),d=n.css(c[0],"display");return c.detach(),d}function Ma(a){var b=d,c=Ka[a];return c||(c=La(a,b),"none"!==c&&c||(Ja=(Ja||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Ja[0].contentWindow||Ja[0].contentDocument).document,b.write(),b.close(),c=La(a,b),Ja.detach()),Ka[a]=c),c}var Na=/^margin/,Oa=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Pa=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e},Qa=d.documentElement;!function(){var b,c,e,f,g,h,i=d.createElement("div"),j=d.createElement("div");if(j.style){j.style.cssText="float:left;opacity:.5",l.opacity="0.5"===j.style.opacity,l.cssFloat=!!j.style.cssFloat,j.style.backgroundClip="content-box",j.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===j.style.backgroundClip,i=d.createElement("div"),i.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",j.innerHTML="",i.appendChild(j),l.boxSizing=""===j.style.boxSizing||""===j.style.MozBoxSizing||""===j.style.WebkitBoxSizing,n.extend(l,{reliableHiddenOffsets:function(){return null==b&&k(),f},boxSizingReliable:function(){return null==b&&k(),e},pixelMarginRight:function(){return null==b&&k(),c},pixelPosition:function(){return null==b&&k(),b},reliableMarginRight:function(){return null==b&&k(),g},reliableMarginLeft:function(){return null==b&&k(),h}});function k(){var k,l,m=d.documentElement;m.appendChild(i),j.style.cssText="-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",b=e=h=!1,c=g=!0,a.getComputedStyle&&(l=a.getComputedStyle(j),b="1%"!==(l||{}).top,h="2px"===(l||{}).marginLeft,e="4px"===(l||{width:"4px"}).width,j.style.marginRight="50%",c="4px"===(l||{marginRight:"4px"}).marginRight,k=j.appendChild(d.createElement("div")),k.style.cssText=j.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",k.style.marginRight=k.style.width="0",j.style.width="1px",g=!parseFloat((a.getComputedStyle(k)||{}).marginRight),j.removeChild(k)),j.style.display="none",f=0===j.getClientRects().length,f&&(j.style.display="",j.innerHTML="<table><tr><td></td><td>t</td></tr></table>",j.childNodes[0].style.borderCollapse="separate",k=j.getElementsByTagName("td"),k[0].style.cssText="margin:0;border:0;padding:0;display:none",f=0===k[0].offsetHeight,f&&(k[0].style.display="",k[1].style.display="none",f=0===k[0].offsetHeight)),m.removeChild(i)}}}();var Ra,Sa,Ta=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ra=function(b){var c=b.ownerDocument.defaultView;return c&&c.opener||(c=a),c.getComputedStyle(b)},Sa=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ra(a),g=c?c.getPropertyValue(b)||c[b]:void 0,""!==g&&void 0!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),c&&!l.pixelMarginRight()&&Oa.test(g)&&Na.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f),void 0===g?g:g+""}):Qa.currentStyle&&(Ra=function(a){return a.currentStyle},Sa=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ra(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Oa.test(g)&&!Ta.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Ua(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}var Va=/alpha\([^)]*\)/i,Wa=/opacity\s*=\s*([^)]*)/i,Xa=/^(none|table(?!-c[ea]).+)/,Ya=new RegExp("^("+T+")(.*)$","i"),Za={position:"absolute",visibility:"hidden",display:"block"},$a={letterSpacing:"0",fontWeight:"400"},_a=["Webkit","O","Moz","ms"],ab=d.createElement("div").style;function bb(a){if(a in ab)return a;var b=a.charAt(0).toUpperCase()+a.slice(1),c=_a.length;while(c--)if(a=_a[c]+b,a in ab)return a}function cb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&W(d)&&(f[g]=n._data(d,"olddisplay",Ma(d.nodeName)))):(e=W(d),(c&&"none"!==c||!e)&&n._data(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function db(a,b,c){var d=Ya.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function eb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+V[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+V[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+V[f]+"Width",!0,e))):(g+=n.css(a,"padding"+V[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+V[f]+"Width",!0,e)));return g}function fb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ra(a),g=l.boxSizing&&"border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Sa(a,b,f),(0>e||null==e)&&(e=a.style[b]),Oa.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+eb(a,b,c||(g?"border":"content"),d,f)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Sa(a,"opacity");return""===c?"1":c}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;if(b=n.cssProps[h]||(n.cssProps[h]=bb(h)||h),g=n.cssHooks[b]||n.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=U.exec(c))&&e[1]&&(c=X(a,b,e),f="number"),null!=c&&c===c&&("number"===f&&(c+=e&&e[3]||(n.cssNumber[h]?"":"px")),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=bb(h)||h),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Sa(a,b,d)),"normal"===f&&b in $a&&(f=$a[b]),""===c||c?(e=parseFloat(f),c===!0||isFinite(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?Xa.test(n.css(a,"display"))&&0===a.offsetWidth?Pa(a,Za,function(){return fb(a,b,d)}):fb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ra(a);return db(a,c,d?eb(a,b,d,l.boxSizing&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Wa.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Va,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Va.test(f)?f.replace(Va,e):f+" "+e)}}),n.cssHooks.marginRight=Ua(l.reliableMarginRight,function(a,b){return b?Pa(a,{display:"inline-block"},Sa,[a,"marginRight"]):void 0}),n.cssHooks.marginLeft=Ua(l.reliableMarginLeft,function(a,b){return b?(parseFloat(Sa(a,"marginLeft"))||(n.contains(a.ownerDocument,a)?a.getBoundingClientRect().left-Pa(a,{
|
4 |
-
marginLeft:0},function(){return a.getBoundingClientRect().left}):0))+"px":void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+V[d]+b]=f[d]||f[d-2]||f[0];return e}},Na.test(a)||(n.cssHooks[a+b].set=db)}),n.fn.extend({css:function(a,b){return Y(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Ra(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return cb(this,!0)},hide:function(){return cb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){W(this)?n(this).show():n(this).hide()})}});function gb(a,b,c,d,e){return new gb.prototype.init(a,b,c,d,e)}n.Tween=gb,gb.prototype={constructor:gb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||n.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=gb.propHooks[this.prop];return a&&a.get?a.get(this):gb.propHooks._default.get(this)},run:function(a){var b,c=gb.propHooks[this.prop];return this.options.duration?this.pos=b=n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):gb.propHooks._default.set(this),this}},gb.prototype.init.prototype=gb.prototype,gb.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[n.cssProps[a.prop]]&&!n.cssHooks[a.prop]?a.elem[a.prop]=a.now:n.style(a.elem,a.prop,a.now+a.unit)}}},gb.propHooks.scrollTop=gb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},n.fx=gb.prototype.init,n.fx.step={};var hb,ib,jb=/^(?:toggle|show|hide)$/,kb=/queueHooks$/;function lb(){return a.setTimeout(function(){hb=void 0}),hb=n.now()}function mb(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=V[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function nb(a,b,c){for(var d,e=(qb.tweeners[b]||[]).concat(qb.tweeners["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ob(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&W(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=n.css(a,"display"),k="none"===j?n._data(a,"olddisplay")||Ma(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==Ma(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],jb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(o))"inline"===("none"===j?Ma(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=nb(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function pb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function qb(a,b,c){var d,e,f=0,g=qb.prefilters.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=hb||lb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{},easing:n.easing._default},c),originalProperties:b,originalOptions:c,startTime:hb||lb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?(h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j,b])):h.rejectWith(a,[j,b]),this}}),k=j.props;for(pb(k,j.opts.specialEasing);g>f;f++)if(d=qb.prefilters[f].call(j,a,k,j.opts))return n.isFunction(d.stop)&&(n._queueHooks(j.elem,j.opts.queue).stop=n.proxy(d.stop,d)),d;return n.map(k,nb,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(qb,{tweeners:{"*":[function(a,b){var c=this.createTween(a,b);return X(c.elem,a,U.exec(b),c),c}]},tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.match(G);for(var c,d=0,e=a.length;e>d;d++)c=a[d],qb.tweeners[c]=qb.tweeners[c]||[],qb.tweeners[c].unshift(b)},prefilters:[ob],prefilter:function(a,b){b?qb.prefilters.unshift(a):qb.prefilters.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,null!=d.queue&&d.queue!==!0||(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(W).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=qb(this,n.extend({},a),f);(e||n._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&kb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(mb(b,!0),a,d,e)}}),n.each({slideDown:mb("show"),slideUp:mb("hide"),slideToggle:mb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=n.timers,c=0;for(hb=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),hb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){ib||(ib=a.setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){a.clearInterval(ib),ib=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(b,c){return b=n.fx?n.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=function(){a.clearTimeout(e)}})},function(){var a,b=d.createElement("input"),c=d.createElement("div"),e=d.createElement("select"),f=e.appendChild(d.createElement("option"));c=d.createElement("div"),c.setAttribute("className","t"),c.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],b.setAttribute("type","checkbox"),c.appendChild(b),a=c.getElementsByTagName("a")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==c.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=f.selected,l.enctype=!!d.createElement("form").enctype,e.disabled=!0,l.optDisabled=!f.disabled,b=d.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value}();var rb=/\r/g,sb=/[\x20\t\r\n\f]+/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(rb,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a)).replace(sb," ")}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],(c.selected||i===e)&&(l.optDisabled?!c.disabled:null===c.getAttribute("disabled"))&&(!c.parentNode.disabled||!n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)if(d=e[g],n.inArray(n.valHooks.option.get(d),f)>-1)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>-1:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var tb,ub,vb=n.expr.attrHandle,wb=/^(?:checked|selected)$/i,xb=l.getSetAttribute,yb=l.input;n.fn.extend({attr:function(a,b){return Y(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),e=n.attrHooks[b]||(n.expr.match.bool.test(b)?ub:tb)),void 0!==c?null===c?void n.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=n.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(G);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?yb&&xb||!wb.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(xb?c:d)}}),ub={set:function(a,b,c){return b===!1?n.removeAttr(a,c):yb&&xb||!wb.test(c)?a.setAttribute(!xb&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=vb[b]||n.find.attr;yb&&xb||!wb.test(b)?vb[b]=function(a,b,d){var e,f;return d||(f=vb[b],vb[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,vb[b]=f),e}:vb[b]=function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),yb&&xb||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):tb&&tb.set(a,b,c)}}),xb||(tb={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},vb.id=vb.name=vb.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:tb.set},n.attrHooks.contenteditable={set:function(a,b,c){tb.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var zb=/^(?:input|select|textarea|button|object)$/i,Ab=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return Y(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),n.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&n.isXMLDoc(a)||(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):zb.test(a.nodeName)||Ab.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var Bb=/[\t\r\n\f]/g;function Cb(a){return n.attr(a,"class")||""}n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,Cb(this)))});if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=Cb(c),d=1===c.nodeType&&(" "+e+" ").replace(Bb," ")){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=n.trim(d),e!==h&&n.attr(c,"class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,Cb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=Cb(c),d=1===c.nodeType&&(" "+e+" ").replace(Bb," ")){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=n.trim(d),e!==h&&n.attr(c,"class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):n.isFunction(a)?this.each(function(c){n(this).toggleClass(a.call(this,c,Cb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=n(this),f=a.match(G)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=Cb(this),b&&n._data(this,"__className__",b),n.attr(this,"class",b||a===!1?"":n._data(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+Cb(c)+" ").replace(Bb," ").indexOf(b)>-1)return!0;return!1}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Db=a.location,Eb=n.now(),Fb=/\?/,Gb=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(Gb,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new a.DOMParser,c=d.parseFromString(b,"text/xml")):(c=new a.ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var Hb=/#.*$/,Ib=/([?&])_=[^&]*/,Jb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Kb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Lb=/^(?:GET|HEAD)$/,Mb=/^\/\//,Nb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ob={},Pb={},Qb="*/".concat("*"),Rb=Db.href,Sb=Nb.exec(Rb.toLowerCase())||[];function Tb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(G)||[];if(n.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Ub(a,b,c,d){var e={},f=a===Pb;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Vb(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&n.extend(!0,a,c),a}function Wb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Xb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Rb,type:"GET",isLocal:Kb.test(Sb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Qb,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":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Vb(Vb(a,n.ajaxSettings),b):Vb(n.ajaxSettings,a)},ajaxPrefilter:Tb(Ob),ajaxTransport:Tb(Pb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var d,e,f,g,h,i,j,k,l=n.ajaxSetup({},c),m=l.context||l,o=l.context&&(m.nodeType||m.jquery)?n(m):n.event,p=n.Deferred(),q=n.Callbacks("once memory"),r=l.statusCode||{},s={},t={},u=0,v="canceled",w={readyState:0,getResponseHeader:function(a){var b;if(2===u){if(!k){k={};while(b=Jb.exec(g))k[b[1].toLowerCase()]=b[2]}b=k[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===u?g:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return u||(a=t[c]=t[c]||a,s[a]=b),this},overrideMimeType:function(a){return u||(l.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>u)for(b in a)r[b]=[r[b],a[b]];else w.always(a[w.status]);return this},abort:function(a){var b=a||v;return j&&j.abort(b),y(0,b),this}};if(p.promise(w).complete=q.add,w.success=w.done,w.error=w.fail,l.url=((b||l.url||Rb)+"").replace(Hb,"").replace(Mb,Sb[1]+"//"),l.type=c.method||c.type||l.method||l.type,l.dataTypes=n.trim(l.dataType||"*").toLowerCase().match(G)||[""],null==l.crossDomain&&(d=Nb.exec(l.url.toLowerCase()),l.crossDomain=!(!d||d[1]===Sb[1]&&d[2]===Sb[2]&&(d[3]||("http:"===d[1]?"80":"443"))===(Sb[3]||("http:"===Sb[1]?"80":"443")))),l.data&&l.processData&&"string"!=typeof l.data&&(l.data=n.param(l.data,l.traditional)),Ub(Ob,l,c,w),2===u)return w;i=n.event&&l.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),l.type=l.type.toUpperCase(),l.hasContent=!Lb.test(l.type),f=l.url,l.hasContent||(l.data&&(f=l.url+=(Fb.test(f)?"&":"?")+l.data,delete l.data),l.cache===!1&&(l.url=Ib.test(f)?f.replace(Ib,"$1_="+Eb++):f+(Fb.test(f)?"&":"?")+"_="+Eb++)),l.ifModified&&(n.lastModified[f]&&w.setRequestHeader("If-Modified-Since",n.lastModified[f]),n.etag[f]&&w.setRequestHeader("If-None-Match",n.etag[f])),(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&w.setRequestHeader("Content-Type",l.contentType),w.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+("*"!==l.dataTypes[0]?", "+Qb+"; q=0.01":""):l.accepts["*"]);for(e in l.headers)w.setRequestHeader(e,l.headers[e]);if(l.beforeSend&&(l.beforeSend.call(m,w,l)===!1||2===u))return w.abort();v="abort";for(e in{success:1,error:1,complete:1})w[e](l[e]);if(j=Ub(Pb,l,c,w)){if(w.readyState=1,i&&o.trigger("ajaxSend",[w,l]),2===u)return w;l.async&&l.timeout>0&&(h=a.setTimeout(function(){w.abort("timeout")},l.timeout));try{u=1,j.send(s,y)}catch(x){if(!(2>u))throw x;y(-1,x)}}else y(-1,"No Transport");function y(b,c,d,e){var k,s,t,v,x,y=c;2!==u&&(u=2,h&&a.clearTimeout(h),j=void 0,g=e||"",w.readyState=b>0?4:0,k=b>=200&&300>b||304===b,d&&(v=Wb(l,w,d)),v=Xb(l,v,w,k),k?(l.ifModified&&(x=w.getResponseHeader("Last-Modified"),x&&(n.lastModified[f]=x),x=w.getResponseHeader("etag"),x&&(n.etag[f]=x)),204===b||"HEAD"===l.type?y="nocontent":304===b?y="notmodified":(y=v.state,s=v.data,t=v.error,k=!t)):(t=y,!b&&y||(y="error",0>b&&(b=0))),w.status=b,w.statusText=(c||y)+"",k?p.resolveWith(m,[s,y,w]):p.rejectWith(m,[w,y,t]),w.statusCode(r),r=void 0,i&&o.trigger(k?"ajaxSuccess":"ajaxError",[w,l,k?s:t]),q.fireWith(m,[w,y]),i&&(o.trigger("ajaxComplete",[w,l]),--n.active||n.event.trigger("ajaxStop")))}return w},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax(n.extend({url:a,type:b,dataType:e,data:c,success:d},n.isPlainObject(a)&&a))}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var b=n(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return n.isFunction(a)?this.each(function(b){n(this).wrapInner(a.call(this,b))}):this.each(function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}});function Yb(a){return a.style&&a.style.display||n.css(a,"display")}function Zb(a){if(!n.contains(a.ownerDocument||d,a))return!0;while(a&&1===a.nodeType){if("none"===Yb(a)||"hidden"===a.type)return!0;a=a.parentNode}return!1}n.expr.filters.hidden=function(a){return l.reliableHiddenOffsets()?a.offsetWidth<=0&&a.offsetHeight<=0&&!a.getClientRects().length:Zb(a)},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var $b=/%20/g,_b=/\[\]$/,ac=/\r?\n/g,bc=/^(?:submit|button|image|reset|file)$/i,cc=/^(?:input|select|textarea|keygen)/i;function dc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||_b.test(a)?d(a,e):dc(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)dc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)dc(c,a[c],b,e);return d.join("&").replace($b,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&cc.test(this.nodeName)&&!bc.test(a)&&(this.checked||!Z.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(ac,"\r\n")}}):{name:b.name,value:c.replace(ac,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return this.isLocal?ic():d.documentMode>8?hc():/^(get|post|head|put|delete|options)$/i.test(this.type)&&hc()||ic()}:hc;var ec=0,fc={},gc=n.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in fc)fc[a](void 0,!0)}),l.cors=!!gc&&"withCredentials"in gc,gc=l.ajax=!!gc,gc&&n.ajaxTransport(function(b){if(!b.crossDomain||l.cors){var c;return{send:function(d,e){var f,g=b.xhr(),h=++ec;if(g.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(f in b.xhrFields)g[f]=b.xhrFields[f];b.mimeType&&g.overrideMimeType&&g.overrideMimeType(b.mimeType),b.crossDomain||d["X-Requested-With"]||(d["X-Requested-With"]="XMLHttpRequest");for(f in d)void 0!==d[f]&&g.setRequestHeader(f,d[f]+"");g.send(b.hasContent&&b.data||null),c=function(a,d){var f,i,j;if(c&&(d||4===g.readyState))if(delete fc[h],c=void 0,g.onreadystatechange=n.noop,d)4!==g.readyState&&g.abort();else{j={},f=g.status,"string"==typeof g.responseText&&(j.text=g.responseText);try{i=g.statusText}catch(k){i=""}f||!b.isLocal||b.crossDomain?1223===f&&(f=204):f=j.text?200:404}j&&e(f,i,j,g.getAllResponseHeaders())},b.async?4===g.readyState?a.setTimeout(c):g.onreadystatechange=fc[h]=c:c()},abort:function(){c&&c(void 0,!0)}}}});function hc(){try{return new a.XMLHttpRequest}catch(b){}}function ic(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=d.head||n("head")[0]||d.documentElement;return{send:function(e,f){b=d.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||f(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var jc=[],kc=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=jc.pop()||n.expando+"_"+Eb++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(kc.test(b.url)?"url":"string"==typeof b.data&&0===(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&kc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(kc,"$1"+e):b.jsonp!==!1&&(b.url+=(Fb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){void 0===f?n(a).removeProp(e):a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,jc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||d;var e=x.exec(a),f=!c&&[];return e?[b.createElement(e[1])]:(e=ja([a],b,f),f&&f.length&&n(f).remove(),n.merge([],e.childNodes))};var lc=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&lc)return lc.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>-1&&(d=n.trim(a.slice(h,a.length)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e||"GET",dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).always(c&&function(a,b){g.each(function(){c.apply(this,f||[a.responseText,b,a])})}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};function mc(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&n.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,n.extend({},h))),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,n.contains(b,e)?("undefined"!=typeof e.getBoundingClientRect&&(d=e.getBoundingClientRect()),c=mc(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Qa})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return Y(this,function(a,d,e){var f=mc(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Ua(l.pixelPosition,function(a,c){return c?(c=Sa(a,b),Oa.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({
|
5 |
-
padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return Y(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var nc=a.jQuery,oc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=oc),b&&a.jQuery===n&&(a.jQuery=nc),n},b||(a.jQuery=a.$=n),n});
|
|
|
|
|
|
|
|
|
|
assets/build/js/modals.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
|
1 |
+
jQuery(function(a){jQuery.fn.baldrick.registerhelper("wordpress_modal",{refresh:function(a){a.params.trigger.data("modalAutoclose")&&jQuery("#"+a.params.trigger.data("modalAutoclose")+"_baldrickModalCloser").trigger("click")},event:function(a){var b=jQuery(a),c="wm";if(b.data("modal")&&("true"!==b.data("modal")&&(c=b.data("modal")),!jQuery("#"+c+"_baldrickModal").length)){var d=jQuery("<div>",{id:c+"_baldrickModal",tabIndex:-1,"ariaLabelled-by":c+"_baldrickModalLable",class:"caldera-modal-wrap"}),e=jQuery("<div>",{class:"caldera-backdrop"});modalContent=jQuery("<div>",{class:"caldera-modal-body",id:c+"_baldrickModalBody"}),modalFooter=jQuery("<div>",{class:"caldera-modal-footer",id:c+"_baldrickModalFooter"}),modalHeader=jQuery("<div>",{class:"caldera-modal-title",id:c+"_baldrickModalTitle"}),modalCloser=jQuery("<a>",{href:"#close",class:"caldera-modal-closer","data-dismiss":"modal","aria-hidden":"true",id:c+"_baldrickModalCloser"}).html("×"),modalTitle=jQuery("<h3>",{class:"modal-label",id:c+"_baldrickModalLable"}),modalHeader.append(modalCloser).append(modalTitle).appendTo(d),trigger.data("static")||e.on("dismiss",function(a){a.preventDefault(),e.fadeOut(200),d.fadeOut(200,function(){jQuery(this).remove(),e.remove()})}),modalCloser.on("click",function(a){a.preventDefault(),e.fadeOut(200),d.fadeOut(200,function(){jQuery(this).remove(),e.remove()})}),modalContent.appendTo(d),modalFooter.appendTo(d),d.appendTo(jQuery("body")).hide().fadeIn(200),e.insertBefore(d).hide().fadeIn(200)}},request_complete:function(a,b){if(a.params.trigger.data("modal")){var c,d="wm",e="loading";if("true"!==a.params.trigger.data("modal")&&(d=a.params.trigger.data("modal")),jQuery("#"+d+"_baldrickModal"),c=jQuery("#"+d+"_baldrickModalBody"),modalTitle=jQuery("#"+d+"_baldrickModalTitle"),a.params.trigger.data("loadClass")&&(e=a.params.trigger.data("loadClass")),a.params.trigger.data("modalLife")){var f=parseFloat(a.params.trigger.data("modalLife"));f>0?setTimeout(function(){jQuery("#"+d+"_baldrickModalCloser").trigger("click")},f):jQuery("#"+d+"_baldrickModalCloser").trigger("click")}c.removeClass(e).show()}},after_filter:function(a){if(a.params.trigger.data("modal")&&a.params.trigger.data("targetInsert")){var b="wm";"true"!==a.params.trigger.data("modal")&&(b=a.params.trigger.data("modal"));var c=jQuery(a.data).prop("id",b+"_baldrickModalBody");a.data=c}return a},params:function(a,c){var d=a.trigger,e="wm",f="loading";if("true"!==a.trigger.data("modal")&&(e=a.trigger.data("modal")),a.trigger.data("loadClass")&&(f=a.trigger.data("loadClass")),d.data("modal")&&(a.url||d.data("modalContent"))){var g;a.url&&(a.target=jQuery("#"+e+"_baldrickModalBody"),a.loadElement=jQuery("#"+e+"_baldrickModalLoader"),a.target.empty()),g=d.data("modalTemplate")?jQuery(d.data("modalTemplate")):jQuery("#"+e+"_baldrickModal"),jQuery(".modal-backdrop").length;var h=jQuery("#"+e+"_baldrickModalLable"),i=(jQuery("#"+e+"_baldrickModalTitle"),jQuery("#"+e+"_baldrickModalBody")),j=jQuery("#"+e+"_baldrickModalFooter");if(h.empty().parent().hide(),i.addClass(f),j.empty().hide(),d.data("modalTitle")&&h.html(d.data("modalTitle")).parent().show(),d.data("modalButtons")){var k=d.data("modalButtons").trim().split(";");if(k.length){for(b=0;b<k.length;b++){var l=k[b].split("|"),m=l[0],n=l[1].trim(),o=jQuery.extend({},{class:"button "+c.triggerClass.substr(1)},"{"===n.substr(0,1)?JSON.parse(n):{"data-callback":n}),p=jQuery("<button>",o);l[2]&&p.addClass(l[2]),"dismiss"===n&&p.on("click",function(){jQuery("#"+e+"_baldrickModalCloser").trigger("click")}),j.append(p.html(m)),b<k.length&&j.append(" ")}j.show()}}var q={};a.trigger.data("modalWidth")&&(q.width=parseInt(a.trigger.data("modalWidth"))),a.trigger.data("modalHeight")&&(q.maxHeight=a.trigger.data("modalHeight")),(q.width||q.maxHeight)&&(q.width&&(q.marginLeft=q.width/2-q.width),g.css(q)),d.data("modalContent")&&(i.html(jQuery(d.data("modalContent")).html()),loader.hide(),i.show(),jQuery(c.triggerClass).baldrick(c))}}})});
|
assets/build/js/parsley-aria.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(
|
1 |
+
jQuery(function(a){window.Parsley.on("field:error",function(){this.$element.attr("aria-describedby",this._ui.errorsWrapperId).attr("aria-invalid","true"),this._ui.$errorsWrapper.attr("aria-live","polite")}),window.Parsley.on("field:success",function(){this.$element.attr("aria-invalid")&&this.$element.removeAttr("aria-invalid")})});
|
assets/build/js/parsley.min.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
function _toConsumableArray(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function _toConsumableArray(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}var _slice=Array.prototype.slice,_slicedToArray=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(a){e=!0,f=a}finally{try{!d&&h.return&&h.return()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_extends=Object.assign||function(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(a[d]=c[d])}return a};!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],b):a.parsley=b(a.jQuery)}(this,function(a){"use strict";function b(a,b){return a.parsleyAdaptedCallback||(a.parsleyAdaptedCallback=function(){var c=Array.prototype.slice.call(arguments,0);c.unshift(this),a.apply(b||G,c)}),a.parsleyAdaptedCallback}function c(a){return 0===a.lastIndexOf(I,0)?a.substr(I.length):a}function d(){var b=this,c=window||global;_extends(this,{isNativeEvent:function(a){return a.originalEvent&&!1!==a.originalEvent.isTrusted},fakeInputEvent:function(c){b.isNativeEvent(c)&&a(c.target).trigger("input")},misbehaves:function(c){b.isNativeEvent(c)&&(b.behavesOk(c),a(document).on("change.inputevent",c.data.selector,b.fakeInputEvent),b.fakeInputEvent(c))},behavesOk:function(c){b.isNativeEvent(c)&&a(document).off("input.inputevent",c.data.selector,b.behavesOk).off("change.inputevent",c.data.selector,b.misbehaves)},install:function(){if(!c.inputEventPatched){c.inputEventPatched="0.0.3";for(var d=["select",'input[type="checkbox"]','input[type="radio"]','input[type="file"]'],e=0;e<d.length;e++){var f=d[e];a(document).on("input.inputevent",f,{selector:f},b.behavesOk).on("change.inputevent",f,{selector:f},b.misbehaves)}}},uninstall:function(){delete c.inputEventPatched,a(document).off(".inputevent")}})}var e=1,f={},g={attr:function(a,b,c){var d,e,f,g=new RegExp("^"+b,"i");if(void 0===c)c={};else for(d in c)c.hasOwnProperty(d)&&delete c[d];if(!a)return c;for(f=a.attributes,d=f.length;d--;)(e=f[d])&&e.specified&&g.test(e.name)&&(c[this.camelize(e.name.slice(b.length))]=this.deserializeValue(e.value));return c},checkAttr:function(a,b,c){return a.hasAttribute(b+c)},setAttr:function(a,b,c,d){a.setAttribute(this.dasherize(b+c),String(d))},getType:function(a){return a.getAttribute("type")||"text"},generateID:function(){return""+e++},deserializeValue:function(a){var b;try{return a?"true"==a||"false"!=a&&("null"==a?null:isNaN(b=Number(a))?/^[\[\{]/.test(a)?JSON.parse(a):a:b):a}catch(b){return a}},camelize:function(a){return a.replace(/-+(.)?/g,function(a,b){return b?b.toUpperCase():""})},dasherize:function(a){return a.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()},warn:function(){var a;window.console&&"function"==typeof window.console.warn&&(a=window.console).warn.apply(a,arguments)},warnOnce:function(a){f[a]||(f[a]=!0,this.warn.apply(this,arguments))},_resetWarnings:function(){f={}},trimString:function(a){return a.replace(/^\s+|\s+$/g,"")},parse:{date:function(a){var b=a.match(/^(\d{4,})-(\d\d)-(\d\d)$/);if(!b)return null;var c=b.map(function(a){return parseInt(a,10)}),d=_slicedToArray(c,4),e=(d[0],d[1]),f=d[2],g=d[3],h=new Date(e,f-1,g);return h.getFullYear()!==e||h.getMonth()+1!==f||h.getDate()!==g?null:h},string:function(a){return a},integer:function(a){return isNaN(a)?null:parseInt(a,10)},number:function(a){if(isNaN(a))throw null;return parseFloat(a)},boolean:function(a){return!/^\s*false\s*$/i.test(a)},object:function(a){return g.deserializeValue(a)},regexp:function(a){var b="";return/^\/.*\/(?:[gimy]*)$/.test(a)?(b=a.replace(/.*\/([gimy]*)$/,"$1"),a=a.replace(new RegExp("^/(.*?)/"+b+"$"),"$1")):a="^"+a+"$",new RegExp(a,b)}},parseRequirement:function(a,b){var c=this.parse[a||"string"];if(!c)throw'Unknown requirement specification: "'+a+'"';var d=c(b);if(null===d)throw"Requirement is not a "+a+': "'+b+'"';return d},namespaceEvents:function(b,c){return b=this.trimString(b||"").split(/\s+/),b[0]?a.map(b,function(a){return a+"."+c}).join(" "):""},difference:function(b,c){var d=[];return a.each(b,function(a,b){-1==c.indexOf(b)&&d.push(b)}),d},all:function(b){return a.when.apply(a,_toConsumableArray(b).concat([42,42]))},objectCreate:Object.create||function(){var a=function(){};return function(b){if(arguments.length>1)throw Error("Second argument not supported");if("object"!=typeof b)throw TypeError("Argument must be an object");a.prototype=b;var c=new a;return a.prototype=null,c}}(),_SubmitSelector:'input[type="submit"], button:submit'},h={namespace:"data-parsley-",inputs:"input, textarea, select",excluded:"input[type=button], input[type=submit], input[type=reset], input[type=hidden]",priorityEnabled:!0,multiple:null,group:null,uiEnabled:!0,validationThreshold:3,focus:"first",trigger:!1,triggerAfterFailure:"input",errorClass:"parsley-error",successClass:"parsley-success",classHandler:function(a){},errorsContainer:function(a){},errorsWrapper:'<ul class="parsley-errors-list"></ul>',errorTemplate:"<li></li>"},i=function(){this.__id__=g.generateID()};i.prototype={asyncSupport:!0,_pipeAccordingToValidationResult:function(){var b=this,c=function(){var c=a.Deferred();return!0!==b.validationResult&&c.reject(),c.resolve().promise()};return[c,c]},actualizeOptions:function(){return g.attr(this.element,this.options.namespace,this.domOptions),this.parent&&this.parent.actualizeOptions&&this.parent.actualizeOptions(),this},_resetOptions:function(a){this.domOptions=g.objectCreate(this.parent.options),this.options=g.objectCreate(this.domOptions);for(var b in a)a.hasOwnProperty(b)&&(this.options[b]=a[b]);this.actualizeOptions()},_listeners:null,on:function(a,b){return this._listeners=this._listeners||{},(this._listeners[a]=this._listeners[a]||[]).push(b),this},subscribe:function(b,c){a.listenTo(this,b.toLowerCase(),c)},off:function(a,b){var c=this._listeners&&this._listeners[a];if(c)if(b)for(var d=c.length;d--;)c[d]===b&&c.splice(d,1);else delete this._listeners[a];return this},unsubscribe:function(b,c){a.unsubscribeTo(this,b.toLowerCase())},trigger:function(a,b,c){b=b||this;var d,e=this._listeners&&this._listeners[a];if(e)for(var f=e.length;f--;)if(!1===(d=e[f].call(b,b,c)))return d;return!this.parent||this.parent.trigger(a,b,c)},asyncIsValid:function(a,b){return g.warnOnce("asyncIsValid is deprecated; please use whenValid instead"),this.whenValid({group:a,force:b})},_findRelated:function(){return this.options.multiple?a(this.parent.element.querySelectorAll("["+this.options.namespace+'multiple="'+this.options.multiple+'"]')):this.$element}};var j=function(a,b){var c=a.match(/^\s*\[(.*)\]\s*$/);if(!c)throw'Requirement is not an array: "'+a+'"';var d=c[1].split(",").map(g.trimString);if(d.length!==b)throw"Requirement has "+d.length+" values when "+b+" are needed";return d},k=function(a,b,c){var d=null,e={};for(var f in a)if(f){var h=c(f);"string"==typeof h&&(h=g.parseRequirement(a[f],h)),e[f]=h}else d=g.parseRequirement(a[f],b);return[d,e]},l=function(b){a.extend(!0,this,b)};l.prototype={validate:function(a,b){if(this.fn)return arguments.length>3&&(b=[].slice.call(arguments,1,-1)),this.fn(a,b);if(Array.isArray(a)){if(!this.validateMultiple)throw"Validator `"+this.name+"` does not handle multiple values";return this.validateMultiple.apply(this,arguments)}var c=arguments[arguments.length-1];if(this.validateDate&&c._isDateInput())return arguments[0]=g.parse.date(arguments[0]),null!==arguments[0]&&this.validateDate.apply(this,arguments);if(this.validateNumber)return!isNaN(a)&&(arguments[0]=parseFloat(arguments[0]),this.validateNumber.apply(this,arguments));if(this.validateString)return this.validateString.apply(this,arguments);throw"Validator `"+this.name+"` only handles multiple values"},parseRequirements:function(b,c){if("string"!=typeof b)return Array.isArray(b)?b:[b];var d=this.requirementType;if(Array.isArray(d)){for(var e=j(b,d.length),f=0;f<e.length;f++)e[f]=g.parseRequirement(d[f],e[f]);return e}return a.isPlainObject(d)?k(d,b,c):[g.parseRequirement(d,b)]},requirementType:"string",priority:2};var m=function(a,b){this.__class__="ValidatorRegistry",this.locale="en",this.init(a||{},b||{})},n={email:/^((([a-zA-Z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-zA-Z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/,number:/^-?(\d*\.)?\d+(e[-+]?\d+)?$/i,integer:/^-?\d+$/,digits:/^\d+$/,alphanum:/^\w+$/i,date:{test:function(a){return null!==g.parse.date(a)}},url:new RegExp("^(?:(?:https?|ftp)://)?(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-zA-Z\\u00a1-\\uffff0-9]-*)*[a-zA-Z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-zA-Z\\u00a1-\\uffff0-9]-*)*[a-zA-Z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-zA-Z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:/\\S*)?$")};n.range=n.number;var o=function(a){var b=(""+a).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return b?Math.max(0,(b[1]?b[1].length:0)-(b[2]?+b[2]:0)):0},p=function(a,b){return b.map(g.parse[a])},q=function(a,b){return function(c){for(var d=arguments.length,e=Array(d>1?d-1:0),f=1;f<d;f++)e[f-1]=arguments[f];return e.pop(),b.apply(void 0,[c].concat(_toConsumableArray(p(a,e))))}},r=function(a){return{validateDate:q("date",a),validateNumber:q("number",a),requirementType:a.length<=2?"string":["string","string"],priority:30}};m.prototype={init:function(a,b){this.catalog=b,this.validators=_extends({},this.validators);for(var c in a)this.addValidator(c,a[c].fn,a[c].priority);window.Parsley.trigger("parsley:validator:init")},setLocale:function(a){if(void 0===this.catalog[a])throw new Error(a+" is not available in the catalog");return this.locale=a,this},addCatalog:function(a,b,c){return"object"==typeof b&&(this.catalog[a]=b),!0===c?this.setLocale(a):this},addMessage:function(a,b,c){return void 0===this.catalog[a]&&(this.catalog[a]={}),this.catalog[a][b]=c,this},addMessages:function(a,b){for(var c in b)this.addMessage(a,c,b[c]);return this},addValidator:function(a,b,c){if(this.validators[a])g.warn('Validator "'+a+'" is already defined.');else if(h.hasOwnProperty(a))return void g.warn('"'+a+'" is a restricted keyword and is not a valid validator name.');return this._setValidator.apply(this,arguments)},hasValidator:function(a){return!!this.validators[a]},updateValidator:function(a,b,c){return this.validators[a]?this._setValidator.apply(this,arguments):(g.warn('Validator "'+a+'" is not already defined.'),this.addValidator.apply(this,arguments))},removeValidator:function(a){return this.validators[a]||g.warn('Validator "'+a+'" is not defined.'),delete this.validators[a],this},_setValidator:function(a,b,c){"object"!=typeof b&&(b={fn:b,priority:c}),b.validate||(b=new l(b)),this.validators[a]=b;for(var d in b.messages||{})this.addMessage(d,a,b.messages[d]);return this},getErrorMessage:function(a){var b;if("type"===a.name){b=(this.catalog[this.locale][a.name]||{})[a.requirements]}else b=this.formatMessage(this.catalog[this.locale][a.name],a.requirements);return b||this.catalog[this.locale].defaultMessage||this.catalog.en.defaultMessage},formatMessage:function(a,b){if("object"==typeof b){for(var c in b)a=this.formatMessage(a,b[c]);return a}return"string"==typeof a?a.replace(/%s/i,b):""},validators:{notblank:{validateString:function(a){return/\S/.test(a)},priority:2},required:{validateMultiple:function(a){return a.length>0},validateString:function(a){return/\S/.test(a)},priority:512},type:{validateString:function(a,b){var c=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],d=c.step,e=void 0===d?"any":d,f=c.base,g=void 0===f?0:f,h=n[b];if(!h)throw new Error("validator type `"+b+"` is not supported");if(!h.test(a))return!1;if("number"===b&&!/^any$/i.test(e||"")){var i=Number(a),j=Math.max(o(e),o(g));if(o(i)>j)return!1;var k=function(a){return Math.round(a*Math.pow(10,j))};if((k(i)-k(g))%k(e)!=0)return!1}return!0},requirementType:{"":"string",step:"string",base:"number"},priority:256},pattern:{validateString:function(a,b){return b.test(a)},requirementType:"regexp",priority:64},minlength:{validateString:function(a,b){return a.length>=b},requirementType:"integer",priority:30},maxlength:{validateString:function(a,b){return a.length<=b},requirementType:"integer",priority:30},length:{validateString:function(a,b,c){return a.length>=b&&a.length<=c},requirementType:["integer","integer"],priority:30},mincheck:{validateMultiple:function(a,b){return a.length>=b},requirementType:"integer",priority:30},maxcheck:{validateMultiple:function(a,b){return a.length<=b},requirementType:"integer",priority:30},check:{validateMultiple:function(a,b,c){return a.length>=b&&a.length<=c},requirementType:["integer","integer"],priority:30},min:r(function(a,b){return a>=b}),max:r(function(a,b){return a<=b}),range:r(function(a,b,c){return a>=b&&a<=c}),equalto:{validateString:function(b,c){var d=a(c);return d.length?b===d.val():b===c},priority:256}}};var s={},t=function a(b,c,d){for(var e=[],f=[],g=0;g<b.length;g++){for(var h=!1,i=0;i<c.length;i++)if(b[g].assert.name===c[i].assert.name){h=!0;break}h?f.push(b[g]):e.push(b[g])}return{kept:f,added:e,removed:d?[]:a(c,b,!0).added}};s.Form={_actualizeTriggers:function(){var a=this;this.$element.on("submit.Parsley",function(b){a.onSubmitValidate(b)}),this.$element.on("click.Parsley",g._SubmitSelector,function(b){a.onSubmitButton(b)}),!1!==this.options.uiEnabled&&this.element.setAttribute("novalidate","")},focus:function(){if(this._focusedField=null,!0===this.validationResult||"none"===this.options.focus)return null;for(var a=0;a<this.fields.length;a++){var b=this.fields[a];if(!0!==b.validationResult&&b.validationResult.length>0&&void 0===b.options.noFocus&&(this._focusedField=b.$element,"first"===this.options.focus))break}return null===this._focusedField?null:this._focusedField.focus()},_destroyUI:function(){this.$element.off(".Parsley")}},s.Field={_reflowUI:function(){if(this._buildUI(),this._ui){var a=t(this.validationResult,this._ui.lastValidationResult);this._ui.lastValidationResult=this.validationResult,this._manageStatusClass(),this._manageErrorsMessages(a),this._actualizeTriggers(),!a.kept.length&&!a.added.length||this._failedOnce||(this._failedOnce=!0,this._actualizeTriggers())}},getErrorsMessages:function(){if(!0===this.validationResult)return[];for(var a=[],b=0;b<this.validationResult.length;b++)a.push(this.validationResult[b].errorMessage||this._getErrorMessage(this.validationResult[b].assert));return a},addError:function(a){var b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],c=b.message,d=b.assert,e=b.updateClass,f=void 0===e||e;this._buildUI(),this._addError(a,{message:c,assert:d}),f&&this._errorClass()},updateError:function(a){var b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],c=b.message,d=b.assert,e=b.updateClass,f=void 0===e||e;this._buildUI(),this._updateError(a,{message:c,assert:d}),f&&this._errorClass()},removeError:function(a){var b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],c=b.updateClass,d=void 0===c||c;this._buildUI(),this._removeError(a),d&&this._manageStatusClass()},_manageStatusClass:function(){this.hasConstraints()&&this.needsValidation()&&!0===this.validationResult?this._successClass():this.validationResult.length>0?this._errorClass():this._resetClass()},_manageErrorsMessages:function(b){if(void 0===this.options.errorsMessagesDisabled){if(void 0!==this.options.errorMessage)return b.added.length||b.kept.length?(this._insertErrorWrapper(),0===this._ui.$errorsWrapper.find(".parsley-custom-error-message").length&&this._ui.$errorsWrapper.append(a(this.options.errorTemplate).addClass("parsley-custom-error-message")),this._ui.$errorsWrapper.addClass("filled").find(".parsley-custom-error-message").html(this.options.errorMessage)):this._ui.$errorsWrapper.removeClass("filled").find(".parsley-custom-error-message").remove();for(var c=0;c<b.removed.length;c++)this._removeError(b.removed[c].assert.name);for(c=0;c<b.added.length;c++)this._addError(b.added[c].assert.name,{message:b.added[c].errorMessage,assert:b.added[c].assert});for(c=0;c<b.kept.length;c++)this._updateError(b.kept[c].assert.name,{message:b.kept[c].errorMessage,assert:b.kept[c].assert})}},_addError:function(b,c){var d=c.message,e=c.assert;this._insertErrorWrapper(),this._ui.$errorClassHandler.attr("aria-describedby",this._ui.errorsWrapperId),this._ui.$errorsWrapper.addClass("filled").append(a(this.options.errorTemplate).addClass("parsley-"+b).html(d||this._getErrorMessage(e)))},_updateError:function(a,b){var c=b.message,d=b.assert;this._ui.$errorsWrapper.addClass("filled").find(".parsley-"+a).html(c||this._getErrorMessage(d))},_removeError:function(a){this._ui.$errorClassHandler.removeAttr("aria-describedby"),this._ui.$errorsWrapper.removeClass("filled").find(".parsley-"+a).remove()},_getErrorMessage:function(a){var b=a.name+"Message";return void 0!==this.options[b]?window.Parsley.formatMessage(this.options[b],a.requirements):window.Parsley.getErrorMessage(a)},_buildUI:function(){if(!this._ui&&!1!==this.options.uiEnabled){var b={};this.element.setAttribute(this.options.namespace+"id",this.__id__),b.$errorClassHandler=this._manageClassHandler(),b.errorsWrapperId="parsley-id-"+(this.options.multiple?"multiple-"+this.options.multiple:this.__id__),b.$errorsWrapper=a(this.options.errorsWrapper).attr("id",b.errorsWrapperId),b.lastValidationResult=[],b.validationInformationVisible=!1,this._ui=b}},_manageClassHandler:function(){if("string"==typeof this.options.classHandler&&a(this.options.classHandler).length)return a(this.options.classHandler);var b=this.options.classHandler;if("string"==typeof this.options.classHandler&&"function"==typeof window[this.options.classHandler]&&(b=window[this.options.classHandler]),"function"==typeof b){var c=b.call(this,this);if(void 0!==c&&c.length)return c}else{if("object"==typeof b&&b instanceof jQuery&&b.length)return b;b&&g.warn("The class handler `"+b+"` does not exist in DOM nor as a global JS function")}return this._inputHolder()},_inputHolder:function(){return this.options.multiple&&"SELECT"!==this.element.nodeName?this.$element.parent():this.$element},_insertErrorWrapper:function(){var b=this.options.errorsContainer;if(0!==this._ui.$errorsWrapper.parent().length)return this._ui.$errorsWrapper.parent();if("string"==typeof b){if(a(b).length)return a(b).append(this._ui.$errorsWrapper);"function"==typeof window[b]?b=window[b]:g.warn("The errors container `"+b+"` does not exist in DOM nor as a global JS function")}return"function"==typeof b&&(b=b.call(this,this)),"object"==typeof b&&b.length?b.append(this._ui.$errorsWrapper):this._inputHolder().after(this._ui.$errorsWrapper)},_actualizeTriggers:function(){var a,b=this,c=this._findRelated();c.off(".Parsley"),this._failedOnce?c.on(g.namespaceEvents(this.options.triggerAfterFailure,"Parsley"),function(){b._validateIfNeeded()}):(a=g.namespaceEvents(this.options.trigger,"Parsley"))&&c.on(a,function(a){b._validateIfNeeded(a)})},_validateIfNeeded:function(a){var b=this;a&&/key|input/.test(a.type)&&(!this._ui||!this._ui.validationInformationVisible)&&this.getValue().length<=this.options.validationThreshold||(this.options.debounce?(window.clearTimeout(this._debounced),this._debounced=window.setTimeout(function(){return b.validate()},this.options.debounce)):this.validate())},_resetUI:function(){this._failedOnce=!1,this._actualizeTriggers(),void 0!==this._ui&&(this._ui.$errorsWrapper.removeClass("filled").children().remove(),this._resetClass(),this._ui.lastValidationResult=[],this._ui.validationInformationVisible=!1)},_destroyUI:function(){this._resetUI(),void 0!==this._ui&&this._ui.$errorsWrapper.remove(),delete this._ui},_successClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.errorClass).addClass(this.options.successClass)},_errorClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.successClass).addClass(this.options.errorClass)},_resetClass:function(){this._ui.$errorClassHandler.removeClass(this.options.successClass).removeClass(this.options.errorClass)}};var u=function(b,c,d){this.__class__="Form",this.element=b,this.$element=a(b),this.domOptions=c,this.options=d,this.parent=window.Parsley,this.fields=[],this.validationResult=null},v={pending:null,resolved:!0,rejected:!1};u.prototype={onSubmitValidate:function(a){var b=this;if(!0!==a.parsley){var c=this._submitSource||this.$element.find(g._SubmitSelector)[0];if(this._submitSource=null,this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!0),!c||null===c.getAttribute("formnovalidate")){window.Parsley._remoteCache={};var d=this.whenValidate({event:a});"resolved"===d.state()&&!1!==this._trigger("submit")||(a.stopImmediatePropagation(),a.preventDefault(),"pending"===d.state()&&d.done(function(){b._submit(c)}))}}},onSubmitButton:function(a){this._submitSource=a.currentTarget},_submit:function(b){if(!1!==this._trigger("submit")){if(b){var c=this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!1);0===c.length&&(c=a('<input class="parsley-synthetic-submit-button" type="hidden">').appendTo(this.$element)),c.attr({name:b.getAttribute("name"),value:b.getAttribute("value")})}this.$element.trigger(_extends(a.Event("submit"),{parsley:!0}))}},validate:function(b){if(arguments.length>=1&&!a.isPlainObject(b)){g.warnOnce("Calling validate on a parsley form without passing arguments as an object is deprecated.");var c=_slice.call(arguments);b={group:c[0],force:c[1],event:c[2]}}return v[this.whenValidate(b).state()]},whenValidate:function(){var b,c=this,d=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=d.group,f=d.force,h=d.event;this.submitEvent=h,h&&(this.submitEvent=_extends({},h,{preventDefault:function(){g.warnOnce("Using `this.submitEvent.preventDefault()` is deprecated; instead, call `this.validationResult = false`"),c.validationResult=!1}})),this.validationResult=!0,this._trigger("validate"),this._refreshFields();var i=this._withoutReactualizingFormOptions(function(){return a.map(c.fields,function(a){return a.whenValidate({force:f,group:e})})});return(b=g.all(i).done(function(){c._trigger("success")}).fail(function(){c.validationResult=!1,c.focus(),c._trigger("error")}).always(function(){c._trigger("validated")})).pipe.apply(b,_toConsumableArray(this._pipeAccordingToValidationResult()))},isValid:function(b){if(arguments.length>=1&&!a.isPlainObject(b)){g.warnOnce("Calling isValid on a parsley form without passing arguments as an object is deprecated.");var c=_slice.call(arguments);b={group:c[0],force:c[1]}}return v[this.whenValid(b).state()]},whenValid:function(){var b=this,c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],d=c.group,e=c.force;this._refreshFields();var f=this._withoutReactualizingFormOptions(function(){return a.map(b.fields,function(a){return a.whenValid({group:d,force:e})})});return g.all(f)},refresh:function(){return this._refreshFields(),this},reset:function(){for(var a=0;a<this.fields.length;a++)this.fields[a].reset();this._trigger("reset")},destroy:function(){this._destroyUI();for(var a=0;a<this.fields.length;a++)this.fields[a].destroy();this.$element.removeData("Parsley"),this._trigger("destroy")},_refreshFields:function(){return this.actualizeOptions()._bindFields()},_bindFields:function(){var b=this,c=this.fields;return this.fields=[],this.fieldsMappedById={},this._withoutReactualizingFormOptions(function(){b.$element.find(b.options.inputs).not(b.options.excluded).each(function(a,c){var d=new window.Parsley.Factory(c,{},b);if(("Field"===d.__class__||"FieldMultiple"===d.__class__)&&!0!==d.options.excluded){var e=d.__class__+"-"+d.__id__;void 0===b.fieldsMappedById[e]&&(b.fieldsMappedById[e]=d,b.fields.push(d))}}),a.each(g.difference(c,b.fields),function(a,b){b.reset()})}),this},_withoutReactualizingFormOptions:function(a){var b=this.actualizeOptions;this.actualizeOptions=function(){return this};var c=a();return this.actualizeOptions=b,c},_trigger:function(a){return this.trigger("form:"+a)}};var w=function(a,b,c,d,e){var f=window.Parsley._validatorRegistry.validators[b],g=new l(f);d=d||a.options[b+"Priority"]||g.priority,e=!0===e,_extends(this,{validator:g,name:b,requirements:c,priority:d,isDomConstraint:e}),this._parseRequirements(a.options)},x=function(a){return a[0].toUpperCase()+a.slice(1)};w.prototype={validate:function(a,b){var c;return(c=this.validator).validate.apply(c,[a].concat(_toConsumableArray(this.requirementList),[b]))},_parseRequirements:function(a){var b=this;this.requirementList=this.validator.parseRequirements(this.requirements,function(c){return a[b.name+x(c)]})}};var y=function(b,c,d,e){this.__class__="Field",this.element=b,this.$element=a(b),void 0!==e&&(this.parent=e),this.options=d,this.domOptions=c,this.constraints=[],this.constraintsByName={},this.validationResult=!0,this._bindConstraints()},z={pending:null,resolved:!0,rejected:!1};y.prototype={validate:function(b){arguments.length>=1&&!a.isPlainObject(b)&&(g.warnOnce("Calling validate on a parsley field without passing arguments as an object is deprecated."),b={options:b});var c=this.whenValidate(b);if(!c)return!0;switch(c.state()){case"pending":return null;case"resolved":return!0;case"rejected":return this.validationResult}},whenValidate:function(){var a,b=this,c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],d=c.force,e=c.group;if(this.refresh(),!e||this._isInGroup(e))return this.value=this.getValue(),this._trigger("validate"),(a=this.whenValid({force:d,value:this.value,_refreshed:!0}).always(function(){b._reflowUI()}).done(function(){b._trigger("success")}).fail(function(){b._trigger("error")}).always(function(){b._trigger("validated")})).pipe.apply(a,_toConsumableArray(this._pipeAccordingToValidationResult()))},hasConstraints:function(){return 0!==this.constraints.length},needsValidation:function(a){return void 0===a&&(a=this.getValue()),!(!a.length&&!this._isRequired()&&void 0===this.options.validateIfEmpty)},_isInGroup:function(b){return Array.isArray(this.options.group)?-1!==a.inArray(b,this.options.group):this.options.group===b},isValid:function(b){if(arguments.length>=1&&!a.isPlainObject(b)){g.warnOnce("Calling isValid on a parsley field without passing arguments as an object is deprecated.");var c=_slice.call(arguments);b={force:c[0],value:c[1]}}var d=this.whenValid(b);return!d||z[d.state()]},whenValid:function(){var b=this,c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],d=c.force,e=void 0!==d&&d,f=c.value,h=c.group;if(c._refreshed||this.refresh(),!h||this._isInGroup(h)){if(this.validationResult=!0,!this.hasConstraints())return a.when();if(void 0!==f&&null!==f||(f=this.getValue()),!this.needsValidation(f)&&!0!==e)return a.when();var i=this._getGroupedConstraints(),j=[];return a.each(i,function(c,d){var e=g.all(a.map(d,function(a){return b._validateConstraint(f,a)}));if(j.push(e),"rejected"===e.state())return!1}),g.all(j)}},_validateConstraint:function(b,c){var d=this,e=c.validate(b,this);return!1===e&&(e=a.Deferred().reject()),g.all([e]).fail(function(a){d.validationResult instanceof Array||(d.validationResult=[]),d.validationResult.push({assert:c,errorMessage:"string"==typeof a&&a})})},getValue:function(){var a;return a="function"==typeof this.options.value?this.options.value(this):void 0!==this.options.value?this.options.value:this.$element.val(),void 0===a||null===a?"":this._handleWhitespace(a)},reset:function(){return this._resetUI(),this._trigger("reset")},destroy:function(){this._destroyUI(),this.$element.removeData("Parsley"),this.$element.removeData("FieldMultiple"),this._trigger("destroy")},refresh:function(){return this._refreshConstraints(),this},_refreshConstraints:function(){return this.actualizeOptions()._bindConstraints()},refreshConstraints:function(){return g.warnOnce("Parsley's refreshConstraints is deprecated. Please use refresh"),this.refresh()},addConstraint:function(a,b,c,d){if(window.Parsley._validatorRegistry.validators[a]){var e=new w(this,a,b,c,d);"undefined"!==this.constraintsByName[e.name]&&this.removeConstraint(e.name),this.constraints.push(e),this.constraintsByName[e.name]=e}return this},removeConstraint:function(a){for(var b=0;b<this.constraints.length;b++)if(a===this.constraints[b].name){this.constraints.splice(b,1);break}return delete this.constraintsByName[a],this},updateConstraint:function(a,b,c){return this.removeConstraint(a).addConstraint(a,b,c)},_bindConstraints:function(){for(var a=[],b={},c=0;c<this.constraints.length;c++)!1===this.constraints[c].isDomConstraint&&(a.push(this.constraints[c]),b[this.constraints[c].name]=this.constraints[c]);this.constraints=a,this.constraintsByName=b;for(var d in this.options)this.addConstraint(d,this.options[d],void 0,!0);return this._bindHtml5Constraints()},_bindHtml5Constraints:function(){null!==this.element.getAttribute("required")&&this.addConstraint("required",!0,void 0,!0),null!==this.element.getAttribute("pattern")&&this.addConstraint("pattern",this.element.getAttribute("pattern"),void 0,!0);var a=this.element.getAttribute("min"),b=this.element.getAttribute("max");null!==a&&null!==b?this.addConstraint("range",[a,b],void 0,!0):null!==a?this.addConstraint("min",a,void 0,!0):null!==b&&this.addConstraint("max",b,void 0,!0),null!==this.element.getAttribute("minlength")&&null!==this.element.getAttribute("maxlength")?this.addConstraint("length",[this.element.getAttribute("minlength"),this.element.getAttribute("maxlength")],void 0,!0):null!==this.element.getAttribute("minlength")?this.addConstraint("minlength",this.element.getAttribute("minlength"),void 0,!0):null!==this.element.getAttribute("maxlength")&&this.addConstraint("maxlength",this.element.getAttribute("maxlength"),void 0,!0);var c=g.getType(this.element);return"number"===c?this.addConstraint("type",["number",{step:this.element.getAttribute("step")||"1",base:a||this.element.getAttribute("value")}],void 0,!0):/^(email|url|range|date)$/i.test(c)?this.addConstraint("type",c,void 0,!0):this},_isRequired:function(){return void 0!==this.constraintsByName.required&&!1!==this.constraintsByName.required.requirements},_trigger:function(a){return this.trigger("field:"+a)},_handleWhitespace:function(a){return!0===this.options.trimValue&&g.warnOnce('data-parsley-trim-value="true" is deprecated, please use data-parsley-whitespace="trim"'),"squish"===this.options.whitespace&&(a=a.replace(/\s{2,}/g," ")),"trim"!==this.options.whitespace&&"squish"!==this.options.whitespace&&!0!==this.options.trimValue||(a=g.trimString(a)),a},_isDateInput:function(){var a=this.constraintsByName.type;return a&&"date"===a.requirements},_getGroupedConstraints:function(){
|
2 |
if(!1===this.options.priorityEnabled)return[this.constraints];for(var a=[],b={},c=0;c<this.constraints.length;c++){var d=this.constraints[c].priority;b[d]||a.push(b[d]=[]),b[d].push(this.constraints[c])}return a.sort(function(a,b){return b[0].priority-a[0].priority}),a}};var A=y,B=function(){this.__class__="FieldMultiple"};B.prototype={addElement:function(a){return this.$elements.push(a),this},_refreshConstraints:function(){var b;if(this.constraints=[],"SELECT"===this.element.nodeName)return this.actualizeOptions()._bindConstraints(),this;for(var c=0;c<this.$elements.length;c++)if(a("html").has(this.$elements[c]).length){b=this.$elements[c].data("FieldMultiple")._refreshConstraints().constraints;for(var d=0;d<b.length;d++)this.addConstraint(b[d].name,b[d].requirements,b[d].priority,b[d].isDomConstraint)}else this.$elements.splice(c,1);return this},getValue:function(){if("function"==typeof this.options.value)return this.options.value(this);if(void 0!==this.options.value)return this.options.value;if("INPUT"===this.element.nodeName){var b=g.getType(this.element);if("radio"===b)return this._findRelated().filter(":checked").val()||"";if("checkbox"===b){var c=[];return this._findRelated().filter(":checked").each(function(){c.push(a(this).val())}),c}}return"SELECT"===this.element.nodeName&&null===this.$element.val()?[]:this.$element.val()},_init:function(){return this.$elements=[this.$element],this}};var C=function(b,c,d){this.element=b,this.$element=a(b);var e=this.$element.data("Parsley");if(e)return void 0!==d&&e.parent===window.Parsley&&(e.parent=d,e._resetOptions(e.options)),"object"==typeof c&&_extends(e.options,c),e;if(!this.$element.length)throw new Error("You must bind Parsley on an existing element.");if(void 0!==d&&"Form"!==d.__class__)throw new Error("Parent instance must be a Form instance");return this.parent=d||window.Parsley,this.init(c)};C.prototype={init:function(a){return this.__class__="Parsley",this.__version__="2.8.1",this.__id__=g.generateID(),this._resetOptions(a),"FORM"===this.element.nodeName||g.checkAttr(this.element,this.options.namespace,"validate")&&!this.$element.is(this.options.inputs)?this.bind("parsleyForm"):this.isMultiple()?this.handleMultiple():this.bind("parsleyField")},isMultiple:function(){var a=g.getType(this.element);return"radio"===a||"checkbox"===a||"SELECT"===this.element.nodeName&&null!==this.element.getAttribute("multiple")},handleMultiple:function(){var b,c,d=this;if(this.options.multiple=this.options.multiple||(b=this.element.getAttribute("name"))||this.element.getAttribute("id"),"SELECT"===this.element.nodeName&&null!==this.element.getAttribute("multiple"))return this.options.multiple=this.options.multiple||this.__id__,this.bind("parsleyFieldMultiple");if(!this.options.multiple)return g.warn("To be bound by Parsley, a radio, a checkbox and a multiple select input must have either a name or a multiple option.",this.$element),this;this.options.multiple=this.options.multiple.replace(/(:|\.|\[|\]|\{|\}|\$)/g,""),b&&a('input[name="'+b+'"]').each(function(a,b){var c=g.getType(b);"radio"!==c&&"checkbox"!==c||b.setAttribute(d.options.namespace+"multiple",d.options.multiple)});for(var e=this._findRelated(),f=0;f<e.length;f++)if(void 0!==(c=a(e.get(f)).data("Parsley"))){this.$element.data("FieldMultiple")||c.addElement(this.$element);break}return this.bind("parsleyField",!0),c||this.bind("parsleyFieldMultiple")},bind:function(b,c){var d;switch(b){case"parsleyForm":d=a.extend(new u(this.element,this.domOptions,this.options),new i,window.ParsleyExtend)._bindFields();break;case"parsleyField":d=a.extend(new A(this.element,this.domOptions,this.options,this.parent),new i,window.ParsleyExtend);break;case"parsleyFieldMultiple":d=a.extend(new A(this.element,this.domOptions,this.options,this.parent),new B,new i,window.ParsleyExtend)._init();break;default:throw new Error(b+"is not a supported Parsley type")}return this.options.multiple&&g.setAttr(this.element,this.options.namespace,"multiple",this.options.multiple),void 0!==c?(this.$element.data("FieldMultiple",d),d):(this.$element.data("Parsley",d),d._actualizeTriggers(),d._trigger("init"),d)}};var D=a.fn.jquery.split(".");if(parseInt(D[0])<=1&&parseInt(D[1])<8)throw"The loaded version of jQuery is too old. Please upgrade to 1.8.x or better.";D.forEach||g.warn("Parsley requires ES5 to run properly. Please include https://github.com/es-shims/es5-shim");var E=_extends(new i,{element:document,$element:a(document),actualizeOptions:null,_resetOptions:null,Factory:C,version:"2.8.1"});_extends(A.prototype,s.Field,i.prototype),_extends(u.prototype,s.Form,i.prototype),_extends(C.prototype,i.prototype),a.fn.parsley=a.fn.psly=function(b){if(this.length>1){var c=[];return this.each(function(){c.push(a(this).parsley(b))}),c}if(0!=this.length)return new C(this[0],b)},void 0===window.ParsleyExtend&&(window.ParsleyExtend={}),E.options=_extends(g.objectCreate(h),window.ParsleyConfig),window.ParsleyConfig=E.options,window.Parsley=window.psly=E,E.Utils=g,window.ParsleyUtils={},a.each(g,function(a,b){"function"==typeof b&&(window.ParsleyUtils[a]=function(){return g.warnOnce("Accessing `window.ParsleyUtils` is deprecated. Use `window.Parsley.Utils` instead."),g[a].apply(g,arguments)})});var F=window.Parsley._validatorRegistry=new m(window.ParsleyConfig.validators,window.ParsleyConfig.i18n);window.ParsleyValidator={},a.each("setLocale addCatalog addMessage addMessages getErrorMessage formatMessage addValidator updateValidator removeValidator hasValidator".split(" "),function(a,b){window.Parsley[b]=function(){return F[b].apply(F,arguments)},window.ParsleyValidator[b]=function(){var a;return g.warnOnce("Accessing the method '"+b+"' through Validator is deprecated. Simply call 'window.Parsley."+b+"(...)'"),(a=window.Parsley)[b].apply(a,arguments)}}),window.Parsley.UI=s,window.ParsleyUI={removeError:function(a,b,c){var d=!0!==c;return g.warnOnce("Accessing UI is deprecated. Call 'removeError' on the instance directly. Please comment in issue 1073 as to your need to call this method."),a.removeError(b,{updateClass:d})},getErrorsMessages:function(a){return g.warnOnce("Accessing UI is deprecated. Call 'getErrorsMessages' on the instance directly."),a.getErrorsMessages()}},a.each("addError updateError".split(" "),function(a,b){window.ParsleyUI[b]=function(a,c,d,e,f){var h=!0!==f;return g.warnOnce("Accessing UI is deprecated. Call '"+b+"' on the instance directly. Please comment in issue 1073 as to your need to call this method."),a[b](c,{message:d,assert:e,updateClass:h})}}),!1!==window.ParsleyConfig.autoBind&&a(function(){a("[data-parsley-validate]").length&&a("[data-parsley-validate]").parsley()});var G=a({}),H=function(){g.warnOnce("Parsley's pubsub module is deprecated; use the 'on' and 'off' methods on parsley instances or window.Parsley")},I="parsley:";a.listen=function(a,d){var e;if(H(),"object"==typeof arguments[1]&&"function"==typeof arguments[2]&&(e=arguments[1],d=arguments[2]),"function"!=typeof d)throw new Error("Wrong parameters");window.Parsley.on(c(a),b(d,e))},a.listenTo=function(a,d,e){if(H(),!(a instanceof A||a instanceof u))throw new Error("Must give Parsley instance");if("string"!=typeof d||"function"!=typeof e)throw new Error("Wrong parameters");a.on(c(d),b(e))},a.unsubscribe=function(a,b){if(H(),"string"!=typeof a||"function"!=typeof b)throw new Error("Wrong arguments");window.Parsley.off(c(a),b.parsleyAdaptedCallback)},a.unsubscribeTo=function(a,b){if(H(),!(a instanceof A||a instanceof u))throw new Error("Must give Parsley instance");a.off(c(b))},a.unsubscribeAll=function(b){H(),window.Parsley.off(c(b)),a("form,input,textarea,select").each(function(){var d=a(this).data("Parsley");d&&d.off(c(b))})},a.emit=function(a,b){var d;H();var e=b instanceof A||b instanceof u,f=Array.prototype.slice.call(arguments,e?2:1);f.unshift(c(a)),e||(b=window.Parsley),(d=b).trigger.apply(d,_toConsumableArray(f))};return a.extend(!0,E,{asyncValidators:{default:{fn:function(a){return a.status>=200&&a.status<300},url:!1},reverse:{fn:function(a){return a.status<200||a.status>=300},url:!1}},addAsyncValidator:function(a,b,c,d){return E.asyncValidators[a]={fn:b,url:c||!1,options:d||{}},this}}),E.addValidator("remote",{requirementType:{"":"string",validator:"string",reverse:"boolean",options:"object"},validateString:function(b,c,d,e){var f,g,h={},i=d.validator||(!0===d.reverse?"reverse":"default");if(void 0===E.asyncValidators[i])throw new Error("Calling an undefined async validator: `"+i+"`");c=E.asyncValidators[i].url||c,c.indexOf("{value}")>-1?c=c.replace("{value}",encodeURIComponent(b)):h[e.element.getAttribute("name")||e.element.getAttribute("id")]=b;var j=a.extend(!0,d.options||{},E.asyncValidators[i].options);f=a.extend(!0,{},{url:c,data:h,type:"GET"},j),e.trigger("field:ajaxoptions",e,f),g=a.param(f),void 0===E._remoteCache&&(E._remoteCache={});var k=E._remoteCache[g]=E._remoteCache[g]||a.ajax(f),l=function(){var b=E.asyncValidators[i].fn.call(e,k,c,d);return b||(b=a.Deferred().reject()),a.when(b)};return k.then(l,l)},priority:-1}),E.on("form:submit",function(){E._remoteCache={}}),i.prototype.addAsyncValidator=function(){return g.warnOnce("Accessing the method `addAsyncValidator` through an instance is deprecated. Simply call `Parsley.addAsyncValidator(...)`"),E.addAsyncValidator.apply(E,arguments)},E.addMessages("en",{defaultMessage:"This value seems to be invalid.",type:{email:"This value should be a valid email.",url:"This value should be a valid url.",number:"This value should be a valid number.",integer:"This value should be a valid integer.",digits:"This value should be digits.",alphanum:"This value should be alphanumeric."},notblank:"This value should not be blank.",required:"This value is required.",pattern:"This value seems to be invalid.",min:"This value should be greater than or equal to %s.",max:"This value should be lower than or equal to %s.",range:"This value should be between %s and %s.",minlength:"This value is too short. It should have %s characters or more.",maxlength:"This value is too long. It should have %s characters or fewer.",length:"This value length is invalid. It should be between %s and %s characters long.",mincheck:"You must select at least %s choices.",maxcheck:"You must select %s choices or fewer.",check:"You must select between %s and %s choices.",equalto:"This value should be the same."}),E.setLocale("en"),(new d).install(),E});var _slice=Array.prototype.slice,_slicedToArray=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(a){e=!0,f=a}finally{try{!d&&h.return&&h.return()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_extends=Object.assign||function(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(a[d]=c[d])}return a};!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],b):a.parsley=b(a.jQuery)}(this,function(a){"use strict";function b(a,b){return a.parsleyAdaptedCallback||(a.parsleyAdaptedCallback=function(){var c=Array.prototype.slice.call(arguments,0);c.unshift(this),a.apply(b||G,c)}),a.parsleyAdaptedCallback}function c(a){return 0===a.lastIndexOf(I,0)?a.substr(I.length):a}function d(){var b=this,c=window||global;_extends(this,{isNativeEvent:function(a){return a.originalEvent&&!1!==a.originalEvent.isTrusted},fakeInputEvent:function(c){b.isNativeEvent(c)&&a(c.target).trigger("input")},misbehaves:function(c){b.isNativeEvent(c)&&(b.behavesOk(c),a(document).on("change.inputevent",c.data.selector,b.fakeInputEvent),b.fakeInputEvent(c))},behavesOk:function(c){b.isNativeEvent(c)&&a(document).off("input.inputevent",c.data.selector,b.behavesOk).off("change.inputevent",c.data.selector,b.misbehaves)},install:function(){if(!c.inputEventPatched){c.inputEventPatched="0.0.3";for(var d=["select",'input[type="checkbox"]','input[type="radio"]','input[type="file"]'],e=0;e<d.length;e++){var f=d[e];a(document).on("input.inputevent",f,{selector:f},b.behavesOk).on("change.inputevent",f,{selector:f},b.misbehaves)}}},uninstall:function(){delete c.inputEventPatched,a(document).off(".inputevent")}})}var e=1,f={},g={attr:function(a,b,c){var d,e,f,g=new RegExp("^"+b,"i");if(void 0===c)c={};else for(d in c)c.hasOwnProperty(d)&&delete c[d];if(!a)return c;for(f=a.attributes,d=f.length;d--;)(e=f[d])&&e.specified&&g.test(e.name)&&(c[this.camelize(e.name.slice(b.length))]=this.deserializeValue(e.value));return c},checkAttr:function(a,b,c){return a.hasAttribute(b+c)},setAttr:function(a,b,c,d){a.setAttribute(this.dasherize(b+c),String(d))},getType:function(a){return a.getAttribute("type")||"text"},generateID:function(){return""+e++},deserializeValue:function(a){var b;try{return a?"true"==a||"false"!=a&&("null"==a?null:isNaN(b=Number(a))?/^[\[\{]/.test(a)?JSON.parse(a):a:b):a}catch(b){return a}},camelize:function(a){return a.replace(/-+(.)?/g,function(a,b){return b?b.toUpperCase():""})},dasherize:function(a){return a.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()},warn:function(){var a;window.console&&"function"==typeof window.console.warn&&(a=window.console).warn.apply(a,arguments)},warnOnce:function(a){f[a]||(f[a]=!0,this.warn.apply(this,arguments))},_resetWarnings:function(){f={}},trimString:function(a){return a.replace(/^\s+|\s+$/g,"")},parse:{date:function(a){var b=a.match(/^(\d{4,})-(\d\d)-(\d\d)$/);if(!b)return null;var c=b.map(function(a){return parseInt(a,10)}),d=_slicedToArray(c,4),e=(d[0],d[1]),f=d[2],g=d[3],h=new Date(e,f-1,g);return h.getFullYear()!==e||h.getMonth()+1!==f||h.getDate()!==g?null:h},string:function(a){return a},integer:function(a){return isNaN(a)?null:parseInt(a,10)},number:function(a){if(isNaN(a))throw null;return parseFloat(a)},boolean:function(a){return!/^\s*false\s*$/i.test(a)},object:function(a){return g.deserializeValue(a)},regexp:function(a){var b="";return/^\/.*\/(?:[gimy]*)$/.test(a)?(b=a.replace(/.*\/([gimy]*)$/,"$1"),a=a.replace(new RegExp("^/(.*?)/"+b+"$"),"$1")):a="^"+a+"$",new RegExp(a,b)}},parseRequirement:function(a,b){var c=this.parse[a||"string"];if(!c)throw'Unknown requirement specification: "'+a+'"';var d=c(b);if(null===d)throw"Requirement is not a "+a+': "'+b+'"';return d},namespaceEvents:function(b,c){return b=this.trimString(b||"").split(/\s+/),b[0]?a.map(b,function(a){return a+"."+c}).join(" "):""},difference:function(b,c){var d=[];return a.each(b,function(a,b){-1==c.indexOf(b)&&d.push(b)}),d},all:function(b){return a.when.apply(a,_toConsumableArray(b).concat([42,42]))},objectCreate:Object.create||function(){var a=function(){};return function(b){if(arguments.length>1)throw Error("Second argument not supported");if("object"!=typeof b)throw TypeError("Argument must be an object");a.prototype=b;var c=new a;return a.prototype=null,c}}(),_SubmitSelector:'input[type="submit"], button:submit'},h={namespace:"data-parsley-",inputs:"input, textarea, select",excluded:"input[type=button], input[type=submit], input[type=reset], input[type=hidden]",priorityEnabled:!0,multiple:null,group:null,uiEnabled:!0,validationThreshold:3,focus:"first",trigger:!1,triggerAfterFailure:"input",errorClass:"parsley-error",successClass:"parsley-success",classHandler:function(a){},errorsContainer:function(a){},errorsWrapper:'<ul class="parsley-errors-list"></ul>',errorTemplate:"<li></li>"},i=function(){this.__id__=g.generateID()};i.prototype={asyncSupport:!0,_pipeAccordingToValidationResult:function(){var b=this,c=function(){var c=a.Deferred();return!0!==b.validationResult&&c.reject(),c.resolve().promise()};return[c,c]},actualizeOptions:function(){return g.attr(this.element,this.options.namespace,this.domOptions),this.parent&&this.parent.actualizeOptions&&this.parent.actualizeOptions(),this},_resetOptions:function(a){this.domOptions=g.objectCreate(this.parent.options),this.options=g.objectCreate(this.domOptions);for(var b in a)a.hasOwnProperty(b)&&(this.options[b]=a[b]);this.actualizeOptions()},_listeners:null,on:function(a,b){return this._listeners=this._listeners||{},(this._listeners[a]=this._listeners[a]||[]).push(b),this},subscribe:function(b,c){a.listenTo(this,b.toLowerCase(),c)},off:function(a,b){var c=this._listeners&&this._listeners[a];if(c)if(b)for(var d=c.length;d--;)c[d]===b&&c.splice(d,1);else delete this._listeners[a];return this},unsubscribe:function(b,c){a.unsubscribeTo(this,b.toLowerCase())},trigger:function(a,b,c){b=b||this;var d,e=this._listeners&&this._listeners[a];if(e)for(var f=e.length;f--;)if(!1===(d=e[f].call(b,b,c)))return d;return!this.parent||this.parent.trigger(a,b,c)},asyncIsValid:function(a,b){return g.warnOnce("asyncIsValid is deprecated; please use whenValid instead"),this.whenValid({group:a,force:b})},_findRelated:function(){return this.options.multiple?a(this.parent.element.querySelectorAll("["+this.options.namespace+'multiple="'+this.options.multiple+'"]')):this.$element}};var j=function(a,b){var c=a.match(/^\s*\[(.*)\]\s*$/);if(!c)throw'Requirement is not an array: "'+a+'"';var d=c[1].split(",").map(g.trimString);if(d.length!==b)throw"Requirement has "+d.length+" values when "+b+" are needed";return d},k=function(a,b,c){var d=null,e={};for(var f in a)if(f){var h=c(f);"string"==typeof h&&(h=g.parseRequirement(a[f],h)),e[f]=h}else d=g.parseRequirement(a[f],b);return[d,e]},l=function(b){a.extend(!0,this,b)};l.prototype={validate:function(a,b){if(this.fn)return arguments.length>3&&(b=[].slice.call(arguments,1,-1)),this.fn(a,b);if(Array.isArray(a)){if(!this.validateMultiple)throw"Validator `"+this.name+"` does not handle multiple values";return this.validateMultiple.apply(this,arguments)}var c=arguments[arguments.length-1];if(this.validateDate&&c._isDateInput())return arguments[0]=g.parse.date(arguments[0]),null!==arguments[0]&&this.validateDate.apply(this,arguments);if(this.validateNumber)return!isNaN(a)&&(arguments[0]=parseFloat(arguments[0]),this.validateNumber.apply(this,arguments));if(this.validateString)return this.validateString.apply(this,arguments);throw"Validator `"+this.name+"` only handles multiple values"},parseRequirements:function(b,c){if("string"!=typeof b)return Array.isArray(b)?b:[b];var d=this.requirementType;if(Array.isArray(d)){for(var e=j(b,d.length),f=0;f<e.length;f++)e[f]=g.parseRequirement(d[f],e[f]);return e}return a.isPlainObject(d)?k(d,b,c):[g.parseRequirement(d,b)]},requirementType:"string",priority:2};var m=function(a,b){this.__class__="ValidatorRegistry",this.locale="en",this.init(a||{},b||{})},n={email:/^((([a-zA-Z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-zA-Z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/,number:/^-?(\d*\.)?\d+(e[-+]?\d+)?$/i,integer:/^-?\d+$/,digits:/^\d+$/,alphanum:/^\w+$/i,date:{test:function(a){return null!==g.parse.date(a)}},url:new RegExp("^(?:(?:https?|ftp)://)?(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-zA-Z\\u00a1-\\uffff0-9]-*)*[a-zA-Z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-zA-Z\\u00a1-\\uffff0-9]-*)*[a-zA-Z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-zA-Z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:/\\S*)?$")};n.range=n.number;var o=function(a){var b=(""+a).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return b?Math.max(0,(b[1]?b[1].length:0)-(b[2]?+b[2]:0)):0},p=function(a,b){return b.map(g.parse[a])},q=function(a,b){return function(c){for(var d=arguments.length,e=Array(d>1?d-1:0),f=1;f<d;f++)e[f-1]=arguments[f];return e.pop(),b.apply(void 0,[c].concat(_toConsumableArray(p(a,e))))}},r=function(a){return{validateDate:q("date",a),validateNumber:q("number",a),requirementType:a.length<=2?"string":["string","string"],priority:30}};m.prototype={init:function(a,b){this.catalog=b,this.validators=_extends({},this.validators);for(var c in a)this.addValidator(c,a[c].fn,a[c].priority);window.Parsley.trigger("parsley:validator:init")},setLocale:function(a){if(void 0===this.catalog[a])throw new Error(a+" is not available in the catalog");return this.locale=a,this},addCatalog:function(a,b,c){return"object"==typeof b&&(this.catalog[a]=b),!0===c?this.setLocale(a):this},addMessage:function(a,b,c){return void 0===this.catalog[a]&&(this.catalog[a]={}),this.catalog[a][b]=c,this},addMessages:function(a,b){for(var c in b)this.addMessage(a,c,b[c]);return this},addValidator:function(a,b,c){if(this.validators[a])g.warn('Validator "'+a+'" is already defined.');else if(h.hasOwnProperty(a))return void g.warn('"'+a+'" is a restricted keyword and is not a valid validator name.');return this._setValidator.apply(this,arguments)},hasValidator:function(a){return!!this.validators[a]},updateValidator:function(a,b,c){return this.validators[a]?this._setValidator.apply(this,arguments):(g.warn('Validator "'+a+'" is not already defined.'),this.addValidator.apply(this,arguments))},removeValidator:function(a){return this.validators[a]||g.warn('Validator "'+a+'" is not defined.'),delete this.validators[a],this},_setValidator:function(a,b,c){"object"!=typeof b&&(b={fn:b,priority:c}),b.validate||(b=new l(b)),this.validators[a]=b;for(var d in b.messages||{})this.addMessage(d,a,b.messages[d]);return this},getErrorMessage:function(a){var b;if("type"===a.name){b=(this.catalog[this.locale][a.name]||{})[a.requirements]}else b=this.formatMessage(this.catalog[this.locale][a.name],a.requirements);return b||this.catalog[this.locale].defaultMessage||this.catalog.en.defaultMessage},formatMessage:function(a,b){if("object"==typeof b){for(var c in b)a=this.formatMessage(a,b[c]);return a}return"string"==typeof a?a.replace(/%s/i,b):""},validators:{notblank:{validateString:function(a){return/\S/.test(a)},priority:2},required:{validateMultiple:function(a){return a.length>0},validateString:function(a){return/\S/.test(a)},priority:512},type:{validateString:function(a,b){var c=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],d=c.step,e=void 0===d?"any":d,f=c.base,g=void 0===f?0:f,h=n[b];if(!h)throw new Error("validator type `"+b+"` is not supported");if(!h.test(a))return!1;if("number"===b&&!/^any$/i.test(e||"")){var i=Number(a),j=Math.max(o(e),o(g));if(o(i)>j)return!1;var k=function(a){return Math.round(a*Math.pow(10,j))};if((k(i)-k(g))%k(e)!=0)return!1}return!0},requirementType:{"":"string",step:"string",base:"number"},priority:256},pattern:{validateString:function(a,b){return b.test(a)},requirementType:"regexp",priority:64},minlength:{validateString:function(a,b){return a.length>=b},requirementType:"integer",priority:30},maxlength:{validateString:function(a,b){return a.length<=b},requirementType:"integer",priority:30},length:{validateString:function(a,b,c){return a.length>=b&&a.length<=c},requirementType:["integer","integer"],priority:30},mincheck:{validateMultiple:function(a,b){return a.length>=b},requirementType:"integer",priority:30},maxcheck:{validateMultiple:function(a,b){return a.length<=b},requirementType:"integer",priority:30},check:{validateMultiple:function(a,b,c){return a.length>=b&&a.length<=c},requirementType:["integer","integer"],priority:30},min:r(function(a,b){return a>=b}),max:r(function(a,b){return a<=b}),range:r(function(a,b,c){return a>=b&&a<=c}),equalto:{validateString:function(b,c){var d=a(c);return d.length?b===d.val():b===c},priority:256}}};var s={},t=function a(b,c,d){for(var e=[],f=[],g=0;g<b.length;g++){for(var h=!1,i=0;i<c.length;i++)if(b[g].assert.name===c[i].assert.name){h=!0;break}h?f.push(b[g]):e.push(b[g])}return{kept:f,added:e,removed:d?[]:a(c,b,!0).added}};s.Form={_actualizeTriggers:function(){var a=this;this.$element.on("submit.Parsley",function(b){a.onSubmitValidate(b)}),this.$element.on("click.Parsley",g._SubmitSelector,function(b){a.onSubmitButton(b)}),!1!==this.options.uiEnabled&&this.element.setAttribute("novalidate","")},focus:function(){if(this._focusedField=null,!0===this.validationResult||"none"===this.options.focus)return null;for(var a=0;a<this.fields.length;a++){var b=this.fields[a];if(!0!==b.validationResult&&b.validationResult.length>0&&void 0===b.options.noFocus&&(this._focusedField=b.$element,"first"===this.options.focus))break}return null===this._focusedField?null:this._focusedField.focus()},_destroyUI:function(){this.$element.off(".Parsley")}},s.Field={_reflowUI:function(){if(this._buildUI(),this._ui){var a=t(this.validationResult,this._ui.lastValidationResult);this._ui.lastValidationResult=this.validationResult,this._manageStatusClass(),this._manageErrorsMessages(a),this._actualizeTriggers(),!a.kept.length&&!a.added.length||this._failedOnce||(this._failedOnce=!0,this._actualizeTriggers())}},getErrorsMessages:function(){if(!0===this.validationResult)return[];for(var a=[],b=0;b<this.validationResult.length;b++)a.push(this.validationResult[b].errorMessage||this._getErrorMessage(this.validationResult[b].assert));return a},addError:function(a){var b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],c=b.message,d=b.assert,e=b.updateClass,f=void 0===e||e;this._buildUI(),this._addError(a,{message:c,assert:d}),f&&this._errorClass()},updateError:function(a){var b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],c=b.message,d=b.assert,e=b.updateClass,f=void 0===e||e;this._buildUI(),this._updateError(a,{message:c,assert:d}),f&&this._errorClass()},removeError:function(a){var b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],c=b.updateClass,d=void 0===c||c;this._buildUI(),this._removeError(a),d&&this._manageStatusClass()},_manageStatusClass:function(){this.hasConstraints()&&this.needsValidation()&&!0===this.validationResult?this._successClass():this.validationResult.length>0?this._errorClass():this._resetClass()},_manageErrorsMessages:function(b){if(void 0===this.options.errorsMessagesDisabled){if(void 0!==this.options.errorMessage)return b.added.length||b.kept.length?(this._insertErrorWrapper(),0===this._ui.$errorsWrapper.find(".parsley-custom-error-message").length&&this._ui.$errorsWrapper.append(a(this.options.errorTemplate).addClass("parsley-custom-error-message")),this._ui.$errorsWrapper.addClass("filled").find(".parsley-custom-error-message").html(this.options.errorMessage)):this._ui.$errorsWrapper.removeClass("filled").find(".parsley-custom-error-message").remove();for(var c=0;c<b.removed.length;c++)this._removeError(b.removed[c].assert.name);for(c=0;c<b.added.length;c++)this._addError(b.added[c].assert.name,{message:b.added[c].errorMessage,assert:b.added[c].assert});for(c=0;c<b.kept.length;c++)this._updateError(b.kept[c].assert.name,{message:b.kept[c].errorMessage,assert:b.kept[c].assert})}},_addError:function(b,c){var d=c.message,e=c.assert;this._insertErrorWrapper(),this._ui.$errorClassHandler.attr("aria-describedby",this._ui.errorsWrapperId),this._ui.$errorsWrapper.addClass("filled").append(a(this.options.errorTemplate).addClass("parsley-"+b).html(d||this._getErrorMessage(e)))},_updateError:function(a,b){var c=b.message,d=b.assert;this._ui.$errorsWrapper.addClass("filled").find(".parsley-"+a).html(c||this._getErrorMessage(d))},_removeError:function(a){this._ui.$errorClassHandler.removeAttr("aria-describedby"),this._ui.$errorsWrapper.removeClass("filled").find(".parsley-"+a).remove()},_getErrorMessage:function(a){var b=a.name+"Message";return void 0!==this.options[b]?window.Parsley.formatMessage(this.options[b],a.requirements):window.Parsley.getErrorMessage(a)},_buildUI:function(){if(!this._ui&&!1!==this.options.uiEnabled){var b={};this.element.setAttribute(this.options.namespace+"id",this.__id__),b.$errorClassHandler=this._manageClassHandler(),b.errorsWrapperId="parsley-id-"+(this.options.multiple?"multiple-"+this.options.multiple:this.__id__),b.$errorsWrapper=a(this.options.errorsWrapper).attr("id",b.errorsWrapperId),b.lastValidationResult=[],b.validationInformationVisible=!1,this._ui=b}},_manageClassHandler:function(){if("string"==typeof this.options.classHandler&&a(this.options.classHandler).length)return a(this.options.classHandler);var b=this.options.classHandler;if("string"==typeof this.options.classHandler&&"function"==typeof window[this.options.classHandler]&&(b=window[this.options.classHandler]),"function"==typeof b){var c=b.call(this,this);if(void 0!==c&&c.length)return c}else{if("object"==typeof b&&b instanceof jQuery&&b.length)return b;b&&g.warn("The class handler `"+b+"` does not exist in DOM nor as a global JS function")}return this._inputHolder()},_inputHolder:function(){return this.options.multiple&&"SELECT"!==this.element.nodeName?this.$element.parent():this.$element},_insertErrorWrapper:function(){var b=this.options.errorsContainer;if(0!==this._ui.$errorsWrapper.parent().length)return this._ui.$errorsWrapper.parent();if("string"==typeof b){if(a(b).length)return a(b).append(this._ui.$errorsWrapper);"function"==typeof window[b]?b=window[b]:g.warn("The errors container `"+b+"` does not exist in DOM nor as a global JS function")}return"function"==typeof b&&(b=b.call(this,this)),"object"==typeof b&&b.length?b.append(this._ui.$errorsWrapper):this._inputHolder().after(this._ui.$errorsWrapper)},_actualizeTriggers:function(){var a,b=this,c=this._findRelated();c.off(".Parsley"),this._failedOnce?c.on(g.namespaceEvents(this.options.triggerAfterFailure,"Parsley"),function(){b._validateIfNeeded()}):(a=g.namespaceEvents(this.options.trigger,"Parsley"))&&c.on(a,function(a){b._validateIfNeeded(a)})},_validateIfNeeded:function(a){var b=this;a&&/key|input/.test(a.type)&&(!this._ui||!this._ui.validationInformationVisible)&&this.getValue().length<=this.options.validationThreshold||(this.options.debounce?(window.clearTimeout(this._debounced),this._debounced=window.setTimeout(function(){return b.validate()},this.options.debounce)):this.validate())},_resetUI:function(){this._failedOnce=!1,this._actualizeTriggers(),void 0!==this._ui&&(this._ui.$errorsWrapper.removeClass("filled").children().remove(),this._resetClass(),this._ui.lastValidationResult=[],this._ui.validationInformationVisible=!1)},_destroyUI:function(){this._resetUI(),void 0!==this._ui&&this._ui.$errorsWrapper.remove(),delete this._ui},_successClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.errorClass).addClass(this.options.successClass)},_errorClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.successClass).addClass(this.options.errorClass)},_resetClass:function(){this._ui.$errorClassHandler.removeClass(this.options.successClass).removeClass(this.options.errorClass)}};var u=function(b,c,d){this.__class__="Form",this.element=b,this.$element=a(b),this.domOptions=c,this.options=d,this.parent=window.Parsley,this.fields=[],this.validationResult=null},v={pending:null,resolved:!0,rejected:!1};u.prototype={onSubmitValidate:function(a){var b=this;if(!0!==a.parsley){var c=this._submitSource||this.$element.find(g._SubmitSelector)[0];if(this._submitSource=null,
|
3 |
-
this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!0),!c||null===c.getAttribute("formnovalidate")){window.Parsley._remoteCache={};var d=this.whenValidate({event:a});"resolved"===d.state()&&!1!==this._trigger("submit")||(a.stopImmediatePropagation(),a.preventDefault(),"pending"===d.state()&&d.done(function(){b._submit(c)}))}}},onSubmitButton:function(a){this._submitSource=a.currentTarget},_submit:function(b){if(!1!==this._trigger("submit")){if(b){var c=this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!1);0===c.length&&(c=a('<input class="parsley-synthetic-submit-button" type="hidden">').appendTo(this.$element)),c.attr({name:b.getAttribute("name"),value:b.getAttribute("value")})}this.$element.trigger(_extends(a.Event("submit"),{parsley:!0}))}},validate:function(b){if(arguments.length>=1&&!a.isPlainObject(b)){g.warnOnce("Calling validate on a parsley form without passing arguments as an object is deprecated.");var c=_slice.call(arguments);b={group:c[0],force:c[1],event:c[2]}}return v[this.whenValidate(b).state()]},whenValidate:function(){var b,c=this,d=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=d.group,f=d.force,h=d.event;this.submitEvent=h,h&&(this.submitEvent=_extends({},h,{preventDefault:function(){g.warnOnce("Using `this.submitEvent.preventDefault()` is deprecated; instead, call `this.validationResult = false`"),c.validationResult=!1}})),this.validationResult=!0,this._trigger("validate"),this._refreshFields();var i=this._withoutReactualizingFormOptions(function(){return a.map(c.fields,function(a){return a.whenValidate({force:f,group:e})})});return(b=g.all(i).done(function(){c._trigger("success")}).fail(function(){c.validationResult=!1,c.focus(),c._trigger("error")}).always(function(){c._trigger("validated")})).pipe.apply(b,_toConsumableArray(this._pipeAccordingToValidationResult()))},isValid:function(b){if(arguments.length>=1&&!a.isPlainObject(b)){g.warnOnce("Calling isValid on a parsley form without passing arguments as an object is deprecated.");var c=_slice.call(arguments);b={group:c[0],force:c[1]}}return v[this.whenValid(b).state()]},whenValid:function(){var b=this,c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],d=c.group,e=c.force;this._refreshFields();var f=this._withoutReactualizingFormOptions(function(){return a.map(b.fields,function(a){return a.whenValid({group:d,force:e})})});return g.all(f)},refresh:function(){return this._refreshFields(),this},reset:function(){for(var a=0;a<this.fields.length;a++)this.fields[a].reset();this._trigger("reset")},destroy:function(){this._destroyUI();for(var a=0;a<this.fields.length;a++)this.fields[a].destroy();this.$element.removeData("Parsley"),this._trigger("destroy")},_refreshFields:function(){return this.actualizeOptions()._bindFields()},_bindFields:function(){var b=this,c=this.fields;return this.fields=[],this.fieldsMappedById={},this._withoutReactualizingFormOptions(function(){b.$element.find(b.options.inputs).not(b.options.excluded).each(function(a,c){var d=new window.Parsley.Factory(c,{},b);if(("Field"===d.__class__||"FieldMultiple"===d.__class__)&&!0!==d.options.excluded){var e=d.__class__+"-"+d.__id__;void 0===b.fieldsMappedById[e]&&(b.fieldsMappedById[e]=d,b.fields.push(d))}}),a.each(g.difference(c,b.fields),function(a,b){b.reset()})}),this},_withoutReactualizingFormOptions:function(a){var b=this.actualizeOptions;this.actualizeOptions=function(){return this};var c=a();return this.actualizeOptions=b,c},_trigger:function(a){return this.trigger("form:"+a)}};var w=function(a,b,c,d,e){var f=window.Parsley._validatorRegistry.validators[b],g=new l(f);d=d||a.options[b+"Priority"]||g.priority,e=!0===e,_extends(this,{validator:g,name:b,requirements:c,priority:d,isDomConstraint:e}),this._parseRequirements(a.options)},x=function(a){return a[0].toUpperCase()+a.slice(1)};w.prototype={validate:function(a,b){var c;return(c=this.validator).validate.apply(c,[a].concat(_toConsumableArray(this.requirementList),[b]))},_parseRequirements:function(a){var b=this;this.requirementList=this.validator.parseRequirements(this.requirements,function(c){return a[b.name+x(c)]})}};var y=function(b,c,d,e){this.__class__="Field",this.element=b,this.$element=a(b),void 0!==e&&(this.parent=e),this.options=d,this.domOptions=c,this.constraints=[],this.constraintsByName={},this.validationResult=!0,this._bindConstraints()},z={pending:null,resolved:!0,rejected:!1};y.prototype={validate:function(b){arguments.length>=1&&!a.isPlainObject(b)&&(g.warnOnce("Calling validate on a parsley field without passing arguments as an object is deprecated."),b={options:b});var c=this.whenValidate(b);if(!c)return!0;switch(c.state()){case"pending":return null;case"resolved":return!0;case"rejected":return this.validationResult}},whenValidate:function(){var a,b=this,c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],d=c.force,e=c.group;if(this.refresh(),!e||this._isInGroup(e))return this.value=this.getValue(),this._trigger("validate"),(a=this.whenValid({force:d,value:this.value,_refreshed:!0}).always(function(){b._reflowUI()}).done(function(){b._trigger("success")}).fail(function(){b._trigger("error")}).always(function(){b._trigger("validated")})).pipe.apply(a,_toConsumableArray(this._pipeAccordingToValidationResult()))},hasConstraints:function(){return 0!==this.constraints.length},needsValidation:function(a){return void 0===a&&(a=this.getValue()),!(!a.length&&!this._isRequired()&&void 0===this.options.validateIfEmpty)},_isInGroup:function(b){return Array.isArray(this.options.group)?-1!==a.inArray(b,this.options.group):this.options.group===b},isValid:function(b){if(arguments.length>=1&&!a.isPlainObject(b)){g.warnOnce("Calling isValid on a parsley field without passing arguments as an object is deprecated.");var c=_slice.call(arguments);b={force:c[0],value:c[1]}}var d=this.whenValid(b);return!d||z[d.state()]},whenValid:function(){var b=this,c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],d=c.force,e=void 0!==d&&d,f=c.value,h=c.group;if(c._refreshed||this.refresh(),!h||this._isInGroup(h)){if(this.validationResult=!0,!this.hasConstraints())return a.when();if(void 0!==f&&null!==f||(f=this.getValue()),!this.needsValidation(f)&&!0!==e)return a.when();var i=this._getGroupedConstraints(),j=[];return a.each(i,function(c,d){var e=g.all(a.map(d,function(a){return b._validateConstraint(f,a)}));if(j.push(e),"rejected"===e.state())return!1}),g.all(j)}},_validateConstraint:function(b,c){var d=this,e=c.validate(b,this);return!1===e&&(e=a.Deferred().reject()),g.all([e]).fail(function(a){d.validationResult instanceof Array||(d.validationResult=[]),d.validationResult.push({assert:c,errorMessage:"string"==typeof a&&a})})},getValue:function(){var a;return a="function"==typeof this.options.value?this.options.value(this):void 0!==this.options.value?this.options.value:this.$element.val(),void 0===a||null===a?"":this._handleWhitespace(a)},reset:function(){return this._resetUI(),this._trigger("reset")},destroy:function(){this._destroyUI(),this.$element.removeData("Parsley"),this.$element.removeData("FieldMultiple"),this._trigger("destroy")},refresh:function(){return this._refreshConstraints(),this},_refreshConstraints:function(){return this.actualizeOptions()._bindConstraints()},refreshConstraints:function(){return g.warnOnce("Parsley's refreshConstraints is deprecated. Please use refresh"),this.refresh()},addConstraint:function(a,b,c,d){if(window.Parsley._validatorRegistry.validators[a]){var e=new w(this,a,b,c,d);"undefined"!==this.constraintsByName[e.name]&&this.removeConstraint(e.name),this.constraints.push(e),this.constraintsByName[e.name]=e}return this},removeConstraint:function(a){for(var b=0;b<this.constraints.length;b++)if(a===this.constraints[b].name){this.constraints.splice(b,1);break}return delete this.constraintsByName[a],this},updateConstraint:function(a,b,c){return this.removeConstraint(a).addConstraint(a,b,c)},_bindConstraints:function(){for(var a=[],b={},c=0;c<this.constraints.length;c++)!1===this.constraints[c].isDomConstraint&&(a.push(this.constraints[c]),b[this.constraints[c].name]=this.constraints[c]);this.constraints=a,this.constraintsByName=b;for(var d in this.options)this.addConstraint(d,this.options[d],void 0,!0);return this._bindHtml5Constraints()},_bindHtml5Constraints:function(){null!==this.element.getAttribute("required")&&this.addConstraint("required",!0,void 0,!0),null!==this.element.getAttribute("pattern")&&this.addConstraint("pattern",this.element.getAttribute("pattern"),void 0,!0);var a=this.element.getAttribute("min"),b=this.element.getAttribute("max");null!==a&&null!==b?this.addConstraint("range",[a,b],void 0,!0):null!==a?this.addConstraint("min",a,void 0,!0):null!==b&&this.addConstraint("max",b,void 0,!0),null!==this.element.getAttribute("minlength")&&null!==this.element.getAttribute("maxlength")?this.addConstraint("length",[this.element.getAttribute("minlength"),this.element.getAttribute("maxlength")],void 0,!0):null!==this.element.getAttribute("minlength")?this.addConstraint("minlength",this.element.getAttribute("minlength"),void 0,!0):null!==this.element.getAttribute("maxlength")&&this.addConstraint("maxlength",this.element.getAttribute("maxlength"),void 0,!0);var c=g.getType(this.element);return"number"===c?this.addConstraint("type",["number",{step:this.element.getAttribute("step")||"1",base:a||this.element.getAttribute("value")}],void 0,!0):/^(email|url|range|date)$/i.test(c)?this.addConstraint("type",c,void 0,!0):this},_isRequired:function(){return void 0!==this.constraintsByName.required&&!1!==this.constraintsByName.required.requirements},_trigger:function(a){return this.trigger("field:"+a)},_handleWhitespace:function(a){return!0===this.options.trimValue&&g.warnOnce('data-parsley-trim-value="true" is deprecated, please use data-parsley-whitespace="trim"'),"squish"===this.options.whitespace&&(a=a.replace(/\s{2,}/g," ")),"trim"!==this.options.whitespace&&"squish"!==this.options.whitespace&&!0!==this.options.trimValue||(a=g.trimString(a)),a},_isDateInput:function(){var a=this.constraintsByName.type;return a&&"date"===a.requirements},_getGroupedConstraints:function(){if(!1===this.options.priorityEnabled)return[this.constraints];for(var a=[],b={},c=0;c<this.constraints.length;c++){var d=this.constraints[c].priority;b[d]||a.push(b[d]=[]),b[d].push(this.constraints[c])}return a.sort(function(a,b){return b[0].priority-a[0].priority}),a}};var A=y,B=function(){this.__class__="FieldMultiple"};B.prototype={addElement:function(a){return this.$elements.push(a),this},_refreshConstraints:function(){var b;if(this.constraints=[],"SELECT"===this.element.nodeName)return this.actualizeOptions()._bindConstraints(),this;for(var c=0;c<this.$elements.length;c++)if(a("html").has(this.$elements[c]).length){b=this.$elements[c].data("FieldMultiple")._refreshConstraints().constraints;for(var d=0;d<b.length;d++)this.addConstraint(b[d].name,b[d].requirements,b[d].priority,b[d].isDomConstraint)}else this.$elements.splice(c,1);return this},getValue:function(){if("function"==typeof this.options.value)return this.options.value(this);if(void 0!==this.options.value)return this.options.value;if("INPUT"===this.element.nodeName){var b=g.getType(this.element);if("radio"===b)return this._findRelated().filter(":checked").val()||"";if("checkbox"===b){var c=[];return this._findRelated().filter(":checked").each(function(){c.push(a(this).val())}),c}}return"SELECT"===this.element.nodeName&&null===this.$element.val()?[]:this.$element.val()},_init:function(){return this.$elements=[this.$element],this}};var C=function(b,c,d){this.element=b,this.$element=a(b);var e=this.$element.data("Parsley");if(e)return void 0!==d&&e.parent===window.Parsley&&(e.parent=d,e._resetOptions(e.options)),"object"==typeof c&&_extends(e.options,c),e;if(!this.$element.length)throw new Error("You must bind Parsley on an existing element.");if(void 0!==d&&"Form"!==d.__class__)throw new Error("Parent instance must be a Form instance");return this.parent=d||window.Parsley,this.init(c)};C.prototype={init:function(a){return this.__class__="Parsley",this.__version__="2.8.1",this.__id__=g.generateID(),this._resetOptions(a),"FORM"===this.element.nodeName||g.checkAttr(this.element,this.options.namespace,"validate")&&!this.$element.is(this.options.inputs)?this.bind("parsleyForm"):this.isMultiple()?this.handleMultiple():this.bind("parsleyField")},isMultiple:function(){var a=g.getType(this.element);return"radio"===a||"checkbox"===a||"SELECT"===this.element.nodeName&&null!==this.element.getAttribute("multiple")},handleMultiple:function(){var b,c,d=this;if(this.options.multiple=this.options.multiple||(b=this.element.getAttribute("name"))||this.element.getAttribute("id"),"SELECT"===this.element.nodeName&&null!==this.element.getAttribute("multiple"))return this.options.multiple=this.options.multiple||this.__id__,this.bind("parsleyFieldMultiple");if(!this.options.multiple)return g.warn("To be bound by Parsley, a radio, a checkbox and a multiple select input must have either a name or a multiple option.",this.$element),this;this.options.multiple=this.options.multiple.replace(/(:|\.|\[|\]|\{|\}|\$)/g,""),b&&a('input[name="'+b+'"]').each(function(a,b){var c=g.getType(b);"radio"!==c&&"checkbox"!==c||b.setAttribute(d.options.namespace+"multiple",d.options.multiple)});for(var e=this._findRelated(),f=0;f<e.length;f++)if(void 0!==(c=a(e.get(f)).data("Parsley"))){this.$element.data("FieldMultiple")||c.addElement(this.$element);break}return this.bind("parsleyField",!0),c||this.bind("parsleyFieldMultiple")},bind:function(b,c){var d;switch(b){case"parsleyForm":d=a.extend(new u(this.element,this.domOptions,this.options),new i,window.ParsleyExtend)._bindFields();break;case"parsleyField":d=a.extend(new A(this.element,this.domOptions,this.options,this.parent),new i,window.ParsleyExtend);break;case"parsleyFieldMultiple":d=a.extend(new A(this.element,this.domOptions,this.options,this.parent),new B,new i,window.ParsleyExtend)._init();break;default:throw new Error(b+"is not a supported Parsley type")}return this.options.multiple&&g.setAttr(this.element,this.options.namespace,"multiple",this.options.multiple),void 0!==c?(this.$element.data("FieldMultiple",d),d):(this.$element.data("Parsley",d),d._actualizeTriggers(),d._trigger("init"),d)}};var D=a.fn.jquery.split(".");if(parseInt(D[0])<=1&&parseInt(D[1])<8)throw"The loaded version of jQuery is too old. Please upgrade to 1.8.x or better.";D.forEach||g.warn("Parsley requires ES5 to run properly. Please include https://github.com/es-shims/es5-shim");var E=_extends(new i,{element:document,$element:a(document),actualizeOptions:null,_resetOptions:null,Factory:C,version:"2.8.1"});_extends(A.prototype,s.Field,i.prototype),_extends(u.prototype,s.Form,i.prototype),_extends(C.prototype,i.prototype),a.fn.parsley=a.fn.psly=function(b){if(this.length>1){var c=[];return this.each(function(){c.push(a(this).parsley(b))}),c}if(0!=this.length)return new C(this[0],b)},void 0===window.ParsleyExtend&&(window.ParsleyExtend={}),E.options=_extends(g.objectCreate(h),window.ParsleyConfig),window.ParsleyConfig=E.options,window.Parsley=window.psly=E,E.Utils=g,window.ParsleyUtils={},a.each(g,function(a,b){"function"==typeof b&&(window.ParsleyUtils[a]=function(){return g.warnOnce("Accessing `window.ParsleyUtils` is deprecated. Use `window.Parsley.Utils` instead."),g[a].apply(g,arguments)})});var F=window.Parsley._validatorRegistry=new m(window.ParsleyConfig.validators,window.ParsleyConfig.i18n);window.ParsleyValidator={},a.each("setLocale addCatalog addMessage addMessages getErrorMessage formatMessage addValidator updateValidator removeValidator hasValidator".split(" "),function(a,b){window.Parsley[b]=function(){return F[b].apply(F,arguments)},window.ParsleyValidator[b]=function(){var a;return g.warnOnce("Accessing the method '"+b+"' through Validator is deprecated. Simply call 'window.Parsley."+b+"(...)'"),(a=window.Parsley)[b].apply(a,arguments)}}),window.Parsley.UI=s,window.ParsleyUI={removeError:function(a,b,c){var d=!0!==c;return g.warnOnce("Accessing UI is deprecated. Call 'removeError' on the instance directly. Please comment in issue 1073 as to your need to call this method."),a.removeError(b,{updateClass:d})},getErrorsMessages:function(a){return g.warnOnce("Accessing UI is deprecated. Call 'getErrorsMessages' on the instance directly."),a.getErrorsMessages()}},a.each("addError updateError".split(" "),function(a,b){window.ParsleyUI[b]=function(a,c,d,e,f){var h=!0!==f;return g.warnOnce("Accessing UI is deprecated. Call '"+b+"' on the instance directly. Please comment in issue 1073 as to your need to call this method."),a[b](c,{message:d,assert:e,updateClass:h})}}),!1!==window.ParsleyConfig.autoBind&&a(function(){a("[data-parsley-validate]").length&&a("[data-parsley-validate]").parsley()});var G=a({}),H=function(){g.warnOnce("Parsley's pubsub module is deprecated; use the 'on' and 'off' methods on parsley instances or window.Parsley")},I="parsley:";a.listen=function(a,d){var e;if(H(),"object"==typeof arguments[1]&&"function"==typeof arguments[2]&&(e=arguments[1],d=arguments[2]),"function"!=typeof d)throw new Error("Wrong parameters");window.Parsley.on(c(a),b(d,e))},a.listenTo=function(a,d,e){if(H(),!(a instanceof A||a instanceof u))throw new Error("Must give Parsley instance");if("string"!=typeof d||"function"!=typeof e)throw new Error("Wrong parameters");a.on(c(d),b(e))},a.unsubscribe=function(a,b){if(H(),"string"!=typeof a||"function"!=typeof b)throw new Error("Wrong arguments");window.Parsley.off(c(a),b.parsleyAdaptedCallback)},a.unsubscribeTo=function(a,b){if(H(),!(a instanceof A||a instanceof u))throw new Error("Must give Parsley instance");a.off(c(b))},a.unsubscribeAll=function(b){H(),window.Parsley.off(c(b)),a("form,input,textarea,select").each(function(){var d=a(this).data("Parsley");d&&d.off(c(b))})},a.emit=function(a,b){var d;H();var e=b instanceof A||b instanceof u,f=Array.prototype.slice.call(arguments,e?2:1);f.unshift(c(a)),e||(b=window.Parsley),(d=b).trigger.apply(d,_toConsumableArray(f))};return a.extend(!0,E,{asyncValidators:{default:{fn:function(a){return a.status>=200&&a.status<300},url:!1},reverse:{fn:function(a){return a.status<200||a.status>=300},url:!1}},addAsyncValidator:function(a,b,c,d){return E.asyncValidators[a]={fn:b,url:c||!1,options:d||{}},this}}),E.addValidator("remote",{requirementType:{"":"string",validator:"string",reverse:"boolean",options:"object"},validateString:function(b,c,d,e){var f,g,h={},i=d.validator||(!0===d.reverse?"reverse":"default");if(void 0===E.asyncValidators[i])throw new Error("Calling an undefined async validator: `"+i+"`");c=E.asyncValidators[i].url||c,c.indexOf("{value}")>-1?c=c.replace("{value}",encodeURIComponent(b)):h[e.element.getAttribute("name")||e.element.getAttribute("id")]=b;var j=a.extend(!0,d.options||{},E.asyncValidators[i].options);f=a.extend(!0,{},{url:c,data:h,type:"GET"},j),e.trigger("field:ajaxoptions",e,f),g=a.param(f),void 0===E._remoteCache&&(E._remoteCache={});var k=E._remoteCache[g]=E._remoteCache[g]||a.ajax(f),l=function(){var b=E.asyncValidators[i].fn.call(e,k,c,d);return b||(b=a.Deferred().reject()),a.when(b)};return k.then(l,l)},priority:-1}),E.on("form:submit",function(){E._remoteCache={}}),i.prototype.addAsyncValidator=function(){return g.warnOnce("Accessing the method `addAsyncValidator` through an instance is deprecated. Simply call `Parsley.addAsyncValidator(...)`"),E.addAsyncValidator.apply(E,arguments)},E.addMessages("en",{defaultMessage:"This value seems to be invalid.",type:{email:"This value should be a valid email.",url:"This value should be a valid url.",number:"This value should be a valid number.",integer:"This value should be a valid integer.",digits:"This value should be digits.",alphanum:"This value should be alphanumeric."},notblank:"This value should not be blank.",required:"This value is required.",pattern:"This value seems to be invalid.",min:"This value should be greater than or equal to %s.",max:"This value should be lower than or equal to %s.",range:"This value should be between %s and %s.",minlength:"This value is too short. It should have %s characters or more.",maxlength:"This value is too long. It should have %s characters or fewer.",length:"This value length is invalid. It should be between %s and %s characters long.",mincheck:"You must select at least %s choices.",maxcheck:"You must select %s choices or fewer.",check:"You must select between %s and %s choices.",equalto:"This value should be the same."}),E.setLocale("en"),(new d).install(),E}),jQuery(document).ready(function(a){window.Parsley.on("field:error",function(){this.$element.attr("aria-describedby",this._ui.errorsWrapperId).attr("aria-invalid","true"),this._ui.$errorsWrapper.attr("aria-live","polite")}),window.Parsley.on("field:success",function(){this.$element.attr("aria-invalid")&&this.$element.removeAttr("aria-invalid")})});
|
1 |
function _toConsumableArray(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}function _toConsumableArray(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)}var _slice=Array.prototype.slice,_slicedToArray=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(a){e=!0,f=a}finally{try{!d&&h.return&&h.return()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_extends=Object.assign||function(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(a[d]=c[d])}return a};!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],b):a.parsley=b(a.jQuery)}(this,function(a){"use strict";function b(a,b){return a.parsleyAdaptedCallback||(a.parsleyAdaptedCallback=function(){var c=Array.prototype.slice.call(arguments,0);c.unshift(this),a.apply(b||G,c)}),a.parsleyAdaptedCallback}function c(a){return 0===a.lastIndexOf(I,0)?a.substr(I.length):a}function d(){var b=this,c=window||global;_extends(this,{isNativeEvent:function(a){return a.originalEvent&&!1!==a.originalEvent.isTrusted},fakeInputEvent:function(c){b.isNativeEvent(c)&&a(c.target).trigger("input")},misbehaves:function(c){b.isNativeEvent(c)&&(b.behavesOk(c),a(document).on("change.inputevent",c.data.selector,b.fakeInputEvent),b.fakeInputEvent(c))},behavesOk:function(c){b.isNativeEvent(c)&&a(document).off("input.inputevent",c.data.selector,b.behavesOk).off("change.inputevent",c.data.selector,b.misbehaves)},install:function(){if(!c.inputEventPatched){c.inputEventPatched="0.0.3";for(var d=["select",'input[type="checkbox"]','input[type="radio"]','input[type="file"]'],e=0;e<d.length;e++){var f=d[e];a(document).on("input.inputevent",f,{selector:f},b.behavesOk).on("change.inputevent",f,{selector:f},b.misbehaves)}}},uninstall:function(){delete c.inputEventPatched,a(document).off(".inputevent")}})}var e=1,f={},g={attr:function(a,b,c){var d,e,f,g=new RegExp("^"+b,"i");if(void 0===c)c={};else for(d in c)c.hasOwnProperty(d)&&delete c[d];if(!a)return c;for(f=a.attributes,d=f.length;d--;)(e=f[d])&&e.specified&&g.test(e.name)&&(c[this.camelize(e.name.slice(b.length))]=this.deserializeValue(e.value));return c},checkAttr:function(a,b,c){return a.hasAttribute(b+c)},setAttr:function(a,b,c,d){a.setAttribute(this.dasherize(b+c),String(d))},getType:function(a){return a.getAttribute("type")||"text"},generateID:function(){return""+e++},deserializeValue:function(a){var b;try{return a?"true"==a||"false"!=a&&("null"==a?null:isNaN(b=Number(a))?/^[\[\{]/.test(a)?JSON.parse(a):a:b):a}catch(b){return a}},camelize:function(a){return a.replace(/-+(.)?/g,function(a,b){return b?b.toUpperCase():""})},dasherize:function(a){return a.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()},warn:function(){var a;window.console&&"function"==typeof window.console.warn&&(a=window.console).warn.apply(a,arguments)},warnOnce:function(a){f[a]||(f[a]=!0,this.warn.apply(this,arguments))},_resetWarnings:function(){f={}},trimString:function(a){return a.replace(/^\s+|\s+$/g,"")},parse:{date:function(a){var b=a.match(/^(\d{4,})-(\d\d)-(\d\d)$/);if(!b)return null;var c=b.map(function(a){return parseInt(a,10)}),d=_slicedToArray(c,4),e=(d[0],d[1]),f=d[2],g=d[3],h=new Date(e,f-1,g);return h.getFullYear()!==e||h.getMonth()+1!==f||h.getDate()!==g?null:h},string:function(a){return a},integer:function(a){return isNaN(a)?null:parseInt(a,10)},number:function(a){if(isNaN(a))throw null;return parseFloat(a)},boolean:function(a){return!/^\s*false\s*$/i.test(a)},object:function(a){return g.deserializeValue(a)},regexp:function(a){var b="";return/^\/.*\/(?:[gimy]*)$/.test(a)?(b=a.replace(/.*\/([gimy]*)$/,"$1"),a=a.replace(new RegExp("^/(.*?)/"+b+"$"),"$1")):a="^"+a+"$",new RegExp(a,b)}},parseRequirement:function(a,b){var c=this.parse[a||"string"];if(!c)throw'Unknown requirement specification: "'+a+'"';var d=c(b);if(null===d)throw"Requirement is not a "+a+': "'+b+'"';return d},namespaceEvents:function(b,c){return b=this.trimString(b||"").split(/\s+/),b[0]?a.map(b,function(a){return a+"."+c}).join(" "):""},difference:function(b,c){var d=[];return a.each(b,function(a,b){-1==c.indexOf(b)&&d.push(b)}),d},all:function(b){return a.when.apply(a,_toConsumableArray(b).concat([42,42]))},objectCreate:Object.create||function(){var a=function(){};return function(b){if(arguments.length>1)throw Error("Second argument not supported");if("object"!=typeof b)throw TypeError("Argument must be an object");a.prototype=b;var c=new a;return a.prototype=null,c}}(),_SubmitSelector:'input[type="submit"], button:submit'},h={namespace:"data-parsley-",inputs:"input, textarea, select",excluded:"input[type=button], input[type=submit], input[type=reset], input[type=hidden]",priorityEnabled:!0,multiple:null,group:null,uiEnabled:!0,validationThreshold:3,focus:"first",trigger:!1,triggerAfterFailure:"input",errorClass:"parsley-error",successClass:"parsley-success",classHandler:function(a){},errorsContainer:function(a){},errorsWrapper:'<ul class="parsley-errors-list"></ul>',errorTemplate:"<li></li>"},i=function(){this.__id__=g.generateID()};i.prototype={asyncSupport:!0,_pipeAccordingToValidationResult:function(){var b=this,c=function(){var c=a.Deferred();return!0!==b.validationResult&&c.reject(),c.resolve().promise()};return[c,c]},actualizeOptions:function(){return g.attr(this.element,this.options.namespace,this.domOptions),this.parent&&this.parent.actualizeOptions&&this.parent.actualizeOptions(),this},_resetOptions:function(a){this.domOptions=g.objectCreate(this.parent.options),this.options=g.objectCreate(this.domOptions);for(var b in a)a.hasOwnProperty(b)&&(this.options[b]=a[b]);this.actualizeOptions()},_listeners:null,on:function(a,b){return this._listeners=this._listeners||{},(this._listeners[a]=this._listeners[a]||[]).push(b),this},subscribe:function(b,c){a.listenTo(this,b.toLowerCase(),c)},off:function(a,b){var c=this._listeners&&this._listeners[a];if(c)if(b)for(var d=c.length;d--;)c[d]===b&&c.splice(d,1);else delete this._listeners[a];return this},unsubscribe:function(b,c){a.unsubscribeTo(this,b.toLowerCase())},trigger:function(a,b,c){b=b||this;var d,e=this._listeners&&this._listeners[a];if(e)for(var f=e.length;f--;)if(!1===(d=e[f].call(b,b,c)))return d;return!this.parent||this.parent.trigger(a,b,c)},asyncIsValid:function(a,b){return g.warnOnce("asyncIsValid is deprecated; please use whenValid instead"),this.whenValid({group:a,force:b})},_findRelated:function(){return this.options.multiple?a(this.parent.element.querySelectorAll("["+this.options.namespace+'multiple="'+this.options.multiple+'"]')):this.$element}};var j=function(a,b){var c=a.match(/^\s*\[(.*)\]\s*$/);if(!c)throw'Requirement is not an array: "'+a+'"';var d=c[1].split(",").map(g.trimString);if(d.length!==b)throw"Requirement has "+d.length+" values when "+b+" are needed";return d},k=function(a,b,c){var d=null,e={};for(var f in a)if(f){var h=c(f);"string"==typeof h&&(h=g.parseRequirement(a[f],h)),e[f]=h}else d=g.parseRequirement(a[f],b);return[d,e]},l=function(b){a.extend(!0,this,b)};l.prototype={validate:function(a,b){if(this.fn)return arguments.length>3&&(b=[].slice.call(arguments,1,-1)),this.fn(a,b);if(Array.isArray(a)){if(!this.validateMultiple)throw"Validator `"+this.name+"` does not handle multiple values";return this.validateMultiple.apply(this,arguments)}var c=arguments[arguments.length-1];if(this.validateDate&&c._isDateInput())return arguments[0]=g.parse.date(arguments[0]),null!==arguments[0]&&this.validateDate.apply(this,arguments);if(this.validateNumber)return!isNaN(a)&&(arguments[0]=parseFloat(arguments[0]),this.validateNumber.apply(this,arguments));if(this.validateString)return this.validateString.apply(this,arguments);throw"Validator `"+this.name+"` only handles multiple values"},parseRequirements:function(b,c){if("string"!=typeof b)return Array.isArray(b)?b:[b];var d=this.requirementType;if(Array.isArray(d)){for(var e=j(b,d.length),f=0;f<e.length;f++)e[f]=g.parseRequirement(d[f],e[f]);return e}return a.isPlainObject(d)?k(d,b,c):[g.parseRequirement(d,b)]},requirementType:"string",priority:2};var m=function(a,b){this.__class__="ValidatorRegistry",this.locale="en",this.init(a||{},b||{})},n={email:/^((([a-zA-Z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-zA-Z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/,number:/^-?(\d*\.)?\d+(e[-+]?\d+)?$/i,integer:/^-?\d+$/,digits:/^\d+$/,alphanum:/^\w+$/i,date:{test:function(a){return null!==g.parse.date(a)}},url:new RegExp("^(?:(?:https?|ftp)://)?(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-zA-Z\\u00a1-\\uffff0-9]-*)*[a-zA-Z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-zA-Z\\u00a1-\\uffff0-9]-*)*[a-zA-Z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-zA-Z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:/\\S*)?$")};n.range=n.number;var o=function(a){var b=(""+a).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return b?Math.max(0,(b[1]?b[1].length:0)-(b[2]?+b[2]:0)):0},p=function(a,b){return b.map(g.parse[a])},q=function(a,b){return function(c){for(var d=arguments.length,e=Array(d>1?d-1:0),f=1;f<d;f++)e[f-1]=arguments[f];return e.pop(),b.apply(void 0,[c].concat(_toConsumableArray(p(a,e))))}},r=function(a){return{validateDate:q("date",a),validateNumber:q("number",a),requirementType:a.length<=2?"string":["string","string"],priority:30}};m.prototype={init:function(a,b){this.catalog=b,this.validators=_extends({},this.validators);for(var c in a)this.addValidator(c,a[c].fn,a[c].priority);window.Parsley.trigger("parsley:validator:init")},setLocale:function(a){if(void 0===this.catalog[a])throw new Error(a+" is not available in the catalog");return this.locale=a,this},addCatalog:function(a,b,c){return"object"==typeof b&&(this.catalog[a]=b),!0===c?this.setLocale(a):this},addMessage:function(a,b,c){return void 0===this.catalog[a]&&(this.catalog[a]={}),this.catalog[a][b]=c,this},addMessages:function(a,b){for(var c in b)this.addMessage(a,c,b[c]);return this},addValidator:function(a,b,c){if(this.validators[a])g.warn('Validator "'+a+'" is already defined.');else if(h.hasOwnProperty(a))return void g.warn('"'+a+'" is a restricted keyword and is not a valid validator name.');return this._setValidator.apply(this,arguments)},hasValidator:function(a){return!!this.validators[a]},updateValidator:function(a,b,c){return this.validators[a]?this._setValidator.apply(this,arguments):(g.warn('Validator "'+a+'" is not already defined.'),this.addValidator.apply(this,arguments))},removeValidator:function(a){return this.validators[a]||g.warn('Validator "'+a+'" is not defined.'),delete this.validators[a],this},_setValidator:function(a,b,c){"object"!=typeof b&&(b={fn:b,priority:c}),b.validate||(b=new l(b)),this.validators[a]=b;for(var d in b.messages||{})this.addMessage(d,a,b.messages[d]);return this},getErrorMessage:function(a){var b;if("type"===a.name){b=(this.catalog[this.locale][a.name]||{})[a.requirements]}else b=this.formatMessage(this.catalog[this.locale][a.name],a.requirements);return b||this.catalog[this.locale].defaultMessage||this.catalog.en.defaultMessage},formatMessage:function(a,b){if("object"==typeof b){for(var c in b)a=this.formatMessage(a,b[c]);return a}return"string"==typeof a?a.replace(/%s/i,b):""},validators:{notblank:{validateString:function(a){return/\S/.test(a)},priority:2},required:{validateMultiple:function(a){return a.length>0},validateString:function(a){return/\S/.test(a)},priority:512},type:{validateString:function(a,b){var c=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],d=c.step,e=void 0===d?"any":d,f=c.base,g=void 0===f?0:f,h=n[b];if(!h)throw new Error("validator type `"+b+"` is not supported");if(!h.test(a))return!1;if("number"===b&&!/^any$/i.test(e||"")){var i=Number(a),j=Math.max(o(e),o(g));if(o(i)>j)return!1;var k=function(a){return Math.round(a*Math.pow(10,j))};if((k(i)-k(g))%k(e)!=0)return!1}return!0},requirementType:{"":"string",step:"string",base:"number"},priority:256},pattern:{validateString:function(a,b){return b.test(a)},requirementType:"regexp",priority:64},minlength:{validateString:function(a,b){return a.length>=b},requirementType:"integer",priority:30},maxlength:{validateString:function(a,b){return a.length<=b},requirementType:"integer",priority:30},length:{validateString:function(a,b,c){return a.length>=b&&a.length<=c},requirementType:["integer","integer"],priority:30},mincheck:{validateMultiple:function(a,b){return a.length>=b},requirementType:"integer",priority:30},maxcheck:{validateMultiple:function(a,b){return a.length<=b},requirementType:"integer",priority:30},check:{validateMultiple:function(a,b,c){return a.length>=b&&a.length<=c},requirementType:["integer","integer"],priority:30},min:r(function(a,b){return a>=b}),max:r(function(a,b){return a<=b}),range:r(function(a,b,c){return a>=b&&a<=c}),equalto:{validateString:function(b,c){var d=a(c);return d.length?b===d.val():b===c},priority:256}}};var s={},t=function a(b,c,d){for(var e=[],f=[],g=0;g<b.length;g++){for(var h=!1,i=0;i<c.length;i++)if(b[g].assert.name===c[i].assert.name){h=!0;break}h?f.push(b[g]):e.push(b[g])}return{kept:f,added:e,removed:d?[]:a(c,b,!0).added}};s.Form={_actualizeTriggers:function(){var a=this;this.$element.on("submit.Parsley",function(b){a.onSubmitValidate(b)}),this.$element.on("click.Parsley",g._SubmitSelector,function(b){a.onSubmitButton(b)}),!1!==this.options.uiEnabled&&this.element.setAttribute("novalidate","")},focus:function(){if(this._focusedField=null,!0===this.validationResult||"none"===this.options.focus)return null;for(var a=0;a<this.fields.length;a++){var b=this.fields[a];if(!0!==b.validationResult&&b.validationResult.length>0&&void 0===b.options.noFocus&&(this._focusedField=b.$element,"first"===this.options.focus))break}return null===this._focusedField?null:this._focusedField.focus()},_destroyUI:function(){this.$element.off(".Parsley")}},s.Field={_reflowUI:function(){if(this._buildUI(),this._ui){var a=t(this.validationResult,this._ui.lastValidationResult);this._ui.lastValidationResult=this.validationResult,this._manageStatusClass(),this._manageErrorsMessages(a),this._actualizeTriggers(),!a.kept.length&&!a.added.length||this._failedOnce||(this._failedOnce=!0,this._actualizeTriggers())}},getErrorsMessages:function(){if(!0===this.validationResult)return[];for(var a=[],b=0;b<this.validationResult.length;b++)a.push(this.validationResult[b].errorMessage||this._getErrorMessage(this.validationResult[b].assert));return a},addError:function(a){var b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],c=b.message,d=b.assert,e=b.updateClass,f=void 0===e||e;this._buildUI(),this._addError(a,{message:c,assert:d}),f&&this._errorClass()},updateError:function(a){var b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],c=b.message,d=b.assert,e=b.updateClass,f=void 0===e||e;this._buildUI(),this._updateError(a,{message:c,assert:d}),f&&this._errorClass()},removeError:function(a){var b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],c=b.updateClass,d=void 0===c||c;this._buildUI(),this._removeError(a),d&&this._manageStatusClass()},_manageStatusClass:function(){this.hasConstraints()&&this.needsValidation()&&!0===this.validationResult?this._successClass():this.validationResult.length>0?this._errorClass():this._resetClass()},_manageErrorsMessages:function(b){if(void 0===this.options.errorsMessagesDisabled){if(void 0!==this.options.errorMessage)return b.added.length||b.kept.length?(this._insertErrorWrapper(),0===this._ui.$errorsWrapper.find(".parsley-custom-error-message").length&&this._ui.$errorsWrapper.append(a(this.options.errorTemplate).addClass("parsley-custom-error-message")),this._ui.$errorsWrapper.addClass("filled").find(".parsley-custom-error-message").html(this.options.errorMessage)):this._ui.$errorsWrapper.removeClass("filled").find(".parsley-custom-error-message").remove();for(var c=0;c<b.removed.length;c++)this._removeError(b.removed[c].assert.name);for(c=0;c<b.added.length;c++)this._addError(b.added[c].assert.name,{message:b.added[c].errorMessage,assert:b.added[c].assert});for(c=0;c<b.kept.length;c++)this._updateError(b.kept[c].assert.name,{message:b.kept[c].errorMessage,assert:b.kept[c].assert})}},_addError:function(b,c){var d=c.message,e=c.assert;this._insertErrorWrapper(),this._ui.$errorClassHandler.attr("aria-describedby",this._ui.errorsWrapperId),this._ui.$errorsWrapper.addClass("filled").append(a(this.options.errorTemplate).addClass("parsley-"+b).html(d||this._getErrorMessage(e)))},_updateError:function(a,b){var c=b.message,d=b.assert;this._ui.$errorsWrapper.addClass("filled").find(".parsley-"+a).html(c||this._getErrorMessage(d))},_removeError:function(a){this._ui.$errorClassHandler.removeAttr("aria-describedby"),this._ui.$errorsWrapper.removeClass("filled").find(".parsley-"+a).remove()},_getErrorMessage:function(a){var b=a.name+"Message";return void 0!==this.options[b]?window.Parsley.formatMessage(this.options[b],a.requirements):window.Parsley.getErrorMessage(a)},_buildUI:function(){if(!this._ui&&!1!==this.options.uiEnabled){var b={};this.element.setAttribute(this.options.namespace+"id",this.__id__),b.$errorClassHandler=this._manageClassHandler(),b.errorsWrapperId="parsley-id-"+(this.options.multiple?"multiple-"+this.options.multiple:this.__id__),b.$errorsWrapper=a(this.options.errorsWrapper).attr("id",b.errorsWrapperId),b.lastValidationResult=[],b.validationInformationVisible=!1,this._ui=b}},_manageClassHandler:function(){if("string"==typeof this.options.classHandler&&a(this.options.classHandler).length)return a(this.options.classHandler);var b=this.options.classHandler;if("string"==typeof this.options.classHandler&&"function"==typeof window[this.options.classHandler]&&(b=window[this.options.classHandler]),"function"==typeof b){var c=b.call(this,this);if(void 0!==c&&c.length)return c}else{if("object"==typeof b&&b instanceof jQuery&&b.length)return b;b&&g.warn("The class handler `"+b+"` does not exist in DOM nor as a global JS function")}return this._inputHolder()},_inputHolder:function(){return this.options.multiple&&"SELECT"!==this.element.nodeName?this.$element.parent():this.$element},_insertErrorWrapper:function(){var b=this.options.errorsContainer;if(0!==this._ui.$errorsWrapper.parent().length)return this._ui.$errorsWrapper.parent();if("string"==typeof b){if(a(b).length)return a(b).append(this._ui.$errorsWrapper);"function"==typeof window[b]?b=window[b]:g.warn("The errors container `"+b+"` does not exist in DOM nor as a global JS function")}return"function"==typeof b&&(b=b.call(this,this)),"object"==typeof b&&b.length?b.append(this._ui.$errorsWrapper):this._inputHolder().after(this._ui.$errorsWrapper)},_actualizeTriggers:function(){var a,b=this,c=this._findRelated();c.off(".Parsley"),this._failedOnce?c.on(g.namespaceEvents(this.options.triggerAfterFailure,"Parsley"),function(){b._validateIfNeeded()}):(a=g.namespaceEvents(this.options.trigger,"Parsley"))&&c.on(a,function(a){b._validateIfNeeded(a)})},_validateIfNeeded:function(a){var b=this;a&&/key|input/.test(a.type)&&(!this._ui||!this._ui.validationInformationVisible)&&this.getValue().length<=this.options.validationThreshold||(this.options.debounce?(window.clearTimeout(this._debounced),this._debounced=window.setTimeout(function(){return b.validate()},this.options.debounce)):this.validate())},_resetUI:function(){this._failedOnce=!1,this._actualizeTriggers(),void 0!==this._ui&&(this._ui.$errorsWrapper.removeClass("filled").children().remove(),this._resetClass(),this._ui.lastValidationResult=[],this._ui.validationInformationVisible=!1)},_destroyUI:function(){this._resetUI(),void 0!==this._ui&&this._ui.$errorsWrapper.remove(),delete this._ui},_successClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.errorClass).addClass(this.options.successClass)},_errorClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.successClass).addClass(this.options.errorClass)},_resetClass:function(){this._ui.$errorClassHandler.removeClass(this.options.successClass).removeClass(this.options.errorClass)}};var u=function(b,c,d){this.__class__="Form",this.element=b,this.$element=a(b),this.domOptions=c,this.options=d,this.parent=window.Parsley,this.fields=[],this.validationResult=null},v={pending:null,resolved:!0,rejected:!1};u.prototype={onSubmitValidate:function(a){var b=this;if(!0!==a.parsley){var c=this._submitSource||this.$element.find(g._SubmitSelector)[0];if(this._submitSource=null,this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!0),!c||null===c.getAttribute("formnovalidate")){window.Parsley._remoteCache={};var d=this.whenValidate({event:a});"resolved"===d.state()&&!1!==this._trigger("submit")||(a.stopImmediatePropagation(),a.preventDefault(),"pending"===d.state()&&d.done(function(){b._submit(c)}))}}},onSubmitButton:function(a){this._submitSource=a.currentTarget},_submit:function(b){if(!1!==this._trigger("submit")){if(b){var c=this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!1);0===c.length&&(c=a('<input class="parsley-synthetic-submit-button" type="hidden">').appendTo(this.$element)),c.attr({name:b.getAttribute("name"),value:b.getAttribute("value")})}this.$element.trigger(_extends(a.Event("submit"),{parsley:!0}))}},validate:function(b){if(arguments.length>=1&&!a.isPlainObject(b)){g.warnOnce("Calling validate on a parsley form without passing arguments as an object is deprecated.");var c=_slice.call(arguments);b={group:c[0],force:c[1],event:c[2]}}return v[this.whenValidate(b).state()]},whenValidate:function(){var b,c=this,d=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=d.group,f=d.force,h=d.event;this.submitEvent=h,h&&(this.submitEvent=_extends({},h,{preventDefault:function(){g.warnOnce("Using `this.submitEvent.preventDefault()` is deprecated; instead, call `this.validationResult = false`"),c.validationResult=!1}})),this.validationResult=!0,this._trigger("validate"),this._refreshFields();var i=this._withoutReactualizingFormOptions(function(){return a.map(c.fields,function(a){return a.whenValidate({force:f,group:e})})});return(b=g.all(i).done(function(){c._trigger("success")}).fail(function(){c.validationResult=!1,c.focus(),c._trigger("error")}).always(function(){c._trigger("validated")})).pipe.apply(b,_toConsumableArray(this._pipeAccordingToValidationResult()))},isValid:function(b){if(arguments.length>=1&&!a.isPlainObject(b)){g.warnOnce("Calling isValid on a parsley form without passing arguments as an object is deprecated.");var c=_slice.call(arguments);b={group:c[0],force:c[1]}}return v[this.whenValid(b).state()]},whenValid:function(){var b=this,c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],d=c.group,e=c.force;this._refreshFields();var f=this._withoutReactualizingFormOptions(function(){return a.map(b.fields,function(a){return a.whenValid({group:d,force:e})})});return g.all(f)},refresh:function(){return this._refreshFields(),this},reset:function(){for(var a=0;a<this.fields.length;a++)this.fields[a].reset();this._trigger("reset")},destroy:function(){this._destroyUI();for(var a=0;a<this.fields.length;a++)this.fields[a].destroy();this.$element.removeData("Parsley"),this._trigger("destroy")},_refreshFields:function(){return this.actualizeOptions()._bindFields()},_bindFields:function(){var b=this,c=this.fields;return this.fields=[],this.fieldsMappedById={},this._withoutReactualizingFormOptions(function(){b.$element.find(b.options.inputs).not(b.options.excluded).each(function(a,c){var d=new window.Parsley.Factory(c,{},b);if(("Field"===d.__class__||"FieldMultiple"===d.__class__)&&!0!==d.options.excluded){var e=d.__class__+"-"+d.__id__;void 0===b.fieldsMappedById[e]&&(b.fieldsMappedById[e]=d,b.fields.push(d))}}),a.each(g.difference(c,b.fields),function(a,b){b.reset()})}),this},_withoutReactualizingFormOptions:function(a){var b=this.actualizeOptions;this.actualizeOptions=function(){return this};var c=a();return this.actualizeOptions=b,c},_trigger:function(a){return this.trigger("form:"+a)}};var w=function(a,b,c,d,e){var f=window.Parsley._validatorRegistry.validators[b],g=new l(f);d=d||a.options[b+"Priority"]||g.priority,e=!0===e,_extends(this,{validator:g,name:b,requirements:c,priority:d,isDomConstraint:e}),this._parseRequirements(a.options)},x=function(a){return a[0].toUpperCase()+a.slice(1)};w.prototype={validate:function(a,b){var c;return(c=this.validator).validate.apply(c,[a].concat(_toConsumableArray(this.requirementList),[b]))},_parseRequirements:function(a){var b=this;this.requirementList=this.validator.parseRequirements(this.requirements,function(c){return a[b.name+x(c)]})}};var y=function(b,c,d,e){this.__class__="Field",this.element=b,this.$element=a(b),void 0!==e&&(this.parent=e),this.options=d,this.domOptions=c,this.constraints=[],this.constraintsByName={},this.validationResult=!0,this._bindConstraints()},z={pending:null,resolved:!0,rejected:!1};y.prototype={validate:function(b){arguments.length>=1&&!a.isPlainObject(b)&&(g.warnOnce("Calling validate on a parsley field without passing arguments as an object is deprecated."),b={options:b});var c=this.whenValidate(b);if(!c)return!0;switch(c.state()){case"pending":return null;case"resolved":return!0;case"rejected":return this.validationResult}},whenValidate:function(){var a,b=this,c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],d=c.force,e=c.group;if(this.refresh(),!e||this._isInGroup(e))return this.value=this.getValue(),this._trigger("validate"),(a=this.whenValid({force:d,value:this.value,_refreshed:!0}).always(function(){b._reflowUI()}).done(function(){b._trigger("success")}).fail(function(){b._trigger("error")}).always(function(){b._trigger("validated")})).pipe.apply(a,_toConsumableArray(this._pipeAccordingToValidationResult()))},hasConstraints:function(){return 0!==this.constraints.length},needsValidation:function(a){return void 0===a&&(a=this.getValue()),!(!a.length&&!this._isRequired()&&void 0===this.options.validateIfEmpty)},_isInGroup:function(b){return Array.isArray(this.options.group)?-1!==a.inArray(b,this.options.group):this.options.group===b},isValid:function(b){if(arguments.length>=1&&!a.isPlainObject(b)){g.warnOnce("Calling isValid on a parsley field without passing arguments as an object is deprecated.");var c=_slice.call(arguments);b={force:c[0],value:c[1]}}var d=this.whenValid(b);return!d||z[d.state()]},whenValid:function(){var b=this,c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],d=c.force,e=void 0!==d&&d,f=c.value,h=c.group;if(c._refreshed||this.refresh(),!h||this._isInGroup(h)){if(this.validationResult=!0,!this.hasConstraints())return a.when();if(void 0!==f&&null!==f||(f=this.getValue()),!this.needsValidation(f)&&!0!==e)return a.when();var i=this._getGroupedConstraints(),j=[];return a.each(i,function(c,d){var e=g.all(a.map(d,function(a){return b._validateConstraint(f,a)}));if(j.push(e),"rejected"===e.state())return!1}),g.all(j)}},_validateConstraint:function(b,c){var d=this,e=c.validate(b,this);return!1===e&&(e=a.Deferred().reject()),g.all([e]).fail(function(a){d.validationResult instanceof Array||(d.validationResult=[]),d.validationResult.push({assert:c,errorMessage:"string"==typeof a&&a})})},getValue:function(){var a;return a="function"==typeof this.options.value?this.options.value(this):void 0!==this.options.value?this.options.value:this.$element.val(),void 0===a||null===a?"":this._handleWhitespace(a)},reset:function(){return this._resetUI(),this._trigger("reset")},destroy:function(){this._destroyUI(),this.$element.removeData("Parsley"),this.$element.removeData("FieldMultiple"),this._trigger("destroy")},refresh:function(){return this._refreshConstraints(),this},_refreshConstraints:function(){return this.actualizeOptions()._bindConstraints()},refreshConstraints:function(){return g.warnOnce("Parsley's refreshConstraints is deprecated. Please use refresh"),this.refresh()},addConstraint:function(a,b,c,d){if(window.Parsley._validatorRegistry.validators[a]){var e=new w(this,a,b,c,d);"undefined"!==this.constraintsByName[e.name]&&this.removeConstraint(e.name),this.constraints.push(e),this.constraintsByName[e.name]=e}return this},removeConstraint:function(a){for(var b=0;b<this.constraints.length;b++)if(a===this.constraints[b].name){this.constraints.splice(b,1);break}return delete this.constraintsByName[a],this},updateConstraint:function(a,b,c){return this.removeConstraint(a).addConstraint(a,b,c)},_bindConstraints:function(){for(var a=[],b={},c=0;c<this.constraints.length;c++)!1===this.constraints[c].isDomConstraint&&(a.push(this.constraints[c]),b[this.constraints[c].name]=this.constraints[c]);this.constraints=a,this.constraintsByName=b;for(var d in this.options)this.addConstraint(d,this.options[d],void 0,!0);return this._bindHtml5Constraints()},_bindHtml5Constraints:function(){null!==this.element.getAttribute("required")&&this.addConstraint("required",!0,void 0,!0),null!==this.element.getAttribute("pattern")&&this.addConstraint("pattern",this.element.getAttribute("pattern"),void 0,!0);var a=this.element.getAttribute("min"),b=this.element.getAttribute("max");null!==a&&null!==b?this.addConstraint("range",[a,b],void 0,!0):null!==a?this.addConstraint("min",a,void 0,!0):null!==b&&this.addConstraint("max",b,void 0,!0),null!==this.element.getAttribute("minlength")&&null!==this.element.getAttribute("maxlength")?this.addConstraint("length",[this.element.getAttribute("minlength"),this.element.getAttribute("maxlength")],void 0,!0):null!==this.element.getAttribute("minlength")?this.addConstraint("minlength",this.element.getAttribute("minlength"),void 0,!0):null!==this.element.getAttribute("maxlength")&&this.addConstraint("maxlength",this.element.getAttribute("maxlength"),void 0,!0);var c=g.getType(this.element);return"number"===c?this.addConstraint("type",["number",{step:this.element.getAttribute("step")||"1",base:a||this.element.getAttribute("value")}],void 0,!0):/^(email|url|range|date)$/i.test(c)?this.addConstraint("type",c,void 0,!0):this},_isRequired:function(){return void 0!==this.constraintsByName.required&&!1!==this.constraintsByName.required.requirements},_trigger:function(a){return this.trigger("field:"+a)},_handleWhitespace:function(a){return!0===this.options.trimValue&&g.warnOnce('data-parsley-trim-value="true" is deprecated, please use data-parsley-whitespace="trim"'),"squish"===this.options.whitespace&&(a=a.replace(/\s{2,}/g," ")),"trim"!==this.options.whitespace&&"squish"!==this.options.whitespace&&!0!==this.options.trimValue||(a=g.trimString(a)),a},_isDateInput:function(){var a=this.constraintsByName.type;return a&&"date"===a.requirements},_getGroupedConstraints:function(){
|
2 |
if(!1===this.options.priorityEnabled)return[this.constraints];for(var a=[],b={},c=0;c<this.constraints.length;c++){var d=this.constraints[c].priority;b[d]||a.push(b[d]=[]),b[d].push(this.constraints[c])}return a.sort(function(a,b){return b[0].priority-a[0].priority}),a}};var A=y,B=function(){this.__class__="FieldMultiple"};B.prototype={addElement:function(a){return this.$elements.push(a),this},_refreshConstraints:function(){var b;if(this.constraints=[],"SELECT"===this.element.nodeName)return this.actualizeOptions()._bindConstraints(),this;for(var c=0;c<this.$elements.length;c++)if(a("html").has(this.$elements[c]).length){b=this.$elements[c].data("FieldMultiple")._refreshConstraints().constraints;for(var d=0;d<b.length;d++)this.addConstraint(b[d].name,b[d].requirements,b[d].priority,b[d].isDomConstraint)}else this.$elements.splice(c,1);return this},getValue:function(){if("function"==typeof this.options.value)return this.options.value(this);if(void 0!==this.options.value)return this.options.value;if("INPUT"===this.element.nodeName){var b=g.getType(this.element);if("radio"===b)return this._findRelated().filter(":checked").val()||"";if("checkbox"===b){var c=[];return this._findRelated().filter(":checked").each(function(){c.push(a(this).val())}),c}}return"SELECT"===this.element.nodeName&&null===this.$element.val()?[]:this.$element.val()},_init:function(){return this.$elements=[this.$element],this}};var C=function(b,c,d){this.element=b,this.$element=a(b);var e=this.$element.data("Parsley");if(e)return void 0!==d&&e.parent===window.Parsley&&(e.parent=d,e._resetOptions(e.options)),"object"==typeof c&&_extends(e.options,c),e;if(!this.$element.length)throw new Error("You must bind Parsley on an existing element.");if(void 0!==d&&"Form"!==d.__class__)throw new Error("Parent instance must be a Form instance");return this.parent=d||window.Parsley,this.init(c)};C.prototype={init:function(a){return this.__class__="Parsley",this.__version__="2.8.1",this.__id__=g.generateID(),this._resetOptions(a),"FORM"===this.element.nodeName||g.checkAttr(this.element,this.options.namespace,"validate")&&!this.$element.is(this.options.inputs)?this.bind("parsleyForm"):this.isMultiple()?this.handleMultiple():this.bind("parsleyField")},isMultiple:function(){var a=g.getType(this.element);return"radio"===a||"checkbox"===a||"SELECT"===this.element.nodeName&&null!==this.element.getAttribute("multiple")},handleMultiple:function(){var b,c,d=this;if(this.options.multiple=this.options.multiple||(b=this.element.getAttribute("name"))||this.element.getAttribute("id"),"SELECT"===this.element.nodeName&&null!==this.element.getAttribute("multiple"))return this.options.multiple=this.options.multiple||this.__id__,this.bind("parsleyFieldMultiple");if(!this.options.multiple)return g.warn("To be bound by Parsley, a radio, a checkbox and a multiple select input must have either a name or a multiple option.",this.$element),this;this.options.multiple=this.options.multiple.replace(/(:|\.|\[|\]|\{|\}|\$)/g,""),b&&a('input[name="'+b+'"]').each(function(a,b){var c=g.getType(b);"radio"!==c&&"checkbox"!==c||b.setAttribute(d.options.namespace+"multiple",d.options.multiple)});for(var e=this._findRelated(),f=0;f<e.length;f++)if(void 0!==(c=a(e.get(f)).data("Parsley"))){this.$element.data("FieldMultiple")||c.addElement(this.$element);break}return this.bind("parsleyField",!0),c||this.bind("parsleyFieldMultiple")},bind:function(b,c){var d;switch(b){case"parsleyForm":d=a.extend(new u(this.element,this.domOptions,this.options),new i,window.ParsleyExtend)._bindFields();break;case"parsleyField":d=a.extend(new A(this.element,this.domOptions,this.options,this.parent),new i,window.ParsleyExtend);break;case"parsleyFieldMultiple":d=a.extend(new A(this.element,this.domOptions,this.options,this.parent),new B,new i,window.ParsleyExtend)._init();break;default:throw new Error(b+"is not a supported Parsley type")}return this.options.multiple&&g.setAttr(this.element,this.options.namespace,"multiple",this.options.multiple),void 0!==c?(this.$element.data("FieldMultiple",d),d):(this.$element.data("Parsley",d),d._actualizeTriggers(),d._trigger("init"),d)}};var D=a.fn.jquery.split(".");if(parseInt(D[0])<=1&&parseInt(D[1])<8)throw"The loaded version of jQuery is too old. Please upgrade to 1.8.x or better.";D.forEach||g.warn("Parsley requires ES5 to run properly. Please include https://github.com/es-shims/es5-shim");var E=_extends(new i,{element:document,$element:a(document),actualizeOptions:null,_resetOptions:null,Factory:C,version:"2.8.1"});_extends(A.prototype,s.Field,i.prototype),_extends(u.prototype,s.Form,i.prototype),_extends(C.prototype,i.prototype),a.fn.parsley=a.fn.psly=function(b){if(this.length>1){var c=[];return this.each(function(){c.push(a(this).parsley(b))}),c}if(0!=this.length)return new C(this[0],b)},void 0===window.ParsleyExtend&&(window.ParsleyExtend={}),E.options=_extends(g.objectCreate(h),window.ParsleyConfig),window.ParsleyConfig=E.options,window.Parsley=window.psly=E,E.Utils=g,window.ParsleyUtils={},a.each(g,function(a,b){"function"==typeof b&&(window.ParsleyUtils[a]=function(){return g.warnOnce("Accessing `window.ParsleyUtils` is deprecated. Use `window.Parsley.Utils` instead."),g[a].apply(g,arguments)})});var F=window.Parsley._validatorRegistry=new m(window.ParsleyConfig.validators,window.ParsleyConfig.i18n);window.ParsleyValidator={},a.each("setLocale addCatalog addMessage addMessages getErrorMessage formatMessage addValidator updateValidator removeValidator hasValidator".split(" "),function(a,b){window.Parsley[b]=function(){return F[b].apply(F,arguments)},window.ParsleyValidator[b]=function(){var a;return g.warnOnce("Accessing the method '"+b+"' through Validator is deprecated. Simply call 'window.Parsley."+b+"(...)'"),(a=window.Parsley)[b].apply(a,arguments)}}),window.Parsley.UI=s,window.ParsleyUI={removeError:function(a,b,c){var d=!0!==c;return g.warnOnce("Accessing UI is deprecated. Call 'removeError' on the instance directly. Please comment in issue 1073 as to your need to call this method."),a.removeError(b,{updateClass:d})},getErrorsMessages:function(a){return g.warnOnce("Accessing UI is deprecated. Call 'getErrorsMessages' on the instance directly."),a.getErrorsMessages()}},a.each("addError updateError".split(" "),function(a,b){window.ParsleyUI[b]=function(a,c,d,e,f){var h=!0!==f;return g.warnOnce("Accessing UI is deprecated. Call '"+b+"' on the instance directly. Please comment in issue 1073 as to your need to call this method."),a[b](c,{message:d,assert:e,updateClass:h})}}),!1!==window.ParsleyConfig.autoBind&&a(function(){a("[data-parsley-validate]").length&&a("[data-parsley-validate]").parsley()});var G=a({}),H=function(){g.warnOnce("Parsley's pubsub module is deprecated; use the 'on' and 'off' methods on parsley instances or window.Parsley")},I="parsley:";a.listen=function(a,d){var e;if(H(),"object"==typeof arguments[1]&&"function"==typeof arguments[2]&&(e=arguments[1],d=arguments[2]),"function"!=typeof d)throw new Error("Wrong parameters");window.Parsley.on(c(a),b(d,e))},a.listenTo=function(a,d,e){if(H(),!(a instanceof A||a instanceof u))throw new Error("Must give Parsley instance");if("string"!=typeof d||"function"!=typeof e)throw new Error("Wrong parameters");a.on(c(d),b(e))},a.unsubscribe=function(a,b){if(H(),"string"!=typeof a||"function"!=typeof b)throw new Error("Wrong arguments");window.Parsley.off(c(a),b.parsleyAdaptedCallback)},a.unsubscribeTo=function(a,b){if(H(),!(a instanceof A||a instanceof u))throw new Error("Must give Parsley instance");a.off(c(b))},a.unsubscribeAll=function(b){H(),window.Parsley.off(c(b)),a("form,input,textarea,select").each(function(){var d=a(this).data("Parsley");d&&d.off(c(b))})},a.emit=function(a,b){var d;H();var e=b instanceof A||b instanceof u,f=Array.prototype.slice.call(arguments,e?2:1);f.unshift(c(a)),e||(b=window.Parsley),(d=b).trigger.apply(d,_toConsumableArray(f))};return a.extend(!0,E,{asyncValidators:{default:{fn:function(a){return a.status>=200&&a.status<300},url:!1},reverse:{fn:function(a){return a.status<200||a.status>=300},url:!1}},addAsyncValidator:function(a,b,c,d){return E.asyncValidators[a]={fn:b,url:c||!1,options:d||{}},this}}),E.addValidator("remote",{requirementType:{"":"string",validator:"string",reverse:"boolean",options:"object"},validateString:function(b,c,d,e){var f,g,h={},i=d.validator||(!0===d.reverse?"reverse":"default");if(void 0===E.asyncValidators[i])throw new Error("Calling an undefined async validator: `"+i+"`");c=E.asyncValidators[i].url||c,c.indexOf("{value}")>-1?c=c.replace("{value}",encodeURIComponent(b)):h[e.element.getAttribute("name")||e.element.getAttribute("id")]=b;var j=a.extend(!0,d.options||{},E.asyncValidators[i].options);f=a.extend(!0,{},{url:c,data:h,type:"GET"},j),e.trigger("field:ajaxoptions",e,f),g=a.param(f),void 0===E._remoteCache&&(E._remoteCache={});var k=E._remoteCache[g]=E._remoteCache[g]||a.ajax(f),l=function(){var b=E.asyncValidators[i].fn.call(e,k,c,d);return b||(b=a.Deferred().reject()),a.when(b)};return k.then(l,l)},priority:-1}),E.on("form:submit",function(){E._remoteCache={}}),i.prototype.addAsyncValidator=function(){return g.warnOnce("Accessing the method `addAsyncValidator` through an instance is deprecated. Simply call `Parsley.addAsyncValidator(...)`"),E.addAsyncValidator.apply(E,arguments)},E.addMessages("en",{defaultMessage:"This value seems to be invalid.",type:{email:"This value should be a valid email.",url:"This value should be a valid url.",number:"This value should be a valid number.",integer:"This value should be a valid integer.",digits:"This value should be digits.",alphanum:"This value should be alphanumeric."},notblank:"This value should not be blank.",required:"This value is required.",pattern:"This value seems to be invalid.",min:"This value should be greater than or equal to %s.",max:"This value should be lower than or equal to %s.",range:"This value should be between %s and %s.",minlength:"This value is too short. It should have %s characters or more.",maxlength:"This value is too long. It should have %s characters or fewer.",length:"This value length is invalid. It should be between %s and %s characters long.",mincheck:"You must select at least %s choices.",maxcheck:"You must select %s choices or fewer.",check:"You must select between %s and %s choices.",equalto:"This value should be the same."}),E.setLocale("en"),(new d).install(),E});var _slice=Array.prototype.slice,_slicedToArray=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(a){e=!0,f=a}finally{try{!d&&h.return&&h.return()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_extends=Object.assign||function(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(a[d]=c[d])}return a};!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],b):a.parsley=b(a.jQuery)}(this,function(a){"use strict";function b(a,b){return a.parsleyAdaptedCallback||(a.parsleyAdaptedCallback=function(){var c=Array.prototype.slice.call(arguments,0);c.unshift(this),a.apply(b||G,c)}),a.parsleyAdaptedCallback}function c(a){return 0===a.lastIndexOf(I,0)?a.substr(I.length):a}function d(){var b=this,c=window||global;_extends(this,{isNativeEvent:function(a){return a.originalEvent&&!1!==a.originalEvent.isTrusted},fakeInputEvent:function(c){b.isNativeEvent(c)&&a(c.target).trigger("input")},misbehaves:function(c){b.isNativeEvent(c)&&(b.behavesOk(c),a(document).on("change.inputevent",c.data.selector,b.fakeInputEvent),b.fakeInputEvent(c))},behavesOk:function(c){b.isNativeEvent(c)&&a(document).off("input.inputevent",c.data.selector,b.behavesOk).off("change.inputevent",c.data.selector,b.misbehaves)},install:function(){if(!c.inputEventPatched){c.inputEventPatched="0.0.3";for(var d=["select",'input[type="checkbox"]','input[type="radio"]','input[type="file"]'],e=0;e<d.length;e++){var f=d[e];a(document).on("input.inputevent",f,{selector:f},b.behavesOk).on("change.inputevent",f,{selector:f},b.misbehaves)}}},uninstall:function(){delete c.inputEventPatched,a(document).off(".inputevent")}})}var e=1,f={},g={attr:function(a,b,c){var d,e,f,g=new RegExp("^"+b,"i");if(void 0===c)c={};else for(d in c)c.hasOwnProperty(d)&&delete c[d];if(!a)return c;for(f=a.attributes,d=f.length;d--;)(e=f[d])&&e.specified&&g.test(e.name)&&(c[this.camelize(e.name.slice(b.length))]=this.deserializeValue(e.value));return c},checkAttr:function(a,b,c){return a.hasAttribute(b+c)},setAttr:function(a,b,c,d){a.setAttribute(this.dasherize(b+c),String(d))},getType:function(a){return a.getAttribute("type")||"text"},generateID:function(){return""+e++},deserializeValue:function(a){var b;try{return a?"true"==a||"false"!=a&&("null"==a?null:isNaN(b=Number(a))?/^[\[\{]/.test(a)?JSON.parse(a):a:b):a}catch(b){return a}},camelize:function(a){return a.replace(/-+(.)?/g,function(a,b){return b?b.toUpperCase():""})},dasherize:function(a){return a.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()},warn:function(){var a;window.console&&"function"==typeof window.console.warn&&(a=window.console).warn.apply(a,arguments)},warnOnce:function(a){f[a]||(f[a]=!0,this.warn.apply(this,arguments))},_resetWarnings:function(){f={}},trimString:function(a){return a.replace(/^\s+|\s+$/g,"")},parse:{date:function(a){var b=a.match(/^(\d{4,})-(\d\d)-(\d\d)$/);if(!b)return null;var c=b.map(function(a){return parseInt(a,10)}),d=_slicedToArray(c,4),e=(d[0],d[1]),f=d[2],g=d[3],h=new Date(e,f-1,g);return h.getFullYear()!==e||h.getMonth()+1!==f||h.getDate()!==g?null:h},string:function(a){return a},integer:function(a){return isNaN(a)?null:parseInt(a,10)},number:function(a){if(isNaN(a))throw null;return parseFloat(a)},boolean:function(a){return!/^\s*false\s*$/i.test(a)},object:function(a){return g.deserializeValue(a)},regexp:function(a){var b="";return/^\/.*\/(?:[gimy]*)$/.test(a)?(b=a.replace(/.*\/([gimy]*)$/,"$1"),a=a.replace(new RegExp("^/(.*?)/"+b+"$"),"$1")):a="^"+a+"$",new RegExp(a,b)}},parseRequirement:function(a,b){var c=this.parse[a||"string"];if(!c)throw'Unknown requirement specification: "'+a+'"';var d=c(b);if(null===d)throw"Requirement is not a "+a+': "'+b+'"';return d},namespaceEvents:function(b,c){return b=this.trimString(b||"").split(/\s+/),b[0]?a.map(b,function(a){return a+"."+c}).join(" "):""},difference:function(b,c){var d=[];return a.each(b,function(a,b){-1==c.indexOf(b)&&d.push(b)}),d},all:function(b){return a.when.apply(a,_toConsumableArray(b).concat([42,42]))},objectCreate:Object.create||function(){var a=function(){};return function(b){if(arguments.length>1)throw Error("Second argument not supported");if("object"!=typeof b)throw TypeError("Argument must be an object");a.prototype=b;var c=new a;return a.prototype=null,c}}(),_SubmitSelector:'input[type="submit"], button:submit'},h={namespace:"data-parsley-",inputs:"input, textarea, select",excluded:"input[type=button], input[type=submit], input[type=reset], input[type=hidden]",priorityEnabled:!0,multiple:null,group:null,uiEnabled:!0,validationThreshold:3,focus:"first",trigger:!1,triggerAfterFailure:"input",errorClass:"parsley-error",successClass:"parsley-success",classHandler:function(a){},errorsContainer:function(a){},errorsWrapper:'<ul class="parsley-errors-list"></ul>',errorTemplate:"<li></li>"},i=function(){this.__id__=g.generateID()};i.prototype={asyncSupport:!0,_pipeAccordingToValidationResult:function(){var b=this,c=function(){var c=a.Deferred();return!0!==b.validationResult&&c.reject(),c.resolve().promise()};return[c,c]},actualizeOptions:function(){return g.attr(this.element,this.options.namespace,this.domOptions),this.parent&&this.parent.actualizeOptions&&this.parent.actualizeOptions(),this},_resetOptions:function(a){this.domOptions=g.objectCreate(this.parent.options),this.options=g.objectCreate(this.domOptions);for(var b in a)a.hasOwnProperty(b)&&(this.options[b]=a[b]);this.actualizeOptions()},_listeners:null,on:function(a,b){return this._listeners=this._listeners||{},(this._listeners[a]=this._listeners[a]||[]).push(b),this},subscribe:function(b,c){a.listenTo(this,b.toLowerCase(),c)},off:function(a,b){var c=this._listeners&&this._listeners[a];if(c)if(b)for(var d=c.length;d--;)c[d]===b&&c.splice(d,1);else delete this._listeners[a];return this},unsubscribe:function(b,c){a.unsubscribeTo(this,b.toLowerCase())},trigger:function(a,b,c){b=b||this;var d,e=this._listeners&&this._listeners[a];if(e)for(var f=e.length;f--;)if(!1===(d=e[f].call(b,b,c)))return d;return!this.parent||this.parent.trigger(a,b,c)},asyncIsValid:function(a,b){return g.warnOnce("asyncIsValid is deprecated; please use whenValid instead"),this.whenValid({group:a,force:b})},_findRelated:function(){return this.options.multiple?a(this.parent.element.querySelectorAll("["+this.options.namespace+'multiple="'+this.options.multiple+'"]')):this.$element}};var j=function(a,b){var c=a.match(/^\s*\[(.*)\]\s*$/);if(!c)throw'Requirement is not an array: "'+a+'"';var d=c[1].split(",").map(g.trimString);if(d.length!==b)throw"Requirement has "+d.length+" values when "+b+" are needed";return d},k=function(a,b,c){var d=null,e={};for(var f in a)if(f){var h=c(f);"string"==typeof h&&(h=g.parseRequirement(a[f],h)),e[f]=h}else d=g.parseRequirement(a[f],b);return[d,e]},l=function(b){a.extend(!0,this,b)};l.prototype={validate:function(a,b){if(this.fn)return arguments.length>3&&(b=[].slice.call(arguments,1,-1)),this.fn(a,b);if(Array.isArray(a)){if(!this.validateMultiple)throw"Validator `"+this.name+"` does not handle multiple values";return this.validateMultiple.apply(this,arguments)}var c=arguments[arguments.length-1];if(this.validateDate&&c._isDateInput())return arguments[0]=g.parse.date(arguments[0]),null!==arguments[0]&&this.validateDate.apply(this,arguments);if(this.validateNumber)return!isNaN(a)&&(arguments[0]=parseFloat(arguments[0]),this.validateNumber.apply(this,arguments));if(this.validateString)return this.validateString.apply(this,arguments);throw"Validator `"+this.name+"` only handles multiple values"},parseRequirements:function(b,c){if("string"!=typeof b)return Array.isArray(b)?b:[b];var d=this.requirementType;if(Array.isArray(d)){for(var e=j(b,d.length),f=0;f<e.length;f++)e[f]=g.parseRequirement(d[f],e[f]);return e}return a.isPlainObject(d)?k(d,b,c):[g.parseRequirement(d,b)]},requirementType:"string",priority:2};var m=function(a,b){this.__class__="ValidatorRegistry",this.locale="en",this.init(a||{},b||{})},n={email:/^((([a-zA-Z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-zA-Z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/,number:/^-?(\d*\.)?\d+(e[-+]?\d+)?$/i,integer:/^-?\d+$/,digits:/^\d+$/,alphanum:/^\w+$/i,date:{test:function(a){return null!==g.parse.date(a)}},url:new RegExp("^(?:(?:https?|ftp)://)?(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-zA-Z\\u00a1-\\uffff0-9]-*)*[a-zA-Z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-zA-Z\\u00a1-\\uffff0-9]-*)*[a-zA-Z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-zA-Z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:/\\S*)?$")};n.range=n.number;var o=function(a){var b=(""+a).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return b?Math.max(0,(b[1]?b[1].length:0)-(b[2]?+b[2]:0)):0},p=function(a,b){return b.map(g.parse[a])},q=function(a,b){return function(c){for(var d=arguments.length,e=Array(d>1?d-1:0),f=1;f<d;f++)e[f-1]=arguments[f];return e.pop(),b.apply(void 0,[c].concat(_toConsumableArray(p(a,e))))}},r=function(a){return{validateDate:q("date",a),validateNumber:q("number",a),requirementType:a.length<=2?"string":["string","string"],priority:30}};m.prototype={init:function(a,b){this.catalog=b,this.validators=_extends({},this.validators);for(var c in a)this.addValidator(c,a[c].fn,a[c].priority);window.Parsley.trigger("parsley:validator:init")},setLocale:function(a){if(void 0===this.catalog[a])throw new Error(a+" is not available in the catalog");return this.locale=a,this},addCatalog:function(a,b,c){return"object"==typeof b&&(this.catalog[a]=b),!0===c?this.setLocale(a):this},addMessage:function(a,b,c){return void 0===this.catalog[a]&&(this.catalog[a]={}),this.catalog[a][b]=c,this},addMessages:function(a,b){for(var c in b)this.addMessage(a,c,b[c]);return this},addValidator:function(a,b,c){if(this.validators[a])g.warn('Validator "'+a+'" is already defined.');else if(h.hasOwnProperty(a))return void g.warn('"'+a+'" is a restricted keyword and is not a valid validator name.');return this._setValidator.apply(this,arguments)},hasValidator:function(a){return!!this.validators[a]},updateValidator:function(a,b,c){return this.validators[a]?this._setValidator.apply(this,arguments):(g.warn('Validator "'+a+'" is not already defined.'),this.addValidator.apply(this,arguments))},removeValidator:function(a){return this.validators[a]||g.warn('Validator "'+a+'" is not defined.'),delete this.validators[a],this},_setValidator:function(a,b,c){"object"!=typeof b&&(b={fn:b,priority:c}),b.validate||(b=new l(b)),this.validators[a]=b;for(var d in b.messages||{})this.addMessage(d,a,b.messages[d]);return this},getErrorMessage:function(a){var b;if("type"===a.name){b=(this.catalog[this.locale][a.name]||{})[a.requirements]}else b=this.formatMessage(this.catalog[this.locale][a.name],a.requirements);return b||this.catalog[this.locale].defaultMessage||this.catalog.en.defaultMessage},formatMessage:function(a,b){if("object"==typeof b){for(var c in b)a=this.formatMessage(a,b[c]);return a}return"string"==typeof a?a.replace(/%s/i,b):""},validators:{notblank:{validateString:function(a){return/\S/.test(a)},priority:2},required:{validateMultiple:function(a){return a.length>0},validateString:function(a){return/\S/.test(a)},priority:512},type:{validateString:function(a,b){var c=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],d=c.step,e=void 0===d?"any":d,f=c.base,g=void 0===f?0:f,h=n[b];if(!h)throw new Error("validator type `"+b+"` is not supported");if(!h.test(a))return!1;if("number"===b&&!/^any$/i.test(e||"")){var i=Number(a),j=Math.max(o(e),o(g));if(o(i)>j)return!1;var k=function(a){return Math.round(a*Math.pow(10,j))};if((k(i)-k(g))%k(e)!=0)return!1}return!0},requirementType:{"":"string",step:"string",base:"number"},priority:256},pattern:{validateString:function(a,b){return b.test(a)},requirementType:"regexp",priority:64},minlength:{validateString:function(a,b){return a.length>=b},requirementType:"integer",priority:30},maxlength:{validateString:function(a,b){return a.length<=b},requirementType:"integer",priority:30},length:{validateString:function(a,b,c){return a.length>=b&&a.length<=c},requirementType:["integer","integer"],priority:30},mincheck:{validateMultiple:function(a,b){return a.length>=b},requirementType:"integer",priority:30},maxcheck:{validateMultiple:function(a,b){return a.length<=b},requirementType:"integer",priority:30},check:{validateMultiple:function(a,b,c){return a.length>=b&&a.length<=c},requirementType:["integer","integer"],priority:30},min:r(function(a,b){return a>=b}),max:r(function(a,b){return a<=b}),range:r(function(a,b,c){return a>=b&&a<=c}),equalto:{validateString:function(b,c){var d=a(c);return d.length?b===d.val():b===c},priority:256}}};var s={},t=function a(b,c,d){for(var e=[],f=[],g=0;g<b.length;g++){for(var h=!1,i=0;i<c.length;i++)if(b[g].assert.name===c[i].assert.name){h=!0;break}h?f.push(b[g]):e.push(b[g])}return{kept:f,added:e,removed:d?[]:a(c,b,!0).added}};s.Form={_actualizeTriggers:function(){var a=this;this.$element.on("submit.Parsley",function(b){a.onSubmitValidate(b)}),this.$element.on("click.Parsley",g._SubmitSelector,function(b){a.onSubmitButton(b)}),!1!==this.options.uiEnabled&&this.element.setAttribute("novalidate","")},focus:function(){if(this._focusedField=null,!0===this.validationResult||"none"===this.options.focus)return null;for(var a=0;a<this.fields.length;a++){var b=this.fields[a];if(!0!==b.validationResult&&b.validationResult.length>0&&void 0===b.options.noFocus&&(this._focusedField=b.$element,"first"===this.options.focus))break}return null===this._focusedField?null:this._focusedField.focus()},_destroyUI:function(){this.$element.off(".Parsley")}},s.Field={_reflowUI:function(){if(this._buildUI(),this._ui){var a=t(this.validationResult,this._ui.lastValidationResult);this._ui.lastValidationResult=this.validationResult,this._manageStatusClass(),this._manageErrorsMessages(a),this._actualizeTriggers(),!a.kept.length&&!a.added.length||this._failedOnce||(this._failedOnce=!0,this._actualizeTriggers())}},getErrorsMessages:function(){if(!0===this.validationResult)return[];for(var a=[],b=0;b<this.validationResult.length;b++)a.push(this.validationResult[b].errorMessage||this._getErrorMessage(this.validationResult[b].assert));return a},addError:function(a){var b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],c=b.message,d=b.assert,e=b.updateClass,f=void 0===e||e;this._buildUI(),this._addError(a,{message:c,assert:d}),f&&this._errorClass()},updateError:function(a){var b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],c=b.message,d=b.assert,e=b.updateClass,f=void 0===e||e;this._buildUI(),this._updateError(a,{message:c,assert:d}),f&&this._errorClass()},removeError:function(a){var b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],c=b.updateClass,d=void 0===c||c;this._buildUI(),this._removeError(a),d&&this._manageStatusClass()},_manageStatusClass:function(){this.hasConstraints()&&this.needsValidation()&&!0===this.validationResult?this._successClass():this.validationResult.length>0?this._errorClass():this._resetClass()},_manageErrorsMessages:function(b){if(void 0===this.options.errorsMessagesDisabled){if(void 0!==this.options.errorMessage)return b.added.length||b.kept.length?(this._insertErrorWrapper(),0===this._ui.$errorsWrapper.find(".parsley-custom-error-message").length&&this._ui.$errorsWrapper.append(a(this.options.errorTemplate).addClass("parsley-custom-error-message")),this._ui.$errorsWrapper.addClass("filled").find(".parsley-custom-error-message").html(this.options.errorMessage)):this._ui.$errorsWrapper.removeClass("filled").find(".parsley-custom-error-message").remove();for(var c=0;c<b.removed.length;c++)this._removeError(b.removed[c].assert.name);for(c=0;c<b.added.length;c++)this._addError(b.added[c].assert.name,{message:b.added[c].errorMessage,assert:b.added[c].assert});for(c=0;c<b.kept.length;c++)this._updateError(b.kept[c].assert.name,{message:b.kept[c].errorMessage,assert:b.kept[c].assert})}},_addError:function(b,c){var d=c.message,e=c.assert;this._insertErrorWrapper(),this._ui.$errorClassHandler.attr("aria-describedby",this._ui.errorsWrapperId),this._ui.$errorsWrapper.addClass("filled").append(a(this.options.errorTemplate).addClass("parsley-"+b).html(d||this._getErrorMessage(e)))},_updateError:function(a,b){var c=b.message,d=b.assert;this._ui.$errorsWrapper.addClass("filled").find(".parsley-"+a).html(c||this._getErrorMessage(d))},_removeError:function(a){this._ui.$errorClassHandler.removeAttr("aria-describedby"),this._ui.$errorsWrapper.removeClass("filled").find(".parsley-"+a).remove()},_getErrorMessage:function(a){var b=a.name+"Message";return void 0!==this.options[b]?window.Parsley.formatMessage(this.options[b],a.requirements):window.Parsley.getErrorMessage(a)},_buildUI:function(){if(!this._ui&&!1!==this.options.uiEnabled){var b={};this.element.setAttribute(this.options.namespace+"id",this.__id__),b.$errorClassHandler=this._manageClassHandler(),b.errorsWrapperId="parsley-id-"+(this.options.multiple?"multiple-"+this.options.multiple:this.__id__),b.$errorsWrapper=a(this.options.errorsWrapper).attr("id",b.errorsWrapperId),b.lastValidationResult=[],b.validationInformationVisible=!1,this._ui=b}},_manageClassHandler:function(){if("string"==typeof this.options.classHandler&&a(this.options.classHandler).length)return a(this.options.classHandler);var b=this.options.classHandler;if("string"==typeof this.options.classHandler&&"function"==typeof window[this.options.classHandler]&&(b=window[this.options.classHandler]),"function"==typeof b){var c=b.call(this,this);if(void 0!==c&&c.length)return c}else{if("object"==typeof b&&b instanceof jQuery&&b.length)return b;b&&g.warn("The class handler `"+b+"` does not exist in DOM nor as a global JS function")}return this._inputHolder()},_inputHolder:function(){return this.options.multiple&&"SELECT"!==this.element.nodeName?this.$element.parent():this.$element},_insertErrorWrapper:function(){var b=this.options.errorsContainer;if(0!==this._ui.$errorsWrapper.parent().length)return this._ui.$errorsWrapper.parent();if("string"==typeof b){if(a(b).length)return a(b).append(this._ui.$errorsWrapper);"function"==typeof window[b]?b=window[b]:g.warn("The errors container `"+b+"` does not exist in DOM nor as a global JS function")}return"function"==typeof b&&(b=b.call(this,this)),"object"==typeof b&&b.length?b.append(this._ui.$errorsWrapper):this._inputHolder().after(this._ui.$errorsWrapper)},_actualizeTriggers:function(){var a,b=this,c=this._findRelated();c.off(".Parsley"),this._failedOnce?c.on(g.namespaceEvents(this.options.triggerAfterFailure,"Parsley"),function(){b._validateIfNeeded()}):(a=g.namespaceEvents(this.options.trigger,"Parsley"))&&c.on(a,function(a){b._validateIfNeeded(a)})},_validateIfNeeded:function(a){var b=this;a&&/key|input/.test(a.type)&&(!this._ui||!this._ui.validationInformationVisible)&&this.getValue().length<=this.options.validationThreshold||(this.options.debounce?(window.clearTimeout(this._debounced),this._debounced=window.setTimeout(function(){return b.validate()},this.options.debounce)):this.validate())},_resetUI:function(){this._failedOnce=!1,this._actualizeTriggers(),void 0!==this._ui&&(this._ui.$errorsWrapper.removeClass("filled").children().remove(),this._resetClass(),this._ui.lastValidationResult=[],this._ui.validationInformationVisible=!1)},_destroyUI:function(){this._resetUI(),void 0!==this._ui&&this._ui.$errorsWrapper.remove(),delete this._ui},_successClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.errorClass).addClass(this.options.successClass)},_errorClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.successClass).addClass(this.options.errorClass)},_resetClass:function(){this._ui.$errorClassHandler.removeClass(this.options.successClass).removeClass(this.options.errorClass)}};var u=function(b,c,d){this.__class__="Form",this.element=b,this.$element=a(b),this.domOptions=c,this.options=d,this.parent=window.Parsley,this.fields=[],this.validationResult=null},v={pending:null,resolved:!0,rejected:!1};u.prototype={onSubmitValidate:function(a){var b=this;if(!0!==a.parsley){var c=this._submitSource||this.$element.find(g._SubmitSelector)[0];if(this._submitSource=null,
|
3 |
+
this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!0),!c||null===c.getAttribute("formnovalidate")){window.Parsley._remoteCache={};var d=this.whenValidate({event:a});"resolved"===d.state()&&!1!==this._trigger("submit")||(a.stopImmediatePropagation(),a.preventDefault(),"pending"===d.state()&&d.done(function(){b._submit(c)}))}}},onSubmitButton:function(a){this._submitSource=a.currentTarget},_submit:function(b){if(!1!==this._trigger("submit")){if(b){var c=this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!1);0===c.length&&(c=a('<input class="parsley-synthetic-submit-button" type="hidden">').appendTo(this.$element)),c.attr({name:b.getAttribute("name"),value:b.getAttribute("value")})}this.$element.trigger(_extends(a.Event("submit"),{parsley:!0}))}},validate:function(b){if(arguments.length>=1&&!a.isPlainObject(b)){g.warnOnce("Calling validate on a parsley form without passing arguments as an object is deprecated.");var c=_slice.call(arguments);b={group:c[0],force:c[1],event:c[2]}}return v[this.whenValidate(b).state()]},whenValidate:function(){var b,c=this,d=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=d.group,f=d.force,h=d.event;this.submitEvent=h,h&&(this.submitEvent=_extends({},h,{preventDefault:function(){g.warnOnce("Using `this.submitEvent.preventDefault()` is deprecated; instead, call `this.validationResult = false`"),c.validationResult=!1}})),this.validationResult=!0,this._trigger("validate"),this._refreshFields();var i=this._withoutReactualizingFormOptions(function(){return a.map(c.fields,function(a){return a.whenValidate({force:f,group:e})})});return(b=g.all(i).done(function(){c._trigger("success")}).fail(function(){c.validationResult=!1,c.focus(),c._trigger("error")}).always(function(){c._trigger("validated")})).pipe.apply(b,_toConsumableArray(this._pipeAccordingToValidationResult()))},isValid:function(b){if(arguments.length>=1&&!a.isPlainObject(b)){g.warnOnce("Calling isValid on a parsley form without passing arguments as an object is deprecated.");var c=_slice.call(arguments);b={group:c[0],force:c[1]}}return v[this.whenValid(b).state()]},whenValid:function(){var b=this,c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],d=c.group,e=c.force;this._refreshFields();var f=this._withoutReactualizingFormOptions(function(){return a.map(b.fields,function(a){return a.whenValid({group:d,force:e})})});return g.all(f)},refresh:function(){return this._refreshFields(),this},reset:function(){for(var a=0;a<this.fields.length;a++)this.fields[a].reset();this._trigger("reset")},destroy:function(){this._destroyUI();for(var a=0;a<this.fields.length;a++)this.fields[a].destroy();this.$element.removeData("Parsley"),this._trigger("destroy")},_refreshFields:function(){return this.actualizeOptions()._bindFields()},_bindFields:function(){var b=this,c=this.fields;return this.fields=[],this.fieldsMappedById={},this._withoutReactualizingFormOptions(function(){b.$element.find(b.options.inputs).not(b.options.excluded).each(function(a,c){var d=new window.Parsley.Factory(c,{},b);if(("Field"===d.__class__||"FieldMultiple"===d.__class__)&&!0!==d.options.excluded){var e=d.__class__+"-"+d.__id__;void 0===b.fieldsMappedById[e]&&(b.fieldsMappedById[e]=d,b.fields.push(d))}}),a.each(g.difference(c,b.fields),function(a,b){b.reset()})}),this},_withoutReactualizingFormOptions:function(a){var b=this.actualizeOptions;this.actualizeOptions=function(){return this};var c=a();return this.actualizeOptions=b,c},_trigger:function(a){return this.trigger("form:"+a)}};var w=function(a,b,c,d,e){var f=window.Parsley._validatorRegistry.validators[b],g=new l(f);d=d||a.options[b+"Priority"]||g.priority,e=!0===e,_extends(this,{validator:g,name:b,requirements:c,priority:d,isDomConstraint:e}),this._parseRequirements(a.options)},x=function(a){return a[0].toUpperCase()+a.slice(1)};w.prototype={validate:function(a,b){var c;return(c=this.validator).validate.apply(c,[a].concat(_toConsumableArray(this.requirementList),[b]))},_parseRequirements:function(a){var b=this;this.requirementList=this.validator.parseRequirements(this.requirements,function(c){return a[b.name+x(c)]})}};var y=function(b,c,d,e){this.__class__="Field",this.element=b,this.$element=a(b),void 0!==e&&(this.parent=e),this.options=d,this.domOptions=c,this.constraints=[],this.constraintsByName={},this.validationResult=!0,this._bindConstraints()},z={pending:null,resolved:!0,rejected:!1};y.prototype={validate:function(b){arguments.length>=1&&!a.isPlainObject(b)&&(g.warnOnce("Calling validate on a parsley field without passing arguments as an object is deprecated."),b={options:b});var c=this.whenValidate(b);if(!c)return!0;switch(c.state()){case"pending":return null;case"resolved":return!0;case"rejected":return this.validationResult}},whenValidate:function(){var a,b=this,c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],d=c.force,e=c.group;if(this.refresh(),!e||this._isInGroup(e))return this.value=this.getValue(),this._trigger("validate"),(a=this.whenValid({force:d,value:this.value,_refreshed:!0}).always(function(){b._reflowUI()}).done(function(){b._trigger("success")}).fail(function(){b._trigger("error")}).always(function(){b._trigger("validated")})).pipe.apply(a,_toConsumableArray(this._pipeAccordingToValidationResult()))},hasConstraints:function(){return 0!==this.constraints.length},needsValidation:function(a){return void 0===a&&(a=this.getValue()),!(!a.length&&!this._isRequired()&&void 0===this.options.validateIfEmpty)},_isInGroup:function(b){return Array.isArray(this.options.group)?-1!==a.inArray(b,this.options.group):this.options.group===b},isValid:function(b){if(arguments.length>=1&&!a.isPlainObject(b)){g.warnOnce("Calling isValid on a parsley field without passing arguments as an object is deprecated.");var c=_slice.call(arguments);b={force:c[0],value:c[1]}}var d=this.whenValid(b);return!d||z[d.state()]},whenValid:function(){var b=this,c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],d=c.force,e=void 0!==d&&d,f=c.value,h=c.group;if(c._refreshed||this.refresh(),!h||this._isInGroup(h)){if(this.validationResult=!0,!this.hasConstraints())return a.when();if(void 0!==f&&null!==f||(f=this.getValue()),!this.needsValidation(f)&&!0!==e)return a.when();var i=this._getGroupedConstraints(),j=[];return a.each(i,function(c,d){var e=g.all(a.map(d,function(a){return b._validateConstraint(f,a)}));if(j.push(e),"rejected"===e.state())return!1}),g.all(j)}},_validateConstraint:function(b,c){var d=this,e=c.validate(b,this);return!1===e&&(e=a.Deferred().reject()),g.all([e]).fail(function(a){d.validationResult instanceof Array||(d.validationResult=[]),d.validationResult.push({assert:c,errorMessage:"string"==typeof a&&a})})},getValue:function(){var a;return a="function"==typeof this.options.value?this.options.value(this):void 0!==this.options.value?this.options.value:this.$element.val(),void 0===a||null===a?"":this._handleWhitespace(a)},reset:function(){return this._resetUI(),this._trigger("reset")},destroy:function(){this._destroyUI(),this.$element.removeData("Parsley"),this.$element.removeData("FieldMultiple"),this._trigger("destroy")},refresh:function(){return this._refreshConstraints(),this},_refreshConstraints:function(){return this.actualizeOptions()._bindConstraints()},refreshConstraints:function(){return g.warnOnce("Parsley's refreshConstraints is deprecated. Please use refresh"),this.refresh()},addConstraint:function(a,b,c,d){if(window.Parsley._validatorRegistry.validators[a]){var e=new w(this,a,b,c,d);"undefined"!==this.constraintsByName[e.name]&&this.removeConstraint(e.name),this.constraints.push(e),this.constraintsByName[e.name]=e}return this},removeConstraint:function(a){for(var b=0;b<this.constraints.length;b++)if(a===this.constraints[b].name){this.constraints.splice(b,1);break}return delete this.constraintsByName[a],this},updateConstraint:function(a,b,c){return this.removeConstraint(a).addConstraint(a,b,c)},_bindConstraints:function(){for(var a=[],b={},c=0;c<this.constraints.length;c++)!1===this.constraints[c].isDomConstraint&&(a.push(this.constraints[c]),b[this.constraints[c].name]=this.constraints[c]);this.constraints=a,this.constraintsByName=b;for(var d in this.options)this.addConstraint(d,this.options[d],void 0,!0);return this._bindHtml5Constraints()},_bindHtml5Constraints:function(){null!==this.element.getAttribute("required")&&this.addConstraint("required",!0,void 0,!0),null!==this.element.getAttribute("pattern")&&this.addConstraint("pattern",this.element.getAttribute("pattern"),void 0,!0);var a=this.element.getAttribute("min"),b=this.element.getAttribute("max");null!==a&&null!==b?this.addConstraint("range",[a,b],void 0,!0):null!==a?this.addConstraint("min",a,void 0,!0):null!==b&&this.addConstraint("max",b,void 0,!0),null!==this.element.getAttribute("minlength")&&null!==this.element.getAttribute("maxlength")?this.addConstraint("length",[this.element.getAttribute("minlength"),this.element.getAttribute("maxlength")],void 0,!0):null!==this.element.getAttribute("minlength")?this.addConstraint("minlength",this.element.getAttribute("minlength"),void 0,!0):null!==this.element.getAttribute("maxlength")&&this.addConstraint("maxlength",this.element.getAttribute("maxlength"),void 0,!0);var c=g.getType(this.element);return"number"===c?this.addConstraint("type",["number",{step:this.element.getAttribute("step")||"1",base:a||this.element.getAttribute("value")}],void 0,!0):/^(email|url|range|date)$/i.test(c)?this.addConstraint("type",c,void 0,!0):this},_isRequired:function(){return void 0!==this.constraintsByName.required&&!1!==this.constraintsByName.required.requirements},_trigger:function(a){return this.trigger("field:"+a)},_handleWhitespace:function(a){return!0===this.options.trimValue&&g.warnOnce('data-parsley-trim-value="true" is deprecated, please use data-parsley-whitespace="trim"'),"squish"===this.options.whitespace&&(a=a.replace(/\s{2,}/g," ")),"trim"!==this.options.whitespace&&"squish"!==this.options.whitespace&&!0!==this.options.trimValue||(a=g.trimString(a)),a},_isDateInput:function(){var a=this.constraintsByName.type;return a&&"date"===a.requirements},_getGroupedConstraints:function(){if(!1===this.options.priorityEnabled)return[this.constraints];for(var a=[],b={},c=0;c<this.constraints.length;c++){var d=this.constraints[c].priority;b[d]||a.push(b[d]=[]),b[d].push(this.constraints[c])}return a.sort(function(a,b){return b[0].priority-a[0].priority}),a}};var A=y,B=function(){this.__class__="FieldMultiple"};B.prototype={addElement:function(a){return this.$elements.push(a),this},_refreshConstraints:function(){var b;if(this.constraints=[],"SELECT"===this.element.nodeName)return this.actualizeOptions()._bindConstraints(),this;for(var c=0;c<this.$elements.length;c++)if(a("html").has(this.$elements[c]).length){b=this.$elements[c].data("FieldMultiple")._refreshConstraints().constraints;for(var d=0;d<b.length;d++)this.addConstraint(b[d].name,b[d].requirements,b[d].priority,b[d].isDomConstraint)}else this.$elements.splice(c,1);return this},getValue:function(){if("function"==typeof this.options.value)return this.options.value(this);if(void 0!==this.options.value)return this.options.value;if("INPUT"===this.element.nodeName){var b=g.getType(this.element);if("radio"===b)return this._findRelated().filter(":checked").val()||"";if("checkbox"===b){var c=[];return this._findRelated().filter(":checked").each(function(){c.push(a(this).val())}),c}}return"SELECT"===this.element.nodeName&&null===this.$element.val()?[]:this.$element.val()},_init:function(){return this.$elements=[this.$element],this}};var C=function(b,c,d){this.element=b,this.$element=a(b);var e=this.$element.data("Parsley");if(e)return void 0!==d&&e.parent===window.Parsley&&(e.parent=d,e._resetOptions(e.options)),"object"==typeof c&&_extends(e.options,c),e;if(!this.$element.length)throw new Error("You must bind Parsley on an existing element.");if(void 0!==d&&"Form"!==d.__class__)throw new Error("Parent instance must be a Form instance");return this.parent=d||window.Parsley,this.init(c)};C.prototype={init:function(a){return this.__class__="Parsley",this.__version__="2.8.1",this.__id__=g.generateID(),this._resetOptions(a),"FORM"===this.element.nodeName||g.checkAttr(this.element,this.options.namespace,"validate")&&!this.$element.is(this.options.inputs)?this.bind("parsleyForm"):this.isMultiple()?this.handleMultiple():this.bind("parsleyField")},isMultiple:function(){var a=g.getType(this.element);return"radio"===a||"checkbox"===a||"SELECT"===this.element.nodeName&&null!==this.element.getAttribute("multiple")},handleMultiple:function(){var b,c,d=this;if(this.options.multiple=this.options.multiple||(b=this.element.getAttribute("name"))||this.element.getAttribute("id"),"SELECT"===this.element.nodeName&&null!==this.element.getAttribute("multiple"))return this.options.multiple=this.options.multiple||this.__id__,this.bind("parsleyFieldMultiple");if(!this.options.multiple)return g.warn("To be bound by Parsley, a radio, a checkbox and a multiple select input must have either a name or a multiple option.",this.$element),this;this.options.multiple=this.options.multiple.replace(/(:|\.|\[|\]|\{|\}|\$)/g,""),b&&a('input[name="'+b+'"]').each(function(a,b){var c=g.getType(b);"radio"!==c&&"checkbox"!==c||b.setAttribute(d.options.namespace+"multiple",d.options.multiple)});for(var e=this._findRelated(),f=0;f<e.length;f++)if(void 0!==(c=a(e.get(f)).data("Parsley"))){this.$element.data("FieldMultiple")||c.addElement(this.$element);break}return this.bind("parsleyField",!0),c||this.bind("parsleyFieldMultiple")},bind:function(b,c){var d;switch(b){case"parsleyForm":d=a.extend(new u(this.element,this.domOptions,this.options),new i,window.ParsleyExtend)._bindFields();break;case"parsleyField":d=a.extend(new A(this.element,this.domOptions,this.options,this.parent),new i,window.ParsleyExtend);break;case"parsleyFieldMultiple":d=a.extend(new A(this.element,this.domOptions,this.options,this.parent),new B,new i,window.ParsleyExtend)._init();break;default:throw new Error(b+"is not a supported Parsley type")}return this.options.multiple&&g.setAttr(this.element,this.options.namespace,"multiple",this.options.multiple),void 0!==c?(this.$element.data("FieldMultiple",d),d):(this.$element.data("Parsley",d),d._actualizeTriggers(),d._trigger("init"),d)}};var D=a.fn.jquery.split(".");if(parseInt(D[0])<=1&&parseInt(D[1])<8)throw"The loaded version of jQuery is too old. Please upgrade to 1.8.x or better.";D.forEach||g.warn("Parsley requires ES5 to run properly. Please include https://github.com/es-shims/es5-shim");var E=_extends(new i,{element:document,$element:a(document),actualizeOptions:null,_resetOptions:null,Factory:C,version:"2.8.1"});_extends(A.prototype,s.Field,i.prototype),_extends(u.prototype,s.Form,i.prototype),_extends(C.prototype,i.prototype),a.fn.parsley=a.fn.psly=function(b){if(this.length>1){var c=[];return this.each(function(){c.push(a(this).parsley(b))}),c}if(0!=this.length)return new C(this[0],b)},void 0===window.ParsleyExtend&&(window.ParsleyExtend={}),E.options=_extends(g.objectCreate(h),window.ParsleyConfig),window.ParsleyConfig=E.options,window.Parsley=window.psly=E,E.Utils=g,window.ParsleyUtils={},a.each(g,function(a,b){"function"==typeof b&&(window.ParsleyUtils[a]=function(){return g.warnOnce("Accessing `window.ParsleyUtils` is deprecated. Use `window.Parsley.Utils` instead."),g[a].apply(g,arguments)})});var F=window.Parsley._validatorRegistry=new m(window.ParsleyConfig.validators,window.ParsleyConfig.i18n);window.ParsleyValidator={},a.each("setLocale addCatalog addMessage addMessages getErrorMessage formatMessage addValidator updateValidator removeValidator hasValidator".split(" "),function(a,b){window.Parsley[b]=function(){return F[b].apply(F,arguments)},window.ParsleyValidator[b]=function(){var a;return g.warnOnce("Accessing the method '"+b+"' through Validator is deprecated. Simply call 'window.Parsley."+b+"(...)'"),(a=window.Parsley)[b].apply(a,arguments)}}),window.Parsley.UI=s,window.ParsleyUI={removeError:function(a,b,c){var d=!0!==c;return g.warnOnce("Accessing UI is deprecated. Call 'removeError' on the instance directly. Please comment in issue 1073 as to your need to call this method."),a.removeError(b,{updateClass:d})},getErrorsMessages:function(a){return g.warnOnce("Accessing UI is deprecated. Call 'getErrorsMessages' on the instance directly."),a.getErrorsMessages()}},a.each("addError updateError".split(" "),function(a,b){window.ParsleyUI[b]=function(a,c,d,e,f){var h=!0!==f;return g.warnOnce("Accessing UI is deprecated. Call '"+b+"' on the instance directly. Please comment in issue 1073 as to your need to call this method."),a[b](c,{message:d,assert:e,updateClass:h})}}),!1!==window.ParsleyConfig.autoBind&&a(function(){a("[data-parsley-validate]").length&&a("[data-parsley-validate]").parsley()});var G=a({}),H=function(){g.warnOnce("Parsley's pubsub module is deprecated; use the 'on' and 'off' methods on parsley instances or window.Parsley")},I="parsley:";a.listen=function(a,d){var e;if(H(),"object"==typeof arguments[1]&&"function"==typeof arguments[2]&&(e=arguments[1],d=arguments[2]),"function"!=typeof d)throw new Error("Wrong parameters");window.Parsley.on(c(a),b(d,e))},a.listenTo=function(a,d,e){if(H(),!(a instanceof A||a instanceof u))throw new Error("Must give Parsley instance");if("string"!=typeof d||"function"!=typeof e)throw new Error("Wrong parameters");a.on(c(d),b(e))},a.unsubscribe=function(a,b){if(H(),"string"!=typeof a||"function"!=typeof b)throw new Error("Wrong arguments");window.Parsley.off(c(a),b.parsleyAdaptedCallback)},a.unsubscribeTo=function(a,b){if(H(),!(a instanceof A||a instanceof u))throw new Error("Must give Parsley instance");a.off(c(b))},a.unsubscribeAll=function(b){H(),window.Parsley.off(c(b)),a("form,input,textarea,select").each(function(){var d=a(this).data("Parsley");d&&d.off(c(b))})},a.emit=function(a,b){var d;H();var e=b instanceof A||b instanceof u,f=Array.prototype.slice.call(arguments,e?2:1);f.unshift(c(a)),e||(b=window.Parsley),(d=b).trigger.apply(d,_toConsumableArray(f))};return a.extend(!0,E,{asyncValidators:{default:{fn:function(a){return a.status>=200&&a.status<300},url:!1},reverse:{fn:function(a){return a.status<200||a.status>=300},url:!1}},addAsyncValidator:function(a,b,c,d){return E.asyncValidators[a]={fn:b,url:c||!1,options:d||{}},this}}),E.addValidator("remote",{requirementType:{"":"string",validator:"string",reverse:"boolean",options:"object"},validateString:function(b,c,d,e){var f,g,h={},i=d.validator||(!0===d.reverse?"reverse":"default");if(void 0===E.asyncValidators[i])throw new Error("Calling an undefined async validator: `"+i+"`");c=E.asyncValidators[i].url||c,c.indexOf("{value}")>-1?c=c.replace("{value}",encodeURIComponent(b)):h[e.element.getAttribute("name")||e.element.getAttribute("id")]=b;var j=a.extend(!0,d.options||{},E.asyncValidators[i].options);f=a.extend(!0,{},{url:c,data:h,type:"GET"},j),e.trigger("field:ajaxoptions",e,f),g=a.param(f),void 0===E._remoteCache&&(E._remoteCache={});var k=E._remoteCache[g]=E._remoteCache[g]||a.ajax(f),l=function(){var b=E.asyncValidators[i].fn.call(e,k,c,d);return b||(b=a.Deferred().reject()),a.when(b)};return k.then(l,l)},priority:-1}),E.on("form:submit",function(){E._remoteCache={}}),i.prototype.addAsyncValidator=function(){return g.warnOnce("Accessing the method `addAsyncValidator` through an instance is deprecated. Simply call `Parsley.addAsyncValidator(...)`"),E.addAsyncValidator.apply(E,arguments)},E.addMessages("en",{defaultMessage:"This value seems to be invalid.",type:{email:"This value should be a valid email.",url:"This value should be a valid url.",number:"This value should be a valid number.",integer:"This value should be a valid integer.",digits:"This value should be digits.",alphanum:"This value should be alphanumeric."},notblank:"This value should not be blank.",required:"This value is required.",pattern:"This value seems to be invalid.",min:"This value should be greater than or equal to %s.",max:"This value should be lower than or equal to %s.",range:"This value should be between %s and %s.",minlength:"This value is too short. It should have %s characters or more.",maxlength:"This value is too long. It should have %s characters or fewer.",length:"This value length is invalid. It should be between %s and %s characters long.",mincheck:"You must select at least %s choices.",maxcheck:"You must select %s choices or fewer.",check:"You must select between %s and %s choices.",equalto:"This value should be the same."}),E.setLocale("en"),(new d).install(),E}),jQuery(function(a){window.Parsley.on("field:error",function(){this.$element.attr("aria-describedby",this._ui.errorsWrapperId).attr("aria-invalid","true"),this._ui.$errorsWrapper.attr("aria-live","polite")}),window.Parsley.on("field:success",function(){this.$element.attr("aria-invalid")&&this.$element.removeAttr("aria-invalid")})});
|
assets/build/js/remodal.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(c){return b(a,c)}):"object"==typeof exports?b(a,require("jquery")):b(a,a.jQuery||a.Zepto)}(this,function(a,b){"use strict";function c(a){if(w&&"none"===a.css("animation-name")&&"none"===a.css("-webkit-animation-name")&&"none"===a.css("-moz-animation-name")&&"none"===a.css("-o-animation-name")&&"none"===a.css("-ms-animation-name"))return 0;var b,c,d,e,f=a.css("animation-duration")||a.css("-webkit-animation-duration")||a.css("-moz-animation-duration")||a.css("-o-animation-duration")||a.css("-ms-animation-duration")||"0s",g=a.css("animation-delay")||a.css("-webkit-animation-delay")||a.css("-moz-animation-delay")||a.css("-o-animation-delay")||a.css("-ms-animation-delay")||"0s",h=a.css("animation-iteration-count")||a.css("-webkit-animation-iteration-count")||a.css("-moz-animation-iteration-count")||a.css("-o-animation-iteration-count")||a.css("-ms-animation-iteration-count")||"1";for(f=f.split(", "),g=g.split(", "),h=h.split(", "),e=0,c=f.length,b=Number.NEGATIVE_INFINITY;e<c;e++)(d=parseFloat(f[e])*parseInt(h[e],10)+parseFloat(g[e]))>b&&(b=d);return b}function d(){if(b(document.body).height()<=b(window).height())return 0;var a,c,d=document.createElement("div"),e=document.createElement("div");return d.style.visibility="hidden",d.style.width="100px",document.body.appendChild(d),a=d.offsetWidth,d.style.overflow="scroll",e.style.width="100%",d.appendChild(e),c=e.offsetWidth,d.parentNode.removeChild(d),a-c}function e(){if(!x){var a,c,e=b("html"),f=k("is-locked");e.hasClass(f)||(c=b(document.body),a=parseInt(c.css("padding-right"),10)+d(),c.css("padding-right",a+"px"),e.addClass(f))}}function f(){if(!x){var a,c,e=b("html"),f=k("is-locked");e.hasClass(f)&&(c=b(document.body),a=parseInt(c.css("padding-right"),10)-d(),c.css("padding-right",a+"px"),e.removeClass(f))}}function g(a,b,c,d){var e=k("is",b),f=[k("is",u.CLOSING),k("is",u.OPENING),k("is",u.CLOSED),k("is",u.OPENED)].join(" ");a.$bg.removeClass(f).addClass(e),a.$overlay.removeClass(f).addClass(e),a.$wrapper.removeClass(f).addClass(e),a.$modal.removeClass(f).addClass(e),a.state=b,!c&&a.$modal.trigger({type:b,reason:d},[{reason:d}])}function h(a,d,e){var f=0,g=function(a){a.target===this&&f++},h=function(a){a.target===this&&0==--f&&(b.each(["$bg","$overlay","$wrapper","$modal"],function(a,b){e[b].off(r+" "+s)}),d())};b.each(["$bg","$overlay","$wrapper","$modal"],function(a,b){e[b].on(r,g).on(s,h)}),a(),0===c(e.$bg)&&0===c(e.$overlay)&&0===c(e.$wrapper)&&0===c(e.$modal)&&(b.each(["$bg","$overlay","$wrapper","$modal"],function(a,b){e[b].off(r+" "+s)}),d())}function i(a){a.state!==u.CLOSED&&(b.each(["$bg","$overlay","$wrapper","$modal"],function(b,c){a[c].off(r+" "+s)}),a.$bg.removeClass(a.settings.modifier),a.$overlay.removeClass(a.settings.modifier).hide(),a.$wrapper.hide(),f(),g(a,u.CLOSED,!0))}function j(a){var b,c,d,e,f={};for(a=a.replace(/\s*:\s*/g,":").replace(/\s*,\s*/g,","),b=a.split(","),e=0,c=b.length;e<c;e++)b[e]=b[e].split(":"),d=b[e][1],("string"==typeof d||d instanceof String)&&(d="true"===d||"false"!==d&&d),("string"==typeof d||d instanceof String)&&(d=isNaN(d)?d:+d),f[b[e][0]]=d;return f}function k(){for(var a=q,b=0;b<arguments.length;++b)a+="-"+arguments[b];return a}function l(){var a,c,d=location.hash.replace("#","");if(d){try{c=b("[data-"+p+'-id="'+d+'"]')}catch(a){}c&&c.length&&(a=b[p].lookup[c.data(p)])&&a.settings.hashTracking&&a.open()}else n&&n.state===u.OPENED&&n.settings.hashTracking&&n.close()}function m(a,c){var d=b(document.body),e=d,f=this;f.settings=b.extend({},t,c),f.index=b[p].lookup.push(f)-1,f.state=u.CLOSED,f.$overlay=b("."+k("overlay")),null!==f.settings.appendTo&&f.settings.appendTo.length&&(e=b(f.settings.appendTo)),f.$overlay.length||(f.$overlay=b("<div>").addClass(k("overlay")+" "+k("is",u.CLOSED)).hide(),e.append(f.$overlay)),f.$bg=b("."+k("bg")).addClass(k("is",u.CLOSED)),f.$modal=a.addClass(q+" "+k("is-initialized")+" "+f.settings.modifier+" "+k("is",u.CLOSED)).attr("tabindex","-1"),f.$wrapper=b("<div>").addClass(k("wrapper")+" "+f.settings.modifier+" "+k("is",u.CLOSED)).hide().append(f.$modal),e.append(f.$wrapper),f.$wrapper.on("click."+q,"[data-"+p+'-action="close"]',function(a){a.preventDefault(),f.close()}),f.$wrapper.on("click."+q,"[data-"+p+'-action="cancel"]',function(a){a.preventDefault(),f.$modal.trigger(v.CANCELLATION),f.settings.closeOnCancel&&f.close(v.CANCELLATION)}),f.$wrapper.on("click."+q,"[data-"+p+'-action="confirm"]',function(a){a.preventDefault(),f.$modal.trigger(v.CONFIRMATION),f.settings.closeOnConfirm&&f.close(v.CONFIRMATION)}),f.$wrapper.on("click."+q,function(a){b(a.target).hasClass(k("wrapper"))&&f.settings.closeOnOutsideClick&&f.close()})}var n,o,p="remodal",q=a.REMODAL_GLOBALS&&a.REMODAL_GLOBALS.NAMESPACE||p,r=b.map(["animationstart","webkitAnimationStart","MSAnimationStart","oAnimationStart"],function(a){return a+"."+q}).join(" "),s=b.map(["animationend","webkitAnimationEnd","MSAnimationEnd","oAnimationEnd"],function(a){return a+"."+q}).join(" "),t=b.extend({hashTracking:!0,closeOnConfirm:!0,closeOnCancel:!0,closeOnEscape:!0,closeOnOutsideClick:!0,modifier:"",appendTo:null},a.REMODAL_GLOBALS&&a.REMODAL_GLOBALS.DEFAULTS),u={CLOSING:"closing",CLOSED:"closed",OPENING:"opening",OPENED:"opened"},v={CONFIRMATION:"confirmation",CANCELLATION:"cancellation"},w=function(){var a=document.createElement("div").style;return void 0!==a.animationName||void 0!==a.WebkitAnimationName||void 0!==a.MozAnimationName||void 0!==a.msAnimationName||void 0!==a.OAnimationName}(),x=/iPad|iPhone|iPod/.test(navigator.platform);m.prototype.open=function(){var a,c=this;c.state!==u.OPENING&&c.state!==u.CLOSING&&(a=c.$modal.attr("data-"+p+"-id"),a&&c.settings.hashTracking&&(o=b(window).scrollTop(),location.hash=a),n&&n!==c&&i(n),n=c,e(),c.$bg.addClass(c.settings.modifier),c.$overlay.addClass(c.settings.modifier).show(),c.$wrapper.show().scrollTop(0),c.$modal.focus(),h(function(){g(c,u.OPENING)},function(){g(c,u.OPENED)},c))},m.prototype.close=function(a){var c=this;c.state!==u.OPENING&&c.state!==u.CLOSING&&(c.settings.hashTracking&&c.$modal.attr("data-"+p+"-id")===location.hash.substr(1)&&(location.hash="",b(window).scrollTop(o)),h(function(){g(c,u.CLOSING,!1,a)},function(){c.$bg.removeClass(c.settings.modifier),c.$overlay.removeClass(c.settings.modifier).hide(),c.$wrapper.hide(),f(),g(c,u.CLOSED,!1,a)},c))},m.prototype.getState=function(){return this.state},m.prototype.destroy=function(){var a,c=b[p].lookup;i(this),this.$wrapper.remove(),delete c[this.index],0===(a=b.grep(c,function(a){return!!a}).length)&&(this.$overlay.remove(),this.$bg.removeClass(k("is",u.CLOSING)+" "+k("is",u.OPENING)+" "+k("is",u.CLOSED)+" "+k("is",u.OPENED)))},b[p]={lookup:[]},b.fn[p]=function(a){var c,d;return this.each(function(e,f){d=b(f),null==d.data(p)?(c=new m(d,a),d.data(p,c.index),c.settings.hashTracking&&d.attr("data-"+p+"-id")===location.hash.substr(1)&&c.open()):c=b[p].lookup[d.data(p)]}),c},b(document).ready(function(){b(document).on("click","[data-"+p+"-target]",function(a){a.preventDefault();var c=a.currentTarget,d=c.getAttribute("data-"+p+"-target"),e=b("[data-"+p+'-id="'+d+'"]');b[p].lookup[e.data(p)].open()}),b(document).find("."+q).each(function(a,c){var d=b(c),e=d.data(p+"-options");e?("string"==typeof e||e instanceof String)&&(e=j(e)):e={},d[p](e)}),b(document).on("keydown."+q,function(a){n&&n.settings.closeOnEscape&&n.state===u.OPENED&&27===a.keyCode&&n.close()}),b(window).on("hashchange."+q,l)})}),function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(c){return b(a,c)}):"object"==typeof exports?b(a,require("jquery")):b(a,a.jQuery||a.Zepto)}(this,function(a,b){"use strict";function c(a){if(w&&"none"===a.css("animation-name")&&"none"===a.css("-webkit-animation-name")&&"none"===a.css("-moz-animation-name")&&"none"===a.css("-o-animation-name")&&"none"===a.css("-ms-animation-name"))return 0;var b,c,d,e,f=a.css("animation-duration")||a.css("-webkit-animation-duration")||a.css("-moz-animation-duration")||a.css("-o-animation-duration")||a.css("-ms-animation-duration")||"0s",g=a.css("animation-delay")||a.css("-webkit-animation-delay")||a.css("-moz-animation-delay")||a.css("-o-animation-delay")||a.css("-ms-animation-delay")||"0s",h=a.css("animation-iteration-count")||a.css("-webkit-animation-iteration-count")||a.css("-moz-animation-iteration-count")||a.css("-o-animation-iteration-count")||a.css("-ms-animation-iteration-count")||"1";for(f=f.split(", "),g=g.split(", "),h=h.split(", "),e=0,c=f.length,b=Number.NEGATIVE_INFINITY;c>e;e++)(d=parseFloat(f[e])*parseInt(h[e],10)+parseFloat(g[e]))>b&&(b=d);return b}function d(){if(b(document.body).height()<=b(window).height())return 0;var a,c,d=document.createElement("div"),e=document.createElement("div");return d.style.visibility="hidden",d.style.width="100px",document.body.appendChild(d),a=d.offsetWidth,d.style.overflow="scroll",e.style.width="100%",d.appendChild(e),c=e.offsetWidth,d.parentNode.removeChild(d),a-c}function e(){if(!x){var a,c,e=b("html"),f=k("is-locked");e.hasClass(f)||(c=b(document.body),a=parseInt(c.css("padding-right"),10)+d(),c.css("padding-right",a+"px"),e.addClass(f))}}function f(){if(!x){var a,c,e=b("html"),f=k("is-locked");e.hasClass(f)&&(c=b(document.body),a=parseInt(c.css("padding-right"),10)-d(),c.css("padding-right",a+"px"),e.removeClass(f))}}function g(a,b,c,d){var e=k("is",b),f=[k("is",u.CLOSING),k("is",u.OPENING),k("is",u.CLOSED),k("is",u.OPENED)].join(" ");a.$bg.removeClass(f).addClass(e),a.$overlay.removeClass(f).addClass(e),a.$wrapper.removeClass(f).addClass(e),a.$modal.removeClass(f).addClass(e),a.state=b,!c&&a.$modal.trigger({type:b,reason:d},[{reason:d}])}function h(a,d,e){var f=0,g=function(a){a.target===this&&f++},h=function(a){a.target===this&&0==--f&&(b.each(["$bg","$overlay","$wrapper","$modal"],function(a,b){e[b].off(r+" "+s)}),d())};b.each(["$bg","$overlay","$wrapper","$modal"],function(a,b){e[b].on(r,g).on(s,h)}),a(),0===c(e.$bg)&&0===c(e.$overlay)&&0===c(e.$wrapper)&&0===c(e.$modal)&&(b.each(["$bg","$overlay","$wrapper","$modal"],function(a,b){e[b].off(r+" "+s)}),d())}function i(a){a.state!==u.CLOSED&&(b.each(["$bg","$overlay","$wrapper","$modal"],function(b,c){a[c].off(r+" "+s)}),a.$bg.removeClass(a.settings.modifier),a.$overlay.removeClass(a.settings.modifier).hide(),a.$wrapper.hide(),f(),g(a,u.CLOSED,!0))}function j(a){var b,c,d,e,f={};for(a=a.replace(/\s*:\s*/g,":").replace(/\s*,\s*/g,","),b=a.split(","),e=0,c=b.length;c>e;e++)b[e]=b[e].split(":"),d=b[e][1],("string"==typeof d||d instanceof String)&&(d="true"===d||"false"!==d&&d),("string"==typeof d||d instanceof String)&&(d=isNaN(d)?d:+d),f[b[e][0]]=d;return f}function k(){for(var a=q,b=0;b<arguments.length;++b)a+="-"+arguments[b];return a}function l(){var a,c,d=location.hash.replace("#","");if(d){try{c=b("[data-"+p+'-id="'+d+'"]')}catch(a){}c&&c.length&&(a=b[p].lookup[c.data(p)])&&a.settings.hashTracking&&a.open()}else n&&n.state===u.OPENED&&n.settings.hashTracking&&n.close()}function m(a,c){var d=b(document.body),e=this;e.settings=b.extend({},t,c),e.index=b[p].lookup.push(e)-1,e.state=u.CLOSED,e.$overlay=b("."+k("overlay")),e.$overlay.length||(e.$overlay=b("<div>").addClass(k("overlay")+" "+k("is",u.CLOSED)).hide(),d.append(e.$overlay)),e.$bg=b("."+k("bg")).addClass(k("is",u.CLOSED)),e.$modal=a.addClass(q+" "+k("is-initialized")+" "+e.settings.modifier+" "+k("is",u.CLOSED)).attr("tabindex","-1"),e.$wrapper=b("<div>").addClass(k("wrapper")+" "+e.settings.modifier+" "+k("is",u.CLOSED)).hide().append(e.$modal),d.append(e.$wrapper),e.$wrapper.on("click."+q,"[data-"+p+'-action="close"]',function(a){a.preventDefault(),e.close()}),e.$wrapper.on("click."+q,"[data-"+p+'-action="cancel"]',function(a){a.preventDefault(),e.$modal.trigger(v.CANCELLATION),e.settings.closeOnCancel&&e.close(v.CANCELLATION)}),e.$wrapper.on("click."+q,"[data-"+p+'-action="confirm"]',function(a){a.preventDefault(),e.$modal.trigger(v.CONFIRMATION),e.settings.closeOnConfirm&&e.close(v.CONFIRMATION)}),e.$wrapper.on("click."+q,function(a){b(a.target).hasClass(k("wrapper"))&&e.settings.closeOnOutsideClick&&e.close()})}var n,o,p="remodal",q=a.REMODAL_GLOBALS&&a.REMODAL_GLOBALS.NAMESPACE||p,r=b.map(["animationstart","webkitAnimationStart","MSAnimationStart","oAnimationStart"],function(a){return a+"."+q}).join(" "),s=b.map(["animationend","webkitAnimationEnd","MSAnimationEnd","oAnimationEnd"],function(a){return a+"."+q}).join(" "),t=b.extend({hashTracking:!0,closeOnConfirm:!0,closeOnCancel:!0,closeOnEscape:!0,closeOnOutsideClick:!0,modifier:""},a.REMODAL_GLOBALS&&a.REMODAL_GLOBALS.DEFAULTS),u={CLOSING:"closing",CLOSED:"closed",OPENING:"opening",OPENED:"opened"},v={CONFIRMATION:"confirmation",CANCELLATION:"cancellation"},w=function(){var a=document.createElement("div").style;return void 0!==a.animationName||void 0!==a.WebkitAnimationName||void 0!==a.MozAnimationName||void 0!==a.msAnimationName||void 0!==a.OAnimationName}(),x=/iPad|iPhone|iPod/.test(navigator.platform);m.prototype.open=function(){var a,c=this;c.state!==u.OPENING&&c.state!==u.CLOSING&&(a=c.$modal.attr("data-"+p+"-id"),a&&c.settings.hashTracking&&(o=b(window).scrollTop(),location.hash=a),n&&n!==c&&i(n),n=c,e(),c.$bg.addClass(c.settings.modifier),c.$overlay.addClass(c.settings.modifier).show(),c.$wrapper.show().scrollTop(0),c.$modal.focus(),h(function(){g(c,u.OPENING)},function(){g(c,u.OPENED)},c))},m.prototype.close=function(a){var c=this;c.state!==u.OPENING&&c.state!==u.CLOSING&&(c.settings.hashTracking&&c.$modal.attr("data-"+p+"-id")===location.hash.substr(1)&&(location.hash="",b(window).scrollTop(o)),h(function(){g(c,u.CLOSING,!1,a)},function(){c.$bg.removeClass(c.settings.modifier),c.$overlay.removeClass(c.settings.modifier).hide(),c.$wrapper.hide(),f(),g(c,u.CLOSED,!1,a)},c))},m.prototype.getState=function(){return this.state},m.prototype.destroy=function(){var a=b[p].lookup;i(this),this.$wrapper.remove(),delete a[this.index],0===b.grep(a,function(a){return!!a}).length&&(this.$overlay.remove(),this.$bg.removeClass(k("is",u.CLOSING)+" "+k("is",u.OPENING)+" "+k("is",u.CLOSED)+" "+k("is",u.OPENED)))},b[p]={lookup:[]},b.fn[p]=function(a){var c,d;return this.each(function(e,f){d=b(f),null==d.data(p)?(c=new m(d,a),d.data(p,c.index),c.settings.hashTracking&&d.attr("data-"+p+"-id")===location.hash.substr(1)&&c.open()):c=b[p].lookup[d.data(p)]}),c},b(document).ready(function(){b(document).on("click","[data-"+p+"-target]",function(a){a.preventDefault();var c=a.currentTarget,d=c.getAttribute("data-"+p+"-target"),e=b("[data-"+p+'-id="'+d+'"]');b[p].lookup[e.data(p)].open()}),b(document).find("."+q).each(function(a,c){var d=b(c),e=d.data(p+"-options");e?("string"==typeof e||e instanceof String)&&(e=j(e)):e={},d[p](e)}),b(document).on("keydown."+q,function(a){n&&n.settings.closeOnEscape&&n.state===u.OPENED&&27===a.keyCode&&n.close()}),b(window).on("hashchange."+q,l)})});
|
1 |
+
!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(c){return b(a,c)}):"object"==typeof exports?b(a,require("jquery")):b(a,a.jQuery||a.Zepto)}(this,function(a,b){"use strict";function c(a){if(w&&"none"===a.css("animation-name")&&"none"===a.css("-webkit-animation-name")&&"none"===a.css("-moz-animation-name")&&"none"===a.css("-o-animation-name")&&"none"===a.css("-ms-animation-name"))return 0;var b,c,d,e,f=a.css("animation-duration")||a.css("-webkit-animation-duration")||a.css("-moz-animation-duration")||a.css("-o-animation-duration")||a.css("-ms-animation-duration")||"0s",g=a.css("animation-delay")||a.css("-webkit-animation-delay")||a.css("-moz-animation-delay")||a.css("-o-animation-delay")||a.css("-ms-animation-delay")||"0s",h=a.css("animation-iteration-count")||a.css("-webkit-animation-iteration-count")||a.css("-moz-animation-iteration-count")||a.css("-o-animation-iteration-count")||a.css("-ms-animation-iteration-count")||"1";for(f=f.split(", "),g=g.split(", "),h=h.split(", "),e=0,c=f.length,b=Number.NEGATIVE_INFINITY;e<c;e++)(d=parseFloat(f[e])*parseInt(h[e],10)+parseFloat(g[e]))>b&&(b=d);return b}function d(){if(b(document.body).height()<=b(window).height())return 0;var a,c,d=document.createElement("div"),e=document.createElement("div");return d.style.visibility="hidden",d.style.width="100px",document.body.appendChild(d),a=d.offsetWidth,d.style.overflow="scroll",e.style.width="100%",d.appendChild(e),c=e.offsetWidth,d.parentNode.removeChild(d),a-c}function e(){if(!x){var a,c,e=b("html"),f=k("is-locked");e.hasClass(f)||(c=b(document.body),a=parseInt(c.css("padding-right"),10)+d(),c.css("padding-right",a+"px"),e.addClass(f))}}function f(){if(!x){var a,c,e=b("html"),f=k("is-locked");e.hasClass(f)&&(c=b(document.body),a=parseInt(c.css("padding-right"),10)-d(),c.css("padding-right",a+"px"),e.removeClass(f))}}function g(a,b,c,d){var e=k("is",b),f=[k("is",u.CLOSING),k("is",u.OPENING),k("is",u.CLOSED),k("is",u.OPENED)].join(" ");a.$bg.removeClass(f).addClass(e),a.$overlay.removeClass(f).addClass(e),a.$wrapper.removeClass(f).addClass(e),a.$modal.removeClass(f).addClass(e),a.state=b,!c&&a.$modal.trigger({type:b,reason:d},[{reason:d}])}function h(a,d,e){var f=0,g=function(a){a.target===this&&f++},h=function(a){a.target===this&&0==--f&&(b.each(["$bg","$overlay","$wrapper","$modal"],function(a,b){e[b].off(r+" "+s)}),d())};b.each(["$bg","$overlay","$wrapper","$modal"],function(a,b){e[b].on(r,g).on(s,h)}),a(),0===c(e.$bg)&&0===c(e.$overlay)&&0===c(e.$wrapper)&&0===c(e.$modal)&&(b.each(["$bg","$overlay","$wrapper","$modal"],function(a,b){e[b].off(r+" "+s)}),d())}function i(a){a.state!==u.CLOSED&&(b.each(["$bg","$overlay","$wrapper","$modal"],function(b,c){a[c].off(r+" "+s)}),a.$bg.removeClass(a.settings.modifier),a.$overlay.removeClass(a.settings.modifier).hide(),a.$wrapper.hide(),f(),g(a,u.CLOSED,!0))}function j(a){var b,c,d,e,f={};for(a=a.replace(/\s*:\s*/g,":").replace(/\s*,\s*/g,","),b=a.split(","),e=0,c=b.length;e<c;e++)b[e]=b[e].split(":"),d=b[e][1],("string"==typeof d||d instanceof String)&&(d="true"===d||"false"!==d&&d),("string"==typeof d||d instanceof String)&&(d=isNaN(d)?d:+d),f[b[e][0]]=d;return f}function k(){for(var a=q,b=0;b<arguments.length;++b)a+="-"+arguments[b];return a}function l(){var a,c,d=location.hash.replace("#","");if(d){try{c=b("[data-"+p+'-id="'+d+'"]')}catch(a){}c&&c.length&&(a=b[p].lookup[c.data(p)])&&a.settings.hashTracking&&a.open()}else n&&n.state===u.OPENED&&n.settings.hashTracking&&n.close()}function m(a,c){var d=b(document.body),e=d,f=this;f.settings=b.extend({},t,c),f.index=b[p].lookup.push(f)-1,f.state=u.CLOSED,f.$overlay=b("."+k("overlay")),null!==f.settings.appendTo&&f.settings.appendTo.length&&(e=b(f.settings.appendTo)),f.$overlay.length||(f.$overlay=b("<div>").addClass(k("overlay")+" "+k("is",u.CLOSED)).hide(),e.append(f.$overlay)),f.$bg=b("."+k("bg")).addClass(k("is",u.CLOSED)),f.$modal=a.addClass(q+" "+k("is-initialized")+" "+f.settings.modifier+" "+k("is",u.CLOSED)).attr("tabindex","-1"),f.$wrapper=b("<div>").addClass(k("wrapper")+" "+f.settings.modifier+" "+k("is",u.CLOSED)).hide().append(f.$modal),e.append(f.$wrapper),f.$wrapper.on("click."+q,"[data-"+p+'-action="close"]',function(a){a.preventDefault(),f.close()}),f.$wrapper.on("click."+q,"[data-"+p+'-action="cancel"]',function(a){a.preventDefault(),f.$modal.trigger(v.CANCELLATION),f.settings.closeOnCancel&&f.close(v.CANCELLATION)}),f.$wrapper.on("click."+q,"[data-"+p+'-action="confirm"]',function(a){a.preventDefault(),f.$modal.trigger(v.CONFIRMATION),f.settings.closeOnConfirm&&f.close(v.CONFIRMATION)}),f.$wrapper.on("click."+q,function(a){b(a.target).hasClass(k("wrapper"))&&f.settings.closeOnOutsideClick&&f.close()})}var n,o,p="remodal",q=a.REMODAL_GLOBALS&&a.REMODAL_GLOBALS.NAMESPACE||p,r=b.map(["animationstart","webkitAnimationStart","MSAnimationStart","oAnimationStart"],function(a){return a+"."+q}).join(" "),s=b.map(["animationend","webkitAnimationEnd","MSAnimationEnd","oAnimationEnd"],function(a){return a+"."+q}).join(" "),t=b.extend({hashTracking:!0,closeOnConfirm:!0,closeOnCancel:!0,closeOnEscape:!0,closeOnOutsideClick:!0,modifier:"",appendTo:null},a.REMODAL_GLOBALS&&a.REMODAL_GLOBALS.DEFAULTS),u={CLOSING:"closing",CLOSED:"closed",OPENING:"opening",OPENED:"opened"},v={CONFIRMATION:"confirmation",CANCELLATION:"cancellation"},w=function(){var a=document.createElement("div").style;return void 0!==a.animationName||void 0!==a.WebkitAnimationName||void 0!==a.MozAnimationName||void 0!==a.msAnimationName||void 0!==a.OAnimationName}(),x=/iPad|iPhone|iPod/.test(navigator.platform);m.prototype.open=function(){var a,c=this;c.state!==u.OPENING&&c.state!==u.CLOSING&&(a=c.$modal.attr("data-"+p+"-id"),a&&c.settings.hashTracking&&(o=b(window).scrollTop(),location.hash=a),n&&n!==c&&i(n),n=c,e(),c.$bg.addClass(c.settings.modifier),c.$overlay.addClass(c.settings.modifier).show(),c.$wrapper.show().scrollTop(0),c.$modal.focus(),h(function(){g(c,u.OPENING)},function(){g(c,u.OPENED)},c))},m.prototype.close=function(a){var c=this;c.state!==u.OPENING&&c.state!==u.CLOSING&&(c.settings.hashTracking&&c.$modal.attr("data-"+p+"-id")===location.hash.substr(1)&&(location.hash="",b(window).scrollTop(o)),h(function(){g(c,u.CLOSING,!1,a)},function(){c.$bg.removeClass(c.settings.modifier),c.$overlay.removeClass(c.settings.modifier).hide(),c.$wrapper.hide(),f(),g(c,u.CLOSED,!1,a)},c))},m.prototype.getState=function(){return this.state},m.prototype.destroy=function(){var a,c=b[p].lookup;i(this),this.$wrapper.remove(),delete c[this.index],0===(a=b.grep(c,function(a){return!!a}).length)&&(this.$overlay.remove(),this.$bg.removeClass(k("is",u.CLOSING)+" "+k("is",u.OPENING)+" "+k("is",u.CLOSED)+" "+k("is",u.OPENED)))},b[p]={lookup:[]},b.fn[p]=function(a){var c,d;return this.each(function(e,f){d=b(f),null==d.data(p)?(c=new m(d,a),d.data(p,c.index),c.settings.hashTracking&&d.attr("data-"+p+"-id")===location.hash.substr(1)&&c.open()):c=b[p].lookup[d.data(p)]}),c},jQuery(function(){b(document).on("click","[data-"+p+"-target]",function(a){a.preventDefault();var c=a.currentTarget,d=c.getAttribute("data-"+p+"-target"),e=b("[data-"+p+'-id="'+d+'"]');b[p].lookup[e.data(p)].open()}),b(document).find("."+q).each(function(a,c){var d=b(c),e=d.data(p+"-options");e?("string"==typeof e||e instanceof String)&&(e=j(e)):e={},d[p](e)}),b(document).on("keydown."+q,function(a){n&&n.settings.closeOnEscape&&n.state===u.OPENED&&27===a.keyCode&&n.close()}),b(window).on("hashchange."+q,l)})}),function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(c){return b(a,c)}):"object"==typeof exports?b(a,require("jquery")):b(a,a.jQuery||a.Zepto)}(this,function(a,b){"use strict";function c(a){if(w&&"none"===a.css("animation-name")&&"none"===a.css("-webkit-animation-name")&&"none"===a.css("-moz-animation-name")&&"none"===a.css("-o-animation-name")&&"none"===a.css("-ms-animation-name"))return 0;var b,c,d,e,f=a.css("animation-duration")||a.css("-webkit-animation-duration")||a.css("-moz-animation-duration")||a.css("-o-animation-duration")||a.css("-ms-animation-duration")||"0s",g=a.css("animation-delay")||a.css("-webkit-animation-delay")||a.css("-moz-animation-delay")||a.css("-o-animation-delay")||a.css("-ms-animation-delay")||"0s",h=a.css("animation-iteration-count")||a.css("-webkit-animation-iteration-count")||a.css("-moz-animation-iteration-count")||a.css("-o-animation-iteration-count")||a.css("-ms-animation-iteration-count")||"1";for(f=f.split(", "),g=g.split(", "),h=h.split(", "),e=0,c=f.length,b=Number.NEGATIVE_INFINITY;c>e;e++)(d=parseFloat(f[e])*parseInt(h[e],10)+parseFloat(g[e]))>b&&(b=d);return b}function d(){if(b(document.body).height()<=b(window).height())return 0;var a,c,d=document.createElement("div"),e=document.createElement("div");return d.style.visibility="hidden",d.style.width="100px",document.body.appendChild(d),a=d.offsetWidth,d.style.overflow="scroll",e.style.width="100%",d.appendChild(e),c=e.offsetWidth,d.parentNode.removeChild(d),a-c}function e(){if(!x){var a,c,e=b("html"),f=k("is-locked");e.hasClass(f)||(c=b(document.body),a=parseInt(c.css("padding-right"),10)+d(),c.css("padding-right",a+"px"),e.addClass(f))}}function f(){if(!x){var a,c,e=b("html"),f=k("is-locked");e.hasClass(f)&&(c=b(document.body),a=parseInt(c.css("padding-right"),10)-d(),c.css("padding-right",a+"px"),e.removeClass(f))}}function g(a,b,c,d){var e=k("is",b),f=[k("is",u.CLOSING),k("is",u.OPENING),k("is",u.CLOSED),k("is",u.OPENED)].join(" ");a.$bg.removeClass(f).addClass(e),a.$overlay.removeClass(f).addClass(e),a.$wrapper.removeClass(f).addClass(e),a.$modal.removeClass(f).addClass(e),a.state=b,!c&&a.$modal.trigger({type:b,reason:d},[{reason:d}])}function h(a,d,e){var f=0,g=function(a){a.target===this&&f++},h=function(a){a.target===this&&0==--f&&(b.each(["$bg","$overlay","$wrapper","$modal"],function(a,b){e[b].off(r+" "+s)}),d())};b.each(["$bg","$overlay","$wrapper","$modal"],function(a,b){e[b].on(r,g).on(s,h)}),a(),0===c(e.$bg)&&0===c(e.$overlay)&&0===c(e.$wrapper)&&0===c(e.$modal)&&(b.each(["$bg","$overlay","$wrapper","$modal"],function(a,b){e[b].off(r+" "+s)}),d())}function i(a){a.state!==u.CLOSED&&(b.each(["$bg","$overlay","$wrapper","$modal"],function(b,c){a[c].off(r+" "+s)}),a.$bg.removeClass(a.settings.modifier),a.$overlay.removeClass(a.settings.modifier).hide(),a.$wrapper.hide(),f(),g(a,u.CLOSED,!0))}function j(a){var b,c,d,e,f={};for(a=a.replace(/\s*:\s*/g,":").replace(/\s*,\s*/g,","),b=a.split(","),e=0,c=b.length;c>e;e++)b[e]=b[e].split(":"),d=b[e][1],("string"==typeof d||d instanceof String)&&(d="true"===d||"false"!==d&&d),("string"==typeof d||d instanceof String)&&(d=isNaN(d)?d:+d),f[b[e][0]]=d;return f}function k(){for(var a=q,b=0;b<arguments.length;++b)a+="-"+arguments[b];return a}function l(){var a,c,d=location.hash.replace("#","");if(d){try{c=b("[data-"+p+'-id="'+d+'"]')}catch(a){}c&&c.length&&(a=b[p].lookup[c.data(p)])&&a.settings.hashTracking&&a.open()}else n&&n.state===u.OPENED&&n.settings.hashTracking&&n.close()}function m(a,c){var d=b(document.body),e=this;e.settings=b.extend({},t,c),e.index=b[p].lookup.push(e)-1,e.state=u.CLOSED,e.$overlay=b("."+k("overlay")),e.$overlay.length||(e.$overlay=b("<div>").addClass(k("overlay")+" "+k("is",u.CLOSED)).hide(),d.append(e.$overlay)),e.$bg=b("."+k("bg")).addClass(k("is",u.CLOSED)),e.$modal=a.addClass(q+" "+k("is-initialized")+" "+e.settings.modifier+" "+k("is",u.CLOSED)).attr("tabindex","-1"),e.$wrapper=b("<div>").addClass(k("wrapper")+" "+e.settings.modifier+" "+k("is",u.CLOSED)).hide().append(e.$modal),d.append(e.$wrapper),e.$wrapper.on("click."+q,"[data-"+p+'-action="close"]',function(a){a.preventDefault(),e.close()}),e.$wrapper.on("click."+q,"[data-"+p+'-action="cancel"]',function(a){a.preventDefault(),e.$modal.trigger(v.CANCELLATION),e.settings.closeOnCancel&&e.close(v.CANCELLATION)}),e.$wrapper.on("click."+q,"[data-"+p+'-action="confirm"]',function(a){a.preventDefault(),e.$modal.trigger(v.CONFIRMATION),e.settings.closeOnConfirm&&e.close(v.CONFIRMATION)}),e.$wrapper.on("click."+q,function(a){b(a.target).hasClass(k("wrapper"))&&e.settings.closeOnOutsideClick&&e.close()})}var n,o,p="remodal",q=a.REMODAL_GLOBALS&&a.REMODAL_GLOBALS.NAMESPACE||p,r=b.map(["animationstart","webkitAnimationStart","MSAnimationStart","oAnimationStart"],function(a){return a+"."+q}).join(" "),s=b.map(["animationend","webkitAnimationEnd","MSAnimationEnd","oAnimationEnd"],function(a){return a+"."+q}).join(" "),t=b.extend({hashTracking:!0,closeOnConfirm:!0,closeOnCancel:!0,closeOnEscape:!0,closeOnOutsideClick:!0,modifier:""},a.REMODAL_GLOBALS&&a.REMODAL_GLOBALS.DEFAULTS),u={CLOSING:"closing",CLOSED:"closed",OPENING:"opening",OPENED:"opened"},v={CONFIRMATION:"confirmation",CANCELLATION:"cancellation"},w=function(){var a=document.createElement("div").style;return void 0!==a.animationName||void 0!==a.WebkitAnimationName||void 0!==a.MozAnimationName||void 0!==a.msAnimationName||void 0!==a.OAnimationName}(),x=/iPad|iPhone|iPod/.test(navigator.platform);m.prototype.open=function(){var a,c=this;c.state!==u.OPENING&&c.state!==u.CLOSING&&(a=c.$modal.attr("data-"+p+"-id"),a&&c.settings.hashTracking&&(o=b(window).scrollTop(),location.hash=a),n&&n!==c&&i(n),n=c,e(),c.$bg.addClass(c.settings.modifier),c.$overlay.addClass(c.settings.modifier).show(),c.$wrapper.show().scrollTop(0),c.$modal.focus(),h(function(){g(c,u.OPENING)},function(){g(c,u.OPENED)},c))},m.prototype.close=function(a){var c=this;c.state!==u.OPENING&&c.state!==u.CLOSING&&(c.settings.hashTracking&&c.$modal.attr("data-"+p+"-id")===location.hash.substr(1)&&(location.hash="",b(window).scrollTop(o)),h(function(){g(c,u.CLOSING,!1,a)},function(){c.$bg.removeClass(c.settings.modifier),c.$overlay.removeClass(c.settings.modifier).hide(),c.$wrapper.hide(),f(),g(c,u.CLOSED,!1,a)},c))},m.prototype.getState=function(){return this.state},m.prototype.destroy=function(){var a=b[p].lookup;i(this),this.$wrapper.remove(),delete a[this.index],0===b.grep(a,function(a){return!!a}).length&&(this.$overlay.remove(),this.$bg.removeClass(k("is",u.CLOSING)+" "+k("is",u.OPENING)+" "+k("is",u.CLOSED)+" "+k("is",u.OPENED)))},b[p]={lookup:[]},b.fn[p]=function(a){var c,d;return this.each(function(e,f){d=b(f),null==d.data(p)?(c=new m(d,a),d.data(p,c.index),c.settings.hashTracking&&d.attr("data-"+p+"-id")===location.hash.substr(1)&&c.open()):c=b[p].lookup[d.data(p)]}),c},b(document).ready(function(){b(document).on("click","[data-"+p+"-target]",function(a){a.preventDefault();var c=a.currentTarget,d=c.getAttribute("data-"+p+"-target"),e=b("[data-"+p+'-id="'+d+'"]');b[p].lookup[e.data(p)].open()}),b(document).find("."+q).each(function(a,c){var d=b(c),e=d.data(p+"-options");e?("string"==typeof e||e instanceof String)&&(e=j(e)):e={},d[p](e)}),b(document).on("keydown."+q,function(a){n&&n.settings.closeOnEscape&&n.state===u.OPENED&&27===a.keyCode&&n.close()}),b(window).on("hashchange."+q,l)})});
|
assets/build/js/viewer/init.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(a){if("object"==typeof CF_ENTRY_VIEWER_2_CONFIG){var b=CF_ENTRY_VIEWER_2_CONFIG.formId,c={nonce:CF_ENTRY_VIEWER_2_CONFIG.api.nonce,token:CF_ENTRY_VIEWER_2_CONFIG.api.token},d=new CFAPI(CF_ENTRY_VIEWER_2_CONFIG.api,CF_ENTRY_VIEWER_2_CONFIG.perPage,b,c,a);a.when(d.getForm(),d.getEntries(1)).then(function(a,c){var e=a[0],f=c[0],g=new CFFormStoreFactory(b,e.field_details.order,e.field_details.entry_list),h=new CFEntriesStoreFactory(b,f);h.setPage(1),null!=c[2].getResponseHeader("X-CF-API-TOTAL-PAGES")&&h.setTotalPages(c[2].getResponseHeader("X-CF-API-TOTAL-PAGES")),null!=c[2].getResponseHeader("X-CF-API-TOTAL")&&h.setTotal(c[2].getResponseHeader("X-CF-API-TOTAL"));new CFEntryViewer2(b,g,h,
|
|