Discount Rules for WooCommerce - Version 1.1

Version Description

Download this release

Release Info

Developer flycart
Plugin Icon 128x128 Discount Rules for WooCommerce
Version 1.1
Comparing to
See all releases

Version 1.1

assets/css/bootstrap.min.css ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ /*!
2
+ * Bootstrap v3.3.7 (http://getbootstrap.com)
3
+ * Copyright 2011-2016 Twitter, Inc.
4
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5
+ *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}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}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-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,-webkit-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}.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)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.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}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.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)}.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}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.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)}.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}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.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)}.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}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;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)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.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)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.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}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}}
6
+ /*# sourceMappingURL=bootstrap.min.css.map */
assets/css/bootstrap.select.min.css ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ /*!
2
+ * Bootstrap-select v1.10.0 (http://silviomoreto.github.io/bootstrap-select)
3
+ *
4
+ * Copyright 2013-2016 bootstrap-select
5
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
6
+ */select.bs-select-hidden,select.selectpicker{display:none!important}.bootstrap-select{width:220px\9}.bootstrap-select>.dropdown-toggle{width:100%;padding-right:25px;z-index:1}.bootstrap-select>select{position:absolute!important;bottom:0;left:50%;display:block!important;width:.5px!important;height:50%!important;padding:0!important;opacity:0!important;border:none}.bootstrap-select>select.mobile-device{top:0;left:0;display:block!important;width:100%!important;z-index:2}.error .bootstrap-select .dropdown-toggle,.has-error .bootstrap-select .dropdown-toggle{border-color:#b94a48}.bootstrap-select.fit-width{width:auto!important}.bootstrap-select:not([class*=col-]):not([class*=form-control]):not(.input-group-btn){width:220px}.bootstrap-select .dropdown-toggle:focus{outline:thin dotted #333!important;outline:5px auto -webkit-focus-ring-color!important;outline-offset:-2px}.bootstrap-select.form-control{margin-bottom:0;padding:0;border:none}.bootstrap-select.form-control:not([class*=col-]){width:100%}.bootstrap-select.form-control.input-group-btn{z-index:auto}.bootstrap-select.btn-group:not(.input-group-btn),.bootstrap-select.btn-group[class*=col-]{float:none;display:inline-block;margin-left:0}.bootstrap-select.btn-group.dropdown-menu-right,.bootstrap-select.btn-group[class*=col-].dropdown-menu-right,.row .bootstrap-select.btn-group[class*=col-].dropdown-menu-right{float:right}.form-group .bootstrap-select.btn-group,.form-horizontal .bootstrap-select.btn-group,.form-inline .bootstrap-select.btn-group{margin-bottom:0}.form-group-lg .bootstrap-select.btn-group.form-control,.form-group-sm .bootstrap-select.btn-group.form-control{padding:0}.form-inline .bootstrap-select.btn-group .form-control{width:100%}.bootstrap-select.btn-group.disabled,.bootstrap-select.btn-group>.disabled{cursor:not-allowed}.bootstrap-select.btn-group.disabled:focus,.bootstrap-select.btn-group>.disabled:focus{outline:0!important}.bootstrap-select.btn-group.bs-container{position:absolute}.bootstrap-select.btn-group.bs-container .dropdown-menu{z-index:1060}.bootstrap-select.btn-group .dropdown-toggle .filter-option{display:inline-block;overflow:hidden;width:100%;text-align:left}.bootstrap-select.btn-group .dropdown-toggle .caret{position:absolute;top:50%;right:12px;margin-top:-2px;vertical-align:middle}.bootstrap-select.btn-group[class*=col-] .dropdown-toggle{width:100%}.bootstrap-select.btn-group .dropdown-menu{min-width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bootstrap-select.btn-group .dropdown-menu.inner{position:static;float:none;border:0;padding:0;margin:0;border-radius:0;-webkit-box-shadow:none;box-shadow:none}.bootstrap-select.btn-group .dropdown-menu li{position:relative}.bootstrap-select.btn-group .dropdown-menu li.active small{color:#fff}.bootstrap-select.btn-group .dropdown-menu li.disabled a{cursor:not-allowed}.bootstrap-select.btn-group .dropdown-menu li a{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bootstrap-select.btn-group .dropdown-menu li a.opt{position:relative;padding-left:2.25em}.bootstrap-select.btn-group .dropdown-menu li a span.check-mark{display:none}.bootstrap-select.btn-group .dropdown-menu li a span.text{display:inline-block}.bootstrap-select.btn-group .dropdown-menu li small{padding-left:.5em}.bootstrap-select.btn-group .dropdown-menu .notify{position:absolute;bottom:5px;width:96%;margin:0 2%;min-height:26px;padding:3px 5px;background:#f5f5f5;border:1px solid #e3e3e3;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05);pointer-events:none;opacity:.9;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bootstrap-select.btn-group .no-results{padding:3px;background:#f5f5f5;margin:0 5px;white-space:nowrap}.bootstrap-select.btn-group.fit-width .dropdown-toggle .filter-option{position:static}.bootstrap-select.btn-group.fit-width .dropdown-toggle .caret{position:static;top:auto;margin-top:-1px}.bootstrap-select.btn-group.show-tick .dropdown-menu li.selected a span.check-mark{position:absolute;display:inline-block;right:15px;margin-top:5px}.bootstrap-select.btn-group.show-tick .dropdown-menu li a span.text{margin-right:34px}.bootstrap-select.show-menu-arrow.open>.dropdown-toggle{z-index:1061}.bootstrap-select.show-menu-arrow .dropdown-toggle:before{content:'';border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid rgba(204,204,204,.2);position:absolute;bottom:-4px;left:9px;display:none}.bootstrap-select.show-menu-arrow .dropdown-toggle:after{content:'';border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;bottom:-4px;left:10px;display:none}.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:before{bottom:auto;top:-3px;border-top:7px solid rgba(204,204,204,.2);border-bottom:0}.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:after{bottom:auto;top:-3px;border-top:6px solid #fff;border-bottom:0}.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:before{right:12px;left:auto}.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:after{right:13px;left:auto}.bootstrap-select.show-menu-arrow.open>.dropdown-toggle:after,.bootstrap-select.show-menu-arrow.open>.dropdown-toggle:before{display:block}.bs-actionsbox,.bs-donebutton,.bs-searchbox{padding:4px 8px}.bs-actionsbox{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bs-actionsbox .btn-group button{width:50%}.bs-donebutton{float:left;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bs-donebutton .btn-group button{width:100%}.bs-searchbox+.bs-actionsbox{padding:0 8px 4px}.bs-searchbox .form-control{margin-bottom:0;width:100%;float:none}
assets/css/custom.css ADDED
File without changes
assets/css/jquery-ui.css ADDED
@@ -0,0 +1,1311 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! jQuery UI - v1.12.1 - 2016-09-14
2
+ * http://jqueryui.com
3
+ * Includes: core.css, accordion.css, autocomplete.css, menu.css, button.css, controlgroup.css, checkboxradio.css, datepicker.css, dialog.css, draggable.css, resizable.css, progressbar.css, selectable.css, selectmenu.css, slider.css, sortable.css, spinner.css, tabs.css, tooltip.css, theme.css
4
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Arial%2CHelvetica%2Csans-serif&fsDefault=1em&fwDefault=normal&cornerRadius=3px&bgColorHeader=e9e9e9&bgTextureHeader=flat&borderColorHeader=dddddd&fcHeader=333333&iconColorHeader=444444&bgColorContent=ffffff&bgTextureContent=flat&borderColorContent=dddddd&fcContent=333333&iconColorContent=444444&bgColorDefault=f6f6f6&bgTextureDefault=flat&borderColorDefault=c5c5c5&fcDefault=454545&iconColorDefault=777777&bgColorHover=ededed&bgTextureHover=flat&borderColorHover=cccccc&fcHover=2b2b2b&iconColorHover=555555&bgColorActive=007fff&bgTextureActive=flat&borderColorActive=003eff&fcActive=ffffff&iconColorActive=ffffff&bgColorHighlight=fffa90&bgTextureHighlight=flat&borderColorHighlight=dad55e&fcHighlight=777620&iconColorHighlight=777620&bgColorError=fddfdf&bgTextureError=flat&borderColorError=f1a899&fcError=5f3f3f&iconColorError=cc0000&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=666666&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=5px&offsetTopShadow=0px&offsetLeftShadow=0px&cornerRadiusShadow=8px
5
+ * Copyright jQuery Foundation and other contributors; Licensed MIT */
6
+
7
+ /* Layout helpers
8
+ ----------------------------------*/
9
+ .ui-helper-hidden {
10
+ display: none;
11
+ }
12
+ .ui-helper-hidden-accessible {
13
+ border: 0;
14
+ clip: rect(0 0 0 0);
15
+ height: 1px;
16
+ margin: -1px;
17
+ overflow: hidden;
18
+ padding: 0;
19
+ position: absolute;
20
+ width: 1px;
21
+ }
22
+ .ui-helper-reset {
23
+ margin: 0;
24
+ padding: 0;
25
+ border: 0;
26
+ outline: 0;
27
+ line-height: 1.3;
28
+ text-decoration: none;
29
+ font-size: 100%;
30
+ list-style: none;
31
+ }
32
+ .ui-helper-clearfix:before,
33
+ .ui-helper-clearfix:after {
34
+ content: "";
35
+ display: table;
36
+ border-collapse: collapse;
37
+ }
38
+ .ui-helper-clearfix:after {
39
+ clear: both;
40
+ }
41
+ .ui-helper-zfix {
42
+ width: 100%;
43
+ height: 100%;
44
+ top: 0;
45
+ left: 0;
46
+ position: absolute;
47
+ opacity: 0;
48
+ filter:Alpha(Opacity=0); /* support: IE8 */
49
+ }
50
+
51
+ .ui-front {
52
+ z-index: 100;
53
+ }
54
+
55
+
56
+ /* Interaction Cues
57
+ ----------------------------------*/
58
+ .ui-state-disabled {
59
+ cursor: default !important;
60
+ pointer-events: none;
61
+ }
62
+
63
+
64
+ /* Icons
65
+ ----------------------------------*/
66
+ .ui-icon {
67
+ display: inline-block;
68
+ vertical-align: middle;
69
+ margin-top: -.25em;
70
+ position: relative;
71
+ text-indent: -99999px;
72
+ overflow: hidden;
73
+ background-repeat: no-repeat;
74
+ }
75
+
76
+ .ui-widget-icon-block {
77
+ left: 50%;
78
+ margin-left: -8px;
79
+ display: block;
80
+ }
81
+
82
+ /* Misc visuals
83
+ ----------------------------------*/
84
+
85
+ /* Overlays */
86
+ .ui-widget-overlay {
87
+ position: fixed;
88
+ top: 0;
89
+ left: 0;
90
+ width: 100%;
91
+ height: 100%;
92
+ }
93
+ .ui-accordion .ui-accordion-header {
94
+ display: block;
95
+ cursor: pointer;
96
+ position: relative;
97
+ margin: 2px 0 0 0;
98
+ padding: .5em .5em .5em .7em;
99
+ font-size: 100%;
100
+ }
101
+ .ui-accordion .ui-accordion-content {
102
+ padding: 1em 2.2em;
103
+ border-top: 0;
104
+ overflow: auto;
105
+ }
106
+ .ui-autocomplete {
107
+ position: absolute;
108
+ top: 0;
109
+ left: 0;
110
+ cursor: default;
111
+ }
112
+ .ui-menu {
113
+ list-style: none;
114
+ padding: 0;
115
+ margin: 0;
116
+ display: block;
117
+ outline: 0;
118
+ }
119
+ .ui-menu .ui-menu {
120
+ position: absolute;
121
+ }
122
+ .ui-menu .ui-menu-item {
123
+ margin: 0;
124
+ cursor: pointer;
125
+ /* support: IE10, see #8844 */
126
+ list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
127
+ }
128
+ .ui-menu .ui-menu-item-wrapper {
129
+ position: relative;
130
+ padding: 3px 1em 3px .4em;
131
+ }
132
+ .ui-menu .ui-menu-divider {
133
+ margin: 5px 0;
134
+ height: 0;
135
+ font-size: 0;
136
+ line-height: 0;
137
+ border-width: 1px 0 0 0;
138
+ }
139
+ .ui-menu .ui-state-focus,
140
+ .ui-menu .ui-state-active {
141
+ margin: -1px;
142
+ }
143
+
144
+ /* icon support */
145
+ .ui-menu-icons {
146
+ position: relative;
147
+ }
148
+ .ui-menu-icons .ui-menu-item-wrapper {
149
+ padding-left: 2em;
150
+ }
151
+
152
+ /* left-aligned */
153
+ .ui-menu .ui-icon {
154
+ position: absolute;
155
+ top: 0;
156
+ bottom: 0;
157
+ left: .2em;
158
+ margin: auto 0;
159
+ }
160
+
161
+ /* right-aligned */
162
+ .ui-menu .ui-menu-icon {
163
+ left: auto;
164
+ right: 0;
165
+ }
166
+ .ui-button {
167
+ padding: .4em 1em;
168
+ display: inline-block;
169
+ position: relative;
170
+ line-height: normal;
171
+ margin-right: .1em;
172
+ cursor: pointer;
173
+ vertical-align: middle;
174
+ text-align: center;
175
+ -webkit-user-select: none;
176
+ -moz-user-select: none;
177
+ -ms-user-select: none;
178
+ user-select: none;
179
+
180
+ /* Support: IE <= 11 */
181
+ overflow: visible;
182
+ }
183
+
184
+ .ui-button,
185
+ .ui-button:link,
186
+ .ui-button:visited,
187
+ .ui-button:hover,
188
+ .ui-button:active {
189
+ text-decoration: none;
190
+ }
191
+
192
+ /* to make room for the icon, a width needs to be set here */
193
+ .ui-button-icon-only {
194
+ width: 2em;
195
+ box-sizing: border-box;
196
+ text-indent: -9999px;
197
+ white-space: nowrap;
198
+ }
199
+
200
+ /* no icon support for input elements */
201
+ input.ui-button.ui-button-icon-only {
202
+ text-indent: 0;
203
+ }
204
+
205
+ /* button icon element(s) */
206
+ .ui-button-icon-only .ui-icon {
207
+ position: absolute;
208
+ top: 50%;
209
+ left: 50%;
210
+ margin-top: -8px;
211
+ margin-left: -8px;
212
+ }
213
+
214
+ .ui-button.ui-icon-notext .ui-icon {
215
+ padding: 0;
216
+ width: 2.1em;
217
+ height: 2.1em;
218
+ text-indent: -9999px;
219
+ white-space: nowrap;
220
+
221
+ }
222
+
223
+ input.ui-button.ui-icon-notext .ui-icon {
224
+ width: auto;
225
+ height: auto;
226
+ text-indent: 0;
227
+ white-space: normal;
228
+ padding: .4em 1em;
229
+ }
230
+
231
+ /* workarounds */
232
+ /* Support: Firefox 5 - 40 */
233
+ input.ui-button::-moz-focus-inner,
234
+ button.ui-button::-moz-focus-inner {
235
+ border: 0;
236
+ padding: 0;
237
+ }
238
+ .ui-controlgroup {
239
+ vertical-align: middle;
240
+ display: inline-block;
241
+ }
242
+ .ui-controlgroup > .ui-controlgroup-item {
243
+ float: left;
244
+ margin-left: 0;
245
+ margin-right: 0;
246
+ }
247
+ .ui-controlgroup > .ui-controlgroup-item:focus,
248
+ .ui-controlgroup > .ui-controlgroup-item.ui-visual-focus {
249
+ z-index: 9999;
250
+ }
251
+ .ui-controlgroup-vertical > .ui-controlgroup-item {
252
+ display: block;
253
+ float: none;
254
+ width: 100%;
255
+ margin-top: 0;
256
+ margin-bottom: 0;
257
+ text-align: left;
258
+ }
259
+ .ui-controlgroup-vertical .ui-controlgroup-item {
260
+ box-sizing: border-box;
261
+ }
262
+ .ui-controlgroup .ui-controlgroup-label {
263
+ padding: .4em 1em;
264
+ }
265
+ .ui-controlgroup .ui-controlgroup-label span {
266
+ font-size: 80%;
267
+ }
268
+ .ui-controlgroup-horizontal .ui-controlgroup-label + .ui-controlgroup-item {
269
+ border-left: none;
270
+ }
271
+ .ui-controlgroup-vertical .ui-controlgroup-label + .ui-controlgroup-item {
272
+ border-top: none;
273
+ }
274
+ .ui-controlgroup-horizontal .ui-controlgroup-label.ui-widget-content {
275
+ border-right: none;
276
+ }
277
+ .ui-controlgroup-vertical .ui-controlgroup-label.ui-widget-content {
278
+ border-bottom: none;
279
+ }
280
+
281
+ /* Spinner specific style fixes */
282
+ .ui-controlgroup-vertical .ui-spinner-input {
283
+
284
+ /* Support: IE8 only, Android < 4.4 only */
285
+ width: 75%;
286
+ width: calc( 100% - 2.4em );
287
+ }
288
+ .ui-controlgroup-vertical .ui-spinner .ui-spinner-up {
289
+ border-top-style: solid;
290
+ }
291
+
292
+ .ui-checkboxradio-label .ui-icon-background {
293
+ box-shadow: inset 1px 1px 1px #ccc;
294
+ border-radius: .12em;
295
+ border: none;
296
+ }
297
+ .ui-checkboxradio-radio-label .ui-icon-background {
298
+ width: 16px;
299
+ height: 16px;
300
+ border-radius: 1em;
301
+ overflow: visible;
302
+ border: none;
303
+ }
304
+ .ui-checkboxradio-radio-label.ui-checkboxradio-checked .ui-icon,
305
+ .ui-checkboxradio-radio-label.ui-checkboxradio-checked:hover .ui-icon {
306
+ background-image: none;
307
+ width: 8px;
308
+ height: 8px;
309
+ border-width: 4px;
310
+ border-style: solid;
311
+ }
312
+ .ui-checkboxradio-disabled {
313
+ pointer-events: none;
314
+ }
315
+ .ui-datepicker {
316
+ width: 17em;
317
+ padding: .2em .2em 0;
318
+ display: none;
319
+ }
320
+ .ui-datepicker .ui-datepicker-header {
321
+ position: relative;
322
+ padding: .2em 0;
323
+ }
324
+ .ui-datepicker .ui-datepicker-prev,
325
+ .ui-datepicker .ui-datepicker-next {
326
+ position: absolute;
327
+ top: 2px;
328
+ width: 1.8em;
329
+ height: 1.8em;
330
+ }
331
+ .ui-datepicker .ui-datepicker-prev-hover,
332
+ .ui-datepicker .ui-datepicker-next-hover {
333
+ top: 1px;
334
+ }
335
+ .ui-datepicker .ui-datepicker-prev {
336
+ left: 2px;
337
+ }
338
+ .ui-datepicker .ui-datepicker-next {
339
+ right: 2px;
340
+ }
341
+ .ui-datepicker .ui-datepicker-prev-hover {
342
+ left: 1px;
343
+ }
344
+ .ui-datepicker .ui-datepicker-next-hover {
345
+ right: 1px;
346
+ }
347
+ .ui-datepicker .ui-datepicker-prev span,
348
+ .ui-datepicker .ui-datepicker-next span {
349
+ display: block;
350
+ position: absolute;
351
+ left: 50%;
352
+ margin-left: -8px;
353
+ top: 50%;
354
+ margin-top: -8px;
355
+ }
356
+ .ui-datepicker .ui-datepicker-title {
357
+ margin: 0 2.3em;
358
+ line-height: 1.8em;
359
+ text-align: center;
360
+ }
361
+ .ui-datepicker .ui-datepicker-title select {
362
+ font-size: 1em;
363
+ margin: 1px 0;
364
+ }
365
+ .ui-datepicker select.ui-datepicker-month,
366
+ .ui-datepicker select.ui-datepicker-year {
367
+ width: 45%;
368
+ }
369
+ .ui-datepicker table {
370
+ width: 100%;
371
+ font-size: .9em;
372
+ border-collapse: collapse;
373
+ margin: 0 0 .4em;
374
+ }
375
+ .ui-datepicker th {
376
+ padding: .7em .3em;
377
+ text-align: center;
378
+ font-weight: bold;
379
+ border: 0;
380
+ }
381
+ .ui-datepicker td {
382
+ border: 0;
383
+ padding: 1px;
384
+ }
385
+ .ui-datepicker td span,
386
+ .ui-datepicker td a {
387
+ display: block;
388
+ padding: .2em;
389
+ text-align: right;
390
+ text-decoration: none;
391
+ }
392
+ .ui-datepicker .ui-datepicker-buttonpane {
393
+ background-image: none;
394
+ margin: .7em 0 0 0;
395
+ padding: 0 .2em;
396
+ border-left: 0;
397
+ border-right: 0;
398
+ border-bottom: 0;
399
+ }
400
+ .ui-datepicker .ui-datepicker-buttonpane button {
401
+ float: right;
402
+ margin: .5em .2em .4em;
403
+ cursor: pointer;
404
+ padding: .2em .6em .3em .6em;
405
+ width: auto;
406
+ overflow: visible;
407
+ }
408
+ .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
409
+ float: left;
410
+ }
411
+
412
+ /* with multiple calendars */
413
+ .ui-datepicker.ui-datepicker-multi {
414
+ width: auto;
415
+ }
416
+ .ui-datepicker-multi .ui-datepicker-group {
417
+ float: left;
418
+ }
419
+ .ui-datepicker-multi .ui-datepicker-group table {
420
+ width: 95%;
421
+ margin: 0 auto .4em;
422
+ }
423
+ .ui-datepicker-multi-2 .ui-datepicker-group {
424
+ width: 50%;
425
+ }
426
+ .ui-datepicker-multi-3 .ui-datepicker-group {
427
+ width: 33.3%;
428
+ }
429
+ .ui-datepicker-multi-4 .ui-datepicker-group {
430
+ width: 25%;
431
+ }
432
+ .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
433
+ .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
434
+ border-left-width: 0;
435
+ }
436
+ .ui-datepicker-multi .ui-datepicker-buttonpane {
437
+ clear: left;
438
+ }
439
+ .ui-datepicker-row-break {
440
+ clear: both;
441
+ width: 100%;
442
+ font-size: 0;
443
+ }
444
+
445
+ /* RTL support */
446
+ .ui-datepicker-rtl {
447
+ direction: rtl;
448
+ }
449
+ .ui-datepicker-rtl .ui-datepicker-prev {
450
+ right: 2px;
451
+ left: auto;
452
+ }
453
+ .ui-datepicker-rtl .ui-datepicker-next {
454
+ left: 2px;
455
+ right: auto;
456
+ }
457
+ .ui-datepicker-rtl .ui-datepicker-prev:hover {
458
+ right: 1px;
459
+ left: auto;
460
+ }
461
+ .ui-datepicker-rtl .ui-datepicker-next:hover {
462
+ left: 1px;
463
+ right: auto;
464
+ }
465
+ .ui-datepicker-rtl .ui-datepicker-buttonpane {
466
+ clear: right;
467
+ }
468
+ .ui-datepicker-rtl .ui-datepicker-buttonpane button {
469
+ float: left;
470
+ }
471
+ .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
472
+ .ui-datepicker-rtl .ui-datepicker-group {
473
+ float: right;
474
+ }
475
+ .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
476
+ .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
477
+ border-right-width: 0;
478
+ border-left-width: 1px;
479
+ }
480
+
481
+ /* Icons */
482
+ .ui-datepicker .ui-icon {
483
+ display: block;
484
+ text-indent: -99999px;
485
+ overflow: hidden;
486
+ background-repeat: no-repeat;
487
+ left: .5em;
488
+ top: .3em;
489
+ }
490
+ .ui-dialog {
491
+ position: absolute;
492
+ top: 0;
493
+ left: 0;
494
+ padding: .2em;
495
+ outline: 0;
496
+ }
497
+ .ui-dialog .ui-dialog-titlebar {
498
+ padding: .4em 1em;
499
+ position: relative;
500
+ }
501
+ .ui-dialog .ui-dialog-title {
502
+ float: left;
503
+ margin: .1em 0;
504
+ white-space: nowrap;
505
+ width: 90%;
506
+ overflow: hidden;
507
+ text-overflow: ellipsis;
508
+ }
509
+ .ui-dialog .ui-dialog-titlebar-close {
510
+ position: absolute;
511
+ right: .3em;
512
+ top: 50%;
513
+ width: 20px;
514
+ margin: -10px 0 0 0;
515
+ padding: 1px;
516
+ height: 20px;
517
+ }
518
+ .ui-dialog .ui-dialog-content {
519
+ position: relative;
520
+ border: 0;
521
+ padding: .5em 1em;
522
+ background: none;
523
+ overflow: auto;
524
+ }
525
+ .ui-dialog .ui-dialog-buttonpane {
526
+ text-align: left;
527
+ border-width: 1px 0 0 0;
528
+ background-image: none;
529
+ margin-top: .5em;
530
+ padding: .3em 1em .5em .4em;
531
+ }
532
+ .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
533
+ float: right;
534
+ }
535
+ .ui-dialog .ui-dialog-buttonpane button {
536
+ margin: .5em .4em .5em 0;
537
+ cursor: pointer;
538
+ }
539
+ .ui-dialog .ui-resizable-n {
540
+ height: 2px;
541
+ top: 0;
542
+ }
543
+ .ui-dialog .ui-resizable-e {
544
+ width: 2px;
545
+ right: 0;
546
+ }
547
+ .ui-dialog .ui-resizable-s {
548
+ height: 2px;
549
+ bottom: 0;
550
+ }
551
+ .ui-dialog .ui-resizable-w {
552
+ width: 2px;
553
+ left: 0;
554
+ }
555
+ .ui-dialog .ui-resizable-se,
556
+ .ui-dialog .ui-resizable-sw,
557
+ .ui-dialog .ui-resizable-ne,
558
+ .ui-dialog .ui-resizable-nw {
559
+ width: 7px;
560
+ height: 7px;
561
+ }
562
+ .ui-dialog .ui-resizable-se {
563
+ right: 0;
564
+ bottom: 0;
565
+ }
566
+ .ui-dialog .ui-resizable-sw {
567
+ left: 0;
568
+ bottom: 0;
569
+ }
570
+ .ui-dialog .ui-resizable-ne {
571
+ right: 0;
572
+ top: 0;
573
+ }
574
+ .ui-dialog .ui-resizable-nw {
575
+ left: 0;
576
+ top: 0;
577
+ }
578
+ .ui-draggable .ui-dialog-titlebar {
579
+ cursor: move;
580
+ }
581
+ .ui-draggable-handle {
582
+ -ms-touch-action: none;
583
+ touch-action: none;
584
+ }
585
+ .ui-resizable {
586
+ position: relative;
587
+ }
588
+ .ui-resizable-handle {
589
+ position: absolute;
590
+ font-size: 0.1px;
591
+ display: block;
592
+ -ms-touch-action: none;
593
+ touch-action: none;
594
+ }
595
+ .ui-resizable-disabled .ui-resizable-handle,
596
+ .ui-resizable-autohide .ui-resizable-handle {
597
+ display: none;
598
+ }
599
+ .ui-resizable-n {
600
+ cursor: n-resize;
601
+ height: 7px;
602
+ width: 100%;
603
+ top: -5px;
604
+ left: 0;
605
+ }
606
+ .ui-resizable-s {
607
+ cursor: s-resize;
608
+ height: 7px;
609
+ width: 100%;
610
+ bottom: -5px;
611
+ left: 0;
612
+ }
613
+ .ui-resizable-e {
614
+ cursor: e-resize;
615
+ width: 7px;
616
+ right: -5px;
617
+ top: 0;
618
+ height: 100%;
619
+ }
620
+ .ui-resizable-w {
621
+ cursor: w-resize;
622
+ width: 7px;
623
+ left: -5px;
624
+ top: 0;
625
+ height: 100%;
626
+ }
627
+ .ui-resizable-se {
628
+ cursor: se-resize;
629
+ width: 12px;
630
+ height: 12px;
631
+ right: 1px;
632
+ bottom: 1px;
633
+ }
634
+ .ui-resizable-sw {
635
+ cursor: sw-resize;
636
+ width: 9px;
637
+ height: 9px;
638
+ left: -5px;
639
+ bottom: -5px;
640
+ }
641
+ .ui-resizable-nw {
642
+ cursor: nw-resize;
643
+ width: 9px;
644
+ height: 9px;
645
+ left: -5px;
646
+ top: -5px;
647
+ }
648
+ .ui-resizable-ne {
649
+ cursor: ne-resize;
650
+ width: 9px;
651
+ height: 9px;
652
+ right: -5px;
653
+ top: -5px;
654
+ }
655
+ .ui-progressbar {
656
+ height: 2em;
657
+ text-align: left;
658
+ overflow: hidden;
659
+ }
660
+ .ui-progressbar .ui-progressbar-value {
661
+ margin: -1px;
662
+ height: 100%;
663
+ }
664
+ .ui-progressbar .ui-progressbar-overlay {
665
+ background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");
666
+ height: 100%;
667
+ filter: alpha(opacity=25); /* support: IE8 */
668
+ opacity: 0.25;
669
+ }
670
+ .ui-progressbar-indeterminate .ui-progressbar-value {
671
+ background-image: none;
672
+ }
673
+ .ui-selectable {
674
+ -ms-touch-action: none;
675
+ touch-action: none;
676
+ }
677
+ .ui-selectable-helper {
678
+ position: absolute;
679
+ z-index: 100;
680
+ border: 1px dotted black;
681
+ }
682
+ .ui-selectmenu-menu {
683
+ padding: 0;
684
+ margin: 0;
685
+ position: absolute;
686
+ top: 0;
687
+ left: 0;
688
+ display: none;
689
+ }
690
+ .ui-selectmenu-menu .ui-menu {
691
+ overflow: auto;
692
+ overflow-x: hidden;
693
+ padding-bottom: 1px;
694
+ }
695
+ .ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup {
696
+ font-size: 1em;
697
+ font-weight: bold;
698
+ line-height: 1.5;
699
+ padding: 2px 0.4em;
700
+ margin: 0.5em 0 0 0;
701
+ height: auto;
702
+ border: 0;
703
+ }
704
+ .ui-selectmenu-open {
705
+ display: block;
706
+ }
707
+ .ui-selectmenu-text {
708
+ display: block;
709
+ margin-right: 20px;
710
+ overflow: hidden;
711
+ text-overflow: ellipsis;
712
+ }
713
+ .ui-selectmenu-button.ui-button {
714
+ text-align: left;
715
+ white-space: nowrap;
716
+ width: 14em;
717
+ }
718
+ .ui-selectmenu-icon.ui-icon {
719
+ float: right;
720
+ margin-top: 0;
721
+ }
722
+ .ui-slider {
723
+ position: relative;
724
+ text-align: left;
725
+ }
726
+ .ui-slider .ui-slider-handle {
727
+ position: absolute;
728
+ z-index: 2;
729
+ width: 1.2em;
730
+ height: 1.2em;
731
+ cursor: default;
732
+ -ms-touch-action: none;
733
+ touch-action: none;
734
+ }
735
+ .ui-slider .ui-slider-range {
736
+ position: absolute;
737
+ z-index: 1;
738
+ font-size: .7em;
739
+ display: block;
740
+ border: 0;
741
+ background-position: 0 0;
742
+ }
743
+
744
+ /* support: IE8 - See #6727 */
745
+ .ui-slider.ui-state-disabled .ui-slider-handle,
746
+ .ui-slider.ui-state-disabled .ui-slider-range {
747
+ filter: inherit;
748
+ }
749
+
750
+ .ui-slider-horizontal {
751
+ height: .8em;
752
+ }
753
+ .ui-slider-horizontal .ui-slider-handle {
754
+ top: -.3em;
755
+ margin-left: -.6em;
756
+ }
757
+ .ui-slider-horizontal .ui-slider-range {
758
+ top: 0;
759
+ height: 100%;
760
+ }
761
+ .ui-slider-horizontal .ui-slider-range-min {
762
+ left: 0;
763
+ }
764
+ .ui-slider-horizontal .ui-slider-range-max {
765
+ right: 0;
766
+ }
767
+
768
+ .ui-slider-vertical {
769
+ width: .8em;
770
+ height: 100px;
771
+ }
772
+ .ui-slider-vertical .ui-slider-handle {
773
+ left: -.3em;
774
+ margin-left: 0;
775
+ margin-bottom: -.6em;
776
+ }
777
+ .ui-slider-vertical .ui-slider-range {
778
+ left: 0;
779
+ width: 100%;
780
+ }
781
+ .ui-slider-vertical .ui-slider-range-min {
782
+ bottom: 0;
783
+ }
784
+ .ui-slider-vertical .ui-slider-range-max {
785
+ top: 0;
786
+ }
787
+ .ui-sortable-handle {
788
+ -ms-touch-action: none;
789
+ touch-action: none;
790
+ }
791
+ .ui-spinner {
792
+ position: relative;
793
+ display: inline-block;
794
+ overflow: hidden;
795
+ padding: 0;
796
+ vertical-align: middle;
797
+ }
798
+ .ui-spinner-input {
799
+ border: none;
800
+ background: none;
801
+ color: inherit;
802
+ padding: .222em 0;
803
+ margin: .2em 0;
804
+ vertical-align: middle;
805
+ margin-left: .4em;
806
+ margin-right: 2em;
807
+ }
808
+ .ui-spinner-button {
809
+ width: 1.6em;
810
+ height: 50%;
811
+ font-size: .5em;
812
+ padding: 0;
813
+ margin: 0;
814
+ text-align: center;
815
+ position: absolute;
816
+ cursor: default;
817
+ display: block;
818
+ overflow: hidden;
819
+ right: 0;
820
+ }
821
+ /* more specificity required here to override default borders */
822
+ .ui-spinner a.ui-spinner-button {
823
+ border-top-style: none;
824
+ border-bottom-style: none;
825
+ border-right-style: none;
826
+ }
827
+ .ui-spinner-up {
828
+ top: 0;
829
+ }
830
+ .ui-spinner-down {
831
+ bottom: 0;
832
+ }
833
+ .ui-tabs {
834
+ position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
835
+ padding: .2em;
836
+ }
837
+ .ui-tabs .ui-tabs-nav {
838
+ margin: 0;
839
+ padding: .2em .2em 0;
840
+ }
841
+ .ui-tabs .ui-tabs-nav li {
842
+ list-style: none;
843
+ float: left;
844
+ position: relative;
845
+ top: 0;
846
+ margin: 1px .2em 0 0;
847
+ border-bottom-width: 0;
848
+ padding: 0;
849
+ white-space: nowrap;
850
+ }
851
+ .ui-tabs .ui-tabs-nav .ui-tabs-anchor {
852
+ float: left;
853
+ padding: .5em 1em;
854
+ text-decoration: none;
855
+ }
856
+ .ui-tabs .ui-tabs-nav li.ui-tabs-active {
857
+ margin-bottom: -1px;
858
+ padding-bottom: 1px;
859
+ }
860
+ .ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,
861
+ .ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,
862
+ .ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor {
863
+ cursor: text;
864
+ }
865
+ .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor {
866
+ cursor: pointer;
867
+ }
868
+ .ui-tabs .ui-tabs-panel {
869
+ display: block;
870
+ border-width: 0;
871
+ padding: 1em 1.4em;
872
+ background: none;
873
+ }
874
+ .ui-tooltip {
875
+ padding: 8px;
876
+ position: absolute;
877
+ z-index: 9999;
878
+ max-width: 300px;
879
+ }
880
+ body .ui-tooltip {
881
+ border-width: 2px;
882
+ }
883
+ /* Component containers
884
+ ----------------------------------*/
885
+ .ui-widget {
886
+ font-family: Arial,Helvetica,sans-serif;
887
+ font-size: 1em;
888
+ }
889
+ .ui-widget .ui-widget {
890
+ font-size: 1em;
891
+ }
892
+ .ui-widget input,
893
+ .ui-widget select,
894
+ .ui-widget textarea,
895
+ .ui-widget button {
896
+ font-family: Arial,Helvetica,sans-serif;
897
+ font-size: 1em;
898
+ }
899
+ .ui-widget.ui-widget-content {
900
+ border: 1px solid #c5c5c5;
901
+ }
902
+ .ui-widget-content {
903
+ border: 1px solid #dddddd;
904
+ background: #ffffff;
905
+ color: #333333;
906
+ }
907
+ .ui-widget-content a {
908
+ color: #333333;
909
+ }
910
+ .ui-widget-header {
911
+ border: 1px solid #dddddd;
912
+ background: #e9e9e9;
913
+ color: #333333;
914
+ font-weight: bold;
915
+ }
916
+ .ui-widget-header a {
917
+ color: #333333;
918
+ }
919
+
920
+ /* Interaction states
921
+ ----------------------------------*/
922
+ .ui-state-default,
923
+ .ui-widget-content .ui-state-default,
924
+ .ui-widget-header .ui-state-default,
925
+ .ui-button,
926
+
927
+ /* We use html here because we need a greater specificity to make sure disabled
928
+ works properly when clicked or hovered */
929
+ html .ui-button.ui-state-disabled:hover,
930
+ html .ui-button.ui-state-disabled:active {
931
+ border: 1px solid #c5c5c5;
932
+ background: #f6f6f6;
933
+ font-weight: normal;
934
+ color: #454545;
935
+ }
936
+ .ui-state-default a,
937
+ .ui-state-default a:link,
938
+ .ui-state-default a:visited,
939
+ a.ui-button,
940
+ a:link.ui-button,
941
+ a:visited.ui-button,
942
+ .ui-button {
943
+ color: #454545;
944
+ text-decoration: none;
945
+ }
946
+ .ui-state-hover,
947
+ .ui-widget-content .ui-state-hover,
948
+ .ui-widget-header .ui-state-hover,
949
+ .ui-state-focus,
950
+ .ui-widget-content .ui-state-focus,
951
+ .ui-widget-header .ui-state-focus,
952
+ .ui-button:hover,
953
+ .ui-button:focus {
954
+ border: 1px solid #cccccc;
955
+ background: #ededed;
956
+ font-weight: normal;
957
+ color: #2b2b2b;
958
+ }
959
+ .ui-state-hover a,
960
+ .ui-state-hover a:hover,
961
+ .ui-state-hover a:link,
962
+ .ui-state-hover a:visited,
963
+ .ui-state-focus a,
964
+ .ui-state-focus a:hover,
965
+ .ui-state-focus a:link,
966
+ .ui-state-focus a:visited,
967
+ a.ui-button:hover,
968
+ a.ui-button:focus {
969
+ color: #2b2b2b;
970
+ text-decoration: none;
971
+ }
972
+
973
+ .ui-visual-focus {
974
+ box-shadow: 0 0 3px 1px rgb(94, 158, 214);
975
+ }
976
+ .ui-state-active,
977
+ .ui-widget-content .ui-state-active,
978
+ .ui-widget-header .ui-state-active,
979
+ a.ui-button:active,
980
+ .ui-button:active,
981
+ .ui-button.ui-state-active:hover {
982
+ border: 1px solid #003eff;
983
+ background: #007fff;
984
+ font-weight: normal;
985
+ color: #ffffff;
986
+ }
987
+ .ui-icon-background,
988
+ .ui-state-active .ui-icon-background {
989
+ border: #003eff;
990
+ background-color: #ffffff;
991
+ }
992
+ .ui-state-active a,
993
+ .ui-state-active a:link,
994
+ .ui-state-active a:visited {
995
+ color: #ffffff;
996
+ text-decoration: none;
997
+ }
998
+
999
+ /* Interaction Cues
1000
+ ----------------------------------*/
1001
+ .ui-state-highlight,
1002
+ .ui-widget-content .ui-state-highlight,
1003
+ .ui-widget-header .ui-state-highlight {
1004
+ border: 1px solid #dad55e;
1005
+ background: #fffa90;
1006
+ color: #777620;
1007
+ }
1008
+ .ui-state-checked {
1009
+ border: 1px solid #dad55e;
1010
+ background: #fffa90;
1011
+ }
1012
+ .ui-state-highlight a,
1013
+ .ui-widget-content .ui-state-highlight a,
1014
+ .ui-widget-header .ui-state-highlight a {
1015
+ color: #777620;
1016
+ }
1017
+ .ui-state-error,
1018
+ .ui-widget-content .ui-state-error,
1019
+ .ui-widget-header .ui-state-error {
1020
+ border: 1px solid #f1a899;
1021
+ background: #fddfdf;
1022
+ color: #5f3f3f;
1023
+ }
1024
+ .ui-state-error a,
1025
+ .ui-widget-content .ui-state-error a,
1026
+ .ui-widget-header .ui-state-error a {
1027
+ color: #5f3f3f;
1028
+ }
1029
+ .ui-state-error-text,
1030
+ .ui-widget-content .ui-state-error-text,
1031
+ .ui-widget-header .ui-state-error-text {
1032
+ color: #5f3f3f;
1033
+ }
1034
+ .ui-priority-primary,
1035
+ .ui-widget-content .ui-priority-primary,
1036
+ .ui-widget-header .ui-priority-primary {
1037
+ font-weight: bold;
1038
+ }
1039
+ .ui-priority-secondary,
1040
+ .ui-widget-content .ui-priority-secondary,
1041
+ .ui-widget-header .ui-priority-secondary {
1042
+ opacity: .7;
1043
+ filter:Alpha(Opacity=70); /* support: IE8 */
1044
+ font-weight: normal;
1045
+ }
1046
+ .ui-state-disabled,
1047
+ .ui-widget-content .ui-state-disabled,
1048
+ .ui-widget-header .ui-state-disabled {
1049
+ opacity: .35;
1050
+ filter:Alpha(Opacity=35); /* support: IE8 */
1051
+ background-image: none;
1052
+ }
1053
+ .ui-state-disabled .ui-icon {
1054
+ filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */
1055
+ }
1056
+
1057
+ /* Icons
1058
+ ----------------------------------*/
1059
+
1060
+ /* states and images */
1061
+ .ui-icon {
1062
+ width: 16px;
1063
+ height: 16px;
1064
+ }
1065
+ .ui-icon,
1066
+ .ui-widget-content .ui-icon {
1067
+ background-image: url("images/ui-icons_444444_256x240.png");
1068
+ }
1069
+ .ui-widget-header .ui-icon {
1070
+ background-image: url("images/ui-icons_444444_256x240.png");
1071
+ }
1072
+ .ui-state-hover .ui-icon,
1073
+ .ui-state-focus .ui-icon,
1074
+ .ui-button:hover .ui-icon,
1075
+ .ui-button:focus .ui-icon {
1076
+ background-image: url("images/ui-icons_555555_256x240.png");
1077
+ }
1078
+ .ui-state-active .ui-icon,
1079
+ .ui-button:active .ui-icon {
1080
+ background-image: url("images/ui-icons_ffffff_256x240.png");
1081
+ }
1082
+ .ui-state-highlight .ui-icon,
1083
+ .ui-button .ui-state-highlight.ui-icon {
1084
+ background-image: url("images/ui-icons_777620_256x240.png");
1085
+ }
1086
+ .ui-state-error .ui-icon,
1087
+ .ui-state-error-text .ui-icon {
1088
+ background-image: url("images/ui-icons_cc0000_256x240.png");
1089
+ }
1090
+ .ui-button .ui-icon {
1091
+ background-image: url("images/ui-icons_777777_256x240.png");
1092
+ }
1093
+
1094
+ /* positioning */
1095
+ .ui-icon-blank { background-position: 16px 16px; }
1096
+ .ui-icon-caret-1-n { background-position: 0 0; }
1097
+ .ui-icon-caret-1-ne { background-position: -16px 0; }
1098
+ .ui-icon-caret-1-e { background-position: -32px 0; }
1099
+ .ui-icon-caret-1-se { background-position: -48px 0; }
1100
+ .ui-icon-caret-1-s { background-position: -65px 0; }
1101
+ .ui-icon-caret-1-sw { background-position: -80px 0; }
1102
+ .ui-icon-caret-1-w { background-position: -96px 0; }
1103
+ .ui-icon-caret-1-nw { background-position: -112px 0; }
1104
+ .ui-icon-caret-2-n-s { background-position: -128px 0; }
1105
+ .ui-icon-caret-2-e-w { background-position: -144px 0; }
1106
+ .ui-icon-triangle-1-n { background-position: 0 -16px; }
1107
+ .ui-icon-triangle-1-ne { background-position: -16px -16px; }
1108
+ .ui-icon-triangle-1-e { background-position: -32px -16px; }
1109
+ .ui-icon-triangle-1-se { background-position: -48px -16px; }
1110
+ .ui-icon-triangle-1-s { background-position: -65px -16px; }
1111
+ .ui-icon-triangle-1-sw { background-position: -80px -16px; }
1112
+ .ui-icon-triangle-1-w { background-position: -96px -16px; }
1113
+ .ui-icon-triangle-1-nw { background-position: -112px -16px; }
1114
+ .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
1115
+ .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
1116
+ .ui-icon-arrow-1-n { background-position: 0 -32px; }
1117
+ .ui-icon-arrow-1-ne { background-position: -16px -32px; }
1118
+ .ui-icon-arrow-1-e { background-position: -32px -32px; }
1119
+ .ui-icon-arrow-1-se { background-position: -48px -32px; }
1120
+ .ui-icon-arrow-1-s { background-position: -65px -32px; }
1121
+ .ui-icon-arrow-1-sw { background-position: -80px -32px; }
1122
+ .ui-icon-arrow-1-w { background-position: -96px -32px; }
1123
+ .ui-icon-arrow-1-nw { background-position: -112px -32px; }
1124
+ .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
1125
+ .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
1126
+ .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
1127
+ .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
1128
+ .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
1129
+ .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
1130
+ .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
1131
+ .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
1132
+ .ui-icon-arrowthick-1-n { background-position: 1px -48px; }
1133
+ .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
1134
+ .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
1135
+ .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
1136
+ .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
1137
+ .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
1138
+ .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
1139
+ .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
1140
+ .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
1141
+ .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
1142
+ .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
1143
+ .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
1144
+ .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
1145
+ .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
1146
+ .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
1147
+ .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
1148
+ .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
1149
+ .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
1150
+ .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
1151
+ .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
1152
+ .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
1153
+ .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
1154
+ .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
1155
+ .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
1156
+ .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
1157
+ .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
1158
+ .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
1159
+ .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
1160
+ .ui-icon-arrow-4 { background-position: 0 -80px; }
1161
+ .ui-icon-arrow-4-diag { background-position: -16px -80px; }
1162
+ .ui-icon-extlink { background-position: -32px -80px; }
1163
+ .ui-icon-newwin { background-position: -48px -80px; }
1164
+ .ui-icon-refresh { background-position: -64px -80px; }
1165
+ .ui-icon-shuffle { background-position: -80px -80px; }
1166
+ .ui-icon-transfer-e-w { background-position: -96px -80px; }
1167
+ .ui-icon-transferthick-e-w { background-position: -112px -80px; }
1168
+ .ui-icon-folder-collapsed { background-position: 0 -96px; }
1169
+ .ui-icon-folder-open { background-position: -16px -96px; }
1170
+ .ui-icon-document { background-position: -32px -96px; }
1171
+ .ui-icon-document-b { background-position: -48px -96px; }
1172
+ .ui-icon-note { background-position: -64px -96px; }
1173
+ .ui-icon-mail-closed { background-position: -80px -96px; }
1174
+ .ui-icon-mail-open { background-position: -96px -96px; }
1175
+ .ui-icon-suitcase { background-position: -112px -96px; }
1176
+ .ui-icon-comment { background-position: -128px -96px; }
1177
+ .ui-icon-person { background-position: -144px -96px; }
1178
+ .ui-icon-print { background-position: -160px -96px; }
1179
+ .ui-icon-trash { background-position: -176px -96px; }
1180
+ .ui-icon-locked { background-position: -192px -96px; }
1181
+ .ui-icon-unlocked { background-position: -208px -96px; }
1182
+ .ui-icon-bookmark { background-position: -224px -96px; }
1183
+ .ui-icon-tag { background-position: -240px -96px; }
1184
+ .ui-icon-home { background-position: 0 -112px; }
1185
+ .ui-icon-flag { background-position: -16px -112px; }
1186
+ .ui-icon-calendar { background-position: -32px -112px; }
1187
+ .ui-icon-cart { background-position: -48px -112px; }
1188
+ .ui-icon-pencil { background-position: -64px -112px; }
1189
+ .ui-icon-clock { background-position: -80px -112px; }
1190
+ .ui-icon-disk { background-position: -96px -112px; }
1191
+ .ui-icon-calculator { background-position: -112px -112px; }
1192
+ .ui-icon-zoomin { background-position: -128px -112px; }
1193
+ .ui-icon-zoomout { background-position: -144px -112px; }
1194
+ .ui-icon-search { background-position: -160px -112px; }
1195
+ .ui-icon-wrench { background-position: -176px -112px; }
1196
+ .ui-icon-gear { background-position: -192px -112px; }
1197
+ .ui-icon-heart { background-position: -208px -112px; }
1198
+ .ui-icon-star { background-position: -224px -112px; }
1199
+ .ui-icon-link { background-position: -240px -112px; }
1200
+ .ui-icon-cancel { background-position: 0 -128px; }
1201
+ .ui-icon-plus { background-position: -16px -128px; }
1202
+ .ui-icon-plusthick { background-position: -32px -128px; }
1203
+ .ui-icon-minus { background-position: -48px -128px; }
1204
+ .ui-icon-minusthick { background-position: -64px -128px; }
1205
+ .ui-icon-close { background-position: -80px -128px; }
1206
+ .ui-icon-closethick { background-position: -96px -128px; }
1207
+ .ui-icon-key { background-position: -112px -128px; }
1208
+ .ui-icon-lightbulb { background-position: -128px -128px; }
1209
+ .ui-icon-scissors { background-position: -144px -128px; }
1210
+ .ui-icon-clipboard { background-position: -160px -128px; }
1211
+ .ui-icon-copy { background-position: -176px -128px; }
1212
+ .ui-icon-contact { background-position: -192px -128px; }
1213
+ .ui-icon-image { background-position: -208px -128px; }
1214
+ .ui-icon-video { background-position: -224px -128px; }
1215
+ .ui-icon-script { background-position: -240px -128px; }
1216
+ .ui-icon-alert { background-position: 0 -144px; }
1217
+ .ui-icon-info { background-position: -16px -144px; }
1218
+ .ui-icon-notice { background-position: -32px -144px; }
1219
+ .ui-icon-help { background-position: -48px -144px; }
1220
+ .ui-icon-check { background-position: -64px -144px; }
1221
+ .ui-icon-bullet { background-position: -80px -144px; }
1222
+ .ui-icon-radio-on { background-position: -96px -144px; }
1223
+ .ui-icon-radio-off { background-position: -112px -144px; }
1224
+ .ui-icon-pin-w { background-position: -128px -144px; }
1225
+ .ui-icon-pin-s { background-position: -144px -144px; }
1226
+ .ui-icon-play { background-position: 0 -160px; }
1227
+ .ui-icon-pause { background-position: -16px -160px; }
1228
+ .ui-icon-seek-next { background-position: -32px -160px; }
1229
+ .ui-icon-seek-prev { background-position: -48px -160px; }
1230
+ .ui-icon-seek-end { background-position: -64px -160px; }
1231
+ .ui-icon-seek-start { background-position: -80px -160px; }
1232
+ /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
1233
+ .ui-icon-seek-first { background-position: -80px -160px; }
1234
+ .ui-icon-stop { background-position: -96px -160px; }
1235
+ .ui-icon-eject { background-position: -112px -160px; }
1236
+ .ui-icon-volume-off { background-position: -128px -160px; }
1237
+ .ui-icon-volume-on { background-position: -144px -160px; }
1238
+ .ui-icon-power { background-position: 0 -176px; }
1239
+ .ui-icon-signal-diag { background-position: -16px -176px; }
1240
+ .ui-icon-signal { background-position: -32px -176px; }
1241
+ .ui-icon-battery-0 { background-position: -48px -176px; }
1242
+ .ui-icon-battery-1 { background-position: -64px -176px; }
1243
+ .ui-icon-battery-2 { background-position: -80px -176px; }
1244
+ .ui-icon-battery-3 { background-position: -96px -176px; }
1245
+ .ui-icon-circle-plus { background-position: 0 -192px; }
1246
+ .ui-icon-circle-minus { background-position: -16px -192px; }
1247
+ .ui-icon-circle-close { background-position: -32px -192px; }
1248
+ .ui-icon-circle-triangle-e { background-position: -48px -192px; }
1249
+ .ui-icon-circle-triangle-s { background-position: -64px -192px; }
1250
+ .ui-icon-circle-triangle-w { background-position: -80px -192px; }
1251
+ .ui-icon-circle-triangle-n { background-position: -96px -192px; }
1252
+ .ui-icon-circle-arrow-e { background-position: -112px -192px; }
1253
+ .ui-icon-circle-arrow-s { background-position: -128px -192px; }
1254
+ .ui-icon-circle-arrow-w { background-position: -144px -192px; }
1255
+ .ui-icon-circle-arrow-n { background-position: -160px -192px; }
1256
+ .ui-icon-circle-zoomin { background-position: -176px -192px; }
1257
+ .ui-icon-circle-zoomout { background-position: -192px -192px; }
1258
+ .ui-icon-circle-check { background-position: -208px -192px; }
1259
+ .ui-icon-circlesmall-plus { background-position: 0 -208px; }
1260
+ .ui-icon-circlesmall-minus { background-position: -16px -208px; }
1261
+ .ui-icon-circlesmall-close { background-position: -32px -208px; }
1262
+ .ui-icon-squaresmall-plus { background-position: -48px -208px; }
1263
+ .ui-icon-squaresmall-minus { background-position: -64px -208px; }
1264
+ .ui-icon-squaresmall-close { background-position: -80px -208px; }
1265
+ .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
1266
+ .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
1267
+ .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
1268
+ .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
1269
+ .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
1270
+ .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
1271
+
1272
+
1273
+ /* Misc visuals
1274
+ ----------------------------------*/
1275
+
1276
+ /* Corner radius */
1277
+ .ui-corner-all,
1278
+ .ui-corner-top,
1279
+ .ui-corner-left,
1280
+ .ui-corner-tl {
1281
+ border-top-left-radius: 3px;
1282
+ }
1283
+ .ui-corner-all,
1284
+ .ui-corner-top,
1285
+ .ui-corner-right,
1286
+ .ui-corner-tr {
1287
+ border-top-right-radius: 3px;
1288
+ }
1289
+ .ui-corner-all,
1290
+ .ui-corner-bottom,
1291
+ .ui-corner-left,
1292
+ .ui-corner-bl {
1293
+ border-bottom-left-radius: 3px;
1294
+ }
1295
+ .ui-corner-all,
1296
+ .ui-corner-bottom,
1297
+ .ui-corner-right,
1298
+ .ui-corner-br {
1299
+ border-bottom-right-radius: 3px;
1300
+ }
1301
+
1302
+ /* Overlays */
1303
+ .ui-widget-overlay {
1304
+ background: #aaaaaa;
1305
+ opacity: .3;
1306
+ filter: Alpha(Opacity=30); /* support: IE8 */
1307
+ }
1308
+ .ui-widget-shadow {
1309
+ -webkit-box-shadow: 0px 0px 5px #666666;
1310
+ box-shadow: 0px 0px 5px #666666;
1311
+ }
assets/css/select2.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #fff 50%, #eee 100%);background-image:-o-linear-gradient(top, #fff 50%, #eee 100%);background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eee 50%, #ccc 100%);background-image:-o-linear-gradient(top, #eee 50%, #ccc 100%);background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #fff 0%, #eee 50%);background-image:-o-linear-gradient(top, #fff 0%, #eee 50%);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eee 50%, #fff 100%);background-image:-o-linear-gradient(top, #eee 50%, #fff 100%);background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}
assets/css/style.css ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ .hide {
2
+ display: none !important;
3
+ }
4
+
5
+ .show {
6
+ display: block !important;
7
+ }
assets/css/tabbablePanel.css ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* bhoechie tab */
2
+ div.bhoechie-tab-container {
3
+ z-index: 10;
4
+ background-color: #ffffff;
5
+ padding: 0 !important;
6
+ border-radius: 4px;
7
+ -moz-border-radius: 4px;
8
+ border: 1px solid #ddd;
9
+ -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
10
+ box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
11
+ -moz-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
12
+ background-clip: padding-box;
13
+ opacity: 0.97;
14
+ filter: alpha(opacity=97);
15
+ }
16
+
17
+ div.bhoechie-tab-menu {
18
+ padding-right: 0;
19
+ padding-left: 0;
20
+ padding-bottom: 0;
21
+ }
22
+
23
+ div.bhoechie-tab-menu div.list-group {
24
+ margin-bottom: 0;
25
+ }
26
+
27
+ div.bhoechie-tab-menu div.list-group > a {
28
+ margin-bottom: 0;
29
+ }
30
+
31
+ div.bhoechie-tab-menu div.list-group > a .glyphicon,
32
+ div.bhoechie-tab-menu div.list-group > a .fa {
33
+ color: #5A55A3;
34
+ }
35
+
36
+ div.bhoechie-tab-menu div.list-group > a:first-child {
37
+ border-top-right-radius: 0;
38
+ -moz-border-top-right-radius: 0;
39
+ }
40
+
41
+ div.bhoechie-tab-menu div.list-group > a:last-child {
42
+ border-bottom-right-radius: 0;
43
+ -moz-border-bottom-right-radius: 0;
44
+ }
45
+
46
+ div.bhoechie-tab-menu div.list-group > a.active,
47
+ div.bhoechie-tab-menu div.list-group > a.active .glyphicon,
48
+ div.bhoechie-tab-menu div.list-group > a.active .fa {
49
+ background-color: #5A55A3;
50
+ background-image: #5A55A3;
51
+ color: #ffffff;
52
+ }
53
+
54
+ div.bhoechie-tab-menu div.list-group > a.active:after {
55
+ content: '';
56
+ position: absolute;
57
+ left: 100%;
58
+ top: 50%;
59
+ margin-top: -13px;
60
+ border-left: 0;
61
+ border-bottom: 13px solid transparent;
62
+ border-top: 13px solid transparent;
63
+ border-left: 10px solid #5A55A3;
64
+ }
65
+
66
+ div.bhoechie-tab-content {
67
+ background-color: #ffffff;
68
+ /* border: 1px solid #eeeeee; */
69
+ padding-left: 20px;
70
+ padding-top: 10px;
71
+ }
72
+
73
+ div.bhoechie-tab div.bhoechie-tab-content:not(.active) {
74
+ display: none;
75
+ }
assets/fonts/glyphicons-halflings-regular.eot ADDED
Binary file
assets/fonts/glyphicons-halflings-regular.svg ADDED
@@ -0,0 +1,288 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
+ <svg xmlns="http://www.w3.org/2000/svg">
4
+ <metadata></metadata>
5
+ <defs>
6
+ <font id="glyphicons_halflingsregular" horiz-adv-x="1200" >
7
+ <font-face units-per-em="1200" ascent="960" descent="-240" />
8
+ <missing-glyph horiz-adv-x="500" />
9
+ <glyph horiz-adv-x="0" />
10
+ <glyph horiz-adv-x="400" />
11
+ <glyph unicode=" " />
12
+ <glyph unicode="*" d="M600 1100q15 0 34 -1.5t30 -3.5l11 -1q10 -2 17.5 -10.5t7.5 -18.5v-224l158 158q7 7 18 8t19 -6l106 -106q7 -8 6 -19t-8 -18l-158 -158h224q10 0 18.5 -7.5t10.5 -17.5q6 -41 6 -75q0 -15 -1.5 -34t-3.5 -30l-1 -11q-2 -10 -10.5 -17.5t-18.5 -7.5h-224l158 -158 q7 -7 8 -18t-6 -19l-106 -106q-8 -7 -19 -6t-18 8l-158 158v-224q0 -10 -7.5 -18.5t-17.5 -10.5q-41 -6 -75 -6q-15 0 -34 1.5t-30 3.5l-11 1q-10 2 -17.5 10.5t-7.5 18.5v224l-158 -158q-7 -7 -18 -8t-19 6l-106 106q-7 8 -6 19t8 18l158 158h-224q-10 0 -18.5 7.5 t-10.5 17.5q-6 41 -6 75q0 15 1.5 34t3.5 30l1 11q2 10 10.5 17.5t18.5 7.5h224l-158 158q-7 7 -8 18t6 19l106 106q8 7 19 6t18 -8l158 -158v224q0 10 7.5 18.5t17.5 10.5q41 6 75 6z" />
13
+ <glyph unicode="+" d="M450 1100h200q21 0 35.5 -14.5t14.5 -35.5v-350h350q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-350v-350q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v350h-350q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5 h350v350q0 21 14.5 35.5t35.5 14.5z" />
14
+ <glyph unicode="&#xa0;" />
15
+ <glyph unicode="&#xa5;" d="M825 1100h250q10 0 12.5 -5t-5.5 -13l-364 -364q-6 -6 -11 -18h268q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-125v-100h275q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-125v-174q0 -11 -7.5 -18.5t-18.5 -7.5h-148q-11 0 -18.5 7.5t-7.5 18.5v174 h-275q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h125v100h-275q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h118q-5 12 -11 18l-364 364q-8 8 -5.5 13t12.5 5h250q25 0 43 -18l164 -164q8 -8 18 -8t18 8l164 164q18 18 43 18z" />
16
+ <glyph unicode="&#x2000;" horiz-adv-x="650" />
17
+ <glyph unicode="&#x2001;" horiz-adv-x="1300" />
18
+ <glyph unicode="&#x2002;" horiz-adv-x="650" />
19
+ <glyph unicode="&#x2003;" horiz-adv-x="1300" />
20
+ <glyph unicode="&#x2004;" horiz-adv-x="433" />
21
+ <glyph unicode="&#x2005;" horiz-adv-x="325" />
22
+ <glyph unicode="&#x2006;" horiz-adv-x="216" />
23
+ <glyph unicode="&#x2007;" horiz-adv-x="216" />
24
+ <glyph unicode="&#x2008;" horiz-adv-x="162" />
25
+ <glyph unicode="&#x2009;" horiz-adv-x="260" />
26
+ <glyph unicode="&#x200a;" horiz-adv-x="72" />
27
+ <glyph unicode="&#x202f;" horiz-adv-x="260" />
28
+ <glyph unicode="&#x205f;" horiz-adv-x="325" />
29
+ <glyph unicode="&#x20ac;" d="M744 1198q242 0 354 -189q60 -104 66 -209h-181q0 45 -17.5 82.5t-43.5 61.5t-58 40.5t-60.5 24t-51.5 7.5q-19 0 -40.5 -5.5t-49.5 -20.5t-53 -38t-49 -62.5t-39 -89.5h379l-100 -100h-300q-6 -50 -6 -100h406l-100 -100h-300q9 -74 33 -132t52.5 -91t61.5 -54.5t59 -29 t47 -7.5q22 0 50.5 7.5t60.5 24.5t58 41t43.5 61t17.5 80h174q-30 -171 -128 -278q-107 -117 -274 -117q-206 0 -324 158q-36 48 -69 133t-45 204h-217l100 100h112q1 47 6 100h-218l100 100h134q20 87 51 153.5t62 103.5q117 141 297 141z" />
30
+ <glyph unicode="&#x20bd;" d="M428 1200h350q67 0 120 -13t86 -31t57 -49.5t35 -56.5t17 -64.5t6.5 -60.5t0.5 -57v-16.5v-16.5q0 -36 -0.5 -57t-6.5 -61t-17 -65t-35 -57t-57 -50.5t-86 -31.5t-120 -13h-178l-2 -100h288q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-138v-175q0 -11 -5.5 -18 t-15.5 -7h-149q-10 0 -17.5 7.5t-7.5 17.5v175h-267q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h117v100h-267q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h117v475q0 10 7.5 17.5t17.5 7.5zM600 1000v-300h203q64 0 86.5 33t22.5 119q0 84 -22.5 116t-86.5 32h-203z" />
31
+ <glyph unicode="&#x2212;" d="M250 700h800q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5z" />
32
+ <glyph unicode="&#x231b;" d="M1000 1200v-150q0 -21 -14.5 -35.5t-35.5 -14.5h-50v-100q0 -91 -49.5 -165.5t-130.5 -109.5q81 -35 130.5 -109.5t49.5 -165.5v-150h50q21 0 35.5 -14.5t14.5 -35.5v-150h-800v150q0 21 14.5 35.5t35.5 14.5h50v150q0 91 49.5 165.5t130.5 109.5q-81 35 -130.5 109.5 t-49.5 165.5v100h-50q-21 0 -35.5 14.5t-14.5 35.5v150h800zM400 1000v-100q0 -60 32.5 -109.5t87.5 -73.5q28 -12 44 -37t16 -55t-16 -55t-44 -37q-55 -24 -87.5 -73.5t-32.5 -109.5v-150h400v150q0 60 -32.5 109.5t-87.5 73.5q-28 12 -44 37t-16 55t16 55t44 37 q55 24 87.5 73.5t32.5 109.5v100h-400z" />
33
+ <glyph unicode="&#x25fc;" horiz-adv-x="500" d="M0 0z" />
34
+ <glyph unicode="&#x2601;" d="M503 1089q110 0 200.5 -59.5t134.5 -156.5q44 14 90 14q120 0 205 -86.5t85 -206.5q0 -121 -85 -207.5t-205 -86.5h-750q-79 0 -135.5 57t-56.5 137q0 69 42.5 122.5t108.5 67.5q-2 12 -2 37q0 153 108 260.5t260 107.5z" />
35
+ <glyph unicode="&#x26fa;" d="M774 1193.5q16 -9.5 20.5 -27t-5.5 -33.5l-136 -187l467 -746h30q20 0 35 -18.5t15 -39.5v-42h-1200v42q0 21 15 39.5t35 18.5h30l468 746l-135 183q-10 16 -5.5 34t20.5 28t34 5.5t28 -20.5l111 -148l112 150q9 16 27 20.5t34 -5zM600 200h377l-182 112l-195 534v-646z " />
36
+ <glyph unicode="&#x2709;" d="M25 1100h1150q10 0 12.5 -5t-5.5 -13l-564 -567q-8 -8 -18 -8t-18 8l-564 567q-8 8 -5.5 13t12.5 5zM18 882l264 -264q8 -8 8 -18t-8 -18l-264 -264q-8 -8 -13 -5.5t-5 12.5v550q0 10 5 12.5t13 -5.5zM918 618l264 264q8 8 13 5.5t5 -12.5v-550q0 -10 -5 -12.5t-13 5.5 l-264 264q-8 8 -8 18t8 18zM818 482l364 -364q8 -8 5.5 -13t-12.5 -5h-1150q-10 0 -12.5 5t5.5 13l364 364q8 8 18 8t18 -8l164 -164q8 -8 18 -8t18 8l164 164q8 8 18 8t18 -8z" />
37
+ <glyph unicode="&#x270f;" d="M1011 1210q19 0 33 -13l153 -153q13 -14 13 -33t-13 -33l-99 -92l-214 214l95 96q13 14 32 14zM1013 800l-615 -614l-214 214l614 614zM317 96l-333 -112l110 335z" />
38
+ <glyph unicode="&#xe001;" d="M700 650v-550h250q21 0 35.5 -14.5t14.5 -35.5v-50h-800v50q0 21 14.5 35.5t35.5 14.5h250v550l-500 550h1200z" />
39
+ <glyph unicode="&#xe002;" d="M368 1017l645 163q39 15 63 0t24 -49v-831q0 -55 -41.5 -95.5t-111.5 -63.5q-79 -25 -147 -4.5t-86 75t25.5 111.5t122.5 82q72 24 138 8v521l-600 -155v-606q0 -42 -44 -90t-109 -69q-79 -26 -147 -5.5t-86 75.5t25.5 111.5t122.5 82.5q72 24 138 7v639q0 38 14.5 59 t53.5 34z" />
40
+ <glyph unicode="&#xe003;" d="M500 1191q100 0 191 -39t156.5 -104.5t104.5 -156.5t39 -191l-1 -2l1 -5q0 -141 -78 -262l275 -274q23 -26 22.5 -44.5t-22.5 -42.5l-59 -58q-26 -20 -46.5 -20t-39.5 20l-275 274q-119 -77 -261 -77l-5 1l-2 -1q-100 0 -191 39t-156.5 104.5t-104.5 156.5t-39 191 t39 191t104.5 156.5t156.5 104.5t191 39zM500 1022q-88 0 -162 -43t-117 -117t-43 -162t43 -162t117 -117t162 -43t162 43t117 117t43 162t-43 162t-117 117t-162 43z" />
41
+ <glyph unicode="&#xe005;" d="M649 949q48 68 109.5 104t121.5 38.5t118.5 -20t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-150 152.5t-126.5 127.5t-93.5 124.5t-33.5 117.5q0 64 28 123t73 100.5t104 64t119 20 t120.5 -38.5t104.5 -104z" />
42
+ <glyph unicode="&#xe006;" d="M407 800l131 353q7 19 17.5 19t17.5 -19l129 -353h421q21 0 24 -8.5t-14 -20.5l-342 -249l130 -401q7 -20 -0.5 -25.5t-24.5 6.5l-343 246l-342 -247q-17 -12 -24.5 -6.5t-0.5 25.5l130 400l-347 251q-17 12 -14 20.5t23 8.5h429z" />
43
+ <glyph unicode="&#xe007;" d="M407 800l131 353q7 19 17.5 19t17.5 -19l129 -353h421q21 0 24 -8.5t-14 -20.5l-342 -249l130 -401q7 -20 -0.5 -25.5t-24.5 6.5l-343 246l-342 -247q-17 -12 -24.5 -6.5t-0.5 25.5l130 400l-347 251q-17 12 -14 20.5t23 8.5h429zM477 700h-240l197 -142l-74 -226 l193 139l195 -140l-74 229l192 140h-234l-78 211z" />
44
+ <glyph unicode="&#xe008;" d="M600 1200q124 0 212 -88t88 -212v-250q0 -46 -31 -98t-69 -52v-75q0 -10 6 -21.5t15 -17.5l358 -230q9 -5 15 -16.5t6 -21.5v-93q0 -10 -7.5 -17.5t-17.5 -7.5h-1150q-10 0 -17.5 7.5t-7.5 17.5v93q0 10 6 21.5t15 16.5l358 230q9 6 15 17.5t6 21.5v75q-38 0 -69 52 t-31 98v250q0 124 88 212t212 88z" />
45
+ <glyph unicode="&#xe009;" d="M25 1100h1150q10 0 17.5 -7.5t7.5 -17.5v-1050q0 -10 -7.5 -17.5t-17.5 -7.5h-1150q-10 0 -17.5 7.5t-7.5 17.5v1050q0 10 7.5 17.5t17.5 7.5zM100 1000v-100h100v100h-100zM875 1000h-550q-10 0 -17.5 -7.5t-7.5 -17.5v-350q0 -10 7.5 -17.5t17.5 -7.5h550 q10 0 17.5 7.5t7.5 17.5v350q0 10 -7.5 17.5t-17.5 7.5zM1000 1000v-100h100v100h-100zM100 800v-100h100v100h-100zM1000 800v-100h100v100h-100zM100 600v-100h100v100h-100zM1000 600v-100h100v100h-100zM875 500h-550q-10 0 -17.5 -7.5t-7.5 -17.5v-350q0 -10 7.5 -17.5 t17.5 -7.5h550q10 0 17.5 7.5t7.5 17.5v350q0 10 -7.5 17.5t-17.5 7.5zM100 400v-100h100v100h-100zM1000 400v-100h100v100h-100zM100 200v-100h100v100h-100zM1000 200v-100h100v100h-100z" />
46
+ <glyph unicode="&#xe010;" d="M50 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM650 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400 q0 21 14.5 35.5t35.5 14.5zM50 500h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM650 500h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
47
+ <glyph unicode="&#xe011;" d="M50 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200 q0 21 14.5 35.5t35.5 14.5zM850 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200 q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM850 700h200q21 0 35.5 -14.5t14.5 -35.5v-200 q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 300h200 q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM850 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5 t35.5 14.5z" />
48
+ <glyph unicode="&#xe012;" d="M50 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 1100h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v200 q0 21 14.5 35.5t35.5 14.5zM50 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 700h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700 q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 300h700q21 0 35.5 -14.5t14.5 -35.5v-200 q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5z" />
49
+ <glyph unicode="&#xe013;" d="M465 477l571 571q8 8 18 8t17 -8l177 -177q8 -7 8 -17t-8 -18l-783 -784q-7 -8 -17.5 -8t-17.5 8l-384 384q-8 8 -8 18t8 17l177 177q7 8 17 8t18 -8l171 -171q7 -7 18 -7t18 7z" />
50
+ <glyph unicode="&#xe014;" d="M904 1083l178 -179q8 -8 8 -18.5t-8 -17.5l-267 -268l267 -268q8 -7 8 -17.5t-8 -18.5l-178 -178q-8 -8 -18.5 -8t-17.5 8l-268 267l-268 -267q-7 -8 -17.5 -8t-18.5 8l-178 178q-8 8 -8 18.5t8 17.5l267 268l-267 268q-8 7 -8 17.5t8 18.5l178 178q8 8 18.5 8t17.5 -8 l268 -267l268 268q7 7 17.5 7t18.5 -7z" />
51
+ <glyph unicode="&#xe015;" d="M507 1177q98 0 187.5 -38.5t154.5 -103.5t103.5 -154.5t38.5 -187.5q0 -141 -78 -262l300 -299q8 -8 8 -18.5t-8 -18.5l-109 -108q-7 -8 -17.5 -8t-18.5 8l-300 299q-119 -77 -261 -77q-98 0 -188 38.5t-154.5 103t-103 154.5t-38.5 188t38.5 187.5t103 154.5 t154.5 103.5t188 38.5zM506.5 1023q-89.5 0 -165.5 -44t-120 -120.5t-44 -166t44 -165.5t120 -120t165.5 -44t166 44t120.5 120t44 165.5t-44 166t-120.5 120.5t-166 44zM425 900h150q10 0 17.5 -7.5t7.5 -17.5v-75h75q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5 t-17.5 -7.5h-75v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-75q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h75v75q0 10 7.5 17.5t17.5 7.5z" />
52
+ <glyph unicode="&#xe016;" d="M507 1177q98 0 187.5 -38.5t154.5 -103.5t103.5 -154.5t38.5 -187.5q0 -141 -78 -262l300 -299q8 -8 8 -18.5t-8 -18.5l-109 -108q-7 -8 -17.5 -8t-18.5 8l-300 299q-119 -77 -261 -77q-98 0 -188 38.5t-154.5 103t-103 154.5t-38.5 188t38.5 187.5t103 154.5 t154.5 103.5t188 38.5zM506.5 1023q-89.5 0 -165.5 -44t-120 -120.5t-44 -166t44 -165.5t120 -120t165.5 -44t166 44t120.5 120t44 165.5t-44 166t-120.5 120.5t-166 44zM325 800h350q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-350q-10 0 -17.5 7.5 t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
53
+ <glyph unicode="&#xe017;" d="M550 1200h100q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM800 975v166q167 -62 272 -209.5t105 -331.5q0 -117 -45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5 t-184.5 123t-123 184.5t-45.5 224q0 184 105 331.5t272 209.5v-166q-103 -55 -165 -155t-62 -220q0 -116 57 -214.5t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5q0 120 -62 220t-165 155z" />
54
+ <glyph unicode="&#xe018;" d="M1025 1200h150q10 0 17.5 -7.5t7.5 -17.5v-1150q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v1150q0 10 7.5 17.5t17.5 7.5zM725 800h150q10 0 17.5 -7.5t7.5 -17.5v-750q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v750 q0 10 7.5 17.5t17.5 7.5zM425 500h150q10 0 17.5 -7.5t7.5 -17.5v-450q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v450q0 10 7.5 17.5t17.5 7.5zM125 300h150q10 0 17.5 -7.5t7.5 -17.5v-250q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5 v250q0 10 7.5 17.5t17.5 7.5z" />
55
+ <glyph unicode="&#xe019;" d="M600 1174q33 0 74 -5l38 -152l5 -1q49 -14 94 -39l5 -2l134 80q61 -48 104 -105l-80 -134l3 -5q25 -44 39 -93l1 -6l152 -38q5 -43 5 -73q0 -34 -5 -74l-152 -38l-1 -6q-15 -49 -39 -93l-3 -5l80 -134q-48 -61 -104 -105l-134 81l-5 -3q-44 -25 -94 -39l-5 -2l-38 -151 q-43 -5 -74 -5q-33 0 -74 5l-38 151l-5 2q-49 14 -94 39l-5 3l-134 -81q-60 48 -104 105l80 134l-3 5q-25 45 -38 93l-2 6l-151 38q-6 42 -6 74q0 33 6 73l151 38l2 6q13 48 38 93l3 5l-80 134q47 61 105 105l133 -80l5 2q45 25 94 39l5 1l38 152q43 5 74 5zM600 815 q-89 0 -152 -63t-63 -151.5t63 -151.5t152 -63t152 63t63 151.5t-63 151.5t-152 63z" />
56
+ <glyph unicode="&#xe020;" d="M500 1300h300q41 0 70.5 -29.5t29.5 -70.5v-100h275q10 0 17.5 -7.5t7.5 -17.5v-75h-1100v75q0 10 7.5 17.5t17.5 7.5h275v100q0 41 29.5 70.5t70.5 29.5zM500 1200v-100h300v100h-300zM1100 900v-800q0 -41 -29.5 -70.5t-70.5 -29.5h-700q-41 0 -70.5 29.5t-29.5 70.5 v800h900zM300 800v-700h100v700h-100zM500 800v-700h100v700h-100zM700 800v-700h100v700h-100zM900 800v-700h100v700h-100z" />
57
+ <glyph unicode="&#xe021;" d="M18 618l620 608q8 7 18.5 7t17.5 -7l608 -608q8 -8 5.5 -13t-12.5 -5h-175v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v375h-300v-375q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v575h-175q-10 0 -12.5 5t5.5 13z" />
58
+ <glyph unicode="&#xe022;" d="M600 1200v-400q0 -41 29.5 -70.5t70.5 -29.5h300v-650q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v1100q0 21 14.5 35.5t35.5 14.5h450zM1000 800h-250q-21 0 -35.5 14.5t-14.5 35.5v250z" />
59
+ <glyph unicode="&#xe023;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM525 900h50q10 0 17.5 -7.5t7.5 -17.5v-275h175q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5z" />
60
+ <glyph unicode="&#xe024;" d="M1300 0h-538l-41 400h-242l-41 -400h-538l431 1200h209l-21 -300h162l-20 300h208zM515 800l-27 -300h224l-27 300h-170z" />
61
+ <glyph unicode="&#xe025;" d="M550 1200h200q21 0 35.5 -14.5t14.5 -35.5v-450h191q20 0 25.5 -11.5t-7.5 -27.5l-327 -400q-13 -16 -32 -16t-32 16l-327 400q-13 16 -7.5 27.5t25.5 11.5h191v450q0 21 14.5 35.5t35.5 14.5zM1125 400h50q10 0 17.5 -7.5t7.5 -17.5v-350q0 -10 -7.5 -17.5t-17.5 -7.5 h-1050q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h50q10 0 17.5 -7.5t7.5 -17.5v-175h900v175q0 10 7.5 17.5t17.5 7.5z" />
62
+ <glyph unicode="&#xe026;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM525 900h150q10 0 17.5 -7.5t7.5 -17.5v-275h137q21 0 26 -11.5t-8 -27.5l-223 -275q-13 -16 -32 -16t-32 16l-223 275q-13 16 -8 27.5t26 11.5h137v275q0 10 7.5 17.5t17.5 7.5z " />
63
+ <glyph unicode="&#xe027;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM632 914l223 -275q13 -16 8 -27.5t-26 -11.5h-137v-275q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v275h-137q-21 0 -26 11.5t8 27.5l223 275q13 16 32 16 t32 -16z" />
64
+ <glyph unicode="&#xe028;" d="M225 1200h750q10 0 19.5 -7t12.5 -17l186 -652q7 -24 7 -49v-425q0 -12 -4 -27t-9 -17q-12 -6 -37 -6h-1100q-12 0 -27 4t-17 8q-6 13 -6 38l1 425q0 25 7 49l185 652q3 10 12.5 17t19.5 7zM878 1000h-556q-10 0 -19 -7t-11 -18l-87 -450q-2 -11 4 -18t16 -7h150 q10 0 19.5 -7t11.5 -17l38 -152q2 -10 11.5 -17t19.5 -7h250q10 0 19.5 7t11.5 17l38 152q2 10 11.5 17t19.5 7h150q10 0 16 7t4 18l-87 450q-2 11 -11 18t-19 7z" />
65
+ <glyph unicode="&#xe029;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM540 820l253 -190q17 -12 17 -30t-17 -30l-253 -190q-16 -12 -28 -6.5t-12 26.5v400q0 21 12 26.5t28 -6.5z" />
66
+ <glyph unicode="&#xe030;" d="M947 1060l135 135q7 7 12.5 5t5.5 -13v-362q0 -10 -7.5 -17.5t-17.5 -7.5h-362q-11 0 -13 5.5t5 12.5l133 133q-109 76 -238 76q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5h150q0 -117 -45.5 -224 t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5q192 0 347 -117z" />
67
+ <glyph unicode="&#xe031;" d="M947 1060l135 135q7 7 12.5 5t5.5 -13v-361q0 -11 -7.5 -18.5t-18.5 -7.5h-361q-11 0 -13 5.5t5 12.5l134 134q-110 75 -239 75q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5h-150q0 117 45.5 224t123 184.5t184.5 123t224 45.5q192 0 347 -117zM1027 600h150 q0 -117 -45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5q-192 0 -348 118l-134 -134q-7 -8 -12.5 -5.5t-5.5 12.5v360q0 11 7.5 18.5t18.5 7.5h360q10 0 12.5 -5.5t-5.5 -12.5l-133 -133q110 -76 240 -76q116 0 214.5 57t155.5 155.5t57 214.5z" />
68
+ <glyph unicode="&#xe032;" d="M125 1200h1050q10 0 17.5 -7.5t7.5 -17.5v-1150q0 -10 -7.5 -17.5t-17.5 -7.5h-1050q-10 0 -17.5 7.5t-7.5 17.5v1150q0 10 7.5 17.5t17.5 7.5zM1075 1000h-850q-10 0 -17.5 -7.5t-7.5 -17.5v-850q0 -10 7.5 -17.5t17.5 -7.5h850q10 0 17.5 7.5t7.5 17.5v850 q0 10 -7.5 17.5t-17.5 7.5zM325 900h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 900h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 700h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 700h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 500h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 500h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 300h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 300h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5z" />
69
+ <glyph unicode="&#xe033;" d="M900 800v200q0 83 -58.5 141.5t-141.5 58.5h-300q-82 0 -141 -59t-59 -141v-200h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-600q0 -41 29.5 -70.5t70.5 -29.5h900q41 0 70.5 29.5t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5h-100zM400 800v150q0 21 15 35.5t35 14.5h200 q20 0 35 -14.5t15 -35.5v-150h-300z" />
70
+ <glyph unicode="&#xe034;" d="M125 1100h50q10 0 17.5 -7.5t7.5 -17.5v-1075h-100v1075q0 10 7.5 17.5t17.5 7.5zM1075 1052q4 0 9 -2q16 -6 16 -23v-421q0 -6 -3 -12q-33 -59 -66.5 -99t-65.5 -58t-56.5 -24.5t-52.5 -6.5q-26 0 -57.5 6.5t-52.5 13.5t-60 21q-41 15 -63 22.5t-57.5 15t-65.5 7.5 q-85 0 -160 -57q-7 -5 -15 -5q-6 0 -11 3q-14 7 -14 22v438q22 55 82 98.5t119 46.5q23 2 43 0.5t43 -7t32.5 -8.5t38 -13t32.5 -11q41 -14 63.5 -21t57 -14t63.5 -7q103 0 183 87q7 8 18 8z" />
71
+ <glyph unicode="&#xe035;" d="M600 1175q116 0 227 -49.5t192.5 -131t131 -192.5t49.5 -227v-300q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v300q0 127 -70.5 231.5t-184.5 161.5t-245 57t-245 -57t-184.5 -161.5t-70.5 -231.5v-300q0 -10 -7.5 -17.5t-17.5 -7.5h-50 q-10 0 -17.5 7.5t-7.5 17.5v300q0 116 49.5 227t131 192.5t192.5 131t227 49.5zM220 500h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14v460q0 8 6 14t14 6zM820 500h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14v460 q0 8 6 14t14 6z" />
72
+ <glyph unicode="&#xe036;" d="M321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM900 668l120 120q7 7 17 7t17 -7l34 -34q7 -7 7 -17t-7 -17l-120 -120l120 -120q7 -7 7 -17 t-7 -17l-34 -34q-7 -7 -17 -7t-17 7l-120 119l-120 -119q-7 -7 -17 -7t-17 7l-34 34q-7 7 -7 17t7 17l119 120l-119 120q-7 7 -7 17t7 17l34 34q7 8 17 8t17 -8z" />
73
+ <glyph unicode="&#xe037;" d="M321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM766 900h4q10 -1 16 -10q96 -129 96 -290q0 -154 -90 -281q-6 -9 -17 -10l-3 -1q-9 0 -16 6 l-29 23q-7 7 -8.5 16.5t4.5 17.5q72 103 72 229q0 132 -78 238q-6 8 -4.5 18t9.5 17l29 22q7 5 15 5z" />
74
+ <glyph unicode="&#xe038;" d="M967 1004h3q11 -1 17 -10q135 -179 135 -396q0 -105 -34 -206.5t-98 -185.5q-7 -9 -17 -10h-3q-9 0 -16 6l-42 34q-8 6 -9 16t5 18q111 150 111 328q0 90 -29.5 176t-84.5 157q-6 9 -5 19t10 16l42 33q7 5 15 5zM321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5 t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM766 900h4q10 -1 16 -10q96 -129 96 -290q0 -154 -90 -281q-6 -9 -17 -10l-3 -1q-9 0 -16 6l-29 23q-7 7 -8.5 16.5t4.5 17.5q72 103 72 229q0 132 -78 238 q-6 8 -4.5 18.5t9.5 16.5l29 22q7 5 15 5z" />
75
+ <glyph unicode="&#xe039;" d="M500 900h100v-100h-100v-100h-400v-100h-100v600h500v-300zM1200 700h-200v-100h200v-200h-300v300h-200v300h-100v200h600v-500zM100 1100v-300h300v300h-300zM800 1100v-300h300v300h-300zM300 900h-100v100h100v-100zM1000 900h-100v100h100v-100zM300 500h200v-500 h-500v500h200v100h100v-100zM800 300h200v-100h-100v-100h-200v100h-100v100h100v200h-200v100h300v-300zM100 400v-300h300v300h-300zM300 200h-100v100h100v-100zM1200 200h-100v100h100v-100zM700 0h-100v100h100v-100zM1200 0h-300v100h300v-100z" />
76
+ <glyph unicode="&#xe040;" d="M100 200h-100v1000h100v-1000zM300 200h-100v1000h100v-1000zM700 200h-200v1000h200v-1000zM900 200h-100v1000h100v-1000zM1200 200h-200v1000h200v-1000zM400 0h-300v100h300v-100zM600 0h-100v91h100v-91zM800 0h-100v91h100v-91zM1100 0h-200v91h200v-91z" />
77
+ <glyph unicode="&#xe041;" d="M500 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-682 682l1 475q0 10 7.5 17.5t17.5 7.5h474zM319.5 1024.5q-29.5 29.5 -71 29.5t-71 -29.5t-29.5 -71.5t29.5 -71.5t71 -29.5t71 29.5t29.5 71.5t-29.5 71.5z" />
78
+ <glyph unicode="&#xe042;" d="M500 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-682 682l1 475q0 10 7.5 17.5t17.5 7.5h474zM800 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-56 56l424 426l-700 700h150zM319.5 1024.5q-29.5 29.5 -71 29.5t-71 -29.5 t-29.5 -71.5t29.5 -71.5t71 -29.5t71 29.5t29.5 71.5t-29.5 71.5z" />
79
+ <glyph unicode="&#xe043;" d="M300 1200h825q75 0 75 -75v-900q0 -25 -18 -43l-64 -64q-8 -8 -13 -5.5t-5 12.5v950q0 10 -7.5 17.5t-17.5 7.5h-700q-25 0 -43 -18l-64 -64q-8 -8 -5.5 -13t12.5 -5h700q10 0 17.5 -7.5t7.5 -17.5v-950q0 -10 -7.5 -17.5t-17.5 -7.5h-850q-10 0 -17.5 7.5t-7.5 17.5v975 q0 25 18 43l139 139q18 18 43 18z" />
80
+ <glyph unicode="&#xe044;" d="M250 1200h800q21 0 35.5 -14.5t14.5 -35.5v-1150l-450 444l-450 -445v1151q0 21 14.5 35.5t35.5 14.5z" />
81
+ <glyph unicode="&#xe045;" d="M822 1200h-444q-11 0 -19 -7.5t-9 -17.5l-78 -301q-7 -24 7 -45l57 -108q6 -9 17.5 -15t21.5 -6h450q10 0 21.5 6t17.5 15l62 108q14 21 7 45l-83 301q-1 10 -9 17.5t-19 7.5zM1175 800h-150q-10 0 -21 -6.5t-15 -15.5l-78 -156q-4 -9 -15 -15.5t-21 -6.5h-550 q-10 0 -21 6.5t-15 15.5l-78 156q-4 9 -15 15.5t-21 6.5h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-650q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h750q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5 t7.5 17.5v650q0 10 -7.5 17.5t-17.5 7.5zM850 200h-500q-10 0 -19.5 -7t-11.5 -17l-38 -152q-2 -10 3.5 -17t15.5 -7h600q10 0 15.5 7t3.5 17l-38 152q-2 10 -11.5 17t-19.5 7z" />
82
+ <glyph unicode="&#xe046;" d="M500 1100h200q56 0 102.5 -20.5t72.5 -50t44 -59t25 -50.5l6 -20h150q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v600q0 41 29.5 70.5t70.5 29.5h150q2 8 6.5 21.5t24 48t45 61t72 48t102.5 21.5zM900 800v-100 h100v100h-100zM600 730q-95 0 -162.5 -67.5t-67.5 -162.5t67.5 -162.5t162.5 -67.5t162.5 67.5t67.5 162.5t-67.5 162.5t-162.5 67.5zM600 603q43 0 73 -30t30 -73t-30 -73t-73 -30t-73 30t-30 73t30 73t73 30z" />
83
+ <glyph unicode="&#xe047;" d="M681 1199l385 -998q20 -50 60 -92q18 -19 36.5 -29.5t27.5 -11.5l10 -2v-66h-417v66q53 0 75 43.5t5 88.5l-82 222h-391q-58 -145 -92 -234q-11 -34 -6.5 -57t25.5 -37t46 -20t55 -6v-66h-365v66q56 24 84 52q12 12 25 30.5t20 31.5l7 13l399 1006h93zM416 521h340 l-162 457z" />
84
+ <glyph unicode="&#xe048;" d="M753 641q5 -1 14.5 -4.5t36 -15.5t50.5 -26.5t53.5 -40t50.5 -54.5t35.5 -70t14.5 -87q0 -67 -27.5 -125.5t-71.5 -97.5t-98.5 -66.5t-108.5 -40.5t-102 -13h-500v89q41 7 70.5 32.5t29.5 65.5v827q0 24 -0.5 34t-3.5 24t-8.5 19.5t-17 13.5t-28 12.5t-42.5 11.5v71 l471 -1q57 0 115.5 -20.5t108 -57t80.5 -94t31 -124.5q0 -51 -15.5 -96.5t-38 -74.5t-45 -50.5t-38.5 -30.5zM400 700h139q78 0 130.5 48.5t52.5 122.5q0 41 -8.5 70.5t-29.5 55.5t-62.5 39.5t-103.5 13.5h-118v-350zM400 200h216q80 0 121 50.5t41 130.5q0 90 -62.5 154.5 t-156.5 64.5h-159v-400z" />
85
+ <glyph unicode="&#xe049;" d="M877 1200l2 -57q-83 -19 -116 -45.5t-40 -66.5l-132 -839q-9 -49 13 -69t96 -26v-97h-500v97q186 16 200 98l173 832q3 17 3 30t-1.5 22.5t-9 17.5t-13.5 12.5t-21.5 10t-26 8.5t-33.5 10q-13 3 -19 5v57h425z" />
86
+ <glyph unicode="&#xe050;" d="M1300 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-850q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v850h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM175 1000h-75v-800h75l-125 -167l-125 167h75v800h-75l125 167z" />
87
+ <glyph unicode="&#xe051;" d="M1100 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-650q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v650h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM1167 50l-167 -125v75h-800v-75l-167 125l167 125v-75h800v75z" />
88
+ <glyph unicode="&#xe052;" d="M50 1100h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 500h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
89
+ <glyph unicode="&#xe053;" d="M250 1100h700q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM250 500h700q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
90
+ <glyph unicode="&#xe054;" d="M500 950v100q0 21 14.5 35.5t35.5 14.5h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5zM100 650v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000 q-21 0 -35.5 14.5t-14.5 35.5zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5zM0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100 q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5z" />
91
+ <glyph unicode="&#xe055;" d="M50 1100h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 500h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
92
+ <glyph unicode="&#xe056;" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 1100h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 800h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 500h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 500h800q21 0 35.5 -14.5t14.5 -35.5v-100 q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 200h800 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
93
+ <glyph unicode="&#xe057;" d="M400 0h-100v1100h100v-1100zM550 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM550 800h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM267 550l-167 -125v75h-200v100h200v75zM550 500h300q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM550 200h600 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
94
+ <glyph unicode="&#xe058;" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM900 0h-100v1100h100v-1100zM50 800h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM1100 600h200v-100h-200v-75l-167 125l167 125v-75zM50 500h300q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h600 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
95
+ <glyph unicode="&#xe059;" d="M75 1000h750q31 0 53 -22t22 -53v-650q0 -31 -22 -53t-53 -22h-750q-31 0 -53 22t-22 53v650q0 31 22 53t53 22zM1200 300l-300 300l300 300v-600z" />
96
+ <glyph unicode="&#xe060;" d="M44 1100h1112q18 0 31 -13t13 -31v-1012q0 -18 -13 -31t-31 -13h-1112q-18 0 -31 13t-13 31v1012q0 18 13 31t31 13zM100 1000v-737l247 182l298 -131l-74 156l293 318l236 -288v500h-1000zM342 884q56 0 95 -39t39 -94.5t-39 -95t-95 -39.5t-95 39.5t-39 95t39 94.5 t95 39z" />
97
+ <glyph unicode="&#xe062;" d="M648 1169q117 0 216 -60t156.5 -161t57.5 -218q0 -115 -70 -258q-69 -109 -158 -225.5t-143 -179.5l-54 -62q-9 8 -25.5 24.5t-63.5 67.5t-91 103t-98.5 128t-95.5 148q-60 132 -60 249q0 88 34 169.5t91.5 142t137 96.5t166.5 36zM652.5 974q-91.5 0 -156.5 -65 t-65 -157t65 -156.5t156.5 -64.5t156.5 64.5t65 156.5t-65 157t-156.5 65z" />
98
+ <glyph unicode="&#xe063;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 173v854q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57z" />
99
+ <glyph unicode="&#xe064;" d="M554 1295q21 -72 57.5 -143.5t76 -130t83 -118t82.5 -117t70 -116t49.5 -126t18.5 -136.5q0 -71 -25.5 -135t-68.5 -111t-99 -82t-118.5 -54t-125.5 -23q-84 5 -161.5 34t-139.5 78.5t-99 125t-37 164.5q0 69 18 136.5t49.5 126.5t69.5 116.5t81.5 117.5t83.5 119 t76.5 131t58.5 143zM344 710q-23 -33 -43.5 -70.5t-40.5 -102.5t-17 -123q1 -37 14.5 -69.5t30 -52t41 -37t38.5 -24.5t33 -15q21 -7 32 -1t13 22l6 34q2 10 -2.5 22t-13.5 19q-5 4 -14 12t-29.5 40.5t-32.5 73.5q-26 89 6 271q2 11 -6 11q-8 1 -15 -10z" />
100
+ <glyph unicode="&#xe065;" d="M1000 1013l108 115q2 1 5 2t13 2t20.5 -1t25 -9.5t28.5 -21.5q22 -22 27 -43t0 -32l-6 -10l-108 -115zM350 1100h400q50 0 105 -13l-187 -187h-368q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v182l200 200v-332 q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5zM1009 803l-362 -362l-161 -50l55 170l355 355z" />
101
+ <glyph unicode="&#xe066;" d="M350 1100h361q-164 -146 -216 -200h-195q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5l200 153v-103q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5z M824 1073l339 -301q8 -7 8 -17.5t-8 -17.5l-340 -306q-7 -6 -12.5 -4t-6.5 11v203q-26 1 -54.5 0t-78.5 -7.5t-92 -17.5t-86 -35t-70 -57q10 59 33 108t51.5 81.5t65 58.5t68.5 40.5t67 24.5t56 13.5t40 4.5v210q1 10 6.5 12.5t13.5 -4.5z" />
102
+ <glyph unicode="&#xe067;" d="M350 1100h350q60 0 127 -23l-178 -177h-349q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v69l200 200v-219q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5z M643 639l395 395q7 7 17.5 7t17.5 -7l101 -101q7 -7 7 -17.5t-7 -17.5l-531 -532q-7 -7 -17.5 -7t-17.5 7l-248 248q-7 7 -7 17.5t7 17.5l101 101q7 7 17.5 7t17.5 -7l111 -111q8 -7 18 -7t18 7z" />
103
+ <glyph unicode="&#xe068;" d="M318 918l264 264q8 8 18 8t18 -8l260 -264q7 -8 4.5 -13t-12.5 -5h-170v-200h200v173q0 10 5 12t13 -5l264 -260q8 -7 8 -17.5t-8 -17.5l-264 -265q-8 -7 -13 -5t-5 12v173h-200v-200h170q10 0 12.5 -5t-4.5 -13l-260 -264q-8 -8 -18 -8t-18 8l-264 264q-8 8 -5.5 13 t12.5 5h175v200h-200v-173q0 -10 -5 -12t-13 5l-264 265q-8 7 -8 17.5t8 17.5l264 260q8 7 13 5t5 -12v-173h200v200h-175q-10 0 -12.5 5t5.5 13z" />
104
+ <glyph unicode="&#xe069;" d="M250 1100h100q21 0 35.5 -14.5t14.5 -35.5v-438l464 453q15 14 25.5 10t10.5 -25v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v1000q0 21 14.5 35.5t35.5 14.5z" />
105
+ <glyph unicode="&#xe070;" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-438l464 453q15 14 25.5 10t10.5 -25v-438l464 453q15 14 25.5 10t10.5 -25v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5 t-14.5 35.5v1000q0 21 14.5 35.5t35.5 14.5z" />
106
+ <glyph unicode="&#xe071;" d="M1200 1050v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -10.5 -25t-25.5 10l-492 480q-15 14 -15 35t15 35l492 480q15 14 25.5 10t10.5 -25v-438l464 453q15 14 25.5 10t10.5 -25z" />
107
+ <glyph unicode="&#xe072;" d="M243 1074l814 -498q18 -11 18 -26t-18 -26l-814 -498q-18 -11 -30.5 -4t-12.5 28v1000q0 21 12.5 28t30.5 -4z" />
108
+ <glyph unicode="&#xe073;" d="M250 1000h200q21 0 35.5 -14.5t14.5 -35.5v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5zM650 1000h200q21 0 35.5 -14.5t14.5 -35.5v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v800 q0 21 14.5 35.5t35.5 14.5z" />
109
+ <glyph unicode="&#xe074;" d="M1100 950v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5z" />
110
+ <glyph unicode="&#xe075;" d="M500 612v438q0 21 10.5 25t25.5 -10l492 -480q15 -14 15 -35t-15 -35l-492 -480q-15 -14 -25.5 -10t-10.5 25v438l-464 -453q-15 -14 -25.5 -10t-10.5 25v1000q0 21 10.5 25t25.5 -10z" />
111
+ <glyph unicode="&#xe076;" d="M1048 1102l100 1q20 0 35 -14.5t15 -35.5l5 -1000q0 -21 -14.5 -35.5t-35.5 -14.5l-100 -1q-21 0 -35.5 14.5t-14.5 35.5l-2 437l-463 -454q-14 -15 -24.5 -10.5t-10.5 25.5l-2 437l-462 -455q-15 -14 -25.5 -9.5t-10.5 24.5l-5 1000q0 21 10.5 25.5t25.5 -10.5l466 -450 l-2 438q0 20 10.5 24.5t25.5 -9.5l466 -451l-2 438q0 21 14.5 35.5t35.5 14.5z" />
112
+ <glyph unicode="&#xe077;" d="M850 1100h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438l-464 -453q-15 -14 -25.5 -10t-10.5 25v1000q0 21 10.5 25t25.5 -10l464 -453v438q0 21 14.5 35.5t35.5 14.5z" />
113
+ <glyph unicode="&#xe078;" d="M686 1081l501 -540q15 -15 10.5 -26t-26.5 -11h-1042q-22 0 -26.5 11t10.5 26l501 540q15 15 36 15t36 -15zM150 400h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
114
+ <glyph unicode="&#xe079;" d="M885 900l-352 -353l352 -353l-197 -198l-552 552l552 550z" />
115
+ <glyph unicode="&#xe080;" d="M1064 547l-551 -551l-198 198l353 353l-353 353l198 198z" />
116
+ <glyph unicode="&#xe081;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM650 900h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-150h-150 q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5t35.5 -14.5h150v-150q0 -21 14.5 -35.5t35.5 -14.5h100q21 0 35.5 14.5t14.5 35.5v150h150q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5h-150v150q0 21 -14.5 35.5t-35.5 14.5z" />
117
+ <glyph unicode="&#xe082;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM850 700h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5 t35.5 -14.5h500q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5z" />
118
+ <glyph unicode="&#xe083;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM741.5 913q-12.5 0 -21.5 -9l-120 -120l-120 120q-9 9 -21.5 9 t-21.5 -9l-141 -141q-9 -9 -9 -21.5t9 -21.5l120 -120l-120 -120q-9 -9 -9 -21.5t9 -21.5l141 -141q9 -9 21.5 -9t21.5 9l120 120l120 -120q9 -9 21.5 -9t21.5 9l141 141q9 9 9 21.5t-9 21.5l-120 120l120 120q9 9 9 21.5t-9 21.5l-141 141q-9 9 -21.5 9z" />
119
+ <glyph unicode="&#xe084;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM546 623l-84 85q-7 7 -17.5 7t-18.5 -7l-139 -139q-7 -8 -7 -18t7 -18 l242 -241q7 -8 17.5 -8t17.5 8l375 375q7 7 7 17.5t-7 18.5l-139 139q-7 7 -17.5 7t-17.5 -7z" />
120
+ <glyph unicode="&#xe085;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM588 941q-29 0 -59 -5.5t-63 -20.5t-58 -38.5t-41.5 -63t-16.5 -89.5 q0 -25 20 -25h131q30 -5 35 11q6 20 20.5 28t45.5 8q20 0 31.5 -10.5t11.5 -28.5q0 -23 -7 -34t-26 -18q-1 0 -13.5 -4t-19.5 -7.5t-20 -10.5t-22 -17t-18.5 -24t-15.5 -35t-8 -46q-1 -8 5.5 -16.5t20.5 -8.5h173q7 0 22 8t35 28t37.5 48t29.5 74t12 100q0 47 -17 83 t-42.5 57t-59.5 34.5t-64 18t-59 4.5zM675 400h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5z" />
121
+ <glyph unicode="&#xe086;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM675 1000h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5 t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5zM675 700h-250q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h75v-200h-75q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h350q10 0 17.5 7.5t7.5 17.5v50q0 10 -7.5 17.5 t-17.5 7.5h-75v275q0 10 -7.5 17.5t-17.5 7.5z" />
122
+ <glyph unicode="&#xe087;" d="M525 1200h150q10 0 17.5 -7.5t7.5 -17.5v-194q103 -27 178.5 -102.5t102.5 -178.5h194q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-194q-27 -103 -102.5 -178.5t-178.5 -102.5v-194q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v194 q-103 27 -178.5 102.5t-102.5 178.5h-194q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h194q27 103 102.5 178.5t178.5 102.5v194q0 10 7.5 17.5t17.5 7.5zM700 893v-168q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v168q-68 -23 -119 -74 t-74 -119h168q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-168q23 -68 74 -119t119 -74v168q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-168q68 23 119 74t74 119h-168q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h168 q-23 68 -74 119t-119 74z" />
123
+ <glyph unicode="&#xe088;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM759 823l64 -64q7 -7 7 -17.5t-7 -17.5l-124 -124l124 -124q7 -7 7 -17.5t-7 -17.5l-64 -64q-7 -7 -17.5 -7t-17.5 7l-124 124l-124 -124q-7 -7 -17.5 -7t-17.5 7l-64 64 q-7 7 -7 17.5t7 17.5l124 124l-124 124q-7 7 -7 17.5t7 17.5l64 64q7 7 17.5 7t17.5 -7l124 -124l124 124q7 7 17.5 7t17.5 -7z" />
124
+ <glyph unicode="&#xe089;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM782 788l106 -106q7 -7 7 -17.5t-7 -17.5l-320 -321q-8 -7 -18 -7t-18 7l-202 203q-8 7 -8 17.5t8 17.5l106 106q7 8 17.5 8t17.5 -8l79 -79l197 197q7 7 17.5 7t17.5 -7z" />
125
+ <glyph unicode="&#xe090;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5q0 -120 65 -225 l587 587q-105 65 -225 65zM965 819l-584 -584q104 -62 219 -62q116 0 214.5 57t155.5 155.5t57 214.5q0 115 -62 219z" />
126
+ <glyph unicode="&#xe091;" d="M39 582l522 427q16 13 27.5 8t11.5 -26v-291h550q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-550v-291q0 -21 -11.5 -26t-27.5 8l-522 427q-16 13 -16 32t16 32z" />
127
+ <glyph unicode="&#xe092;" d="M639 1009l522 -427q16 -13 16 -32t-16 -32l-522 -427q-16 -13 -27.5 -8t-11.5 26v291h-550q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h550v291q0 21 11.5 26t27.5 -8z" />
128
+ <glyph unicode="&#xe093;" d="M682 1161l427 -522q13 -16 8 -27.5t-26 -11.5h-291v-550q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v550h-291q-21 0 -26 11.5t8 27.5l427 522q13 16 32 16t32 -16z" />
129
+ <glyph unicode="&#xe094;" d="M550 1200h200q21 0 35.5 -14.5t14.5 -35.5v-550h291q21 0 26 -11.5t-8 -27.5l-427 -522q-13 -16 -32 -16t-32 16l-427 522q-13 16 -8 27.5t26 11.5h291v550q0 21 14.5 35.5t35.5 14.5z" />
130
+ <glyph unicode="&#xe095;" d="M639 1109l522 -427q16 -13 16 -32t-16 -32l-522 -427q-16 -13 -27.5 -8t-11.5 26v291q-94 -2 -182 -20t-170.5 -52t-147 -92.5t-100.5 -135.5q5 105 27 193.5t67.5 167t113 135t167 91.5t225.5 42v262q0 21 11.5 26t27.5 -8z" />
131
+ <glyph unicode="&#xe096;" d="M850 1200h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94l-249 -249q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l249 249l-94 94q-14 14 -10 24.5t25 10.5zM350 0h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l249 249 q8 7 18 7t18 -7l106 -106q7 -8 7 -18t-7 -18l-249 -249l94 -94q14 -14 10 -24.5t-25 -10.5z" />
132
+ <glyph unicode="&#xe097;" d="M1014 1120l106 -106q7 -8 7 -18t-7 -18l-249 -249l94 -94q14 -14 10 -24.5t-25 -10.5h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l249 249q8 7 18 7t18 -7zM250 600h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94 l-249 -249q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l249 249l-94 94q-14 14 -10 24.5t25 10.5z" />
133
+ <glyph unicode="&#xe101;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM704 900h-208q-20 0 -32 -14.5t-8 -34.5l58 -302q4 -20 21.5 -34.5 t37.5 -14.5h54q20 0 37.5 14.5t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5zM675 400h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5z" />
134
+ <glyph unicode="&#xe102;" d="M260 1200q9 0 19 -2t15 -4l5 -2q22 -10 44 -23l196 -118q21 -13 36 -24q29 -21 37 -12q11 13 49 35l196 118q22 13 45 23q17 7 38 7q23 0 47 -16.5t37 -33.5l13 -16q14 -21 18 -45l25 -123l8 -44q1 -9 8.5 -14.5t17.5 -5.5h61q10 0 17.5 -7.5t7.5 -17.5v-50 q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 -7.5t-7.5 -17.5v-175h-400v300h-200v-300h-400v175q0 10 -7.5 17.5t-17.5 7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5h61q11 0 18 3t7 8q0 4 9 52l25 128q5 25 19 45q2 3 5 7t13.5 15t21.5 19.5t26.5 15.5 t29.5 7zM915 1079l-166 -162q-7 -7 -5 -12t12 -5h219q10 0 15 7t2 17l-51 149q-3 10 -11 12t-15 -6zM463 917l-177 157q-8 7 -16 5t-11 -12l-51 -143q-3 -10 2 -17t15 -7h231q11 0 12.5 5t-5.5 12zM500 0h-375q-10 0 -17.5 7.5t-7.5 17.5v375h400v-400zM1100 400v-375 q0 -10 -7.5 -17.5t-17.5 -7.5h-375v400h400z" />
135
+ <glyph unicode="&#xe103;" d="M1165 1190q8 3 21 -6.5t13 -17.5q-2 -178 -24.5 -323.5t-55.5 -245.5t-87 -174.5t-102.5 -118.5t-118 -68.5t-118.5 -33t-120 -4.5t-105 9.5t-90 16.5q-61 12 -78 11q-4 1 -12.5 0t-34 -14.5t-52.5 -40.5l-153 -153q-26 -24 -37 -14.5t-11 43.5q0 64 42 102q8 8 50.5 45 t66.5 58q19 17 35 47t13 61q-9 55 -10 102.5t7 111t37 130t78 129.5q39 51 80 88t89.5 63.5t94.5 45t113.5 36t129 31t157.5 37t182 47.5zM1116 1098q-8 9 -22.5 -3t-45.5 -50q-38 -47 -119 -103.5t-142 -89.5l-62 -33q-56 -30 -102 -57t-104 -68t-102.5 -80.5t-85.5 -91 t-64 -104.5q-24 -56 -31 -86t2 -32t31.5 17.5t55.5 59.5q25 30 94 75.5t125.5 77.5t147.5 81q70 37 118.5 69t102 79.5t99 111t86.5 148.5q22 50 24 60t-6 19z" />
136
+ <glyph unicode="&#xe104;" d="M653 1231q-39 -67 -54.5 -131t-10.5 -114.5t24.5 -96.5t47.5 -80t63.5 -62.5t68.5 -46.5t65 -30q-4 7 -17.5 35t-18.5 39.5t-17 39.5t-17 43t-13 42t-9.5 44.5t-2 42t4 43t13.5 39t23 38.5q96 -42 165 -107.5t105 -138t52 -156t13 -159t-19 -149.5q-13 -55 -44 -106.5 t-68 -87t-78.5 -64.5t-72.5 -45t-53 -22q-72 -22 -127 -11q-31 6 -13 19q6 3 17 7q13 5 32.5 21t41 44t38.5 63.5t21.5 81.5t-6.5 94.5t-50 107t-104 115.5q10 -104 -0.5 -189t-37 -140.5t-65 -93t-84 -52t-93.5 -11t-95 24.5q-80 36 -131.5 114t-53.5 171q-2 23 0 49.5 t4.5 52.5t13.5 56t27.5 60t46 64.5t69.5 68.5q-8 -53 -5 -102.5t17.5 -90t34 -68.5t44.5 -39t49 -2q31 13 38.5 36t-4.5 55t-29 64.5t-36 75t-26 75.5q-15 85 2 161.5t53.5 128.5t85.5 92.5t93.5 61t81.5 25.5z" />
137
+ <glyph unicode="&#xe105;" d="M600 1094q82 0 160.5 -22.5t140 -59t116.5 -82.5t94.5 -95t68 -95t42.5 -82.5t14 -57.5t-14 -57.5t-43 -82.5t-68.5 -95t-94.5 -95t-116.5 -82.5t-140 -59t-159.5 -22.5t-159.5 22.5t-140 59t-116.5 82.5t-94.5 95t-68.5 95t-43 82.5t-14 57.5t14 57.5t42.5 82.5t68 95 t94.5 95t116.5 82.5t140 59t160.5 22.5zM888 829q-15 15 -18 12t5 -22q25 -57 25 -119q0 -124 -88 -212t-212 -88t-212 88t-88 212q0 59 23 114q8 19 4.5 22t-17.5 -12q-70 -69 -160 -184q-13 -16 -15 -40.5t9 -42.5q22 -36 47 -71t70 -82t92.5 -81t113 -58.5t133.5 -24.5 t133.5 24t113 58.5t92.5 81.5t70 81.5t47 70.5q11 18 9 42.5t-14 41.5q-90 117 -163 189zM448 727l-35 -36q-15 -15 -19.5 -38.5t4.5 -41.5q37 -68 93 -116q16 -13 38.5 -11t36.5 17l35 34q14 15 12.5 33.5t-16.5 33.5q-44 44 -89 117q-11 18 -28 20t-32 -12z" />
138
+ <glyph unicode="&#xe106;" d="M592 0h-148l31 120q-91 20 -175.5 68.5t-143.5 106.5t-103.5 119t-66.5 110t-22 76q0 21 14 57.5t42.5 82.5t68 95t94.5 95t116.5 82.5t140 59t160.5 22.5q61 0 126 -15l32 121h148zM944 770l47 181q108 -85 176.5 -192t68.5 -159q0 -26 -19.5 -71t-59.5 -102t-93 -112 t-129 -104.5t-158 -75.5l46 173q77 49 136 117t97 131q11 18 9 42.5t-14 41.5q-54 70 -107 130zM310 824q-70 -69 -160 -184q-13 -16 -15 -40.5t9 -42.5q18 -30 39 -60t57 -70.5t74 -73t90 -61t105 -41.5l41 154q-107 18 -178.5 101.5t-71.5 193.5q0 59 23 114q8 19 4.5 22 t-17.5 -12zM448 727l-35 -36q-15 -15 -19.5 -38.5t4.5 -41.5q37 -68 93 -116q16 -13 38.5 -11t36.5 17l12 11l22 86l-3 4q-44 44 -89 117q-11 18 -28 20t-32 -12z" />
139
+ <glyph unicode="&#xe107;" d="M-90 100l642 1066q20 31 48 28.5t48 -35.5l642 -1056q21 -32 7.5 -67.5t-50.5 -35.5h-1294q-37 0 -50.5 34t7.5 66zM155 200h345v75q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-75h345l-445 723zM496 700h208q20 0 32 -14.5t8 -34.5l-58 -252 q-4 -20 -21.5 -34.5t-37.5 -14.5h-54q-20 0 -37.5 14.5t-21.5 34.5l-58 252q-4 20 8 34.5t32 14.5z" />
140
+ <glyph unicode="&#xe108;" d="M650 1200q62 0 106 -44t44 -106v-339l363 -325q15 -14 26 -38.5t11 -44.5v-41q0 -20 -12 -26.5t-29 5.5l-359 249v-263q100 -93 100 -113v-64q0 -21 -13 -29t-32 1l-205 128l-205 -128q-19 -9 -32 -1t-13 29v64q0 20 100 113v263l-359 -249q-17 -12 -29 -5.5t-12 26.5v41 q0 20 11 44.5t26 38.5l363 325v339q0 62 44 106t106 44z" />
141
+ <glyph unicode="&#xe109;" d="M850 1200h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-150h-1100v150q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-50h500v50q0 21 14.5 35.5t35.5 14.5zM1100 800v-750q0 -21 -14.5 -35.5 t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v750h1100zM100 600v-100h100v100h-100zM300 600v-100h100v100h-100zM500 600v-100h100v100h-100zM700 600v-100h100v100h-100zM900 600v-100h100v100h-100zM100 400v-100h100v100h-100zM300 400v-100h100v100h-100zM500 400 v-100h100v100h-100zM700 400v-100h100v100h-100zM900 400v-100h100v100h-100zM100 200v-100h100v100h-100zM300 200v-100h100v100h-100zM500 200v-100h100v100h-100zM700 200v-100h100v100h-100zM900 200v-100h100v100h-100z" />
142
+ <glyph unicode="&#xe110;" d="M1135 1165l249 -230q15 -14 15 -35t-15 -35l-249 -230q-14 -14 -24.5 -10t-10.5 25v150h-159l-600 -600h-291q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h209l600 600h241v150q0 21 10.5 25t24.5 -10zM522 819l-141 -141l-122 122h-209q-21 0 -35.5 14.5 t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h291zM1135 565l249 -230q15 -14 15 -35t-15 -35l-249 -230q-14 -14 -24.5 -10t-10.5 25v150h-241l-181 181l141 141l122 -122h159v150q0 21 10.5 25t24.5 -10z" />
143
+ <glyph unicode="&#xe111;" d="M100 1100h1000q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-596l-304 -300v300h-100q-41 0 -70.5 29.5t-29.5 70.5v600q0 41 29.5 70.5t70.5 29.5z" />
144
+ <glyph unicode="&#xe112;" d="M150 1200h200q21 0 35.5 -14.5t14.5 -35.5v-250h-300v250q0 21 14.5 35.5t35.5 14.5zM850 1200h200q21 0 35.5 -14.5t14.5 -35.5v-250h-300v250q0 21 14.5 35.5t35.5 14.5zM1100 800v-300q0 -41 -3 -77.5t-15 -89.5t-32 -96t-58 -89t-89 -77t-129 -51t-174 -20t-174 20 t-129 51t-89 77t-58 89t-32 96t-15 89.5t-3 77.5v300h300v-250v-27v-42.5t1.5 -41t5 -38t10 -35t16.5 -30t25.5 -24.5t35 -19t46.5 -12t60 -4t60 4.5t46.5 12.5t35 19.5t25 25.5t17 30.5t10 35t5 38t2 40.5t-0.5 42v25v250h300z" />
145
+ <glyph unicode="&#xe113;" d="M1100 411l-198 -199l-353 353l-353 -353l-197 199l551 551z" />
146
+ <glyph unicode="&#xe114;" d="M1101 789l-550 -551l-551 551l198 199l353 -353l353 353z" />
147
+ <glyph unicode="&#xe115;" d="M404 1000h746q21 0 35.5 -14.5t14.5 -35.5v-551h150q21 0 25 -10.5t-10 -24.5l-230 -249q-14 -15 -35 -15t-35 15l-230 249q-14 14 -10 24.5t25 10.5h150v401h-381zM135 984l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-400h385l215 -200h-750q-21 0 -35.5 14.5 t-14.5 35.5v550h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
148
+ <glyph unicode="&#xe116;" d="M56 1200h94q17 0 31 -11t18 -27l38 -162h896q24 0 39 -18.5t10 -42.5l-100 -475q-5 -21 -27 -42.5t-55 -21.5h-633l48 -200h535q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-50q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v50h-300v-50 q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v50h-31q-18 0 -32.5 10t-20.5 19l-5 10l-201 961h-54q-20 0 -35 14.5t-15 35.5t15 35.5t35 14.5z" />
149
+ <glyph unicode="&#xe117;" d="M1200 1000v-100h-1200v100h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500zM0 800h1200v-800h-1200v800z" />
150
+ <glyph unicode="&#xe118;" d="M200 800l-200 -400v600h200q0 41 29.5 70.5t70.5 29.5h300q42 0 71 -29.5t29 -70.5h500v-200h-1000zM1500 700l-300 -700h-1200l300 700h1200z" />
151
+ <glyph unicode="&#xe119;" d="M635 1184l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-601h150q21 0 25 -10.5t-10 -24.5l-230 -249q-14 -15 -35 -15t-35 15l-230 249q-14 14 -10 24.5t25 10.5h150v601h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
152
+ <glyph unicode="&#xe120;" d="M936 864l249 -229q14 -15 14 -35.5t-14 -35.5l-249 -229q-15 -15 -25.5 -10.5t-10.5 24.5v151h-600v-151q0 -20 -10.5 -24.5t-25.5 10.5l-249 229q-14 15 -14 35.5t14 35.5l249 229q15 15 25.5 10.5t10.5 -25.5v-149h600v149q0 21 10.5 25.5t25.5 -10.5z" />
153
+ <glyph unicode="&#xe121;" d="M1169 400l-172 732q-5 23 -23 45.5t-38 22.5h-672q-20 0 -38 -20t-23 -41l-172 -739h1138zM1100 300h-1000q-41 0 -70.5 -29.5t-29.5 -70.5v-100q0 -41 29.5 -70.5t70.5 -29.5h1000q41 0 70.5 29.5t29.5 70.5v100q0 41 -29.5 70.5t-70.5 29.5zM800 100v100h100v-100h-100 zM1000 100v100h100v-100h-100z" />
154
+ <glyph unicode="&#xe122;" d="M1150 1100q21 0 35.5 -14.5t14.5 -35.5v-850q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v850q0 21 14.5 35.5t35.5 14.5zM1000 200l-675 200h-38l47 -276q3 -16 -5.5 -20t-29.5 -4h-7h-84q-20 0 -34.5 14t-18.5 35q-55 337 -55 351v250v6q0 16 1 23.5t6.5 14 t17.5 6.5h200l675 250v-850zM0 750v-250q-4 0 -11 0.5t-24 6t-30 15t-24 30t-11 48.5v50q0 26 10.5 46t25 30t29 16t25.5 7z" />
155
+ <glyph unicode="&#xe123;" d="M553 1200h94q20 0 29 -10.5t3 -29.5l-18 -37q83 -19 144 -82.5t76 -140.5l63 -327l118 -173h17q19 0 33 -14.5t14 -35t-13 -40.5t-31 -27q-8 -4 -23 -9.5t-65 -19.5t-103 -25t-132.5 -20t-158.5 -9q-57 0 -115 5t-104 12t-88.5 15.5t-73.5 17.5t-54.5 16t-35.5 12l-11 4 q-18 8 -31 28t-13 40.5t14 35t33 14.5h17l118 173l63 327q15 77 76 140t144 83l-18 32q-6 19 3.5 32t28.5 13zM498 110q50 -6 102 -6q53 0 102 6q-12 -49 -39.5 -79.5t-62.5 -30.5t-63 30.5t-39 79.5z" />
156
+ <glyph unicode="&#xe124;" d="M800 946l224 78l-78 -224l234 -45l-180 -155l180 -155l-234 -45l78 -224l-224 78l-45 -234l-155 180l-155 -180l-45 234l-224 -78l78 224l-234 45l180 155l-180 155l234 45l-78 224l224 -78l45 234l155 -180l155 180z" />
157
+ <glyph unicode="&#xe125;" d="M650 1200h50q40 0 70 -40.5t30 -84.5v-150l-28 -125h328q40 0 70 -40.5t30 -84.5v-100q0 -45 -29 -74l-238 -344q-16 -24 -38 -40.5t-45 -16.5h-250q-7 0 -42 25t-66 50l-31 25h-61q-45 0 -72.5 18t-27.5 57v400q0 36 20 63l145 196l96 198q13 28 37.5 48t51.5 20z M650 1100l-100 -212l-150 -213v-375h100l136 -100h214l250 375v125h-450l50 225v175h-50zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5z" />
158
+ <glyph unicode="&#xe126;" d="M600 1100h250q23 0 45 -16.5t38 -40.5l238 -344q29 -29 29 -74v-100q0 -44 -30 -84.5t-70 -40.5h-328q28 -118 28 -125v-150q0 -44 -30 -84.5t-70 -40.5h-50q-27 0 -51.5 20t-37.5 48l-96 198l-145 196q-20 27 -20 63v400q0 39 27.5 57t72.5 18h61q124 100 139 100z M50 1000h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5zM636 1000l-136 -100h-100v-375l150 -213l100 -212h50v175l-50 225h450v125l-250 375h-214z" />
159
+ <glyph unicode="&#xe127;" d="M356 873l363 230q31 16 53 -6l110 -112q13 -13 13.5 -32t-11.5 -34l-84 -121h302q84 0 138 -38t54 -110t-55 -111t-139 -39h-106l-131 -339q-6 -21 -19.5 -41t-28.5 -20h-342q-7 0 -90 81t-83 94v525q0 17 14 35.5t28 28.5zM400 792v-503l100 -89h293l131 339 q6 21 19.5 41t28.5 20h203q21 0 30.5 25t0.5 50t-31 25h-456h-7h-6h-5.5t-6 0.5t-5 1.5t-5 2t-4 2.5t-4 4t-2.5 4.5q-12 25 5 47l146 183l-86 83zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500 q0 21 14.5 35.5t35.5 14.5z" />
160
+ <glyph unicode="&#xe128;" d="M475 1103l366 -230q2 -1 6 -3.5t14 -10.5t18 -16.5t14.5 -20t6.5 -22.5v-525q0 -13 -86 -94t-93 -81h-342q-15 0 -28.5 20t-19.5 41l-131 339h-106q-85 0 -139.5 39t-54.5 111t54 110t138 38h302l-85 121q-11 15 -10.5 34t13.5 32l110 112q22 22 53 6zM370 945l146 -183 q17 -22 5 -47q-2 -2 -3.5 -4.5t-4 -4t-4 -2.5t-5 -2t-5 -1.5t-6 -0.5h-6h-6.5h-6h-475v-100h221q15 0 29 -20t20 -41l130 -339h294l106 89v503l-342 236zM1050 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5 v500q0 21 14.5 35.5t35.5 14.5z" />
161
+ <glyph unicode="&#xe129;" d="M550 1294q72 0 111 -55t39 -139v-106l339 -131q21 -6 41 -19.5t20 -28.5v-342q0 -7 -81 -90t-94 -83h-525q-17 0 -35.5 14t-28.5 28l-9 14l-230 363q-16 31 6 53l112 110q13 13 32 13.5t34 -11.5l121 -84v302q0 84 38 138t110 54zM600 972v203q0 21 -25 30.5t-50 0.5 t-25 -31v-456v-7v-6v-5.5t-0.5 -6t-1.5 -5t-2 -5t-2.5 -4t-4 -4t-4.5 -2.5q-25 -12 -47 5l-183 146l-83 -86l236 -339h503l89 100v293l-339 131q-21 6 -41 19.5t-20 28.5zM450 200h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
162
+ <glyph unicode="&#xe130;" d="M350 1100h500q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5t35.5 -14.5zM600 306v-106q0 -84 -39 -139t-111 -55t-110 54t-38 138v302l-121 -84q-15 -12 -34 -11.5t-32 13.5l-112 110 q-22 22 -6 53l230 363q1 2 3.5 6t10.5 13.5t16.5 17t20 13.5t22.5 6h525q13 0 94 -83t81 -90v-342q0 -15 -20 -28.5t-41 -19.5zM308 900l-236 -339l83 -86l183 146q22 17 47 5q2 -1 4.5 -2.5t4 -4t2.5 -4t2 -5t1.5 -5t0.5 -6v-5.5v-6v-7v-456q0 -22 25 -31t50 0.5t25 30.5 v203q0 15 20 28.5t41 19.5l339 131v293l-89 100h-503z" />
163
+ <glyph unicode="&#xe131;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM914 632l-275 223q-16 13 -27.5 8t-11.5 -26v-137h-275 q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h275v-137q0 -21 11.5 -26t27.5 8l275 223q16 13 16 32t-16 32z" />
164
+ <glyph unicode="&#xe132;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM561 855l-275 -223q-16 -13 -16 -32t16 -32l275 -223q16 -13 27.5 -8 t11.5 26v137h275q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5h-275v137q0 21 -11.5 26t-27.5 -8z" />
165
+ <glyph unicode="&#xe133;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM855 639l-223 275q-13 16 -32 16t-32 -16l-223 -275q-13 -16 -8 -27.5 t26 -11.5h137v-275q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v275h137q21 0 26 11.5t-8 27.5z" />
166
+ <glyph unicode="&#xe134;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM675 900h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-275h-137q-21 0 -26 -11.5 t8 -27.5l223 -275q13 -16 32 -16t32 16l223 275q13 16 8 27.5t-26 11.5h-137v275q0 10 -7.5 17.5t-17.5 7.5z" />
167
+ <glyph unicode="&#xe135;" d="M600 1176q116 0 222.5 -46t184 -123.5t123.5 -184t46 -222.5t-46 -222.5t-123.5 -184t-184 -123.5t-222.5 -46t-222.5 46t-184 123.5t-123.5 184t-46 222.5t46 222.5t123.5 184t184 123.5t222.5 46zM627 1101q-15 -12 -36.5 -20.5t-35.5 -12t-43 -8t-39 -6.5 q-15 -3 -45.5 0t-45.5 -2q-20 -7 -51.5 -26.5t-34.5 -34.5q-3 -11 6.5 -22.5t8.5 -18.5q-3 -34 -27.5 -91t-29.5 -79q-9 -34 5 -93t8 -87q0 -9 17 -44.5t16 -59.5q12 0 23 -5t23.5 -15t19.5 -14q16 -8 33 -15t40.5 -15t34.5 -12q21 -9 52.5 -32t60 -38t57.5 -11 q7 -15 -3 -34t-22.5 -40t-9.5 -38q13 -21 23 -34.5t27.5 -27.5t36.5 -18q0 -7 -3.5 -16t-3.5 -14t5 -17q104 -2 221 112q30 29 46.5 47t34.5 49t21 63q-13 8 -37 8.5t-36 7.5q-15 7 -49.5 15t-51.5 19q-18 0 -41 -0.5t-43 -1.5t-42 -6.5t-38 -16.5q-51 -35 -66 -12 q-4 1 -3.5 25.5t0.5 25.5q-6 13 -26.5 17.5t-24.5 6.5q1 15 -0.5 30.5t-7 28t-18.5 11.5t-31 -21q-23 -25 -42 4q-19 28 -8 58q6 16 22 22q6 -1 26 -1.5t33.5 -4t19.5 -13.5q7 -12 18 -24t21.5 -20.5t20 -15t15.5 -10.5l5 -3q2 12 7.5 30.5t8 34.5t-0.5 32q-3 18 3.5 29 t18 22.5t15.5 24.5q6 14 10.5 35t8 31t15.5 22.5t34 22.5q-6 18 10 36q8 0 24 -1.5t24.5 -1.5t20 4.5t20.5 15.5q-10 23 -31 42.5t-37.5 29.5t-49 27t-43.5 23q0 1 2 8t3 11.5t1.5 10.5t-1 9.5t-4.5 4.5q31 -13 58.5 -14.5t38.5 2.5l12 5q5 28 -9.5 46t-36.5 24t-50 15 t-41 20q-18 -4 -37 0zM613 994q0 -17 8 -42t17 -45t9 -23q-8 1 -39.5 5.5t-52.5 10t-37 16.5q3 11 16 29.5t16 25.5q10 -10 19 -10t14 6t13.5 14.5t16.5 12.5z" />
168
+ <glyph unicode="&#xe136;" d="M756 1157q164 92 306 -9l-259 -138l145 -232l251 126q6 -89 -34 -156.5t-117 -110.5q-60 -34 -127 -39.5t-126 16.5l-596 -596q-15 -16 -36.5 -16t-36.5 16l-111 110q-15 15 -15 36.5t15 37.5l600 599q-34 101 5.5 201.5t135.5 154.5z" />
169
+ <glyph unicode="&#xe137;" horiz-adv-x="1220" d="M100 1196h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 1096h-200v-100h200v100zM100 796h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 696h-500v-100h500v100zM100 396h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 296h-300v-100h300v100z " />
170
+ <glyph unicode="&#xe138;" d="M150 1200h900q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM700 500v-300l-200 -200v500l-350 500h900z" />
171
+ <glyph unicode="&#xe139;" d="M500 1200h200q41 0 70.5 -29.5t29.5 -70.5v-100h300q41 0 70.5 -29.5t29.5 -70.5v-400h-500v100h-200v-100h-500v400q0 41 29.5 70.5t70.5 29.5h300v100q0 41 29.5 70.5t70.5 29.5zM500 1100v-100h200v100h-200zM1200 400v-200q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5v200h1200z" />
172
+ <glyph unicode="&#xe140;" d="M50 1200h300q21 0 25 -10.5t-10 -24.5l-94 -94l199 -199q7 -8 7 -18t-7 -18l-106 -106q-8 -7 -18 -7t-18 7l-199 199l-94 -94q-14 -14 -24.5 -10t-10.5 25v300q0 21 14.5 35.5t35.5 14.5zM850 1200h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94 l-199 -199q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l199 199l-94 94q-14 14 -10 24.5t25 10.5zM364 470l106 -106q7 -8 7 -18t-7 -18l-199 -199l94 -94q14 -14 10 -24.5t-25 -10.5h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l199 199 q8 7 18 7t18 -7zM1071 271l94 94q14 14 24.5 10t10.5 -25v-300q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -25 10.5t10 24.5l94 94l-199 199q-7 8 -7 18t7 18l106 106q8 7 18 7t18 -7z" />
173
+ <glyph unicode="&#xe141;" d="M596 1192q121 0 231.5 -47.5t190 -127t127 -190t47.5 -231.5t-47.5 -231.5t-127 -190.5t-190 -127t-231.5 -47t-231.5 47t-190.5 127t-127 190.5t-47 231.5t47 231.5t127 190t190.5 127t231.5 47.5zM596 1010q-112 0 -207.5 -55.5t-151 -151t-55.5 -207.5t55.5 -207.5 t151 -151t207.5 -55.5t207.5 55.5t151 151t55.5 207.5t-55.5 207.5t-151 151t-207.5 55.5zM454.5 905q22.5 0 38.5 -16t16 -38.5t-16 -39t-38.5 -16.5t-38.5 16.5t-16 39t16 38.5t38.5 16zM754.5 905q22.5 0 38.5 -16t16 -38.5t-16 -39t-38 -16.5q-14 0 -29 10l-55 -145 q17 -23 17 -51q0 -36 -25.5 -61.5t-61.5 -25.5t-61.5 25.5t-25.5 61.5q0 32 20.5 56.5t51.5 29.5l122 126l1 1q-9 14 -9 28q0 23 16 39t38.5 16zM345.5 709q22.5 0 38.5 -16t16 -38.5t-16 -38.5t-38.5 -16t-38.5 16t-16 38.5t16 38.5t38.5 16zM854.5 709q22.5 0 38.5 -16 t16 -38.5t-16 -38.5t-38.5 -16t-38.5 16t-16 38.5t16 38.5t38.5 16z" />
174
+ <glyph unicode="&#xe142;" d="M546 173l469 470q91 91 99 192q7 98 -52 175.5t-154 94.5q-22 4 -47 4q-34 0 -66.5 -10t-56.5 -23t-55.5 -38t-48 -41.5t-48.5 -47.5q-376 -375 -391 -390q-30 -27 -45 -41.5t-37.5 -41t-32 -46.5t-16 -47.5t-1.5 -56.5q9 -62 53.5 -95t99.5 -33q74 0 125 51l548 548 q36 36 20 75q-7 16 -21.5 26t-32.5 10q-26 0 -50 -23q-13 -12 -39 -38l-341 -338q-15 -15 -35.5 -15.5t-34.5 13.5t-14 34.5t14 34.5q327 333 361 367q35 35 67.5 51.5t78.5 16.5q14 0 29 -1q44 -8 74.5 -35.5t43.5 -68.5q14 -47 2 -96.5t-47 -84.5q-12 -11 -32 -32 t-79.5 -81t-114.5 -115t-124.5 -123.5t-123 -119.5t-96.5 -89t-57 -45q-56 -27 -120 -27q-70 0 -129 32t-93 89q-48 78 -35 173t81 163l511 511q71 72 111 96q91 55 198 55q80 0 152 -33q78 -36 129.5 -103t66.5 -154q17 -93 -11 -183.5t-94 -156.5l-482 -476 q-15 -15 -36 -16t-37 14t-17.5 34t14.5 35z" />
175
+ <glyph unicode="&#xe143;" d="M649 949q48 68 109.5 104t121.5 38.5t118.5 -20t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-150 152.5t-126.5 127.5t-93.5 124.5t-33.5 117.5q0 64 28 123t73 100.5t104 64t119 20 t120.5 -38.5t104.5 -104zM896 972q-33 0 -64.5 -19t-56.5 -46t-47.5 -53.5t-43.5 -45.5t-37.5 -19t-36 19t-40 45.5t-43 53.5t-54 46t-65.5 19q-67 0 -122.5 -55.5t-55.5 -132.5q0 -23 13.5 -51t46 -65t57.5 -63t76 -75l22 -22q15 -14 44 -44t50.5 -51t46 -44t41 -35t23 -12 t23.5 12t42.5 36t46 44t52.5 52t44 43q4 4 12 13q43 41 63.5 62t52 55t46 55t26 46t11.5 44q0 79 -53 133.5t-120 54.5z" />
176
+ <glyph unicode="&#xe144;" d="M776.5 1214q93.5 0 159.5 -66l141 -141q66 -66 66 -160q0 -42 -28 -95.5t-62 -87.5l-29 -29q-31 53 -77 99l-18 18l95 95l-247 248l-389 -389l212 -212l-105 -106l-19 18l-141 141q-66 66 -66 159t66 159l283 283q65 66 158.5 66zM600 706l105 105q10 -8 19 -17l141 -141 q66 -66 66 -159t-66 -159l-283 -283q-66 -66 -159 -66t-159 66l-141 141q-66 66 -66 159.5t66 159.5l55 55q29 -55 75 -102l18 -17l-95 -95l247 -248l389 389z" />
177
+ <glyph unicode="&#xe145;" d="M603 1200q85 0 162 -15t127 -38t79 -48t29 -46v-953q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-41 0 -70.5 29.5t-29.5 70.5v953q0 21 30 46.5t81 48t129 37.5t163 15zM300 1000v-700h600v700h-600zM600 254q-43 0 -73.5 -30.5t-30.5 -73.5t30.5 -73.5t73.5 -30.5t73.5 30.5 t30.5 73.5t-30.5 73.5t-73.5 30.5z" />
178
+ <glyph unicode="&#xe146;" d="M902 1185l283 -282q15 -15 15 -36t-14.5 -35.5t-35.5 -14.5t-35 15l-36 35l-279 -267v-300l-212 210l-308 -307l-280 -203l203 280l307 308l-210 212h300l267 279l-35 36q-15 14 -15 35t14.5 35.5t35.5 14.5t35 -15z" />
179
+ <glyph unicode="&#xe148;" d="M700 1248v-78q38 -5 72.5 -14.5t75.5 -31.5t71 -53.5t52 -84t24 -118.5h-159q-4 36 -10.5 59t-21 45t-40 35.5t-64.5 20.5v-307l64 -13q34 -7 64 -16.5t70 -32t67.5 -52.5t47.5 -80t20 -112q0 -139 -89 -224t-244 -97v-77h-100v79q-150 16 -237 103q-40 40 -52.5 93.5 t-15.5 139.5h139q5 -77 48.5 -126t117.5 -65v335l-27 8q-46 14 -79 26.5t-72 36t-63 52t-40 72.5t-16 98q0 70 25 126t67.5 92t94.5 57t110 27v77h100zM600 754v274q-29 -4 -50 -11t-42 -21.5t-31.5 -41.5t-10.5 -65q0 -29 7 -50.5t16.5 -34t28.5 -22.5t31.5 -14t37.5 -10 q9 -3 13 -4zM700 547v-310q22 2 42.5 6.5t45 15.5t41.5 27t29 42t12 59.5t-12.5 59.5t-38 44.5t-53 31t-66.5 24.5z" />
180
+ <glyph unicode="&#xe149;" d="M561 1197q84 0 160.5 -40t123.5 -109.5t47 -147.5h-153q0 40 -19.5 71.5t-49.5 48.5t-59.5 26t-55.5 9q-37 0 -79 -14.5t-62 -35.5q-41 -44 -41 -101q0 -26 13.5 -63t26.5 -61t37 -66q6 -9 9 -14h241v-100h-197q8 -50 -2.5 -115t-31.5 -95q-45 -62 -99 -112 q34 10 83 17.5t71 7.5q32 1 102 -16t104 -17q83 0 136 30l50 -147q-31 -19 -58 -30.5t-55 -15.5t-42 -4.5t-46 -0.5q-23 0 -76 17t-111 32.5t-96 11.5q-39 -3 -82 -16t-67 -25l-23 -11l-55 145q4 3 16 11t15.5 10.5t13 9t15.5 12t14.5 14t17.5 18.5q48 55 54 126.5 t-30 142.5h-221v100h166q-23 47 -44 104q-7 20 -12 41.5t-6 55.5t6 66.5t29.5 70.5t58.5 71q97 88 263 88z" />
181
+ <glyph unicode="&#xe150;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM935 1184l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-900h-200v900h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
182
+ <glyph unicode="&#xe151;" d="M1000 700h-100v100h-100v-100h-100v500h300v-500zM400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM801 1100v-200h100v200h-100zM1000 350l-200 -250h200v-100h-300v150l200 250h-200v100h300v-150z " />
183
+ <glyph unicode="&#xe152;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1000 1050l-200 -250h200v-100h-300v150l200 250h-200v100h300v-150zM1000 0h-100v100h-100v-100h-100v500h300v-500zM801 400v-200h100v200h-100z " />
184
+ <glyph unicode="&#xe153;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1000 700h-100v400h-100v100h200v-500zM1100 0h-100v100h-200v400h300v-500zM901 400v-200h100v200h-100z" />
185
+ <glyph unicode="&#xe154;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1100 700h-100v100h-200v400h300v-500zM901 1100v-200h100v200h-100zM1000 0h-100v400h-100v100h200v-500z" />
186
+ <glyph unicode="&#xe155;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM900 1000h-200v200h200v-200zM1000 700h-300v200h300v-200zM1100 400h-400v200h400v-200zM1200 100h-500v200h500v-200z" />
187
+ <glyph unicode="&#xe156;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1200 1000h-500v200h500v-200zM1100 700h-400v200h400v-200zM1000 400h-300v200h300v-200zM900 100h-200v200h200v-200z" />
188
+ <glyph unicode="&#xe157;" d="M350 1100h400q162 0 256 -93.5t94 -256.5v-400q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5z" />
189
+ <glyph unicode="&#xe158;" d="M350 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-163 0 -256.5 92.5t-93.5 257.5v400q0 163 94 256.5t256 93.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM440 770l253 -190q17 -12 17 -30t-17 -30l-253 -190q-16 -12 -28 -6.5t-12 26.5v400q0 21 12 26.5t28 -6.5z" />
190
+ <glyph unicode="&#xe159;" d="M350 1100h400q163 0 256.5 -94t93.5 -256v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 163 92.5 256.5t257.5 93.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM350 700h400q21 0 26.5 -12t-6.5 -28l-190 -253q-12 -17 -30 -17t-30 17l-190 253q-12 16 -6.5 28t26.5 12z" />
191
+ <glyph unicode="&#xe160;" d="M350 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -163 -92.5 -256.5t-257.5 -93.5h-400q-163 0 -256.5 94t-93.5 256v400q0 165 92.5 257.5t257.5 92.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM580 693l190 -253q12 -16 6.5 -28t-26.5 -12h-400q-21 0 -26.5 12t6.5 28l190 253q12 17 30 17t30 -17z" />
192
+ <glyph unicode="&#xe161;" d="M550 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h450q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5h-450q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM338 867l324 -284q16 -14 16 -33t-16 -33l-324 -284q-16 -14 -27 -9t-11 26v150h-250q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h250v150q0 21 11 26t27 -9z" />
193
+ <glyph unicode="&#xe162;" d="M793 1182l9 -9q8 -10 5 -27q-3 -11 -79 -225.5t-78 -221.5l300 1q24 0 32.5 -17.5t-5.5 -35.5q-1 0 -133.5 -155t-267 -312.5t-138.5 -162.5q-12 -15 -26 -15h-9l-9 8q-9 11 -4 32q2 9 42 123.5t79 224.5l39 110h-302q-23 0 -31 19q-10 21 6 41q75 86 209.5 237.5 t228 257t98.5 111.5q9 16 25 16h9z" />
194
+ <glyph unicode="&#xe163;" d="M350 1100h400q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-450q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h450q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400 q0 165 92.5 257.5t257.5 92.5zM938 867l324 -284q16 -14 16 -33t-16 -33l-324 -284q-16 -14 -27 -9t-11 26v150h-250q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h250v150q0 21 11 26t27 -9z" />
195
+ <glyph unicode="&#xe164;" d="M750 1200h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -10.5 -25t-24.5 10l-109 109l-312 -312q-15 -15 -35.5 -15t-35.5 15l-141 141q-15 15 -15 35.5t15 35.5l312 312l-109 109q-14 14 -10 24.5t25 10.5zM456 900h-156q-41 0 -70.5 -29.5t-29.5 -70.5v-500 q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v148l200 200v-298q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5h300z" />
196
+ <glyph unicode="&#xe165;" d="M600 1186q119 0 227.5 -46.5t187 -125t125 -187t46.5 -227.5t-46.5 -227.5t-125 -187t-187 -125t-227.5 -46.5t-227.5 46.5t-187 125t-125 187t-46.5 227.5t46.5 227.5t125 187t187 125t227.5 46.5zM600 1022q-115 0 -212 -56.5t-153.5 -153.5t-56.5 -212t56.5 -212 t153.5 -153.5t212 -56.5t212 56.5t153.5 153.5t56.5 212t-56.5 212t-153.5 153.5t-212 56.5zM600 794q80 0 137 -57t57 -137t-57 -137t-137 -57t-137 57t-57 137t57 137t137 57z" />
197
+ <glyph unicode="&#xe166;" d="M450 1200h200q21 0 35.5 -14.5t14.5 -35.5v-350h245q20 0 25 -11t-9 -26l-383 -426q-14 -15 -33.5 -15t-32.5 15l-379 426q-13 15 -8.5 26t25.5 11h250v350q0 21 14.5 35.5t35.5 14.5zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5z M900 200v-50h100v50h-100z" />
198
+ <glyph unicode="&#xe167;" d="M583 1182l378 -435q14 -15 9 -31t-26 -16h-244v-250q0 -20 -17 -35t-39 -15h-200q-20 0 -32 14.5t-12 35.5v250h-250q-20 0 -25.5 16.5t8.5 31.5l383 431q14 16 33.5 17t33.5 -14zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5z M900 200v-50h100v50h-100z" />
199
+ <glyph unicode="&#xe168;" d="M396 723l369 369q7 7 17.5 7t17.5 -7l139 -139q7 -8 7 -18.5t-7 -17.5l-525 -525q-7 -8 -17.5 -8t-17.5 8l-292 291q-7 8 -7 18t7 18l139 139q8 7 18.5 7t17.5 -7zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50 h-100z" />
200
+ <glyph unicode="&#xe169;" d="M135 1023l142 142q14 14 35 14t35 -14l77 -77l-212 -212l-77 76q-14 15 -14 36t14 35zM655 855l210 210q14 14 24.5 10t10.5 -25l-2 -599q-1 -20 -15.5 -35t-35.5 -15l-597 -1q-21 0 -25 10.5t10 24.5l208 208l-154 155l212 212zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5 v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50h-100z" />
201
+ <glyph unicode="&#xe170;" d="M350 1200l599 -2q20 -1 35 -15.5t15 -35.5l1 -597q0 -21 -10.5 -25t-24.5 10l-208 208l-155 -154l-212 212l155 154l-210 210q-14 14 -10 24.5t25 10.5zM524 512l-76 -77q-15 -14 -36 -14t-35 14l-142 142q-14 14 -14 35t14 35l77 77zM50 300h1000q21 0 35.5 -14.5 t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50h-100z" />
202
+ <glyph unicode="&#xe171;" d="M1200 103l-483 276l-314 -399v423h-399l1196 796v-1096zM483 424v-230l683 953z" />
203
+ <glyph unicode="&#xe172;" d="M1100 1000v-850q0 -21 -14.5 -35.5t-35.5 -14.5h-150v400h-700v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200z" />
204
+ <glyph unicode="&#xe173;" d="M1100 1000l-2 -149l-299 -299l-95 95q-9 9 -21.5 9t-21.5 -9l-149 -147h-312v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM1132 638l106 -106q7 -7 7 -17.5t-7 -17.5l-420 -421q-8 -7 -18 -7 t-18 7l-202 203q-8 7 -8 17.5t8 17.5l106 106q7 8 17.5 8t17.5 -8l79 -79l297 297q7 7 17.5 7t17.5 -7z" />
205
+ <glyph unicode="&#xe174;" d="M1100 1000v-269l-103 -103l-134 134q-15 15 -33.5 16.5t-34.5 -12.5l-266 -266h-329v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM1202 572l70 -70q15 -15 15 -35.5t-15 -35.5l-131 -131 l131 -131q15 -15 15 -35.5t-15 -35.5l-70 -70q-15 -15 -35.5 -15t-35.5 15l-131 131l-131 -131q-15 -15 -35.5 -15t-35.5 15l-70 70q-15 15 -15 35.5t15 35.5l131 131l-131 131q-15 15 -15 35.5t15 35.5l70 70q15 15 35.5 15t35.5 -15l131 -131l131 131q15 15 35.5 15 t35.5 -15z" />
206
+ <glyph unicode="&#xe175;" d="M1100 1000v-300h-350q-21 0 -35.5 -14.5t-14.5 -35.5v-150h-500v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM850 600h100q21 0 35.5 -14.5t14.5 -35.5v-250h150q21 0 25 -10.5t-10 -24.5 l-230 -230q-14 -14 -35 -14t-35 14l-230 230q-14 14 -10 24.5t25 10.5h150v250q0 21 14.5 35.5t35.5 14.5z" />
207
+ <glyph unicode="&#xe176;" d="M1100 1000v-400l-165 165q-14 15 -35 15t-35 -15l-263 -265h-402v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM935 565l230 -229q14 -15 10 -25.5t-25 -10.5h-150v-250q0 -20 -14.5 -35 t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35v250h-150q-21 0 -25 10.5t10 25.5l230 229q14 15 35 15t35 -15z" />
208
+ <glyph unicode="&#xe177;" d="M50 1100h1100q21 0 35.5 -14.5t14.5 -35.5v-150h-1200v150q0 21 14.5 35.5t35.5 14.5zM1200 800v-550q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v550h1200zM100 500v-200h400v200h-400z" />
209
+ <glyph unicode="&#xe178;" d="M935 1165l248 -230q14 -14 14 -35t-14 -35l-248 -230q-14 -14 -24.5 -10t-10.5 25v150h-400v200h400v150q0 21 10.5 25t24.5 -10zM200 800h-50q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v-200zM400 800h-100v200h100v-200zM18 435l247 230 q14 14 24.5 10t10.5 -25v-150h400v-200h-400v-150q0 -21 -10.5 -25t-24.5 10l-247 230q-15 14 -15 35t15 35zM900 300h-100v200h100v-200zM1000 500h51q20 0 34.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-34.5 -14.5h-51v200z" />
210
+ <glyph unicode="&#xe179;" d="M862 1073l276 116q25 18 43.5 8t18.5 -41v-1106q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v397q-4 1 -11 5t-24 17.5t-30 29t-24 42t-11 56.5v359q0 31 18.5 65t43.5 52zM550 1200q22 0 34.5 -12.5t14.5 -24.5l1 -13v-450q0 -28 -10.5 -59.5 t-25 -56t-29 -45t-25.5 -31.5l-10 -11v-447q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v447q-4 4 -11 11.5t-24 30.5t-30 46t-24 55t-11 60v450q0 2 0.5 5.5t4 12t8.5 15t14.5 12t22.5 5.5q20 0 32.5 -12.5t14.5 -24.5l3 -13v-350h100v350v5.5t2.5 12 t7 15t15 12t25.5 5.5q23 0 35.5 -12.5t13.5 -24.5l1 -13v-350h100v350q0 2 0.5 5.5t3 12t7 15t15 12t24.5 5.5z" />
211
+ <glyph unicode="&#xe180;" d="M1200 1100v-56q-4 0 -11 -0.5t-24 -3t-30 -7.5t-24 -15t-11 -24v-888q0 -22 25 -34.5t50 -13.5l25 -2v-56h-400v56q75 0 87.5 6.5t12.5 43.5v394h-500v-394q0 -37 12.5 -43.5t87.5 -6.5v-56h-400v56q4 0 11 0.5t24 3t30 7.5t24 15t11 24v888q0 22 -25 34.5t-50 13.5 l-25 2v56h400v-56q-75 0 -87.5 -6.5t-12.5 -43.5v-394h500v394q0 37 -12.5 43.5t-87.5 6.5v56h400z" />
212
+ <glyph unicode="&#xe181;" d="M675 1000h375q21 0 35.5 -14.5t14.5 -35.5v-150h-105l-295 -98v98l-200 200h-400l100 100h375zM100 900h300q41 0 70.5 -29.5t29.5 -70.5v-500q0 -41 -29.5 -70.5t-70.5 -29.5h-300q-41 0 -70.5 29.5t-29.5 70.5v500q0 41 29.5 70.5t70.5 29.5zM100 800v-200h300v200 h-300zM1100 535l-400 -133v163l400 133v-163zM100 500v-200h300v200h-300zM1100 398v-248q0 -21 -14.5 -35.5t-35.5 -14.5h-375l-100 -100h-375l-100 100h400l200 200h105z" />
213
+ <glyph unicode="&#xe182;" d="M17 1007l162 162q17 17 40 14t37 -22l139 -194q14 -20 11 -44.5t-20 -41.5l-119 -118q102 -142 228 -268t267 -227l119 118q17 17 42.5 19t44.5 -12l192 -136q19 -14 22.5 -37.5t-13.5 -40.5l-163 -162q-3 -1 -9.5 -1t-29.5 2t-47.5 6t-62.5 14.5t-77.5 26.5t-90 42.5 t-101.5 60t-111 83t-119 108.5q-74 74 -133.5 150.5t-94.5 138.5t-60 119.5t-34.5 100t-15 74.5t-4.5 48z" />
214
+ <glyph unicode="&#xe183;" d="M600 1100q92 0 175 -10.5t141.5 -27t108.5 -36.5t81.5 -40t53.5 -37t31 -27l9 -10v-200q0 -21 -14.5 -33t-34.5 -9l-202 34q-20 3 -34.5 20t-14.5 38v146q-141 24 -300 24t-300 -24v-146q0 -21 -14.5 -38t-34.5 -20l-202 -34q-20 -3 -34.5 9t-14.5 33v200q3 4 9.5 10.5 t31 26t54 37.5t80.5 39.5t109 37.5t141 26.5t175 10.5zM600 795q56 0 97 -9.5t60 -23.5t30 -28t12 -24l1 -10v-50l365 -303q14 -15 24.5 -40t10.5 -45v-212q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v212q0 20 10.5 45t24.5 40l365 303v50 q0 4 1 10.5t12 23t30 29t60 22.5t97 10z" />
215
+ <glyph unicode="&#xe184;" d="M1100 700l-200 -200h-600l-200 200v500h200v-200h200v200h200v-200h200v200h200v-500zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-12l137 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5 t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
216
+ <glyph unicode="&#xe185;" d="M700 1100h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-1000h300v1000q0 41 -29.5 70.5t-70.5 29.5zM1100 800h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-700h300v700q0 41 -29.5 70.5t-70.5 29.5zM400 0h-300v400q0 41 29.5 70.5t70.5 29.5h100q41 0 70.5 -29.5t29.5 -70.5v-400z " />
217
+ <glyph unicode="&#xe186;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-100h200v-300h-300v100h200v100h-200v300h300v-100zM900 700v-300l-100 -100h-200v500h200z M700 700v-300h100v300h-100z" />
218
+ <glyph unicode="&#xe187;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 300h-100v200h-100v-200h-100v500h100v-200h100v200h100v-500zM900 700v-300l-100 -100h-200v500h200z M700 700v-300h100v300h-100z" />
219
+ <glyph unicode="&#xe188;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-300h200v-100h-300v500h300v-100zM900 700h-200v-300h200v-100h-300v500h300v-100z" />
220
+ <glyph unicode="&#xe189;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 400l-300 150l300 150v-300zM900 550l-300 -150v300z" />
221
+ <glyph unicode="&#xe190;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM900 300h-700v500h700v-500zM800 700h-130q-38 0 -66.5 -43t-28.5 -108t27 -107t68 -42h130v300zM300 700v-300 h130q41 0 68 42t27 107t-28.5 108t-66.5 43h-130z" />
222
+ <glyph unicode="&#xe191;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-100h200v-300h-300v100h200v100h-200v300h300v-100zM900 300h-100v400h-100v100h200v-500z M700 300h-100v100h100v-100z" />
223
+ <glyph unicode="&#xe192;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM300 700h200v-400h-300v500h100v-100zM900 300h-100v400h-100v100h200v-500zM300 600v-200h100v200h-100z M700 300h-100v100h100v-100z" />
224
+ <glyph unicode="&#xe193;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 500l-199 -200h-100v50l199 200v150h-200v100h300v-300zM900 300h-100v400h-100v100h200v-500zM701 300h-100 v100h100v-100z" />
225
+ <glyph unicode="&#xe194;" d="M600 1191q120 0 229.5 -47t188.5 -126t126 -188.5t47 -229.5t-47 -229.5t-126 -188.5t-188.5 -126t-229.5 -47t-229.5 47t-188.5 126t-126 188.5t-47 229.5t47 229.5t126 188.5t188.5 126t229.5 47zM600 1021q-114 0 -211 -56.5t-153.5 -153.5t-56.5 -211t56.5 -211 t153.5 -153.5t211 -56.5t211 56.5t153.5 153.5t56.5 211t-56.5 211t-153.5 153.5t-211 56.5zM800 700h-300v-200h300v-100h-300l-100 100v200l100 100h300v-100z" />
226
+ <glyph unicode="&#xe195;" d="M600 1191q120 0 229.5 -47t188.5 -126t126 -188.5t47 -229.5t-47 -229.5t-126 -188.5t-188.5 -126t-229.5 -47t-229.5 47t-188.5 126t-126 188.5t-47 229.5t47 229.5t126 188.5t188.5 126t229.5 47zM600 1021q-114 0 -211 -56.5t-153.5 -153.5t-56.5 -211t56.5 -211 t153.5 -153.5t211 -56.5t211 56.5t153.5 153.5t56.5 211t-56.5 211t-153.5 153.5t-211 56.5zM800 700v-100l-50 -50l100 -100v-50h-100l-100 100h-150v-100h-100v400h300zM500 700v-100h200v100h-200z" />
227
+ <glyph unicode="&#xe197;" d="M503 1089q110 0 200.5 -59.5t134.5 -156.5q44 14 90 14q120 0 205 -86.5t85 -207t-85 -207t-205 -86.5h-128v250q0 21 -14.5 35.5t-35.5 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-250h-222q-80 0 -136 57.5t-56 136.5q0 69 43 122.5t108 67.5q-2 19 -2 37q0 100 49 185 t134 134t185 49zM525 500h150q10 0 17.5 -7.5t7.5 -17.5v-275h137q21 0 26 -11.5t-8 -27.5l-223 -244q-13 -16 -32 -16t-32 16l-223 244q-13 16 -8 27.5t26 11.5h137v275q0 10 7.5 17.5t17.5 7.5z" />
228
+ <glyph unicode="&#xe198;" d="M502 1089q110 0 201 -59.5t135 -156.5q43 15 89 15q121 0 206 -86.5t86 -206.5q0 -99 -60 -181t-150 -110l-378 360q-13 16 -31.5 16t-31.5 -16l-381 -365h-9q-79 0 -135.5 57.5t-56.5 136.5q0 69 43 122.5t108 67.5q-2 19 -2 38q0 100 49 184.5t133.5 134t184.5 49.5z M632 467l223 -228q13 -16 8 -27.5t-26 -11.5h-137v-275q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v275h-137q-21 0 -26 11.5t8 27.5q199 204 223 228q19 19 31.5 19t32.5 -19z" />
229
+ <glyph unicode="&#xe199;" d="M700 100v100h400l-270 300h170l-270 300h170l-300 333l-300 -333h170l-270 -300h170l-270 -300h400v-100h-50q-21 0 -35.5 -14.5t-14.5 -35.5v-50h400v50q0 21 -14.5 35.5t-35.5 14.5h-50z" />
230
+ <glyph unicode="&#xe200;" d="M600 1179q94 0 167.5 -56.5t99.5 -145.5q89 -6 150.5 -71.5t61.5 -155.5q0 -61 -29.5 -112.5t-79.5 -82.5q9 -29 9 -55q0 -74 -52.5 -126.5t-126.5 -52.5q-55 0 -100 30v-251q21 0 35.5 -14.5t14.5 -35.5v-50h-300v50q0 21 14.5 35.5t35.5 14.5v251q-45 -30 -100 -30 q-74 0 -126.5 52.5t-52.5 126.5q0 18 4 38q-47 21 -75.5 65t-28.5 97q0 74 52.5 126.5t126.5 52.5q5 0 23 -2q0 2 -1 10t-1 13q0 116 81.5 197.5t197.5 81.5z" />
231
+ <glyph unicode="&#xe201;" d="M1010 1010q111 -111 150.5 -260.5t0 -299t-150.5 -260.5q-83 -83 -191.5 -126.5t-218.5 -43.5t-218.5 43.5t-191.5 126.5q-111 111 -150.5 260.5t0 299t150.5 260.5q83 83 191.5 126.5t218.5 43.5t218.5 -43.5t191.5 -126.5zM476 1065q-4 0 -8 -1q-121 -34 -209.5 -122.5 t-122.5 -209.5q-4 -12 2.5 -23t18.5 -14l36 -9q3 -1 7 -1q23 0 29 22q27 96 98 166q70 71 166 98q11 3 17.5 13.5t3.5 22.5l-9 35q-3 13 -14 19q-7 4 -15 4zM512 920q-4 0 -9 -2q-80 -24 -138.5 -82.5t-82.5 -138.5q-4 -13 2 -24t19 -14l34 -9q4 -1 8 -1q22 0 28 21 q18 58 58.5 98.5t97.5 58.5q12 3 18 13.5t3 21.5l-9 35q-3 12 -14 19q-7 4 -15 4zM719.5 719.5q-49.5 49.5 -119.5 49.5t-119.5 -49.5t-49.5 -119.5t49.5 -119.5t119.5 -49.5t119.5 49.5t49.5 119.5t-49.5 119.5zM855 551q-22 0 -28 -21q-18 -58 -58.5 -98.5t-98.5 -57.5 q-11 -4 -17 -14.5t-3 -21.5l9 -35q3 -12 14 -19q7 -4 15 -4q4 0 9 2q80 24 138.5 82.5t82.5 138.5q4 13 -2.5 24t-18.5 14l-34 9q-4 1 -8 1zM1000 515q-23 0 -29 -22q-27 -96 -98 -166q-70 -71 -166 -98q-11 -3 -17.5 -13.5t-3.5 -22.5l9 -35q3 -13 14 -19q7 -4 15 -4 q4 0 8 1q121 34 209.5 122.5t122.5 209.5q4 12 -2.5 23t-18.5 14l-36 9q-3 1 -7 1z" />
232
+ <glyph unicode="&#xe202;" d="M700 800h300v-380h-180v200h-340v-200h-380v755q0 10 7.5 17.5t17.5 7.5h575v-400zM1000 900h-200v200zM700 300h162l-212 -212l-212 212h162v200h100v-200zM520 0h-395q-10 0 -17.5 7.5t-7.5 17.5v395zM1000 220v-195q0 -10 -7.5 -17.5t-17.5 -7.5h-195z" />
233
+ <glyph unicode="&#xe203;" d="M700 800h300v-520l-350 350l-550 -550v1095q0 10 7.5 17.5t17.5 7.5h575v-400zM1000 900h-200v200zM862 200h-162v-200h-100v200h-162l212 212zM480 0h-355q-10 0 -17.5 7.5t-7.5 17.5v55h380v-80zM1000 80v-55q0 -10 -7.5 -17.5t-17.5 -7.5h-155v80h180z" />
234
+ <glyph unicode="&#xe204;" d="M1162 800h-162v-200h100l100 -100h-300v300h-162l212 212zM200 800h200q27 0 40 -2t29.5 -10.5t23.5 -30t7 -57.5h300v-100h-600l-200 -350v450h100q0 36 7 57.5t23.5 30t29.5 10.5t40 2zM800 400h240l-240 -400h-800l300 500h500v-100z" />
235
+ <glyph unicode="&#xe205;" d="M650 1100h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5zM1000 850v150q41 0 70.5 -29.5t29.5 -70.5v-800 q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-1 0 -20 4l246 246l-326 326v324q0 41 29.5 70.5t70.5 29.5v-150q0 -62 44 -106t106 -44h300q62 0 106 44t44 106zM412 250l-212 -212v162h-200v100h200v162z" />
236
+ <glyph unicode="&#xe206;" d="M450 1100h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5zM800 850v150q41 0 70.5 -29.5t29.5 -70.5v-500 h-200v-300h200q0 -36 -7 -57.5t-23.5 -30t-29.5 -10.5t-40 -2h-600q-41 0 -70.5 29.5t-29.5 70.5v800q0 41 29.5 70.5t70.5 29.5v-150q0 -62 44 -106t106 -44h300q62 0 106 44t44 106zM1212 250l-212 -212v162h-200v100h200v162z" />
237
+ <glyph unicode="&#xe209;" d="M658 1197l637 -1104q23 -38 7 -65.5t-60 -27.5h-1276q-44 0 -60 27.5t7 65.5l637 1104q22 39 54 39t54 -39zM704 800h-208q-20 0 -32 -14.5t-8 -34.5l58 -302q4 -20 21.5 -34.5t37.5 -14.5h54q20 0 37.5 14.5t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5zM500 300v-100h200 v100h-200z" />
238
+ <glyph unicode="&#xe210;" d="M425 1100h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM425 800h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5 t17.5 7.5zM825 800h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM25 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150 q0 10 7.5 17.5t17.5 7.5zM425 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM825 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5 v150q0 10 7.5 17.5t17.5 7.5zM25 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM425 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5 t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM825 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
239
+ <glyph unicode="&#xe211;" d="M700 1200h100v-200h-100v-100h350q62 0 86.5 -39.5t-3.5 -94.5l-66 -132q-41 -83 -81 -134h-772q-40 51 -81 134l-66 132q-28 55 -3.5 94.5t86.5 39.5h350v100h-100v200h100v100h200v-100zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-12l137 -100 h-950l138 100h-13q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
240
+ <glyph unicode="&#xe212;" d="M600 1300q40 0 68.5 -29.5t28.5 -70.5h-194q0 41 28.5 70.5t68.5 29.5zM443 1100h314q18 -37 18 -75q0 -8 -3 -25h328q41 0 44.5 -16.5t-30.5 -38.5l-175 -145h-678l-178 145q-34 22 -29 38.5t46 16.5h328q-3 17 -3 25q0 38 18 75zM250 700h700q21 0 35.5 -14.5 t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-150v-200l275 -200h-950l275 200v200h-150q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
241
+ <glyph unicode="&#xe213;" d="M600 1181q75 0 128 -53t53 -128t-53 -128t-128 -53t-128 53t-53 128t53 128t128 53zM602 798h46q34 0 55.5 -28.5t21.5 -86.5q0 -76 39 -183h-324q39 107 39 183q0 58 21.5 86.5t56.5 28.5h45zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13 l138 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
242
+ <glyph unicode="&#xe214;" d="M600 1300q47 0 92.5 -53.5t71 -123t25.5 -123.5q0 -78 -55.5 -133.5t-133.5 -55.5t-133.5 55.5t-55.5 133.5q0 62 34 143l144 -143l111 111l-163 163q34 26 63 26zM602 798h46q34 0 55.5 -28.5t21.5 -86.5q0 -76 39 -183h-324q39 107 39 183q0 58 21.5 86.5t56.5 28.5h45 zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13l138 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
243
+ <glyph unicode="&#xe215;" d="M600 1200l300 -161v-139h-300q0 -57 18.5 -108t50 -91.5t63 -72t70 -67.5t57.5 -61h-530q-60 83 -90.5 177.5t-30.5 178.5t33 164.5t87.5 139.5t126 96.5t145.5 41.5v-98zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13l138 -100h-950l137 100 h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
244
+ <glyph unicode="&#xe216;" d="M600 1300q41 0 70.5 -29.5t29.5 -70.5v-78q46 -26 73 -72t27 -100v-50h-400v50q0 54 27 100t73 72v78q0 41 29.5 70.5t70.5 29.5zM400 800h400q54 0 100 -27t72 -73h-172v-100h200v-100h-200v-100h200v-100h-200v-100h200q0 -83 -58.5 -141.5t-141.5 -58.5h-400 q-83 0 -141.5 58.5t-58.5 141.5v400q0 83 58.5 141.5t141.5 58.5z" />
245
+ <glyph unicode="&#xe218;" d="M150 1100h900q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5zM125 400h950q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-283l224 -224q13 -13 13 -31.5t-13 -32 t-31.5 -13.5t-31.5 13l-88 88h-524l-87 -88q-13 -13 -32 -13t-32 13.5t-13 32t13 31.5l224 224h-289q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM541 300l-100 -100h324l-100 100h-124z" />
246
+ <glyph unicode="&#xe219;" d="M200 1100h800q83 0 141.5 -58.5t58.5 -141.5v-200h-100q0 41 -29.5 70.5t-70.5 29.5h-250q-41 0 -70.5 -29.5t-29.5 -70.5h-100q0 41 -29.5 70.5t-70.5 29.5h-250q-41 0 -70.5 -29.5t-29.5 -70.5h-100v200q0 83 58.5 141.5t141.5 58.5zM100 600h1000q41 0 70.5 -29.5 t29.5 -70.5v-300h-1200v300q0 41 29.5 70.5t70.5 29.5zM300 100v-50q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v50h200zM1100 100v-50q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v50h200z" />
247
+ <glyph unicode="&#xe221;" d="M480 1165l682 -683q31 -31 31 -75.5t-31 -75.5l-131 -131h-481l-517 518q-32 31 -32 75.5t32 75.5l295 296q31 31 75.5 31t76.5 -31zM108 794l342 -342l303 304l-341 341zM250 100h800q21 0 35.5 -14.5t14.5 -35.5v-50h-900v50q0 21 14.5 35.5t35.5 14.5z" />
248
+ <glyph unicode="&#xe223;" d="M1057 647l-189 506q-8 19 -27.5 33t-40.5 14h-400q-21 0 -40.5 -14t-27.5 -33l-189 -506q-8 -19 1.5 -33t30.5 -14h625v-150q0 -21 14.5 -35.5t35.5 -14.5t35.5 14.5t14.5 35.5v150h125q21 0 30.5 14t1.5 33zM897 0h-595v50q0 21 14.5 35.5t35.5 14.5h50v50 q0 21 14.5 35.5t35.5 14.5h48v300h200v-300h47q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-50z" />
249
+ <glyph unicode="&#xe224;" d="M900 800h300v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-375v591l-300 300v84q0 10 7.5 17.5t17.5 7.5h375v-400zM1200 900h-200v200zM400 600h300v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-650q-10 0 -17.5 7.5t-7.5 17.5v950q0 10 7.5 17.5t17.5 7.5h375v-400zM700 700h-200v200z " />
250
+ <glyph unicode="&#xe225;" d="M484 1095h195q75 0 146 -32.5t124 -86t89.5 -122.5t48.5 -142q18 -14 35 -20q31 -10 64.5 6.5t43.5 48.5q10 34 -15 71q-19 27 -9 43q5 8 12.5 11t19 -1t23.5 -16q41 -44 39 -105q-3 -63 -46 -106.5t-104 -43.5h-62q-7 -55 -35 -117t-56 -100l-39 -234q-3 -20 -20 -34.5 t-38 -14.5h-100q-21 0 -33 14.5t-9 34.5l12 70q-49 -14 -91 -14h-195q-24 0 -65 8l-11 -64q-3 -20 -20 -34.5t-38 -14.5h-100q-21 0 -33 14.5t-9 34.5l26 157q-84 74 -128 175l-159 53q-19 7 -33 26t-14 40v50q0 21 14.5 35.5t35.5 14.5h124q11 87 56 166l-111 95 q-16 14 -12.5 23.5t24.5 9.5h203q116 101 250 101zM675 1000h-250q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h250q10 0 17.5 7.5t7.5 17.5v50q0 10 -7.5 17.5t-17.5 7.5z" />
251
+ <glyph unicode="&#xe226;" d="M641 900l423 247q19 8 42 2.5t37 -21.5l32 -38q14 -15 12.5 -36t-17.5 -34l-139 -120h-390zM50 1100h106q67 0 103 -17t66 -71l102 -212h823q21 0 35.5 -14.5t14.5 -35.5v-50q0 -21 -14 -40t-33 -26l-737 -132q-23 -4 -40 6t-26 25q-42 67 -100 67h-300q-62 0 -106 44 t-44 106v200q0 62 44 106t106 44zM173 928h-80q-19 0 -28 -14t-9 -35v-56q0 -51 42 -51h134q16 0 21.5 8t5.5 24q0 11 -16 45t-27 51q-18 28 -43 28zM550 727q-32 0 -54.5 -22.5t-22.5 -54.5t22.5 -54.5t54.5 -22.5t54.5 22.5t22.5 54.5t-22.5 54.5t-54.5 22.5zM130 389 l152 130q18 19 34 24t31 -3.5t24.5 -17.5t25.5 -28q28 -35 50.5 -51t48.5 -13l63 5l48 -179q13 -61 -3.5 -97.5t-67.5 -79.5l-80 -69q-47 -40 -109 -35.5t-103 51.5l-130 151q-40 47 -35.5 109.5t51.5 102.5zM380 377l-102 -88q-31 -27 2 -65l37 -43q13 -15 27.5 -19.5 t31.5 6.5l61 53q19 16 14 49q-2 20 -12 56t-17 45q-11 12 -19 14t-23 -8z" />
252
+ <glyph unicode="&#xe227;" d="M625 1200h150q10 0 17.5 -7.5t7.5 -17.5v-109q79 -33 131 -87.5t53 -128.5q1 -46 -15 -84.5t-39 -61t-46 -38t-39 -21.5l-17 -6q6 0 15 -1.5t35 -9t50 -17.5t53 -30t50 -45t35.5 -64t14.5 -84q0 -59 -11.5 -105.5t-28.5 -76.5t-44 -51t-49.5 -31.5t-54.5 -16t-49.5 -6.5 t-43.5 -1v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-100v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-175q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h75v600h-75q-10 0 -17.5 7.5t-7.5 17.5v150 q0 10 7.5 17.5t17.5 7.5h175v75q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-75h100v75q0 10 7.5 17.5t17.5 7.5zM400 900v-200h263q28 0 48.5 10.5t30 25t15 29t5.5 25.5l1 10q0 4 -0.5 11t-6 24t-15 30t-30 24t-48.5 11h-263zM400 500v-200h363q28 0 48.5 10.5 t30 25t15 29t5.5 25.5l1 10q0 4 -0.5 11t-6 24t-15 30t-30 24t-48.5 11h-363z" />
253
+ <glyph unicode="&#xe230;" d="M212 1198h780q86 0 147 -61t61 -147v-416q0 -51 -18 -142.5t-36 -157.5l-18 -66q-29 -87 -93.5 -146.5t-146.5 -59.5h-572q-82 0 -147 59t-93 147q-8 28 -20 73t-32 143.5t-20 149.5v416q0 86 61 147t147 61zM600 1045q-70 0 -132.5 -11.5t-105.5 -30.5t-78.5 -41.5 t-57 -45t-36 -41t-20.5 -30.5l-6 -12l156 -243h560l156 243q-2 5 -6 12.5t-20 29.5t-36.5 42t-57 44.5t-79 42t-105 29.5t-132.5 12zM762 703h-157l195 261z" />
254
+ <glyph unicode="&#xe231;" d="M475 1300h150q103 0 189 -86t86 -189v-500q0 -41 -42 -83t-83 -42h-450q-41 0 -83 42t-42 83v500q0 103 86 189t189 86zM700 300v-225q0 -21 -27 -48t-48 -27h-150q-21 0 -48 27t-27 48v225h300z" />
255
+ <glyph unicode="&#xe232;" d="M475 1300h96q0 -150 89.5 -239.5t239.5 -89.5v-446q0 -41 -42 -83t-83 -42h-450q-41 0 -83 42t-42 83v500q0 103 86 189t189 86zM700 300v-225q0 -21 -27 -48t-48 -27h-150q-21 0 -48 27t-27 48v225h300z" />
256
+ <glyph unicode="&#xe233;" d="M1294 767l-638 -283l-378 170l-78 -60v-224l100 -150v-199l-150 148l-150 -149v200l100 150v250q0 4 -0.5 10.5t0 9.5t1 8t3 8t6.5 6l47 40l-147 65l642 283zM1000 380l-350 -166l-350 166v147l350 -165l350 165v-147z" />
257
+ <glyph unicode="&#xe234;" d="M250 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM650 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM1050 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44z" />
258
+ <glyph unicode="&#xe235;" d="M550 1100q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM550 700q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM550 300q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44z" />
259
+ <glyph unicode="&#xe236;" d="M125 1100h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM125 700h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5 t17.5 7.5zM125 300h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
260
+ <glyph unicode="&#xe237;" d="M350 1200h500q162 0 256 -93.5t94 -256.5v-500q0 -165 -93.5 -257.5t-256.5 -92.5h-500q-165 0 -257.5 92.5t-92.5 257.5v500q0 165 92.5 257.5t257.5 92.5zM900 1000h-600q-41 0 -70.5 -29.5t-29.5 -70.5v-600q0 -41 29.5 -70.5t70.5 -29.5h600q41 0 70.5 29.5 t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5zM350 900h500q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -14.5 -35.5t-35.5 -14.5h-500q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 14.5 35.5t35.5 14.5zM400 800v-200h400v200h-400z" />
261
+ <glyph unicode="&#xe238;" d="M150 1100h1000q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5 t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5z" />
262
+ <glyph unicode="&#xe239;" d="M650 1187q87 -67 118.5 -156t0 -178t-118.5 -155q-87 66 -118.5 155t0 178t118.5 156zM300 800q124 0 212 -88t88 -212q-124 0 -212 88t-88 212zM1000 800q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM300 500q124 0 212 -88t88 -212q-124 0 -212 88t-88 212z M1000 500q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM700 199v-144q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v142q40 -4 43 -4q17 0 57 6z" />
263
+ <glyph unicode="&#xe240;" d="M745 878l69 19q25 6 45 -12l298 -295q11 -11 15 -26.5t-2 -30.5q-5 -14 -18 -23.5t-28 -9.5h-8q1 0 1 -13q0 -29 -2 -56t-8.5 -62t-20 -63t-33 -53t-51 -39t-72.5 -14h-146q-184 0 -184 288q0 24 10 47q-20 4 -62 4t-63 -4q11 -24 11 -47q0 -288 -184 -288h-142 q-48 0 -84.5 21t-56 51t-32 71.5t-16 75t-3.5 68.5q0 13 2 13h-7q-15 0 -27.5 9.5t-18.5 23.5q-6 15 -2 30.5t15 25.5l298 296q20 18 46 11l76 -19q20 -5 30.5 -22.5t5.5 -37.5t-22.5 -31t-37.5 -5l-51 12l-182 -193h891l-182 193l-44 -12q-20 -5 -37.5 6t-22.5 31t6 37.5 t31 22.5z" />
264
+ <glyph unicode="&#xe241;" d="M1200 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-850q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v850h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM500 450h-25q0 15 -4 24.5t-9 14.5t-17 7.5t-20 3t-25 0.5h-100v-425q0 -11 12.5 -17.5t25.5 -7.5h12v-50h-200v50q50 0 50 25v425h-100q-17 0 -25 -0.5t-20 -3t-17 -7.5t-9 -14.5t-4 -24.5h-25v150h500v-150z" />
265
+ <glyph unicode="&#xe242;" d="M1000 300v50q-25 0 -55 32q-14 14 -25 31t-16 27l-4 11l-289 747h-69l-300 -754q-18 -35 -39 -56q-9 -9 -24.5 -18.5t-26.5 -14.5l-11 -5v-50h273v50q-49 0 -78.5 21.5t-11.5 67.5l69 176h293l61 -166q13 -34 -3.5 -66.5t-55.5 -32.5v-50h312zM412 691l134 342l121 -342 h-255zM1100 150v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5z" />
266
+ <glyph unicode="&#xe243;" d="M50 1200h1100q21 0 35.5 -14.5t14.5 -35.5v-1100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v1100q0 21 14.5 35.5t35.5 14.5zM611 1118h-70q-13 0 -18 -12l-299 -753q-17 -32 -35 -51q-18 -18 -56 -34q-12 -5 -12 -18v-50q0 -8 5.5 -14t14.5 -6 h273q8 0 14 6t6 14v50q0 8 -6 14t-14 6q-55 0 -71 23q-10 14 0 39l63 163h266l57 -153q11 -31 -6 -55q-12 -17 -36 -17q-8 0 -14 -6t-6 -14v-50q0 -8 6 -14t14 -6h313q8 0 14 6t6 14v50q0 7 -5.5 13t-13.5 7q-17 0 -42 25q-25 27 -40 63h-1l-288 748q-5 12 -19 12zM639 611 h-197l103 264z" />
267
+ <glyph unicode="&#xe244;" d="M1200 1100h-1200v100h1200v-100zM50 1000h400q21 0 35.5 -14.5t14.5 -35.5v-900q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v900q0 21 14.5 35.5t35.5 14.5zM650 1000h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM700 900v-300h300v300h-300z" />
268
+ <glyph unicode="&#xe245;" d="M50 1200h400q21 0 35.5 -14.5t14.5 -35.5v-900q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v900q0 21 14.5 35.5t35.5 14.5zM650 700h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400 q0 21 14.5 35.5t35.5 14.5zM700 600v-300h300v300h-300zM1200 0h-1200v100h1200v-100z" />
269
+ <glyph unicode="&#xe246;" d="M50 1000h400q21 0 35.5 -14.5t14.5 -35.5v-350h100v150q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-150h100v-100h-100v-150q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v150h-100v-350q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5zM700 700v-300h300v300h-300z" />
270
+ <glyph unicode="&#xe247;" d="M100 0h-100v1200h100v-1200zM250 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM300 1000v-300h300v300h-300zM250 500h900q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
271
+ <glyph unicode="&#xe248;" d="M600 1100h150q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-150v-100h450q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5h350v100h-150q-21 0 -35.5 14.5 t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5h150v100h100v-100zM400 1000v-300h300v300h-300z" />
272
+ <glyph unicode="&#xe249;" d="M1200 0h-100v1200h100v-1200zM550 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM600 1000v-300h300v300h-300zM50 500h900q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
273
+ <glyph unicode="&#xe250;" d="M865 565l-494 -494q-23 -23 -41 -23q-14 0 -22 13.5t-8 38.5v1000q0 25 8 38.5t22 13.5q18 0 41 -23l494 -494q14 -14 14 -35t-14 -35z" />
274
+ <glyph unicode="&#xe251;" d="M335 635l494 494q29 29 50 20.5t21 -49.5v-1000q0 -41 -21 -49.5t-50 20.5l-494 494q-14 14 -14 35t14 35z" />
275
+ <glyph unicode="&#xe252;" d="M100 900h1000q41 0 49.5 -21t-20.5 -50l-494 -494q-14 -14 -35 -14t-35 14l-494 494q-29 29 -20.5 50t49.5 21z" />
276
+ <glyph unicode="&#xe253;" d="M635 865l494 -494q29 -29 20.5 -50t-49.5 -21h-1000q-41 0 -49.5 21t20.5 50l494 494q14 14 35 14t35 -14z" />
277
+ <glyph unicode="&#xe254;" d="M700 741v-182l-692 -323v221l413 193l-413 193v221zM1200 0h-800v200h800v-200z" />
278
+ <glyph unicode="&#xe255;" d="M1200 900h-200v-100h200v-100h-300v300h200v100h-200v100h300v-300zM0 700h50q0 21 4 37t9.5 26.5t18 17.5t22 11t28.5 5.5t31 2t37 0.5h100v-550q0 -22 -25 -34.5t-50 -13.5l-25 -2v-100h400v100q-4 0 -11 0.5t-24 3t-30 7t-24 15t-11 24.5v550h100q25 0 37 -0.5t31 -2 t28.5 -5.5t22 -11t18 -17.5t9.5 -26.5t4 -37h50v300h-800v-300z" />
279
+ <glyph unicode="&#xe256;" d="M800 700h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-100v-550q0 -22 25 -34.5t50 -14.5l25 -1v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v550h-100q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h800v-300zM1100 200h-200v-100h200v-100h-300v300h200v100h-200v100h300v-300z" />
280
+ <glyph unicode="&#xe257;" d="M701 1098h160q16 0 21 -11t-7 -23l-464 -464l464 -464q12 -12 7 -23t-21 -11h-160q-13 0 -23 9l-471 471q-7 8 -7 18t7 18l471 471q10 9 23 9z" />
281
+ <glyph unicode="&#xe258;" d="M339 1098h160q13 0 23 -9l471 -471q7 -8 7 -18t-7 -18l-471 -471q-10 -9 -23 -9h-160q-16 0 -21 11t7 23l464 464l-464 464q-12 12 -7 23t21 11z" />
282
+ <glyph unicode="&#xe259;" d="M1087 882q11 -5 11 -21v-160q0 -13 -9 -23l-471 -471q-8 -7 -18 -7t-18 7l-471 471q-9 10 -9 23v160q0 16 11 21t23 -7l464 -464l464 464q12 12 23 7z" />
283
+ <glyph unicode="&#xe260;" d="M618 993l471 -471q9 -10 9 -23v-160q0 -16 -11 -21t-23 7l-464 464l-464 -464q-12 -12 -23 -7t-11 21v160q0 13 9 23l471 471q8 7 18 7t18 -7z" />
284
+ <glyph unicode="&#xf8ff;" d="M1000 1200q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM450 1000h100q21 0 40 -14t26 -33l79 -194q5 1 16 3q34 6 54 9.5t60 7t65.5 1t61 -10t56.5 -23t42.5 -42t29 -64t5 -92t-19.5 -121.5q-1 -7 -3 -19.5t-11 -50t-20.5 -73t-32.5 -81.5t-46.5 -83t-64 -70 t-82.5 -50q-13 -5 -42 -5t-65.5 2.5t-47.5 2.5q-14 0 -49.5 -3.5t-63 -3.5t-43.5 7q-57 25 -104.5 78.5t-75 111.5t-46.5 112t-26 90l-7 35q-15 63 -18 115t4.5 88.5t26 64t39.5 43.5t52 25.5t58.5 13t62.5 2t59.5 -4.5t55.5 -8l-147 192q-12 18 -5.5 30t27.5 12z" />
285
+ <glyph unicode="&#x1f511;" d="M250 1200h600q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-150v-500l-255 -178q-19 -9 -32 -1t-13 29v650h-150q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM400 1100v-100h300v100h-300z" />
286
+ <glyph unicode="&#x1f6aa;" d="M250 1200h750q39 0 69.5 -40.5t30.5 -84.5v-933l-700 -117v950l600 125h-700v-1000h-100v1025q0 23 15.5 49t34.5 26zM500 525v-100l100 20v100z" />
287
+ </font>
288
+ </defs></svg>
assets/fonts/glyphicons-halflings-regular.ttf ADDED
Binary file
assets/fonts/glyphicons-halflings-regular.woff ADDED
Binary file
assets/fonts/glyphicons-halflings-regular.woff2 ADDED
Binary file
assets/js/app.js ADDED
@@ -0,0 +1,497 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery.noConflict();
2
+ (function ($) {
3
+ jQuery(document).ready(function () {
4
+ var ajax_url = $('#ajax_path').val();
5
+ var admin_url = $('#admin_path').val();
6
+ var pro_suffix = $('#pro_suffix').val();
7
+ var is_pro = $('#is_pro').val();
8
+ $(".datepicker").datepicker();
9
+ // Default Hide List.
10
+ //$('#user_div_0').hide();
11
+ //$('#product_div_0').hide();
12
+ //$('#category_div_0').hide();
13
+ //$('#roles_div_0').hide();
14
+ //$('#countries_div_0').hide();
15
+
16
+ //--------------------------------------------------------------------------------------------------------------
17
+ //--------------------------------------------PRICING RULES-----------------------------------------------------
18
+ //--------------------------------------------------------------------------------------------------------------
19
+
20
+
21
+ // Manage Product Selection ON-LOAD
22
+ var active_selection = $('#apply_to').val();
23
+ if (active_selection == 'specific_products') {
24
+ $('#product_list').css('display', 'block');
25
+ $('#category_list').css('display', 'none');
26
+ } else if (active_selection == 'specific_category') {
27
+ $('#product_list').css('display', 'none');
28
+ $('#category_list').css('display', 'block');
29
+ } else {
30
+ $('#product_list').css('display', 'none');
31
+ $('#category_list').css('display', 'none');
32
+ }
33
+
34
+ // Manage Customer Selection ON-LOAD
35
+ var user_selection = $('#apply_customer').val();
36
+ if (user_selection == 'only_given') {
37
+ $('#user_list').css('display', 'block');
38
+ } else {
39
+ $('#user_list').css('display', 'none');
40
+ }
41
+
42
+ // Saving Rule.
43
+ $('#savePriceRule').on('click', function (event) {
44
+ var form = $('#form_price_rule').serialize();
45
+ var current = $(this);
46
+ var rule_id = $('#rule_id').val();
47
+ event.preventDefault();
48
+ console.log($('#rule_name').val());
49
+ if ($('#rule_name').val() == '') {
50
+ alert('Please Enter the Rule Name to Create / Save.');
51
+ } else {
52
+ current.removeClass('button-primary');
53
+ current.addClass('button-secondary');
54
+ current.val('Saving...');
55
+ $.ajax({
56
+ url: ajax_url,
57
+ type: 'POST',
58
+ data: {action: 'savePriceRule', data: form},
59
+ success: function () {
60
+ // After Status Changed.
61
+
62
+ resizeChart = setTimeout(function () {
63
+ current.addClass('button-primary');
64
+ current.removeClass('button-secondary');
65
+ current.val('Save Rule');
66
+ }, 300);
67
+ console.log(rule_id);
68
+ // Reset, if its New Form.
69
+ if (rule_id == 0) {
70
+ console.log(admin_url);
71
+ $('#form_price_rule')[0].reset();
72
+
73
+ $(location).attr('href', admin_url);
74
+ }
75
+ }
76
+
77
+ });
78
+ }
79
+ });
80
+
81
+ // Adding New Discount Range.
82
+ $('#addNewDiscountRange').on('click', function () {
83
+ var count = $('.discount_rule_list').length + 1;
84
+ if (is_pro) {
85
+ var form = '<div class="discount_rule_list"> <div class="form-group"><label>Min Quantity <input type="text" name="discount_range[' + count + '][min_qty]" class="form-control" value="" placeholder="ex. 1"></label>' +
86
+ '<label>Max Quantity <input type="text" name="discount_range[' + count + '][max_qty]" class="form-control" value="" placeholder="ex. 50"> </label> <label>Adjustment Type<select class="form-control" name="discount_range[' + count + '][discount_type]"> ' +
87
+ '<option value="percentage_discount"> Percentage Discount </option> <option value="price_discount">Price Discount </option> </select></label> <label>Value <input type="text" name="discount_range[' + count + '][to_discount]" class="form-control" value="" placeholder="ex. 50"> ' +
88
+ '</label> <label>Action <a href=javascript:void(0) class="button button-secondary form-control remove_discount_range">Remove</a></label> </div> </div>';
89
+ } else {
90
+ var form = '<div class="discount_rule_list"> <div class="form-group"><label>Min Quantity <input type="text" name="discount_range[' + count + '][min_qty]" class="form-control" value="" placeholder="ex. 1"></label>' +
91
+ '<label>Max Quantity <input type="text" name="discount_range[' + count + '][max_qty]" class="form-control" value="" placeholder="ex. 50"> </label> <label>Adjustment Type<select class="form-control" name="discount_range[' + count + '][discount_type]"> ' +
92
+ '<option value="percentage_discount"> Percentage Discount </option> <option disabled>Price Discount <b>' + pro_suffix + '</b> </option> </select></label> <label>Value <input type="text" name="discount_range[' + count + '][to_discount]" class="form-control" value="" placeholder="ex. 50"> ' +
93
+ '</label> <label>Action <a href=javascript:void(0) class="button button-secondary form-control remove_discount_range">Remove</a></label> </div> </div>';
94
+ }
95
+ $('#discount_rule_list').append(form);
96
+ });
97
+
98
+ // Removing Discount Rule.
99
+ $(document).on('click', '.remove_discount_range', function () {
100
+ var confirm_delete = confirm('Are you sure to remove this ?');
101
+ if (confirm_delete) {
102
+ $(this).closest('.discount_rule_list').remove();
103
+ }
104
+ });
105
+
106
+ // Enabling and Disabling the Status of the Rule.
107
+ $('.manage_status').on('click', function (event) {
108
+ event.preventDefault();
109
+ var current = $(this);
110
+ var id = $(this).attr('id');
111
+ id = id.replace('state_', '');
112
+ $.ajax({
113
+ url: ajax_url,
114
+ type: 'POST',
115
+ data: {action: 'UpdateStatus', id: id, from: 'pricing-rules'},
116
+ success: function (status) {
117
+ // After Status Changed.
118
+ if (status == 'Disable') {
119
+ current.addClass('button-primary');
120
+ current.removeClass('button-secondary');
121
+ current.html('Enable');
122
+ } else if (status == 'Publish') {
123
+ current.removeClass('button-primary');
124
+ current.addClass('button-secondary');
125
+ current.html('Disable');
126
+ }
127
+ }
128
+
129
+ });
130
+ });
131
+
132
+ // Remove Rule.
133
+ $('.delete_rule').on('click', function (event) {
134
+ event.preventDefault();
135
+ var current = $(this);
136
+ var id = $(this).attr('id');
137
+ id = id.replace('delete_', '');
138
+ var confirm_delete = confirm('Are you sure to remove ?');
139
+ if (confirm_delete) {
140
+ $.ajax({
141
+ url: ajax_url,
142
+ type: 'POST',
143
+ data: {action: 'RemoveRule', id: id, from: 'pricing-rules'},
144
+ success: function () {
145
+ // After Removed.
146
+ current.closest('tr').remove();
147
+ location.reload();
148
+ }
149
+ });
150
+ }
151
+ });
152
+
153
+ $('#restriction_block').hide();
154
+ $('#discount_block').hide();
155
+
156
+ $('.general_tab').on('click', function () {
157
+ $('#general_block').show();
158
+ $('#restriction_block').hide();
159
+ $('#discount_block').hide();
160
+ });
161
+ $('.restriction_tab').on('click', function () {
162
+ $('#general_block').hide();
163
+ $('#restriction_block').show();
164
+ $('#discount_block').hide();
165
+ });
166
+ $('.discount_tab').on('click', function () {
167
+ $('#general_block').hide();
168
+ $('#restriction_block').hide();
169
+ $('#discount_block').show();
170
+ });
171
+
172
+ // Manage the Type of Apply.
173
+ $('#apply_to').on('change', function () {
174
+ var option = $(this).val();
175
+
176
+ if (option == 'specific_products') {
177
+ $('#product_list').css('display', 'block');
178
+ $('#category_list').css('display', 'none');
179
+ } else if (option == 'specific_category') {
180
+ $('#product_list').css('display', 'none');
181
+ $('#category_list').css('display', 'block');
182
+ } else {
183
+ $('#product_list').css('display', 'none');
184
+ $('#category_list').css('display', 'none');
185
+ }
186
+ });
187
+
188
+ // Manage the Customer.
189
+ $('#apply_customer').on('change', function () {
190
+ var option = $(this).val();
191
+ console.log(option);
192
+ if (option == 'only_given') {
193
+ $('#user_list').show();
194
+ } else {
195
+ $('#user_list').hide();
196
+ }
197
+ });
198
+
199
+ $(document).on('keyup', '.rule_descr', function () {
200
+ var value = $(this).val();
201
+ value = '| ' + value;
202
+ var id = $(this).attr('id');
203
+ id = id.replace('rule_descr_', '');
204
+ $('#rule_label_' + id).html(value);
205
+ });
206
+
207
+
208
+ //--------------------------------------------------------------------------------------------------------------
209
+ //-----------------------------------------------CART RULES-----------------------------------------------------
210
+ //--------------------------------------------------------------------------------------------------------------
211
+
212
+ $(document).on('click', '#add_cart_rule', function () {
213
+
214
+ var count = $('.cart_rules_list').length;
215
+ console.log(count);
216
+ // Cloning the List.
217
+ var user_list = $('#cart_user_list_0 > option').clone();
218
+ var product_list = $('#cart_product_list_0 > option').clone();
219
+ var category_list = $('#cart_category_list_0 > option').clone();
220
+ var roles_list = $('#cart_roles_list_0 > option').clone();
221
+ var country_list = $('#cart_countries_list_0 > option').clone();
222
+ if (is_pro) {
223
+ var form = '<div class="cart_rules_list row"> <div class="col-md-3 form-group"> <label>Type <select class="form-control cart_rule_type" id="cart_condition_type_' + count + '" name="discount_rule[' + count + '][type]"> <optgroup label="Cart Subtotal"><option value="subtotal_least" selected="selected">Subtotal at least</option><option value="subtotal_less">Subtotal less than</option></optgroup>' +
224
+ '<optgroup label="Cart Item Count"><option value="item_count_least">Count of cart items at least</option><option value="item_count_less">Count of cart items less than</option></optgroup>' +
225
+ '<optgroup label="Quantity Sum"><option value="quantity_least">Sum of item quantities at least</option><option value="quantity_less">Sum of item quantities less than</option></optgroup><!-- At least one of these should present in the cart to apply. -->' +
226
+ //'<optgroup label="Products In Cart"><option value="products_atleast_one">At least one product in cart</option><!-- These products should not present in the cart to apply. --><option value="products_not_in">None of selected products in cart</option></optgroup>' +
227
+ //'<optgroup label="Categories In Cart"><!-- At least one of these should present in the cart to apply. --><option value="categories_atleast_one">At least one category in cart</option><!-- These Category should not present in the cart to apply. --><option value="categories_not_in">None of selected categories in cart</option></optgroup>' +
228
+ '<optgroup label="Customer Details (must be logged in)"><option value="users_in">User in list</option><option value="roles_in">User role in list</option><option value="shipping_countries_in">Shipping country in list</option></optgroup></select></label></div>' +
229
+ '<div class="col-md-3 form-group"><label> Value<div id="general_' + count + '"><input type="text" name="discount_rule[' + count + '][option_value]"></div>' +
230
+ '<div id="user_div_' + count + '"><select id="cart_user_list_' + count + '" class="user_list selectpicker" multiple name="discount_rule[' + count + '][users_to_apply][]"></select></div>' +
231
+ '<div id="product_div_' + count + '"><select id="cart_product_list_' + count + '" class="product_list selectpicker" multiple name="discount_rule[' + count + '][product_to_apply][]"></select></div>' +
232
+ '<div id="category_div_' + count + '"><select id="cart_category_list_' + count + '" class="category_list selectpicker" multiple name="discount_rule[' + count + '][category_to_apply][]"></select></div>' +
233
+ '<div id="roles_div_' + count + '"><select id="cart_roles_list_' + count + '" class="roles_list selectpicker" multiple name="discount_rule[' + count + '][user_roles_to_apply][]"></select></div>' +
234
+ '<div id="countries_div_' + count + '"><select id="cart_countries_list_' + count + '" class="country_list selectpicker" multiple name="discount_rule[' + count + '][countries_to_apply][]"></select></div>' +
235
+ '</div><div class="col-md-1"> <label> Action <a href=javascript:void(0) class="button button-secondary remove_cart_rule">Remove</a> </label> </div>' +
236
+ '</label></div>';
237
+ } else {
238
+ var form = '<div class="cart_rules_list row"> <div class="col-md-3 form-group"> <label>Type <select class="form-control cart_rule_type" id="cart_condition_type_' + count + '" name="discount_rule[' + count + '][type]"> <optgroup label="Cart Subtotal"><option value="subtotal_least" selected="selected">Subtotal at least</option><option value="subtotal_less">Subtotal less than</option></optgroup>' +
239
+ '<optgroup label="Cart Item Count"><option value="item_count_least">Count of cart items at least</option><option value="item_count_less">Count of cart items less than</option></optgroup>' +
240
+ '<optgroup label="Quantity Sum"><option disabled>Sum of item quantities at least <b>' + pro_suffix + '</b></option><option disabled>Sum of item quantities less than <b>' + pro_suffix + '</b></option></optgroup><!-- At least one of these should present in the cart to apply. -->' +
241
+ //'<optgroup label="Products In Cart"><option value="products_atleast_one">At least one product in cart</option><!-- These products should not present in the cart to apply. --><option value="products_not_in">None of selected products in cart</option></optgroup>' +
242
+ //'<optgroup label="Categories In Cart"><!-- At least one of these should present in the cart to apply. --><option value="categories_atleast_one">At least one category in cart</option><!-- These Category should not present in the cart to apply. --><option value="categories_not_in">None of selected categories in cart</option></optgroup>' +
243
+ '<optgroup label="Customer Details (must be logged in)"><option disabled>User in list <b>' + pro_suffix + '</b></option><option disabled>User role in list <b>' + pro_suffix + '</b></option><option disabled>Shipping country in list <b>' + pro_suffix + '</b></option></optgroup></select></label></div>' +
244
+ '<div class="col-md-3 form-group"><label> Value<div id="general_' + count + '"><input type="text" name="discount_rule[' + count + '][option_value]"></div>' +
245
+ '<div id="user_div_' + count + '"><select id="cart_user_list_' + count + '" class="user_list selectpicker" multiple name="discount_rule[' + count + '][users_to_apply][]"></select></div>' +
246
+ '<div id="product_div_' + count + '"><select id="cart_product_list_' + count + '" class="product_list selectpicker" multiple name="discount_rule[' + count + '][product_to_apply][]"></select></div>' +
247
+ '<div id="category_div_' + count + '"><select id="cart_category_list_' + count + '" class="category_list selectpicker" multiple name="discount_rule[' + count + '][category_to_apply][]"></select></div>' +
248
+ '<div id="roles_div_' + count + '"><select id="cart_roles_list_' + count + '" class="roles_list selectpicker" multiple name="discount_rule[' + count + '][user_roles_to_apply][]"></select></div>' +
249
+ '<div id="countries_div_' + count + '"><select id="cart_countries_list_' + count + '" class="country_list selectpicker" multiple name="discount_rule[' + count + '][countries_to_apply][]"></select></div>' +
250
+ '</div><div class="col-md-1"> <label> Action <a href=javascript:void(0) class="button button-secondary remove_cart_rule">Remove</a> </label> </div>' +
251
+ '</label></div>';
252
+ }
253
+
254
+ // Append to Cart rules list.
255
+ $('#cart_rules_list').append(form);
256
+
257
+ console.log('Count : ' + count);
258
+ console.log(category_list);
259
+
260
+ // Append the List of Values.
261
+ $('#cart_user_list_' + count).append(user_list);
262
+ $('#cart_product_list_' + count).append(product_list);
263
+ $('#cart_category_list_' + count).append(category_list);
264
+ $('#cart_roles_list_' + count).append(roles_list);
265
+ $('#cart_countries_list_' + count).append(country_list);
266
+
267
+ // Refresh the SelectPicker.
268
+ $('.user_list').selectpicker('refresh');
269
+ $('.product_list').selectpicker('refresh');
270
+ $('.category_list').selectpicker('refresh');
271
+ $('.roles_list').selectpicker('refresh');
272
+ $('.country_list').selectpicker('refresh');
273
+
274
+ // Default Hide List.
275
+ $('#user_div_' + count).css('display', 'none');
276
+ $('#product_div_' + count).css('display', 'none');
277
+ $('#category_div_' + count).css('display', 'none');
278
+ $('#roles_div_' + count).css('display', 'none');
279
+ $('#countries_div_' + count).css('display', 'none');
280
+ });
281
+
282
+ $(document).on('change', '.cart_rule_type', function () {
283
+ var id = $(this).attr('id');
284
+ id = id.replace('cart_condition_type_', '');
285
+ var active = $(this).val();
286
+ showOnly(active, id);
287
+
288
+ });
289
+
290
+
291
+ // Saving Cart Rule.
292
+ $('#saveCartRule').on('click', function (event) {
293
+ var form = $('#form_cart_rule').serialize();
294
+ var current = $(this);
295
+ var rule_id = $('#rule_id').val();
296
+
297
+ event.preventDefault();
298
+ if ($('#rule_name').val() == '') {
299
+ alert('Please Enter the Rule Name to Create / Save.');
300
+ } else {
301
+ current.removeClass('button-primary');
302
+ current.addClass('button-secondary');
303
+ current.val('Saving...');
304
+ $.ajax({
305
+ url: ajax_url,
306
+ type: 'POST',
307
+ data: {action: 'saveCartRule', data: form},
308
+ success: function () {
309
+ // After Status Changed.
310
+
311
+ resizeChart = setTimeout(function () {
312
+ current.addClass('button-primary');
313
+ current.removeClass('button-secondary');
314
+ current.val('Save Rule');
315
+ }, 300);
316
+
317
+ // Reset, if its New Form.
318
+ if (rule_id == 0) {
319
+ //$('#form_cart_rule')[0].reset();
320
+ // Reset the Select Picker.
321
+ //$('.selectpicker').selectpicker('val', []);
322
+ //location.reload();
323
+ $(location).attr('href', admin_url + '&tab=cart-rules');
324
+ }
325
+ }
326
+ });
327
+ }
328
+ });
329
+
330
+ // Change the List to Show, on change of Rule Type.
331
+ $('.cart_rule_type').on('change', function () {
332
+ var id = $(this).attr('id');
333
+ console.log(id);
334
+ id = id.replace('cart_condition_type_', '');
335
+
336
+ $('#cart_user_list_' + id).selectpicker('val', []);
337
+ $('#cart_product_list_' + id).selectpicker('val', []);
338
+ $('#cart_category_list_' + id).selectpicker('val', []);
339
+ $('#cart_roles_list_' + id).selectpicker('val', []);
340
+ $('#cart_countries_list_' + id).selectpicker('val', []);
341
+
342
+ });
343
+
344
+ // Enabling and Disabling the Status of the Rule.
345
+ $('.cart_manage_status').on('click', function (event) {
346
+ event.preventDefault();
347
+ var current = $(this);
348
+ var id = $(this).attr('id');
349
+ id = id.replace('state_', '');
350
+ $.ajax({
351
+ url: ajax_url,
352
+ type: 'POST',
353
+ data: {action: 'UpdateStatus', id: id, from: 'cart-rules'},
354
+ success: function (status) {
355
+ // After Status Changed.
356
+ // After Status Changed.
357
+ if (status == 'Disable') {
358
+ current.removeClass('button-primary');
359
+ current.addClass('button-secondary');
360
+ current.html('Enable');
361
+ } else if (status == 'Publish') {
362
+ current.addClass('button-primary');
363
+ current.removeClass('button-secondary');
364
+ current.html('Disable');
365
+ }
366
+ }
367
+
368
+ });
369
+ });
370
+
371
+ // Removing Cart Rule.
372
+ $('.cart_delete_rule').on('click', function (event) {
373
+ event.preventDefault();
374
+ var current = $(this);
375
+ var id = $(this).attr('id');
376
+ id = id.replace('delete_', '');
377
+ var confirm_delete = confirm('Are you sure to remove ?');
378
+ if (confirm_delete) {
379
+ $.ajax({
380
+ url: ajax_url,
381
+ type: 'POST',
382
+ data: {action: 'RemoveRule', id: id, from: 'cart-rules'},
383
+ success: function () {
384
+ // After Removed.
385
+ current.closest('tr').remove();
386
+ location.reload();
387
+ }
388
+ });
389
+ }
390
+ });
391
+
392
+ // Removing Cart Condition.
393
+ $(document).on('click', '.remove_cart_rule', function () {
394
+ var confirm_remove = confirm('Are You Sure to Remove this ?');
395
+ if (confirm_remove) {
396
+ $(this).closest('.cart_rules_list').remove();
397
+ }
398
+ });
399
+
400
+ //--------------------------------------------------------------------------------------------------------------
401
+ //-----------------------------------------------SETTINGS-------------------------------------------------------
402
+ //--------------------------------------------------------------------------------------------------------------
403
+
404
+ $('#saveConfig').on('click', function (event) {
405
+ event.preventDefault();
406
+ console.log(ajax_url);
407
+ var form = $('#discount_config').serialize();
408
+ var current = $(this);
409
+ current.removeClass('button-primary');
410
+ current.addClass('button-secondary');
411
+ current.val('Saving...');
412
+ $.ajax({
413
+ url: ajax_url,
414
+ type: 'POST',
415
+ data: {action: 'saveConfig', from: 'settings', data: form},
416
+ success: function () {
417
+ // After Removed.
418
+ resizeChart = setTimeout(function () {
419
+ current.addClass('button-primary');
420
+ current.removeClass('button-secondary');
421
+ current.val('Save Rule');
422
+ }, 300);
423
+
424
+ }
425
+ });
426
+ });
427
+
428
+ //--------------------------------------------------------------------------------------------------------------
429
+ //-----------------------------------------------SIDE PANEL-----------------------------------------------------
430
+ //--------------------------------------------------------------------------------------------------------------
431
+
432
+ $('.woo-side-button').on('click', function () {
433
+ //$('#woo-side-panel').toggle();
434
+ if ($('#sidebar_text').html() == 'Show') {
435
+ $('#sidebar_text').html('Hide');
436
+ $('.woo-side-panel').show();
437
+ $('#sidebar_icon').addClass('dashicons-arrow-left');
438
+ $('#sidebar_icon').removeClass('dashicons-arrow-down');
439
+ } else {
440
+ $('#sidebar_text').html('Show');
441
+ $('.woo-side-panel').hide();
442
+ $('#sidebar_icon').removeClass('dashicons-arrow-left');
443
+ $('#sidebar_icon').addClass('dashicons-arrow-down');
444
+ }
445
+ });
446
+
447
+ });
448
+
449
+ //------------------------------------------------------------------------------------------------------------------
450
+ function showOnly(option, id) {
451
+ if (option == 'products_atleast_one' || option == 'products_not_in') {
452
+ $('#user_div_' + id).css('display', 'none');
453
+ $('#product_div_' + id).css('display', 'block');
454
+ $('#category_div_' + id).css('display', 'none');
455
+ $('#general_' + id).css('display', 'none');
456
+ $('#roles_div_' + id).css('display', 'none');
457
+ $('#countries_div_' + id).css('display', 'none');
458
+ } else if (option == 'categories_atleast_one' || option == 'categories_not_in') {
459
+ $('#user_div_' + id).css('display', 'none');
460
+ $('#product_div_' + id).css('display', 'none');
461
+ $('#category_div_' + id).css('display', 'block');
462
+ $('#general_' + id).css('display', 'none');
463
+ $('#roles_div_' + id).css('display', 'none');
464
+ $('#countries_div_' + id).css('display', 'none');
465
+ } else if (option == 'users_in') {
466
+ $('#user_div_' + id).css('display', 'block');
467
+ $('#product_div_' + id).css('display', 'none');
468
+ $('#category_div_' + id).css('display', 'none');
469
+ $('#general_' + id).css('display', 'none');
470
+ $('#roles_div_' + id).css('display', 'none');
471
+ $('#countries_div_' + id).css('display', 'none');
472
+ } else if (option == 'roles_in') {
473
+ $('#user_div_' + id).css('display', 'none');
474
+ $('#product_div_' + id).css('display', 'none');
475
+ $('#category_div_' + id).css('display', 'none');
476
+ $('#general_' + id).css('display', 'none');
477
+ $('#roles_div_' + id).css('display', 'block');
478
+ $('#countries_div_' + id).css('display', 'none');
479
+ } else if (option == 'shipping_countries_in') {
480
+ $('#user_div_' + id).css('display', 'none');
481
+ $('#product_div_' + id).css('display', 'none');
482
+ $('#category_div_' + id).css('display', 'none');
483
+ $('#general_' + id).css('display', 'none');
484
+ $('#roles_div_' + id).css('display', 'none');
485
+ $('#countries_div_' + id).css('display', 'block');
486
+ } else {
487
+ $('#user_div_' + id).css('display', 'none');
488
+ $('#product_div_' + id).css('display', 'none');
489
+ $('#category_div_' + id).css('display', 'none');
490
+ $('#general_' + id).css('display', 'block');
491
+ $('#roles_div_' + id).css('display', 'none');
492
+ $('#countries_div_' + id).css('display', 'none');
493
+ }
494
+
495
+ }
496
+
497
+ })(jQuery);
assets/js/bootstrap.min.js ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ /*!
2
+ * Bootstrap v3.3.7 (http://getbootstrap.com)
3
+ * Copyright 2011-2016 Twitter, Inc.
4
+ * Licensed under the MIT license
5
+ */
6
+ if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.7",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a("#"===f?[]:f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.7",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c).prop(c,!0)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c).prop(c,!1))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target).closest(".btn");b.call(d,"toggle"),a(c.target).is('input[type="radio"], input[type="checkbox"]')||(c.preventDefault(),d.is("input,button")?d.trigger("focus"):d.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(a>this.$items.length-1||a<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.7",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.7",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){document===a.target||this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+e).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",a,b)};c.VERSION="3.3.7",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);if(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),!c.isInStateTrue())return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-m<o.top?"bottom":"right"==h&&k.right+l>o.width?"left":"left"==h&&k.left-l<o.left?"right":h,f.removeClass(n).addClass(h)}var p=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(p,h);var q=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top+=g,b.left+=h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.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")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element&&e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);if(this.$element.trigger(g),!g.isDefaultPrevented())return f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this},c.prototype.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","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=window.SVGElement&&c instanceof window.SVGElement,g=d?{top:0,left:0}:f?null:b.offset(),h={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},i=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,h,i,g)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null,a.$element=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.7",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.7",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){
7
+ this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.7",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.7",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return e<c&&"top";if("bottom"==this.affixed)return null!=c?!(e+this.unpin<=f.top)&&"bottom":!(e+g<=a-d)&&"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&e<=c?"top":null!=d&&i+j>=a-d&&"bottom"},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
assets/js/bootstrap.select.min.js ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * Bootstrap-select v1.10.0 (http://silviomoreto.github.io/bootstrap-select)
3
+ *
4
+ * Copyright 2013-2016 bootstrap-select
5
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
6
+ */
7
+ !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){"use strict";function b(b){var c=[{re:/[\xC0-\xC6]/g,ch:"A"},{re:/[\xE0-\xE6]/g,ch:"a"},{re:/[\xC8-\xCB]/g,ch:"E"},{re:/[\xE8-\xEB]/g,ch:"e"},{re:/[\xCC-\xCF]/g,ch:"I"},{re:/[\xEC-\xEF]/g,ch:"i"},{re:/[\xD2-\xD6]/g,ch:"O"},{re:/[\xF2-\xF6]/g,ch:"o"},{re:/[\xD9-\xDC]/g,ch:"U"},{re:/[\xF9-\xFC]/g,ch:"u"},{re:/[\xC7-\xE7]/g,ch:"c"},{re:/[\xD1]/g,ch:"N"},{re:/[\xF1]/g,ch:"n"}];return a.each(c,function(){b=b.replace(this.re,this.ch)}),b}function c(a){var b={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},c="(?:"+Object.keys(b).join("|")+")",d=new RegExp(c),e=new RegExp(c,"g"),f=null==a?"":""+a;return d.test(f)?f.replace(e,function(a){return b[a]}):f}function d(b,c){var d=arguments,f=b,g=c;[].shift.apply(d);var h,i=this.each(function(){var b=a(this);if(b.is("select")){var c=b.data("selectpicker"),i="object"==typeof f&&f;if(c){if(i)for(var j in i)i.hasOwnProperty(j)&&(c.options[j]=i[j])}else{var k=a.extend({},e.DEFAULTS,a.fn.selectpicker.defaults||{},b.data(),i);k.template=a.extend({},e.DEFAULTS.template,a.fn.selectpicker.defaults?a.fn.selectpicker.defaults.template:{},b.data().template,i.template),b.data("selectpicker",c=new e(this,k,g))}"string"==typeof f&&(h=c[f]instanceof Function?c[f].apply(c,d):c.options[f])}});return"undefined"!=typeof h?h:i}String.prototype.includes||!function(){var a={}.toString,b=function(){try{var a={},b=Object.defineProperty,c=b(a,a,a)&&b}catch(d){}return c}(),c="".indexOf,d=function(b){if(null==this)throw new TypeError;var d=String(this);if(b&&"[object RegExp]"==a.call(b))throw new TypeError;var e=d.length,f=String(b),g=f.length,h=arguments.length>1?arguments[1]:void 0,i=h?Number(h):0;i!=i&&(i=0);var j=Math.min(Math.max(i,0),e);return g+j>e?!1:-1!=c.call(d,f,i)};b?b(String.prototype,"includes",{value:d,configurable:!0,writable:!0}):String.prototype.includes=d}(),String.prototype.startsWith||!function(){var a=function(){try{var a={},b=Object.defineProperty,c=b(a,a,a)&&b}catch(d){}return c}(),b={}.toString,c=function(a){if(null==this)throw new TypeError;var c=String(this);if(a&&"[object RegExp]"==b.call(a))throw new TypeError;var d=c.length,e=String(a),f=e.length,g=arguments.length>1?arguments[1]:void 0,h=g?Number(g):0;h!=h&&(h=0);var i=Math.min(Math.max(h,0),d);if(f+i>d)return!1;for(var j=-1;++j<f;)if(c.charCodeAt(i+j)!=e.charCodeAt(j))return!1;return!0};a?a(String.prototype,"startsWith",{value:c,configurable:!0,writable:!0}):String.prototype.startsWith=c}(),Object.keys||(Object.keys=function(a,b,c){c=[];for(b in a)c.hasOwnProperty.call(a,b)&&c.push(b);return c}),a.fn.triggerNative=function(a){var b,c=this[0];c.dispatchEvent?("function"==typeof Event?b=new Event(a,{bubbles:!0}):(b=document.createEvent("Event"),b.initEvent(a,!0,!1)),c.dispatchEvent(b)):(c.fireEvent&&(b=document.createEventObject(),b.eventType=a,c.fireEvent("on"+a,b)),this.trigger(a))},a.expr[":"].icontains=function(b,c,d){var e=a(b),f=(e.data("tokens")||e.text()).toUpperCase();return f.includes(d[3].toUpperCase())},a.expr[":"].ibegins=function(b,c,d){var e=a(b),f=(e.data("tokens")||e.text()).toUpperCase();return f.startsWith(d[3].toUpperCase())},a.expr[":"].aicontains=function(b,c,d){var e=a(b),f=(e.data("tokens")||e.data("normalizedText")||e.text()).toUpperCase();return f.includes(d[3].toUpperCase())},a.expr[":"].aibegins=function(b,c,d){var e=a(b),f=(e.data("tokens")||e.data("normalizedText")||e.text()).toUpperCase();return f.startsWith(d[3].toUpperCase())};var e=function(b,c,d){d&&(d.stopPropagation(),d.preventDefault()),this.$element=a(b),this.$newElement=null,this.$button=null,this.$menu=null,this.$lis=null,this.options=c,null===this.options.title&&(this.options.title=this.$element.attr("title")),this.val=e.prototype.val,this.render=e.prototype.render,this.refresh=e.prototype.refresh,this.setStyle=e.prototype.setStyle,this.selectAll=e.prototype.selectAll,this.deselectAll=e.prototype.deselectAll,this.destroy=e.prototype.destroy,this.remove=e.prototype.remove,this.show=e.prototype.show,this.hide=e.prototype.hide,this.init()};e.VERSION="1.10.0",e.DEFAULTS={noneSelectedText:"None selected",noneResultsText:"No results matched {0}",countSelectedText:function(a,b){return 1==a?"{0} item selected":"{0} items selected"},maxOptionsText:function(a,b){return[1==a?"Limit reached ({n} item max)":"Limit reached ({n} items max)",1==b?"Group limit reached ({n} item max)":"Group limit reached ({n} items max)"]},selectAllText:"Select All",deselectAllText:"Deselect All",doneButton:!1,doneButtonText:"Close",multipleSeparator:", ",styleBase:"btn",style:"btn-default",size:"auto",title:null,selectedTextFormat:"values",width:!1,container:!1,hideDisabled:!1,showSubtext:!1,showIcon:!0,showContent:!0,dropupAuto:!0,header:!1,liveSearch:!1,liveSearchPlaceholder:null,liveSearchNormalize:!1,liveSearchStyle:"contains",actionsBox:!1,iconBase:"glyphicon",tickIcon:"glyphicon-ok",showTick:!1,template:{caret:'<span class="caret"></span>'},maxOptions:!1,mobile:!1,selectOnTab:!1,dropdownAlignRight:!1},e.prototype={constructor:e,init:function(){var b=this,c=this.$element.attr("id");this.$element.addClass("bs-select-hidden"),this.liObj={},this.multiple=this.$element.prop("multiple"),this.autofocus=this.$element.prop("autofocus"),this.$newElement=this.createView(),this.$element.after(this.$newElement).appendTo(this.$newElement),this.$button=this.$newElement.children("button"),this.$menu=this.$newElement.children(".dropdown-menu"),this.$menuInner=this.$menu.children(".inner"),this.$searchbox=this.$menu.find("input"),this.$element.removeClass("bs-select-hidden"),this.options.dropdownAlignRight&&this.$menu.addClass("dropdown-menu-right"),"undefined"!=typeof c&&(this.$button.attr("data-id",c),a('label[for="'+c+'"]').click(function(a){a.preventDefault(),b.$button.focus()})),this.checkDisabled(),this.clickListener(),this.options.liveSearch&&this.liveSearchListener(),this.render(),this.setStyle(),this.setWidth(),this.options.container&&this.selectPosition(),this.$menu.data("this",this),this.$newElement.data("this",this),this.options.mobile&&this.mobile(),this.$newElement.on({"hide.bs.dropdown":function(a){b.$element.trigger("hide.bs.select",a)},"hidden.bs.dropdown":function(a){b.$element.trigger("hidden.bs.select",a)},"show.bs.dropdown":function(a){b.$element.trigger("show.bs.select",a)},"shown.bs.dropdown":function(a){b.$element.trigger("shown.bs.select",a)}}),b.$element[0].hasAttribute("required")&&this.$element.on("invalid",function(){b.$button.addClass("bs-invalid").focus(),b.$element.on({"focus.bs.select":function(){b.$button.focus(),b.$element.off("focus.bs.select")},"shown.bs.select":function(){b.$element.val(b.$element.val()).off("shown.bs.select")},"rendered.bs.select":function(){this.validity.valid&&b.$button.removeClass("bs-invalid"),b.$element.off("rendered.bs.select")}})}),setTimeout(function(){b.$element.trigger("loaded.bs.select")})},createDropdown:function(){var b=this.multiple||this.options.showTick?" show-tick":"",d=this.$element.parent().hasClass("input-group")?" input-group-btn":"",e=this.autofocus?" autofocus":"",f=this.options.header?'<div class="popover-title"><button type="button" class="close" aria-hidden="true">&times;</button>'+this.options.header+"</div>":"",g=this.options.liveSearch?'<div class="bs-searchbox"><input type="text" class="form-control" autocomplete="off"'+(null===this.options.liveSearchPlaceholder?"":' placeholder="'+c(this.options.liveSearchPlaceholder)+'"')+"></div>":"",h=this.multiple&&this.options.actionsBox?'<div class="bs-actionsbox"><div class="btn-group btn-group-sm btn-block"><button type="button" class="actions-btn bs-select-all btn btn-default">'+this.options.selectAllText+'</button><button type="button" class="actions-btn bs-deselect-all btn btn-default">'+this.options.deselectAllText+"</button></div></div>":"",i=this.multiple&&this.options.doneButton?'<div class="bs-donebutton"><div class="btn-group btn-block"><button type="button" class="btn btn-sm btn-default">'+this.options.doneButtonText+"</button></div></div>":"",j='<div class="btn-group bootstrap-select'+b+d+'"><button type="button" class="'+this.options.styleBase+' dropdown-toggle" data-toggle="dropdown"'+e+'><span class="filter-option pull-left"></span>&nbsp;<span class="bs-caret">'+this.options.template.caret+'</span></button><div class="dropdown-menu open">'+f+g+h+'<ul class="dropdown-menu inner" role="menu"></ul>'+i+"</div></div>";return a(j)},createView:function(){var a=this.createDropdown(),b=this.createLi();return a.find("ul")[0].innerHTML=b,a},reloadLi:function(){this.destroyLi();var a=this.createLi();this.$menuInner[0].innerHTML=a},destroyLi:function(){this.$menu.find("li").remove()},createLi:function(){var d=this,e=[],f=0,g=document.createElement("option"),h=-1,i=function(a,b,c,d){return"<li"+("undefined"!=typeof c&""!==c?' class="'+c+'"':"")+("undefined"!=typeof b&null!==b?' data-original-index="'+b+'"':"")+("undefined"!=typeof d&null!==d?'data-optgroup="'+d+'"':"")+">"+a+"</li>"},j=function(a,e,f,g){return'<a tabindex="0"'+("undefined"!=typeof e?' class="'+e+'"':"")+("undefined"!=typeof f?' style="'+f+'"':"")+(d.options.liveSearchNormalize?' data-normalized-text="'+b(c(a))+'"':"")+("undefined"!=typeof g||null!==g?' data-tokens="'+g+'"':"")+">"+a+'<span class="'+d.options.iconBase+" "+d.options.tickIcon+' check-mark"></span></a>'};if(this.options.title&&!this.multiple&&(h--,!this.$element.find(".bs-title-option").length)){var k=this.$element[0];g.className="bs-title-option",g.appendChild(document.createTextNode(this.options.title)),g.value="",k.insertBefore(g,k.firstChild),void 0===a(k.options[k.selectedIndex]).attr("selected")&&(g.selected=!0)}return this.$element.find("option").each(function(b){var c=a(this);if(h++,!c.hasClass("bs-title-option")){var g=this.className||"",k=this.style.cssText,l=c.data("content")?c.data("content"):c.html(),m=c.data("tokens")?c.data("tokens"):null,n="undefined"!=typeof c.data("subtext")?'<small class="text-muted">'+c.data("subtext")+"</small>":"",o="undefined"!=typeof c.data("icon")?'<span class="'+d.options.iconBase+" "+c.data("icon")+'"></span> ':"",p="OPTGROUP"===this.parentNode.tagName,q=this.disabled||p&&this.parentNode.disabled;if(""!==o&&q&&(o="<span>"+o+"</span>"),d.options.hideDisabled&&q&&!p)return void h--;if(c.data("content")||(l=o+'<span class="text">'+l+n+"</span>"),p&&c.data("divider")!==!0){var r=" "+this.parentNode.className||"";if(0===c.index()){f+=1;var s=this.parentNode.label,t="undefined"!=typeof c.parent().data("subtext")?'<small class="text-muted">'+c.parent().data("subtext")+"</small>":"",u=c.parent().data("icon")?'<span class="'+d.options.iconBase+" "+c.parent().data("icon")+'"></span> ':"";s=u+'<span class="text">'+s+t+"</span>",0!==b&&e.length>0&&(h++,e.push(i("",null,"divider",f+"div"))),h++,e.push(i(s,null,"dropdown-header"+r,f))}if(d.options.hideDisabled&&q)return void h--;e.push(i(j(l,"opt "+g+r,k,m),b,"",f))}else c.data("divider")===!0?e.push(i("",b,"divider")):c.data("hidden")===!0?e.push(i(j(l,g,k,m),b,"hidden is-hidden")):(this.previousElementSibling&&"OPTGROUP"===this.previousElementSibling.tagName&&(h++,e.push(i("",null,"divider",f+"div"))),e.push(i(j(l,g,k,m),b)));d.liObj[b]=h}}),this.multiple||0!==this.$element.find("option:selected").length||this.options.title||this.$element.find("option").eq(0).prop("selected",!0).attr("selected","selected"),e.join("")},findLis:function(){return null==this.$lis&&(this.$lis=this.$menu.find("li")),this.$lis},render:function(b){var c,d=this;b!==!1&&this.$element.find("option").each(function(a){var b=d.findLis().eq(d.liObj[a]);d.setDisabled(a,this.disabled||"OPTGROUP"===this.parentNode.tagName&&this.parentNode.disabled,b),d.setSelected(a,this.selected,b)}),this.tabIndex();var e=this.$element.find("option").map(function(){if(this.selected){if(d.options.hideDisabled&&(this.disabled||"OPTGROUP"===this.parentNode.tagName&&this.parentNode.disabled))return;var b,c=a(this),e=c.data("icon")&&d.options.showIcon?'<i class="'+d.options.iconBase+" "+c.data("icon")+'"></i> ':"";return b=d.options.showSubtext&&c.data("subtext")&&!d.multiple?' <small class="text-muted">'+c.data("subtext")+"</small>":"","undefined"!=typeof c.attr("title")?c.attr("title"):c.data("content")&&d.options.showContent?c.data("content"):e+c.html()+b}}).toArray(),f=this.multiple?e.join(this.options.multipleSeparator):e[0];if(this.multiple&&this.options.selectedTextFormat.indexOf("count")>-1){var g=this.options.selectedTextFormat.split(">");if(g.length>1&&e.length>g[1]||1==g.length&&e.length>=2){c=this.options.hideDisabled?", [disabled]":"";var h=this.$element.find("option").not('[data-divider="true"], [data-hidden="true"]'+c).length,i="function"==typeof this.options.countSelectedText?this.options.countSelectedText(e.length,h):this.options.countSelectedText;f=i.replace("{0}",e.length.toString()).replace("{1}",h.toString())}}void 0==this.options.title&&(this.options.title=this.$element.attr("title")),"static"==this.options.selectedTextFormat&&(f=this.options.title),f||(f="undefined"!=typeof this.options.title?this.options.title:this.options.noneSelectedText),this.$button.attr("title",a.trim(f.replace(/<[^>]*>?/g,""))),this.$button.children(".filter-option").html(f),this.$element.trigger("rendered.bs.select")},setStyle:function(a,b){this.$element.attr("class")&&this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi,""));var c=a?a:this.options.style;"add"==b?this.$button.addClass(c):"remove"==b?this.$button.removeClass(c):(this.$button.removeClass(this.options.style),this.$button.addClass(c))},liHeight:function(b){if(b||this.options.size!==!1&&!this.sizeInfo){var c=document.createElement("div"),d=document.createElement("div"),e=document.createElement("ul"),f=document.createElement("li"),g=document.createElement("li"),h=document.createElement("a"),i=document.createElement("span"),j=this.options.header&&this.$menu.find(".popover-title").length>0?this.$menu.find(".popover-title")[0].cloneNode(!0):null,k=this.options.liveSearch?document.createElement("div"):null,l=this.options.actionsBox&&this.multiple&&this.$menu.find(".bs-actionsbox").length>0?this.$menu.find(".bs-actionsbox")[0].cloneNode(!0):null,m=this.options.doneButton&&this.multiple&&this.$menu.find(".bs-donebutton").length>0?this.$menu.find(".bs-donebutton")[0].cloneNode(!0):null;if(i.className="text",c.className=this.$menu[0].parentNode.className+" open",d.className="dropdown-menu open",e.className="dropdown-menu inner",f.className="divider",i.appendChild(document.createTextNode("Inner text")),h.appendChild(i),g.appendChild(h),e.appendChild(g),e.appendChild(f),j&&d.appendChild(j),k){var n=document.createElement("span");k.className="bs-searchbox",n.className="form-control",k.appendChild(n),d.appendChild(k)}l&&d.appendChild(l),d.appendChild(e),m&&d.appendChild(m),c.appendChild(d),document.body.appendChild(c);var o=h.offsetHeight,p=j?j.offsetHeight:0,q=k?k.offsetHeight:0,r=l?l.offsetHeight:0,s=m?m.offsetHeight:0,t=a(f).outerHeight(!0),u="function"==typeof getComputedStyle?getComputedStyle(d):!1,v=u?null:a(d),w=parseInt(u?u.paddingTop:v.css("paddingTop"))+parseInt(u?u.paddingBottom:v.css("paddingBottom"))+parseInt(u?u.borderTopWidth:v.css("borderTopWidth"))+parseInt(u?u.borderBottomWidth:v.css("borderBottomWidth")),x=w+parseInt(u?u.marginTop:v.css("marginTop"))+parseInt(u?u.marginBottom:v.css("marginBottom"))+2;document.body.removeChild(c),this.sizeInfo={liHeight:o,headerHeight:p,searchHeight:q,actionsHeight:r,doneButtonHeight:s,dividerHeight:t,menuPadding:w,menuExtras:x}}},setSize:function(){if(this.findLis(),this.liHeight(),this.options.header&&this.$menu.css("padding-top",0),this.options.size!==!1){var b,c,d,e,f=this,g=this.$menu,h=this.$menuInner,i=a(window),j=this.$newElement[0].offsetHeight,k=this.sizeInfo.liHeight,l=this.sizeInfo.headerHeight,m=this.sizeInfo.searchHeight,n=this.sizeInfo.actionsHeight,o=this.sizeInfo.doneButtonHeight,p=this.sizeInfo.dividerHeight,q=this.sizeInfo.menuPadding,r=this.sizeInfo.menuExtras,s=this.options.hideDisabled?".disabled":"",t=function(){d=f.$newElement.offset().top-i.scrollTop(),e=i.height()-d-j};if(t(),"auto"===this.options.size){var u=function(){var i,j=function(b,c){return function(d){return c?d.classList?d.classList.contains(b):a(d).hasClass(b):!(d.classList?d.classList.contains(b):a(d).hasClass(b))}},p=f.$menuInner[0].getElementsByTagName("li"),s=Array.prototype.filter?Array.prototype.filter.call(p,j("hidden",!1)):f.$lis.not(".hidden"),u=Array.prototype.filter?Array.prototype.filter.call(s,j("dropdown-header",!0)):s.filter(".dropdown-header");t(),b=e-r,f.options.container?(g.data("height")||g.data("height",g.height()),c=g.data("height")):c=g.height(),f.options.dropupAuto&&f.$newElement.toggleClass("dropup",d>e&&c>b-r),f.$newElement.hasClass("dropup")&&(b=d-r),i=s.length+u.length>3?3*k+r-2:0,g.css({"max-height":b+"px",overflow:"hidden","min-height":i+l+m+n+o+"px"}),h.css({"max-height":b-l-m-n-o-q+"px","overflow-y":"auto","min-height":Math.max(i-q,0)+"px"})};u(),this.$searchbox.off("input.getSize propertychange.getSize").on("input.getSize propertychange.getSize",u),i.off("resize.getSize scroll.getSize").on("resize.getSize scroll.getSize",u)}else if(this.options.size&&"auto"!=this.options.size&&this.$lis.not(s).length>this.options.size){var v=this.$lis.not(".divider").not(s).children().slice(0,this.options.size).last().parent().index(),w=this.$lis.slice(0,v+1).filter(".divider").length;b=k*this.options.size+w*p+q,f.options.container?(g.data("height")||g.data("height",g.height()),c=g.data("height")):c=g.height(),f.options.dropupAuto&&this.$newElement.toggleClass("dropup",d>e&&c>b-r),g.css({"max-height":b+l+m+n+o+"px",overflow:"hidden","min-height":""}),h.css({"max-height":b-q+"px","overflow-y":"auto","min-height":""})}}},setWidth:function(){if("auto"===this.options.width){this.$menu.css("min-width","0");var a=this.$menu.parent().clone().appendTo("body"),b=this.options.container?this.$newElement.clone().appendTo("body"):a,c=a.children(".dropdown-menu").outerWidth(),d=b.css("width","auto").children("button").outerWidth();a.remove(),b.remove(),this.$newElement.css("width",Math.max(c,d)+"px")}else"fit"===this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width","").addClass("fit-width")):this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width",this.options.width)):(this.$menu.css("min-width",""),this.$newElement.css("width",""));this.$newElement.hasClass("fit-width")&&"fit"!==this.options.width&&this.$newElement.removeClass("fit-width")},selectPosition:function(){this.$bsContainer=a('<div class="bs-container" />');var b,c,d=this,e=function(a){d.$bsContainer.addClass(a.attr("class").replace(/form-control|fit-width/gi,"")).toggleClass("dropup",a.hasClass("dropup")),b=a.offset(),c=a.hasClass("dropup")?0:a[0].offsetHeight,d.$bsContainer.css({top:b.top+c,left:b.left,width:a[0].offsetWidth})};this.$button.on("click",function(){var b=a(this);d.isDisabled()||(e(d.$newElement),d.$bsContainer.appendTo(d.options.container).toggleClass("open",!b.hasClass("open")).append(d.$menu))}),a(window).on("resize scroll",function(){e(d.$newElement)}),this.$element.on("hide.bs.select",function(){d.$menu.data("height",d.$menu.height()),d.$bsContainer.detach()})},setSelected:function(a,b,c){c||(c=this.findLis().eq(this.liObj[a])),c.toggleClass("selected",b)},setDisabled:function(a,b,c){c||(c=this.findLis().eq(this.liObj[a])),b?c.addClass("disabled").children("a").attr("href","#").attr("tabindex",-1):c.removeClass("disabled").children("a").removeAttr("href").attr("tabindex",0)},isDisabled:function(){return this.$element[0].disabled},checkDisabled:function(){var a=this;this.isDisabled()?(this.$newElement.addClass("disabled"),this.$button.addClass("disabled").attr("tabindex",-1)):(this.$button.hasClass("disabled")&&(this.$newElement.removeClass("disabled"),this.$button.removeClass("disabled")),-1!=this.$button.attr("tabindex")||this.$element.data("tabindex")||this.$button.removeAttr("tabindex")),this.$button.click(function(){return!a.isDisabled()})},tabIndex:function(){this.$element.data("tabindex")!==this.$element.attr("tabindex")&&-98!==this.$element.attr("tabindex")&&"-98"!==this.$element.attr("tabindex")&&(this.$element.data("tabindex",this.$element.attr("tabindex")),this.$button.attr("tabindex",this.$element.data("tabindex"))),this.$element.attr("tabindex",-98)},clickListener:function(){var b=this,c=a(document);this.$newElement.on("touchstart.dropdown",".dropdown-menu",function(a){a.stopPropagation()}),c.data("spaceSelect",!1),this.$button.on("keyup",function(a){/(32)/.test(a.keyCode.toString(10))&&c.data("spaceSelect")&&(a.preventDefault(),c.data("spaceSelect",!1))}),this.$button.on("click",function(){b.setSize()}),this.$element.on("shown.bs.select",function(){if(b.options.liveSearch||b.multiple){if(!b.multiple){var a=b.liObj[b.$element[0].selectedIndex];if("number"!=typeof a||b.options.size===!1)return;var c=b.$lis.eq(a)[0].offsetTop-b.$menuInner[0].offsetTop;c=c-b.$menuInner[0].offsetHeight/2+b.sizeInfo.liHeight/2,b.$menuInner[0].scrollTop=c}}else b.$menuInner.find(".selected a").focus()}),this.$menuInner.on("click","li a",function(c){var d=a(this),e=d.parent().data("originalIndex"),f=b.$element.val(),g=b.$element.prop("selectedIndex");if(b.multiple&&c.stopPropagation(),c.preventDefault(),!b.isDisabled()&&!d.parent().hasClass("disabled")){var h=b.$element.find("option"),i=h.eq(e),j=i.prop("selected"),k=i.parent("optgroup"),l=b.options.maxOptions,m=k.data("maxOptions")||!1;if(b.multiple){if(i.prop("selected",!j),b.setSelected(e,!j),d.blur(),l!==!1||m!==!1){var n=l<h.filter(":selected").length,o=m<k.find("option:selected").length;if(l&&n||m&&o)if(l&&1==l)h.prop("selected",!1),i.prop("selected",!0),b.$menuInner.find(".selected").removeClass("selected"),b.setSelected(e,!0);else if(m&&1==m){k.find("option:selected").prop("selected",!1),i.prop("selected",!0);var p=d.parent().data("optgroup");b.$menuInner.find('[data-optgroup="'+p+'"]').removeClass("selected"),b.setSelected(e,!0)}else{var q="function"==typeof b.options.maxOptionsText?b.options.maxOptionsText(l,m):b.options.maxOptionsText,r=q[0].replace("{n}",l),s=q[1].replace("{n}",m),t=a('<div class="notify"></div>');q[2]&&(r=r.replace("{var}",q[2][l>1?0:1]),s=s.replace("{var}",q[2][m>1?0:1])),i.prop("selected",!1),b.$menu.append(t),l&&n&&(t.append(a("<div>"+r+"</div>")),b.$element.trigger("maxReached.bs.select")),m&&o&&(t.append(a("<div>"+s+"</div>")),b.$element.trigger("maxReachedGrp.bs.select")),setTimeout(function(){b.setSelected(e,!1)},10),t.delay(750).fadeOut(300,function(){a(this).remove()})}}}else h.prop("selected",!1),i.prop("selected",!0),b.$menuInner.find(".selected").removeClass("selected"),b.setSelected(e,!0);b.multiple?b.options.liveSearch&&b.$searchbox.focus():b.$button.focus(),(f!=b.$element.val()&&b.multiple||g!=b.$element.prop("selectedIndex")&&!b.multiple)&&b.$element.trigger("changed.bs.select",[e,i.prop("selected"),j]).triggerNative("change")}}),this.$menu.on("click","li.disabled a, .popover-title, .popover-title :not(.close)",function(c){c.currentTarget==this&&(c.preventDefault(),c.stopPropagation(),b.options.liveSearch&&!a(c.target).hasClass("close")?b.$searchbox.focus():b.$button.focus())}),this.$menuInner.on("click",".divider, .dropdown-header",function(a){a.preventDefault(),a.stopPropagation(),b.options.liveSearch?b.$searchbox.focus():b.$button.focus()}),this.$menu.on("click",".popover-title .close",function(){b.$button.click()}),this.$searchbox.on("click",function(a){a.stopPropagation()}),this.$menu.on("click",".actions-btn",function(c){b.options.liveSearch?b.$searchbox.focus():b.$button.focus(),c.preventDefault(),c.stopPropagation(),a(this).hasClass("bs-select-all")?b.selectAll():b.deselectAll()}),this.$element.change(function(){b.render(!1)})},liveSearchListener:function(){var d=this,e=a('<li class="no-results"></li>');this.$button.on("click.dropdown.data-api touchstart.dropdown.data-api",function(){d.$menuInner.find(".active").removeClass("active"),d.$searchbox.val()&&(d.$searchbox.val(""),d.$lis.not(".is-hidden").removeClass("hidden"),e.parent().length&&e.remove()),d.multiple||d.$menuInner.find(".selected").addClass("active"),setTimeout(function(){d.$searchbox.focus()},10)}),this.$searchbox.on("click.dropdown.data-api focus.dropdown.data-api touchend.dropdown.data-api",function(a){a.stopPropagation()}),this.$searchbox.on("input propertychange",function(){if(d.$searchbox.val()){var f=d.$lis.not(".is-hidden").removeClass("hidden").children("a");f=d.options.liveSearchNormalize?f.not(":a"+d._searchStyle()+'("'+b(d.$searchbox.val())+'")'):f.not(":"+d._searchStyle()+'("'+d.$searchbox.val()+'")'),f.parent().addClass("hidden"),d.$lis.filter(".dropdown-header").each(function(){var b=a(this),c=b.data("optgroup");0===d.$lis.filter("[data-optgroup="+c+"]").not(b).not(".hidden").length&&(b.addClass("hidden"),d.$lis.filter("[data-optgroup="+c+"div]").addClass("hidden"))});var g=d.$lis.not(".hidden");g.each(function(b){var c=a(this);c.hasClass("divider")&&(c.index()===g.first().index()||c.index()===g.last().index()||g.eq(b+1).hasClass("divider"))&&c.addClass("hidden")}),d.$lis.not(".hidden, .no-results").length?e.parent().length&&e.remove():(e.parent().length&&e.remove(),e.html(d.options.noneResultsText.replace("{0}",'"'+c(d.$searchbox.val())+'"')).show(),d.$menuInner.append(e))}else d.$lis.not(".is-hidden").removeClass("hidden"),e.parent().length&&e.remove();d.$lis.filter(".active").removeClass("active"),d.$searchbox.val()&&d.$lis.not(".hidden, .divider, .dropdown-header").eq(0).addClass("active").children("a").focus(),a(this).focus()})},_searchStyle:function(){var a={begins:"ibegins",startsWith:"ibegins"};return a[this.options.liveSearchStyle]||"icontains"},val:function(a){return"undefined"!=typeof a?(this.$element.val(a),this.render(),this.$element):this.$element.val()},changeAll:function(b){"undefined"==typeof b&&(b=!0),this.findLis();for(var c=this.$element.find("option"),d=this.$lis.not(".divider, .dropdown-header, .disabled, .hidden").toggleClass("selected",b),e=d.length,f=[],g=0;e>g;g++){var h=d[g].getAttribute("data-original-index");f[f.length]=c.eq(h)[0]}a(f).prop("selected",b),this.render(!1),this.$element.trigger("changed.bs.select").triggerNative("change")},selectAll:function(){return this.changeAll(!0)},deselectAll:function(){return this.changeAll(!1)},toggle:function(a){a=a||window.event,a&&a.stopPropagation(),this.$button.trigger("click")},keydown:function(c){var d,e,f,g,h,i,j,k,l,m=a(this),n=m.is("input")?m.parent().parent():m.parent(),o=n.data("this"),p=":not(.disabled, .hidden, .dropdown-header, .divider)",q={32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"};if(o.options.liveSearch&&(n=m.parent().parent()),o.options.container&&(n=o.$menu),d=a("[role=menu] li",n),l=o.$newElement.hasClass("open"),!l&&(c.keyCode>=48&&c.keyCode<=57||c.keyCode>=96&&c.keyCode<=105||c.keyCode>=65&&c.keyCode<=90)&&(o.options.container?o.$button.trigger("click"):(o.setSize(),o.$menu.parent().addClass("open"),l=!0),o.$searchbox.focus()),o.options.liveSearch&&(/(^9$|27)/.test(c.keyCode.toString(10))&&l&&0===o.$menu.find(".active").length&&(c.preventDefault(),o.$menu.parent().removeClass("open"),o.options.container&&o.$newElement.removeClass("open"),o.$button.focus()),d=a("[role=menu] li"+p,n),m.val()||/(38|40)/.test(c.keyCode.toString(10))||0===d.filter(".active").length&&(d=o.$menuInner.find("li"),d=o.options.liveSearchNormalize?d.filter(":a"+o._searchStyle()+"("+b(q[c.keyCode])+")"):d.filter(":"+o._searchStyle()+"("+q[c.keyCode]+")"))),d.length){if(/(38|40)/.test(c.keyCode.toString(10)))e=d.index(d.find("a").filter(":focus").parent()),g=d.filter(p).first().index(),h=d.filter(p).last().index(),f=d.eq(e).nextAll(p).eq(0).index(),i=d.eq(e).prevAll(p).eq(0).index(),j=d.eq(f).prevAll(p).eq(0).index(),o.options.liveSearch&&(d.each(function(b){a(this).hasClass("disabled")||a(this).data("index",b)}),e=d.index(d.filter(".active")),g=d.first().data("index"),h=d.last().data("index"),f=d.eq(e).nextAll().eq(0).data("index"),i=d.eq(e).prevAll().eq(0).data("index"),j=d.eq(f).prevAll().eq(0).data("index")),k=m.data("prevIndex"),38==c.keyCode?(o.options.liveSearch&&e--,e!=j&&e>i&&(e=i),g>e&&(e=g),e==k&&(e=h)):40==c.keyCode&&(o.options.liveSearch&&e++,-1==e&&(e=0),e!=j&&f>e&&(e=f),e>h&&(e=h),e==k&&(e=g)),m.data("prevIndex",e),o.options.liveSearch?(c.preventDefault(),m.hasClass("dropdown-toggle")||(d.removeClass("active").eq(e).addClass("active").children("a").focus(),m.focus())):d.eq(e).children("a").focus();else if(!m.is("input")){var r,s,t=[];d.each(function(){a(this).hasClass("disabled")||a.trim(a(this).children("a").text().toLowerCase()).substring(0,1)==q[c.keyCode]&&t.push(a(this).index())}),r=a(document).data("keycount"),r++,a(document).data("keycount",r),s=a.trim(a(":focus").text().toLowerCase()).substring(0,1),s!=q[c.keyCode]?(r=1,a(document).data("keycount",r)):r>=t.length&&(a(document).data("keycount",0),r>t.length&&(r=1)),d.eq(t[r-1]).children("a").focus()}if((/(13|32)/.test(c.keyCode.toString(10))||/(^9$)/.test(c.keyCode.toString(10))&&o.options.selectOnTab)&&l){if(/(32)/.test(c.keyCode.toString(10))||c.preventDefault(),o.options.liveSearch)/(32)/.test(c.keyCode.toString(10))||(o.$menuInner.find(".active a").click(),m.focus());else{var u=a(":focus");u.click(),u.focus(),c.preventDefault(),a(document).data("spaceSelect",!0)}a(document).data("keycount",0)}(/(^9$|27)/.test(c.keyCode.toString(10))&&l&&(o.multiple||o.options.liveSearch)||/(27)/.test(c.keyCode.toString(10))&&!l)&&(o.$menu.parent().removeClass("open"),o.options.container&&o.$newElement.removeClass("open"),o.$button.focus())}},mobile:function(){this.$element.addClass("mobile-device")},refresh:function(){this.$lis=null,this.liObj={},this.reloadLi(),this.render(),this.checkDisabled(),this.liHeight(!0),this.setStyle(),this.setWidth(),this.$lis&&this.$searchbox.trigger("propertychange"),this.$element.trigger("refreshed.bs.select")},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},remove:function(){this.$newElement.remove(),this.$element.remove()},destroy:function(){this.$newElement.before(this.$element).remove(),this.$bsContainer?this.$bsContainer.remove():this.$menu.remove(),this.$element.off(".bs.select").removeData("selectpicker").removeClass("bs-select-hidden selectpicker")}};var f=a.fn.selectpicker;a.fn.selectpicker=d,a.fn.selectpicker.Constructor=e,a.fn.selectpicker.noConflict=function(){return a.fn.selectpicker=f,this},a(document).data("keycount",0).on("keydown.bs.select",'.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="menu"], .bs-searchbox input',e.prototype.keydown).on("focusin.modal",'.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="menu"], .bs-searchbox input',function(a){a.stopPropagation()}),a(window).on("load.bs.select.data-api",function(){a(".selectpicker").each(function(){var b=a(this);d.call(b,b.data())})})}(a)});
8
+ //# sourceMappingURL=bootstrap-select.js.map
assets/js/select2.min.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.slice(0,n.length-1).concat(a),k=0;k<a.length;k+=1)if(m=a[k],"."===m)a.splice(k,1),k-=1;else if(".."===m){if(1===k&&(".."===a[2]||".."===a[0]))break;k>0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=v.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),n.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(a){if(e(r,a)){var c=r[a];delete r[a],t[a]=!0,m.apply(b,c)}if(!e(q,a)&&!e(t,a))throw new Error("No "+a);return q[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(a,c,d,f){var h,k,l,m,n,s,u=[],v=typeof d;if(f=f||a,"undefined"===v||"function"===v){for(c=!c.length&&d.length?["require","exports","module"]:c,n=0;n<c.length;n+=1)if(m=o(c[n],f),k=m.f,"require"===k)u[n]=p.require(a);else if("exports"===k)u[n]=p.exports(a),s=!0;else if("module"===k)h=u[n]=p.module(a);else if(e(q,k)||e(r,k)||e(t,k))u[n]=j(k);else{if(!m.p)throw new Error(a+" missing "+k);m.p.load(m.n,g(f,!0),i(k),{}),u[n]=q[k]}l=d?d.apply(q[a],u):void 0,a&&(h&&h.exports!==b&&h.exports!==q[a]?q[a]=h.exports:l===b&&s||(q[a]=l))}else a&&(q[a]=d)},a=c=n=function(a,c,d,e,f){if("string"==typeof a)return p[a]?p[a](c):j(o(a,c).f);if(!a.splice){if(s=a,s.deps&&n(s.deps,s.callback),!c)return;c.splice?(a=c,c=d,d=null):a=b}return c=c||function(){},"function"==typeof d&&(d=e,e=f),e?m(b,a,c,d):setTimeout(function(){m(b,a,c,d)},4),n},n.config=function(a){return n(a)},a._defined=q,d=function(a,b,c){if("string"!=typeof a)throw new Error("See almond README: incorrect module build, no module name");b.splice||(c=b,b=[]),e(q,a)||e(r,a)||(r[a]=[a,b,c])},d.amd={jQuery:!0}}(),b.requirejs=a,b.require=c,b.define=d}}(),b.define("almond",function(){}),b.define("jquery",[],function(){var b=a||$;return null==b&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),b}),b.define("select2/utils",["jquery"],function(a){function b(a){var b=a.prototype,c=[];for(var d in b){var e=b[d];"function"==typeof e&&"constructor"!==d&&c.push(d)}return c}var c={};c.Extend=function(a,b){function c(){this.constructor=a}var d={}.hasOwnProperty;for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},c.Decorate=function(a,c){function d(){var b=Array.prototype.unshift,d=c.prototype.constructor.length,e=a.prototype.constructor;d>0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;h<g.length;h++){var i=g[h];d.prototype[i]=a.prototype[i]}for(var j=(function(a){var b=function(){};a in d.prototype&&(b=d.prototype[a]);var e=c.prototype[a];return function(){var a=Array.prototype.unshift;return a.call(arguments,b),e.apply(this,arguments)}}),k=0;k<f.length;k++){var l=f[k];d.prototype[l]=j(l)}return d};var d=function(){this.listeners={}};return d.prototype.on=function(a,b){this.listeners=this.listeners||{},a in this.listeners?this.listeners[a].push(b):this.listeners[a]=[b]},d.prototype.trigger=function(a){var b=Array.prototype.slice,c=b.call(arguments,1);this.listeners=this.listeners||{},null==c&&(c=[]),0===c.length&&c.push({}),c[0]._type=a,a in this.listeners&&this.invoke(this.listeners[a],b.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},d.prototype.invoke=function(a,b){for(var c=0,d=a.length;d>c;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;a>c;c++){var d=Math.floor(36*Math.random());b+=d.toString(36)}return b},c.bind=function(a,b){return function(){a.apply(b,arguments)}},c._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e<c.length;e++){var f=c[e];f=f.substring(0,1).toLowerCase()+f.substring(1),f in d||(d[f]={}),e==c.length-1&&(d[f]=a[b]),d=d[f]}delete a[b]}}return a},c.hasScroll=function(b,c){var d=a(c),e=c.style.overflowX,f=c.style.overflowY;return e!==f||"hidden"!==f&&"visible"!==f?"scroll"===e||"scroll"===f?!0:d.innerHeight()<c.scrollHeight||d.innerWidth()<c.scrollWidth:!1},c.escapeMarkup=function(a){var b={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c<a.results.length;c++){var d=a.results[c],e=this.option(d);b.push(e)}this.$results.append(b)},c.prototype.position=function(a,b){var c=b.find(".select2-results");c.append(a)},c.prototype.sort=function(a){var b=this.options.get("sorter");return b(a)},c.prototype.highlightFirstItem=function(){var a=this.$results.find(".select2-results__option[aria-selected]"),b=a.filter("[aria-selected=true]");b.length>0?b.first().trigger("mouseenter"):a.first().trigger("mouseenter"),this.ensureHighlightVisible()},c.prototype.setClasses=function(){var b=this;this.data.current(function(c){var d=a.map(c,function(a){return a.id.toString()}),e=b.$results.find(".select2-results__option[aria-selected]");e.each(function(){var b=a(this),c=a.data(this,"data"),e=""+c.id;null!=c.element&&c.element.selected||null==c.element&&a.inArray(e,d)>-1?b.attr("aria-selected","true"):b.attr("aria-selected","false")})})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(b){var c=document.createElement("li");c.className="select2-results__option";var d={role:"treeitem","aria-selected":"false"};b.disabled&&(delete d["aria-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["aria-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d.role="group",d["aria-label"]=b.text,delete d["aria-selected"]);for(var e in d){var f=d[e];c.setAttribute(e,f)}if(b.children){var g=a(c),h=document.createElement("strong");h.className="select2-results__group";a(h);this.template(b,h);for(var i=[],j=0;j<b.children.length;j++){var k=b.children[j],l=this.option(k);i.push(l)}var m=a("<ul></ul>",{"class":"select2-results__options select2-results__options--nested"});m.append(i),g.append(h),g.append(m)}else this.template(b,c);return a.data(c,"data",b),c},c.prototype.bind=function(b,c){var d=this,e=b.id+"-results";this.$results.attr("id",e),b.on("results:all",function(a){d.clear(),d.append(a.data),b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("results:append",function(a){d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("query",function(a){d.hideMessages(),d.showLoading(a)}),b.on("select",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("unselect",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("open",function(){d.$results.attr("aria-expanded","true"),d.$results.attr("aria-hidden","false"),d.setClasses(),d.ensureHighlightVisible()}),b.on("close",function(){d.$results.attr("aria-expanded","false"),d.$results.attr("aria-hidden","true"),d.$results.removeAttr("aria-activedescendant")}),b.on("results:toggle",function(){var a=d.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),b.on("results:select",function(){var a=d.getHighlightedResults();if(0!==a.length){var b=a.data("data");"true"==a.attr("aria-selected")?d.trigger("close",{}):d.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a);if(0!==c){var e=c-1;0===a.length&&(e=0);var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top,h=f.offset().top,i=d.$results.scrollTop()+(h-g);0===e?d.$results.scrollTop(0):0>h-g&&d.$results.scrollTop(i)}}),b.on("results:next",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a),e=c+1;if(!(e>=b.length)){var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top+d.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=d.$results.scrollTop()+h-g;0===e?d.$results.scrollTop(0):h>g&&d.$results.scrollTop(i)}}),b.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),b.on("results:message",function(a){d.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=d.$results.scrollTop(),c=d.$results.get(0).scrollHeight-b+a.deltaY,e=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=d.$results.height();e?(d.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(d.$results.scrollTop(d.$results.get(0).scrollHeight-d.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(b){var c=a(this),e=c.data("data");return"true"===c.attr("aria-selected")?void(d.options.get("multiple")?d.trigger("unselect",{originalEvent:b,data:e}):d.trigger("close",{})):void d.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(b){var c=a(this).data("data");d.getHighlightedResults().removeClass("select2-results__option--highlighted"),d.trigger("results:focus",{data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){var a=this.$results.find(".select2-results__option--highlighted");return a},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),2>=c?this.$results.scrollTop(0):(g>this.$results.outerHeight()||0>g)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){var a={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return a}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var b=a('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),b.attr("title",this.$element.attr("title")),b.attr("tabindex",this._tabindex),this.$selection=b,b},d.prototype.bind=function(a,b){var d=this,e=(a.id+"-container",a.id+"-results");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.focus(),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(b){a(document.body).on("mousedown.select2."+b.id,function(b){var c=a(b.target),d=c.closest(".select2"),e=a(".select2.select2-container--open");e.each(function(){var b=a(this);if(this!=d[0]){var c=b.data("element");c.select2("close")}})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){var c=b.find(".selection");c.append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("focus",function(b){a.isOpen()||c.$selection.focus()}),a.on("selection:update",function(a){c.update(a.data)})},e.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},e.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},e.prototype.selectionContainer=function(){return a("<span></span>")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.prop("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('<ul class="select2-selection__rendered"></ul>'),a},d.prototype.bind=function(b,c){var e=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){e.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!e.options.get("disabled")){var c=a(this),d=c.parent(),f=d.data("data");e.trigger("unselect",{originalEvent:b,data:f})}})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},d.prototype.selectionContainer=function(){var b=a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>');return b},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d<a.length;d++){var e=a[d],f=this.selectionContainer(),g=this.display(e,f);f.append(g),f.prop("title",e.title||e.text),f.data("data",e),b.push(f)}var h=this.$selection.find(".select2-selection__rendered");c.appendMany(h,b)}},d}),b.define("select2/selection/placeholder",["../utils"],function(a){function b(a,b,c){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c)}return b.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},b.prototype.createPlaceholder=function(a,b){var c=this.selectionContainer();return c.html(this.display(b)),c.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),c},b.prototype.update=function(a,b){var c=1==b.length&&b[0].id!=this.placeholder.id,d=b.length>1;if(d||c)return a.call(this,b);this.clear();var e=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(e)},b}),b.define("select2/selection/allowClear",["jquery","../keys"],function(a,b){function c(){}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},c.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var c=this.$selection.find(".select2-selection__clear");if(0!==c.length){b.stopPropagation();for(var d=c.data("data"),e=0;e<d.length;e++){var f={data:d[e]};if(this.trigger("unselect",f),f.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},c.prototype._handleKeyboardClear=function(a,c,d){d.isOpen()||(c.which==b.DELETE||c.which==b.BACKSPACE)&&this._handleClear(c)},c.prototype.update=function(b,c){if(b.call(this,c),!(this.$selection.find(".select2-selection__placeholder").length>0||0===c.length)){var d=a('<span class="select2-selection__clear">&times;</span>');d.data("data",c),this.$selection.find(".select2-selection__rendered").prepend(d)}},c}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,b,d){var e=this;a.call(this,b,d),b.on("open",function(){e.$search.trigger("focus")}),b.on("close",function(){e.$search.val(""),e.$search.removeAttr("aria-activedescendant"),e.$search.trigger("focus")}),b.on("enable",function(){e.$search.prop("disabled",!1),e._transferTabIndex()}),b.on("disable",function(){e.$search.prop("disabled",!0)}),b.on("focus",function(a){e.$search.trigger("focus")}),b.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.id)}),this.$selection.on("focusin",".select2-search--inline",function(a){e.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){e._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented();var b=a.which;if(b===c.BACKSPACE&&""===e.$search.val()){var d=e.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var f=d.data("data");e.searchRemoveChoice(f),a.preventDefault()}}});var f=document.documentMode,g=f&&11>=f;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){return g?void e.$selection.off("input.search input.searchcheck"):void e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(g&&"input"===a.type)return void e.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&e.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.focus()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{var b=this.$search.val().length+1;a=.75*b+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting"],g=["opening","closing","selecting","unselecting"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){var a={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return a}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),d+=null!=c.id?"-"+c.id.toString():"-"+a.generateChars(4)},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");
2
+ if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f<a.length;f++){var g=a[f].id;-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")});else{var d=a.id;this.$element.val(d),this.$element.trigger("change")}},d.prototype.unselect=function(a){var b=this;if(this.$element.prop("multiple"))return a.selected=!1,c(a.element).is("option")?(a.element.selected=!1,void this.$element.trigger("change")):void this.current(function(d){for(var e=[],f=0;f<d.length;f++){var g=d[f].id;g!==a.id&&-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")})},d.prototype.bind=function(a,b){var c=this;this.container=a,a.on("select",function(a){c.select(a.data)}),a.on("unselect",function(a){c.unselect(a.data)})},d.prototype.destroy=function(){this.$element.find("*").each(function(){c.removeData(this,"data")})},d.prototype.query=function(a,b){var d=[],e=this,f=this.$element.children();f.each(function(){var b=c(this);if(b.is("option")||b.is("optgroup")){var f=e.item(b),g=e.matches(a,f);null!==g&&d.push(g)}}),b({results:d})},d.prototype.addOptions=function(a){b.appendMany(this.$element,a)},d.prototype.option=function(a){var b;a.children?(b=document.createElement("optgroup"),b.label=a.text):(b=document.createElement("option"),void 0!==b.textContent?b.textContent=a.text:b.innerText=a.text),a.id&&(b.value=a.id),a.disabled&&(b.disabled=!0),a.selected&&(b.selected=!0),a.title&&(b.title=a.title);var d=c(b),e=this._normalizeItem(a);return e.element=b,c.data(b,"data",e),d},d.prototype.item=function(a){var b={};if(b=c.data(a[0],"data"),null!=b)return b;if(a.is("option"))b={id:a.val(),text:a.text(),disabled:a.prop("disabled"),selected:a.prop("selected"),title:a.prop("title")};else if(a.is("optgroup")){b={text:a.prop("label"),children:[],title:a.prop("title")};for(var d=a.children("option"),e=[],f=0;f<d.length;f++){var g=c(d[f]),h=this.item(g);e.push(h)}b.children=e}return b=this._normalizeItem(b),b.element=a[0],c.data(a[0],"data",b),b},d.prototype._normalizeItem=function(a){c.isPlainObject(a)||(a={id:a,text:a}),a=c.extend({},{text:""},a);var b={selected:!1,disabled:!1};return null!=a.id&&(a.id=a.id.toString()),null!=a.text&&(a.text=a.text.toString()),null==a._resultId&&a.id&&null!=this.container&&(a._resultId=this.generateResultId(this.container,a)),c.extend({},b,a)},d.prototype.matches=function(a,b){var c=this.options.get("matcher");return c(a,b)},d}),b.define("select2/data/array",["./select","../utils","jquery"],function(a,b,c){function d(a,b){var c=b.get("data")||[];d.__super__.constructor.call(this,a,b),this.addOptions(this.convertToOptions(c))}return b.Extend(d,a),d.prototype.select=function(a){var b=this.$element.find("option").filter(function(b,c){return c.value==a.id.toString()});0===b.length&&(b=this.option(a),this.addOptions(b)),d.__super__.select.call(this,a)},d.prototype.convertToOptions=function(a){function d(a){return function(){return c(this).val()==a.id}}for(var e=this,f=this.$element.find("option"),g=f.map(function(){return e.item(c(this)).id}).get(),h=[],i=0;i<a.length;i++){var j=this._normalizeItem(a[i]);if(c.inArray(j.id,g)>=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},j,l),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){d.status&&"0"===d.status||e.trigger("results:message",{message:"errorLoading"})});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&null!=a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");void 0!==f&&(this.createTag=f);var g=d.get("insertTag");if(void 0!==g&&(this.insertTag=g),b.call(this,c,d),a.isArray(e))for(var h=0;h<e.length;h++){var i=e[h],j=this._normalizeItem(i),k=this.option(j);this.$element.append(k)}}return b.prototype.query=function(a,b,c){function d(a,f){for(var g=a.results,h=0;h<g.length;h++){var i=g[h],j=null!=i.children&&!d({results:i.children},!0),k=i.text===b.term;if(k||j)return f?!1:(a.data=g,void c(a))}if(f)return!0;var l=e.createTag(b);if(null!=l){var m=e.option(l);m.attr("data-select2-tag",!0),e.addOptions([m]),e.insertTag(g,l)}a.results=g,c(a)}var e=this;return this._removeOldTags(),null==b.term||null!=b.page?void a.call(this,b,c):void a.call(this,b,d)},b.prototype.createTag=function(b,c){var d=a.trim(c.term);return""===d?null:{id:d,text:d}},b.prototype.insertTag=function(a,b,c){b.unshift(c)},b.prototype._removeOldTags=function(b){var c=(this._lastTag,this.$element.find("option[data-select2-tag]"));c.each(function(){this.selected||a(this).remove()})},b}),b.define("select2/data/tokenizer",["jquery"],function(a){function b(a,b,c){var d=c.get("tokenizer");void 0!==d&&(this.tokenizer=d),a.call(this,b,c)}return b.prototype.bind=function(a,b,c){a.call(this,b,c),this.$search=b.dropdown.$search||b.selection.$search||c.find(".select2-search__field")},b.prototype.query=function(b,c,d){function e(b){var c=g._normalizeItem(b),d=g.$element.find("option").filter(function(){return a(this).val()===c.id});if(!d.length){var e=g.option(c);e.attr("data-select2-tag",!0),g._removeOldTags(),g.addOptions([e])}f(c)}function f(a){g.trigger("select",{data:a})}var g=this;c.term=c.term||"";var h=this.tokenizer(c,this.options,e);h.term!==c.term&&(this.$search.length&&(this.$search.val(h.term),this.$search.focus()),c.term=h.term),b.call(this,c,d)},b.prototype.tokenizer=function(b,c,d,e){for(var f=d.get("tokenSeparators")||[],g=c.term,h=0,i=this.createTag||function(a){return{id:a.term,text:a.term}};h<g.length;){var j=g[h];if(-1!==a.inArray(j,f)){var k=g.substr(0,h),l=a.extend({},c,{term:k}),m=i(l);null!=m?(e(m),g=g.substr(h+1)||"",h=0):h++}else h++}return{term:g}},b}),b.define("select2/data/minimumInputLength",[],function(){function a(a,b,c){this.minimumInputLength=c.get("minimumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",b.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumInputLength",[],function(){function a(a,b,c){this.maximumInputLength=c.get("maximumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",this.maximumInputLength>0&&b.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;return d.maximumSelectionLength>0&&f>=d.maximumSelectionLength?void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}}):void a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<span class="select2-dropdown"><span class="select2-results"></span></span>');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val("")}),c.on("focus",function(){c.isOpen()&&e.$search.focus()}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){var b=e.showSearch(a);b?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){var c=e.$results.offset().top+e.$results.outerHeight(!1),d=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1);c+50>=d&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a("<span></span>"),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){a(this).data("select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(b){var c=a(this).data("select2-scroll-position");a(this).scrollTop(c.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id,h=this.$container.parents().filter(b.hasScroll);h.off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.top<f.top-h.height,k=i.bottom>f.bottom+h.height,l={left:f.left,top:g.bottom},m=this.$dropdownParent;"static"===m.css("position")&&(m=m.offsetParent());var n=m.offset();l.top-=n.top,l.left-=n.left,c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-n.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.position="relative",a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d<b.length;d++){var e=b[d];e.children?c+=a(e.children):c++}return c}function b(a,b,c,d){this.minimumResultsForSearch=c.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),a.call(this,b,c,d)}return b.prototype.showSearch=function(b,c){return a(c.data.results)<this.minimumResultsForSearch?!1:b.call(this,c)},b}),b.define("select2/dropdown/selectOnClose",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("close",function(a){d._handleSelectOnClose(a)})},a.prototype._handleSelectOnClose=function(a,b){if(b&&null!=b.originalSelect2Event){var c=b.originalSelect2Event;if("select"===c._type||"unselect"===c._type)return}var d=this.getHighlightedResults();if(!(d.length<1)){var e=d.data("data");null!=e.element&&e.element.selected||null==e.element&&e.selected||this.trigger("select",{data:e})}},a}),b.define("select2/dropdown/closeOnSelect",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(a){d._selectTriggered(a)}),b.on("unselect",function(a){d._selectTriggered(a)})},a.prototype._selectTriggered=function(a,b){var c=b.originalEvent;c&&c.ctrlKey||this.trigger("close",{originalEvent:c,originalSelect2Event:b})},a}),b.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(a){var b=a.input.length-a.maximum,c="Please delete "+b+" character";return 1!=b&&(c+="s"),c},inputTooShort:function(a){var b=a.minimum-a.input.length,c="Please enter "+b+" or more characters";return c},loadingMore:function(){return"Loading more results…"},maximumSelected:function(a){var b="You can only select "+a.maximum+" item";return 1!=a.maximum&&(b+="s"),b},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),b.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C){function D(){this.reset()}D.prototype.apply=function(l){if(l=a.extend(!0,{},this.defaults,l),null==l.dataAdapter){if(null!=l.ajax?l.dataAdapter=o:null!=l.data?l.dataAdapter=n:l.dataAdapter=m,l.minimumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),(null!=l.tokenSeparators||null!=l.tokenizer)&&(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L<K.length;L++){var M=K[L],N={};try{N=k.loadPath(M)}catch(O){try{M=this.defaults.amdLanguageBase+M,N=k.loadPath(M)}catch(P){l.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+M+'" could not be automatically loaded. A fallback will be used instead.');continue}}J.extend(N)}l.translations=J}else{var Q=k.loadPath(this.defaults.amdLanguageBase+"en"),R=new k(l.language);R.extend(Q),l.translations=R}return l},D.prototype.reset=function(){function b(a){function b(a){return l[a]||a}return a.replace(/[^\u0000-\u007E]/g,b)}function c(d,e){if(""===a.trim(d.term))return e;if(e.children&&e.children.length>0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){var h=e.children[g],i=c(d,h);null==i&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var j=b(e.text).toUpperCase(),k=b(d.term).toUpperCase();return j.indexOf(k)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(this.defaults,f)};var E=new D;return E}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),a.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),a.data("data",a.data("select2Tags")),a.data("tags",!0)),a.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",a.data("ajaxUrl")),a.data("ajax--url",a.data("ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,a.data()):a.data();var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,c){null!=a.data("select2")&&a.data("select2").destroy(),this.$element=a,this.id=this._generateId(a),c=c||{},this.options=new b(c,a),e.__super__.constructor.call(this);var d=a.attr("tabindex")||0;a.data("old-tabindex",d),a.attr("tabindex","-1");var f=this.options.get("dataAdapter");this.dataAdapter=new f(a,this.options);var g=this.render();this._placeContainer(g);var h=this.options.get("selectionAdapter");this.selection=new h(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,g);var i=this.options.get("dropdownAdapter");this.dropdown=new i(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,g);var j=this.options.get("resultsAdapter");this.results=new j(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var k=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){k.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b=b.replace(/(:|\.|\[|\]|,)/g,""),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return 0>=e?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;i>h;h+=1){var j=g[h].replace(/\s/g,""),k=j.match(c);if(null!==k&&k.length>=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this.$element.on("focus.select2",function(a){b.trigger("focus",a)}),this._syncA=c.bind(this._syncAttributes,this),this._syncS=c.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._syncA),a.each(c,b._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",b._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",b._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",b._syncS,!1))},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype._syncSubtree=function(a,b){var c=!1,d=this;if(!a||!a.target||"OPTION"===a.target.nodeName||"OPTGROUP"===a.target.nodeName){if(b)if(b.addedNodes&&b.addedNodes.length>0)for(var e=0;e<b.addedNodes.length;e++){var f=b.addedNodes[e];f.selected&&(c=!0)}else b.removedNodes&&b.removedNodes.length>0&&(c=!0);else c=!0;c&&this.dataAdapter.current(function(a){d.trigger("selection:update",{data:a})})}},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),(null==a||0===a.length)&&(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null;
3
+ },e.prototype.render=function(){var b=a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),b.data("element",this.$element),b},e}),b.define("jquery-mousewheel",["jquery"],function(a){return a}),b.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(a,b,c,d){if(null==a.fn.select2){var e=["open","close","destroy"];a.fn.select2=function(b){if(b=b||{},"object"==typeof b)return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"==typeof b){var d,f=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=a(this).data("select2");null==c&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2."),d=c[b].apply(c,f)}),a.inArray(b,e)>-1?this:d}throw new Error("Invalid arguments for Select2: "+b)}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c});
helper/FlycartInput/FFilterInput.php ADDED
@@ -0,0 +1,1228 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace FlycartInput;
3
+
4
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
5
+
6
+ use FlycartInput\InputFilter;
7
+ use FlycartInput\StringHelper;
8
+ require_once 'InputFilter.php';
9
+ require_once 'StringHelper.php';
10
+ /**
11
+ * JFilterInput is a class for filtering input from any data source
12
+ *
13
+ */
14
+ class FFilterInput extends InputFilter
15
+ {
16
+ /**
17
+ * A flag for Unicode Supplementary Characters (4-byte Unicode character) stripping.
18
+ *
19
+ * @var integer
20
+ *
21
+ * @since 3.5
22
+ */
23
+ public $stripUSC = 0;
24
+
25
+ /**
26
+ * Constructor for inputFilter class. Only first parameter is required.
27
+ *
28
+ * @param array $tagsArray List of user-defined tags
29
+ * @param array $attrArray List of user-defined attributes
30
+ * @param integer $tagsMethod WhiteList method = 0, BlackList method = 1
31
+ * @param integer $attrMethod WhiteList method = 0, BlackList method = 1
32
+ * @param integer $xssAuto Only auto clean essentials = 0, Allow clean blacklisted tags/attr = 1
33
+ * @param integer $stripUSC Strip 4-byte unicode characters = 1, no strip = 0, ask the database driver = -1
34
+ *
35
+ * @since 11.1
36
+ */
37
+ public function __construct($tagsArray = array(), $attrArray = array(), $tagsMethod = 0, $attrMethod = 0, $xssAuto = 1, $stripUSC = -1)
38
+ {
39
+ // Make sure user defined arrays are in lowercase
40
+ $tagsArray = array_map('strtolower', (array) $tagsArray);
41
+ $attrArray = array_map('strtolower', (array) $attrArray);
42
+
43
+ // Assign member variables
44
+ $this->tagsArray = $tagsArray;
45
+ $this->attrArray = $attrArray;
46
+ $this->tagsMethod = $tagsMethod;
47
+ $this->attrMethod = $attrMethod;
48
+ $this->xssAuto = $xssAuto;
49
+ $this->stripUSC = $stripUSC;
50
+ /**
51
+ * If Unicode Supplementary Characters stripping is not set we have to check with the database driver. If the
52
+ * driver does not support USCs (i.e. there is no utf8mb4 support) we will enable USC stripping.
53
+ */
54
+ if ($this->stripUSC == -1)
55
+ {
56
+ try
57
+ {
58
+ global $wpdb;
59
+ $data = get_object_vars($wpdb);
60
+
61
+ if(isset($data['charset']) && $data['charset'] == 'utf8mb4'){
62
+ $this->stripUSC = 1;
63
+ } else {
64
+ $this->stripUSC = 0;
65
+ }
66
+ }
67
+ catch (RuntimeException $e)
68
+ {
69
+ // Could not connect to MySQL. Strip USC to be on the safe side.
70
+ $this->stripUSC = 1;
71
+ }
72
+ }
73
+ }
74
+
75
+ /**
76
+ * Returns an input filter object, only creating it if it doesn't already exist.
77
+ *
78
+ * @param array $tagsArray List of user-defined tags
79
+ * @param array $attrArray List of user-defined attributes
80
+ * @param integer $tagsMethod WhiteList method = 0, BlackList method = 1
81
+ * @param integer $attrMethod WhiteList method = 0, BlackList method = 1
82
+ * @param integer $xssAuto Only auto clean essentials = 0, Allow clean blacklisted tags/attr = 1
83
+ * @param integer $stripUSC Strip 4-byte unicode characters = 1, no strip = 0, ask the database driver = -1
84
+ *
85
+ * @return JFilterInput The JFilterInput object.
86
+ *
87
+ * @since 11.1
88
+ */
89
+ public static function &getInstance($tagsArray = array(), $attrArray = array(), $tagsMethod = 0, $attrMethod = 0, $xssAuto = 1, $stripUSC = -1)
90
+ {
91
+ $sig = md5(serialize(array($tagsArray, $attrArray, $tagsMethod, $attrMethod, $xssAuto)));
92
+
93
+ if (empty(self::$instances[$sig]))
94
+ {
95
+ self::$instances[$sig] = new FFilterInput($tagsArray, $attrArray, $tagsMethod, $attrMethod, $xssAuto, $stripUSC);
96
+ }
97
+
98
+ return self::$instances[$sig];
99
+ }
100
+
101
+ /**
102
+ * Method to be called by another php script. Processes for XSS and
103
+ * specified bad code.
104
+ *
105
+ * @param mixed $source Input string/array-of-string to be 'cleaned'
106
+ * @param string $type The return type for the variable:
107
+ * INT: An integer, or an array of integers,
108
+ * UINT: An unsigned integer, or an array of unsigned integers,
109
+ * FLOAT: A floating point number, or an array of floating point numbers,
110
+ * BOOLEAN: A boolean value,
111
+ * WORD: A string containing A-Z or underscores only (not case sensitive),
112
+ * ALNUM: A string containing A-Z or 0-9 only (not case sensitive),
113
+ * CMD: A string containing A-Z, 0-9, underscores, periods or hyphens (not case sensitive),
114
+ * BASE64: A string containing A-Z, 0-9, forward slashes, plus or equals (not case sensitive),
115
+ * STRING: A fully decoded and sanitised string (default),
116
+ * HTML: A sanitised string,
117
+ * ARRAY: An array,
118
+ * PATH: A sanitised file path, or an array of sanitised file paths,
119
+ * TRIM: A string trimmed from normal, non-breaking and multibyte spaces
120
+ * USERNAME: Do not use (use an application specific filter),
121
+ * RAW: The raw string is returned with no filtering,
122
+ * unknown: An unknown filter will act like STRING. If the input is an array it will return an
123
+ * array of fully decoded and sanitised strings.
124
+ *
125
+ * @return mixed 'Cleaned' version of input parameter
126
+ *
127
+ * @since 11.1
128
+ */
129
+ public function clean($source, $type = 'string')
130
+ {
131
+ // Strip Unicode Supplementary Characters when requested to do so
132
+ if ($this->stripUSC)
133
+ {
134
+ // Alternatively: preg_replace('/[\x{10000}-\x{10FFFF}]/u', "\xE2\xAF\x91", $source) but it'd be slower.
135
+ $source = $this->stripUSC($source);
136
+ }
137
+
138
+ // Handle the type constraint cases
139
+ switch (strtoupper($type))
140
+ {
141
+ case 'INT':
142
+ case 'INTEGER':
143
+ $pattern = '/[-+]?[0-9]+/';
144
+
145
+ if (is_array($source))
146
+ {
147
+ $result = array();
148
+
149
+ // Itterate through the array
150
+ foreach ($source as $eachString)
151
+ {
152
+ preg_match($pattern, (string) $eachString, $matches);
153
+ $result[] = isset($matches[0]) ? (int) $matches[0] : 0;
154
+ }
155
+ }
156
+ else
157
+ {
158
+ preg_match($pattern, (string) $source, $matches);
159
+ $result = isset($matches[0]) ? (int) $matches[0] : 0;
160
+ }
161
+
162
+ break;
163
+ case 'UINT':
164
+ $pattern = '/[-+]?[0-9]+/';
165
+
166
+ if (is_array($source))
167
+ {
168
+ $result = array();
169
+
170
+ // Itterate through the array
171
+ foreach ($source as $eachString)
172
+ {
173
+ preg_match($pattern, (string) $eachString, $matches);
174
+ $result[] = isset($matches[0]) ? abs((int) $matches[0]) : 0;
175
+ }
176
+ }
177
+ else
178
+ {
179
+ preg_match($pattern, (string) $source, $matches);
180
+ $result = isset($matches[0]) ? abs((int) $matches[0]) : 0;
181
+ }
182
+
183
+ break;
184
+ case 'FLOAT':
185
+ case 'DOUBLE':
186
+ $pattern = '/[-+]?[0-9]+(\.[0-9]+)?([eE][-+]?[0-9]+)?/';
187
+
188
+ if (is_array($source))
189
+ {
190
+ $result = array();
191
+
192
+ // Itterate through the array
193
+ foreach ($source as $eachString)
194
+ {
195
+ preg_match($pattern, (string) $eachString, $matches);
196
+ $result[] = isset($matches[0]) ? (float) $matches[0] : 0;
197
+ }
198
+ }
199
+ else
200
+ {
201
+ preg_match($pattern, (string) $source, $matches);
202
+ $result = isset($matches[0]) ? (float) $matches[0] : 0;
203
+ }
204
+
205
+ break;
206
+ case 'BOOL':
207
+ case 'BOOLEAN':
208
+
209
+ if (is_array($source))
210
+ {
211
+ $result = array();
212
+
213
+ // Iterate through the array
214
+ foreach ($source as $eachString)
215
+ {
216
+ $result[] = (bool) $eachString;
217
+ }
218
+ }
219
+ else
220
+ {
221
+ $result = (bool) $source;
222
+ }
223
+
224
+ break;
225
+ case 'WORD':
226
+ $pattern = '/[^A-Z_]/i';
227
+
228
+ if (is_array($source))
229
+ {
230
+ $result = array();
231
+
232
+ // Iterate through the array
233
+ foreach ($source as $eachString)
234
+ {
235
+ $result[] = (string) preg_replace($pattern, '', $eachString);
236
+ }
237
+ }
238
+ else
239
+ {
240
+ $result = (string) preg_replace($pattern, '', $source);
241
+ }
242
+
243
+ break;
244
+ case 'ALNUM':
245
+ $pattern = '/[^A-Z0-9]/i';
246
+
247
+ if (is_array($source))
248
+ {
249
+ $result = array();
250
+
251
+ // Iterate through the array
252
+ foreach ($source as $eachString)
253
+ {
254
+ $result[] = (string) preg_replace($pattern, '', $eachString);
255
+ }
256
+ }
257
+ else
258
+ {
259
+ $result = (string) preg_replace($pattern, '', $source);
260
+ }
261
+
262
+ break;
263
+ case 'CMD':
264
+ $pattern = '/[^A-Z0-9_\.-]/i';
265
+
266
+ if (is_array($source))
267
+ {
268
+ $result = array();
269
+
270
+ // Iterate through the array
271
+ foreach ($source as $eachString)
272
+ {
273
+ $cleaned = (string) preg_replace($pattern, '', $eachString);
274
+ $result[] = ltrim($cleaned, '.');
275
+ }
276
+ }
277
+ else
278
+ {
279
+ $result = (string) preg_replace($pattern, '', $source);
280
+ $result = ltrim($result, '.');
281
+ }
282
+
283
+ break;
284
+ case 'BASE64':
285
+ $pattern = '/[^A-Z0-9\/+=]/i';
286
+
287
+ if (is_array($source))
288
+ {
289
+ $result = array();
290
+
291
+ // Iterate through the array
292
+ foreach ($source as $eachString)
293
+ {
294
+ $result[] = (string) preg_replace($pattern, '', $eachString);
295
+ }
296
+ }
297
+ else
298
+ {
299
+ $result = (string) preg_replace($pattern, '', $source);
300
+ }
301
+
302
+ break;
303
+ case 'STRING':
304
+
305
+ if (is_array($source))
306
+ {
307
+ $result = array();
308
+
309
+ // Iterate through the array
310
+ foreach ($source as $eachString)
311
+ {
312
+ $result[] = (string) $this->remove($this->decode((string) $eachString));
313
+ }
314
+ }
315
+ else
316
+ {
317
+ $result = (string) $this->remove($this->decode((string) $source));
318
+ }
319
+
320
+ break;
321
+ case 'HTML':
322
+
323
+ if (is_array($source))
324
+ {
325
+ $result = array();
326
+
327
+ // Iterate through the array
328
+ foreach ($source as $eachString)
329
+ {
330
+ $result[] = (string) $this->remove((string) $eachString);
331
+ }
332
+ }
333
+ else
334
+ {
335
+ $result = (string) $this->remove((string) $source);
336
+ }
337
+
338
+ break;
339
+ case 'ARRAY':
340
+ $result = (array) $source;
341
+
342
+ break;
343
+ case 'PATH':
344
+ $pattern = '/^[A-Za-z0-9_\/-]+[A-Za-z0-9_\.-]*([\\\\\/][A-Za-z0-9_-]+[A-Za-z0-9_\.-]*)*$/';
345
+
346
+ if (is_array($source))
347
+ {
348
+ $result = array();
349
+
350
+ // Itterate through the array
351
+ foreach ($source as $eachString)
352
+ {
353
+ preg_match($pattern, (string) $eachString, $matches);
354
+ $result[] = isset($matches[0]) ? (string) $matches[0] : '';
355
+ }
356
+ }
357
+ else
358
+ {
359
+ preg_match($pattern, $source, $matches);
360
+ $result = isset($matches[0]) ? (string) $matches[0] : '';
361
+ }
362
+
363
+ break;
364
+ case 'TRIM':
365
+
366
+ if (is_array($source))
367
+ {
368
+ $result = array();
369
+
370
+ // Iterate through the array
371
+ foreach ($source as $eachString)
372
+ {
373
+ $cleaned = (string) trim($eachString);
374
+ $cleaned = StringHelper::trim($cleaned, chr(0xE3) . chr(0x80) . chr(0x80));
375
+ $result[] = StringHelper::trim($cleaned, chr(0xC2) . chr(0xA0));
376
+ }
377
+ }
378
+ else
379
+ {
380
+ $result = (string) trim($source);
381
+ $result = StringHelper::trim($result, chr(0xE3) . chr(0x80) . chr(0x80));
382
+ $result = StringHelper::trim($result, chr(0xC2) . chr(0xA0));
383
+ }
384
+
385
+ break;
386
+ case 'USERNAME':
387
+ $pattern = '/[\x00-\x1F\x7F<>"\'%&]/';
388
+
389
+ if (is_array($source))
390
+ {
391
+ $result = array();
392
+
393
+ // Iterate through the array
394
+ foreach ($source as $eachString)
395
+ {
396
+ $result[] = (string) preg_replace($pattern, '', $eachString);
397
+ }
398
+ }
399
+ else
400
+ {
401
+ $result = (string) preg_replace($pattern, '', $source);
402
+ }
403
+
404
+ break;
405
+ case 'RAW':
406
+ $result = $source;
407
+
408
+ break;
409
+ default:
410
+
411
+ // Are we dealing with an array?
412
+ if (is_array($source))
413
+ {
414
+ foreach ($source as $key => $value)
415
+ {
416
+ // Filter element for XSS and other 'bad' code etc.
417
+ if (is_string($value))
418
+ {
419
+ $source[$key] = $this->_remove($this->_decode($value));
420
+ }
421
+ }
422
+ $result = $source;
423
+ }
424
+ else
425
+ {
426
+ // Or a string?
427
+ if (is_string($source) && !empty($source))
428
+ {
429
+ // Filter source for XSS and other 'bad' code etc.
430
+ $result = $this->_remove($this->_decode($source));
431
+ }
432
+ else
433
+ {
434
+ // Not an array or string... return the passed parameter
435
+ $result = $source;
436
+ }
437
+ }
438
+
439
+ break;
440
+ }
441
+
442
+ return $result;
443
+ }
444
+
445
+ /**
446
+ * Function to punyencode utf8 mail when saving content
447
+ *
448
+ * @param string $text The strings to encode
449
+ *
450
+ * @return string The punyencoded mail
451
+ *
452
+ * @since 3.5
453
+ */
454
+ public function emailToPunycode($text)
455
+ {
456
+ $pattern = '/(("mailto:)+[\w\.\-\+]+\@[^"?]+\.+[^."?]+("|\?))/';
457
+
458
+ if (preg_match_all($pattern, $text, $matches))
459
+ {
460
+ foreach ($matches[0] as $match)
461
+ {
462
+ $match = (string) str_replace(array('?', '"'), '', $match);
463
+ $text = (string) str_replace($match, JStringPunycode::emailToPunycode($match), $text);
464
+ }
465
+ }
466
+
467
+ return $text;
468
+ }
469
+
470
+ /**
471
+ * Checks an uploaded for suspicious naming and potential PHP contents which could indicate a hacking attempt.
472
+ *
473
+ * The options you can define are:
474
+ * null_byte Prevent files with a null byte in their name (buffer overflow attack)
475
+ * forbidden_extensions Do not allow these strings anywhere in the file's extension
476
+ * php_tag_in_content Do not allow `<?php` tag in content
477
+ * shorttag_in_content Do not allow short tag `<?` in content
478
+ * shorttag_extensions Which file extensions to scan for short tags in content
479
+ * fobidden_ext_in_content Do not allow forbidden_extensions anywhere in content
480
+ * php_ext_content_extensions Which file extensions to scan for .php in content
481
+ *
482
+ * This code is an adaptation and improvement of Admin Tools' UploadShield feature,
483
+ * relicensed and contributed by its author.
484
+ *
485
+ * @param array $file An uploaded file descriptor
486
+ * @param array $options The scanner options (see the code for details)
487
+ *
488
+ * @return boolean True of the file is safe
489
+ *
490
+ * @since 3.4
491
+ */
492
+ public static function isSafeFile($file, $options = array())
493
+ {
494
+ $defaultOptions = array(
495
+
496
+ // Null byte in file name
497
+ 'null_byte' => true,
498
+
499
+ // Forbidden string in extension (e.g. php matched .php, .xxx.php, .php.xxx and so on)
500
+ 'forbidden_extensions' => array(
501
+ 'php', 'phps', 'php5', 'php3', 'php4', 'inc', 'pl', 'cgi', 'fcgi', 'java', 'jar', 'py',
502
+ ),
503
+
504
+ // <?php tag in file contents
505
+ 'php_tag_in_content' => true,
506
+
507
+ // <? tag in file contents
508
+ 'shorttag_in_content' => true,
509
+
510
+ // Which file extensions to scan for short tags
511
+ 'shorttag_extensions' => array(
512
+ 'inc', 'phps', 'class', 'php3', 'php4', 'php5', 'txt', 'dat', 'tpl', 'tmpl',
513
+ ),
514
+
515
+ // Forbidden extensions anywhere in the content
516
+ 'fobidden_ext_in_content' => true,
517
+
518
+ // Which file extensions to scan for .php in the content
519
+ 'php_ext_content_extensions' => array('zip', 'rar', 'tar', 'gz', 'tgz', 'bz2', 'tbz', 'jpa'),
520
+ );
521
+
522
+ $options = array_merge($defaultOptions, $options);
523
+
524
+ // Make sure we can scan nested file descriptors
525
+ $descriptors = $file;
526
+
527
+ if (isset($file['name']) && isset($file['tmp_name']))
528
+ {
529
+ $descriptors = self::decodeFileData(
530
+ array(
531
+ $file['name'],
532
+ $file['type'],
533
+ $file['tmp_name'],
534
+ $file['error'],
535
+ $file['size'],
536
+ )
537
+ );
538
+ }
539
+
540
+ // Handle non-nested descriptors (single files)
541
+ if (isset($descriptors['name']))
542
+ {
543
+ $descriptors = array($descriptors);
544
+ }
545
+
546
+ // Scan all descriptors detected
547
+ foreach ($descriptors as $fileDescriptor)
548
+ {
549
+ if (!isset($fileDescriptor['name']))
550
+ {
551
+ // This is a nested descriptor. We have to recurse.
552
+ if (!self::isSafeFile($fileDescriptor, $options))
553
+ {
554
+ return false;
555
+ }
556
+
557
+ continue;
558
+ }
559
+
560
+ $tempNames = $fileDescriptor['tmp_name'];
561
+ $intendedNames = $fileDescriptor['name'];
562
+
563
+ if (!is_array($tempNames))
564
+ {
565
+ $tempNames = array($tempNames);
566
+ }
567
+
568
+ if (!is_array($intendedNames))
569
+ {
570
+ $intendedNames = array($intendedNames);
571
+ }
572
+
573
+ $len = count($tempNames);
574
+
575
+ for ($i = 0; $i < $len; $i++)
576
+ {
577
+ $tempName = array_shift($tempNames);
578
+ $intendedName = array_shift($intendedNames);
579
+
580
+ // 1. Null byte check
581
+ if ($options['null_byte'])
582
+ {
583
+ if (strstr($intendedName, "\x00"))
584
+ {
585
+ return false;
586
+ }
587
+ }
588
+
589
+ // 2. PHP-in-extension check (.php, .php.xxx[.yyy[.zzz[...]]], .xxx[.yyy[.zzz[...]]].php)
590
+ if (!empty($options['forbidden_extensions']))
591
+ {
592
+ $explodedName = explode('.', $intendedName);
593
+ $explodedName = array_reverse($explodedName);
594
+ array_pop($explodedName);
595
+ $explodedName = array_map('strtolower', $explodedName);
596
+
597
+ /*
598
+ * DO NOT USE array_intersect HERE! array_intersect expects the two arrays to
599
+ * be set, i.e. they should have unique values.
600
+ */
601
+ foreach ($options['forbidden_extensions'] as $ext)
602
+ {
603
+ if (in_array($ext, $explodedName))
604
+ {
605
+ return false;
606
+ }
607
+ }
608
+ }
609
+
610
+ // 3. File contents scanner (PHP tag in file contents)
611
+ if ($options['php_tag_in_content'] || $options['shorttag_in_content']
612
+ || ($options['fobidden_ext_in_content'] && !empty($options['forbidden_extensions'])))
613
+ {
614
+ $fp = @fopen($tempName, 'r');
615
+
616
+ if ($fp !== false)
617
+ {
618
+ $data = '';
619
+
620
+ while (!feof($fp))
621
+ {
622
+ $data .= @fread($fp, 131072);
623
+
624
+ if ($options['php_tag_in_content'] && stristr($data, '<?php'))
625
+ {
626
+ return false;
627
+ }
628
+
629
+ if ($options['shorttag_in_content'])
630
+ {
631
+ $suspiciousExtensions = $options['shorttag_extensions'];
632
+
633
+ if (empty($suspiciousExtensions))
634
+ {
635
+ $suspiciousExtensions = array(
636
+ 'inc', 'phps', 'class', 'php3', 'php4', 'txt', 'dat', 'tpl', 'tmpl',
637
+ );
638
+ }
639
+
640
+ /*
641
+ * DO NOT USE array_intersect HERE! array_intersect expects the two arrays to
642
+ * be set, i.e. they should have unique values.
643
+ */
644
+ $collide = false;
645
+
646
+ foreach ($suspiciousExtensions as $ext)
647
+ {
648
+ if (in_array($ext, $explodedName))
649
+ {
650
+ $collide = true;
651
+
652
+ break;
653
+ }
654
+ }
655
+
656
+ if ($collide)
657
+ {
658
+ // These are suspicious text files which may have the short tag (<?) in them
659
+ if (strstr($data, '<?'))
660
+ {
661
+ return false;
662
+ }
663
+ }
664
+ }
665
+
666
+ if ($options['fobidden_ext_in_content'] && !empty($options['forbidden_extensions']))
667
+ {
668
+ $suspiciousExtensions = $options['php_ext_content_extensions'];
669
+
670
+ if (empty($suspiciousExtensions))
671
+ {
672
+ $suspiciousExtensions = array(
673
+ 'zip', 'rar', 'tar', 'gz', 'tgz', 'bz2', 'tbz', 'jpa',
674
+ );
675
+ }
676
+
677
+ /*
678
+ * DO NOT USE array_intersect HERE! array_intersect expects the two arrays to
679
+ * be set, i.e. they should have unique values.
680
+ */
681
+ $collide = false;
682
+
683
+ foreach ($suspiciousExtensions as $ext)
684
+ {
685
+ if (in_array($ext, $explodedName))
686
+ {
687
+ $collide = true;
688
+
689
+ break;
690
+ }
691
+ }
692
+
693
+ if ($collide)
694
+ {
695
+ /*
696
+ * These are suspicious text files which may have an executable
697
+ * file extension in them
698
+ */
699
+ foreach ($options['forbidden_extensions'] as $ext)
700
+ {
701
+ if (strstr($data, '.' . $ext))
702
+ {
703
+ return false;
704
+ }
705
+ }
706
+ }
707
+ }
708
+
709
+ /*
710
+ * This makes sure that we don't accidentally skip a <?php tag if it's across
711
+ * a read boundary, even on multibyte strings
712
+ */
713
+ $data = substr($data, -10);
714
+ }
715
+
716
+ fclose($fp);
717
+ }
718
+ }
719
+ }
720
+ }
721
+
722
+ return true;
723
+ }
724
+
725
+ /**
726
+ * Method to decode a file data array.
727
+ *
728
+ * @param array $data The data array to decode.
729
+ *
730
+ * @return array
731
+ *
732
+ * @since 3.4
733
+ */
734
+ protected static function decodeFileData(array $data)
735
+ {
736
+ $result = array();
737
+
738
+ if (is_array($data[0]))
739
+ {
740
+ foreach ($data[0] as $k => $v)
741
+ {
742
+ $result[$k] = self::decodeFileData(array($data[0][$k], $data[1][$k], $data[2][$k], $data[3][$k], $data[4][$k]));
743
+ }
744
+
745
+ return $result;
746
+ }
747
+
748
+ return array('name' => $data[0], 'type' => $data[1], 'tmp_name' => $data[2], 'error' => $data[3], 'size' => $data[4]);
749
+ }
750
+
751
+ /**
752
+ * Internal method to iteratively remove all unwanted tags and attributes
753
+ *
754
+ * @param string $source Input string to be 'cleaned'
755
+ *
756
+ * @return string 'Cleaned' version of input parameter
757
+ *
758
+ * @since 11.1
759
+ * @deprecated 4.0 Use JFilterInput::remove() instead
760
+ */
761
+ protected function _remove($source)
762
+ {
763
+ return $this->remove($source);
764
+ }
765
+
766
+ /**
767
+ * Internal method to iteratively remove all unwanted tags and attributes
768
+ *
769
+ * @param string $source Input string to be 'cleaned'
770
+ *
771
+ * @return string 'Cleaned' version of input parameter
772
+ *
773
+ * @since 3.5
774
+ */
775
+ protected function remove($source)
776
+ {
777
+ // Iteration provides nested tag protection
778
+ do
779
+ {
780
+ $temp = $source;
781
+ $source = $this->_cleanTags($source);
782
+ }
783
+ while ($temp != $source);
784
+
785
+ return $source;
786
+ }
787
+
788
+ /**
789
+ * Internal method to strip a string of certain tags
790
+ *
791
+ * @param string $source Input string to be 'cleaned'
792
+ *
793
+ * @return string 'Cleaned' version of input parameter
794
+ *
795
+ * @since 11.1
796
+ * @deprecated 4.0 Use JFilterInput::cleanTags() instead
797
+ */
798
+ protected function _cleanTags($source)
799
+ {
800
+ return $this->cleanTags($source);
801
+ }
802
+
803
+ /**
804
+ * Internal method to strip a string of certain tags
805
+ *
806
+ * @param string $source Input string to be 'cleaned'
807
+ *
808
+ * @return string 'Cleaned' version of input parameter
809
+ *
810
+ * @since 3.5
811
+ */
812
+ protected function cleanTags($source)
813
+ {
814
+ // First, pre-process this for illegal characters inside attribute values
815
+ $source = $this->_escapeAttributeValues($source);
816
+
817
+ // In the beginning we don't really have a tag, so everything is postTag
818
+ $preTag = null;
819
+ $postTag = $source;
820
+ $currentSpace = false;
821
+
822
+ // Setting to null to deal with undefined variables
823
+ $attr = '';
824
+
825
+ // Is there a tag? If so it will certainly start with a '<'.
826
+ $tagOpen_start = strpos($source, '<');
827
+
828
+ while ($tagOpen_start !== false)
829
+ {
830
+ // Get some information about the tag we are processing
831
+ $preTag .= substr($postTag, 0, $tagOpen_start);
832
+ $postTag = substr($postTag, $tagOpen_start);
833
+ $fromTagOpen = substr($postTag, 1);
834
+ $tagOpen_end = strpos($fromTagOpen, '>');
835
+
836
+ // Check for mal-formed tag where we have a second '<' before the first '>'
837
+ $nextOpenTag = (strlen($postTag) > $tagOpen_start) ? strpos($postTag, '<', $tagOpen_start + 1) : false;
838
+
839
+ if (($nextOpenTag !== false) && ($nextOpenTag < $tagOpen_end))
840
+ {
841
+ // At this point we have a mal-formed tag -- remove the offending open
842
+ $postTag = substr($postTag, 0, $tagOpen_start) . substr($postTag, $tagOpen_start + 1);
843
+ $tagOpen_start = strpos($postTag, '<');
844
+ continue;
845
+ }
846
+
847
+ // Let's catch any non-terminated tags and skip over them
848
+ if ($tagOpen_end === false)
849
+ {
850
+ $postTag = substr($postTag, $tagOpen_start + 1);
851
+ $tagOpen_start = strpos($postTag, '<');
852
+ continue;
853
+ }
854
+
855
+ // Do we have a nested tag?
856
+ $tagOpen_nested = strpos($fromTagOpen, '<');
857
+
858
+ if (($tagOpen_nested !== false) && ($tagOpen_nested < $tagOpen_end))
859
+ {
860
+ $preTag .= substr($postTag, 0, ($tagOpen_nested + 1));
861
+ $postTag = substr($postTag, ($tagOpen_nested + 1));
862
+ $tagOpen_start = strpos($postTag, '<');
863
+ continue;
864
+ }
865
+
866
+ // Let's get some information about our tag and setup attribute pairs
867
+ $tagOpen_nested = (strpos($fromTagOpen, '<') + $tagOpen_start + 1);
868
+ $currentTag = substr($fromTagOpen, 0, $tagOpen_end);
869
+ $tagLength = strlen($currentTag);
870
+ $tagLeft = $currentTag;
871
+ $attrSet = array();
872
+ $currentSpace = strpos($tagLeft, ' ');
873
+
874
+ // Are we an open tag or a close tag?
875
+ if (substr($currentTag, 0, 1) == '/')
876
+ {
877
+ // Close Tag
878
+ $isCloseTag = true;
879
+ list ($tagName) = explode(' ', $currentTag);
880
+ $tagName = substr($tagName, 1);
881
+ }
882
+ else
883
+ {
884
+ // Open Tag
885
+ $isCloseTag = false;
886
+ list ($tagName) = explode(' ', $currentTag);
887
+ }
888
+
889
+ /*
890
+ * Exclude all "non-regular" tagnames
891
+ * OR no tagname
892
+ * OR remove if xssauto is on and tag is blacklisted
893
+ */
894
+ if ((!preg_match("/^[a-z][a-z0-9]*$/i", $tagName)) || (!$tagName) || ((in_array(strtolower($tagName), $this->tagBlacklist)) && ($this->xssAuto)))
895
+ {
896
+ $postTag = substr($postTag, ($tagLength + 2));
897
+ $tagOpen_start = strpos($postTag, '<');
898
+
899
+ // Strip tag
900
+ continue;
901
+ }
902
+
903
+ /*
904
+ * Time to grab any attributes from the tag... need this section in
905
+ * case attributes have spaces in the values.
906
+ */
907
+ while ($currentSpace !== false)
908
+ {
909
+ $attr = '';
910
+ $fromSpace = substr($tagLeft, ($currentSpace + 1));
911
+ $nextEqual = strpos($fromSpace, '=');
912
+ $nextSpace = strpos($fromSpace, ' ');
913
+ $openQuotes = strpos($fromSpace, '"');
914
+ $closeQuotes = strpos(substr($fromSpace, ($openQuotes + 1)), '"') + $openQuotes + 1;
915
+ $startAtt = '';
916
+ $startAttPosition = 0;
917
+
918
+ // Find position of equal and open quotes ignoring
919
+ if (preg_match('#\s*=\s*\"#', $fromSpace, $matches, PREG_OFFSET_CAPTURE))
920
+ {
921
+ $startAtt = $matches[0][0];
922
+ $startAttPosition = $matches[0][1];
923
+ $closeQuotes = strpos(substr($fromSpace, ($startAttPosition + strlen($startAtt))), '"') + $startAttPosition + strlen($startAtt);
924
+ $nextEqual = $startAttPosition + strpos($startAtt, '=');
925
+ $openQuotes = $startAttPosition + strpos($startAtt, '"');
926
+ $nextSpace = strpos(substr($fromSpace, $closeQuotes), ' ') + $closeQuotes;
927
+ }
928
+
929
+ // Do we have an attribute to process? [check for equal sign]
930
+ if ($fromSpace != '/' && (($nextEqual && $nextSpace && $nextSpace < $nextEqual) || !$nextEqual))
931
+ {
932
+ if (!$nextEqual)
933
+ {
934
+ $attribEnd = strpos($fromSpace, '/') - 1;
935
+ }
936
+ else
937
+ {
938
+ $attribEnd = $nextSpace - 1;
939
+ }
940
+
941
+ // If there is an ending, use this, if not, do not worry.
942
+ if ($attribEnd > 0)
943
+ {
944
+ $fromSpace = substr($fromSpace, $attribEnd + 1);
945
+ }
946
+ }
947
+
948
+ if (strpos($fromSpace, '=') !== false)
949
+ {
950
+ /*
951
+ * If the attribute value is wrapped in quotes we need to grab the substring from
952
+ * the closing quote, otherwise grab until the next space.
953
+ */
954
+ if (($openQuotes !== false) && (strpos(substr($fromSpace, ($openQuotes + 1)), '"') !== false))
955
+ {
956
+ $attr = substr($fromSpace, 0, ($closeQuotes + 1));
957
+ }
958
+ else
959
+ {
960
+ $attr = substr($fromSpace, 0, $nextSpace);
961
+ }
962
+ }
963
+
964
+ // No more equal signs so add any extra text in the tag into the attribute array [eg. checked]
965
+ else
966
+ {
967
+ if ($fromSpace != '/')
968
+ {
969
+ $attr = substr($fromSpace, 0, $nextSpace);
970
+ }
971
+ }
972
+
973
+ // Last Attribute Pair
974
+ if (!$attr && $fromSpace != '/')
975
+ {
976
+ $attr = $fromSpace;
977
+ }
978
+
979
+ // Add attribute pair to the attribute array
980
+ $attrSet[] = $attr;
981
+
982
+ // Move search point and continue iteration
983
+ $tagLeft = substr($fromSpace, strlen($attr));
984
+ $currentSpace = strpos($tagLeft, ' ');
985
+ }
986
+
987
+ // Is our tag in the user input array?
988
+ $tagFound = in_array(strtolower($tagName), $this->tagsArray);
989
+
990
+ // If the tag is allowed let's append it to the output string.
991
+ if ((!$tagFound && $this->tagsMethod) || ($tagFound && !$this->tagsMethod))
992
+ {
993
+ // Reconstruct tag with allowed attributes
994
+ if (!$isCloseTag)
995
+ {
996
+ // Open or single tag
997
+ $attrSet = $this->_cleanAttributes($attrSet);
998
+ $preTag .= '<' . $tagName;
999
+ for ($i = 0, $count = count($attrSet); $i < $count; $i++)
1000
+ {
1001
+ $preTag .= ' ' . $attrSet[$i];
1002
+ }
1003
+
1004
+ // Reformat single tags to XHTML
1005
+ if (strpos($fromTagOpen, '</' . $tagName))
1006
+ {
1007
+ $preTag .= '>';
1008
+ }
1009
+ else
1010
+ {
1011
+ $preTag .= ' />';
1012
+ }
1013
+ }
1014
+
1015
+ // Closing tag
1016
+ else
1017
+ {
1018
+ $preTag .= '</' . $tagName . '>';
1019
+ }
1020
+ }
1021
+
1022
+ // Find next tag's start and continue iteration
1023
+ $postTag = substr($postTag, ($tagLength + 2));
1024
+ $tagOpen_start = strpos($postTag, '<');
1025
+ }
1026
+
1027
+ // Append any code after the end of tags and return
1028
+ if ($postTag != '<')
1029
+ {
1030
+ $preTag .= $postTag;
1031
+ }
1032
+
1033
+ return $preTag;
1034
+ }
1035
+
1036
+ /**
1037
+ * Internal method to strip a tag of certain attributes
1038
+ *
1039
+ * @param array $attrSet Array of attribute pairs to filter
1040
+ *
1041
+ * @return array Filtered array of attribute pairs
1042
+ *
1043
+ * @since 11.1
1044
+ * @deprecated 4.0 Use JFilterInput::cleanAttributes() instead
1045
+ */
1046
+ protected function _cleanAttributes($attrSet)
1047
+ {
1048
+ return $this->cleanAttributes($attrSet);
1049
+ }
1050
+
1051
+ /**
1052
+ * Escape < > and " inside attribute values
1053
+ *
1054
+ * @param string $source The source string.
1055
+ *
1056
+ * @return string Filtered string
1057
+ *
1058
+ * @since 3.5
1059
+ */
1060
+ protected function escapeAttributeValues($source)
1061
+ {
1062
+ $alreadyFiltered = '';
1063
+ $remainder = $source;
1064
+ $badChars = array('<', '"', '>');
1065
+ $escapedChars = array('&lt;', '&quot;', '&gt;');
1066
+
1067
+ /*
1068
+ * Process each portion based on presence of =" and "<space>, "/>, or ">
1069
+ * See if there are any more attributes to process
1070
+ */
1071
+ while (preg_match('#<[^>]*?=\s*?(\"|\')#s', $remainder, $matches, PREG_OFFSET_CAPTURE))
1072
+ {
1073
+ // Get the portion before the attribute value
1074
+ $quotePosition = $matches[0][1];
1075
+ $nextBefore = $quotePosition + strlen($matches[0][0]);
1076
+
1077
+ /*
1078
+ * Figure out if we have a single or double quote and look for the matching closing quote
1079
+ * Closing quote should be "/>, ">, "<space>, or " at the end of the string
1080
+ */
1081
+ $quote = substr($matches[0][0], -1);
1082
+ $pregMatch = ($quote == '"') ? '#(\"\s*/\s*>|\"\s*>|\"\s+|\"$)#' : "#(\'\s*/\s*>|\'\s*>|\'\s+|\'$)#";
1083
+
1084
+ // Get the portion after attribute value
1085
+ if (preg_match($pregMatch, substr($remainder, $nextBefore), $matches, PREG_OFFSET_CAPTURE))
1086
+ {
1087
+ // We have a closing quote
1088
+ $nextAfter = $nextBefore + $matches[0][1];
1089
+ }
1090
+ else
1091
+ {
1092
+ // No closing quote
1093
+ $nextAfter = strlen($remainder);
1094
+ }
1095
+
1096
+ // Get the actual attribute value
1097
+ $attributeValue = substr($remainder, $nextBefore, $nextAfter - $nextBefore);
1098
+
1099
+ // Escape bad chars
1100
+ $attributeValue = str_replace($badChars, $escapedChars, $attributeValue);
1101
+ $attributeValue = $this->_stripCSSExpressions($attributeValue);
1102
+ $alreadyFiltered .= substr($remainder, 0, $nextBefore) . $attributeValue . $quote;
1103
+ $remainder = substr($remainder, $nextAfter + 1);
1104
+ }
1105
+
1106
+ // At this point, we just have to return the $alreadyFiltered and the $remainder
1107
+ return $alreadyFiltered . $remainder;
1108
+ }
1109
+
1110
+ /**
1111
+ * Try to convert to plaintext
1112
+ *
1113
+ * @param string $source The source string.
1114
+ *
1115
+ * @return string Plaintext string
1116
+ *
1117
+ * @since 11.1
1118
+ * @deprecated 4.0 Use JFilterInput::decode() instead
1119
+ */
1120
+ protected function _decode($source)
1121
+ {
1122
+ return $this->decode($source);
1123
+ }
1124
+
1125
+ /**
1126
+ * Try to convert to plaintext
1127
+ *
1128
+ * @param string $source The source string.
1129
+ *
1130
+ * @return string Plaintext string
1131
+ *
1132
+ * @since 3.5
1133
+ */
1134
+ protected function decode($source)
1135
+ {
1136
+ static $ttr;
1137
+
1138
+ if (!is_array($ttr))
1139
+ {
1140
+ // Entity decode
1141
+ $trans_tbl = get_html_translation_table(HTML_ENTITIES, ENT_COMPAT, 'ISO-8859-1');
1142
+
1143
+ foreach ($trans_tbl as $k => $v)
1144
+ {
1145
+ $ttr[$v] = utf8_encode($k);
1146
+ }
1147
+ }
1148
+
1149
+ $source = strtr($source, $ttr);
1150
+
1151
+ // Convert decimal
1152
+ $source = preg_replace_callback('/&#(\d+);/m', function($m)
1153
+ {
1154
+ return utf8_encode(chr($m[1]));
1155
+ }, $source
1156
+ );
1157
+
1158
+ // Convert hex
1159
+ $source = preg_replace_callback('/&#x([a-f0-9]+);/mi', function($m)
1160
+ {
1161
+ return utf8_encode(chr('0x' . $m[1]));
1162
+ }, $source
1163
+ );
1164
+
1165
+ return $source;
1166
+ }
1167
+
1168
+ /**
1169
+ * Escape < > and " inside attribute values
1170
+ *
1171
+ * @param string $source The source string.
1172
+ *
1173
+ * @return string Filtered string
1174
+ *
1175
+ * @since 11.1
1176
+ * @deprecated 4.0 Use JFilterInput::escapeAttributeValues() instead
1177
+ */
1178
+ protected function _escapeAttributeValues($source)
1179
+ {
1180
+ return $this->escapeAttributeValues($source);
1181
+ }
1182
+
1183
+ /**
1184
+ * Remove CSS Expressions in the form of `<property>:expression(...)`
1185
+ *
1186
+ * @param string $source The source string.
1187
+ *
1188
+ * @return string Filtered string
1189
+ *
1190
+ * @since 11.1
1191
+ * @deprecated 4.0 Use JFilterInput::stripCSSExpressions() instead
1192
+ */
1193
+ protected function _stripCSSExpressions($source)
1194
+ {
1195
+ return $this->stripCSSExpressions($source);
1196
+ }
1197
+
1198
+ /**
1199
+ * Recursively strip Unicode Supplementary Characters from the source. Not: objects cannot be filtered.
1200
+ *
1201
+ * @param mixed $source The data to filter
1202
+ *
1203
+ * @return mixed The filtered result
1204
+ *
1205
+ * @since 3.5
1206
+ */
1207
+ protected function stripUSC($source)
1208
+ {
1209
+ if (is_object($source))
1210
+ {
1211
+ return $source;
1212
+ }
1213
+
1214
+ if (is_array($source))
1215
+ {
1216
+ $filteredArray = array();
1217
+
1218
+ foreach ($source as $k => $v)
1219
+ {
1220
+ $filteredArray[$k] = $this->stripUSC($v);
1221
+ }
1222
+
1223
+ return $filteredArray;
1224
+ }
1225
+
1226
+ return preg_replace('/[\xF0-\xF7].../s', "\xE2\xAF\x91", $source);
1227
+ }
1228
+ }
helper/FlycartInput/FInput.php ADDED
@@ -0,0 +1,433 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace FlycartInput;
4
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
5
+
6
+ use Serializable;
7
+ use Countable;
8
+ use FlycartInput\FFilterInput;
9
+ require_once 'FFilterInput.php';
10
+ /**
11
+ * FInput Base Class
12
+ *
13
+ * This is an abstracted input class used to manage retrieving data from the application environment.
14
+ *
15
+ * @since 11.1
16
+ *
17
+ * @property-read FInput $get
18
+ * @property-read FInput $post
19
+ * @property-read FInput $request
20
+ * @property-read FInput $server
21
+ * @property-read FInputFiles $files
22
+ * @property-read FInputCookie $cookie
23
+ *
24
+ * @method integer getInt() getInt($name, $default = null) Get a signed integer.
25
+ * @method integer getUint() getUint($name, $default = null) Get an unsigned integer.
26
+ * @method float getFloat() getFloat($name, $default = null) Get a floating-point number.
27
+ * @method boolean getBool() getBool($name, $default = null) Get a boolean.
28
+ * @method string getWord() getWord($name, $default = null)
29
+ * @method string getAlnum() getAlnum($name, $default = null)
30
+ * @method string getCmd() getCmd($name, $default = null)
31
+ * @method string getBase64() getBase64($name, $default = null)
32
+ * @method string getString() getString($name, $default = null)
33
+ * @method string getHtml() getHtml($name, $default = null)
34
+ * @method string getPath() getPath($name, $default = null)
35
+ * @method string getUsername() getUsername($name, $default = null)
36
+ */
37
+ class FInput implements Serializable, Countable
38
+ {
39
+ /**
40
+ * Options array for the FInput instance.
41
+ *
42
+ * @var array
43
+ * @since 11.1
44
+ */
45
+ protected $options = array();
46
+
47
+ /**
48
+ * Filter object to use.
49
+ *
50
+ * @var JFilterInput
51
+ * @since 11.1
52
+ */
53
+ protected $filter = null;
54
+
55
+ /**
56
+ * Input data.
57
+ *
58
+ * @var array
59
+ * @since 11.1
60
+ */
61
+ protected $data = array();
62
+
63
+ /**
64
+ * Input objects
65
+ *
66
+ * @var array
67
+ * @since 11.1
68
+ */
69
+ protected $inputs = array();
70
+
71
+ public static $instance;
72
+
73
+ /**
74
+ * Constructor.
75
+ *
76
+ * @param array $source Source data (Optional, default is $_REQUEST)
77
+ * @param array $options Array of configuration parameters (Optional)
78
+ *
79
+ * @since 11.1
80
+ */
81
+ public function __construct($source = null, array $options = array())
82
+ {
83
+ if (isset($options['filter']))
84
+ {
85
+ $this->filter = $options['filter'];
86
+ }
87
+ else
88
+ {
89
+ $this->filter = FFilterInput::getInstance();
90
+ }
91
+
92
+ if (is_null($source))
93
+ {
94
+ $this->data = &$_REQUEST;
95
+ }
96
+ else
97
+ {
98
+ $this->data = $source;
99
+ }
100
+
101
+ // Set the options for the class.
102
+ $this->options = $options;
103
+ }
104
+
105
+ /**
106
+ * To create instance
107
+ * */
108
+ public static function getInstance($config = array())
109
+ {
110
+ if (!self::$instance)
111
+ {
112
+ self::$instance = new self();
113
+ }
114
+
115
+ return self::$instance;
116
+ }
117
+
118
+ /**
119
+ * Magic method to get an input object
120
+ *
121
+ * @param mixed $name Name of the input object to retrieve.
122
+ *
123
+ * @return FInput The request input object
124
+ *
125
+ * @since 11.1
126
+ */
127
+ public function __get($name)
128
+ {
129
+ if (isset($this->inputs[$name]))
130
+ {
131
+ return $this->inputs[$name];
132
+ }
133
+
134
+ $className = 'FInput' . ucfirst($name);
135
+
136
+ if (class_exists($className))
137
+ {
138
+ $this->inputs[$name] = new $className(null, $this->options);
139
+
140
+ return $this->inputs[$name];
141
+ }
142
+
143
+ $superGlobal = '_' . strtoupper($name);
144
+
145
+ if (isset($GLOBALS[$superGlobal]))
146
+ {
147
+ $this->inputs[$name] = new FInput($GLOBALS[$superGlobal], $this->options);
148
+
149
+ return $this->inputs[$name];
150
+ }
151
+
152
+ // TODO throw an exception
153
+ }
154
+
155
+ /**
156
+ * Get the number of variables.
157
+ *
158
+ * @return integer The number of variables in the input.
159
+ *
160
+ * @since 12.2
161
+ * @see Countable::count()
162
+ */
163
+ public function count()
164
+ {
165
+ return count($this->data);
166
+ }
167
+
168
+ /**
169
+ * Gets a value from the input data.
170
+ *
171
+ * @param string $name Name of the value to get.
172
+ * @param mixed $default Default value to return if variable does not exist.
173
+ * @param string $filter Filter to apply to the value.
174
+ *
175
+ * @return mixed The filtered input value.
176
+ *
177
+ * @since 11.1
178
+ */
179
+ public function get($name, $default = null, $filter = 'cmd')
180
+ {
181
+ if (isset($this->data[$name]))
182
+ {
183
+ return $this->filter->clean($this->data[$name], $filter);
184
+ }
185
+
186
+ return $default;
187
+ }
188
+
189
+ /**
190
+ * Gets an array of values from the request.
191
+ *
192
+ * @param array $vars Associative array of keys and filter types to apply.
193
+ * If empty and datasource is null, all the input data will be returned
194
+ * but filtered using the filter given by the parameter defaultFilter in
195
+ * JFilterInput::clean.
196
+ * @param mixed $datasource Array to retrieve data from, or null.
197
+ * @param string $defaultFilter Default filter used in JFilterInput::clean if vars is empty and
198
+ * datasource is null. If 'unknown', the default case is used in
199
+ * JFilterInput::clean.
200
+ *
201
+ * @return mixed The filtered input data.
202
+ *
203
+ * @since 11.1
204
+ */
205
+ public function getArray(array $vars = array(), $datasource = null, $defaultFilter = 'unknown')
206
+ {
207
+ return $this->getArrayRecursive($vars, $datasource, $defaultFilter, false);
208
+ }
209
+
210
+ /**
211
+ * Gets an array of values from the request.
212
+ *
213
+ * @param array $vars Associative array of keys and filter types to apply.
214
+ * If empty and datasource is null, all the input data will be returned
215
+ * but filtered using the filter given by the parameter defaultFilter in
216
+ * JFilterInput::clean.
217
+ * @param mixed $datasource Array to retrieve data from, or null.
218
+ * @param string $defaultFilter Default filter used in JFilterInput::clean if vars is empty and
219
+ * datasource is null. If 'unknown', the default case is used in
220
+ * JFilterInput::clean.
221
+ * @param bool $recursion Flag to indicate a recursive function call.
222
+ *
223
+ * @return mixed The filtered input data.
224
+ *
225
+ * @since 3.4.2
226
+ */
227
+ protected function getArrayRecursive(array $vars = array(), $datasource = null, $defaultFilter = 'unknown', $recursion = false)
228
+ {
229
+ if (empty($vars) && is_null($datasource))
230
+ {
231
+ $vars = $this->data;
232
+ }
233
+ else
234
+ {
235
+ if (!$recursion)
236
+ {
237
+ $defaultFilter = null;
238
+ }
239
+ }
240
+
241
+ $results = array();
242
+
243
+ foreach ($vars as $k => $v)
244
+ {
245
+ if (is_array($v))
246
+ {
247
+ if (is_null($datasource))
248
+ {
249
+ $results[$k] = $this->getArrayRecursive($v, $this->get($k, null, 'array'), $defaultFilter, true);
250
+ }
251
+ else
252
+ {
253
+ $results[$k] = $this->getArrayRecursive($v, $datasource[$k], $defaultFilter, true);
254
+ }
255
+ }
256
+ else
257
+ {
258
+ $filter = isset($defaultFilter) ? $defaultFilter : $v;
259
+
260
+ if (is_null($datasource))
261
+ {
262
+ $results[$k] = $this->get($k, null, $filter);
263
+ }
264
+ elseif (isset($datasource[$k]))
265
+ {
266
+ $results[$k] = $this->filter->clean($datasource[$k], $filter);
267
+ }
268
+ else
269
+ {
270
+ $results[$k] = $this->filter->clean(null, $filter);
271
+ }
272
+ }
273
+ }
274
+
275
+ return $results;
276
+ }
277
+
278
+ /**
279
+ * Sets a value
280
+ *
281
+ * @param string $name Name of the value to set.
282
+ * @param mixed $value Value to assign to the input.
283
+ *
284
+ * @return void
285
+ *
286
+ * @since 11.1
287
+ */
288
+ public function set($name, $value)
289
+ {
290
+ $this->data[$name] = $value;
291
+ }
292
+
293
+ /**
294
+ * Define a value. The value will only be set if there's no value for the name or if it is null.
295
+ *
296
+ * @param string $name Name of the value to define.
297
+ * @param mixed $value Value to assign to the input.
298
+ *
299
+ * @return void
300
+ *
301
+ * @since 12.1
302
+ */
303
+ public function def($name, $value)
304
+ {
305
+ if (isset($this->data[$name]))
306
+ {
307
+ return;
308
+ }
309
+
310
+ $this->data[$name] = $value;
311
+ }
312
+
313
+ /**
314
+ * Magic method to get filtered input data.
315
+ *
316
+ * @param string $name Name of the filter type prefixed with 'get'.
317
+ * @param array $arguments [0] The name of the variable [1] The default value.
318
+ *
319
+ * @return mixed The filtered input value.
320
+ *
321
+ * @since 11.1
322
+ */
323
+ public function __call($name, $arguments)
324
+ {
325
+ if (substr($name, 0, 3) == 'get')
326
+ {
327
+ $filter = substr($name, 3);
328
+
329
+ $default = null;
330
+
331
+ if (isset($arguments[1]))
332
+ {
333
+ $default = $arguments[1];
334
+ }
335
+
336
+ return $this->get($arguments[0], $default, $filter);
337
+ }
338
+ }
339
+
340
+ /**
341
+ * Gets the request method.
342
+ *
343
+ * @return string The request method.
344
+ *
345
+ * @since 11.1
346
+ */
347
+ public function getMethod()
348
+ {
349
+ // Get method if exist
350
+ $method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : '';
351
+ $method = strtoupper($method);
352
+
353
+ return $method;
354
+ }
355
+
356
+ /**
357
+ * Method to serialize the input.
358
+ *
359
+ * @return string The serialized input.
360
+ *
361
+ * @since 12.1
362
+ */
363
+ public function serialize()
364
+ {
365
+ // Load all of the inputs.
366
+ $this->loadAllInputs();
367
+
368
+ // Remove $_ENV and $_SERVER from the inputs.
369
+ $inputs = $this->inputs;
370
+ unset($inputs['env']);
371
+ unset($inputs['server']);
372
+
373
+ // Serialize the options, data, and inputs.
374
+ return serialize(array($this->options, $this->data, $inputs));
375
+ }
376
+
377
+ /**
378
+ * Method to unserialize the input.
379
+ *
380
+ * @param string $input The serialized input.
381
+ *
382
+ * @return FInput The input object.
383
+ *
384
+ * @since 12.1
385
+ */
386
+ public function unserialize($input)
387
+ {
388
+ // Unserialize the options, data, and inputs.
389
+ list($this->options, $this->data, $this->inputs) = unserialize($input);
390
+
391
+ // Load the filter.
392
+ if (isset($this->options['filter']))
393
+ {
394
+ $this->filter = $this->options['filter'];
395
+ }
396
+ else
397
+ {
398
+ $this->filter = FFilterInput::getInstance();
399
+ }
400
+ }
401
+
402
+ /**
403
+ * Method to load all of the global inputs.
404
+ *
405
+ * @return void
406
+ *
407
+ * @since 12.1
408
+ */
409
+ protected function loadAllInputs()
410
+ {
411
+ static $loaded = false;
412
+
413
+ if (!$loaded)
414
+ {
415
+ // Load up all the globals.
416
+ foreach ($GLOBALS as $global => $data)
417
+ {
418
+ // Check if the global starts with an underscore.
419
+ if (strpos($global, '_') === 0)
420
+ {
421
+ // Convert global name to input name.
422
+ $global = strtolower($global);
423
+ $global = substr($global, 1);
424
+
425
+ // Get the input.
426
+ $this->$global;
427
+ }
428
+ }
429
+
430
+ $loaded = true;
431
+ }
432
+ }
433
+ }
helper/FlycartInput/InputFilter.php ADDED
@@ -0,0 +1,946 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace FlycartInput;
4
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
5
+
6
+ use FlycartInput\StringHelper;
7
+ require_once 'StringHelper.php';
8
+
9
+ /**
10
+ * InputFilter is a class for filtering input from any data source
11
+ *
12
+ */
13
+ class InputFilter
14
+ {
15
+ /**
16
+ * A container for InputFilter instances.
17
+ *
18
+ * @var InputFilter[]
19
+ * @since 1.0
20
+ * @deprecated 2.0
21
+ */
22
+ protected static $instances = array();
23
+
24
+ /**
25
+ * The array of permitted tags (white list).
26
+ *
27
+ * @var array
28
+ * @since 1.0
29
+ */
30
+ public $tagsArray;
31
+
32
+ /**
33
+ * The array of permitted tag attributes (white list).
34
+ *
35
+ * @var array
36
+ * @since 1.0
37
+ */
38
+ public $attrArray;
39
+
40
+ /**
41
+ * The method for sanitising tags: WhiteList method = 0 (default), BlackList method = 1
42
+ *
43
+ * @var integer
44
+ * @since 1.0
45
+ */
46
+ public $tagsMethod;
47
+
48
+ /**
49
+ * The method for sanitising attributes: WhiteList method = 0 (default), BlackList method = 1
50
+ *
51
+ * @var integer
52
+ * @since 1.0
53
+ */
54
+ public $attrMethod;
55
+
56
+ /**
57
+ * A flag for XSS checks. Only auto clean essentials = 0, Allow clean blacklisted tags/attr = 1
58
+ *
59
+ * @var integer
60
+ * @since 1.0
61
+ */
62
+ public $xssAuto;
63
+
64
+ /**
65
+ * The list of the default blacklisted tags.
66
+ *
67
+ * @var array
68
+ * @since 1.0
69
+ */
70
+ public $tagBlacklist = array(
71
+ 'applet',
72
+ 'body',
73
+ 'bgsound',
74
+ 'base',
75
+ 'basefont',
76
+ 'embed',
77
+ 'frame',
78
+ 'frameset',
79
+ 'head',
80
+ 'html',
81
+ 'id',
82
+ 'iframe',
83
+ 'ilayer',
84
+ 'layer',
85
+ 'link',
86
+ 'meta',
87
+ 'name',
88
+ 'object',
89
+ 'script',
90
+ 'style',
91
+ 'title',
92
+ 'xml',
93
+ );
94
+
95
+ /**
96
+ * The list of the default blacklisted tag attributes. All event handlers implicit.
97
+ *
98
+ * @var array
99
+ * @since 1.0
100
+ */
101
+ public $attrBlacklist = array(
102
+ 'action',
103
+ 'background',
104
+ 'codebase',
105
+ 'dynsrc',
106
+ 'lowsrc',
107
+ );
108
+
109
+ /**
110
+ * Constructor for InputFilter class.
111
+ *
112
+ * @param array $tagsArray List of user-defined tags
113
+ * @param array $attrArray List of user-defined attributes
114
+ * @param integer $tagsMethod WhiteList method = 0, BlackList method = 1
115
+ * @param integer $attrMethod WhiteList method = 0, BlackList method = 1
116
+ * @param integer $xssAuto Only auto clean essentials = 0, Allow clean blacklisted tags/attr = 1
117
+ *
118
+ * @since 1.0
119
+ */
120
+ public function __construct($tagsArray = array(), $attrArray = array(), $tagsMethod = 0, $attrMethod = 0, $xssAuto = 1)
121
+ {
122
+ // Make sure user defined arrays are in lowercase
123
+ $tagsArray = array_map('strtolower', (array) $tagsArray);
124
+ $attrArray = array_map('strtolower', (array) $attrArray);
125
+
126
+ // Assign member variables
127
+ $this->tagsArray = $tagsArray;
128
+ $this->attrArray = $attrArray;
129
+ $this->tagsMethod = $tagsMethod;
130
+ $this->attrMethod = $attrMethod;
131
+ $this->xssAuto = $xssAuto;
132
+ }
133
+
134
+ /**
135
+ * Method to be called by another php script. Processes for XSS and
136
+ * specified bad code.
137
+ *
138
+ * @param mixed $source Input string/array-of-string to be 'cleaned'
139
+ * @param string $type The return type for the variable:
140
+ * INT: An integer, or an array of integers,
141
+ * UINT: An unsigned integer, or an array of unsigned integers,
142
+ * FLOAT: A floating point number, or an array of floating point numbers,
143
+ * BOOLEAN: A boolean value,
144
+ * WORD: A string containing A-Z or underscores only (not case sensitive),
145
+ * ALNUM: A string containing A-Z or 0-9 only (not case sensitive),
146
+ * CMD: A string containing A-Z, 0-9, underscores, periods or hyphens (not case sensitive),
147
+ * BASE64: A string containing A-Z, 0-9, forward slashes, plus or equals (not case sensitive),
148
+ * STRING: A fully decoded and sanitised string (default),
149
+ * HTML: A sanitised string,
150
+ * ARRAY: An array,
151
+ * PATH: A sanitised file path, or an array of sanitised file paths,
152
+ * TRIM: A string trimmed from normal, non-breaking and multibyte spaces
153
+ * USERNAME: Do not use (use an application specific filter),
154
+ * RAW: The raw string is returned with no filtering,
155
+ * unknown: An unknown filter will act like STRING. If the input is an array it will return an
156
+ * array of fully decoded and sanitised strings.
157
+ *
158
+ * @return mixed 'Cleaned' version of input parameter
159
+ *
160
+ * @since 1.0
161
+ */
162
+ public function clean($source, $type = 'string')
163
+ {
164
+ // Handle the type constraint cases
165
+ switch (strtoupper($type))
166
+ {
167
+ case 'INT':
168
+ case 'INTEGER':
169
+ $pattern = '/[-+]?[0-9]+/';
170
+
171
+ if (is_array($source))
172
+ {
173
+ $result = array();
174
+
175
+ // Iterate through the array
176
+ foreach ($source as $eachString)
177
+ {
178
+ preg_match($pattern, (string) $eachString, $matches);
179
+ $result[] = isset($matches[0]) ? (int) $matches[0] : 0;
180
+ }
181
+ }
182
+ else
183
+ {
184
+ preg_match($pattern, (string) $source, $matches);
185
+ $result = isset($matches[0]) ? (int) $matches[0] : 0;
186
+ }
187
+
188
+ break;
189
+
190
+ case 'UINT':
191
+ $pattern = '/[-+]?[0-9]+/';
192
+
193
+ if (is_array($source))
194
+ {
195
+ $result = array();
196
+
197
+ // Iterate through the array
198
+ foreach ($source as $eachString)
199
+ {
200
+ preg_match($pattern, (string) $eachString, $matches);
201
+ $result[] = isset($matches[0]) ? abs((int) $matches[0]) : 0;
202
+ }
203
+ }
204
+ else
205
+ {
206
+ preg_match($pattern, (string) $source, $matches);
207
+ $result = isset($matches[0]) ? abs((int) $matches[0]) : 0;
208
+ }
209
+
210
+ break;
211
+
212
+ case 'FLOAT':
213
+ case 'DOUBLE':
214
+ $pattern = '/[-+]?[0-9]+(\.[0-9]+)?([eE][-+]?[0-9]+)?/';
215
+
216
+ if (is_array($source))
217
+ {
218
+ $result = array();
219
+
220
+ // Iterate through the array
221
+ foreach ($source as $eachString)
222
+ {
223
+ preg_match($pattern, (string) $eachString, $matches);
224
+ $result[] = isset($matches[0]) ? (float) $matches[0] : 0;
225
+ }
226
+ }
227
+ else
228
+ {
229
+ preg_match($pattern, (string) $source, $matches);
230
+ $result = isset($matches[0]) ? (float) $matches[0] : 0;
231
+ }
232
+
233
+ break;
234
+
235
+ case 'BOOL':
236
+ case 'BOOLEAN':
237
+ $result = (bool) $source;
238
+ break;
239
+
240
+ case 'WORD':
241
+ $pattern = '/[^A-Z_]/i';
242
+
243
+ if (is_array($source))
244
+ {
245
+ $result = array();
246
+
247
+ // Iterate through the array
248
+ foreach ($source as $eachString)
249
+ {
250
+ $result[] = (string) preg_replace($pattern, '', $eachString);
251
+ }
252
+ }
253
+ else
254
+ {
255
+ $result = (string) preg_replace($pattern, '', $source);
256
+ }
257
+
258
+ break;
259
+
260
+ case 'ALNUM':
261
+ $pattern = '/[^A-Z0-9]/i';
262
+
263
+ if (is_array($source))
264
+ {
265
+ $result = array();
266
+
267
+ // Iterate through the array
268
+ foreach ($source as $eachString)
269
+ {
270
+ $result[] = (string) preg_replace($pattern, '', $eachString);
271
+ }
272
+ }
273
+ else
274
+ {
275
+ $result = (string) preg_replace($pattern, '', $source);
276
+ }
277
+
278
+ break;
279
+
280
+ case 'CMD':
281
+ $pattern = '/[^A-Z0-9_\.-]/i';
282
+
283
+ if (is_array($source))
284
+ {
285
+ $result = array();
286
+
287
+ // Iterate through the array
288
+ foreach ($source as $eachString)
289
+ {
290
+ $cleaned = (string) preg_replace($pattern, '', $eachString);
291
+ $result[] = ltrim($cleaned, '.');
292
+ }
293
+ }
294
+ else
295
+ {
296
+ $result = (string) preg_replace($pattern, '', $source);
297
+ $result = ltrim($result, '.');
298
+ }
299
+
300
+ break;
301
+
302
+ case 'BASE64':
303
+ $pattern = '/[^A-Z0-9\/+=]/i';
304
+
305
+ if (is_array($source))
306
+ {
307
+ $result = array();
308
+
309
+ // Iterate through the array
310
+ foreach ($source as $eachString)
311
+ {
312
+ $result[] = (string) preg_replace($pattern, '', $eachString);
313
+ }
314
+ }
315
+ else
316
+ {
317
+ $result = (string) preg_replace($pattern, '', $source);
318
+ }
319
+
320
+ break;
321
+
322
+ case 'STRING':
323
+ if (is_array($source))
324
+ {
325
+ $result = array();
326
+
327
+ // Iterate through the array
328
+ foreach ($source as $eachString)
329
+ {
330
+ $result[] = (string) $this->remove($this->decode((string) $eachString));
331
+ }
332
+ }
333
+ else
334
+ {
335
+ $result = (string) $this->remove($this->decode((string) $source));
336
+ }
337
+
338
+ break;
339
+
340
+ case 'HTML':
341
+ if (is_array($source))
342
+ {
343
+ $result = array();
344
+
345
+ // Iterate through the array
346
+ foreach ($source as $eachString)
347
+ {
348
+ $result[] = (string) $this->remove((string) $eachString);
349
+ }
350
+ }
351
+ else
352
+ {
353
+ $result = (string) $this->remove((string) $source);
354
+ }
355
+
356
+ break;
357
+
358
+ case 'ARRAY':
359
+ $result = (array) $source;
360
+ break;
361
+
362
+ case 'PATH':
363
+ $pattern = '/^[A-Za-z0-9_\/-]+[A-Za-z0-9_\.-]*([\\\\\/][A-Za-z0-9_-]+[A-Za-z0-9_\.-]*)*$/';
364
+
365
+ if (is_array($source))
366
+ {
367
+ $result = array();
368
+
369
+ // Iterate through the array
370
+ foreach ($source as $eachString)
371
+ {
372
+ preg_match($pattern, (string) $eachString, $matches);
373
+ $result[] = isset($matches[0]) ? (string) $matches[0] : '';
374
+ }
375
+ }
376
+ else
377
+ {
378
+ preg_match($pattern, $source, $matches);
379
+ $result = isset($matches[0]) ? (string) $matches[0] : '';
380
+ }
381
+
382
+ break;
383
+
384
+ case 'TRIM':
385
+ if (is_array($source))
386
+ {
387
+ $result = array();
388
+
389
+ // Iterate through the array
390
+ foreach ($source as $eachString)
391
+ {
392
+ $cleaned = (string) trim($eachString);
393
+ $cleaned = StringHelper::trim($cleaned, chr(0xE3) . chr(0x80) . chr(0x80));
394
+ $result[] = StringHelper::trim($cleaned, chr(0xC2) . chr(0xA0));
395
+ }
396
+ }
397
+ else
398
+ {
399
+ $result = (string) trim($source);
400
+ $result = StringHelper::trim($result, chr(0xE3) . chr(0x80) . chr(0x80));
401
+ $result = StringHelper::trim($result, chr(0xC2) . chr(0xA0));
402
+ }
403
+
404
+ break;
405
+
406
+ case 'USERNAME':
407
+ $pattern = '/[\x00-\x1F\x7F<>"\'%&]/';
408
+
409
+ if (is_array($source))
410
+ {
411
+ $result = array();
412
+
413
+ // Iterate through the array
414
+ foreach ($source as $eachString)
415
+ {
416
+ $result[] = (string) preg_replace($pattern, '', $eachString);
417
+ }
418
+ }
419
+ else
420
+ {
421
+ $result = (string) preg_replace($pattern, '', $source);
422
+ }
423
+
424
+ break;
425
+
426
+ case 'RAW':
427
+ $result = $source;
428
+ break;
429
+
430
+ default:
431
+ // Are we dealing with an array?
432
+ if (is_array($source))
433
+ {
434
+ foreach ($source as $key => $value)
435
+ {
436
+ // Filter element for XSS and other 'bad' code etc.
437
+ if (is_string($value))
438
+ {
439
+ $source[$key] = $this->remove($this->decode($value));
440
+ }
441
+ }
442
+
443
+ $result = $source;
444
+ }
445
+ else
446
+ {
447
+ // Or a string?
448
+ if (is_string($source) && !empty($source))
449
+ {
450
+ // Filter source for XSS and other 'bad' code etc.
451
+ $result = $this->remove($this->decode($source));
452
+ }
453
+ else
454
+ {
455
+ // Not an array or string... return the passed parameter
456
+ $result = $source;
457
+ }
458
+ }
459
+
460
+ break;
461
+ }
462
+
463
+ return $result;
464
+ }
465
+
466
+ /**
467
+ * Function to determine if contents of an attribute are safe
468
+ *
469
+ * @param array $attrSubSet A 2 element array for attribute's name, value
470
+ *
471
+ * @return boolean True if bad code is detected
472
+ *
473
+ * @since 1.0
474
+ */
475
+ public static function checkAttribute($attrSubSet)
476
+ {
477
+ $attrSubSet[0] = strtolower($attrSubSet[0]);
478
+ $attrSubSet[1] = strtolower($attrSubSet[1]);
479
+
480
+ return (((strpos($attrSubSet[1], 'expression') !== false) && ($attrSubSet[0]) == 'style') || (strpos($attrSubSet[1], 'javascript:') !== false) ||
481
+ (strpos($attrSubSet[1], 'behaviour:') !== false) || (strpos($attrSubSet[1], 'vbscript:') !== false) ||
482
+ (strpos($attrSubSet[1], 'mocha:') !== false) || (strpos($attrSubSet[1], 'livescript:') !== false));
483
+ }
484
+
485
+ /**
486
+ * Internal method to iteratively remove all unwanted tags and attributes
487
+ *
488
+ * @param string $source Input string to be 'cleaned'
489
+ *
490
+ * @return string 'Cleaned' version of input parameter
491
+ *
492
+ * @since 1.0
493
+ */
494
+ protected function remove($source)
495
+ {
496
+ $loopCounter = 0;
497
+
498
+ // Iteration provides nested tag protection
499
+ while ($source != $this->cleanTags($source))
500
+ {
501
+ $source = $this->cleanTags($source);
502
+ $loopCounter++;
503
+ }
504
+
505
+ return $source;
506
+ }
507
+
508
+ /**
509
+ * Internal method to strip a string of certain tags
510
+ *
511
+ * @param string $source Input string to be 'cleaned'
512
+ *
513
+ * @return string 'Cleaned' version of input parameter
514
+ *
515
+ * @since 1.0
516
+ */
517
+ protected function cleanTags($source)
518
+ {
519
+ // First, pre-process this for illegal characters inside attribute values
520
+ $source = $this->escapeAttributeValues($source);
521
+
522
+ // In the beginning we don't really have a tag, so everything is postTag
523
+ $preTag = null;
524
+ $postTag = $source;
525
+ $currentSpace = false;
526
+
527
+ // Setting to null to deal with undefined variables
528
+ $attr = '';
529
+
530
+ // Is there a tag? If so it will certainly start with a '<'.
531
+ $tagOpen_start = strpos($source, '<');
532
+
533
+ while ($tagOpen_start !== false)
534
+ {
535
+ // Get some information about the tag we are processing
536
+ $preTag .= substr($postTag, 0, $tagOpen_start);
537
+ $postTag = substr($postTag, $tagOpen_start);
538
+ $fromTagOpen = substr($postTag, 1);
539
+ $tagOpen_end = strpos($fromTagOpen, '>');
540
+
541
+ // Check for mal-formed tag where we have a second '<' before the first '>'
542
+ $nextOpenTag = (strlen($postTag) > $tagOpen_start) ? strpos($postTag, '<', $tagOpen_start + 1) : false;
543
+
544
+ if (($nextOpenTag !== false) && ($nextOpenTag < $tagOpen_end))
545
+ {
546
+ // At this point we have a mal-formed tag -- remove the offending open
547
+ $postTag = substr($postTag, 0, $tagOpen_start) . substr($postTag, $tagOpen_start + 1);
548
+ $tagOpen_start = strpos($postTag, '<');
549
+ continue;
550
+ }
551
+
552
+ // Let's catch any non-terminated tags and skip over them
553
+ if ($tagOpen_end === false)
554
+ {
555
+ $postTag = substr($postTag, $tagOpen_start + 1);
556
+ $tagOpen_start = strpos($postTag, '<');
557
+ continue;
558
+ }
559
+
560
+ // Do we have a nested tag?
561
+ $tagOpen_nested = strpos($fromTagOpen, '<');
562
+
563
+ if (($tagOpen_nested !== false) && ($tagOpen_nested < $tagOpen_end))
564
+ {
565
+ $preTag .= substr($postTag, 0, ($tagOpen_nested + 1));
566
+ $postTag = substr($postTag, ($tagOpen_nested + 1));
567
+ $tagOpen_start = strpos($postTag, '<');
568
+ continue;
569
+ }
570
+
571
+ // Let's get some information about our tag and setup attribute pairs
572
+ $tagOpen_nested = (strpos($fromTagOpen, '<') + $tagOpen_start + 1);
573
+ $currentTag = substr($fromTagOpen, 0, $tagOpen_end);
574
+ $tagLength = strlen($currentTag);
575
+ $tagLeft = $currentTag;
576
+ $attrSet = array();
577
+ $currentSpace = strpos($tagLeft, ' ');
578
+
579
+ // Are we an open tag or a close tag?
580
+ if (substr($currentTag, 0, 1) == '/')
581
+ {
582
+ // Close Tag
583
+ $isCloseTag = true;
584
+ list ($tagName) = explode(' ', $currentTag);
585
+ $tagName = substr($tagName, 1);
586
+ }
587
+ else
588
+ {
589
+ // Open Tag
590
+ $isCloseTag = false;
591
+ list ($tagName) = explode(' ', $currentTag);
592
+ }
593
+
594
+ /*
595
+ * Exclude all "non-regular" tagnames
596
+ * OR no tagname
597
+ * OR remove if xssauto is on and tag is blacklisted
598
+ */
599
+ if ((!preg_match("/^[a-z][a-z0-9]*$/i", $tagName)) || (!$tagName) || ((in_array(strtolower($tagName), $this->tagBlacklist)) && ($this->xssAuto)))
600
+ {
601
+ $postTag = substr($postTag, ($tagLength + 2));
602
+ $tagOpen_start = strpos($postTag, '<');
603
+
604
+ // Strip tag
605
+ continue;
606
+ }
607
+
608
+ /*
609
+ * Time to grab any attributes from the tag... need this section in
610
+ * case attributes have spaces in the values.
611
+ */
612
+ while ($currentSpace !== false)
613
+ {
614
+ $attr = '';
615
+ $fromSpace = substr($tagLeft, ($currentSpace + 1));
616
+ $nextEqual = strpos($fromSpace, '=');
617
+ $nextSpace = strpos($fromSpace, ' ');
618
+ $openQuotes = strpos($fromSpace, '"');
619
+ $closeQuotes = strpos(substr($fromSpace, ($openQuotes + 1)), '"') + $openQuotes + 1;
620
+
621
+ $startAtt = '';
622
+ $startAttPosition = 0;
623
+
624
+ // Find position of equal and open quotes ignoring
625
+ if (preg_match('#\s*=\s*\"#', $fromSpace, $matches, PREG_OFFSET_CAPTURE))
626
+ {
627
+ $startAtt = $matches[0][0];
628
+ $startAttPosition = $matches[0][1];
629
+ $closeQuotes = strpos(substr($fromSpace, ($startAttPosition + strlen($startAtt))), '"') + $startAttPosition + strlen($startAtt);
630
+ $nextEqual = $startAttPosition + strpos($startAtt, '=');
631
+ $openQuotes = $startAttPosition + strpos($startAtt, '"');
632
+ $nextSpace = strpos(substr($fromSpace, $closeQuotes), ' ') + $closeQuotes;
633
+ }
634
+
635
+ // Do we have an attribute to process? [check for equal sign]
636
+ if ($fromSpace != '/' && (($nextEqual && $nextSpace && $nextSpace < $nextEqual) || !$nextEqual))
637
+ {
638
+ if (!$nextEqual)
639
+ {
640
+ $attribEnd = strpos($fromSpace, '/') - 1;
641
+ }
642
+ else
643
+ {
644
+ $attribEnd = $nextSpace - 1;
645
+ }
646
+
647
+ // If there is an ending, use this, if not, do not worry.
648
+ if ($attribEnd > 0)
649
+ {
650
+ $fromSpace = substr($fromSpace, $attribEnd + 1);
651
+ }
652
+ }
653
+
654
+ if (strpos($fromSpace, '=') !== false)
655
+ {
656
+ // If the attribute value is wrapped in quotes we need to grab the substring from
657
+ // the closing quote, otherwise grab until the next space.
658
+ if (($openQuotes !== false) && (strpos(substr($fromSpace, ($openQuotes + 1)), '"') !== false))
659
+ {
660
+ $attr = substr($fromSpace, 0, ($closeQuotes + 1));
661
+ }
662
+ else
663
+ {
664
+ $attr = substr($fromSpace, 0, $nextSpace);
665
+ }
666
+ }
667
+ else
668
+ // No more equal signs so add any extra text in the tag into the attribute array [eg. checked]
669
+ {
670
+ if ($fromSpace != '/')
671
+ {
672
+ $attr = substr($fromSpace, 0, $nextSpace);
673
+ }
674
+ }
675
+
676
+ // Last Attribute Pair
677
+ if (!$attr && $fromSpace != '/')
678
+ {
679
+ $attr = $fromSpace;
680
+ }
681
+
682
+ // Add attribute pair to the attribute array
683
+ $attrSet[] = $attr;
684
+
685
+ // Move search point and continue iteration
686
+ $tagLeft = substr($fromSpace, strlen($attr));
687
+ $currentSpace = strpos($tagLeft, ' ');
688
+ }
689
+
690
+ // Is our tag in the user input array?
691
+ $tagFound = in_array(strtolower($tagName), $this->tagsArray);
692
+
693
+ // If the tag is allowed let's append it to the output string.
694
+ if ((!$tagFound && $this->tagsMethod) || ($tagFound && !$this->tagsMethod))
695
+ {
696
+ // Reconstruct tag with allowed attributes
697
+ if (!$isCloseTag)
698
+ {
699
+ // Open or single tag
700
+ $attrSet = $this->cleanAttributes($attrSet);
701
+ $preTag .= '<' . $tagName;
702
+
703
+ for ($i = 0, $count = count($attrSet); $i < $count; $i++)
704
+ {
705
+ $preTag .= ' ' . $attrSet[$i];
706
+ }
707
+
708
+ // Reformat single tags to XHTML
709
+ if (strpos($fromTagOpen, '</' . $tagName))
710
+ {
711
+ $preTag .= '>';
712
+ }
713
+ else
714
+ {
715
+ $preTag .= ' />';
716
+ }
717
+ }
718
+ else
719
+ // Closing tag
720
+ {
721
+ $preTag .= '</' . $tagName . '>';
722
+ }
723
+ }
724
+
725
+ // Find next tag's start and continue iteration
726
+ $postTag = substr($postTag, ($tagLength + 2));
727
+ $tagOpen_start = strpos($postTag, '<');
728
+ }
729
+
730
+ // Append any code after the end of tags and return
731
+ if ($postTag != '<')
732
+ {
733
+ $preTag .= $postTag;
734
+ }
735
+
736
+ return $preTag;
737
+ }
738
+
739
+ /**
740
+ * Internal method to strip a tag of certain attributes
741
+ *
742
+ * @param array $attrSet Array of attribute pairs to filter
743
+ *
744
+ * @return array Filtered array of attribute pairs
745
+ *
746
+ * @since 1.0
747
+ */
748
+ protected function cleanAttributes($attrSet)
749
+ {
750
+ $newSet = array();
751
+
752
+ $count = count($attrSet);
753
+
754
+ // Iterate through attribute pairs
755
+ for ($i = 0; $i < $count; $i++)
756
+ {
757
+ // Skip blank spaces
758
+ if (!$attrSet[$i])
759
+ {
760
+ continue;
761
+ }
762
+
763
+ // Split into name/value pairs
764
+ $attrSubSet = explode('=', trim($attrSet[$i]), 2);
765
+
766
+ // Take the last attribute in case there is an attribute with no value
767
+ $attrSubSet_0 = explode(' ', trim($attrSubSet[0]));
768
+ $attrSubSet[0] = array_pop($attrSubSet_0);
769
+
770
+ // Remove all "non-regular" attribute names
771
+ // AND blacklisted attributes
772
+ if ((!preg_match('/[a-z]*$/i', $attrSubSet[0]))
773
+ || (($this->xssAuto) && ((in_array(strtolower($attrSubSet[0]), $this->attrBlacklist))
774
+ || (substr($attrSubSet[0], 0, 2) == 'on'))))
775
+ {
776
+ continue;
777
+ }
778
+
779
+ // XSS attribute value filtering
780
+ if (isset($attrSubSet[1]))
781
+ {
782
+ // Trim leading and trailing spaces
783
+ $attrSubSet[1] = trim($attrSubSet[1]);
784
+
785
+ // Strips unicode, hex, etc
786
+ $attrSubSet[1] = str_replace('&#', '', $attrSubSet[1]);
787
+
788
+ // Strip normal newline within attr value
789
+ $attrSubSet[1] = preg_replace('/[\n\r]/', '', $attrSubSet[1]);
790
+
791
+ // Strip double quotes
792
+ $attrSubSet[1] = str_replace('"', '', $attrSubSet[1]);
793
+
794
+ // Convert single quotes from either side to doubles (Single quotes shouldn't be used to pad attr values)
795
+ if ((substr($attrSubSet[1], 0, 1) == "'") && (substr($attrSubSet[1], (strlen($attrSubSet[1]) - 1), 1) == "'"))
796
+ {
797
+ $attrSubSet[1] = substr($attrSubSet[1], 1, (strlen($attrSubSet[1]) - 2));
798
+ }
799
+
800
+ // Strip slashes
801
+ $attrSubSet[1] = stripslashes($attrSubSet[1]);
802
+ }
803
+ else
804
+ {
805
+ continue;
806
+ }
807
+
808
+ // Autostrip script tags
809
+ if (self::checkAttribute($attrSubSet))
810
+ {
811
+ continue;
812
+ }
813
+
814
+ // Is our attribute in the user input array?
815
+ $attrFound = in_array(strtolower($attrSubSet[0]), $this->attrArray);
816
+
817
+ // If the tag is allowed lets keep it
818
+ if ((!$attrFound && $this->attrMethod) || ($attrFound && !$this->attrMethod))
819
+ {
820
+ // Does the attribute have a value?
821
+ if (empty($attrSubSet[1]) === false)
822
+ {
823
+ $newSet[] = $attrSubSet[0] . '="' . $attrSubSet[1] . '"';
824
+ }
825
+ elseif ($attrSubSet[1] === "0")
826
+ {
827
+ // Special Case
828
+ // Is the value 0?
829
+ $newSet[] = $attrSubSet[0] . '="0"';
830
+ }
831
+ else
832
+ {
833
+ // Leave empty attributes alone
834
+ $newSet[] = $attrSubSet[0] . '=""';
835
+ }
836
+ }
837
+ }
838
+
839
+ return $newSet;
840
+ }
841
+
842
+ /**
843
+ * Try to convert to plaintext
844
+ *
845
+ * @param string $source The source string.
846
+ *
847
+ * @return string Plaintext string
848
+ *
849
+ * @since 1.0
850
+ * @deprecated This method will be removed once support for PHP 5.3 is discontinued.
851
+ */
852
+ protected function decode($source)
853
+ {
854
+ return html_entity_decode($source, ENT_QUOTES, 'UTF-8');
855
+ }
856
+
857
+ /**
858
+ * Escape < > and " inside attribute values
859
+ *
860
+ * @param string $source The source string.
861
+ *
862
+ * @return string Filtered string
863
+ *
864
+ * @since 1.0
865
+ */
866
+ protected function escapeAttributeValues($source)
867
+ {
868
+ $alreadyFiltered = '';
869
+ $remainder = $source;
870
+ $badChars = array('<', '"', '>');
871
+ $escapedChars = array('&lt;', '&quot;', '&gt;');
872
+
873
+ // Process each portion based on presence of =" and "<space>, "/>, or ">
874
+ // See if there are any more attributes to process
875
+ while (preg_match('#<[^>]*?=\s*?(\"|\')#s', $remainder, $matches, PREG_OFFSET_CAPTURE))
876
+ {
877
+ // Get the portion before the attribute value
878
+ $quotePosition = $matches[0][1];
879
+ $nextBefore = $quotePosition + strlen($matches[0][0]);
880
+
881
+ // Figure out if we have a single or double quote and look for the matching closing quote
882
+ // Closing quote should be "/>, ">, "<space>, or " at the end of the string
883
+ $quote = substr($matches[0][0], -1);
884
+ $pregMatch = ($quote == '"') ? '#(\"\s*/\s*>|\"\s*>|\"\s+|\"$)#' : "#(\'\s*/\s*>|\'\s*>|\'\s+|\'$)#";
885
+
886
+ // Get the portion after attribute value
887
+ if (preg_match($pregMatch, substr($remainder, $nextBefore), $matches, PREG_OFFSET_CAPTURE))
888
+ {
889
+ // We have a closing quote
890
+ $nextAfter = $nextBefore + $matches[0][1];
891
+ }
892
+ else
893
+ {
894
+ // No closing quote
895
+ $nextAfter = strlen($remainder);
896
+ }
897
+
898
+ // Get the actual attribute value
899
+ $attributeValue = substr($remainder, $nextBefore, $nextAfter - $nextBefore);
900
+
901
+ // Escape bad chars
902
+ $attributeValue = str_replace($badChars, $escapedChars, $attributeValue);
903
+ $attributeValue = $this->stripCssExpressions($attributeValue);
904
+ $alreadyFiltered .= substr($remainder, 0, $nextBefore) . $attributeValue . $quote;
905
+ $remainder = substr($remainder, $nextAfter + 1);
906
+ }
907
+
908
+ // At this point, we just have to return the $alreadyFiltered and the $remainder
909
+ return $alreadyFiltered . $remainder;
910
+ }
911
+
912
+ /**
913
+ * Remove CSS Expressions in the form of <property>:expression(...)
914
+ *
915
+ * @param string $source The source string.
916
+ *
917
+ * @return string Filtered string
918
+ *
919
+ * @since 1.0
920
+ */
921
+ protected function stripCssExpressions($source)
922
+ {
923
+ // Strip any comments out (in the form of /*...*/)
924
+ $test = preg_replace('#\/\*.*\*\/#U', '', $source);
925
+
926
+ // Test for :expression
927
+ if (!stripos($test, ':expression'))
928
+ {
929
+ // Not found, so we are done
930
+ $return = $source;
931
+ }
932
+ else
933
+ {
934
+ // At this point, we have stripped out the comments and have found :expression
935
+ // Test stripped string for :expression followed by a '('
936
+ if (preg_match_all('#:expression\s*\(#', $test, $matches))
937
+ {
938
+ // If found, remove :expression
939
+ $test = str_ireplace(':expression', '', $test);
940
+ $return = $test;
941
+ }
942
+ }
943
+
944
+ return $return;
945
+ }
946
+ }
helper/FlycartInput/StringHelper.php ADDED
@@ -0,0 +1,834 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace FlycartInput;
3
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
4
+
5
+ // PHP mbstring and iconv local configuration
6
+ if (version_compare(PHP_VERSION, '5.6', '>='))
7
+ {
8
+ @ini_set('default_charset', 'UTF-8');
9
+ }
10
+ else
11
+ {
12
+ // Check if mbstring extension is loaded and attempt to load it if not present except for windows
13
+ if (extension_loaded('mbstring'))
14
+ {
15
+ @ini_set('mbstring.internal_encoding', 'UTF-8');
16
+ @ini_set('mbstring.http_input', 'UTF-8');
17
+ @ini_set('mbstring.http_output', 'UTF-8');
18
+ }
19
+
20
+ // Same for iconv
21
+ if (function_exists('iconv'))
22
+ {
23
+ iconv_set_encoding('internal_encoding', 'UTF-8');
24
+ iconv_set_encoding('input_encoding', 'UTF-8');
25
+ iconv_set_encoding('output_encoding', 'UTF-8');
26
+ }
27
+ }
28
+
29
+ /**
30
+ * String handling class for UTF-8 data wrapping the phputf8 library. All functions assume the validity of UTF-8 strings.
31
+ *
32
+ * @since 1.3.0
33
+ */
34
+ abstract class StringHelper
35
+ {
36
+ /**
37
+ * Increment styles.
38
+ *
39
+ * @var array
40
+ * @since 1.3.0
41
+ */
42
+ protected static $incrementStyles = array(
43
+ 'dash' => array(
44
+ '#-(\d+)$#',
45
+ '-%d'
46
+ ),
47
+ 'default' => array(
48
+ array('#\((\d+)\)$#', '#\(\d+\)$#'),
49
+ array(' (%d)', '(%d)'),
50
+ ),
51
+ );
52
+
53
+ /**
54
+ * Increments a trailing number in a string.
55
+ *
56
+ * Used to easily create distinct labels when copying objects. The method has the following styles:
57
+ *
58
+ * default: "Label" becomes "Label (2)"
59
+ * dash: "Label" becomes "Label-2"
60
+ *
61
+ * @param string $string The source string.
62
+ * @param string $style The the style (default|dash).
63
+ * @param integer $n If supplied, this number is used for the copy, otherwise it is the 'next' number.
64
+ *
65
+ * @return string The incremented string.
66
+ *
67
+ * @since 1.3.0
68
+ */
69
+ public static function increment($string, $style = 'default', $n = 0)
70
+ {
71
+ $styleSpec = isset(static::$incrementStyles[$style]) ? static::$incrementStyles[$style] : static::$incrementStyles['default'];
72
+
73
+ // Regular expression search and replace patterns.
74
+ if (is_array($styleSpec[0]))
75
+ {
76
+ $rxSearch = $styleSpec[0][0];
77
+ $rxReplace = $styleSpec[0][1];
78
+ }
79
+ else
80
+ {
81
+ $rxSearch = $rxReplace = $styleSpec[0];
82
+ }
83
+
84
+ // New and old (existing) sprintf formats.
85
+ if (is_array($styleSpec[1]))
86
+ {
87
+ $newFormat = $styleSpec[1][0];
88
+ $oldFormat = $styleSpec[1][1];
89
+ }
90
+ else
91
+ {
92
+ $newFormat = $oldFormat = $styleSpec[1];
93
+ }
94
+
95
+ // Check if we are incrementing an existing pattern, or appending a new one.
96
+ if (preg_match($rxSearch, $string, $matches))
97
+ {
98
+ $n = empty($n) ? ($matches[1] + 1) : $n;
99
+ $string = preg_replace($rxReplace, sprintf($oldFormat, $n), $string);
100
+ }
101
+ else
102
+ {
103
+ $n = empty($n) ? 2 : $n;
104
+ $string .= sprintf($newFormat, $n);
105
+ }
106
+
107
+ return $string;
108
+ }
109
+
110
+ /**
111
+ * Tests whether a string contains only 7bit ASCII bytes.
112
+ *
113
+ * You might use this to conditionally check whether a string needs handling as UTF-8 or not, potentially offering performance
114
+ * benefits by using the native PHP equivalent if it's just ASCII e.g.;
115
+ *
116
+ * <code>
117
+ * if (StringHelper::is_ascii($someString))
118
+ * {
119
+ * // It's just ASCII - use the native PHP version
120
+ * $someString = strtolower($someString);
121
+ * }
122
+ * else
123
+ * {
124
+ * $someString = StringHelper::strtolower($someString);
125
+ * }
126
+ * </code>
127
+ *
128
+ * @param string $str The string to test.
129
+ *
130
+ * @return boolean True if the string is all ASCII
131
+ *
132
+ * @since 1.3.0
133
+ */
134
+ public static function is_ascii($str)
135
+ {
136
+ return utf8_is_ascii($str);
137
+ }
138
+
139
+ /**
140
+ * UTF-8 aware alternative to ord()
141
+ *
142
+ * Returns the unicode ordinal for a character.
143
+ *
144
+ * @param string $chr UTF-8 encoded character
145
+ *
146
+ * @return integer Unicode ordinal for the character
147
+ *
148
+ * @see http://www.php.net/ord
149
+ * @since 1.4.0
150
+ */
151
+ public static function ord($chr)
152
+ {
153
+ return utf8_ord($chr);
154
+ }
155
+
156
+ /**
157
+ * UTF-8 aware alternative to strpos()
158
+ *
159
+ * Find position of first occurrence of a string.
160
+ *
161
+ * @param string $str String being examined
162
+ * @param string $search String being searched for
163
+ * @param integer $offset Optional, specifies the position from which the search should be performed
164
+ *
165
+ * @return mixed Number of characters before the first match or FALSE on failure
166
+ *
167
+ * @see http://www.php.net/strpos
168
+ * @since 1.3.0
169
+ */
170
+ public static function strpos($str, $search, $offset = false)
171
+ {
172
+ if ($offset === false)
173
+ {
174
+ return utf8_strpos($str, $search);
175
+ }
176
+
177
+ return utf8_strpos($str, $search, $offset);
178
+ }
179
+
180
+ /**
181
+ * UTF-8 aware alternative to strrpos()
182
+ *
183
+ * Finds position of last occurrence of a string.
184
+ *
185
+ * @param string $str String being examined.
186
+ * @param string $search String being searched for.
187
+ * @param integer $offset Offset from the left of the string.
188
+ *
189
+ * @return mixed Number of characters before the last match or false on failure
190
+ *
191
+ * @see http://www.php.net/strrpos
192
+ * @since 1.3.0
193
+ */
194
+ public static function strrpos($str, $search, $offset = 0)
195
+ {
196
+ return utf8_strrpos($str, $search, $offset);
197
+ }
198
+
199
+ /**
200
+ * UTF-8 aware alternative to substr()
201
+ *
202
+ * Return part of a string given character offset (and optionally length).
203
+ *
204
+ * @param string $str String being processed
205
+ * @param integer $offset Number of UTF-8 characters offset (from left)
206
+ * @param integer $length Optional length in UTF-8 characters from offset
207
+ *
208
+ * @return mixed string or FALSE if failure
209
+ *
210
+ * @see http://www.php.net/substr
211
+ * @since 1.3.0
212
+ */
213
+ public static function substr($str, $offset, $length = false)
214
+ {
215
+ if ($length === false)
216
+ {
217
+ return utf8_substr($str, $offset);
218
+ }
219
+
220
+ return utf8_substr($str, $offset, $length);
221
+ }
222
+
223
+ /**
224
+ * UTF-8 aware alternative to strtolower()
225
+ *
226
+ * Make a string lowercase
227
+ *
228
+ * Note: The concept of a characters "case" only exists is some alphabets such as Latin, Greek, Cyrillic, Armenian and archaic Georgian - it does
229
+ * not exist in the Chinese alphabet, for example. See Unicode Standard Annex #21: Case Mappings
230
+ *
231
+ * @param string $str String being processed
232
+ *
233
+ * @return mixed Either string in lowercase or FALSE is UTF-8 invalid
234
+ *
235
+ * @see http://www.php.net/strtolower
236
+ * @since 1.3.0
237
+ */
238
+ public static function strtolower($str)
239
+ {
240
+ return utf8_strtolower($str);
241
+ }
242
+
243
+ /**
244
+ * UTF-8 aware alternative to strtoupper()
245
+ *
246
+ * Make a string uppercase
247
+ *
248
+ * Note: The concept of a characters "case" only exists is some alphabets such as Latin, Greek, Cyrillic, Armenian and archaic Georgian - it does
249
+ * not exist in the Chinese alphabet, for example. See Unicode Standard Annex #21: Case Mappings
250
+ *
251
+ * @param string $str String being processed
252
+ *
253
+ * @return mixed Either string in uppercase or FALSE is UTF-8 invalid
254
+ *
255
+ * @see http://www.php.net/strtoupper
256
+ * @since 1.3.0
257
+ */
258
+ public static function strtoupper($str)
259
+ {
260
+ return utf8_strtoupper($str);
261
+ }
262
+
263
+ /**
264
+ * UTF-8 aware alternative to strlen()
265
+ *
266
+ * Returns the number of characters in the string (NOT THE NUMBER OF BYTES).
267
+ *
268
+ * @param string $str UTF-8 string.
269
+ *
270
+ * @return integer Number of UTF-8 characters in string.
271
+ *
272
+ * @see http://www.php.net/strlen
273
+ * @since 1.3.0
274
+ */
275
+ public static function strlen($str)
276
+ {
277
+ return utf8_strlen($str);
278
+ }
279
+
280
+ /**
281
+ * UTF-8 aware alternative to str_ireplace()
282
+ *
283
+ * Case-insensitive version of str_replace()
284
+ *
285
+ * @param string $search String to search
286
+ * @param string $replace Existing string to replace
287
+ * @param string $str New string to replace with
288
+ * @param integer $count Optional count value to be passed by referene
289
+ *
290
+ * @return string UTF-8 String
291
+ *
292
+ * @see http://www.php.net/str_ireplace
293
+ * @since 1.3.0
294
+ */
295
+ public static function str_ireplace($search, $replace, $str, $count = null)
296
+ {
297
+ if ($count === false)
298
+ {
299
+ return utf8_ireplace($search, $replace, $str);
300
+ }
301
+
302
+ return utf8_ireplace($search, $replace, $str, $count);
303
+ }
304
+
305
+ /**
306
+ * UTF-8 aware alternative to str_pad()
307
+ *
308
+ * Pad a string to a certain length with another string.
309
+ * $padStr may contain multi-byte characters.
310
+ *
311
+ * @param string $input The input string.
312
+ * @param integer $length If the value is negative, less than, or equal to the length of the input string, no padding takes place.
313
+ * @param string $padStr The string may be truncated if the number of padding characters can't be evenly divided by the string's length.
314
+ * @param integer $type The type of padding to apply
315
+ *
316
+ * @return string
317
+ *
318
+ * @see http://www.php.net/str_pad
319
+ * @since 1.4.0
320
+ */
321
+ public static function str_pad($input, $length, $padStr = ' ', $type = STR_PAD_RIGHT)
322
+ {
323
+ return utf8_str_pad($input, $length, $padStr, $type);
324
+ }
325
+
326
+ /**
327
+ * UTF-8 aware alternative to str_split()
328
+ *
329
+ * Convert a string to an array.
330
+ *
331
+ * @param string $str UTF-8 encoded string to process
332
+ * @param integer $split_len Number to characters to split string by
333
+ *
334
+ * @return array
335
+ *
336
+ * @see http://www.php.net/str_split
337
+ * @since 1.3.0
338
+ */
339
+ public static function str_split($str, $split_len = 1)
340
+ {
341
+ return utf8_str_split($str, $split_len);
342
+ }
343
+
344
+ /**
345
+ * UTF-8/LOCALE aware alternative to strcasecmp()
346
+ *
347
+ * A case insensitive string comparison.
348
+ *
349
+ * @param string $str1 string 1 to compare
350
+ * @param string $str2 string 2 to compare
351
+ * @param mixed $locale The locale used by strcoll or false to use classical comparison
352
+ *
353
+ * @return integer < 0 if str1 is less than str2; > 0 if str1 is greater than str2, and 0 if they are equal.
354
+ *
355
+ * @see http://www.php.net/strcasecmp
356
+ * @see http://www.php.net/strcoll
357
+ * @see http://www.php.net/setlocale
358
+ * @since 1.3.0
359
+ */
360
+ public static function strcasecmp($str1, $str2, $locale = false)
361
+ {
362
+ if ($locale)
363
+ {
364
+ // Get current locale
365
+ $locale0 = setlocale(LC_COLLATE, 0);
366
+
367
+ if (!$locale = setlocale(LC_COLLATE, $locale))
368
+ {
369
+ $locale = $locale0;
370
+ }
371
+
372
+ // See if we have successfully set locale to UTF-8
373
+ if (!stristr($locale, 'UTF-8') && stristr($locale, '_') && preg_match('~\.(\d+)$~', $locale, $m))
374
+ {
375
+ $encoding = 'CP' . $m[1];
376
+ }
377
+ elseif (stristr($locale, 'UTF-8') || stristr($locale, 'utf8'))
378
+ {
379
+ $encoding = 'UTF-8';
380
+ }
381
+ else
382
+ {
383
+ $encoding = 'nonrecodable';
384
+ }
385
+
386
+ // If we successfully set encoding it to utf-8 or encoding is sth weird don't recode
387
+ if ($encoding == 'UTF-8' || $encoding == 'nonrecodable')
388
+ {
389
+ return strcoll(utf8_strtolower($str1), utf8_strtolower($str2));
390
+ }
391
+
392
+ return strcoll(
393
+ static::transcode(utf8_strtolower($str1), 'UTF-8', $encoding),
394
+ static::transcode(utf8_strtolower($str2), 'UTF-8', $encoding)
395
+ );
396
+ }
397
+
398
+ return utf8_strcasecmp($str1, $str2);
399
+ }
400
+
401
+ /**
402
+ * UTF-8/LOCALE aware alternative to strcmp()
403
+ *
404
+ * A case sensitive string comparison.
405
+ *
406
+ * @param string $str1 string 1 to compare
407
+ * @param string $str2 string 2 to compare
408
+ * @param mixed $locale The locale used by strcoll or false to use classical comparison
409
+ *
410
+ * @return integer < 0 if str1 is less than str2; > 0 if str1 is greater than str2, and 0 if they are equal.
411
+ *
412
+ * @see http://www.php.net/strcmp
413
+ * @see http://www.php.net/strcoll
414
+ * @see http://www.php.net/setlocale
415
+ * @since 1.3.0
416
+ */
417
+ public static function strcmp($str1, $str2, $locale = false)
418
+ {
419
+ if ($locale)
420
+ {
421
+ // Get current locale
422
+ $locale0 = setlocale(LC_COLLATE, 0);
423
+
424
+ if (!$locale = setlocale(LC_COLLATE, $locale))
425
+ {
426
+ $locale = $locale0;
427
+ }
428
+
429
+ // See if we have successfully set locale to UTF-8
430
+ if (!stristr($locale, 'UTF-8') && stristr($locale, '_') && preg_match('~\.(\d+)$~', $locale, $m))
431
+ {
432
+ $encoding = 'CP' . $m[1];
433
+ }
434
+ elseif (stristr($locale, 'UTF-8') || stristr($locale, 'utf8'))
435
+ {
436
+ $encoding = 'UTF-8';
437
+ }
438
+ else
439
+ {
440
+ $encoding = 'nonrecodable';
441
+ }
442
+
443
+ // If we successfully set encoding it to utf-8 or encoding is sth weird don't recode
444
+ if ($encoding == 'UTF-8' || $encoding == 'nonrecodable')
445
+ {
446
+ return strcoll($str1, $str2);
447
+ }
448
+
449
+ return strcoll(static::transcode($str1, 'UTF-8', $encoding), static::transcode($str2, 'UTF-8', $encoding));
450
+ }
451
+
452
+ return strcmp($str1, $str2);
453
+ }
454
+
455
+ /**
456
+ * UTF-8 aware alternative to strcspn()
457
+ *
458
+ * Find length of initial segment not matching mask.
459
+ *
460
+ * @param string $str The string to process
461
+ * @param string $mask The mask
462
+ * @param integer $start Optional starting character position (in characters)
463
+ * @param integer $length Optional length
464
+ *
465
+ * @return integer The length of the initial segment of str1 which does not contain any of the characters in str2
466
+ *
467
+ * @see http://www.php.net/strcspn
468
+ * @since 1.3.0
469
+ */
470
+ public static function strcspn($str, $mask, $start = null, $length = null)
471
+ {
472
+ if ($start === false && $length === false)
473
+ {
474
+ return utf8_strcspn($str, $mask);
475
+ }
476
+
477
+ if ($length === false)
478
+ {
479
+ return utf8_strcspn($str, $mask, $start);
480
+ }
481
+
482
+ return utf8_strcspn($str, $mask, $start, $length);
483
+ }
484
+
485
+ /**
486
+ * UTF-8 aware alternative to stristr()
487
+ *
488
+ * Returns all of haystack from the first occurrence of needle to the end. Needle and haystack are examined in a case-insensitive manner to
489
+ * find the first occurrence of a string using case insensitive comparison.
490
+ *
491
+ * @param string $str The haystack
492
+ * @param string $search The needle
493
+ *
494
+ * @return string the sub string
495
+ *
496
+ * @see http://www.php.net/stristr
497
+ * @since 1.3.0
498
+ */
499
+ public static function stristr($str, $search)
500
+ {
501
+ return utf8_stristr($str, $search);
502
+ }
503
+
504
+ /**
505
+ * UTF-8 aware alternative to strrev()
506
+ *
507
+ * Reverse a string.
508
+ *
509
+ * @param string $str String to be reversed
510
+ *
511
+ * @return string The string in reverse character order
512
+ *
513
+ * @see http://www.php.net/strrev
514
+ * @since 1.3.0
515
+ */
516
+ public static function strrev($str)
517
+ {
518
+ return utf8_strrev($str);
519
+ }
520
+
521
+ /**
522
+ * UTF-8 aware alternative to strspn()
523
+ *
524
+ * Find length of initial segment matching mask.
525
+ *
526
+ * @param string $str The haystack
527
+ * @param string $mask The mask
528
+ * @param integer $start Start optional
529
+ * @param integer $length Length optional
530
+ *
531
+ * @return integer
532
+ *
533
+ * @see http://www.php.net/strspn
534
+ * @since 1.3.0
535
+ */
536
+ public static function strspn($str, $mask, $start = null, $length = null)
537
+ {
538
+ if ($start === null && $length === null)
539
+ {
540
+ return utf8_strspn($str, $mask);
541
+ }
542
+
543
+ if ($length === null)
544
+ {
545
+ return utf8_strspn($str, $mask, $start);
546
+ }
547
+
548
+ return utf8_strspn($str, $mask, $start, $length);
549
+ }
550
+
551
+ /**
552
+ * UTF-8 aware alternative to substr_replace()
553
+ *
554
+ * Replace text within a portion of a string.
555
+ *
556
+ * @param string $str The haystack
557
+ * @param string $repl The replacement string
558
+ * @param integer $start Start
559
+ * @param integer $length Length (optional)
560
+ *
561
+ * @return string
562
+ *
563
+ * @see http://www.php.net/substr_replace
564
+ * @since 1.3.0
565
+ */
566
+ public static function substr_replace($str, $repl, $start, $length = null)
567
+ {
568
+ // Loaded by library loader
569
+ if ($length === false)
570
+ {
571
+ return utf8_substr_replace($str, $repl, $start);
572
+ }
573
+
574
+ return utf8_substr_replace($str, $repl, $start, $length);
575
+ }
576
+
577
+ /**
578
+ * UTF-8 aware replacement for ltrim()
579
+ *
580
+ * Strip whitespace (or other characters) from the beginning of a string. You only need to use this if you are supplying the charlist
581
+ * optional arg and it contains UTF-8 characters. Otherwise ltrim will work normally on a UTF-8 string.
582
+ *
583
+ * @param string $str The string to be trimmed
584
+ * @param string $charlist The optional charlist of additional characters to trim
585
+ *
586
+ * @return string The trimmed string
587
+ *
588
+ * @see http://www.php.net/ltrim
589
+ * @since 1.3.0
590
+ */
591
+ public static function ltrim($str, $charlist = false)
592
+ {
593
+ if (empty($charlist) && $charlist !== false)
594
+ {
595
+ return $str;
596
+ }
597
+
598
+ if ($charlist === false)
599
+ {
600
+ return utf8_ltrim($str);
601
+ }
602
+
603
+ return utf8_ltrim($str, $charlist);
604
+ }
605
+
606
+ /**
607
+ * UTF-8 aware replacement for rtrim()
608
+ *
609
+ * Strip whitespace (or other characters) from the end of a string. You only need to use this if you are supplying the charlist
610
+ * optional arg and it contains UTF-8 characters. Otherwise rtrim will work normally on a UTF-8 string.
611
+ *
612
+ * @param string $str The string to be trimmed
613
+ * @param string $charlist The optional charlist of additional characters to trim
614
+ *
615
+ * @return string The trimmed string
616
+ *
617
+ * @see http://www.php.net/rtrim
618
+ * @since 1.3.0
619
+ */
620
+ public static function rtrim($str, $charlist = false)
621
+ {
622
+ if (empty($charlist) && $charlist !== false)
623
+ {
624
+ return $str;
625
+ }
626
+
627
+ if ($charlist === false)
628
+ {
629
+ return utf8_rtrim($str);
630
+ }
631
+
632
+ return utf8_rtrim($str, $charlist);
633
+ }
634
+
635
+ /**
636
+ * UTF-8 aware replacement for trim()
637
+ *
638
+ * Strip whitespace (or other characters) from the beginning and end of a string. You only need to use this if you are supplying the charlist
639
+ * optional arg and it contains UTF-8 characters. Otherwise trim will work normally on a UTF-8 string
640
+ *
641
+ * @param string $str The string to be trimmed
642
+ * @param string $charlist The optional charlist of additional characters to trim
643
+ *
644
+ * @return string The trimmed string
645
+ *
646
+ * @see http://www.php.net/trim
647
+ * @since 1.3.0
648
+ */
649
+ public static function trim($str, $charlist = false)
650
+ {
651
+ if (empty($charlist) && $charlist !== false)
652
+ {
653
+ return $str;
654
+ }
655
+
656
+ if ($charlist === false)
657
+ {
658
+ return utf8_trim($str);
659
+ }
660
+
661
+ return utf8_trim($str, $charlist);
662
+ }
663
+
664
+ /**
665
+ * UTF-8 aware alternative to ucfirst()
666
+ *
667
+ * Make a string's first character uppercase or all words' first character uppercase.
668
+ *
669
+ * @param string $str String to be processed
670
+ * @param string $delimiter The words delimiter (null means do not split the string)
671
+ * @param string $newDelimiter The new words delimiter (null means equal to $delimiter)
672
+ *
673
+ * @return string If $delimiter is null, return the string with first character as upper case (if applicable)
674
+ * else consider the string of words separated by the delimiter, apply the ucfirst to each words
675
+ * and return the string with the new delimiter
676
+ *
677
+ * @see http://www.php.net/ucfirst
678
+ * @since 1.3.0
679
+ */
680
+ public static function ucfirst($str, $delimiter = null, $newDelimiter = null)
681
+ {
682
+ if ($delimiter === null)
683
+ {
684
+ return utf8_ucfirst($str);
685
+ }
686
+
687
+ if ($newDelimiter === null)
688
+ {
689
+ $newDelimiter = $delimiter;
690
+ }
691
+
692
+ return implode($newDelimiter, array_map('utf8_ucfirst', explode($delimiter, $str)));
693
+ }
694
+
695
+ /**
696
+ * UTF-8 aware alternative to ucwords()
697
+ *
698
+ * Uppercase the first character of each word in a string.
699
+ *
700
+ * @param string $str String to be processed
701
+ *
702
+ * @return string String with first char of each word uppercase
703
+ *
704
+ * @see http://www.php.net/ucwords
705
+ * @since 1.3.0
706
+ */
707
+ public static function ucwords($str)
708
+ {
709
+ return utf8_ucwords($str);
710
+ }
711
+
712
+ /**
713
+ * Transcode a string.
714
+ *
715
+ * @param string $source The string to transcode.
716
+ * @param string $from_encoding The source encoding.
717
+ * @param string $to_encoding The target encoding.
718
+ *
719
+ * @return mixed The transcoded string, or null if the source was not a string.
720
+ *
721
+ * @link https://bugs.php.net/bug.php?id=48147
722
+ *
723
+ * @since 1.3.0
724
+ */
725
+ public static function transcode($source, $from_encoding, $to_encoding)
726
+ {
727
+ if (is_string($source))
728
+ {
729
+ switch (ICONV_IMPL)
730
+ {
731
+ case 'glibc':
732
+ return @iconv($from_encoding, $to_encoding . '//TRANSLIT,IGNORE', $source);
733
+
734
+ case 'libiconv':
735
+ default:
736
+ return iconv($from_encoding, $to_encoding . '//IGNORE//TRANSLIT', $source);
737
+ }
738
+ }
739
+
740
+ return null;
741
+ }
742
+
743
+ /**
744
+ * Tests a string as to whether it's valid UTF-8 and supported by the Unicode standard.
745
+ *
746
+ * Note: this function has been modified to simple return true or false.
747
+ *
748
+ * @param string $str UTF-8 encoded string.
749
+ *
750
+ * @return boolean true if valid
751
+ *
752
+ * @author <hsivonen@iki.fi>
753
+ * @see http://hsivonen.iki.fi/php-utf8/
754
+ * @see compliant
755
+ * @since 1.3.0
756
+ */
757
+ public static function valid($str)
758
+ {
759
+ return utf8_is_valid($str);
760
+ }
761
+
762
+ /**
763
+ * Tests whether a string complies as UTF-8.
764
+ *
765
+ * This will be much faster than StringHelper::valid() but will pass five and six octet UTF-8 sequences, which are not supported by Unicode and
766
+ * so cannot be displayed correctly in a browser. In other words it is not as strict as StringHelper::valid() but it's faster. If you use it to
767
+ * validate user input, you place yourself at the risk that attackers will be able to inject 5 and 6 byte sequences (which may or may not be a
768
+ * significant risk, depending on what you are are doing).
769
+ *
770
+ * @param string $str UTF-8 string to check
771
+ *
772
+ * @return boolean TRUE if string is valid UTF-8
773
+ *
774
+ * @see StringHelper::valid
775
+ * @see http://www.php.net/manual/en/reference.pcre.pattern.modifiers.php#54805
776
+ * @since 1.3.0
777
+ */
778
+ public static function compliant($str)
779
+ {
780
+ return utf8_compliant($str);
781
+ }
782
+
783
+ /**
784
+ * Converts Unicode sequences to UTF-8 string.
785
+ *
786
+ * @param string $str Unicode string to convert
787
+ *
788
+ * @return string UTF-8 string
789
+ *
790
+ * @since 1.3.0
791
+ */
792
+ public static function unicode_to_utf8($str)
793
+ {
794
+ if (extension_loaded('mbstring'))
795
+ {
796
+ return preg_replace_callback(
797
+ '/\\\\u([0-9a-fA-F]{4})/',
798
+ function ($match)
799
+ {
800
+ return mb_convert_encoding(pack('H*', $match[1]), 'UTF-8', 'UCS-2BE');
801
+ },
802
+ $str
803
+ );
804
+ }
805
+
806
+ return $str;
807
+ }
808
+
809
+ /**
810
+ * Converts Unicode sequences to UTF-16 string.
811
+ *
812
+ * @param string $str Unicode string to convert
813
+ *
814
+ * @return string UTF-16 string
815
+ *
816
+ * @since 1.3.0
817
+ */
818
+ public static function unicode_to_utf16($str)
819
+ {
820
+ if (extension_loaded('mbstring'))
821
+ {
822
+ return preg_replace_callback(
823
+ '/\\\\u([0-9a-fA-F]{4})/',
824
+ function ($match)
825
+ {
826
+ return mb_convert_encoding(pack('H*', $match[1]), 'UTF-8', 'UTF-16BE');
827
+ },
828
+ $str
829
+ );
830
+ }
831
+
832
+ return $str;
833
+ }
834
+ }
helper/activation-helper.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
3
+
4
+ register_activation_hook(__FILE__, 'onWooDiscountActivate');
5
+ register_deactivation_hook(__FILE__, 'onWooDiscountDeactivation');
6
+
7
+ if (!function_exists('onWooDiscountActivate')) {
8
+ function onWooDiscountActivate()
9
+ {
10
+ // Dependency Check.
11
+ if (!in_array('woocommerce/woocommerce.php', get_option('active_plugins'))) wp_die('Please Install WooCommerce to Continue !');
12
+ }
13
+ }
14
+ if (!function_exists('onWooDiscountDeactivation')) {
15
+ function onWooDiscountDeactivation()
16
+ {
17
+
18
+ }
19
+ }
helper/general-helper.php ADDED
@@ -0,0 +1,396 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
3
+ include_once(WOO_DISCOUNT_DIR . '/helper/purchase.php');
4
+
5
+ /**
6
+ * Class woo_dicount_rules_generalHelper
7
+ */
8
+ if ( ! class_exists( 'woo_dicount_rules_generalHelper' ) ) {
9
+ class woo_dicount_rules_generalHelper
10
+ {
11
+
12
+ public $isPro;
13
+
14
+ /**
15
+ * @var string
16
+ */
17
+ public $default_page = 'pricing-rules';
18
+
19
+ /**
20
+ * To Process the View.
21
+ *
22
+ * @param $path
23
+ * @param $data
24
+ * @return bool|string
25
+ */
26
+ public function processBaseView($path, $data)
27
+ {
28
+ if (!file_exists($path)) return false;
29
+ $this->checkPluginState();
30
+ $purchase = new woo_dicount_rules_purchase();
31
+ $suffix = $purchase->getSuffix();
32
+ ob_start();
33
+ $config = $data;
34
+ $pro = $this->isPro;
35
+ $products = $this->getProductList();
36
+ $category = $this->getCategoryList();
37
+ $users = $this->getUserList();
38
+ $userRoles = $this->getUserRoles();
39
+ $countries = $this->getAllCountries();
40
+ if (!isset($config)) return false;
41
+ if (!isset($path) or is_null($config)) return false;
42
+ include($path);
43
+ $html = ob_get_contents();
44
+ ob_end_clean();
45
+ return $html;
46
+ }
47
+
48
+ public function checkPluginState()
49
+ {
50
+ $purchase = new woo_dicount_rules_purchase();
51
+ $this->isPro = $purchase->isPro();
52
+ // $this->isPro = true;
53
+ }
54
+
55
+ /**
56
+ * To Retrieve the list of Users.
57
+ *
58
+ * @return array
59
+ */
60
+ public function getUserList()
61
+ {
62
+ $result = [];
63
+ foreach (get_users() as $user) {
64
+ $result[$user->ID] = '#' . $user->ID . ' ' . $user->user_email;
65
+ }
66
+ return $result;
67
+ }
68
+
69
+ /**
70
+ * To Retrieve the active tab.
71
+ *
72
+ * @return string
73
+ */
74
+ public function getCurrentTab()
75
+ {
76
+ $postData = \FlycartInput\FInput::getInstance();
77
+ $tab = $this->default_page;
78
+ if (!empty($postData->get('tab', null)) && $postData->get('tab', '') != '') {
79
+ $tab = sanitize_text_field($postData->get('tab', ''));
80
+ }
81
+ return $tab;
82
+ }
83
+
84
+ /**
85
+ * To Get Product List.
86
+ *
87
+ * @return array
88
+ */
89
+ public function getProductList()
90
+ {
91
+ $products = [];
92
+ $posts_raw = get_posts(array(
93
+ 'posts_per_page' => -1,
94
+ 'post_type' => 'product',
95
+ 'post_status' => array('publish', 'pending', 'draft', 'future', 'private', 'inherit'),
96
+ 'fields' => 'ids',
97
+ ));
98
+
99
+ foreach ($posts_raw as $post_id) {
100
+ $products[$post_id] = '#' . $post_id . ' ' . get_the_title($post_id);
101
+ }
102
+
103
+ return $products;
104
+ }
105
+
106
+ /**
107
+ * To Get All Countries.
108
+ *
109
+ * @return array
110
+ */
111
+ public function getAllCountries()
112
+ {
113
+ $countries = new WC_Countries();
114
+
115
+ if ($countries && is_array($countries->countries)) {
116
+ return array_merge([], $countries->countries);
117
+ } else {
118
+ return [];
119
+ }
120
+ }
121
+
122
+ /**
123
+ * To Get All Capabilities list.
124
+ *
125
+ * @return array
126
+ */
127
+ public function getCapabilitiesList()
128
+ {
129
+ $capabilities = array();
130
+
131
+ if (class_exists('Groups_User') && class_exists('Groups_Wordpress') && function_exists('_groups_get_tablename')) {
132
+
133
+ global $wpdb;
134
+ $capability_table = _groups_get_tablename('capability');
135
+ $all_capabilities = $wpdb->get_results('SELECT capability FROM ' . $capability_table);
136
+
137
+ if ($all_capabilities) {
138
+ foreach ($all_capabilities as $capability) {
139
+ $capabilities[$capability->capability] = $capability->capability;
140
+ }
141
+ }
142
+ } else {
143
+ global $wp_roles;
144
+
145
+ if (!isset($wp_roles)) {
146
+ get_role('administrator');
147
+ }
148
+
149
+ $roles = $wp_roles->roles;
150
+
151
+ if (is_array($roles)) {
152
+ foreach ($roles as $rolename => $atts) {
153
+ if (isset($atts['capabilities']) && is_array($atts['capabilities'])) {
154
+ foreach ($atts['capabilities'] as $capability => $value) {
155
+ if (!in_array($capability, $capabilities)) {
156
+ $capabilities[$capability] = $capability;
157
+ }
158
+ }
159
+ }
160
+ }
161
+ }
162
+ }
163
+
164
+ return array_merge([], $capabilities);
165
+ }
166
+
167
+ /**
168
+ * @return array
169
+ */
170
+ public function getUserRoles()
171
+ {
172
+ global $wp_roles;
173
+
174
+ if (!isset($wp_roles)) {
175
+ $wp_roles = new WP_Roles();
176
+ }
177
+
178
+ return array_merge([], $wp_roles->get_names());
179
+ }
180
+
181
+ /**
182
+ * Get list of roles assigned to current user
183
+ *
184
+ * @access public
185
+ * @return array
186
+ */
187
+ public static function getCurrentUserRoles()
188
+ {
189
+ $current_user = wp_get_current_user();
190
+ return $current_user->roles;
191
+ }
192
+
193
+ /**
194
+ * @return array
195
+ */
196
+ public function getCategoryList()
197
+ {
198
+ $result = [];
199
+
200
+ $post_categories_raw = get_terms(array('product_cat'), array('hide_empty' => 0));
201
+ $post_categories_raw_count = count($post_categories_raw);
202
+
203
+ foreach ($post_categories_raw as $post_cat_key => $post_cat) {
204
+ $category_name = $post_cat->name;
205
+
206
+ if ($post_cat->parent) {
207
+ $parent_id = $post_cat->parent;
208
+ $has_parent = true;
209
+
210
+ // Make sure we don't have an infinite loop here (happens with some kind of "ghost" categories)
211
+ $found = false;
212
+ $i = 0;
213
+
214
+ while ($has_parent && ($i < $post_categories_raw_count || $found)) {
215
+
216
+ // Reset each time
217
+ $found = false;
218
+ $i = 0;
219
+
220
+ foreach ($post_categories_raw as $parent_post_cat_key => $parent_post_cat) {
221
+
222
+ $i++;
223
+
224
+ if ($parent_post_cat->term_id == $parent_id) {
225
+ $category_name = $parent_post_cat->name . ' &rarr; ' . $category_name;
226
+ $found = true;
227
+
228
+ if ($parent_post_cat->parent) {
229
+ $parent_id = $parent_post_cat->parent;
230
+ } else {
231
+ $has_parent = false;
232
+ }
233
+
234
+ break;
235
+ }
236
+ }
237
+ }
238
+ }
239
+
240
+ $result[$post_cat->term_id] = $category_name;
241
+ }
242
+
243
+ return $result;
244
+ }
245
+
246
+ /**
247
+ * Get Category by passing product ID or Product.
248
+ *
249
+ * @param $item
250
+ * @param bool $is_id
251
+ * @return array
252
+ */
253
+ public static function getCategoryByPost($item, $is_id = false)
254
+ {
255
+ if ($is_id) {
256
+ $id = $item;
257
+ } else {
258
+ $id = $item['data']->id;
259
+ }
260
+ $id = intval($id);
261
+ if (!$id) return false;
262
+
263
+ $categories = array();
264
+ $current_categories = wp_get_post_terms($id, 'product_cat');
265
+
266
+ foreach ($current_categories as $category) {
267
+ $categories[] = $category->term_id;
268
+ }
269
+
270
+ return $categories;
271
+ }
272
+
273
+ /**
274
+ * To Parsing the Array from String to Int.
275
+ *
276
+ * @param array $array
277
+ */
278
+ public static function toInt(array &$array)
279
+ {
280
+ foreach ($array as $index => $item) {
281
+ $array[$index] = (int)$item;
282
+ }
283
+ }
284
+
285
+ /**
286
+ * @param $version
287
+ * @return bool|mixed
288
+ */
289
+ public static function wcVersion($version)
290
+ {
291
+ if (defined('WC_VERSION') && WC_VERSION) {
292
+ return version_compare(WC_VERSION, $version, '>=');
293
+ } else if (defined('WOOCOMMERCE_VERSION') && WOOCOMMERCE_VERSION) {
294
+ return version_compare(WOOCOMMERCE_VERSION, $version, '>=');
295
+ } else {
296
+ return false;
297
+ }
298
+ }
299
+
300
+ /**
301
+ * @param $html
302
+ * @return bool|mixed
303
+ */
304
+ static function makeString($html)
305
+ {
306
+ if (is_null($html) || empty($html) || !isset($html)) return false;
307
+ $out = $html;
308
+ // This Process only helps, single level array.
309
+ if (is_array($html)) {
310
+ foreach ($html as $id => $value) {
311
+ self::escapeCode($value);
312
+ // Finally Eliminating the Special Chars.
313
+ // $value = preg_replace('/[^A-Za-z0-9]/', '', $value);
314
+ $html[$id] = $value;
315
+ }
316
+ return $out;
317
+ } else {
318
+ self::escapeCode($html);
319
+ // Finally Eliminating the Special Chars.
320
+ // $html = preg_replace('/[^A-Za-z0-9]/', '', $html);
321
+ return $html;
322
+ }
323
+ }
324
+
325
+ /**
326
+ * Re-Arrange the Index of Array to Make Usable.[2-D Array Only]
327
+ * @param $rules
328
+ */
329
+ public static function reArrangeArray(&$rules)
330
+ {
331
+ $result = [];
332
+ foreach ($rules as $index => $item) {
333
+ foreach ($item as $id => $value) {
334
+ $result[$id] = $value;
335
+ }
336
+ }
337
+ $rules = $result;
338
+ }
339
+
340
+ /**
341
+ * @param $value
342
+ */
343
+ static function escapeCode(&$value)
344
+ {
345
+ // Four Possible tags for PHP to Init.
346
+ $value = preg_replace(array('/^<\?php.*\?\>/', '/^<\%.*\%\>/', '/^<\?.*\?\>/', '/^<\?=.*\?\>/'), '', $value);
347
+ $value = self::delete_all_between('<?php', '?>', $value);
348
+ $value = self::delete_all_between('<?', '?>', $value);
349
+ $value = self::delete_all_between('<?=', '?>', $value);
350
+ $value = self::delete_all_between('<%', '%>', $value);
351
+ $value = str_replace(['<?php', '<?', '<?=', '<%', '?>'], '', $value);
352
+ }
353
+
354
+
355
+ /**
356
+ * @param $beginning
357
+ * @param $end
358
+ * @param $string
359
+ * @return mixed
360
+ */
361
+ static function delete_all_between($beginning, $end, $string)
362
+ {
363
+
364
+ if (!is_string($string)) return false;
365
+
366
+ $beginningPos = strpos($string, $beginning);
367
+ $endPos = strpos($string, $end);
368
+ if ($beginningPos === false || $endPos === false) {
369
+ return $string;
370
+ }
371
+
372
+ $textToDelete = substr($string, $beginningPos, ($endPos + strlen($end)) - $beginningPos);
373
+
374
+ return str_replace($textToDelete, '', $string);
375
+ }
376
+
377
+ /**
378
+ * To get slider content through curl
379
+ * */
380
+ public static function getSideBarContent(){
381
+ $html = '';
382
+ if(is_callable('curl_init')) {
383
+ $ch = curl_init();
384
+ curl_setopt($ch, CURLOPT_URL, 'https://www.flycart.org/updates/woo-discount-rules.json');
385
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
386
+ $contents = curl_exec($ch);
387
+ $contents_decode = json_decode($contents);
388
+ if(isset($contents_decode['0']->promo_html)){
389
+ $html = $contents_decode['0']->promo_html;
390
+ }
391
+ }
392
+
393
+ return $html;
394
+ }
395
+ }
396
+ }
helper/purchase.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
3
+ /**
4
+ * Class woo_dicount_rules_purchase
5
+ */
6
+ if ( ! class_exists( 'woo_dicount_rules_purchase' ) ) {
7
+ class woo_dicount_rules_purchase
8
+ {
9
+
10
+ /**
11
+ * @var
12
+ */
13
+ private $user;
14
+
15
+ /**
16
+ * woo_dicount_rules_purchase constructor.
17
+ */
18
+ public function __construct()
19
+ {
20
+
21
+ }
22
+
23
+ /**
24
+ * @return bool
25
+ */
26
+ public function isPro()
27
+ {
28
+ return false;
29
+ }
30
+
31
+ /**
32
+ * @return string
33
+ */
34
+ public function getSuffix()
35
+ {
36
+ return '-PRO-';
37
+ }
38
+
39
+ public function validateLicense()
40
+ {
41
+
42
+ }
43
+
44
+ public function checkUserStatus()
45
+ {
46
+
47
+ }
48
+ }
49
+ }
includes/cart-rules.php ADDED
@@ -0,0 +1,718 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
3
+ include_once(WOO_DISCOUNT_DIR . '/helper/general-helper.php');
4
+ include_once(WOO_DISCOUNT_DIR . '/includes/discount-base.php');
5
+
6
+ /**
7
+ * Class woo_dicount_rules_cartRules
8
+ */
9
+ if ( ! class_exists( 'woo_dicount_rules_cartRules' ) ) {
10
+ class woo_dicount_rules_cartRules
11
+ {
12
+ /**
13
+ * @var string
14
+ */
15
+ private $option_name = 'woo_discount_cart_option';
16
+
17
+ /**
18
+ * @var string
19
+ */
20
+ public $post_type = 'woo_discount_cart';
21
+
22
+ /**
23
+ * @var bool
24
+ */
25
+ public $discount_applied = false;
26
+
27
+ /**
28
+ * @var
29
+ */
30
+ private $rules;
31
+
32
+ /**
33
+ * @var
34
+ */
35
+ public $rule_sets;
36
+
37
+ /**
38
+ * @var array
39
+ */
40
+ public $cart_items;
41
+
42
+ /**
43
+ * @var
44
+ */
45
+ public $sub_total;
46
+
47
+ /**
48
+ * @var int
49
+ */
50
+ public $discount_total = 0;
51
+
52
+ /**
53
+ * @var array
54
+ */
55
+ public $coupon_list;
56
+
57
+ /**
58
+ * @var string
59
+ */
60
+ public $coupon_code;
61
+
62
+ /**
63
+ * @var
64
+ */
65
+ public $matched_sets;
66
+
67
+ public $postData;
68
+
69
+ /**
70
+ * woo_dicount_rules_cartRules constructor.
71
+ */
72
+ public function __construct()
73
+ {
74
+ global $woocommerce;
75
+
76
+ $this->postData = \FlycartInput\FInput::getInstance();
77
+ $this->cart_items = (isset($woocommerce->cart->cart_contents) ? $woocommerce->cart->cart_contents : []);
78
+ $this->calculateCartSubtotal();
79
+ $this->coupon_list = (isset($woocommerce->cart->applied_coupons) ? $woocommerce->cart->applied_coupons : []);
80
+
81
+ // Check for Remove Coupon Request.
82
+ if (!is_null($this->postData->get('remove_coupon', null))) $this->removeWoocommerceCoupon($this->postData->get('remove_coupon'));
83
+
84
+ // Update Coupon Code
85
+ $this->coupon_code = strtolower($this->getCouponCode());
86
+
87
+
88
+ }
89
+
90
+ /**
91
+ * Save Cart Configs.
92
+ *
93
+ * @param array $request bulk request data.
94
+ * @return bool
95
+ */
96
+ public function save($request)
97
+ {
98
+ foreach ($request as $index => $value) {
99
+ if ($index !== 'discount_rule') {
100
+ // $request[$index] = generalHelper::makeString($value);
101
+ $request[$index] = woo_dicount_rules_generalHelper::makeString($value);
102
+ }
103
+ }
104
+
105
+ $id = (isset($request['rule_id']) ? $request['rule_id'] : false);
106
+
107
+ $id = intval($id);
108
+ if (!$id && $id != 0) return false;
109
+
110
+ $title = (isset($request['rule_name']) ? $request['rule_name'] : 'New');
111
+ $slug = str_replace(' ', '-', strtolower($title));
112
+
113
+ // To Lowercase.
114
+ $slug = strtolower($slug);
115
+
116
+ // Encoding String with Space.
117
+ $slug = str_replace(' ', '-', $slug);
118
+
119
+ if ($id) {
120
+ $post = [
121
+ 'ID' => $id,
122
+ 'post_title' => $title,
123
+ 'post_name' => $slug,
124
+ 'post_content' => 'New Rule',
125
+ 'post_type' => $this->post_type,
126
+ 'post_status' => 'publish'
127
+ ];
128
+ wp_update_post($post);
129
+ } else {
130
+ $post = [
131
+ 'post_title' => $title,
132
+ 'post_name' => $slug,
133
+ 'post_content' => 'New Rule',
134
+ 'post_type' => $this->post_type,
135
+ 'post_status' => 'publish'
136
+ ];
137
+ $id = wp_insert_post($post);
138
+ }
139
+
140
+ $form = [
141
+ 'rule_name',
142
+ 'rule_descr',
143
+ 'date_from',
144
+ 'date_to',
145
+ 'apply_to',
146
+ 'discount_type',
147
+ 'to_discount',
148
+ 'discount_rule',
149
+ 'rule_order'
150
+ ];
151
+
152
+ foreach ($request['discount_rule'] as $index => $value) {
153
+ $request['discount_rule'][$index] = woo_dicount_rules_generalHelper::makeString($value);
154
+ }
155
+
156
+ if (isset($request['discount_rule'])) $request['discount_rule'] = json_encode($request['discount_rule']);
157
+
158
+ if (is_null($id) || !isset($id)) return false;
159
+
160
+ foreach ($request as $index => $value) {
161
+ if (in_array($index, $form)) {
162
+ if (get_post_meta($id, $index)) {
163
+ update_post_meta($id, $index, $value);
164
+ } else {
165
+ add_post_meta($id, $index, $value);
166
+ }
167
+ }
168
+ }
169
+ }
170
+
171
+ /**
172
+ * Load View Data.
173
+ *
174
+ * @param $option
175
+ * @param integer $id to load post.
176
+ * @return string mixed response.
177
+ */
178
+ public function view($option, $id)
179
+ {
180
+ $id = intval($id);
181
+ if (!$id) return false;
182
+
183
+ $post = get_post($id, 'OBJECT');
184
+ if (isset($post)) {
185
+ if (isset($post->ID)) {
186
+ $post->meta = get_post_meta($post->ID);
187
+ }
188
+ }
189
+ return $post;
190
+ }
191
+
192
+ /**
193
+ * List of Checklist.
194
+ */
195
+ public function checkPoint()
196
+ {
197
+ // Apply rules with products.
198
+ // NOT YET USED.
199
+ if ($this->discount_applied) return true;
200
+ }
201
+
202
+ /**
203
+ * Load List of Rules.
204
+ *
205
+ * @return mixed
206
+ */
207
+ public function getRules($onlyCount = false)
208
+ {
209
+ $posts = get_posts(array('post_type' => $this->post_type));
210
+ if ($onlyCount) return count($posts);
211
+ if (isset($posts) && count($posts) > 0) {
212
+ foreach ($posts as $index => $item) {
213
+ $posts[$index]->meta = get_post_meta($posts[$index]->ID);
214
+ }
215
+
216
+ $this->rules = $posts;
217
+ }
218
+ return $posts;
219
+ }
220
+
221
+ /**
222
+ * To Analyzing the Pricing Rules to Apply the Discount in terms of price.
223
+ */
224
+ public function analyse($woocommerce)
225
+ {
226
+ global $woocommerce;
227
+ // Re-arranging the Rules.
228
+ $this->organizeRules();
229
+ // Apply Group of Rules.
230
+ $this->applyRules();
231
+ // Get Overall Discounts.
232
+ $this->getDiscountAmount();
233
+ // Add a Coupon Virtually (Temporary access).
234
+ if ($this->discount_total != 0) {
235
+ add_filter('woocommerce_get_shop_coupon_data', array($this, 'addVirtualCoupon'), 10, 2);
236
+ add_action('woocommerce_after_calculate_totals', array($this, 'applyFakeCoupons'));
237
+ }
238
+ }
239
+
240
+ /**
241
+ *
242
+ */
243
+ public function appliedCoupons()
244
+ {
245
+
246
+ }
247
+
248
+
249
+ /**
250
+ * To Make record of discount changes.
251
+ *
252
+ * @return bool
253
+ */
254
+ public function makeLog()
255
+ {
256
+ if (is_null($this->coupon_code) || empty($this->coupon_code)) return false;
257
+
258
+ $discount_log = [
259
+ 'coupon_name' => $this->coupon_code,
260
+ 'discount' => $this->discount_total,
261
+ ];
262
+ WC()->session->set('woo_cart_discount', json_encode($discount_log));
263
+ }
264
+
265
+ /**
266
+ * Virtually add Coupon to apply the Discount.
267
+ *
268
+ * @param array $unknown_param
269
+ * @param string $old_coupon_code Existing Coupon
270
+ * @return array|bool
271
+ */
272
+ public function addVirtualCoupon($unknown_param, $old_coupon_code)
273
+ {
274
+ $coupon_code = $this->coupon_code;
275
+ // Getting Coupon Remove status from Session.
276
+ $is_removed = WC()->session->get('woo_coupon_removed');
277
+ // If Both are same, then it won't added.
278
+ if ($coupon_code == $is_removed) return false;
279
+
280
+ if ($old_coupon_code == $coupon_code) {
281
+ if ($this->postData->get('remove_coupon', false) == $coupon_code) return false;
282
+ $this->makeLog();
283
+ $coupon = array(
284
+ 'id' => 321123 . rand(2, 9),
285
+ 'type' => 'fixed_cart',
286
+ 'amount' => $this->discount_total,
287
+ 'individual_use' => 'no',
288
+ 'product_ids' => array(),
289
+ 'exclude_product_ids' => array(),
290
+ 'usage_limit' => '',
291
+ 'usage_limit_per_user' => '',
292
+ 'limit_usage_to_x_items' => '',
293
+ 'usage_count' => '',
294
+ 'expiry_date' => '',
295
+ 'apply_before_tax' => 'yes',
296
+ 'free_shipping' => 'no',
297
+ 'product_categories' => array(),
298
+ 'exclude_product_categories' => array(),
299
+ 'exclude_sale_items' => 'no',
300
+ 'minimum_amount' => '',
301
+ 'maximum_amount' => '',
302
+ 'customer_email' => '',
303
+ );
304
+
305
+ return $coupon;
306
+ }
307
+ }
308
+
309
+ /**
310
+ * To Get the Coupon code that already specified.
311
+ *
312
+ * @return string
313
+ */
314
+ public function getCouponCode()
315
+ {
316
+ $config = new woo_dicount_rules_WooDiscountBase();
317
+ $config = $config->getBaseConfig();
318
+ // Pre-Defined alternative Coupon Code.
319
+ $coupon = 'Discount';
320
+ // Verify and overwrite the Coupon Code.
321
+ if (isset($config['coupon_name'])) $coupon = $config['coupon_name'];
322
+ return $coupon;
323
+ }
324
+
325
+ /**
326
+ * Apply fake coupon to cart
327
+ *
328
+ * @access public
329
+ * @return void
330
+ */
331
+ public function applyFakeCoupons()
332
+ {
333
+ global $woocommerce;
334
+
335
+ // 'newyear' is a temporary coupon for validation.
336
+ $coupon_code = apply_filters('woocommerce_coupon_code', $this->coupon_code);
337
+ // Getting New Instance with the Coupon Code.
338
+ $the_coupon = new WC_Coupon($coupon_code);
339
+ // Validating the Coupon as Valid and discount status.
340
+ if ($the_coupon->is_valid() && !$woocommerce->cart->has_discount($coupon_code)) {
341
+
342
+ // Do not apply coupon with individual use coupon already applied
343
+ if ($woocommerce->cart->applied_coupons) {
344
+ foreach ($woocommerce->cart->applied_coupons as $code) {
345
+ $coupon = new WC_Coupon($code);
346
+
347
+ if ($coupon->individual_use == 'yes') {
348
+ return false;
349
+ }
350
+ }
351
+ }
352
+
353
+ // Add coupon
354
+ $woocommerce->cart->applied_coupons[] = $coupon_code;
355
+ do_action('woocommerce_applied_coupon', $coupon_code);
356
+
357
+ return true;
358
+ }
359
+ }
360
+
361
+ /**
362
+ * Simply remove or reset the virtual coupon by set "empty" as value
363
+ * to "Woo's" session "woo_coupon_removed".
364
+ *
365
+ * @param $coupon
366
+ */
367
+ public function removeWoocommerceCoupon($coupon)
368
+ {
369
+ WC()->session->set('woo_coupon_removed', $coupon);
370
+ }
371
+
372
+ /**
373
+ *
374
+ */
375
+ public function removeCartDiscount()
376
+ {
377
+ global $woocommerce;
378
+
379
+ // Iterate over applied coupons and check each of them
380
+ foreach ($woocommerce->cart->applied_coupons as $code) {
381
+
382
+ // Check if coupon code matches our fake coupon code
383
+ if ($this->getCouponCode() === $code) {
384
+
385
+ // Get coupon
386
+ $coupon = new WC_Coupon($code);
387
+
388
+ // Remove coupon if it no longer exists
389
+ if (!$coupon->is_valid()) {
390
+
391
+ // Remove the coupon
392
+ add_filter('woocommerce_coupons_enabled', array($this, 'woocommerceEnableCoupons'));
393
+ $this->remove_woocommerce_coupon($code);
394
+ remove_filter('woocommerce_coupons_enabled', array($this, 'woocommerceEnableCoupons'));
395
+ }
396
+ }
397
+ }
398
+ }
399
+
400
+ /**
401
+ * @return string
402
+ */
403
+ public function woocommerceEnableCoupons()
404
+ {
405
+ return 'true';
406
+ }
407
+
408
+ /**
409
+ *
410
+ */
411
+ public function organizeRules()
412
+ {
413
+ // Loads the Rules to Global.
414
+ $this->getRules();
415
+ // Validate and Re-Assign the Rules.
416
+ $this->filterRules();
417
+ }
418
+
419
+ /**
420
+ * @return bool
421
+ */
422
+ public function applyRules()
423
+ {
424
+ global $woocommerce;
425
+ // If there is no rules, then return false.
426
+ if (!isset($this->rules)) return false;
427
+
428
+ // Check point having list of checklist to apply.
429
+ if ($this->checkPoint()) return false;
430
+
431
+ // To Generate Valid Rule sets.
432
+ $this->generateRuleSets();
433
+ }
434
+
435
+ /**
436
+ *
437
+ */
438
+ public function filterRules()
439
+ {
440
+ $rules = $this->rules;
441
+
442
+ if (is_null($rules) || !isset($rules)) return false;
443
+ // Start with empty set.
444
+ $rule_set = [];
445
+
446
+ foreach ($rules as $index => $rule) {
447
+ $status = (isset($rule->status) ? $rule->status : false);
448
+
449
+ // To Check as Plugin Active - InActive.
450
+ if ($status == 'publish') {
451
+ $date_from = (isset($rule->date_from) ? strtotime($rule->date_from) : false);
452
+ $date_to = (isset($rule->date_to) ? strtotime($rule->date_to) : false);
453
+ $today = strtotime(date('m/d/Y'));
454
+
455
+ // Validating Rule with Date of Expiry.
456
+ if (($date_from <= $today) && ($date_to > $today)) {
457
+
458
+ // Validating the Rule with its Order ID.
459
+ if (isset($rule->rule_order)) {
460
+ // If Order ID is '-', then this rule not going to implement.
461
+ if ($rule->rule_order !== '-') {
462
+ $rule_set[] = $rule;
463
+ }
464
+ }
465
+ }
466
+ }
467
+ }
468
+ $this->rules = $rule_set;
469
+
470
+ // To Order the Rules, based on its order ID.
471
+ $this->orderRules();
472
+ }
473
+
474
+ /**
475
+ * @return bool
476
+ */
477
+ public function orderRules()
478
+ {
479
+ if (empty($this->rules)) return false;
480
+
481
+ $ordered_rules = [];
482
+
483
+ // Make associative array with Order ID.
484
+ foreach ($this->rules as $index => $rule) {
485
+ if (isset($rule->rule_order)) {
486
+ if ($rule->rule_order != '') {
487
+ $ordered_rules[$rule->rule_order] = $rule;
488
+ }
489
+ }
490
+ }
491
+ // Order the Rules with it's priority.
492
+ ksort($ordered_rules);
493
+
494
+ $this->rules = $ordered_rules;
495
+ }
496
+
497
+ /**
498
+ * @return bool
499
+ */
500
+ public function generateRuleSets()
501
+ {
502
+ global $woocommerce;
503
+ $rule_sets = [];
504
+
505
+ if (!isset($this->rules)) return false;
506
+
507
+ // Loop the Rules set to collect matched rules.
508
+ foreach ($this->rules as $index => $rule) {
509
+ // General Rule Info.
510
+ $rule_sets[$index]['discount_type'] = 'price_discount';
511
+ $rule_sets[$index]['name'] = (isset($rule->rule_name) ? $rule->rule_name : 'Rule_' . $index);
512
+ $rule_sets[$index]['descr'] = (isset($rule->rule_descr) ? $rule->rule_descr : '');
513
+ $rule_sets[$index]['method'] = (isset($rule->rule_method) ? $rule->rule_method : 'qty_based');
514
+ $rule_sets[$index]['qty_based_on'] = (isset($rule->qty_based_on) ? $rule->qty_based_on : 'each_product');
515
+ $rule_sets[$index]['date_from'] = (isset($rule->date_from) ? $rule->date_from : false);
516
+ $rule_sets[$index]['date_to'] = (isset($rule->date_to) ? $rule->date_to : false);
517
+ $rule_sets[$index]['discount_rule'] = (isset($rule->discount_rule) ? $rule->discount_rule : false);
518
+ $rule_sets[$index]['discount_type'] = (isset($rule->discount_type) ? $rule->discount_type : false);
519
+ $rule_sets[$index]['to_discount'] = (isset($rule->to_discount) ? $rule->to_discount : false);
520
+ $rule_sets[$index]['enabled'] = $this->validateCart($rule_sets[$index]['discount_rule']);
521
+ }
522
+ $this->rule_sets = $rule_sets;
523
+ }
524
+
525
+ /**
526
+ * Get Overall discount amount across allover the rules that available.
527
+ *
528
+ * @return integer Total Discount Amount.
529
+ */
530
+ public function getDiscountAmount()
531
+ {
532
+ $discount = 0;
533
+ $discounts = [];
534
+ if (!isset($this->rule_sets)) return false;
535
+
536
+ // Processing the Totals.
537
+ foreach ($this->rule_sets as $index => $rule) {
538
+ if ($rule['enabled'] == true) {
539
+ $discounts['name'][$index] = $rule['name'];
540
+ $discounts['type'][$index] = $rule['discount_type'];
541
+ if ($rule['discount_type'] == 'price_discount') {
542
+ // Getting the Flat Rate of Discount.
543
+ $discounts['to_discount'][$index] = $this->calculateDiscount($this->sub_total, array('type' => 'price', 'value' => $rule['to_discount']));
544
+ } else {
545
+ // Getting the Percentage level of Discount.
546
+ $discounts['to_discount'][$index] = $this->calculateDiscount($this->sub_total, array('type' => 'percentage', 'value' => $rule['to_discount']));
547
+ }
548
+ // Sum of Available discount list.
549
+ $discount += $discounts['to_discount'][$index];
550
+ // Update the status of the status of the discount rule.
551
+ $discounts['is_enabled'][$index] = $rule['enabled'];
552
+ }
553
+ }
554
+ $this->discount_total = $discount;
555
+ return $discounts;
556
+ }
557
+
558
+ /**
559
+ * Comparing the Rules with the each line item to check
560
+ * and return as, matched or not.
561
+ *
562
+ * @param array $rules
563
+ * @return bool true|false
564
+ */
565
+ public function validateCart($rules)
566
+ {
567
+ $this->calculateCartSubtotal();
568
+ $rules = (is_string($rules) ? json_decode($rules, true) : []);
569
+ // Simple array helper to re-arrange the structure.
570
+ woo_dicount_rules_generalHelper::reArrangeArray($rules);
571
+ foreach ($rules as $index => $rule) {
572
+ // Validating the Rules one by one.
573
+ if ($this->applyRule($index, $rule) == false) {
574
+ return false;
575
+ }
576
+ }
577
+ return true;
578
+ }
579
+
580
+ /**
581
+ * Applying bunch amount of rules with the line item.
582
+ *
583
+ * @param string $index Index of the Rule
584
+ * @param array $rule array of rule info.
585
+ * @return bool true|false as matched or not.
586
+ */
587
+ public function applyRule($index, $rule)
588
+ {
589
+ switch ($index) {
590
+
591
+ // Cart Subtotal.
592
+ case 'subtotal_least':
593
+ if ($this->sub_total < $rule) {
594
+ return false;
595
+ }
596
+ return true;
597
+ break;
598
+ case 'subtotal_less':
599
+ if ($this->sub_total >= $rule) {
600
+ return false;
601
+ }
602
+ return true;
603
+ break;
604
+
605
+ // Cart Item Count.
606
+ case 'item_count_least':
607
+ if (count($this->cart_items) < $rule) {
608
+ return false;
609
+ }
610
+ return true;
611
+ break;
612
+ case 'item_count_less':
613
+ if (count($this->cart_items) >= $rule) {
614
+ return false;
615
+ }
616
+ return true;
617
+ break;
618
+
619
+ // Quantity Count.
620
+ case 'quantity_least':
621
+ if ($this->cartItemQtyTotal() < $rule) {
622
+ return false;
623
+ }
624
+ return true;
625
+ break;
626
+ case 'quantity_less':
627
+ if ($this->cartItemQtyTotal() >= $rule) {
628
+ return false;
629
+ }
630
+ return true;
631
+ break;
632
+
633
+ // Logged In Users.
634
+ case 'users_in':
635
+ if (get_current_user_id() == 0 || !in_array(get_current_user_id(), $rule)) {
636
+ return false;
637
+ }
638
+ return true;
639
+ break;
640
+ case 'shipping_countries_in':
641
+ $user_meta = get_user_meta(get_current_user_id());
642
+
643
+ if (!$user_meta || !isset($user_meta['shipping_country']) || empty($user_meta['shipping_country']) || !in_array($user_meta['shipping_country'][0], $rule)) {
644
+ return false;
645
+ }
646
+ return true;
647
+ break;
648
+ case 'roles_in':
649
+ if (get_current_user_id() == 0 || count(array_intersect(woo_dicount_rules_generalHelper::getCurrentUserRoles(), $rule)) == 0) {
650
+ return false;
651
+ }
652
+ return true;
653
+ break;
654
+
655
+ }
656
+
657
+ }
658
+
659
+ /**
660
+ * Get cart total amount
661
+ *
662
+ * @access public
663
+ * @return float
664
+ */
665
+ public function calculateCartSubtotal()
666
+ {
667
+ $cart_subtotal = 0;
668
+ // Iterate over all cart items and
669
+ foreach ($this->cart_items as $cart_item_key => $cart_item) {
670
+ $quantity = (isset($cart_item['quantity']) && $cart_item['quantity']) ? $cart_item['quantity'] : 1;
671
+ $cart_subtotal += $cart_item['data']->price * $quantity;
672
+ }
673
+
674
+ $this->sub_total = (float)$cart_subtotal;
675
+ }
676
+
677
+ /**
678
+ * To Sum the Cart Item's Qty.
679
+ *
680
+ * @return int Total Qty of Cart.
681
+ */
682
+ public function cartItemQtyTotal()
683
+ {
684
+ global $woocommerce;
685
+ $cart_items = $woocommerce->cart->cart_contents;
686
+ $total_quantity = 0;
687
+
688
+ foreach ($cart_items as $cart_item) {
689
+ $current_quantity = (isset($cart_item['quantity']) && $cart_item['quantity']) ? $cart_item['quantity'] : 1;
690
+ $total_quantity += $current_quantity;
691
+ }
692
+ return $total_quantity;
693
+ }
694
+
695
+ /**
696
+ * Overall Discount Calculation based on Percentage or Flat.
697
+ *
698
+ * @param integer $sub_total Subtotal of the Cart.
699
+ * @param integer $adjustment percentage or discount of adjustment.
700
+ * @return integer Final Discount Amount.
701
+ */
702
+ public function calculateDiscount($sub_total, $adjustment)
703
+ {
704
+ $sub_total = ($sub_total < 0) ? 0 : $sub_total;
705
+
706
+ $discount = 0;
707
+
708
+ if ($adjustment['type'] == 'percentage') {
709
+ $discount = $sub_total * ($adjustment['value'] / 100);
710
+ } else if ($adjustment['type'] == 'price') {
711
+ $discount = $adjustment['value'];
712
+ }
713
+
714
+ return ($discount <= 0) ? 0 : $discount;
715
+ }
716
+
717
+ }
718
+ }
includes/discount-base.php ADDED
@@ -0,0 +1,565 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
3
+
4
+ include_once(WOO_DISCOUNT_DIR . '/helper/general-helper.php');
5
+ include_once(WOO_DISCOUNT_DIR . '/includes/pricing-rules.php');
6
+ include_once(WOO_DISCOUNT_DIR . '/includes/cart-rules.php');
7
+ global $woocommerce;
8
+
9
+ /**
10
+ * Class woo_dicount_rules_WooDiscountBase
11
+ */
12
+ if ( ! class_exists( 'woo_dicount_rules_WooDiscountBase' ) ) {
13
+ class woo_dicount_rules_WooDiscountBase
14
+ {
15
+ /**
16
+ * @var string
17
+ */
18
+ public $default_page = 'pricing-rules';
19
+
20
+ /**
21
+ * @var string
22
+ */
23
+ public $default_option = 'woo-discount-config';
24
+
25
+ /**
26
+ * @var array
27
+ */
28
+ private $instance = [];
29
+
30
+ /**
31
+ * woo_dicount_rules_WooDiscountBase constructor.
32
+ */
33
+ public function __construct()
34
+ {
35
+
36
+ }
37
+
38
+ /**
39
+ * Singleton Instance maker.
40
+ *
41
+ * @param $name
42
+ * @return bool
43
+ */
44
+ public function getInstance($name)
45
+ {
46
+ if (!isset($this->instance[$name])) {
47
+ if (class_exists($name)) {
48
+ $this->instance[$name] = new $name;
49
+ $instance = $this->instance[$name];
50
+ } else {
51
+ $instance = false;
52
+ }
53
+ } else {
54
+ $instance = $this->instance[$name];
55
+ }
56
+ return $instance;
57
+ }
58
+
59
+ /**
60
+ * Managing discount of Price and Cart.
61
+ */
62
+ public function handleDiscount()
63
+ {
64
+ global $woocommerce;
65
+
66
+ $price_discount = $this->getInstance('woo_dicount_rules_pricingRules');
67
+ $cart_discount = $this->getInstance('woo_dicount_rules_cartRules');
68
+
69
+ $price_discount->analyse($woocommerce);
70
+ $cart_discount->analyse($woocommerce);
71
+ }
72
+
73
+ /**
74
+ * WooCommerce hook to change the name of a product.
75
+ *
76
+ * @param $title
77
+ * @return mixed
78
+ */
79
+ public function modifyName($title)
80
+ {
81
+ //
82
+ return $title;
83
+ }
84
+
85
+ /**
86
+ * Finally, on triggering the "Thank You" hook by WooCommerce,
87
+ * Overall session data's are stored to the order's meta as "woo_discount_log".
88
+ *
89
+ * @param integer $order_id Order ID.
90
+ */
91
+ public function storeLog($order_id)
92
+ {
93
+ $log['price_discount'] = WC()->session->get('woo_price_discount', []);
94
+ $log['cart_discount'] = WC()->session->get('woo_cart_discount', []);
95
+
96
+ add_post_meta($order_id, 'woo_discount_log', json_encode($log));
97
+
98
+ // Reset the Coupon Status.
99
+ WC()->session->set('woo_coupon_removed', '');
100
+ }
101
+
102
+ /**
103
+ * Create New Menu On WooCommerce.
104
+ */
105
+ public function adminMenu()
106
+ {
107
+ if (!is_admin()) return;
108
+
109
+ global $submenu;
110
+ if (isset($submenu['woocommerce'])) {
111
+ add_submenu_page(
112
+ 'woocommerce',
113
+ 'Woo Discount Rules',
114
+ 'Woo Discount Rules',
115
+ 'edit_posts',
116
+ 'woo_discount_rules',
117
+ array($this, 'viewManager')
118
+ );
119
+ }
120
+ }
121
+
122
+ /**
123
+ * Update the Status of the Rule Set.
124
+ */
125
+ public function updateStatus()
126
+ {
127
+ $postData = \FlycartInput\FInput::getInstance();
128
+ $id = $postData->get('id', false);
129
+ if ($id) {
130
+ $status = get_post_meta($id, 'status', false);
131
+ if (isset($status[0])) {
132
+ $state = ($status[0] == 'publish') ? 'disable' : 'publish';
133
+ update_post_meta($id, 'status', $state);
134
+ } else {
135
+ add_post_meta($id, 'status', 'disable');
136
+ $state = 'disable';
137
+ }
138
+ echo ucfirst($state);
139
+ }
140
+ die();
141
+ }
142
+
143
+ /**
144
+ * Remove the Rule Set.
145
+ */
146
+ public function removeRule()
147
+ {
148
+ $postData = \FlycartInput\FInput::getInstance();
149
+ $id = $postData->get('id', false);
150
+ if ($id) {
151
+ try {
152
+ $id = intval($id);
153
+ if (!$id) return false;
154
+ wp_delete_post($id);
155
+ } catch (Exception $e) {
156
+ //
157
+ }
158
+ }
159
+ die();
160
+ }
161
+ // -------------------------------------- PRICE RULES ---------------------------------------------------------------
162
+ /**
163
+ * Saving the Price Rule.
164
+ *
165
+ * @return bool
166
+ */
167
+ public function savePriceRule()
168
+ {
169
+ $postData = \FlycartInput\FInput::getInstance();
170
+ $request = $postData->getArray();
171
+ $params = array();
172
+ if (!isset($request['data'])) return false;
173
+ parse_str($request['data'], $params);
174
+
175
+ $pricing_rule = $this->getInstance('woo_dicount_rules_pricingRules');
176
+ $pricing_rule->save($params);
177
+ die();
178
+ }
179
+
180
+ // -------------------------------------- CART RULES ----------------------------------------------------------------
181
+ /**
182
+ * Saving the Cart Rule.
183
+ *
184
+ * @return bool
185
+ */
186
+ public function saveCartRule()
187
+ {
188
+
189
+ $postData = \FlycartInput\FInput::getInstance();
190
+ $request = $postData->getArray();
191
+ $params = array();
192
+ if (!isset($request['data'])) return false;
193
+ parse_str($request['data'], $params);
194
+ $this->parseFormWithRules($params, true);
195
+ $pricing_rule = $this->getInstance('woo_dicount_rules_cartRules');
196
+ $pricing_rule->save($params);
197
+ die();
198
+ }
199
+
200
+ /**
201
+ * Making the reliable end data to store.
202
+ *
203
+ * @param $cart_rules
204
+ * @param bool $isCartRules
205
+ */
206
+ public function parseFormWithRules(&$cart_rules, $isCartRules = false)
207
+ {
208
+ $cart_rules['discount_rule'] = $this->generateFormData($cart_rules, $isCartRules);
209
+ }
210
+
211
+ /**
212
+ * @param $cart_rules
213
+ * @param bool $isCartRules
214
+ * @return array
215
+ */
216
+ public function generateFormData($cart_rules, $isCartRules = false)
217
+ {
218
+ $link = $this->fieldLink();
219
+
220
+ $discount_list = [];
221
+ // Here, Eliminating the Cart's rule with duplicates.
222
+ $discount_rule = (isset($cart_rules['discount_rule']) ? $cart_rules['discount_rule'] : []);
223
+ if ($isCartRules) {
224
+ foreach ($discount_rule as $index => $value) {
225
+
226
+ // The Type of Option should get value from it's native index.
227
+ // $link[$value['type']] will gives the native index of the "type"
228
+
229
+ if (isset($link[$value['type']])) {
230
+ if (isset($value[$link[$value['type']]])) {
231
+ $discount_list[$index][$value['type']] = $value[$link[$value['type']]];
232
+ }
233
+ } else {
234
+ $discount_list[$index][$value['type']] = $value['option_value'];
235
+ }
236
+ }
237
+ }
238
+ return $discount_list;
239
+
240
+ }
241
+
242
+ /**
243
+ * @return array
244
+ */
245
+ public function fieldLink()
246
+ {
247
+ // TODO: Check Subtotal Link
248
+ return [
249
+ 'products_atleast_one' => 'product_to_apply',
250
+ 'products_not_in' => 'product_to_apply',
251
+
252
+ 'categories_atleast_one' => 'category_to_apply',
253
+ 'categories_not_in' => 'category_to_apply',
254
+
255
+ 'users_in' => 'users_to_apply',
256
+ 'roles_in' => 'user_roles_to_apply',
257
+ 'shipping_countries_in' => 'countries_to_apply'
258
+ ];
259
+ }
260
+
261
+ // ----------------------------------------- CART RULES END --------------------------------------------------------
262
+
263
+
264
+ // -------------------------------------------SETTINGS--------------------------------------------------------------
265
+
266
+ /**
267
+ *
268
+ */
269
+ public function saveConfig()
270
+ {
271
+ $postData = \FlycartInput\FInput::getInstance();
272
+ $request = $postData->getArray();
273
+ $params = [];
274
+ if (isset($request['data'])) {
275
+ parse_str($request['data'], $params);
276
+ }
277
+
278
+ if (is_array($request)) {
279
+ foreach ($params as $index => $item) {
280
+ // $params[$index] = woo_dicount_rules_generalHelper::makeString($item);
281
+ $params[$index] = $item;
282
+ }
283
+ $params = json_encode($params);
284
+ }
285
+ // else {
286
+ // $params = woo_dicount_rules_generalHelper::makeString($params);
287
+ // }
288
+
289
+ if (get_option($this->default_option)) {
290
+ update_option($this->default_option, $params);
291
+ } else {
292
+ add_option($this->default_option, $params);
293
+ }
294
+ die();
295
+ }
296
+
297
+ /**
298
+ * @return array
299
+ */
300
+ public function getBaseConfig()
301
+ {
302
+ $option = get_option($this->default_option);
303
+ if (!$option || is_null($option)) {
304
+ return [];
305
+ } else {
306
+ return $option;
307
+ }
308
+ }
309
+
310
+ // -------------------------------------------SETTINGS END----------------------------------------------------------
311
+
312
+ /**
313
+ * @param $request
314
+ * @return bool
315
+ */
316
+ public function checkSubmission($request)
317
+ {
318
+ if (isset($request['form']) && !empty($request['form'])) {
319
+ $form = sanitize_text_field($request['form']);
320
+ if (strpos($form, '_save') === false) return false;
321
+ // For Saving Form
322
+ $form = str_replace('_save', '', $form);
323
+ // To Verify, the submitted form is in the Registered List or Not
324
+ if (in_array($form, $this->formList())) {
325
+ if (isset($request['page'])) {
326
+ switch ($form) {
327
+ case 'pricing_rules':
328
+ die(123);
329
+ $pricing_rule = $this->getInstance('woo_dicount_rules_pricingRules');
330
+ $pricing_rule->save($request);
331
+ break;
332
+ case 'cart_rules':
333
+ $cart_rules = $this->getInstance('woo_dicount_rules_cartRules');
334
+ $cart_rules->save($request);
335
+ break;
336
+ case 'settings':
337
+ $this->save($request);
338
+ break;
339
+ default:
340
+ // Invalid Submission.
341
+ break;
342
+ }
343
+ }
344
+ }
345
+ }
346
+ }
347
+
348
+ /**
349
+ * @param $option
350
+ */
351
+ public function checkAccess(&$option)
352
+ {
353
+ $postData = \FlycartInput\FInput::getInstance();
354
+ // Handling View
355
+ if ($postData->get('view', false)) {
356
+ $option = $option . '-view';
357
+ // Type : Price or Cart Discounts.
358
+ } elseif ($postData->get('type', false)) {
359
+ if ($postData->get('tab', false)) {
360
+ if ($postData->get('tab', '') == 'cart-rules') {
361
+ $option = 'cart-rules-new';
362
+ if ($postData->get('type', '') == 'view') $option = 'cart-rules-view';
363
+ }
364
+ } else {
365
+ $option = $option . '-' . $postData->get('type', '');
366
+ }
367
+ }
368
+ }
369
+
370
+ /**
371
+ * @param $request
372
+ */
373
+ public function save($request)
374
+ {
375
+ // Save General Settings of the Plugin.
376
+ }
377
+
378
+ /**
379
+ * @return array
380
+ */
381
+ public function formList()
382
+ {
383
+ return [
384
+ 'pricing_rules',
385
+ 'cart_rules',
386
+ 'settings'
387
+ ];
388
+ }
389
+
390
+ /**
391
+ *
392
+ */
393
+ public function viewManager()
394
+ {
395
+ $postData = \FlycartInput\FInput::getInstance();
396
+ $request = $postData->getArray();
397
+ $this->checkSubmission($request);
398
+
399
+ // Adding Plugin Page Script
400
+ if (function_exists('woo_discount_adminPageScript')) {
401
+ woo_discount_adminPageScript();
402
+ }
403
+ // Loading Instance.
404
+ $generalHelper = $this->getInstance('woo_dicount_rules_generalHelper');
405
+ // Sanity Check.
406
+ if (!$generalHelper) return;
407
+ // Getting Active Tab.
408
+ $tab = $generalHelper->getCurrentTab();
409
+
410
+ $path = $this->getPath($tab);
411
+
412
+ // Manage Tab.
413
+ $tab = (isset($tab) ? $tab : $this->default_page);
414
+ $html = '';
415
+ // File Check.
416
+ if (file_exists($path)) {
417
+ $data = [];
418
+ $this->fetchData($tab, $data);
419
+ // Processing View.
420
+ $html = $generalHelper->processBaseView($path, $data);
421
+ }
422
+ echo $html;
423
+ }
424
+
425
+ /**
426
+ * @param $tab
427
+ * @return mixed
428
+ */
429
+ public function getPath(&$tab)
430
+ {
431
+ $this->checkAccess($tab);
432
+ $pages = $this->adminPages();
433
+ // Default tab.
434
+ $path = $pages[$this->default_page];
435
+
436
+ // Comparing Available Tab with Active Tab.
437
+ if (isset($pages[$tab])) {
438
+ $path = $pages[$tab];
439
+ }
440
+ return $path;
441
+ }
442
+
443
+ /**
444
+ * @param $type
445
+ * @param $data
446
+ */
447
+ public function fetchData($type, &$data)
448
+ {
449
+ $postData = \FlycartInput\FInput::getInstance();
450
+ $request = $postData->getArray();
451
+
452
+ $helper = new woo_dicount_rules_generalHelper();
453
+ $isPro = $helper->checkPluginState();
454
+
455
+ switch ($type) {
456
+ // Managing Price Rules View.
457
+ case 'pricing-rules':
458
+ $pricing_rule = $this->getInstance('woo_dicount_rules_pricingRules');
459
+ $data = $pricing_rule->getRules();
460
+ break;
461
+ // Managing Cart Rules View.
462
+ case 'cart-rules':
463
+ $cart_rule = $this->getInstance('woo_dicount_rules_cartRules');
464
+ $data = $cart_rule->getRules();
465
+ break;
466
+ // Managing View of Settings.
467
+ case 'settings':
468
+ $data = $this->getBaseConfig();
469
+ break;
470
+
471
+ // Managing View of Pricing Rules.
472
+ case 'pricing-rules-new':
473
+ $data = new stdClass();
474
+ $data->form = 'pricing_rules_save';
475
+ if (!$isPro) {
476
+ $pricing_rule = $this->getInstance('woo_dicount_rules_pricingRules');
477
+ $data = $pricing_rule->getRules();
478
+ if (count($data) >= 3) die('You are restricted to process this action.');
479
+ }
480
+ break;
481
+
482
+ // Managing View of Pricing Rules.
483
+ case 'pricing-rules-view':
484
+
485
+ $view = false;
486
+ // Handling View
487
+ if (isset($request['view'])) {
488
+ $view = $request['view'];
489
+ }
490
+ $html = $this->getInstance('woo_dicount_rules_pricingRules');
491
+ $out = $html->view($type, $view);
492
+ if (isset($out) && !empty($out)) {
493
+ $data = $out;
494
+ }
495
+ $data->form = 'pricing_rules_save';
496
+ break;
497
+
498
+ // Managing View of Cart Rules.
499
+ case 'cart-rules-view':
500
+ $view = false;
501
+ // Handling View
502
+ if (isset($request['view'])) {
503
+ $view = $request['view'];
504
+ } else {
505
+
506
+ if (!$isPro) {
507
+ $cart_rule = $this->getInstance('woo_dicount_rules_cartRules');
508
+ $total_record = $cart_rule->getRules(true);
509
+ if ($total_record >= 3) wp_die('You are restricted to process this action.');
510
+ }
511
+ }
512
+
513
+ $html = $this->getInstance('woo_dicount_rules_cartRules');
514
+ $out = $html->view($type, $view);
515
+ if (isset($out) && !empty($out)) {
516
+ $data[] = $out;
517
+ }
518
+ break;
519
+ // Managing View of Cart Rules.
520
+ case 'cart-rules-new':
521
+ if (!$isPro) {
522
+ $cart_rule = $this->getInstance('woo_dicount_rules_cartRules');
523
+ $total_record = $cart_rule->getRules(true);
524
+ if ($total_record >= 3) wp_die('You are restricted to process this action.');
525
+ }
526
+ break;
527
+
528
+ default:
529
+ $data = [];
530
+
531
+ break;
532
+ }
533
+
534
+ }
535
+
536
+ /**
537
+ * @return array
538
+ */
539
+ public function adminPages()
540
+ {
541
+ return [
542
+ $this->default_page => WOO_DISCOUNT_DIR . '/view/pricing-rules.php',
543
+ 'cart-rules' => WOO_DISCOUNT_DIR . '/view/cart-rules.php',
544
+ 'settings' => WOO_DISCOUNT_DIR . '/view/settings.php',
545
+
546
+ // New Rule also access the same "View" to process
547
+ 'pricing-rules-new' => WOO_DISCOUNT_DIR . '/view/view-pricing-rules.php',
548
+ 'cart-rules-new' => WOO_DISCOUNT_DIR . '/view/view-cart-rules.php',
549
+
550
+ // Edit Rules
551
+ 'pricing-rules-view' => WOO_DISCOUNT_DIR . '/view/view-pricing-rules.php',
552
+ 'cart-rules-view' => WOO_DISCOUNT_DIR . '/view/view-cart-rules.php'
553
+ ];
554
+ }
555
+
556
+ /**
557
+ *
558
+ */
559
+ public function getOption()
560
+ {
561
+
562
+ }
563
+
564
+ }
565
+ }
includes/pricing-rules.php ADDED
@@ -0,0 +1,1024 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
3
+ include_once(WOO_DISCOUNT_DIR . '/helper/general-helper.php');
4
+
5
+ /**
6
+ * Class woo_dicount_rules_pricingRules
7
+ */
8
+ if ( ! class_exists( 'woo_dicount_rules_pricingRules' ) ) {
9
+ class woo_dicount_rules_pricingRules
10
+ {
11
+ /**
12
+ * @var string
13
+ */
14
+ private $option_name = 'woo_discount_price_option';
15
+
16
+ /**
17
+ * @var string
18
+ */
19
+ public $post_type = 'woo_discount';
20
+
21
+ /**
22
+ * @var bool
23
+ */
24
+ public $discount_applied = false;
25
+
26
+ /**
27
+ * @var
28
+ */
29
+ private $rules;
30
+
31
+ /**
32
+ * @var
33
+ */
34
+ public $rule_sets;
35
+
36
+ /**
37
+ * @var
38
+ */
39
+ public $matched_sets;
40
+
41
+ /**
42
+ * @var
43
+ */
44
+ public $baseConfig;
45
+
46
+ /**
47
+ * @var
48
+ */
49
+ public $apply_to;
50
+
51
+ public $postData;
52
+
53
+ /**
54
+ * woo_dicount_rules_pricingRules constructor.
55
+ */
56
+ public function __construct()
57
+ {
58
+ $this->updateBaseConfig();
59
+ $this->postData = \FlycartInput\FInput::getInstance();
60
+ }
61
+
62
+ /**
63
+ * Update the Base config with live.
64
+ */
65
+ public function updateBaseConfig()
66
+ {
67
+ $base = new woo_dicount_rules_WooDiscountBase();
68
+ $base = $base->getBaseConfig();
69
+ if (is_string($base)) $base = json_decode($base, true);
70
+ $this->baseConfig = $base;
71
+ $this->apply_to = (isset($base_config['price_setup']) ? $base_config['price_setup'] : 'all');
72
+ }
73
+
74
+ /**
75
+ * Saving the Price Rule Set.
76
+ *
77
+ * @param $request
78
+ * @return bool
79
+ */
80
+ public function save($request)
81
+ {
82
+ var_dump($request);
83
+ // die();
84
+ // foreach ($request as $index => $value) {
85
+ // $request[$index] = $value;
86
+ // }
87
+
88
+ $id = (isset($request['rule_id']) ? $request['rule_id'] : false);
89
+
90
+ $id = intval($id);
91
+ if (!$id && $id != 0) return false;
92
+
93
+ $title = (isset($request['rule_name']) ? $request['rule_name'] : 'New');
94
+ $slug = str_replace(' ', '-', strtolower($title));
95
+
96
+ // To Lowercase.
97
+ $slug = strtolower($slug);
98
+
99
+ // Encoding String with Space.
100
+ $slug = str_replace(' ', '-', $slug);
101
+
102
+ if ($id) {
103
+ $post = [
104
+ 'ID' => $id,
105
+ 'post_title' => $title,
106
+ 'post_name' => $slug,
107
+ 'post_content' => 'New Rule',
108
+ 'post_type' => $this->post_type,
109
+ 'post_status' => 'publish'
110
+ ];
111
+ wp_update_post($post);
112
+ } else {
113
+ $post = [
114
+ 'post_title' => $title,
115
+ 'post_name' => $slug,
116
+ 'post_content' => 'New Rule',
117
+ 'post_type' => $this->post_type,
118
+ 'post_status' => 'publish'
119
+ ];
120
+ $id = wp_insert_post($post);
121
+ }
122
+
123
+ $form = [
124
+ 'rule_name',
125
+ 'rule_descr',
126
+ 'rule_method',
127
+ 'qty_based_on',
128
+ 'date_from',
129
+ 'date_to',
130
+ 'apply_to',
131
+ 'customer',
132
+ 'min_qty',
133
+ 'max_qty',
134
+ 'discount_type',
135
+ 'to_discount',
136
+ 'status',
137
+ 'customer',
138
+ 'discount_range',
139
+ 'rule_order'
140
+ ];
141
+
142
+ //--------------------------------------------------------------------------------------------------------------
143
+ // Manage Products with it's ID or Category.
144
+ $apply_to = 'all_products';
145
+
146
+ if (isset($request['apply_to'])) $apply_to = $request['apply_to'];
147
+
148
+ if ($apply_to == 'specific_category') {
149
+ $apply_to = 'category_to_apply';
150
+ } elseif ($apply_to == 'specific_products') {
151
+ $apply_to = 'product_to_apply';
152
+ }
153
+ $form[] = $apply_to;
154
+
155
+ if (isset($request[$apply_to])) $request[$apply_to] = json_encode($request[$apply_to]);
156
+ //--------------------------------------------------------------------------------------------------------------
157
+
158
+ // Manage Users.
159
+ $apply_to = 'all';
160
+
161
+ if (isset($request['customer'])) $apply_to = $request['customer'];
162
+
163
+ if ($apply_to == 'only_given') {
164
+ $apply_to = 'users_to_apply';
165
+ }
166
+ $form[] = $apply_to;
167
+
168
+ if (isset($request[$apply_to])) $request[$apply_to] = json_encode($request[$apply_to]);
169
+ //--------------------------------------------------------------------------------------------------------------
170
+
171
+ // Manage list of Discount Ranges.
172
+ if (isset($request['discount_range'])) {
173
+
174
+ foreach ($request['discount_range'] as $index => $value) {
175
+ $request['discount_range'][$index] = woo_dicount_rules_generalHelper::makeString($value);
176
+ }
177
+
178
+ $request['discount_range'] = json_encode($request['discount_range']);
179
+ } else {
180
+ // Reset the Discount Range, if its empty.
181
+ $request['discount_range'] = '';
182
+ }
183
+
184
+ $request['status'] = 'publish';
185
+
186
+ if (is_null($id) || !isset($id)) return false;
187
+
188
+ foreach ($request as $index => $value) {
189
+ if (in_array($index, $form)) {
190
+ if (get_post_meta($id, $index)) {
191
+ update_post_meta($id, $index, $value);
192
+ } else {
193
+ add_post_meta($id, $index, $value);
194
+ }
195
+ }
196
+ }
197
+ }
198
+
199
+ /**
200
+ * Load View with Specif post id.
201
+ *
202
+ * @param $option
203
+ * @param integer $id Post ID.
204
+ * @return string mixed response.
205
+ */
206
+ public function view($option, $id)
207
+ {
208
+ $id = intval($id);
209
+ if (!$id) return false;
210
+ $post = get_post($id, 'OBJECT');
211
+ if (isset($post)) {
212
+ if (isset($post->ID)) {
213
+ $post->meta = get_post_meta($post->ID);
214
+ }
215
+ }
216
+ return $post;
217
+ }
218
+
219
+ // -------------------------------------------------RULE IMPLEMENTATION---------------------------------------------
220
+
221
+ /**
222
+ * To Analyzing the Pricing Rules to Apply the Discount in terms of price.
223
+ */
224
+ public function analyse($woocommerce)
225
+ {
226
+ $this->organizeRules();
227
+ $this->applyRules();
228
+ $this->initAdjustment();
229
+ }
230
+
231
+ /**
232
+ * To Organizing the rules to make possible sets.
233
+ */
234
+ public function organizeRules()
235
+ {
236
+ // Loads the Rules to Global.
237
+ $this->getRules();
238
+ // Validate and Re-Assign the Rules.
239
+ $this->filterRules();
240
+ }
241
+
242
+ /**
243
+ * To Get Set of Rules.
244
+ *
245
+ * @return mixed
246
+ */
247
+ public function getRules($onlyCount = false)
248
+ {
249
+ $posts = get_posts(array('post_type' => $this->post_type));
250
+ if ($onlyCount) return count($posts);
251
+ if (isset($posts) && count($posts) > 0) {
252
+ foreach ($posts as $index => $item) {
253
+ $posts[$index]->meta = get_post_meta($posts[$index]->ID);
254
+ }
255
+
256
+ $this->rules = $posts;
257
+ }
258
+ return $posts;
259
+ }
260
+
261
+ /**
262
+ * To Updating the Log of Implemented Price Discounts.
263
+ *
264
+ * @return bool
265
+ */
266
+ public function makeLog()
267
+ {
268
+ if (is_null($this->matched_sets)) return false;
269
+
270
+ $discount_log = [
271
+ 'line_discount' => $this->matched_sets,
272
+ ];
273
+ WC()->session->set('woo_price_discount', json_encode($discount_log));
274
+ }
275
+
276
+ /**
277
+ * List of Checklist.
278
+ */
279
+ public function checkPoint()
280
+ {
281
+ // Apply rules with products.
282
+ // NOT YET USED.
283
+ if ($this->discount_applied) return true;
284
+ }
285
+
286
+ /**
287
+ * Filter the Rules with some validations.
288
+ */
289
+ public function filterRules()
290
+ {
291
+ $rules = $this->rules;
292
+
293
+ if (is_null($rules) || !isset($rules)) return false;
294
+
295
+ // Start with empty set.
296
+ $rule_set = [];
297
+
298
+ foreach ($rules as $index => $rule) {
299
+ $status = (isset($rule->status) ? $rule->status : false);
300
+
301
+ // To Check as Plugin Active - InActive.
302
+ if ($status == 'publish') {
303
+ $date_from = (isset($rule->date_from) ? strtotime($rule->date_from) : false);
304
+ $date_to = (isset($rule->date_to) ? strtotime($rule->date_to) : false);
305
+ $today = strtotime(date('m/d/Y'));
306
+
307
+ // Validating Rule with Date of Expiry.
308
+ if (($date_from <= $today) && ($date_to > $today)) {
309
+
310
+ // Validating the Rule with its Order ID.
311
+ if (isset($rule->rule_order)) {
312
+ // If Order ID is '-', then this rule not going to implement.
313
+ if ($rule->rule_order !== '-') {
314
+ $rule_set[] = $rule;
315
+ }
316
+ }
317
+ }
318
+ }
319
+ }
320
+ $this->rules = $rule_set;
321
+
322
+ // To Order the Rules, based on its order ID.
323
+ $this->orderRules();
324
+ }
325
+
326
+ /**
327
+ * Ordering the Set of Rules.
328
+ *
329
+ * @return bool
330
+ */
331
+ public function orderRules()
332
+ {
333
+ if (empty($this->rules)) return false;
334
+
335
+ $ordered_rules = [];
336
+
337
+ // Make associative array with Order ID.
338
+ foreach ($this->rules as $index => $rule) {
339
+ if (isset($rule->rule_order)) {
340
+ if ($rule->rule_order != '') {
341
+ $ordered_rules[$rule->rule_order] = $rule;
342
+ }
343
+ }
344
+ }
345
+ // Order the Rules with it's priority.
346
+ ksort($ordered_rules);
347
+
348
+ $this->rules = $ordered_rules;
349
+ }
350
+
351
+ /**
352
+ * Apply the Rules to line items.
353
+ *
354
+ * @return bool
355
+ */
356
+ public function applyRules()
357
+ {
358
+ global $woocommerce;
359
+ // If there is no rules, then return false.
360
+ if (!isset($this->rules)) return false;
361
+
362
+ // Check point having list of checklist to apply.
363
+ if ($this->checkPoint()) return false;
364
+
365
+ // To Generate Valid Rule sets.
366
+ $this->generateRuleSets($woocommerce);
367
+ // Sort cart by price ascending
368
+ $cart_contents = $this->sortCartPrice($woocommerce->cart->cart_contents, 'asc');
369
+ foreach ($cart_contents as $index => $item) {
370
+ $this->matchRules($index, $item);
371
+ }
372
+ $this->makeLog();
373
+ }
374
+
375
+ /**
376
+ * Generate the Suitable and active rule sets.
377
+ *
378
+ * @param $woocommerce
379
+ * @return bool
380
+ */
381
+ public function generateRuleSets($woocommerce)
382
+ {
383
+ $rule_sets = [];
384
+
385
+ if (!isset($this->rules)) return false;
386
+
387
+ // Loop the Rules set to collect matched rules.
388
+ foreach ($this->rules as $index => $rule) {
389
+ // General Rule Info.
390
+ $rule_sets[$index]['discount_type'] = 'price_discount';
391
+ $rule_sets[$index]['name'] = (isset($rule->rule_name) ? $rule->rule_name : 'Rule_' . $index);
392
+ $rule_sets[$index]['descr'] = (isset($rule->rule_descr) ? $rule->rule_descr : '');
393
+ $rule_sets[$index]['method'] = (isset($rule->rule_method) ? $rule->rule_method : 'qty_based');
394
+ $rule_sets[$index]['qty_based_on'] = (isset($rule->qty_based_on) ? $rule->qty_based_on : 'each_product');
395
+ $rule_sets[$index]['date_from'] = (isset($rule->date_from) ? $rule->date_from : false);
396
+ $rule_sets[$index]['date_to'] = (isset($rule->date_to) ? $rule->date_to : false);
397
+
398
+ // List the type of apply, by Product or by Category.
399
+ if (isset($rule->apply_to)) {
400
+ // If Rule is processed by Specific Products, then..
401
+ if ($rule->apply_to == 'specific_products') {
402
+ if (isset($rule->product_to_apply)) {
403
+ $rule_sets[$index]['type']['specific_products'] = $this->checkWithProducts($rule, $woocommerce);
404
+ }
405
+ } else if ($rule->apply_to == 'specific_category') {
406
+ if (isset($rule->category_to_apply)) {
407
+ $rule_sets[$index]['type']['specific_category'] = $this->checkWithCategory($rule, $woocommerce);
408
+ }
409
+ } else {
410
+ $rule_sets[$index]['type'] = 'all';
411
+ }
412
+
413
+ $rule_sets[$index]['discount'] = 0;
414
+ if (isset($rule->discount_range)) {
415
+ if ($rule->discount_range != '') {
416
+ $rule_sets[$index]['discount'] = $this->getDiscountRangeList($rule);
417
+ }
418
+ }
419
+
420
+ // Default setup for all customers.
421
+ $rule_sets[$index]['allow']['users'] = 'all';
422
+ // If Rule is processed by Specific Customers, then..
423
+ if ($rule->customer == 'only_given') {
424
+ if (isset($rule->users_to_apply)) {
425
+ $rule_sets[$index]['allow']['users'] = $this->checkWithUsers($rule, $woocommerce);
426
+ }
427
+ }
428
+ }
429
+
430
+ // If Current Customer is not Allowed to use this discount, then it's going to be removed.
431
+ if ($rule_sets[$index]['allow']['users'] == 'no') {
432
+ unset($rule_sets[$index]);
433
+ }
434
+ }
435
+ $this->rule_sets = $rule_sets;
436
+ }
437
+
438
+ /**
439
+ * Fetch back the Matched rules.
440
+ *
441
+ * @param $index
442
+ * @param array $item line item.
443
+ */
444
+ public function matchRules($index, $item)
445
+ {
446
+ $applied_rules = [];
447
+ $quantity = (isset($item['quantity']) ? $item['quantity'] : 0);
448
+ $i = 0;
449
+ foreach ($this->rule_sets as $id => $rule) {
450
+
451
+ if (isset($rule['type'])) {
452
+
453
+ // Working with Products and Category.
454
+ if (isset($rule['type']['specific_products'])) {
455
+ if ($this->isItemInProductList($rule['type']['specific_products'], $item)) {
456
+ $applied_rules[$i]['amount'] = $this->getAdjustmentAmount($quantity, (object)$this->array_first($rule['discount']));
457
+ $applied_rules[$i]['name'] = $rule['name'];
458
+ $applied_rules[$i]['item'] = $index;
459
+ $applied_rules[$i]['id'] = $item['product_id'];
460
+ }
461
+ } elseif (isset($rule['type']['specific_category'])) {
462
+ if ($this->isItemInCategoryList($rule['type']['specific_category'], $item)) {
463
+ $applied_rules[$i]['amount'] = $this->getAdjustmentAmount($quantity, (object)$this->array_first($rule['discount']));
464
+ $applied_rules[$i]['name'] = $rule['name'];
465
+ $applied_rules[$i]['item'] = $index;
466
+ $applied_rules[$i]['id'] = $item['product_id'];
467
+ }
468
+ } else {
469
+ $applied_rules[$i]['amount'] = $this->getAdjustmentAmount($quantity, (object)$this->array_first($rule['discount']));
470
+ $applied_rules[$i]['name'] = $rule['name'];
471
+ $applied_rules[$i]['item'] = $index;
472
+ $applied_rules[$i]['id'] = $item['product_id'];
473
+ }
474
+ }
475
+ $i++;
476
+ }
477
+ $this->matched_sets[$index] = $applied_rules;
478
+ }
479
+
480
+ /**
481
+ * Return the First index.
482
+ *
483
+ * @param $array
484
+ * @return mixed
485
+ */
486
+ public function array_first($array)
487
+ {
488
+ if (!is_array($array)) return $array;
489
+ foreach ($array as $first) {
490
+ return $first;
491
+ }
492
+ }
493
+
494
+ /**
495
+ * Return the Adjustment amount.
496
+ *
497
+ * @param $quantity
498
+ * @param $discount_range
499
+ * @return array|bool
500
+ */
501
+ public function getAdjustmentAmount($quantity, $discount_range)
502
+ {
503
+ $adjustment = [];
504
+ if (!is_array($discount_range) && !is_object($discount_range)) return false;
505
+
506
+ $range = $discount_range;
507
+ $min = (isset($range->min_qty) ? $range->min_qty : 0);
508
+ $max = (isset($range->max_qty) ? $range->max_qty : false);
509
+
510
+ $type = (isset($range->discount_type) ? $range->discount_type : 'price_discount');
511
+
512
+ if ($max == false) return false;
513
+
514
+ if ((int)$min <= (int)$quantity && (int)$max >= (int)$quantity) {
515
+ $adjustment[$type] = (isset($range->to_discount) ? $range->to_discount : 0);
516
+ }
517
+ return $adjustment;
518
+ }
519
+
520
+ /**
521
+ * Validating the Active user with rule sets.
522
+ *
523
+ * @param $rule
524
+ * @return string
525
+ */
526
+ public function manageUserAccess($rule)
527
+ {
528
+ $allowed = 'no';
529
+ if (!isset($rule->users_to_apply)) return $allowed;
530
+
531
+ $users = $rule->users_to_apply;
532
+
533
+ if (is_string($users)) $users = json_decode($users, True);
534
+
535
+ if (!is_array($users)) return $allowed;
536
+
537
+ $user = get_current_user_id();
538
+
539
+ if (count(array_intersect($users, [$user])) > 0) {
540
+ $allowed = 'yes';
541
+ }
542
+
543
+ return $allowed;
544
+ }
545
+
546
+ /**
547
+ * To Check active cart items are in the rules list item.
548
+ *
549
+ * @param $product_list
550
+ * @param $product
551
+ * @return bool
552
+ */
553
+ public function isItemInProductList($product_list, $product)
554
+ {
555
+ if (!isset($product['product_id'])) return false;
556
+ if (count(array_intersect($product_list, [$product['product_id']])) == 1) {
557
+ return true;
558
+ } else {
559
+ return false;
560
+ }
561
+ }
562
+
563
+ /**
564
+ * To Check that the items are in specified category.
565
+ *
566
+ * @param $category_list
567
+ * @param $product
568
+ * @return bool
569
+ */
570
+ public function isItemInCategoryList($category_list, $product)
571
+ {
572
+
573
+ $helper = new woo_dicount_rules_generalHelper();
574
+ $all_category = $helper->getCategoryList();
575
+ if (!isset($product['product_id'])) return false;
576
+ $product_category = woo_dicount_rules_generalHelper::getCategoryByPost($product);
577
+
578
+ $status = false;
579
+
580
+ // Simple Check with Active Categories.
581
+ if (count(array_intersect($category_list, array_keys($all_category))) > 0) {
582
+ if (count(array_intersect($category_list, $product_category)) == 1) {
583
+ $status = true;
584
+ }
585
+ }
586
+
587
+ return $status;
588
+ }
589
+
590
+ /**
591
+ *
592
+ */
593
+ public function isUserInCustomerList()
594
+ {
595
+
596
+ }
597
+
598
+ /**
599
+ * Sort cart by price
600
+ *
601
+ * @access public
602
+ * @param array $cart
603
+ * @param string $order
604
+ * @return array
605
+ */
606
+ public function sortCartPrice($cart, $order)
607
+ {
608
+ $cart_sorted = array();
609
+
610
+ foreach ($cart as $cart_item_key => $cart_item) {
611
+ $cart_sorted[$cart_item_key] = $cart_item;
612
+ }
613
+
614
+ uasort($cart_sorted, array($this, 'sortCartByPrice_' . $order));
615
+
616
+ return $cart_sorted;
617
+ }
618
+
619
+ /**
620
+ * Sort cart by price uasort collable - ascending
621
+ *
622
+ * @access public
623
+ * @param mixed $first
624
+ * @param mixed $second
625
+ * @return bool
626
+ */
627
+ public function sortCartByPrice_asc($first, $second)
628
+ {
629
+ if (isset($first['data'])) {
630
+ if ($first['data']->get_price() == $second['data']->get_price()) {
631
+ return 0;
632
+ }
633
+ }
634
+ return ($first['data']->get_price() < $second['data']->get_price()) ? -1 : 1;
635
+ }
636
+
637
+ /**
638
+ * Sort cart by price uasort collable - descending
639
+ *
640
+ * @access public
641
+ * @param mixed $first
642
+ * @param mixed $second
643
+ * @return bool
644
+ */
645
+ public function sortCartByPrice_desc($first, $second)
646
+ {
647
+ if (isset($first['data'])) {
648
+ if ($first['data']->get_price() == $second['data']->get_price()) {
649
+ return 0;
650
+ }
651
+ }
652
+ return ($first['data']->get_price() > $second['data']->get_price()) ? -1 : 1;
653
+ }
654
+
655
+ /**
656
+ * Return the List of Products to Apply.
657
+ *
658
+ * @param $woocommerce
659
+ * @param $rule
660
+ * @return array
661
+ */
662
+ public function checkWithProducts($rule, $woocommerce)
663
+ {
664
+ $specific_product_list = [];
665
+ if (is_string($rule->product_to_apply)) {
666
+ $specific_product_list = json_decode($rule->product_to_apply, true);
667
+ }
668
+ return $specific_product_list;
669
+ }
670
+
671
+ /**
672
+ * Check with category list.
673
+ *
674
+ * @param $rule
675
+ * @param $woocommerce
676
+ * @return array|mixed
677
+ */
678
+ public function checkWithCategory($rule, $woocommerce)
679
+ {
680
+ $specific_category_list = [];
681
+ if (is_string($rule->category_to_apply)) {
682
+ $specific_category_list = json_decode($rule->category_to_apply, true);
683
+ }
684
+ return $specific_category_list;
685
+ }
686
+
687
+ /**
688
+ * Check with User list.
689
+ *
690
+ * @param $rule
691
+ * @param $woocommerce
692
+ * @return array|mixed
693
+ */
694
+ public function checkWithUsers($rule, $woocommerce)
695
+ {
696
+ // Return as , User is allowed to use this discount or not.
697
+ // Working Users.
698
+ return $this->manageUserAccess($rule);
699
+ }
700
+
701
+ /**
702
+ * To Return the Discount Ranges.
703
+ *
704
+ * @param $rule
705
+ * @return array|mixed
706
+ */
707
+ public function getDiscountRangeList($rule)
708
+ {
709
+ $discount_range_list = [];
710
+ if (is_string($rule->discount_range)) {
711
+ $discount_range_list = json_decode($rule->discount_range);
712
+ }
713
+ return $discount_range_list;
714
+ }
715
+
716
+ /**
717
+ * For Display the price discount of a product.
718
+ */
719
+ public function priceTable()
720
+ {
721
+ global $product;
722
+
723
+ $config = $this->baseConfig;
724
+ $show_discount = true;
725
+ // Base Config to Check whether display table or not.
726
+ if (isset($config['show_discount_table'])) {
727
+ if ($config['show_discount_table'] == 'show') {
728
+ $show_discount = true;
729
+ } else {
730
+ $show_discount = false;
731
+ }
732
+ }
733
+ // If Only allowed to display, then only its display the table.
734
+ if ($show_discount) {
735
+ $table_data = $this->generateDiscountTableData($product);
736
+ $path = WOO_DISCOUNT_DIR . '/view/template/discount-table.php';
737
+ echo $this->generateTableHtml($table_data, $path);
738
+ }
739
+
740
+ }
741
+
742
+ /**
743
+ * To generate the Discount table data.
744
+ *
745
+ * @param $product
746
+ * @return array|bool|string
747
+ */
748
+ public function generateDiscountTableData($product)
749
+ {
750
+ $id = ((isset($product->id) && $product->id != 0 && $product->id != null) ? $product->id : 0);
751
+ if ($id == 0) return false;
752
+
753
+ $this->organizeRules();
754
+
755
+ $discount_range = '';
756
+ foreach ($this->rules as $index => $rule) {
757
+ $status = false;
758
+ if ($rule->apply_to == 'specific_products') {
759
+
760
+ // Check with Product Filter.
761
+ $products_to_apply = json_decode($rule->product_to_apply);
762
+
763
+ if ($rule->product_to_apply == null) $status = true;
764
+
765
+ if ($rule->product_to_apply != null) {
766
+ $status = false;
767
+ if (array_intersect($products_to_apply, [$id]) > 0) {
768
+ $status = true;
769
+ }
770
+ }
771
+ } elseif ($rule->apply_to == 'specific_category') {
772
+
773
+ // Check with Product Category Filter.
774
+ $category = woo_dicount_rules_generalHelper::getCategoryByPost($id, true);
775
+ $category_to_apply = json_decode($rule->category_to_apply);
776
+
777
+ if ($rule->category_to_apply == null) $status = true;
778
+
779
+ if ($rule->category_to_apply != null) {
780
+ woo_dicount_rules_generalHelper::toInt($category_to_apply);
781
+ $status = false;
782
+ if (count(array_intersect($category_to_apply, $category)) > 0) {
783
+ $status = true;
784
+ }
785
+ }
786
+
787
+ } else if ($rule->apply_to == 'all_products') {
788
+ $status = true;
789
+ }
790
+
791
+ // Check with Active User Filter.
792
+ if (isset($rule->customer)) {
793
+ $status = false;
794
+ if ($rule->customer == 'all') {
795
+ $status = true;
796
+ } else {
797
+ $users = (is_string($rule->users_to_apply) ? json_decode($rule->users_to_apply, true) : []);
798
+ $user_id = get_current_user_id();
799
+ if (count(array_intersect($users, [$user_id])) > 0) {
800
+ $status = true;
801
+ }
802
+ }
803
+ }
804
+ if ($status) {
805
+ $discount_range[] = (isset($rule->discount_range) ? json_decode($rule->discount_range) : []);
806
+ }
807
+ }
808
+ return $discount_range;
809
+ }
810
+
811
+ /**
812
+ * To Return the HTML table for show available discount ranges.
813
+ *
814
+ * @param $table_data
815
+ * @param $path
816
+ * @return bool|string
817
+ */
818
+ public function generateTableHtml($table_data, $path)
819
+ {
820
+ ob_start();
821
+ if (!isset($table_data)) return false;
822
+ if (!isset($path) || empty($path) || is_null($path)) return false;
823
+ if (!file_exists($path)) return false;
824
+ include($path);
825
+ $html = ob_get_contents();
826
+ ob_clean();
827
+ return $html;
828
+ }
829
+
830
+ /**
831
+ * Start Implementing the adjustments.
832
+ *
833
+ * @return bool
834
+ */
835
+ public function initAdjustment()
836
+ {
837
+ global $woocommerce;
838
+
839
+ $type = 'all';
840
+
841
+ $cart_items = $woocommerce->cart->cart_contents;
842
+
843
+ foreach ($cart_items as $cart_item_key => $cart_item) {
844
+ $this->applyAdjustment($cart_item, $cart_item_key, $type);
845
+ }
846
+ }
847
+
848
+ /**
849
+ * Start Implement adjustment on individual items in the cart.
850
+ *
851
+ * @param $cart_item
852
+ * @param $cart_item_key
853
+ * @param $type
854
+ * @return bool
855
+ */
856
+ public function applyAdjustment($cart_item, $cart_item_key, $type)
857
+ {
858
+ global $woocommerce;
859
+
860
+ // All Sets are Collected properly, just process with that.
861
+ if (!isset($cart_item)) return false;
862
+
863
+ // If Product having the rule sets then,
864
+ if (!isset($this->matched_sets[$cart_item_key])) return false;
865
+
866
+ $adjustment_set = $this->matched_sets[$cart_item_key];
867
+
868
+ $price = $woocommerce->cart->cart_contents[$cart_item_key]['data']->price;
869
+
870
+ if ($type == 'first') {
871
+ // For Apply the First Rule.
872
+ $discount = $this->getAmount($adjustment_set, $price, 'first');
873
+ $amount = $price - $discount;
874
+ $log = 'Discount | ' . $discount;
875
+ $this->applyDiscount($cart_item_key, $amount, $log);
876
+ } else if ($type == 'biggest') {
877
+ // For Apply the Biggest Discount.
878
+ $discount = $this->getAmount($adjustment_set, $price, 'biggest');
879
+ $amount = $price - $discount;
880
+ $log = 'Discount | ' . $discount;
881
+ $this->applyDiscount($cart_item_key, $amount, $log);
882
+ } else {
883
+ // For Apply All Rules.
884
+ $discount = $this->getAmount($adjustment_set, $price);
885
+ $amount = $price - $discount;
886
+ $log = 'Discount | ' . $discount;
887
+ $this->applyDiscount($cart_item_key, $amount, $log);
888
+ }
889
+ }
890
+
891
+ /**
892
+ * To Get Amount based on the Setting that specified.
893
+ *
894
+ * @param $sets
895
+ * @param $price
896
+ * @param string $by
897
+ * @return bool|float|int
898
+ */
899
+ public function getAmount($sets, $price, $by = 'all')
900
+ {
901
+ $discount = 0;
902
+ $overall_discount = 0;
903
+
904
+ if (!isset($sets) || empty($sets)) return false;
905
+
906
+ if ($price == 0) return $price;
907
+
908
+ // For the biggest price, it compares the current product's price.
909
+ if ($by == 'biggest') {
910
+ $discount = $this->getBiggestDiscount($sets, $price);
911
+ return $discount;
912
+ }
913
+
914
+ foreach ($sets as $id => $set) {
915
+ // For the First price, it will return the amount after get hit.
916
+ if ($by == 'first') {
917
+ if (isset($set['amount']['percentage_discount'])) {
918
+ $discount = ((int)$price / 100) * (int)$set['amount']['percentage_discount'];
919
+ } else if (isset($set['amount']['price_discount'])) {
920
+ $discount = $set['amount']['price_discount'];
921
+ }
922
+ return $discount;
923
+ } else {
924
+ // For All, All rules going to apply.
925
+ if (isset($set['amount']['percentage_discount'])) {
926
+ $discount = ((int)$price / 100) * (int)$set['amount']['percentage_discount'];
927
+ } else if (isset($set['amount']['price_discount'])) {
928
+ $discount = $set['amount']['price_discount'];
929
+ }
930
+ // Append all Discounts.
931
+ $overall_discount = $overall_discount + $discount;
932
+ }
933
+ }
934
+ return $overall_discount;
935
+ }
936
+
937
+ /**
938
+ * To Return the Biggest Discount across the available rule sets.
939
+ *
940
+ * @param $discount_list
941
+ * @param $price
942
+ * @return float|int
943
+ */
944
+ public function getBiggestDiscount($discount_list, $price)
945
+ {
946
+ $big = 0;
947
+ $amount = $price;
948
+ foreach ($discount_list as $id => $discount_item) {
949
+ $amount_type = (isset($discount_item['amount']['percentage_discount']) ? 'percentage_discount' : 'price_discount');
950
+ if ($amount_type == 'percentage_discount') {
951
+ if (isset($discount_item['amount']['percentage_discount'])) {
952
+ $amount = (($price / 100) * $discount_item['amount']['percentage_discount']);
953
+ }
954
+ } else {
955
+ if (isset($discount_item['amount']['price_discount'])) {
956
+ $amount = $discount_item['amount']['price_discount'];
957
+ }
958
+ }
959
+
960
+ if ((int)$big < (int)$amount) {
961
+ $big = $amount;
962
+ }
963
+ }
964
+ return $big;
965
+ }
966
+
967
+ /**
968
+ * Finally Apply the Discount to the Cart item by update to WooCommerce Instance.
969
+ *
970
+ * @param $item
971
+ * @param $amount
972
+ * @param $log
973
+ */
974
+ public function applyDiscount($item, $amount, $log)
975
+ {
976
+ global $woocommerce;
977
+ // Make sure item exists in cart
978
+ if (!isset($woocommerce->cart->cart_contents[$item])) {
979
+ return;
980
+ }
981
+
982
+ // Log changes
983
+ $woocommerce->cart->cart_contents[$item]['woo_discount'] = array(
984
+ 'original_price' => get_option('woocommerce_tax_display_cart') == 'excl' ? $woocommerce->cart->cart_contents[$item]['data']->get_price_excluding_tax() : $woocommerce->cart->cart_contents[$item]['data']->get_price_including_tax(),
985
+ 'log' => $log,
986
+ );
987
+
988
+ // Actually adjust price in cart
989
+ $woocommerce->cart->cart_contents[$item]['data']->price = $amount;
990
+
991
+ }
992
+
993
+ /**
994
+ * For Show the Actual Discount of a product.
995
+ *
996
+ * @param integer $item_price Actual Price.
997
+ * @param object $cart_item Cart Items.
998
+ * @param string $cart_item_key to identify the item from cart.
999
+ * @return string processed price of a product.
1000
+ */
1001
+ public function replaceVisiblePricesCart($item_price, $cart_item, $cart_item_key)
1002
+ {
1003
+
1004
+ if (!isset($cart_item['woo_discount'])) {
1005
+ return $item_price;
1006
+ }
1007
+
1008
+ // Get price to display
1009
+ $price = get_option('woocommerce_tax_display_cart') == 'excl' ? $cart_item['data']->get_price_excluding_tax() : $cart_item['data']->get_price_including_tax();
1010
+
1011
+ // Format price to display
1012
+ $price_to_display = woo_dicount_rules_generalHelper::wcVersion('2.1') ? wc_price($price) : woocommerce_price($price);
1013
+ $original_price_to_display = woo_dicount_rules_generalHelper::wcVersion('2.1') ? wc_price($cart_item['woo_discount']['original_price']) : woocommerce_price($cart_item['woo_discount']['original_price']);
1014
+
1015
+ if ($cart_item['woo_discount']['original_price'] !== $price) {
1016
+ $item_price = '<span class="cart_price"><del>' . $original_price_to_display . '</del> <ins>' . $price_to_display . '</ins></span>';
1017
+ } else {
1018
+ $item_price = $price_to_display;
1019
+ }
1020
+
1021
+ return $item_price;
1022
+ }
1023
+ }
1024
+ }
loader.php ADDED
@@ -0,0 +1,167 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
3
+ /**
4
+ * Version of Woo Discount Rules.
5
+ */
6
+ define('WOO_DISCOUNT_VERSION', '1.0');
7
+ /**
8
+ * Required Version of WooCommerce to Run.
9
+ */
10
+ define('WOO_DISCOUNT_REQUIRED_WOOCOMMERCE_VERSION', '3.5');
11
+ /**
12
+ * Plugin Directory.
13
+ */
14
+ define('WOO_DISCOUNT_DIR', untrailingslashit(plugin_dir_path(__FILE__)));
15
+ /**
16
+ * Plugin Directory URI.
17
+ */
18
+ define('WOO_DISCOUNT_URI', untrailingslashit(plugin_dir_url(__FILE__)));
19
+ /**
20
+ * Plugin Base Name.
21
+ */
22
+ define('WOO_DISCOUNT_PLUGIN_BASENAME', plugin_basename(__FILE__));
23
+
24
+ include_once('includes/discount-base.php');
25
+ include_once('includes/pricing-rules.php');
26
+ include_once('helper/general-helper.php');
27
+ require_once('helper/FlycartInput/FInput.php');
28
+
29
+ // --------------------------------------------------GENERAL HOOK-------------------------------------------------------
30
+
31
+ /** Initiating Plugin */
32
+ $discountBase = new woo_dicount_rules_WooDiscountBase();
33
+ $pricingRules = new woo_dicount_rules_pricingRules();
34
+
35
+ // Enqueue Scripts/Styles - in head of admin page
36
+ add_action('admin_enqueue_scripts', 'woo_discount_addHeadScript');
37
+ // Init in Admin Menu
38
+ add_action('admin_menu', array($discountBase, 'adminMenu'));
39
+
40
+ $postData = \FlycartInput\FInput::getInstance();
41
+ // ---------------------------------------------------------------------------------------------------------------------
42
+
43
+
44
+ // --------------------------------------------------WOO DISCOUNT HOOK--------------------------------------------------
45
+
46
+
47
+ // ---------------------------------------------------------------------------------------------------------------------
48
+
49
+
50
+ // ----------------------------------------------------WooCommerce HOOK-------------------------------------------------
51
+
52
+ // Handling Tight update with wooCommerce Changes.
53
+ if ((!empty($postData->get('add-to-cart')) && is_numeric($postData->get('add-to-cart'))) || $postData->get('action', false) == 'woocommerce_add_to_cart') {
54
+ // add_action('woocommerce_add_to_cart', array($discountBase, 'handleDiscount'), 19);
55
+ } else if (!empty($postData->get('apply_coupon')) || !empty($postData->get('update_cart')) || !empty($postData->get('proceed'))) {
56
+ // add_action('woocommerce_before_cart_item_quantity_zero', array($discountBase, 'handleDiscount'), 100);
57
+ add_action('woocommerce_after_cart_item_quantity_update', array($discountBase, 'handleDiscount'), 100);
58
+
59
+ // add_action('woocommerce_update_cart_action_cart_updated', array($discountBase, 'handleDiscount'));
60
+ } else {
61
+ add_action('woocommerce_cart_loaded_from_session', array($discountBase, 'handleDiscount'), 100);
62
+ }
63
+
64
+ // Manually Update Line Item Name.
65
+ add_filter('woocommerce_cart_item_name', array($discountBase, 'modifyName'));
66
+
67
+ // Remove Filter to make the previous one as last filter.
68
+ remove_filter('woocommerce_cart_item_name', 'filter_woocommerce_cart_item_name', 10, 3);
69
+
70
+ // Alter the Display Price HTML.
71
+ add_filter('woocommerce_cart_item_price', array($pricingRules, 'replaceVisiblePricesCart'), 100, 3);
72
+ // Older Version support this hook.
73
+ add_filter('woocommerce_cart_item_price_html', array($pricingRules, 'replaceVisiblePricesCart'), 100, 3);
74
+
75
+ // Pricing Table of Individual Product.
76
+ add_filter('woocommerce_before_add_to_cart_form', array($pricingRules, 'priceTable'));
77
+
78
+ // Updating Log After Creating Order
79
+ add_action('woocommerce_thankyou', array($discountBase, 'storeLog'));
80
+ // ---------------------------------------------------------------------------------------------------------------------
81
+
82
+ // --------------------------------------------------AJAX REQUEST-------------------------------------------------------
83
+
84
+ add_action('wp_ajax_savePriceRule', array($discountBase, 'savePriceRule'));
85
+ add_action('wp_ajax_saveCartRule', array($discountBase, 'saveCartRule'));
86
+ add_action('wp_ajax_saveConfig', array($discountBase, 'saveConfig'));
87
+
88
+ add_action('wp_ajax_UpdateStatus', array($discountBase, 'updateStatus'));
89
+ add_action('wp_ajax_RemoveRule', array($discountBase, 'removeRule'));
90
+
91
+ // ---------------------------------------------------------------------------------------------------------------------
92
+
93
+ // --------------------------------------------------GENERAL FUNCTIONS--------------------------------------------------
94
+
95
+ /**
96
+ * To Append Script Wordpress.
97
+ */
98
+ if (!function_exists('woo_discount_addHeadScript')) {
99
+ function woo_discount_addHeadScript()
100
+ {
101
+ //
102
+ }
103
+ }
104
+
105
+ /**
106
+ * Adding Admin Page Script.
107
+ */
108
+ if (!function_exists('woo_discount_adminPageScript')) {
109
+ function woo_discount_adminPageScript()
110
+ {
111
+ $status = false;
112
+ $postData = \FlycartInput\FInput::getInstance();
113
+ // Plugin scripts should run only in plugin page.
114
+ if (is_admin()) {
115
+ if ($postData->get('page', false) == 'woo_discount_rules') {
116
+ $status = true;
117
+ }
118
+ // By Default, the landing page also can use this script.
119
+ } elseif (!is_admin()) {
120
+ // $status = true;
121
+ }
122
+
123
+ if ($status) {
124
+ wp_register_style('woo_discount_style', WOO_DISCOUNT_URI . '/assets/css/style.css');
125
+ wp_enqueue_style('woo_discount_style');
126
+
127
+ wp_register_style('woo_discount_style_custom', WOO_DISCOUNT_URI . '/assets/css/custom.css');
128
+ wp_enqueue_style('woo_discount_style_custom');
129
+
130
+ wp_register_style('woo_discount_style_tab', WOO_DISCOUNT_URI . '/assets/css/tabbablePanel.css');
131
+ wp_enqueue_style('woo_discount_style_tab');
132
+
133
+ // For Implementing Select Picker Library.
134
+ wp_register_style('woo_discount_style_select', WOO_DISCOUNT_URI . '/assets/css/bootstrap.select.min.css');
135
+ wp_enqueue_style('woo_discount_style_select');
136
+
137
+ wp_enqueue_script('woo_discount_script_select', WOO_DISCOUNT_URI . '/assets/js/bootstrap.select.min.js');
138
+
139
+
140
+ // -------------------------------------------------------------------------------------------------------------
141
+
142
+ wp_register_style('woo_discount_bootstrap', WOO_DISCOUNT_URI . '/assets/css/bootstrap.min.css');
143
+ wp_enqueue_style('woo_discount_bootstrap');
144
+
145
+ wp_register_script('woo_discount_jquery_ui_js_2', WOO_DISCOUNT_URI . '/assets/js/bootstrap.min.js');
146
+ wp_enqueue_script('woo_discount_jquery_ui_js_2');
147
+
148
+ wp_register_style('woo_discount_jquery_ui_css', WOO_DISCOUNT_URI . '/assets/css/jquery-ui.css');
149
+ wp_enqueue_style('woo_discount_jquery_ui_css');
150
+
151
+ wp_enqueue_script('jquery');
152
+ wp_enqueue_script('jquery-ui-core');
153
+ wp_enqueue_script('jquery-ui-datepicker');
154
+
155
+ // wp_register_style('woo_discount_select2_css', WOO_DISCOUNT_URI . '/assets/css/select2.min.css');
156
+ // wp_enqueue_style('woo_discount_select2_css');
157
+ //
158
+ // wp_register_script('woo_discount_select2_js', WOO_DISCOUNT_URI . '/assets/js/select2.min.js');
159
+ // wp_enqueue_script('woo_discount_select2_js');
160
+
161
+ wp_enqueue_script('woo_discount_script', WOO_DISCOUNT_URI . '/assets/js/app.js');
162
+
163
+ }
164
+ }
165
+ }
166
+
167
+ // ---------------------------------------------------------------------------------------------------------------------
readme.txt ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === WooCommerce Discount Rules ===
2
+ Contributors: flycart
3
+ Donate link: https://flycart.org/
4
+ Tags: woocommerce, ecommerce, discounts, coupons, promotion, campaigns, sales, price rules, advanced coupons, advanced discounts
5
+ Requires at least: 4.4.1
6
+ Tested up to: 4.7
7
+ Stable tag: 1.1
8
+ License: GPLv3 or later
9
+ License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
+
11
+ Create simple to complex discount rules, promotions for your WooCommerce online store.
12
+ == Description ==
13
+
14
+ Create any type of discount and pricing rules in your WooCommerce Store. Run flexible promotions and sell more!
15
+ Increase your sales multifold by offering flexible, customised discounts in your WooCommerce online store. Attract more customers.
16
+ Encourage bulk purchases by providing discounts.
17
+
18
+ [View Demo](http://demo.flycart.org/woo-discount-rules) | [Documentation](https://www.flycart.org/docs/wordpress/woo-discount-rules)
19
+
20
+ = Use cases =
21
+
22
+ * Buy 5 items and get 10 % discount
23
+ * Buy T-shirts from Winter Collections and save 10 %
24
+ * 20 % discount on all items in the store till December 25
25
+ * Buy 10 mugs are more and get 5% off
26
+ * All orders above $500 will get 15% discount
27
+ * Add 5 items to your shopping bag and get 10% discount
28
+ * Special offer for Customers from California. Get 25 % discount
29
+
30
+ = Adjustment rules =
31
+
32
+ * Category specific discount on product price
33
+ * Date and Time based discount on product price
34
+ * Item Quantity based discount on product price
35
+ * Cart subtotal range based discount on cart total
36
+ * Number of Items in cart
37
+ * Total Sum of Item quantities
38
+ * Shipping address based discount rule
39
+
40
+ = Conditions based on =
41
+ Products, categories, customers, customer roles, shipping location and more.
42
+
43
+ = Rules apply based on =
44
+
45
+ * Products
46
+ * Line items in cart
47
+ * Cart subtotal
48
+ * Line item quantity
49
+ * Total cart quantity
50
+
51
+ [PRO version](https://www.flycart.org/products/wordpress/woocommerce-discount-rules)
52
+
53
+ = PRO only features =
54
+
55
+ * Fixed price discount for Quantity based discount conditions ( Get $9 discount for purchasing over 6 items)
56
+ * Category specific discount conditions ( Get 25 % off on all items under Summer Collection )
57
+ * Applying multiple discount rules in a purchase (Get 5% for order above $500 and 10 % for buying more than 6 items)
58
+ * Cart discounts by sum of item quantities in cart (Order more than 10 items from any category and get 15 % discount)
59
+ * Cart discounts by selected customers (John gets 25% life time discount. Ellen gets 10 % limited period offer)
60
+ * Cart discounts by fixed price discounts (Flat $50 discount for all orders today)
61
+
62
+ = Website =
63
+
64
+ https://www.flycart.org/products/wordpress/woocommerce-discount-rules
65
+
66
+ = Documentation =
67
+
68
+ https://www.flycart.org/docs/wordpress/woo-discount-rules
69
+
70
+ == Installation ==
71
+ Just use the WordPress installer or upload to the /wp-content/plugins folder. Then Activate the WooCommerce Email Builder and Customizer plugin.
72
+ More information could be found in the documentation
73
+
74
+ = Minimum Requirements =
75
+
76
+ * WordPress 4.4.1 or greater
77
+ * WooCommerce 2.6.1 or greater
78
+ * PHP version 5.5.0 or greater
79
+ * MySQL version 5.0 or greater
80
+
81
+ == Frequently asked questions ==
82
+
83
+ == Screenshots ==
84
+
85
+ 1. Woo Discount Rules menu
86
+ 2. Price rules and Cart rules
87
+ 3. Creating a price rule
88
+ 4. Example Promotion Offers created using Woo Discount rules
89
+ 5. Discounted price is applied in the Cart
90
+
91
+ == Changelog ==
92
+
93
+ == Upgrade notice ==
view/cart-rules.php ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
3
+
4
+ $active = 'cart-rules';
5
+ include_once(WOO_DISCOUNT_DIR . '/view/includes/header.php');
6
+ include_once(WOO_DISCOUNT_DIR . '/view/includes/menu.php');
7
+
8
+ $config = (isset($config)) ? $config : '{}';
9
+
10
+ $data = [];
11
+ $rule_list = $config;
12
+
13
+ //for ( WC()->cart->get_coupons as $code => $coupon){
14
+ global $woocommerce;
15
+ // var_dump($woocommerce);
16
+ // if ( ! $valid ){
17
+ // WC()->cart->remove_coupon( $code );
18
+ // }
19
+ //}
20
+ ?>
21
+ <div class="" id="cart_rule">
22
+ <div class="row-fluid">
23
+ <div class="col-md-8">
24
+ <h4>Cart Rules</h4>
25
+ <hr>
26
+ <form method="post" action="?page=woo_discount_rules">
27
+ <div class="row">
28
+ <div class="col-md-4" id="add_new_rule_div">
29
+ <?php if (isset($rule_list)) {
30
+ if (count($rule_list) >= 3) { ?>
31
+ <a href=javascript:void(0)
32
+ class="button button-secondary">You Reach Max. Rule Limit
33
+ </a>
34
+ <?php } else {
35
+ ?>
36
+ <a href="?page=woo_discount_rules&tab=cart-rules&type=new"
37
+ id="add_new_rule"
38
+ class="button button-primary">Add New Rule
39
+ </a>
40
+ <?php
41
+ }
42
+ }
43
+
44
+ ?>
45
+
46
+ </div>
47
+ <div class="col-md-12">
48
+ <code>NOTE: Order Should not be empty ('-').If it's empty('-'), then it won't be
49
+ implemented.</code>
50
+ </div>
51
+ </div>
52
+ <div class="row">
53
+ <div class="">
54
+ <div class=""></div>
55
+ <div class="">
56
+ <table class="wp-list-table widefat fixed striped posts">
57
+ <thead>
58
+ <tr>
59
+ <td>Name</td>
60
+ <td>Start Date</td>
61
+ <td>Expired On</td>
62
+ <td>Order</td>
63
+ <td>Action</td>
64
+ </tr>
65
+ </thead>
66
+ <tbody id="cart_rule">
67
+ <?php
68
+ $i = 1;
69
+ if (is_array($rule_list)) {
70
+ if (count($rule_list) > 0) {
71
+ foreach ($rule_list as $index => $rule) {
72
+ if (!$pro && $i > 3) continue;
73
+ $meta = $rule->meta;
74
+ $status = isset($meta['status'][0]) ? $meta['status'][0] : 'disable';
75
+ $class = 'button button-secondary';
76
+
77
+ if ($status == 'publish') {
78
+ $class = 'button button-primary';
79
+ $value = 'Disable';
80
+ } else {
81
+ $class = 'button button-secondary';
82
+ $value = 'Enable';
83
+ }
84
+ ?>
85
+
86
+ <tr>
87
+ <td><?php echo(isset($meta['rule_name'][0]) ? $meta['rule_name'][0] : '-') ?></td>
88
+ <td><?php echo(isset($rule->date_from) ? $rule->date_from : '-') ?></td>
89
+ <td><?php echo(isset($rule->date_to) ? $rule->date_to : '-') ?></td>
90
+ <td><?php echo((isset($rule->rule_order) && ($rule->rule_order != '')) ? $rule->rule_order : ' - ') ?></td>
91
+ <td>
92
+ <a class="button button-primary"
93
+ href="?page=woo_discount_rules&tab=cart-rules&view=<?php echo $rule->ID ?>">
94
+ Edit
95
+ </a>
96
+ <a class="<?php echo $class; ?> cart_manage_status"
97
+ id="state_<?php echo $rule->ID ?>"><?php echo $value; ?>
98
+ </a>
99
+ <a class="button button-secondary cart_delete_rule"
100
+ id="delete_<?php echo $rule->ID ?>">Delete
101
+ </a>
102
+ </td>
103
+ </tr>
104
+ <?php
105
+ $i++;
106
+ }
107
+ }
108
+ }
109
+ ?>
110
+ </tbody>
111
+ <tfoot>
112
+ <tr>
113
+ <td>Name</td>
114
+ <td>Start Date</td>
115
+ <td>Expired On</td>
116
+ <td>Order</td>
117
+ <td>Action</td>
118
+ </tr>
119
+ </tfoot>
120
+ </table>
121
+ </div>
122
+ </div>
123
+ </div>
124
+ <hr>
125
+
126
+ <input type="hidden" name="form" value="cart_rules">
127
+ <input type="hidden" id="ajax_path" value="<?php echo admin_url('admin-ajax.php') ?>">
128
+ </form>
129
+ </div>
130
+ <div class="col-md-1"></div>
131
+ <!-- Sidebar -->
132
+ <?php include_once(__DIR__ . '/template/sidebar.php'); ?>
133
+ <!-- Sidebar END -->
134
+ </div>
135
+ </div>
136
+ <div class="clear"></div>
137
+ <?php include_once(WOO_DISCOUNT_DIR . '/view/includes/footer.php'); ?>
view/includes/cart-menu.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if (!defined('ABSPATH')) exit; // Exit if accessed directly ?>
2
+ <i><h2>Woo Discount Rules</h2></i>
3
+ <hr>
4
+ <h3 class="nav-tab-wrapper">
5
+ <a class="nav-tab" href=javascript:void(0) id="cart_general_tab">
6
+ <i class="fa fa-tags" style="font-size: 0.8em;"></i> &nbsp;General </a>
7
+ <a class="nav-tab" href=javascript:void(0) id="cart_restriction_tab">
8
+ <i class="fa fa-shopping-cart" style="font-size: 0.8em;"></i> &nbsp;Conditions </a>
9
+ <a class="nav-tab" href=javascript:void(0) id="cart_discount_tab" >
10
+ <i class="fa fa-cogs" style="font-size: 0.8em;"></i> &nbsp;Discount </a>
11
+ </h3>
view/includes/footer.php ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <?php if (!defined('ABSPATH')) exit; // Exit if accessed directly ?>
2
+ </body>
3
+ </html>
view/includes/header.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php if (!defined('ABSPATH')) exit; // Exit if accessed directly ?>
2
+ <html>
3
+ <head>
4
+ <style>
5
+ body{
6
+ width: 100% !important;
7
+ height: 100% !important;
8
+ }
9
+ </style>
10
+ <body style="background-color: rgb(241, 241, 241) !important;">
view/includes/menu.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php if (!defined('ABSPATH')) exit; // Exit if accessed directly ?>
2
+ <i><h2>Woo Discount Rules</h2></i><hr>
3
+ <h3 class="nav-tab-wrapper">
4
+ <a class="nav-tab <?php if ($active == 'pricing-rules') { echo 'nav-tab-active'; } ?>" href="?page=woo_discount_rules&amp;tab=pricing-rules">
5
+ <i class="fa fa-tags" style="font-size: 0.8em;"></i> &nbsp;Price Discount Rules </a>
6
+ <a class="nav-tab <?php if ($active == 'cart-rules') { echo 'nav-tab-active'; } ?>" href="?page=woo_discount_rules&amp;tab=cart-rules">
7
+ <i class="fa fa-shopping-cart" style="font-size: 0.8em;"></i> &nbsp;Cart Discount Rules </a>
8
+ <a class="nav-tab <?php if ($active == 'settings') { echo 'nav-tab-active'; } ?>" href="?page=woo_discount_rules&amp;tab=settings">
9
+ <i class="fa fa-cogs" style="font-size: 0.8em;"></i> &nbsp;Settings </a>
10
+ </h3>
view/includes/sub-menu.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if (!defined('ABSPATH')) exit; // Exit if accessed directly ?>
2
+ <i><h2>Woo Discount Rules</h2></i>
3
+ <hr>
4
+ <h3 class="nav-tab-wrapper">
5
+ <a class="nav-tab general_tab" href=javascript:void(0)>
6
+ <i class="fa fa-tags" style="font-size: 0.8em;"></i> &nbsp;General </a>
7
+ <a class="nav-tab restriction_tab" href=javascript:void(0)>
8
+ <i class="fa fa-shopping-cart" style="font-size: 0.8em;"></i> &nbsp;Condition </a>
9
+ <a class="nav-tab discount_tab" href=javascript:void(0)>
10
+ <i class="fa fa-cogs" style="font-size: 0.8em;"></i> &nbsp;Discount </a>
11
+ </h3>
view/pricing-rules.php ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
3
+
4
+ $active = 'pricing-rules';
5
+ include_once(WOO_DISCOUNT_DIR . '/view/includes/header.php');
6
+ include_once(WOO_DISCOUNT_DIR . '/view/includes/menu.php');
7
+
8
+ $config = (isset($config)) ? $config : '{}';
9
+
10
+ $data = [];
11
+ $rule_list = $config;
12
+ ?>
13
+
14
+ <style>
15
+ @media screen and (max-width: 600px) {
16
+ table {
17
+ width: 100%;
18
+ }
19
+
20
+ thead {
21
+ display: none;
22
+ }
23
+
24
+ tr:nth-of-type(2n) {
25
+ background-color: inherit;
26
+ }
27
+
28
+ tr td:first-child {
29
+ background: #f0f0f0;
30
+ font-weight: bold;
31
+ font-size: 1.3em;
32
+ }
33
+
34
+ tbody td {
35
+ display: block;
36
+ text-align: left;
37
+ }
38
+
39
+ tbody td:before {
40
+ content: attr(data-th);
41
+ display: block;
42
+ text-align: left;
43
+ }
44
+ }
45
+ </style>
46
+
47
+ <div class="container-fluid" id="pricing_rule">
48
+ <div class="row-fluid">
49
+ <div class="col-md-8">
50
+ <div class="">
51
+ <div class="">
52
+ <h4>Price Rules</h4>
53
+ <hr>
54
+ </div>
55
+ <div class="">
56
+ <form method="post" action="?page=woo_discount_rules">
57
+ <div class="row">
58
+ <div class="col-md-4">
59
+ <?php if (isset($rule_list)) {
60
+ if (count($rule_list) >= 3) { ?>
61
+ <a href=javascript:void(0) class="button button-secondary">You Reach Max. Rule
62
+ Limit</a>
63
+ <?php } else {
64
+ ?>
65
+ <a href="?page=woo_discount_rules&type=new" id="add_new_rule"
66
+ class="button button-primary">Add New Rule</a>
67
+ <?php
68
+ }
69
+ }
70
+
71
+ ?>
72
+ </div>
73
+ <div class="col-md-12">
74
+ <code>NOTE: Order Should not be empty ('-').If it's empty('-'), then it won't be
75
+ implemented.</code>
76
+ </div>
77
+ </div>
78
+ <div class="row">
79
+ <div class="">
80
+ <div class=""></div>
81
+ <div class="">
82
+ <table class="wp-list-table widefat fixed striped posts">
83
+ <thead>
84
+ <tr>
85
+ <td>Name</td>
86
+ <td>Start Date</td>
87
+ <td>Expired On</td>
88
+ <td>Order</td>
89
+ <td>Action</td>
90
+ </tr>
91
+ </thead>
92
+ <tbody id="pricing_rule">
93
+ <?php
94
+ $i = 1;
95
+ if (is_array($rule_list)) {
96
+ if (count($rule_list) > 0) {
97
+ foreach ($rule_list as $index => $rule) {
98
+ if (!$pro && $i > 3) continue;
99
+ $meta = $rule->meta;
100
+ $status = isset($meta['status'][0]) ? $meta['status'][0] : 'disable';
101
+ $class = 'button button-secondary';
102
+
103
+ if ($status == 'publish') {
104
+ $class = 'button button-primary';
105
+ $value = 'Disable';
106
+ } else {
107
+ $class = 'button button-secondary';
108
+ $value = 'Enable';
109
+ }
110
+ ?>
111
+
112
+ <tr>
113
+ <td><?php echo(isset($rule->rule_name) ? $rule->rule_name : '-') ?></td>
114
+ <td><?php echo(isset($rule->date_from) ? $rule->date_from : '-') ?></td>
115
+ <td><?php echo(isset($rule->date_to) ? $rule->date_to : '-') ?></td>
116
+ <td><?php echo((isset($rule->rule_order) && ($rule->rule_order != '')) ? $rule->rule_order : ' - ') ?></td>
117
+ <td>
118
+ <a class="button button-primary"
119
+ href="?page=woo_discount_rules&view=<?php echo $rule->ID ?>">
120
+ Edit
121
+ </a>
122
+ <a class="<?php echo $class; ?> manage_status"
123
+ id="state_<?php echo $rule->ID ?>"><?php echo $value; ?>
124
+ </a>
125
+ <a class="button button-secondary delete_rule"
126
+ id="delete_<?php echo $rule->ID ?>">Delete
127
+ </a>
128
+ </td>
129
+ </tr>
130
+ <?php
131
+ $i++;
132
+ }
133
+ }
134
+ }
135
+ ?>
136
+ </tbody>
137
+ <tfoot>
138
+ <tr>
139
+ <td>Name</td>
140
+ <td>Start Date</td>
141
+ <td>Expired On</td>
142
+ <td>Order</td>
143
+ <td>Action</td>
144
+ </tr>
145
+ </tfoot>
146
+ </table>
147
+ </div>
148
+ </div>
149
+ </div>
150
+ <hr>
151
+
152
+ <input type="hidden" name="form" value="pricing_rules">
153
+ <input type="hidden" id="ajax_path" value="<?php echo admin_url('admin-ajax.php') ?>">
154
+ </form>
155
+ </div>
156
+ </div>
157
+ </div>
158
+ <div class="col-md-1"></div>
159
+ <!-- Sidebar -->
160
+ <?php include_once(__DIR__ . '/template/sidebar.php'); ?>
161
+ <!-- Sidebar END -->
162
+ </div>
163
+ </div>
164
+ <div class="clear"></div>
165
+ <?php include_once(WOO_DISCOUNT_DIR . '/view/includes/footer.php'); ?>
166
+
167
+
168
+
view/settings.php ADDED
@@ -0,0 +1,144 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
3
+
4
+ $active = 'settings';
5
+ include_once(WOO_DISCOUNT_DIR . '/view/includes/header.php');
6
+ include_once(WOO_DISCOUNT_DIR . '/view/includes/menu.php');
7
+
8
+ $data = $config;
9
+
10
+ if (is_string($data)) $data = json_decode($data, true);
11
+ ?>
12
+
13
+ <div class="container-fluid">
14
+ <div class="row-fluid">
15
+ <div class="col-md-8">
16
+ <form method="post" id="discount_config">
17
+ <div class="col-md-12" align="right">
18
+ <input type="submit" id="saveConfig" value="Save Rule" class="button button-primary">
19
+ </div>
20
+ <div class="">
21
+ <div class="">
22
+ <h4>General Settings</h4>
23
+ <hr>
24
+ </div>
25
+ <div class="">
26
+ <div class="row form-group">
27
+ <div class="col-md-2">
28
+ <label>
29
+ License Key :
30
+ </label>
31
+ </div>
32
+ <div class="col-md-6">
33
+ <input type="text" class="" name="license_key"
34
+ value="<?php if (isset($data['license_key'])) echo $data['license_key']; ?>"
35
+ placeholder="Your Unique License Key">
36
+ </div>
37
+ </div>
38
+ <div class="row form-group">
39
+ <?php $data['price_setup'] = (isset($data['price_setup']) ? $data['price_setup'] : 'first'); ?>
40
+ <div class="col-md-2">
41
+ <label>
42
+ Rule Setup for Price:
43
+ </label>
44
+ </div>
45
+ <div class="col-md-6">
46
+ <select class="selectpicker" name="price_setup">
47
+ <option <?php if ($data['price_setup'] == 'first') { ?> selected=selected <?php } ?>
48
+ value="first" selected="selected">Apply first matched rule
49
+ </option>
50
+ <option
51
+ value="all" <?php if (!$pro) { ?> disabled <?php }
52
+ if ($data['price_setup'] == 'all') { ?> selected=selected <?php } ?>>
53
+ <?php if (!$pro) { ?>
54
+ Apply all matched rules <b><?php echo $suffix; ?></b>
55
+ <?php } else { ?>
56
+ Apply all matched rules
57
+ <?php } ?>
58
+ </option>
59
+ <option
60
+ value="biggest" <?php if (!$pro) { ?> disabled <?php }
61
+ if ($data['price_setup'] == 'biggest') { ?> selected=selected <?php } ?>>
62
+ <?php if (!$pro) { ?>
63
+ Apply biggest discount <b><?php echo $suffix; ?></b>
64
+ <?php } else { ?>
65
+ Apply biggest discount
66
+ <?php } ?>
67
+ </option>
68
+ </select>
69
+ </div>
70
+ </div>
71
+ <div class="row form-group">
72
+ <div class="col-md-2">
73
+ <label>
74
+ Discount Title :
75
+ </label>
76
+ </div>
77
+ <div class="col-md-6">
78
+ <input type="text" class="" name="coupon_name"
79
+ value="<?php if (isset($data['coupon_name'])) echo $data['coupon_name']; ?>"
80
+ placeholder="Discount Coupon Name">
81
+ </div>
82
+ </div>
83
+ <div class="row form-group">
84
+ <?php $data['show_discount_table'] = (isset($data['show_discount_table']) ? $data['show_discount_table'] : 'show'); ?>
85
+ <div class="col-md-2">
86
+ <label>
87
+ Discount Table :
88
+ </label>
89
+ </div>
90
+ <div class="col-md-6">
91
+ <select class="selectpicker" name="show_discount_table">
92
+ <option <?php if ($data['show_discount_table'] == 'show') { ?> selected=selected <?php } ?>
93
+ value="show">Show
94
+ </option>
95
+ <option <?php if ($data['show_discount_table'] == 'dont') { ?> selected=selected <?php } ?>
96
+ value="dont">Don't Show
97
+ </option>
98
+ </select>
99
+ </div>
100
+ </div>
101
+ <div class="row form-group">
102
+ <?php $data['cart_setup'] = (isset($data['cart_setup']) ? $data['cart_setup'] : 'first'); ?>
103
+ <div class="col-md-2">
104
+ <label>
105
+ Rule Setup for Cart:
106
+ </label>
107
+ </div>
108
+ <div class="col-md-6">
109
+ <select class="selectpicker" name="cart_setup">
110
+ <option <?php if ($data['cart_setup'] == 'first') { ?> selected=selected <?php } ?>
111
+ value="first" selected="selected">Apply first matched rule
112
+ </option>
113
+ <option
114
+ value="all" <?php if (!$pro) { ?> disabled <?php }
115
+ if ($data['cart_setup'] == 'all') { ?> selected=selected <?php } ?>>
116
+ <?php if (!$pro) { ?>
117
+ Apply all matched rules <b><?php echo $suffix; ?></b>
118
+ <?php } else { ?>
119
+ Apply all matched rules
120
+ <?php } ?>
121
+ </option>
122
+ <option
123
+ value="biggest" <?php if (!$pro) { ?> disabled <?php }
124
+ if ($data['cart_setup'] == 'biggest') { ?> selected=selected <?php } ?>>
125
+ <?php if (!$pro) { ?>
126
+ Apply biggest discount <b><?php echo $suffix; ?></b>
127
+ <?php } else { ?>
128
+ Apply biggest discount
129
+ <?php } ?>
130
+ </option>
131
+ </select>
132
+ </div>
133
+ </div>
134
+ </div>
135
+ </div>
136
+ <input type="hidden" id="ajax_path" value="<?php echo admin_url('admin-ajax.php') ?>">
137
+ </div>
138
+ <div class="col-md-1"></div>
139
+ <!-- Sidebar -->
140
+ <?php include_once(__DIR__ . '/template/sidebar.php'); ?>
141
+ <!-- Sidebar END -->
142
+ </form>
143
+ </div>
144
+ </div>
view/template/discount-table.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
3
+ if (!isset($table_data) || empty($table_data)) return false;
4
+ ?>
5
+ <table>
6
+ <thead>
7
+ <tr>
8
+ <td>Range</td>
9
+ <td>Discount</td>
10
+ </tr>
11
+ </thead>
12
+ <tbody>
13
+ <?php
14
+ $have_discount = false;
15
+ $table = $table_data;
16
+ foreach ($table as $index => $item) {
17
+ if ($item) {
18
+ $have_discount = true;
19
+ foreach ($item as $id => $value) {
20
+ ?>
21
+ <tr>
22
+ <td><?php echo $value->min_qty . ' - ' . $value->max_qty; ?></td>
23
+ <?php if ($value->discount_type == 'percentage_discount') { ?>
24
+ <td><?php echo $value->to_discount . ' %'; ?></td>
25
+ <?php } else { ?>
26
+ <td><?php echo wc_price($value->to_discount); ?></td>
27
+ <?php } ?>
28
+ </tr>
29
+ <?php }
30
+ }
31
+ }
32
+ if(!$have_discount){
33
+ echo '<tr><td colspan="2">No Active Discounts.</td></tr>';
34
+ }
35
+ ?>
36
+ </tbody>
37
+ </table>
view/template/sidebar.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if (!defined('ABSPATH')) exit; // Exit if accessed directly ?>
2
+ <div class="col-md-3">
3
+ <div class="container-fluid">
4
+ <div class="row-fluid">
5
+ <div class="col-md-12">
6
+ <div id="" align="right">
7
+ <div class="woo-side-button" class="hide-on-click">
8
+ <span id="sidebar_text">Hide</span>
9
+ <span id="sidebar_icon" class="dashicons dashicons-arrow-left"></span>
10
+ </div>
11
+ </div>
12
+ <div class="woo-side-panel">
13
+ <?php
14
+ echo woo_dicount_rules_generalHelper::getSideBarContent();
15
+ ?>
16
+ </div>
17
+ </div>
18
+ </div>
19
+ </div>
20
+ </div>
view/view-cart-rules.php ADDED
@@ -0,0 +1,473 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
3
+
4
+ $active = 'pricing-rules';
5
+ include_once(WOO_DISCOUNT_DIR . '/view/includes/header.php');
6
+ include_once(WOO_DISCOUNT_DIR . '/view/includes/sub-menu.php');
7
+
8
+ $config = (isset($config)) ? $config : '{}';
9
+ $rule_id = 0;
10
+ $form = '';
11
+
12
+ $status = 'publish';
13
+
14
+ if (is_string($config)) {
15
+ $data = json_decode($config);
16
+ } elseif (is_object($config)) {
17
+ if (isset($config->form)) {
18
+ $form = $config->form;
19
+ }
20
+ }
21
+ // Dummy Object.
22
+ $obj = new stdClass();
23
+
24
+ $data = (isset($config[0]) ? $config[0] : []);
25
+ $rule_id = (isset($data->ID)) ? $data->ID : 0;
26
+
27
+ $discounts = [];
28
+ $discount_rules = [];
29
+ if (isset($data->discount_rule)) {
30
+ $discount_rules = (is_string($data->discount_rule) ? json_decode($data->discount_rule, true) : ['' => '']);
31
+ }
32
+
33
+ foreach ($discount_rules as $index => $rule) {
34
+ foreach ($rule as $id => $value) {
35
+ $discounts[$id] = $value;
36
+ }
37
+ }
38
+ $discount_rules = $discounts;
39
+ if (empty($discount_rules)) {
40
+ $discount_rules = [0 => ''];
41
+ $type = 'subtotal_least';
42
+ }
43
+
44
+ ?>
45
+ <div class="container-fluid">
46
+ <form id="form_cart_rule">
47
+ <div class="row-fluid">
48
+ <div class="col-md-9">
49
+ <div class="col-md-12" align="right">
50
+ <input type="submit" id="saveCartRule" value="Save Rule" class="button button-primary">
51
+ <a href="?page=woo_discount_rules&tab=cart-rules" class="button button-secondary">Cancel</a>
52
+ </div>
53
+ <?php if ($rule_id == 0) { ?>
54
+ <div class="col-md-12"><h2>New Cart Rule</h2></div>
55
+ <?php } else { ?>
56
+ <div class="col-md-12"><h2>Edit Cart Rule
57
+ | <?php echo(isset($data->rule_name) ? $data->rule_name : ''); ?></h2></div>
58
+ <?php } ?>
59
+ <div class="col-md-12" id="general_block"><h4 class="text text-muted"> General</h4>
60
+ <hr>
61
+ <div class="form-group">
62
+ <div class="row">
63
+ <div class="col-md-3"><label> Order : <i
64
+ class="text-muted glyphicon glyphicon-exclamation-sign"
65
+ title="The Simple Ranking concept to said, which one is going to execute first and so on."></i></label>
66
+ </div>
67
+ <div class="col-md-6"><input type="number" class="rule_order"
68
+ id="rule_order"
69
+ name="rule_order"
70
+ value="<?php echo(isset($data->rule_order) ? $data->rule_order : ''); ?>"
71
+ placeholder="ex. 1">
72
+ <code>WARNING: More than one rule should not have same priority. </code>
73
+ </div>
74
+ </div>
75
+ </div>
76
+ <div class="form-group">
77
+ <div class="row">
78
+ <div class="col-md-3"><label> Rule Name <i
79
+ class="text-muted glyphicon glyphicon-exclamation-sign"
80
+ title="Rule Desctriptions."></i></label></div>
81
+ <div class="col-md-6"><input type="text" class="form-control rule_descr"
82
+ id="rule_name"
83
+ name="rule_name"
84
+ value="<?php echo(isset($data->rule_name) ? $data->rule_name : ''); ?>"
85
+ placeholder="ex. Standard Rule."></div>
86
+ </div>
87
+ </div>
88
+ <div class="form-group">
89
+ <div class="row">
90
+ <div class="col-md-3"><label> Rule Description <i
91
+ class="text-muted glyphicon glyphicon-exclamation-sign"
92
+ title="Rule Desctriptions."></i></label></div>
93
+ <div class="col-md-6"><input type="text" class="form-control rule_descr"
94
+ name="rule_descr"
95
+ value="<?php echo(isset($data->rule_descr) ? $data->rule_descr : ''); ?>"
96
+ id="rule_descr"></div>
97
+ </div>
98
+ </div>
99
+ <div class="form-group">
100
+ <div class="row">
101
+ <div class="col-md-3"><label> Validity <i
102
+ class="text-muted glyphicon glyphicon-exclamation-sign"
103
+ title="Period of Rule Active."></i></label></div>
104
+ <div class="col-md-6">
105
+ <div class="form-inline"><input type="text"
106
+ name="date_from"
107
+ class="form-control datepicker"
108
+ value="<?php echo(isset($data->date_from) ? $data->date_from : ''); ?>"
109
+ placeholder="From">
110
+ <input type="text" name="date_to"
111
+ class="form-control datepicker"
112
+ value="<?php echo(isset($data->date_to) ? $data->date_to : ''); ?>"
113
+ placeholder="To"></div>
114
+ </div>
115
+ </div>
116
+ </div>
117
+ <div align="right">
118
+ <input type="button" class="button button-primary restriction_tab" value="Next">
119
+ </div>
120
+ </div>
121
+
122
+ <div class="col-md-12" id="restriction_block"><h4 class="text text-muted"> Cart Conditions </h4>
123
+ <a href=javascript:void(0) id="add_cart_rule" class="button button-primary"><i
124
+ class="glyphicon glyphicon-plus"></i>
125
+ Add Condition</a>
126
+ <hr>
127
+ <div class="form-group">
128
+ <div id="cart_rules_list">
129
+ <?php
130
+ $i = 0;
131
+ foreach ($discount_rules as $rule_type => $rule) {
132
+
133
+ if (!empty($discount_rules)) {
134
+ if (!isset($discount_rules[0])) {
135
+ $type = $rule_type;
136
+ }
137
+ }
138
+
139
+ // Dummy Entry for One Rule at starting.
140
+ // Note : Must having at least one rule on starting.
141
+ $rule = (!is_null($rule) ? $rule : [0 => '1']);
142
+ ?>
143
+ <div class="cart_rules_list row">
144
+ <div class="col-md-3 form-group">
145
+ <label>
146
+ Type
147
+ <select class="form-control cart_rule_type"
148
+ id="cart_condition_type_<?php echo $i; ?>"
149
+ name="discount_rule[<?php echo $i; ?>][type]">
150
+ <optgroup label="Cart Subtotal">
151
+ <option
152
+ value="subtotal_least"<?php if ($type == 'subtotal_least') { ?> selected=selected <?php } ?>>
153
+ Subtotal at least
154
+ </option>
155
+ <option
156
+ value="subtotal_less"<?php if ($type == 'subtotal_less') { ?> selected=selected <?php } ?>>
157
+ Subtotal less than
158
+ </option>
159
+ </optgroup>
160
+ <optgroup label="Cart Item Count">
161
+ <option
162
+ value="item_count_least"<?php if ($type == 'item_count_least') { ?> selected=selected <?php } ?>>
163
+ Count of cart items at least
164
+ </option>
165
+ <option
166
+ value="item_count_less"<?php if ($type == 'item_count_less') { ?> selected=selected <?php } ?>>
167
+ Count of cart items less than
168
+ </option>
169
+ </optgroup>
170
+ <optgroup label="Quantity Sum">
171
+ <option
172
+ <?php if (!$pro) { ?> disabled <?php } else { ?> value="quantity_least" <?php
173
+ }
174
+ if ($type == 'quantity_least') { ?> selected=selected <?php } ?>>
175
+ <?php if (!$pro) { ?>
176
+ Sum of item quantities at least
177
+ <b><?php echo $suffix; ?></b>
178
+ <?php } else { ?>
179
+ Sum of item quantities at least
180
+ <?php } ?>
181
+ </option>
182
+
183
+ <option
184
+ <?php if (!$pro) { ?> disabled <?php } else { ?> value="quantity_less" <?php
185
+ }
186
+ if ($type == 'quantity_less') { ?> selected=selected <?php } ?>>
187
+ <?php if (!$pro) { ?>
188
+ Sum of item quantities less than
189
+ <b><?php echo $suffix; ?></b>
190
+ <?php } else { ?>
191
+ Sum of item quantities less than
192
+ <?php } ?>
193
+ </option>
194
+ </optgroup>
195
+ <!-- <optgroup label="Products In Cart">-->
196
+ <!---->
197
+ <!-- <!-- At least one of these should present in the cart to apply. -->
198
+
199
+ <!-- <option-->
200
+ <!-- value="products_atleast_one"-->
201
+ <?php //if ($type == 'products_atleast_one') { ?><!-- selected=selected -->
202
+ <?php //} ?><!-->
203
+ <!-- At least one product in-->
204
+ <!-- cart-->
205
+ <!-- </option>-->
206
+ <!-- <!-- These products should not present in the cart to apply. -->
207
+
208
+ <!-- <option-->
209
+ <!-- value="products_not_in"-->
210
+ <?php //if ($type == 'products_not_in') { ?><!-- selected=selected -->
211
+ <?php //} ?><!-->
212
+ <!-- None of selected products in-->
213
+ <!-- cart-->
214
+ <!-- </option>-->
215
+ <!-- </optgroup>-->
216
+ <!-- <optgroup label="Categories In Cart">-->
217
+ <!-- <!-- At least one of these should present in the cart to apply. -->
218
+
219
+ <!-- <option-->
220
+ <!-- value="categories_atleast_one"-->
221
+ <?php //if ($type == 'categories_atleast_one') { ?><!-- selected=selected -->
222
+ <?php //} ?><!-->
223
+ <!-- At least one category in-->
224
+ <!-- cart-->
225
+ <!-- </option>-->
226
+ <!-- <!-- These Category should not present in the cart to apply. -->
227
+ <!-- <option-->
228
+ <!-- value="categories_not_in"-->
229
+ <?php //if ($type == 'categories_not_in') { ?><!-- selected=selected -->
230
+ <?php //} ?><!-->
231
+ <!-- None of selected categories in-->
232
+ <!-- cart-->
233
+ <!-- </option>-->
234
+ <!-- </optgroup>-->
235
+ <optgroup label="Customer Details (must be logged in)">
236
+ <option
237
+ <?php if (!$pro) { ?> disabled <?php } else { ?> value="users_in" <?php
238
+ }
239
+ if ($type == 'users_in') { ?> selected=selected <?php } ?>>
240
+ <?php if (!$pro) { ?>
241
+ User in list <b><?php echo $suffix; ?></b>
242
+ <?php } else { ?>
243
+ User in list
244
+ <?php } ?>
245
+ </option>
246
+ <option
247
+ <?php if (!$pro) { ?> disabled <?php } else { ?> value="roles_in" <?php
248
+ }
249
+ if ($type == 'roles_in') { ?> selected=selected <?php } ?>>
250
+ <?php if (!$pro) { ?>
251
+ User role in list <b><?php echo $suffix; ?></b>
252
+ <?php } else { ?>
253
+ User role in list
254
+ <?php } ?>
255
+ </option>
256
+ <option
257
+ <?php if (!$pro) { ?> disabled <?php } else { ?> value="shipping_countries_in" <?php
258
+ }
259
+ if ($type == 'shipping_countries_in') { ?> selected=selected <?php } ?>>
260
+ <?php if (!$pro) { ?>
261
+ Shipping country in list <b><?php echo $suffix; ?></b>
262
+ <?php } else { ?>
263
+ Shipping country in list
264
+ <?php } ?>
265
+ </option>
266
+ </optgroup>
267
+ </select>
268
+ </label>
269
+ </div>
270
+ <div class="col-md-3 form-group">
271
+ <label> Value
272
+ <?php
273
+ $users_list = [];
274
+ $class = 'style="display:none"';
275
+ $hit = false;
276
+ if ($type == 'users_in') {
277
+ $users_list = $discount_rules[$type];
278
+ $class = 'style="display:block"';
279
+ $hit = true;
280
+ }
281
+ //
282
+ ?>
283
+ <div id="user_div_<?php echo $i; ?>" <?php echo $class; ?>>
284
+ <select class="user_list selectpicker"
285
+ id="cart_user_list_<?php echo $i; ?>" multiple
286
+ name="discount_rule[<?php echo $i; ?>][users_to_apply][]">
287
+ <?php foreach ($users as $index => $user) { ?>
288
+ <option
289
+ value="<?php echo $index; ?>"<?php if (in_array($index, $users_list)) { ?> selected=selected <?php } ?>><?php echo $user; ?></option>
290
+ <?php } ?>
291
+ </select>
292
+ </div>
293
+ <?php
294
+ $products_list = [];
295
+ $class = 'style="display:none"';
296
+ if ($type == 'products_atleast_one' || $type == 'products_not_in') {
297
+ $products_list = $discount_rules[$type];;
298
+ $class = 'style="display:block"';
299
+ $hit = true;
300
+ }
301
+
302
+ ?>
303
+ <div id="product_div_<?php echo $i; ?>" <?php echo $class; ?>>
304
+ <select class="product_list selectpicker"
305
+ id="cart_product_list_<?php echo $i; ?>"
306
+ multiple
307
+ name="discount_rule[<?php echo $i; ?>][product_to_apply][]">
308
+ <?php foreach ($products as $index => $product) { ?>
309
+ <option
310
+ value="<?php echo $index; ?>" <?php if (in_array($index, $products_list)) { ?> selected=selected <?php } ?>><?php echo $product; ?></option>
311
+ <?php } ?>
312
+ </select>
313
+ </div>
314
+ <?php
315
+ $category_list = [];
316
+ $class = 'style="display:none"';
317
+ if ($type == 'categories_atleast_one' || $type == 'categories_not_in') {
318
+ $category_list = $discount_rules[$type];;
319
+
320
+ $class = 'style="display:block"';
321
+ $hit = true;
322
+ }
323
+
324
+ ?>
325
+ <div id="category_div_<?php echo $i; ?>" <?php echo $class; ?>>
326
+ <select class="category_list selectpicker"
327
+ id="cart_category_list_<?php echo $i; ?>"
328
+ multiple
329
+ name="discount_rule[<?php echo $i; ?>][category_to_apply][]">
330
+ <?php foreach ($category as $index => $cat) { ?>
331
+ <option
332
+ value="<?php echo $index; ?>"<?php if (in_array($index, $category_list)) { ?> selected=selected <?php } ?>><?php echo $cat; ?></option>
333
+ <?php } ?>
334
+ </select>
335
+ </div>
336
+ <?php
337
+ $roles_list = [];
338
+ $class = 'style="display:none"';
339
+ if ($type == 'roles_in') {
340
+ $roles_list = $discount_rules[$type];;
341
+ $class = 'style="display:block"';
342
+ $hit = true;
343
+ }
344
+
345
+ ?>
346
+ <div id="roles_div_<?php echo $i; ?>" <?php echo $class; ?>>
347
+ <select class="roles_list selectpicker"
348
+ id="cart_roles_list_<?php echo $i; ?>" multiple
349
+ name="discount_rule[<?php echo $i; ?>][user_roles_to_apply][]">
350
+ <?php foreach ($userRoles as $index => $user) { ?>
351
+ <option
352
+ value="<?php echo $index; ?>"<?php if (in_array($index, $roles_list)) { ?> selected=selected <?php } ?>><?php echo $user; ?></option>
353
+ <?php } ?>
354
+ </select>
355
+ </div>
356
+ <?php
357
+ $countries_list = [];
358
+ $class = 'style="display:none"';
359
+ if ($type == 'shipping_countries_in') {
360
+ $countries_list = $discount_rules[$type];;
361
+ $class = 'style="display:block"';
362
+ $hit = true;
363
+ }
364
+
365
+ ?>
366
+ <div id="countries_div_<?php echo $i; ?>" <?php echo $class; ?>>
367
+ <select class="country_list selectpicker"
368
+ data-live-search="true"
369
+ id="cart_countries_list_<?php echo $i; ?>"
370
+ multiple
371
+ name="discount_rule[<?php echo $i; ?>][countries_to_apply][]">
372
+ <?php foreach ($countries as $index => $country) { ?>
373
+ <option
374
+ value="<?php echo $index; ?>"<?php if (in_array($index, $countries_list)) { ?> selected=selected <?php } ?>><?php echo $country; ?></option>
375
+ <?php } ?>
376
+ </select>
377
+ </div>
378
+ <?php
379
+ if ($hit) {
380
+ $class = 'style="display:none"';
381
+ } else {
382
+ $class = 'style="display:block"';
383
+ }
384
+ ?>
385
+ <div id="general_<?php echo $i; ?>" <?php echo $class; ?>>
386
+ <input type="text"
387
+ value="<?php echo(isset($discount_rules['subtotal_least']) ? $discount_rules['subtotal_least'] : ''); ?>"
388
+ name="discount_rule[<?php echo $i; ?>][option_value]">
389
+ </div>
390
+ </label>
391
+ </div>
392
+ <div class="col-md-1"><label> Action <a href=javascript:void(0)
393
+ class="button button-secondary remove_cart_rule">Remove</a>
394
+ </label></div>
395
+ </div>
396
+ <?php
397
+ $i++;
398
+ }
399
+ ?>
400
+ </div>
401
+ </div>
402
+ <div align="right">
403
+ <input type="button" class="button button-secondary general_tab" value="Previous">
404
+ <input type="button" class="button button-primary discount_tab" value="Next">
405
+ </div>
406
+ </div>
407
+
408
+ <!-- TODO: Implement ForEach Concept -->
409
+ <div class="col-md-12" id="discount_block"><h4 class="text text-muted"> Discount</h4>
410
+ <?php
411
+ $discount_type = 'percentage_discount';
412
+ $to_discount = 0;
413
+ if (isset($data)) {
414
+ if (isset($data->discount_type)) {
415
+ $discount_type = $data->discount_type;
416
+ }
417
+ if (isset($data->to_discount)) {
418
+ $to_discount = $data->to_discount;
419
+ }
420
+ }
421
+ ?>
422
+ <div class="row">
423
+ <div class="col-md-2">
424
+ <div class="form-group">
425
+ <label> Discount Type :
426
+ <select class="form-control" name="discount_type">
427
+ <option
428
+ value="percentage_discount" <?php if ($discount_type == 'percentage_discount') { ?> selected=selected <?php } ?>>
429
+ Percentage Discount
430
+ </option>
431
+ <option
432
+ <?php if (!$pro) { ?> disabled <?php } else { ?> value="price_discount" <?php }
433
+ if ($discount_type == 'price_discount') { ?> selected=selected <?php } ?>>
434
+ <?php if (!$pro) { ?>
435
+ Price Discount <b><?php echo $suffix; ?></b>
436
+ <?php } else { ?>
437
+ Price Discount
438
+
439
+ <?php } ?>
440
+ </option>
441
+ </select>
442
+ </label>
443
+ </div>
444
+ </div>
445
+ <div class="col-md-2">
446
+ <div class="form-group">
447
+ <label> value :
448
+ <input type="text" name="to_discount" class="form-control"
449
+ value="<?php echo $to_discount; ?>">
450
+ </label>
451
+ </div>
452
+ </div>
453
+ </div>
454
+ <div align="right">
455
+ <input type="button" class="button button-secondary restriction_tab" value="Previous">
456
+ </div>
457
+ </div>
458
+ </div>
459
+ </div>
460
+ <!-- Sidebar -->
461
+ <?php include_once(__DIR__ . '/template/sidebar.php'); ?>
462
+ <!-- Sidebar END -->
463
+ <input type="hidden" name="rule_id" id="rule_id" value="<?php echo $rule_id; ?>">
464
+ <input type="hidden" name="form" value="<?php echo $form; ?>">
465
+ <input type="hidden" id="ajax_path" value="<?php echo admin_url('admin-ajax.php'); ?>">
466
+ <input type="hidden" id="admin_path" value="<?php echo admin_url('admin.php?page=woo_discount_rules'); ?>">
467
+ <input type="hidden" id="pro_suffix" value="<?php echo $suffix; ?>">
468
+ <input type="hidden" id="is_pro" value="<?php echo $pro; ?>">
469
+ <!-- <input type="hidden" name="status" value="--><?php //echo $status; ?><!--">-->
470
+ </form>
471
+ </div>
472
+
473
+ <?php include_once(WOO_DISCOUNT_DIR . '/view/includes/footer.php'); ?>
view/view-pricing-rules.php ADDED
@@ -0,0 +1,314 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
3
+ $active = 'pricing-rules';
4
+ include_once(WOO_DISCOUNT_DIR . '/view/includes/header.php');
5
+ include_once(WOO_DISCOUNT_DIR . '/view/includes/sub-menu.php');
6
+
7
+ $config = (isset($config)) ? $config : '{}';
8
+ $rule_id = 0;
9
+ $form = '';
10
+
11
+ $status = 'publish';
12
+
13
+ if (is_string($config)) {
14
+ $data = json_decode($config);
15
+ } elseif (is_object($config)) {
16
+ if (isset($config->form)) {
17
+ $form = $config->form;
18
+ }
19
+ }
20
+ $data = $config;
21
+ $rule_id = (isset($data->ID)) ? $data->ID : 0;
22
+
23
+ ?>
24
+ <div class="container-fluid">
25
+ <form id="form_price_rule">
26
+ <div class="row-fluid">
27
+ <div class="col-md-8">
28
+ <div class="col-md-12" align="right">
29
+ <input type="submit" id="savePriceRule" value="Save Rule" class="button button-primary">
30
+ <a href="?page=woo_discount_rules" class="button button-secondary">Cancel</a>
31
+ </div>
32
+ <?php if ($rule_id == 0) { ?>
33
+ <div class="col-md-12"><h2>New Price Rule</h2></div>
34
+ <?php } else { ?>
35
+ <div class="col-md-12"><h2>Edit Price Rule
36
+ | <?php echo(isset($data->rule_name) ? $data->rule_name : ''); ?></h2></div>
37
+ <?php } ?>
38
+ <div class="col-md-12" id="general_block"><h4 class="text text-muted"> General</h4>
39
+ <hr>
40
+ <div class="form-group">
41
+ <div class="row">
42
+ <div class="col-md-3"><label> Order : <i
43
+ class="text-muted glyphicon glyphicon-exclamation-sign"
44
+ title="The Simple Ranking concept to said, which one is going to execute first and so on."></i></label>
45
+ </div>
46
+ <div class="col-md-6"><input type="number" class="rule_order"
47
+ id="rule_order"
48
+ name="rule_order"
49
+ min=1
50
+ value="<?php echo(isset($data->rule_order) ? $data->rule_order : '-'); ?>"
51
+ placeholder="ex. 1">
52
+ <code>WARNING: More than one rule should not have same priority. </code>
53
+ </div>
54
+ </div>
55
+ </div>
56
+ <div class="form-group">
57
+ <div class="row">
58
+ <div class="col-md-3"><label> Rule Name <i
59
+ class="text-muted glyphicon glyphicon-exclamation-sign"
60
+ title="Rule Desctriptions."></i></label></div>
61
+ <div class="col-md-6"><input type="text" class="form-control rule_descr"
62
+ id="rule_name"
63
+ name="rule_name"
64
+ value="<?php echo(isset($data->rule_name) ? $data->rule_name : ''); ?>"
65
+ placeholder="ex. Standard Rule."></div>
66
+ </div>
67
+ </div>
68
+ <div class="form-group">
69
+ <div class="row">
70
+ <div class="col-md-3"><label> Rule Description <i
71
+ class="text-muted glyphicon glyphicon-exclamation-sign"
72
+ title="Rule Desctriptions."></i></label></div>
73
+ <div class="col-md-6"><input type="text" class="form-control rule_descr"
74
+ name="rule_descr"
75
+ value="<?php echo(isset($data->rule_descr) ? $data->rule_descr : ''); ?>"
76
+ id="rule_descr"></div>
77
+ </div>
78
+ </div>
79
+ <div class="form-group">
80
+ <div class="row">
81
+ <div class="col-md-3"><label> Method <i
82
+ class="text-muted glyphicon glyphicon-exclamation-sign"
83
+ title="Method to Apply."></i></label></div>
84
+ <?php $opt = (isset($data->rule_method) ? $data->rule_method : ''); ?>
85
+ <div class="col-md-6"><select class="form-control"
86
+ name="rule_method">
87
+ <option
88
+ value="qty_based" <?php if ($opt == 'qty_based') { ?> selected=selected <?php } ?>>
89
+ Quantity Based
90
+ </option>
91
+ </select></div>
92
+ </div>
93
+ </div>
94
+ <!-- <div class="form-group">-->
95
+ <!-- <div class="row">-->
96
+ <!-- <div class="col-md-3"><label> Quantity Based On </label></div>-->
97
+ <!-- --><?php //$opt = (isset($data->qty_based_on) ? $data->qty_based_on : ''); ?>
98
+ <!-- <div class="col-md-6"><select class="form-control"-->
99
+ <!-- name="qty_based_on">-->
100
+ <!-- <option-->
101
+ <!-- value="each_product" -->
102
+ <?php //if ($opt == 'each_product') { ?><!-- selected=selected --><?php //} ?><!-->
103
+ <!-- Qty Of Each Product Individually-->
104
+ <!-- </option>-->
105
+ <!-- <option-->
106
+ <!-- value="each_variation" -->
107
+ <?php //if ($opt == 'each_variation') { ?><!-- selected=selected --><?php //} ?><!-->
108
+ <!-- Qty Of Each Variation Individually-->
109
+ <!-- </option>-->
110
+ <!-- </select></div>-->
111
+ <!-- </div>-->
112
+ <!-- </div>-->
113
+ <div class="form-group">
114
+ <div class="row">
115
+ <div class="col-md-3"><label> Validity <i
116
+ class="text-muted glyphicon glyphicon-exclamation-sign"
117
+ title="Period of Rule Active."></i></label></div>
118
+ <div class="col-md-6">
119
+ <div class="form-inline"><input type="text"
120
+ name="date_from"
121
+ class="form-control datepicker"
122
+ value="<?php echo(isset($data->date_from) ? $data->date_from : ''); ?>"
123
+ placeholder="From">
124
+ <input type="text" name="date_to"
125
+ class="form-control datepicker"
126
+ value="<?php echo(isset($data->date_to) ? $data->date_to : ''); ?>"
127
+ placeholder="To"></div>
128
+ </div>
129
+ </div>
130
+ <div align="right">
131
+ <input type="button" class="button button-primary restriction_tab" value="Next">
132
+ </div>
133
+ </div>
134
+ </div>
135
+
136
+ <div class="col-md-12" id="restriction_block"><h4 class="text text-muted"> Discount
137
+ Conditionss </h4>
138
+ <hr>
139
+ <div class="form-group">
140
+ <div class="row">
141
+ <div class="col-md-3"><label> Apply To </label></div>
142
+ <?php $opt = (isset($data->apply_to) ? $data->apply_to : ''); ?>
143
+ <div class="col-md-6"><select class="selectpicker"
144
+ name="apply_to" id="apply_to">
145
+ <option
146
+ value="all_products" <?php if ($opt == 'all_products') { ?> selected=selected <?php } ?>>
147
+ All Products
148
+ </option>
149
+ <option
150
+ <?php if (!$pro) { ?> disabled <?php } else { ?> value="specific_category" <?php }
151
+ if ($opt == 'specific_category') { ?> selected=selected <?php } ?>>
152
+ <?php if (!$pro) { ?>
153
+ Specific Categories <b><?php echo $suffix; ?></b>
154
+ <?php } else { ?>
155
+ Specific Categories
156
+ <?php } ?>
157
+ </option>
158
+ <option
159
+ value="specific_products" <?php if ($opt == 'specific_products') { ?> selected=selected <?php } ?>>
160
+ Specific Products
161
+ </option>
162
+ </select>
163
+ <div class="form-group" id="product_list">
164
+ <?php $products_list = json_decode((isset($data->product_to_apply) ? $data->product_to_apply : '{}'), true); ?>
165
+ <select class="product_list selectpicker" multiple
166
+ name="product_to_apply[]">
167
+ <?php foreach ($products as $index => $value) { ?>
168
+ <option
169
+ value="<?php echo $index; ?>" <?php if (in_array($index, $products_list)) { ?> selected=selected <?php } ?>><?php echo $value; ?></option>
170
+ <?php } ?>
171
+ </select>
172
+ </div>
173
+ <div class="form-group" id="category_list">
174
+ <?php $category_list = json_decode((isset($data->category_to_apply) ? $data->category_to_apply : '{}'), true); ?>
175
+ <select class="category_list selectpicker" multiple
176
+ name="category_to_apply[]">
177
+ <?php foreach ($category as $index => $value) { ?>
178
+ <option
179
+ value="<?php echo $index; ?>"<?php if (in_array($index, $category_list)) { ?> selected=selected <?php } ?>><?php echo $value; ?></option>
180
+ <?php } ?>
181
+ </select>
182
+ </div>
183
+ </div>
184
+ </div>
185
+ </div>
186
+ <div class="form-group">
187
+ <div class="row">
188
+ <div class="col-md-3"><label> Customers </label></div>
189
+ <?php $opt = (isset($data->customer) ? $data->customer : ''); ?>
190
+ <div class="col-md-6"><select class="selectpicker"
191
+ name="customer" id="apply_customer">
192
+ <option value="all" <?php if ($opt == 'all') { ?> selected=selected <?php } ?>>
193
+ All
194
+ </option>
195
+ <option
196
+ <?php if (!$pro) { ?> disabled <?php } else { ?> value="only_given" <?php
197
+ }
198
+ if ($opt == 'only_given') { ?> selected=selected <?php } ?>>
199
+ <?php if (!$pro) { ?>
200
+ Only Given <b><?php echo $suffix; ?></b>
201
+ <?php } else { ?>
202
+ Only Given
203
+ <?php } ?>
204
+ </option>
205
+ </select>
206
+ <div class="form-group" id="user_list">
207
+ <?php $users_list = json_decode((isset($data->users_to_apply) ? $data->users_to_apply : '{}'), true); ?>
208
+ <select class="user_list selectpicker" multiple name="users_to_apply[]">
209
+ <?php foreach ($users as $index => $value) { ?>
210
+ <option
211
+ value="<?php echo $index; ?>"<?php if (in_array($index, $users_list)) { ?> selected=selected <?php } ?>><?php echo $value; ?></option>
212
+ <?php } ?>
213
+ </select>
214
+ </div>
215
+ </div>
216
+ </div>
217
+ <div align="right">
218
+ <input type="button" class="button button-secondary general_tab" value="Previous">
219
+ <input type="button" class="button button-primary discount_tab" value="Next">
220
+ </div>
221
+ </div>
222
+ </div>
223
+
224
+ <!-- TODO: Implement ForEach Concept -->
225
+ <div class="col-md-12" id="discount_block"><h4 class="text text-muted"> Discount</h4>
226
+ <a href=javascript:void(0) class="button button-primary" id="addNewDiscountRange"><i
227
+ class="glyphicon glyphicon-plus"></i> Add New Range</a>
228
+ <hr>
229
+ <div id="discount_rule_list">
230
+ <?php
231
+ $discount_range = new stdClass();
232
+ if (isset($data->discount_range)) {
233
+ if (is_string($data->discount_range)) {
234
+ $discount_range = json_decode($data->discount_range);
235
+ } else {
236
+ $discount_range = $data->discount_range;
237
+ }
238
+ }
239
+
240
+ // Make Dummy Element.
241
+ if ($discount_range == '') $discount_range = [0 => ''];
242
+
243
+ foreach ($discount_range as $index => $discount) {
244
+ ?>
245
+ <div class="discount_rule_list">
246
+ <div class="form-group">
247
+ <label>Min Quantity
248
+ <input type="text"
249
+ name="discount_range[<?php echo $index; ?>][min_qty]"
250
+ class="form-control"
251
+ value="<?php echo(isset($discount->min_qty) ? $discount->min_qty : ''); ?>"
252
+ placeholder="ex. 1">
253
+ </label>
254
+ <label>Max Quantity
255
+ <input type="text"
256
+ name="discount_range[<?php echo $index; ?>][max_qty]"
257
+ class="form-control"
258
+ value="<?php echo(isset($discount->max_qty) ? $discount->max_qty : ''); ?>"
259
+ placeholder="ex. 50"> </label>
260
+ <label>Adjustment Type
261
+ <select class="form-control"
262
+ name="discount_range[<?php echo $index; ?>][discount_type]">
263
+ <?php $opt = (isset($discount->discount_type) ? $discount->discount_type : ''); ?>
264
+ <option
265
+ value="percentage_discount" <?php if ($opt == 'percentage_discount') { ?> selected=selected <?php } ?> >
266
+ Percentage Discount
267
+ </option>
268
+
269
+ <option
270
+ <?php if (!$pro) { ?> disabled <?php } else { ?> value="price_discount" <?php
271
+ }
272
+ if ($opt == 'price_discount') { ?> selected=selected <?php } ?>>
273
+ <?php if (!$pro) { ?>
274
+ Price Discount <b><?php echo $suffix; ?></b>
275
+ <?php } else { ?>
276
+ Price Discount
277
+ <?php } ?>
278
+ </option>
279
+ </select></label>
280
+ <label>Value
281
+ <input type="text"
282
+ name="discount_range[<?php echo $index; ?>][to_discount]"
283
+ class="form-control"
284
+ value="<?php echo(isset($discount->to_discount) ? $discount->to_discount : ''); ?>"
285
+ placeholder="ex. 50"> </label>
286
+
287
+ <label>Action <a href=javascript:void(0)
288
+ class="button button-secondary form-control remove_discount_range">Remove</a></label>
289
+
290
+ </div>
291
+ </div>
292
+ <?php } ?>
293
+ <div align="right">
294
+ <input type="button" class="button button-secondary restriction_tab" value="Previous">
295
+ </div>
296
+ </div>
297
+ </div>
298
+ </div>
299
+ <div class="col-md-1"></div>
300
+ <!-- Sidebar -->
301
+ <?php include_once(__DIR__ . '/template/sidebar.php'); ?>
302
+ <!-- Sidebar END -->
303
+ <input type="hidden" name="rule_id" id="rule_id" value="<?php echo $rule_id; ?>">
304
+ <input type="hidden" name="form" value="<?php echo $form; ?>">
305
+ <input type="hidden" id="ajax_path" value="<?php echo admin_url('admin-ajax.php'); ?>">
306
+ <input type="hidden" id="admin_path"
307
+ value="<?php echo admin_url('admin.php?page=woo_discount_rules'); ?>">
308
+ <input type="hidden" id="pro_suffix" value="<?php echo $suffix; ?>">
309
+ <input type="hidden" id="is_pro" value="<?php echo $pro; ?>">
310
+ <!-- <input type="hidden" name="status" value="--><?php //echo $status; ?><!--">-->
311
+ </form>
312
+ </div>
313
+
314
+ <?php include_once(WOO_DISCOUNT_DIR . '/view/includes/footer.php'); ?>
woo-discount-rules.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plugin name: Woo Discount Rules
4
+ * Plugin URI: http://www.flycart.org
5
+ * Description: Simple Discount Rules for WooCommerce.
6
+ * Author: Flycart Technologies LLP
7
+ * Author URI: https://www.flycart.org
8
+ * Version: 1.1
9
+ * Requires at least: 4.6.1
10
+ */
11
+
12
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
13
+
14
+ include_once('helper/activation-helper.php');
15
+ include_once('loader.php');