-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathsurveyjs-widgets.min.js
7 lines (7 loc) · 56.9 KB
/
surveyjs-widgets.min.js
1
2
3
4
5
6
7
/*!
* surveyjs-widgets - Widgets for the SurveyJS library v0.98.6
* Copyright (c) 2015-2017 Devsoft Baltic OÜ - http://surveyjs.io/
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
*/
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("jquery"),require("inputmask"),require("nouislider"),require("signature_pad"),require("sortablejs")):"function"==typeof define&&define.amd?define("surveyjs-widgets",["jquery","inputmask","nouislider","signature_pad","sortablejs"],e):"object"==typeof exports?exports["surveyjs-widgets"]=e(require("jquery"),require("inputmask"),require("nouislider"),require("signature_pad"),require("sortablejs")):t["surveyjs-widgets"]=e(t.jQuery,t.Inputmask,t.noUiSlider,t.SignaturePad,t.Sortable)}("undefined"!=typeof self?self:this,function(t,e,i,s,n){return function(t){function e(s){if(i[s])return i[s].exports;var n=i[s]={i:s,l:!1,exports:{}};return t[s].call(n.exports,n,n.exports,e),n.l=!0,n.exports}var i={};return e.m=t,e.c=i,e.d=function(t,i,s){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:s})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=20)}([function(e,i){e.exports=t},function(t,e,i){"use strict";function s(t){var e={className:"iradio_square-blue",name:"icheck",widgetIsLoaded:function(){return"function"==typeof $&&!!$.fn.iCheck},isFit:function(t){var e=t.getType();return"radiogroup"===e||"checkbox"===e||"matrix"===e},isDefaultRender:!0,afterRender:function(t,e){var i=this,s=$(e);s.find("input").data({iCheck:void 0}),s.find("input").iCheck({checkboxClass:i.className,radioClass:i.className});var n=function(){"matrix"!=t.getType()?s.find("input[value="+t.value+"]").iCheck("check"):t.generatedVisibleRows.forEach(function(t,i,s){t.value&&$(e).find("input[name='"+t.fullName+"'][value="+t.value+"]").iCheck("check")})};s.find("input").on("ifChecked",function(e){"matrix"!=t.getType()?t.value=e.target.value:t.generatedVisibleRows.forEach(function(t,i,s){t.fullName===e.target.name&&(t.value=e.target.value)})}),t.valueChangedCallback=n,n()},willUnmount:function(t,e){$(e).find("input").iCheck("destroy")}};t.CustomWidgetCollection.Instance.addCustomWidget(e,"type")}Object.defineProperty(e,"__esModule",{value:!0}),"undefined"!=typeof Survey&&s(Survey),e.default=s},function(t,e,i){"use strict";function s(t){var e={activatedBy:"property",name:"select2",htmlTemplate:"<select style='width: 100%;'></select>",widgetIsLoaded:function(){return"function"==typeof o.a&&!!o.a.fn.select2},isFit:function(t){return"property"==e.activatedBy?"select2"===t.renderAs&&"dropdown"===t.getType():"type"==e.activatedBy?void 0!==typeof Select2&&"dropdown"===t.getType():"customtype"==e.activatedBy&&"select2"===t.getType()},activatedByChanged:function(i){this.widgetIsLoaded()&&(e.activatedBy=i,t.JsonObject.metaData.removeProperty("dropdown","renderAs"),"property"==i&&t.JsonObject.metaData.addProperty("dropdown",{name:"renderAs",default:"standard",choices:["standard","select2"]}),"customtype"==i&&t.JsonObject.metaData.addClass("select2",[],null,"dropdown"))},afterRender:function(t,e){var i=o()(e).is("select")?o()(e):o()(e).find("select"),s=document.createElement("input");s.type="text",s.style.marginTop="3px",s.style.display="none",s.style.width="100%",i.parent().get(0).appendChild(s);var n=(i.select2({theme:"classic"}),function(){i.val(t.value).trigger("change"),s.style.display=t.isOtherSelected?"":"none"}),a=function(){s.value=t.comment?t.comment:""},r=function(){t.comment=s.value},l=function(){i.select2({data:t.visibleChoices.map(function(t){return{id:t.value,text:t.text}})}),n(),a()};t.choicesChangedCallback=l,l(),i.on("select2:select",function(e){t.value=e.target.value}),s.onchange=r,t.valueChangedCallback=n,t.commentChangedCallback=a,n(),a()},willUnmount:function(t,e){o()(e).find("select").off("select2:select").select2("destroy")}};t.CustomWidgetCollection.Instance.addCustomWidget(e)}Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),o=i.n(n);"undefined"!=typeof Survey&&s(Survey),e.default=s},function(t,e,i){"use strict";function s(t){var e={name:"imagepicker",title:"Image picker",iconName:"icon-imagepicker",widgetIsLoaded:function(){return"function"==typeof $&&!!$.fn.imagepicker},isFit:function(t){return"imagepicker"===t.getType()},isDefaultRender:!0,activatedByChanged:function(e){t.JsonObject.metaData.addClass("imageitemvalues",[{name:"imageLink"}],null,"itemvalue"),t.JsonObject.metaData.addClass("imagepicker",[{name:"choices:imageitemvalues",onGetValue:function(e){return t.ItemValue.getData(e.choices)},onSetValue:function(t,e){t.choices=e}},{name:"showLabel:boolean",default:!1},{name:"hasOther",visible:!1},{name:"otherText",visible:!1},{name:"optionsCaption",visible:!1},{name:"otherErrorText",visible:!1},{name:"storeOthersAsComment",visible:!1},{name:"renderAs",visible:!1}],null,"dropdown")},afterRender:function(t,e){for(var i=$(e).is("select")?$(e):$(e).find("select"),s=i.find("option"),n=t.choices,o=1;o<s.length&&o-1<n.length;o++)$(s[o]).data("imgSrc",n[o-1].imageLink),s[o].selected=t.value==s[o].value;i.imagepicker({hide_select:!0,show_label:t.showLabel,selected:function(e){t.value=e.picker.select[0].value}})},willUnmount:function(t,e){$(e).find("select").data("picker").destroy()}};t.CustomWidgetCollection.Instance.addCustomWidget(e,"customtype")}Object.defineProperty(e,"__esModule",{value:!0}),"undefined"!=typeof Survey&&s(Survey),e.default=s},function(t,e,i){"use strict";function s(t){var e={name:"maskedit",numericGroupSeparator:",",numericAutoGroup:!0,numericDigits:2,numericDigitsOptional:!1,numericPrefix:"$",numericPlaceholder:"0",widgetIsLoaded:function(){return void 0!==o.a},isFit:function(t){return"multipletext"==t.getType()||"text"==t.getType()&&("none"!=t.inputMask||t.inputFormat)},isDefaultRender:!0,activatedByChanged:function(e){if(!t.JsonObject.metaData.findProperty("text","inputMask")){var i=["inputFormat",{name:"inputMask",default:"none",choices:["none","datetime","currency","decimal","email","phone","ip"]}];t.JsonObject.metaData.addProperties("text",i),t.JsonObject.metaData.addProperties("matrixdropdowncolumn",i),t.JsonObject.metaData.addProperties("multipletextitem",i)}},applyInputMask:function(t,e){var i=this,s="none"!=t.inputMask?t.inputMask:t.inputFormat,n={};"none"!=t.inputMask&&(n.inputFormat=t.inputFormat),"currency"!=t.inputMask&&"decimal"!=t.inputMask||(n.groupSeparator=i.numericGroupSeparator,n.autoGroup=i.numericAutoGroup),"currency"==t.inputMask&&(n.digits=i.numericDigits,n.digitsOptional=i.numericDigitsOptional,n.prefix=i.numericPrefix,n.placeholder=i.numericPlaceholder),"datetime"==t.inputMask&&(s=t.inputFormat),o()(s,n).mask(e),e.oninput=function(){t.customWidgetData.isNeedRender=!0};var a=function(){e.value=void 0===t.value?"":t.value};t.valueChangedCallback=a,a()},afterRender:function(t,e){if("multipletext"!=t.getType()){var i=e.querySelector("input")||e;this.applyInputMask(t,i)}else for(var s=0;s<t.items.length;s++){var n=t.items[s];if("none"!=n.inputMask||n.inputFormat){var i=e.querySelector("#"+n.id);i&&this.applyInputMask(n,i)}}},willUnmount:function(t,e){(e.querySelector("input")||e).inputmask.remove()}};t.CustomWidgetCollection.Instance.addCustomWidget(e)}Object.defineProperty(e,"__esModule",{value:!0});var n=i(5),o=i.n(n);"undefined"!=typeof Survey&&s(Survey),e.default=s},function(t,i){t.exports=e},function(t,e,i){"use strict";function s(t){var e={name:"barrating",title:"Bar rating",iconName:"icon-barrating",widgetIsLoaded:function(){return"function"==typeof $&&!!$.fn.barrating},defaultJSON:{choices:[1,2,3,4,5]},isFit:function(t){return"barrating"===t.getType()},isDefaultRender:!0,activatedByChanged:function(e){t.JsonObject.metaData.addClass("barrating",[{name:"showValues:boolean",default:!1},{name:"hasOther",visible:!1},{name:"otherText",visible:!1},{name:"optionsCaption",visible:!1},{name:"otherErrorText",visible:!1},{name:"storeOthersAsComment",visible:!1},{name:"renderAs",visible:!1}],null,"dropdown"),t.JsonObject.metaData.addProperty("barrating",{name:"ratingTheme",default:"fontawesome-stars",choices:["fontawesome-stars","css-stars","bars-pill","bars-1to10","bars-movie","bars-square","bars-reversed","bars-horizontal","bootstrap-stars","fontawesome-stars-o"]})},afterRender:function(t,e){($(e).is("select")?$(e):$(e).find("select")).barrating("show",{theme:t.ratingTheme,initialRating:t.value,showValues:t.showValues,showSelectedRating:!1,onSelect:function(e,i){t.value=e}}),t.valueChangedCallback=function(){$(e).find("select").barrating("set",t.value)}},willUnmount:function(t,e){$(e).find("select").barrating("destroy")}};t.CustomWidgetCollection.Instance.addCustomWidget(e,"customtype")}Object.defineProperty(e,"__esModule",{value:!0}),"undefined"!=typeof Survey&&s(Survey),e.default=s},function(t,e,i){"use strict";function s(t){var e={name:"datepicker",title:"Date picker",iconName:"icon-datepicker",widgetIsLoaded:function(){return"function"==typeof $&&!!$.fn.datepicker},isFit:function(t){return"datepicker"===t.getType()},htmlTemplate:"<input class='form-control widget-datepicker' type='text' style='width: 100%;'>",activatedByChanged:function(e){t.JsonObject.metaData.addClass("datepicker",[{name:"dateFormat",default:"mm/dd/yy",choices:["mm/dd/yy","yy-mm-dd","d M, y","d MM, y","DD, d MM, yy","'day' d 'of' MM 'in the year' yy"]},{name:"inputType",visible:!1},{name:"inputFormat",visible:!1},{name:"inputMask",visible:!1}],null,"text")},afterRender:function(t,e){var i=$(e).is(".widget-datepicker")?$(e):$(e).find(".widget-datepicker"),s=i.datepicker({dateFormat:t.dateFormat,option:{minDate:null,maxDate:null},onSelect:function(e){t.value=e}});t.valueChangedCallback=function(){t.value?s.datepicker("setDate",new Date(t.value)):s.datepicker("setDate",null)},t.valueChangedCallback()},willUnmount:function(t,e){($(e).is(".widget-datepicker")?$(e):$(e).find(".widget-datepicker")).datepicker("destroy")}};t.CustomWidgetCollection.Instance.addCustomWidget(e,"customtype")}Object.defineProperty(e,"__esModule",{value:!0}),"undefined"!=typeof Survey&&s(Survey),e.default=s},function(t,e,i){"use strict";function s(t){var e={name:"nouislider",title:"noUiSlider",iconName:"icon-nouislider",widgetIsLoaded:function(){return void 0!==o.a},isFit:function(t){return"nouislider"===t.getType()},htmlTemplate:"<div></div>",activatedByChanged:function(e){t.JsonObject.metaData.addClass("nouislider",[],null,"empty"),t.JsonObject.metaData.addProperties("nouislider",[{name:"step:number",default:1},{name:"rangeMin:number",default:0},{name:"rangeMax:number",default:100}])},afterRender:function(t,e){t.value=(t.rangeMin+t.rangeMax)/2,e.style.marginBottom="50px";var i=o.a.create(e,{start:t.value,connect:[!0,!1],step:t.step,tooltips:!0,pips:{mode:"positions",values:[0,25,50,75,100],density:5},range:{min:t.rangeMin,max:t.rangeMax}});i.on("set",function(){t.value=i.get()});var s=function(){i.set(t.value)};t.noUiSlider=i,t.valueChangedCallback=s},willUnmount:function(t,e){t.noUiSlider.destroy(),t.noUiSlider=null}};t.CustomWidgetCollection.Instance.addCustomWidget(e,"customtype")}Object.defineProperty(e,"__esModule",{value:!0});var n=i(9),o=i.n(n);"undefined"!=typeof Survey&&s(Survey),e.default=s},function(t,e){t.exports=i},function(t,e,i){"use strict";function s(t){var e={name:"tagbox",title:"Tag box",iconName:"icon-tagbox",widgetIsLoaded:function(){return"function"==typeof o.a&&!!o.a.fn.select2},defaultJSON:{choices:["Item 1","Item 2","Item 3"]},htmlTemplate:"<select multiple='multiple' style='width: 100%;'></select>",isFit:function(t){return"tagbox"===t.getType()},activatedByChanged:function(e){t.JsonObject.metaData.addClass("tagbox",[{name:"hasOther",visible:!1}],null,"checkbox")},afterRender:function(t,e){var i=o()(e).is("select")?o()(e):o()(e).find("select");i.select2({tags:"true",theme:"classic"});var s=function(){i.val(t.value).trigger("change")},n=function(){i.select2({data:t.visibleChoices.map(function(t){return{id:t.value,text:t.text}})}),s()};t.choicesChangedCallback=n,t.valueChangedCallback=s,i.on("select2:select",function(e){t.value=(t.value||[]).concat(e.params.data.id)}),i.on("select2:unselect",function(e){var i=(t.value||[]).indexOf(e.params.data.id);if(-1!==i){var s=t.value;s.splice(i,1),t.value=s}}),n()},willUnmount:function(t,e){o()(e).find("select").off("select2:select").select2("destroy")}};t.CustomWidgetCollection.Instance.addCustomWidget(e,"customtype")}Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),o=i.n(n);"undefined"!=typeof Survey&&s(Survey),e.default=s},function(t,e,i){"use strict";function s(t){var e=t.getContext("2d"),i=window.devicePixelRatio||1,s=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1,n=i/s,o=t.width,a=t.height;t.width=o*n,t.height=a*n,t.style.width=o+"px",t.style.height=a+"px",e.scale(n,n)}function n(t){var e={name:"signaturepad",title:"Signature pad",iconName:"icon-signaturepad",widgetIsLoaded:function(){return void 0!==o},penColor:"#1ab394",isFit:function(t){return"signaturepad"===t.getType()},htmlTemplate:"<div class='sjs_sp_container'><div><canvas></canvas></div><div class='sjs_sp_controls'><button type='button' class='sjs_sp_clear' title='Clear'>✖</button></div></div><style>.sjs_sp_container { position: relative; } .sjs_sp_controls { position: absolute; left: 0; bottom: 0; } .sjs_sp_controls > button { user-select: none; }</style>",activatedByChanged:function(e){t.JsonObject.metaData.addClass("signaturepad",[],null,"empty"),t.JsonObject.metaData.addProperties("signaturepad",[{name:"allowClear:boolean",default:!0},{name:"width:number",default:300},{name:"height:number",default:200}])},afterRender:function(t,e){var i=this,n=e.getElementsByTagName("canvas")[0],a=new o(n);t.isReadOnly&&a.off(),a.penColor=i.penColor,a.onEnd=function(){var e=a.toDataURL();t.value=e};var r=function(){a.clear(),n.width=t.width,n.height=t.height,s(n),a.fromDataURL(t.value)};t.valueChangedCallback=r,r(),t.signaturePad=a,t.allowClear&&!t.isReadOnly?e.getElementsByTagName("button")[0].onclick=function(){a.clear()}:e.getElementsByTagName("button")[0].remove()},willUnmount:function(t,e){t.signaturePad&&t.signaturePad.off(),t.signaturePad=null}};t.CustomWidgetCollection.Instance.addCustomWidget(e,"customtype")}Object.defineProperty(e,"__esModule",{value:!0});var o=i(12);i.n(o);"undefined"!=typeof Survey&&n(Survey),e.default=n},function(t,e){t.exports=s},function(t,e,i){"use strict";function s(t){var e={name:"sortablelist",title:"Sortable list",iconName:"icon-sortablelist",widgetIsLoaded:function(){return void 0!==o.a},defaultJSON:{choices:["Item 1","Item 2","Item 3"]},areaStyle:"border: 1px solid #1ab394; width:100%; min-height:50px",itemStyle:"background-color:#1ab394;color:#fff;margin:5px;padding:10px;",isFit:function(t){return"sortablelist"===t.getType()},htmlTemplate:"<div></div>",activatedByChanged:function(e){t.JsonObject.metaData.addClass("sortablelist",[{name:"hasOther",visible:!1},{name:"storeOthersAsComment",visible:!1}],null,"checkbox"),t.JsonObject.metaData.addProperty("sortablelist",{name:"emptyText",default:"Move items here."})},afterRender:function(t,e){var i=this;e.style.width="100%";var s=document.createElement("div"),n=document.createElement("span"),a=document.createElement("div");s.style.cssText=i.areaStyle,n.innerHTML=t.emptyText,s.appendChild(n),a.style.cssText=i.areaStyle,a.style.marginTop="10px",e.appendChild(s),e.appendChild(a);var r=function(e){var i=t.value;if(!Array.isArray(i))return!1;for(var s=0;s<i.length;s++)if(i[s]==e)return!0;return!1},l=!1,h=function(){if(!l){s.innerHTML="",s.appendChild(n),a.innerHTML="";var e=!1;t.activeChoices.forEach(function(t){var n=r(t.value);e=e||n;var o=n?s:a,l=document.createElement("div");l.innerHTML="<div style='"+i.itemStyle+"'>"+t.text+"</div>",l.dataset.value=t.value,o.appendChild(l)}),n.style.display=e?"none":""}};t.resultEl=o.a.create($(s)[0],{animation:150,group:t.name,onSort:function(e){var i=[];if(1===s.children.length)n.style.display="";else{n.style.display="none";for(var o=0;o<s.children.length;o++)void 0!==s.children[o].dataset.value&&i.push(s.children[o].dataset.value)}l=!0,t.value=i,l=!1}}),t.sourceEl=o.a.create($(a)[0],{animation:150,group:t.name}),t.valueChangedCallback=h,h()},willUnmount:function(t,e){t.resultEl.destroy(),t.sourceEl.destroy()}};t.CustomWidgetCollection.Instance.addCustomWidget(e,"customtype")}Object.defineProperty(e,"__esModule",{value:!0});var n=i(14),o=i.n(n);"undefined"!=typeof Survey&&s(Survey),e.default=s},function(t,e){t.exports=n},function(t,e,i){"use strict";function s(t){var e={name:"editor",title:"Editor",iconName:"icon-editor",widgetIsLoaded:function(){return"undefined"!=typeof CKEDITOR},isFit:function(t){return"editor"===t.getType()},htmlTemplate:"<textarea rows='10' cols='80' style: {width:'100%'}></textarea>",activatedByChanged:function(e){t.JsonObject.metaData.addClass("editor",[],null,"empty"),t.JsonObject.metaData.addProperty("editor",{name:"height",default:300})},afterRender:function(t,e){CKEDITOR.editorConfig=function(e){e.language="es",e.height=t.height,e.toolbarCanCollapse=!0};var i=CKEDITOR.replace(e),s=!1,n=function(){s||i.setData(t.value)};i.on("change",function(){s=!0,t.value=i.getData(),s=!1}),t.valueChangedCallback=n,n()},willUnmount:function(t,e){}};t.CustomWidgetCollection.Instance.addCustomWidget(e,"customtype")}Object.defineProperty(e,"__esModule",{value:!0}),"undefined"!=typeof Survey&&s(Survey),e.default=s},function(t,e,i){"use strict";function s(t){var e={name:"autocomplete",widgetIsLoaded:function(){return"function"==typeof $&&!!$.fn.easyAutocomplete},isFit:function(t){return"text"===t.getType()},isDefaultRender:!0,activatedByChanged:function(e){null===t.JsonObject.metaData.findProperty("text","choices")&&null===t.JsonObject.metaData.findProperty("text","choicesByUrl")&&(t.JsonObject.metaData.addProperty("text",{name:"choices:itemvalues",onGetValue:function(e){return t.ItemValue.getData(e.choices||[])},onSetValue:function(t,e){t.choices||(t.choices=t.createItemValues("choices")),t.choices=e}}),t.JsonObject.metaData.addProperty("text",{name:"choicesByUrl:restfull",className:"ChoicesRestfull",onGetValue:function(t){return t&&t.choicesByUrl&&t.choicesByUrl.getData()},onSetValue:function(e,i){e.choicesByUrl||(e.choicesByUrl=new t.ChoicesRestfull),e.choicesByUrl.setData(i)}}))},afterRender:function(t,e){var i=$(e).is("input")?$(e):$(e).find("input"),s={data:(t.choices||[]).map(function(t){return t.getData()}),adjustWidth:!1,list:{sort:{enabled:!0},match:{enabled:!0}},placeholder:t.placeholder};t.choicesByUrl&&(s.url=function(e){return t.choicesByUrl.url},s.getValue=t.choicesByUrl.valueName),i.easyAutocomplete(s)},willUnmount:function(t,e){}};t.CustomWidgetCollection.Instance.addCustomWidget(e,"type")}Object.defineProperty(e,"__esModule",{value:!0}),"undefined"!=typeof Survey&&s(Survey),e.default=s},function(t,e,i){"use strict";function s(t){var e={settings:{radiogroup:{rootClass:"pretty p-default p-round",inputType:"radio",addOn:"",titleClass:"state p-success"},checkbox:{rootClass:"pretty p-default",inputType:"checkbox",addOn:"",titleClass:"state p-success"}},name:"pretty-checkbox",activatedBy:"property",widgetIsLoaded:function(){for(var t=0;t<document.styleSheets.length;t++){var e=document.styleSheets[t].ownerNode.href;if(e&&-1!=e.indexOf("pretty-checkbox"))return!0}return!1},htmlTemplate:"<fieldset></fieldset>",isFit:function(t){var i="radiogroup"===t.getType()||"checkbox"===t.getType();return"property"===e.activatedBy?"prettycheckbox"===t.renderAs&&i:"type"===e.activatedBy&&i},activatedByChanged:function(i){this.widgetIsLoaded()&&(e.activatedBy=i,t.JsonObject.metaData.removeProperty("radiogroup","renderAs"),t.JsonObject.metaData.removeProperty("checkbox","renderAs"),"property"===i&&(t.JsonObject.metaData.addProperty("radiogroup",{name:"renderAs",default:"standard",choices:["standard","prettycheckbox"]}),t.JsonObject.metaData.addProperty("checkbox",{name:"renderAs",default:"standard",choices:["standard","prettycheckbox"]})))},isDefaultRender:!1,afterRender:function(t,e){var i={},s=this.settings[t.getType()],n=!1,o=function(e){n=!0;try{var i=arguments[0].target.value;if("checkbox"===t.getType()){var s=t.value||[];arguments[0].target.checked?-1===s.indexOf(i)&&s.push(i):-1!==s.indexOf(i)&&s.splice(s.indexOf(i),1),t.value=s}else t.value=i}finally{n=!1}},a=t.colCount>0?100/t.colCount+"%":"";t.choices.forEach(function(n,r){var l=document.createElement("div");l.className="sv_cw_pretty_checkbox_"+t.getType(),l.style.display="inline-block",l.style.width=a;var h=document.createElement("div");h.className=s.rootClass;var d=document.createElement("input");d.type=s.inputType,d.name=t.name+("checkbox"===t.getType()?""+r:""),d.onchange=o,d.value=n.value;var u=document.createElement("div");u.className=s.titleClass;var c=document.createElement("label");c.textContent=n.text,u.appendChild(c),h.appendChild(d),h.appendChild(u),s.addOn&&u.insertAdjacentHTML("afterbegin",s.addOn),l.appendChild(h),e.appendChild(l),i[n.value]=d});var r=function(e){if(!n){var s=e||[];"radiogroup"===t.getType()&&(s=[e]),Object.values(i).forEach(function(t){-1!==s.indexOf(t.value)?t.setAttribute("checked",void 0):t.removeAttribute("checked")})}};t.valueChangedCallback=r,r(t.value)},willUnmount:function(t,e){t.valueChangedCallback=void 0}};t.CustomWidgetCollection.Instance.addCustomWidget(e,"property")}Object.defineProperty(e,"__esModule",{value:!0}),"undefined"!=typeof Survey&&s(Survey),e.default=s},function(t,e,i){"use strict";function s(t){var e={name:"bootstrap-slider",title:"Bootstrap Slider",iconName:"icon-bootstrap-slider",widgetIsLoaded:function(){return void 0!==n},isFit:function(t){return"bootstrapslider"===t.getType()},htmlTemplate:"<div></div>",activatedByChanged:function(e){t.JsonObject.metaData.addClass("bootstrapslider",[],null,"empty"),t.JsonObject.metaData.addProperties("bootstrapslider",[{name:"step:number",default:1},{name:"rangeMin:number",default:0},{name:"rangeMax:number",default:100}])},afterRender:function(t,e){var i=document.createElement("input");i.id=t.id,i.type="text",i.setAttribute("data-slider-id",t.name+"_"+t.id),i.setAttribute("data-slider-min",t.rangeMin),i.setAttribute("data-slider-max",t.rangeMax),i.setAttribute("data-slider-step",t.step),i.setAttribute("data-slider-value",t.value||t.rangeMin),e.appendChild(i);var s=new n(i,{id:t.name+"_"+t.id,min:t.rangeMin,max:t.rangeMax,step:t.step,value:t.value||t.rangeMin});s.on("change",function(e){t.value=s.getValue()});var o=function(){s.setValue(t.value||t.rangeMin)};t.bootstrapSlider=s,t.valueChangedCallback=o},willUnmount:function(t,e){t.bootstrapSlider.destroy(),t.bootstrapSlider=null}};t.CustomWidgetCollection.Instance.addCustomWidget(e,"customtype")}Object.defineProperty(e,"__esModule",{value:!0});var n=i(19);"undefined"!=typeof Survey&&s(Survey),e.default=s},function(t,e,i){"use strict";var s,n,o,a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r="object"===("undefined"==typeof window?"undefined":a(window));!function(a){n=[i(0)],s=a,void 0!==(o="function"==typeof s?s.apply(e,n):s)&&(t.exports=o)}(function(t){r&&!window.console&&(window.console={}),r&&!window.console.log&&(window.console.log=function(){}),r&&!window.console.warn&&(window.console.warn=function(){});var e;return function(t){function e(){}var i=Array.prototype.slice;!function(t){function s(e){e.prototype.option||(e.prototype.option=function(e){t.isPlainObject(e)&&(this.options=t.extend(!0,this.options,e))})}function n(e,s){t.fn[e]=function(n){if("string"==typeof n){for(var a=i.call(arguments,1),r=0,l=this.length;r<l;r++){var h=this[r],d=t.data(h,e);if(d)if(t.isFunction(d[n])&&"_"!==n.charAt(0)){var u=d[n].apply(d,a);if(void 0!==u&&u!==d)return u}else o("no such method '"+n+"' for "+e+" instance");else o("cannot call methods on "+e+" prior to initialization; attempted to call '"+n+"'")}return this}var c=this.map(function(){var i=t.data(this,e);return i?(i.option(n),i._init()):(i=new s(this,n),t.data(this,e,i)),t(this)});return!c||c.length>1?c:c[0]}}if(t){var o="undefined"==typeof console?e:function(t){console.error(t)};t.bridget=function(t,e){s(e),n(t,e)},t.bridget}}(t)}(t),function(t){function i(e,i){this._state={value:null,enabled:null,offset:null,size:null,percentage:null,inDrag:!1,over:!1},this.ticksCallbackMap={},this.handleCallbackMap={},"string"==typeof e?this.element=document.querySelector(e):e instanceof HTMLElement&&(this.element=e),i=i||{};for(var s=Object.keys(this.defaultOptions),o=0;o<s.length;o++){var a=s[o],r=i[a];r=void 0!==r?r:function(t,e){var i="data-slider-"+e.replace(/_/g,"-"),s=t.getAttribute(i);try{return JSON.parse(s)}catch(t){return s}}(this.element,a),r=null!==r?r:this.defaultOptions[a],this.options||(this.options={}),this.options[a]=r}"auto"===this.options.rtl&&(this.options.rtl="rtl"===window.getComputedStyle(this.element).direction),"vertical"!==this.options.orientation||"top"!==this.options.tooltip_position&&"bottom"!==this.options.tooltip_position?"horizontal"!==this.options.orientation||"left"!==this.options.tooltip_position&&"right"!==this.options.tooltip_position||(this.options.tooltip_position="top"):this.options.rtl?this.options.tooltip_position="left":this.options.tooltip_position="right";var l,h,d,u,c,p=this.element.style.width,m=!1,f=this.element.parentNode;if(this.sliderElem)m=!0;else{this.sliderElem=document.createElement("div"),this.sliderElem.className="slider";var v=document.createElement("div");v.className="slider-track",h=document.createElement("div"),h.className="slider-track-low",l=document.createElement("div"),l.className="slider-selection",d=document.createElement("div"),d.className="slider-track-high",u=document.createElement("div"),u.className="slider-handle min-slider-handle",u.setAttribute("role","slider"),u.setAttribute("aria-valuemin",this.options.min),u.setAttribute("aria-valuemax",this.options.max),c=document.createElement("div"),c.className="slider-handle max-slider-handle",c.setAttribute("role","slider"),c.setAttribute("aria-valuemin",this.options.min),c.setAttribute("aria-valuemax",this.options.max),v.appendChild(h),v.appendChild(l),v.appendChild(d),this.rangeHighlightElements=[];var g=this.options.rangeHighlights;if(Array.isArray(g)&&g.length>0)for(var y=0;y<g.length;y++){var _=document.createElement("div"),b=g[y].class||"";_.className="slider-rangeHighlight slider-selection "+b,this.rangeHighlightElements.push(_),v.appendChild(_)}var k=Array.isArray(this.options.labelledby);if(k&&this.options.labelledby[0]&&u.setAttribute("aria-labelledby",this.options.labelledby[0]),k&&this.options.labelledby[1]&&c.setAttribute("aria-labelledby",this.options.labelledby[1]),!k&&this.options.labelledby&&(u.setAttribute("aria-labelledby",this.options.labelledby),c.setAttribute("aria-labelledby",this.options.labelledby)),this.ticks=[],Array.isArray(this.options.ticks)&&this.options.ticks.length>0){for(this.ticksContainer=document.createElement("div"),this.ticksContainer.className="slider-tick-container",o=0;o<this.options.ticks.length;o++){var C=document.createElement("div");if(C.className="slider-tick",this.options.ticks_tooltip){var x=this._addTickListener(),E=x.addMouseEnter(this,C,o),w=x.addMouseLeave(this,C);this.ticksCallbackMap[o]={mouseEnter:E,mouseLeave:w}}this.ticks.push(C),this.ticksContainer.appendChild(C)}l.className+=" tick-slider-selection"}if(this.tickLabels=[],Array.isArray(this.options.ticks_labels)&&this.options.ticks_labels.length>0)for(this.tickLabelContainer=document.createElement("div"),this.tickLabelContainer.className="slider-tick-label-container",o=0;o<this.options.ticks_labels.length;o++){var T=document.createElement("div"),M=0===this.options.ticks_positions.length,P=this.options.reversed&&M?this.options.ticks_labels.length-(o+1):o;T.className="slider-tick-label",T.innerHTML=this.options.ticks_labels[P],this.tickLabels.push(T),this.tickLabelContainer.appendChild(T)}var L=function(t){var e=document.createElement("div");e.className="tooltip-arrow";var i=document.createElement("div");i.className="tooltip-inner",t.appendChild(e),t.appendChild(i)},S=document.createElement("div");S.className="tooltip tooltip-main",S.setAttribute("role","presentation"),L(S);var O=document.createElement("div");O.className="tooltip tooltip-min",O.setAttribute("role","presentation"),L(O);var A=document.createElement("div");A.className="tooltip tooltip-max",A.setAttribute("role","presentation"),L(A),this.sliderElem.appendChild(v),this.sliderElem.appendChild(S),this.sliderElem.appendChild(O),this.sliderElem.appendChild(A),this.tickLabelContainer&&this.sliderElem.appendChild(this.tickLabelContainer),this.ticksContainer&&this.sliderElem.appendChild(this.ticksContainer),this.sliderElem.appendChild(u),this.sliderElem.appendChild(c),f.insertBefore(this.sliderElem,this.element),this.element.style.display="none"}if(t&&(this.$element=t(this.element),this.$sliderElem=t(this.sliderElem)),this.eventToCallbackMap={},this.sliderElem.id=this.options.id,this.touchCapable="ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch,this.touchX=0,this.touchY=0,this.tooltip=this.sliderElem.querySelector(".tooltip-main"),this.tooltipInner=this.tooltip.querySelector(".tooltip-inner"),this.tooltip_min=this.sliderElem.querySelector(".tooltip-min"),this.tooltipInner_min=this.tooltip_min.querySelector(".tooltip-inner"),this.tooltip_max=this.sliderElem.querySelector(".tooltip-max"),this.tooltipInner_max=this.tooltip_max.querySelector(".tooltip-inner"),n[this.options.scale]&&(this.options.scale=n[this.options.scale]),!0===m&&(this._removeClass(this.sliderElem,"slider-horizontal"),this._removeClass(this.sliderElem,"slider-vertical"),this._removeClass(this.sliderElem,"slider-rtl"),this._removeClass(this.tooltip,"hide"),this._removeClass(this.tooltip_min,"hide"),this._removeClass(this.tooltip_max,"hide"),["left","right","top","width","height"].forEach(function(t){this._removeProperty(this.trackLow,t),this._removeProperty(this.trackSelection,t),this._removeProperty(this.trackHigh,t)},this),[this.handle1,this.handle2].forEach(function(t){this._removeProperty(t,"left"),this._removeProperty(t,"right"),this._removeProperty(t,"top")},this),[this.tooltip,this.tooltip_min,this.tooltip_max].forEach(function(t){this._removeProperty(t,"left"),this._removeProperty(t,"right"),this._removeProperty(t,"top"),this._removeClass(t,"right"),this._removeClass(t,"left"),this._removeClass(t,"top")},this)),"vertical"===this.options.orientation?(this._addClass(this.sliderElem,"slider-vertical"),this.stylePos="top",this.mousePos="pageY",this.sizePos="offsetHeight"):(this._addClass(this.sliderElem,"slider-horizontal"),this.sliderElem.style.width=p,this.options.orientation="horizontal",this.options.rtl?this.stylePos="right":this.stylePos="left",this.mousePos="pageX",this.sizePos="offsetWidth"),this.options.rtl&&this._addClass(this.sliderElem,"slider-rtl"),this._setTooltipPosition(),Array.isArray(this.options.ticks)&&this.options.ticks.length>0&&(this.options.max=Math.max.apply(Math,this.options.ticks),this.options.min=Math.min.apply(Math,this.options.ticks)),Array.isArray(this.options.value)?(this.options.range=!0,this._state.value=this.options.value):this.options.range?this._state.value=[this.options.value,this.options.max]:this._state.value=this.options.value,this.trackLow=h||this.trackLow,this.trackSelection=l||this.trackSelection,this.trackHigh=d||this.trackHigh,"none"===this.options.selection?(this._addClass(this.trackLow,"hide"),this._addClass(this.trackSelection,"hide"),this._addClass(this.trackHigh,"hide")):"after"!==this.options.selection&&"before"!==this.options.selection||(this._removeClass(this.trackLow,"hide"),this._removeClass(this.trackSelection,"hide"),this._removeClass(this.trackHigh,"hide")),this.handle1=u||this.handle1,this.handle2=c||this.handle2,!0===m)for(this._removeClass(this.handle1,"round triangle"),this._removeClass(this.handle2,"round triangle hide"),o=0;o<this.ticks.length;o++)this._removeClass(this.ticks[o],"round triangle hide");if(-1!==["round","triangle","custom"].indexOf(this.options.handle))for(this._addClass(this.handle1,this.options.handle),this._addClass(this.handle2,this.options.handle),o=0;o<this.ticks.length;o++)this._addClass(this.ticks[o],this.options.handle);if(this._state.offset=this._offset(this.sliderElem),this._state.size=this.sliderElem[this.sizePos],this.setValue(this._state.value),this.handle1Keydown=this._keydown.bind(this,0),this.handle1.addEventListener("keydown",this.handle1Keydown,!1),this.handle2Keydown=this._keydown.bind(this,1),this.handle2.addEventListener("keydown",this.handle2Keydown,!1),this.mousedown=this._mousedown.bind(this),this.touchstart=this._touchstart.bind(this),this.touchmove=this._touchmove.bind(this),this.touchCapable){var D=!1;try{var j=Object.defineProperty({},"passive",{get:function(){D=!0}});window.addEventListener("test",null,j)}catch(t){}var N=!!D&&{passive:!0};this.sliderElem.addEventListener("touchstart",this.touchstart,N),this.sliderElem.addEventListener("touchmove",this.touchmove,N)}if(this.sliderElem.addEventListener("mousedown",this.mousedown,!1),this.resize=this._resize.bind(this),window.addEventListener("resize",this.resize,!1),"hide"===this.options.tooltip)this._addClass(this.tooltip,"hide"),this._addClass(this.tooltip_min,"hide"),this._addClass(this.tooltip_max,"hide");else if("always"===this.options.tooltip)this._showTooltip(),this._alwaysShowTooltip=!0;else{if(this.showTooltip=this._showTooltip.bind(this),this.hideTooltip=this._hideTooltip.bind(this),this.options.ticks_tooltip){var I=this._addTickListener(),R=I.addMouseEnter(this,this.handle1),H=I.addMouseLeave(this,this.handle1);this.handleCallbackMap.handle1={mouseEnter:R,mouseLeave:H},R=I.addMouseEnter(this,this.handle2),H=I.addMouseLeave(this,this.handle2),this.handleCallbackMap.handle2={mouseEnter:R,mouseLeave:H}}else this.sliderElem.addEventListener("mouseenter",this.showTooltip,!1),this.sliderElem.addEventListener("mouseleave",this.hideTooltip,!1);this.handle1.addEventListener("focus",this.showTooltip,!1),this.handle1.addEventListener("blur",this.hideTooltip,!1),this.handle2.addEventListener("focus",this.showTooltip,!1),this.handle2.addEventListener("blur",this.hideTooltip,!1)}this.options.enabled?this.enable():this.disable()}var s={formatInvalidInputErrorMsg:function(t){return"Invalid input value '"+t+"' passed in"},callingContextNotSliderInstance:"Calling context element does not have instance of Slider bound to it. Check your code to make sure the JQuery object returned from the call to the slider() initializer is calling the method"},n={linear:{toValue:function(t){var e=t/100*(this.options.max-this.options.min),i=!0;if(this.options.ticks_positions.length>0){for(var s,n,o,a=0,r=1;r<this.options.ticks_positions.length;r++)if(t<=this.options.ticks_positions[r]){s=this.options.ticks[r-1],o=this.options.ticks_positions[r-1],n=this.options.ticks[r],a=this.options.ticks_positions[r];break}e=s+(t-o)/(a-o)*(n-s),i=!1}var l=i?this.options.min:0,h=l+Math.round(e/this.options.step)*this.options.step;return h<this.options.min?this.options.min:h>this.options.max?this.options.max:h},toPercentage:function(t){if(this.options.max===this.options.min)return 0;if(this.options.ticks_positions.length>0){for(var e,i,s,n=0,o=0;o<this.options.ticks.length;o++)if(t<=this.options.ticks[o]){e=o>0?this.options.ticks[o-1]:0,s=o>0?this.options.ticks_positions[o-1]:0,i=this.options.ticks[o],n=this.options.ticks_positions[o];break}if(o>0){return s+(t-e)/(i-e)*(n-s)}}return 100*(t-this.options.min)/(this.options.max-this.options.min)}},logarithmic:{toValue:function(t){var e=0===this.options.min?0:Math.log(this.options.min),i=Math.log(this.options.max),s=Math.exp(e+(i-e)*t/100);return Math.round(s)===this.options.max?this.options.max:(s=this.options.min+Math.round((s-this.options.min)/this.options.step)*this.options.step,s<this.options.min?this.options.min:s>this.options.max?this.options.max:s)},toPercentage:function(t){if(this.options.max===this.options.min)return 0;var e=Math.log(this.options.max),i=0===this.options.min?0:Math.log(this.options.min);return 100*((0===t?0:Math.log(t))-i)/(e-i)}}};if(e=function(t,e){return i.call(this,t,e),this},e.prototype={_init:function(){},constructor:e,defaultOptions:{id:"",min:0,max:10,step:1,precision:0,orientation:"horizontal",value:5,range:!1,selection:"before",tooltip:"show",tooltip_split:!1,handle:"round",reversed:!1,rtl:"auto",enabled:!0,formatter:function(t){return Array.isArray(t)?t[0]+" : "+t[1]:t},natural_arrow_keys:!1,ticks:[],ticks_positions:[],ticks_labels:[],ticks_snap_bounds:0,ticks_tooltip:!1,scale:"linear",focus:!1,tooltip_position:null,labelledby:null,rangeHighlights:[]},getElement:function(){return this.sliderElem},getValue:function(){return this.options.range?this._state.value:this._state.value[0]},setValue:function(t,e,i){t||(t=0);var s=this.getValue();this._state.value=this._validateInputValue(t);var n=this._applyPrecision.bind(this);this.options.range?(this._state.value[0]=n(this._state.value[0]),this._state.value[1]=n(this._state.value[1]),this._state.value[0]=Math.max(this.options.min,Math.min(this.options.max,this._state.value[0])),this._state.value[1]=Math.max(this.options.min,Math.min(this.options.max,this._state.value[1]))):(this._state.value=n(this._state.value),this._state.value=[Math.max(this.options.min,Math.min(this.options.max,this._state.value))],this._addClass(this.handle2,"hide"),"after"===this.options.selection?this._state.value[1]=this.options.max:this._state.value[1]=this.options.min),this.options.max>this.options.min?this._state.percentage=[this._toPercentage(this._state.value[0]),this._toPercentage(this._state.value[1]),100*this.options.step/(this.options.max-this.options.min)]:this._state.percentage=[0,0,100],this._layout();var o=this.options.range?this._state.value:this._state.value[0];return this._setDataVal(o),!0===e&&this._trigger("slide",o),s!==o&&!0===i&&this._trigger("change",{oldValue:s,newValue:o}),this},destroy:function(){this._removeSliderEventHandlers(),this.sliderElem.parentNode.removeChild(this.sliderElem),this.element.style.display="",this._cleanUpEventCallbacksMap(),this.element.removeAttribute("data"),t&&(this._unbindJQueryEventHandlers(),this.$element.removeData("slider"))},disable:function(){return this._state.enabled=!1,this.handle1.removeAttribute("tabindex"),this.handle2.removeAttribute("tabindex"),this._addClass(this.sliderElem,"slider-disabled"),this._trigger("slideDisabled"),this},enable:function(){return this._state.enabled=!0,this.handle1.setAttribute("tabindex",0),this.handle2.setAttribute("tabindex",0),this._removeClass(this.sliderElem,"slider-disabled"),this._trigger("slideEnabled"),this},toggle:function(){return this._state.enabled?this.disable():this.enable(),this},isEnabled:function(){return this._state.enabled},on:function(t,e){return this._bindNonQueryEventHandler(t,e),this},off:function(e,i){t?(this.$element.off(e,i),this.$sliderElem.off(e,i)):this._unbindNonQueryEventHandler(e,i)},getAttribute:function(t){return t?this.options[t]:this.options},setAttribute:function(t,e){return this.options[t]=e,this},refresh:function(){return this._removeSliderEventHandlers(),i.call(this,this.element,this.options),t&&t.data(this.element,"slider",this),this},relayout:function(){return this._resize(),this._layout(),this},_removeSliderEventHandlers:function(){if(this.handle1.removeEventListener("keydown",this.handle1Keydown,!1),this.handle2.removeEventListener("keydown",this.handle2Keydown,!1),this.options.ticks_tooltip){for(var t=this.ticksContainer.getElementsByClassName("slider-tick"),e=0;e<t.length;e++)t[e].removeEventListener("mouseenter",this.ticksCallbackMap[e].mouseEnter,!1),t[e].removeEventListener("mouseleave",this.ticksCallbackMap[e].mouseLeave,!1);this.handle1.removeEventListener("mouseenter",this.handleCallbackMap.handle1.mouseEnter,!1),this.handle2.removeEventListener("mouseenter",this.handleCallbackMap.handle2.mouseEnter,!1),this.handle1.removeEventListener("mouseleave",this.handleCallbackMap.handle1.mouseLeave,!1),this.handle2.removeEventListener("mouseleave",this.handleCallbackMap.handle2.mouseLeave,!1)}this.handleCallbackMap=null,this.ticksCallbackMap=null,this.showTooltip&&(this.handle1.removeEventListener("focus",this.showTooltip,!1),this.handle2.removeEventListener("focus",this.showTooltip,!1)),this.hideTooltip&&(this.handle1.removeEventListener("blur",this.hideTooltip,!1),this.handle2.removeEventListener("blur",this.hideTooltip,!1)),this.showTooltip&&this.sliderElem.removeEventListener("mouseenter",this.showTooltip,!1),this.hideTooltip&&this.sliderElem.removeEventListener("mouseleave",this.hideTooltip,!1),this.sliderElem.removeEventListener("touchstart",this.touchstart,!1),this.sliderElem.removeEventListener("touchmove",this.touchmove,!1),this.sliderElem.removeEventListener("mousedown",this.mousedown,!1),window.removeEventListener("resize",this.resize,!1)},_bindNonQueryEventHandler:function(t,e){void 0===this.eventToCallbackMap[t]&&(this.eventToCallbackMap[t]=[]),this.eventToCallbackMap[t].push(e)},_unbindNonQueryEventHandler:function(t,e){var i=this.eventToCallbackMap[t];if(void 0!==i)for(var s=0;s<i.length;s++)if(i[s]===e){i.splice(s,1);break}},_cleanUpEventCallbacksMap:function(){for(var t=Object.keys(this.eventToCallbackMap),e=0;e<t.length;e++){var i=t[e];delete this.eventToCallbackMap[i]}},_showTooltip:function(){!1===this.options.tooltip_split?(this._addClass(this.tooltip,"in"),this.tooltip_min.style.display="none",this.tooltip_max.style.display="none"):(this._addClass(this.tooltip_min,"in"),this._addClass(this.tooltip_max,"in"),this.tooltip.style.display="none"),this._state.over=!0},_hideTooltip:function(){!1===this._state.inDrag&&!0!==this.alwaysShowTooltip&&(this._removeClass(this.tooltip,"in"),this._removeClass(this.tooltip_min,"in"),this._removeClass(this.tooltip_max,"in")),this._state.over=!1},_setToolTipOnMouseOver:function(t){function e(t,e){return e?[100-t.percentage[0],this.options.range?100-t.percentage[1]:t.percentage[1]]:[t.percentage[0],t.percentage[1]]}var i=this.options.formatter(t?t.value[0]:this._state.value[0]),s=t?e(t,this.options.reversed):e(this._state,this.options.reversed);this._setText(this.tooltipInner,i),this.tooltip.style[this.stylePos]=s[0]+"%"},_addTickListener:function(){return{addMouseEnter:function(t,e,i){var s=function(){var e=t._state,s=i>=0?i:this.attributes["aria-valuenow"].value,n=parseInt(s,10);e.value[0]=n,e.percentage[0]=t.options.ticks_positions[n],t._setToolTipOnMouseOver(e),t._showTooltip()};return e.addEventListener("mouseenter",s,!1),s},addMouseLeave:function(t,e){var i=function(){t._hideTooltip()};return e.addEventListener("mouseleave",i,!1),i}}},_layout:function(){var t;if(t=this.options.reversed?[100-this._state.percentage[0],this.options.range?100-this._state.percentage[1]:this._state.percentage[1]]:[this._state.percentage[0],this._state.percentage[1]],this.handle1.style[this.stylePos]=t[0]+"%",this.handle1.setAttribute("aria-valuenow",this._state.value[0]),isNaN(this.options.formatter(this._state.value[0]))&&this.handle1.setAttribute("aria-valuetext",this.options.formatter(this._state.value[0])),this.handle2.style[this.stylePos]=t[1]+"%",this.handle2.setAttribute("aria-valuenow",this._state.value[1]),isNaN(this.options.formatter(this._state.value[1]))&&this.handle2.setAttribute("aria-valuetext",this.options.formatter(this._state.value[1])),this.rangeHighlightElements.length>0&&Array.isArray(this.options.rangeHighlights)&&this.options.rangeHighlights.length>0)for(var e=0;e<this.options.rangeHighlights.length;e++){var i=this._toPercentage(this.options.rangeHighlights[e].start),s=this._toPercentage(this.options.rangeHighlights[e].end);if(this.options.reversed){var n=100-s;s=100-i,i=n}var o=this._createHighlightRange(i,s);o?"vertical"===this.options.orientation?(this.rangeHighlightElements[e].style.top=o.start+"%",this.rangeHighlightElements[e].style.height=o.size+"%"):(this.options.rtl?this.rangeHighlightElements[e].style.right=o.start+"%":this.rangeHighlightElements[e].style.left=o.start+"%",this.rangeHighlightElements[e].style.width=o.size+"%"):this.rangeHighlightElements[e].style.display="none"}if(Array.isArray(this.options.ticks)&&this.options.ticks.length>0){var a,r="vertical"===this.options.orientation?"height":"width";a="vertical"===this.options.orientation?"marginTop":this.options.rtl?"marginRight":"marginLeft";var l=this._state.size/(this.options.ticks.length-1);if(this.tickLabelContainer){var h=0;if(0===this.options.ticks_positions.length)"vertical"!==this.options.orientation&&(this.tickLabelContainer.style[a]=-l/2+"px"),h=this.tickLabelContainer.offsetHeight;else for(d=0;d<this.tickLabelContainer.childNodes.length;d++)this.tickLabelContainer.childNodes[d].offsetHeight>h&&(h=this.tickLabelContainer.childNodes[d].offsetHeight);"horizontal"===this.options.orientation&&(this.sliderElem.style.marginBottom=h+"px")}for(var d=0;d<this.options.ticks.length;d++){var u=this.options.ticks_positions[d]||this._toPercentage(this.options.ticks[d]);this.options.reversed&&(u=100-u),this.ticks[d].style[this.stylePos]=u+"%",this._removeClass(this.ticks[d],"in-selection"),this.options.range?u>=t[0]&&u<=t[1]&&this._addClass(this.ticks[d],"in-selection"):"after"===this.options.selection&&u>=t[0]?this._addClass(this.ticks[d],"in-selection"):"before"===this.options.selection&&u<=t[0]&&this._addClass(this.ticks[d],"in-selection"),this.tickLabels[d]&&(this.tickLabels[d].style[r]=l+"px","vertical"!==this.options.orientation&&void 0!==this.options.ticks_positions[d]?(this.tickLabels[d].style.position="absolute",this.tickLabels[d].style[this.stylePos]=u+"%",this.tickLabels[d].style[a]=-l/2+"px"):"vertical"===this.options.orientation&&(this.options.rtl?this.tickLabels[d].style.marginRight=this.sliderElem.offsetWidth+"px":this.tickLabels[d].style.marginLeft=this.sliderElem.offsetWidth+"px",this.tickLabelContainer.style[a]=this.sliderElem.offsetWidth/2*-1+"px"))}}var c;if(this.options.range){c=this.options.formatter(this._state.value),this._setText(this.tooltipInner,c),this.tooltip.style[this.stylePos]=(t[1]+t[0])/2+"%";var p=this.options.formatter(this._state.value[0]);this._setText(this.tooltipInner_min,p);var m=this.options.formatter(this._state.value[1]);this._setText(this.tooltipInner_max,m),this.tooltip_min.style[this.stylePos]=t[0]+"%",this.tooltip_max.style[this.stylePos]=t[1]+"%"}else c=this.options.formatter(this._state.value[0]),this._setText(this.tooltipInner,c),this.tooltip.style[this.stylePos]=t[0]+"%";if("vertical"===this.options.orientation)this.trackLow.style.top="0",this.trackLow.style.height=Math.min(t[0],t[1])+"%",this.trackSelection.style.top=Math.min(t[0],t[1])+"%",this.trackSelection.style.height=Math.abs(t[0]-t[1])+"%",this.trackHigh.style.bottom="0",this.trackHigh.style.height=100-Math.min(t[0],t[1])-Math.abs(t[0]-t[1])+"%";else{"right"===this.stylePos?this.trackLow.style.right="0":this.trackLow.style.left="0",this.trackLow.style.width=Math.min(t[0],t[1])+"%","right"===this.stylePos?this.trackSelection.style.right=Math.min(t[0],t[1])+"%":this.trackSelection.style.left=Math.min(t[0],t[1])+"%",this.trackSelection.style.width=Math.abs(t[0]-t[1])+"%","right"===this.stylePos?this.trackHigh.style.left="0":this.trackHigh.style.right="0",this.trackHigh.style.width=100-Math.min(t[0],t[1])-Math.abs(t[0]-t[1])+"%";var f=this.tooltip_min.getBoundingClientRect(),v=this.tooltip_max.getBoundingClientRect();"bottom"===this.options.tooltip_position?f.right>v.left?(this._removeClass(this.tooltip_max,"bottom"),this._addClass(this.tooltip_max,"top"),this.tooltip_max.style.top="",this.tooltip_max.style.bottom="22px"):(this._removeClass(this.tooltip_max,"top"),this._addClass(this.tooltip_max,"bottom"),this.tooltip_max.style.top=this.tooltip_min.style.top,this.tooltip_max.style.bottom=""):f.right>v.left?(this._removeClass(this.tooltip_max,"top"),this._addClass(this.tooltip_max,"bottom"),this.tooltip_max.style.top="18px"):(this._removeClass(this.tooltip_max,"bottom"),this._addClass(this.tooltip_max,"top"),this.tooltip_max.style.top=this.tooltip_min.style.top)}},_createHighlightRange:function(t,e){return this._isHighlightRange(t,e)?t>e?{start:e,size:t-e}:{start:t,size:e-t}:null},_isHighlightRange:function(t,e){return 0<=t&&t<=100&&0<=e&&e<=100},_resize:function(t){this._state.offset=this._offset(this.sliderElem),this._state.size=this.sliderElem[this.sizePos],this._layout()},_removeProperty:function(t,e){t.style.removeProperty?t.style.removeProperty(e):t.style.removeAttribute(e)},_mousedown:function(t){if(!this._state.enabled)return!1;this._state.offset=this._offset(this.sliderElem),this._state.size=this.sliderElem[this.sizePos];var e=this._getPercentage(t);if(this.options.range){var i=Math.abs(this._state.percentage[0]-e),s=Math.abs(this._state.percentage[1]-e);this._state.dragged=i<s?0:1,this._adjustPercentageForRangeSliders(e)}else this._state.dragged=0;this._state.percentage[this._state.dragged]=e,this._layout(),this.touchCapable&&(document.removeEventListener("touchmove",this.mousemove,!1),document.removeEventListener("touchend",this.mouseup,!1)),this.mousemove&&document.removeEventListener("mousemove",this.mousemove,!1),this.mouseup&&document.removeEventListener("mouseup",this.mouseup,!1),this.mousemove=this._mousemove.bind(this),this.mouseup=this._mouseup.bind(this),this.touchCapable&&(document.addEventListener("touchmove",this.mousemove,!1),document.addEventListener("touchend",this.mouseup,!1)),document.addEventListener("mousemove",this.mousemove,!1),document.addEventListener("mouseup",this.mouseup,!1),this._state.inDrag=!0;var n=this._calculateValue();return this._trigger("slideStart",n),this._setDataVal(n),this.setValue(n,!1,!0),t.returnValue=!1,this.options.focus&&this._triggerFocusOnHandle(this._state.dragged),!0},_touchstart:function(t){if(void 0===t.changedTouches)return void this._mousedown(t);var e=t.changedTouches[0];this.touchX=e.pageX,this.touchY=e.pageY},_triggerFocusOnHandle:function(t){0===t&&this.handle1.focus(),1===t&&this.handle2.focus()},_keydown:function(t,e){if(!this._state.enabled)return!1;var i;switch(e.keyCode){case 37:case 40:i=-1;break;case 39:case 38:i=1}if(i){if(this.options.natural_arrow_keys){var s="vertical"===this.options.orientation&&!this.options.reversed,n="horizontal"===this.options.orientation&&this.options.reversed;(s||n)&&(i=-i)}var o=this._state.value[t]+i*this.options.step,a=o/this.options.max*100;if(this._state.keyCtrl=t,this.options.range){this._adjustPercentageForRangeSliders(a);o=[this._state.keyCtrl?this._state.value[0]:o,this._state.keyCtrl?o:this._state.value[1]]}return this._trigger("slideStart",o),this._setDataVal(o),this.setValue(o,!0,!0),this._setDataVal(o),this._trigger("slideStop",o),this._layout(),this._pauseEvent(e),delete this._state.keyCtrl,!1}},_pauseEvent:function(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.cancelBubble=!0,t.returnValue=!1},_mousemove:function(t){if(!this._state.enabled)return!1;var e=this._getPercentage(t);this._adjustPercentageForRangeSliders(e),this._state.percentage[this._state.dragged]=e,this._layout();var i=this._calculateValue(!0);return this.setValue(i,!0,!0),!1},_touchmove:function(t){if(void 0!==t.changedTouches){var e=t.changedTouches[0],i=e.pageX-this.touchX,s=e.pageY-this.touchY;this._state.inDrag||("vertical"===this.options.orientation&&i<=5&&i>=-5&&(s>=15||s<=-15)?this._mousedown(t):s<=5&&s>=-5&&(i>=15||i<=-15)&&this._mousedown(t))}},_adjustPercentageForRangeSliders:function(t){if(this.options.range){var e=this._getNumDigitsAfterDecimalPlace(t);e=e?e-1:0;var i=this._applyToFixedAndParseFloat(t,e);0===this._state.dragged&&this._applyToFixedAndParseFloat(this._state.percentage[1],e)<i?(this._state.percentage[0]=this._state.percentage[1],this._state.dragged=1):1===this._state.dragged&&this._applyToFixedAndParseFloat(this._state.percentage[0],e)>i?(this._state.percentage[1]=this._state.percentage[0],this._state.dragged=0):0===this._state.keyCtrl&&this._state.value[1]/this.options.max*100<t?(this._state.percentage[0]=this._state.percentage[1],this._state.keyCtrl=1,this.handle2.focus()):1===this._state.keyCtrl&&this._state.value[0]/this.options.max*100>t&&(this._state.percentage[1]=this._state.percentage[0],this._state.keyCtrl=0,this.handle1.focus())}},_mouseup:function(){if(!this._state.enabled)return!1;this.touchCapable&&(document.removeEventListener("touchmove",this.mousemove,!1),document.removeEventListener("touchend",this.mouseup,!1)),document.removeEventListener("mousemove",this.mousemove,!1),document.removeEventListener("mouseup",this.mouseup,!1),this._state.inDrag=!1,!1===this._state.over&&this._hideTooltip();var t=this._calculateValue(!0);return this._layout(),this._setDataVal(t),this._trigger("slideStop",t),!1},_calculateValue:function(t){var e;if(this.options.range?(e=[this.options.min,this.options.max],0!==this._state.percentage[0]&&(e[0]=this._toValue(this._state.percentage[0]),e[0]=this._applyPrecision(e[0])),100!==this._state.percentage[1]&&(e[1]=this._toValue(this._state.percentage[1]),e[1]=this._applyPrecision(e[1]))):(e=this._toValue(this._state.percentage[0]),e=parseFloat(e),e=this._applyPrecision(e)),t){for(var i=[e,1/0],s=0;s<this.options.ticks.length;s++){var n=Math.abs(this.options.ticks[s]-e);n<=i[1]&&(i=[this.options.ticks[s],n])}if(i[1]<=this.options.ticks_snap_bounds)return i[0]}return e},_applyPrecision:function(t){var e=this.options.precision||this._getNumDigitsAfterDecimalPlace(this.options.step);return this._applyToFixedAndParseFloat(t,e)},_getNumDigitsAfterDecimalPlace:function(t){var e=(""+t).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return e?Math.max(0,(e[1]?e[1].length:0)-(e[2]?+e[2]:0)):0},_applyToFixedAndParseFloat:function(t,e){var i=t.toFixed(e);return parseFloat(i)},_getPercentage:function(t){!this.touchCapable||"touchstart"!==t.type&&"touchmove"!==t.type||(t=t.touches[0]);var e=t[this.mousePos],i=this._state.offset[this.stylePos],s=e-i;"right"===this.stylePos&&(s=-s);var n=s/this._state.size*100;return n=Math.round(n/this._state.percentage[2])*this._state.percentage[2],this.options.reversed&&(n=100-n),Math.max(0,Math.min(100,n))},_validateInputValue:function(t){if(isNaN(+t)){if(Array.isArray(t))return this._validateArray(t),t;throw new Error(s.formatInvalidInputErrorMsg(t))}return+t},_validateArray:function(t){for(var e=0;e<t.length;e++){var i=t[e];if("number"!=typeof i)throw new Error(s.formatInvalidInputErrorMsg(i))}},_setDataVal:function(t){this.element.setAttribute("data-value",t),this.element.setAttribute("value",t),this.element.value=t},_trigger:function(e,i){i=i||0===i?i:void 0;var s=this.eventToCallbackMap[e];if(s&&s.length)for(var n=0;n<s.length;n++){var o=s[n];o(i)}t&&this._triggerJQueryEvent(e,i)},_triggerJQueryEvent:function(t,e){var i={type:t,value:e};this.$element.trigger(i),this.$sliderElem.trigger(i)},_unbindJQueryEventHandlers:function(){this.$element.off(),this.$sliderElem.off()},_setText:function(t,e){void 0!==t.textContent?t.textContent=e:void 0!==t.innerText&&(t.innerText=e)},_removeClass:function(t,e){for(var i=e.split(" "),s=t.className,n=0;n<i.length;n++){var o=i[n],a=new RegExp("(?:\\s|^)"+o+"(?:\\s|$)");s=s.replace(a," ")}t.className=s.trim()},_addClass:function(t,e){for(var i=e.split(" "),s=t.className,n=0;n<i.length;n++){var o=i[n];new RegExp("(?:\\s|^)"+o+"(?:\\s|$)").test(s)||(s+=" "+o)}t.className=s.trim()},_offsetLeft:function(t){return t.getBoundingClientRect().left},_offsetRight:function(t){return t.getBoundingClientRect().right},_offsetTop:function(t){for(var e=t.offsetTop;(t=t.offsetParent)&&!isNaN(t.offsetTop);)e+=t.offsetTop,"BODY"!==t.tagName&&(e-=t.scrollTop);return e},_offset:function(t){return{left:this._offsetLeft(t),right:this._offsetRight(t),top:this._offsetTop(t)}},_css:function(e,i,s){if(t)t.style(e,i,s);else{var n=i.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(t,e){return e.toUpperCase()});e.style[n]=s}},_toValue:function(t){return this.options.scale.toValue.apply(this,[t])},_toPercentage:function(t){return this.options.scale.toPercentage.apply(this,[t])},_setTooltipPosition:function(){var t=[this.tooltip,this.tooltip_min,this.tooltip_max];if("vertical"===this.options.orientation){var e;e=this.options.tooltip_position?this.options.tooltip_position:this.options.rtl?"left":"right";var i="left"===e?"right":"left";t.forEach(function(t){this._addClass(t,e),t.style[i]="100%"}.bind(this))}else"bottom"===this.options.tooltip_position?t.forEach(function(t){this._addClass(t,"bottom"),t.style.top="22px"}.bind(this)):t.forEach(function(t){this._addClass(t,"top"),t.style.top=-this.tooltip.outerHeight-14+"px"}.bind(this))}},t&&t.fn){var o=void 0;t.fn.slider?(r&&window.console.warn("bootstrap-slider.js - WARNING: $.fn.slider namespace is already bound. Use the $.fn.bootstrapSlider namespace instead."),o="bootstrapSlider"):(t.bridget("slider",e),o="slider"),t.bridget("bootstrapSlider",e),t(function(){t("input[data-provide=slider]")[o]()})}}(t),e})},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=i(1);i.d(e,"icheck",function(){return s.default});var n=i(2);i.d(e,"select2",function(){return n.default});var o=i(3);i.d(e,"imagepicker",function(){return o.default});var a=i(4);i.d(e,"inputmask",function(){return a.default});var r=i(6);i.d(e,"jquerybarrating",function(){return r.default});var l=i(7);i.d(e,"jqueryuidatepicker",function(){return l.default});var h=i(8);i.d(e,"nouislider",function(){return h.default});var d=i(10);i.d(e,"select2tagbox",function(){return d.default});var u=i(11);i.d(e,"signaturepad",function(){return u.default});var c=i(13);i.d(e,"sortablejs",function(){return c.default});var p=i(15);i.d(e,"ckeditor",function(){return p.default});var m=i(16);i.d(e,"autocomplete",function(){return m.default});var f=i(17);i.d(e,"prettycheckbox",function(){return f.default});var v=i(18);i.d(e,"bootstrapslider",function(){return v.default})}])});
//# sourceMappingURL=surveyjs-widgets.min.js.map