text: !function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Fontsampler=f()}}(function(){return function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){return o(e[i][1][r]||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}({1:[function(_dereq_,module,exports){"use strict";var hasOwn=Object.prototype.hasOwnProperty,toStr=Object.prototype.toString,defineProperty=Object.defineProperty,gOPD=Object.getOwnPropertyDescriptor,isArray=function(arr){return"function"==typeof Array.isArray?Array.isArray(arr):"[object Array]"===toStr.call(arr)},isPlainObject=function(obj){if(!obj||"[object Object]"!==toStr.call(obj))return!1;var key,hasOwnConstructor=hasOwn.call(obj,"constructor"),hasIsPrototypeOf=obj.constructor&&obj.constructor.prototype&&hasOwn.call(obj.constructor.prototype,"isPrototypeOf");if(obj.constructor&&!hasOwnConstructor&&!hasIsPrototypeOf)return!1;for(key in obj);return void 0===key||hasOwn.call(obj,key)},setProperty=function(target,options){defineProperty&&"__proto__"===options.name?defineProperty(target,options.name,{enumerable:!0,configurable:!0,value:options.newValue,writable:!0}):target[options.name]=options.newValue},getProperty=function(obj,name){if("__proto__"===name){if(!hasOwn.call(obj,name))return;if(gOPD)return gOPD(obj,name).value}return obj[name]};module.exports=function extend(){var options,name,src,copy,copyIsArray,clone,target=arguments[0],i=1,length=arguments.length,deep=!1;for("boolean"==typeof target&&(deep=target,target=arguments[1]||{},i=2),(null==target||"object"!=typeof target&&"function"!=typeof target)&&(target={});i<length;++i)if(null!=(options=arguments[i]))for(name in options)src=getProperty(target,name),target!==(copy=getProperty(options,name))&&(deep&&copy&&(isPlainObject(copy)||(copyIsArray=isArray(copy)))?(clone=copyIsArray?(copyIsArray=!1,src&&isArray(src)?src:[]):src&&isPlainObject(src)?src:{},setProperty(target,{name:name,newValue:extend(deep,clone,copy)})):void 0!==copy&&setProperty(target,{name:name,newValue:copy}));return target}},{}],2:[function(_dereq_,module,exports){function l(a,b){document.addEventListener?a.addEventListener("scroll",b,!1):a.attachEvent("scroll",b)}function t(a){this.a=document.createElement("div"),this.a.setAttribute("aria-hidden","true"),this.a.appendChild(document.createTextNode(a)),this.b=document.createElement("span"),this.c=document.createElement("span"),this.h=document.createElement("span"),this.f=document.createElement("span"),this.g=-1,this.b.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.c.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.f.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.h.style.cssText="display:inline-block;width:200%;height:200%;font-size:16px;max-width:none;",this.b.appendChild(this.h),this.c.appendChild(this.f),this.a.appendChild(this.b),this.a.appendChild(this.c)}function u(a,b){a.a.style.cssText="max-width:none;min-width:20px;min-height:20px;display:inline-block;overflow:hidden;position:absolute;width:auto;margin:0;padding:0;top:-999px;white-space:nowrap;font-synthesis:none;font:"+b+";"}function z(a){var b=a.a.offsetWidth,c=b+100;return a.f.style.width=c+"px",a.c.scrollLeft=c,a.b.scrollLeft=a.b.scrollWidth+100,a.g!==b&&(a.g=b,!0)}function A(a,b){function c(){var a=k;z(a)&&a.a.parentNode&&b(a.g)}var k=a;l(a.b,c),l(a.c,c),z(a)}function B(a,b){var c=b||{};this.family=a,this.style=c.style||"normal",this.weight=c.weight||"normal",this.stretch=c.stretch||"normal"}function J(){return null===F&&(F=!!document.fonts),F}function L(a,b){return[a.style,a.weight,function(){if(null===E){var a=document.createElement("div");try{a.style.font="condensed 100px sans-serif"}catch(b){}E=""!==a.style.font}return E}()?a.stretch:"","100px",b].join(" ")}var C,D,E,F;F=E=D=C=null,B.prototype.load=function(a,b){var c=this,k=a||"BESbswy",r=0,n=b||3e3,H=(new Date).getTime();return new Promise(function(a,b){if(J()&&!function(){if(null===D)if(J()&&/Apple/.test(window.navigator.vendor)){var a=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))(?:\.([0-9]+))/.exec(window.navigator.userAgent);D=!!a&&parseInt(a[1],10)<603}else D=!1;return D}()){var M=new Promise(function(a,b){!function e(){(new Date).getTime()-H>=n?b(Error(n+"ms timeout exceeded")):document.fonts.load(L(c,'"'+c.family+'"'),k).then(function(c){1<=c.length?a():setTimeout(e,25)},b)}()}),N=new Promise(function(a,c){r=setTimeout(function(){c(Error(n+"ms timeout exceeded"))},n)});Promise.race([N,M]).then(function(){clearTimeout(r),a(c)},b)}else!function(a){document.body?a():document.addEventListener?document.addEventListener("DOMContentLoaded",function c(){document.removeEventListener("DOMContentLoaded",c),a()}):document.attachEvent("onreadystatechange",function k(){"interactive"!=document.readyState&&"complete"!=document.readyState||(document.detachEvent("onreadystatechange",k),a())})}(function(){function v(){var b;(b=-1!=f&&-1!=g||-1!=f&&-1!=h||-1!=g&&-1!=h)&&((b=f!=g&&f!=h&&g!=h)||(null===C&&(b=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent),C=!!b&&(parseInt(b[1],10)<536||536===parseInt(b[1],10)&&parseInt(b[2],10)<=11)),b=C&&(f==w&&g==w&&h==w||f==x&&g==x&&h==x||f==y&&g==y&&h==y)),b=!b),b&&(d.parentNode&&d.parentNode.removeChild(d),clearTimeout(r),a(c))}var e=new t(k),p=new t(k),q=new t(k),f=-1,g=-1,h=-1,w=-1,x=-1,y=-1,d=document.createElement("div");d.dir="ltr",u(e,L(c,"sans-serif")),u(p,L(c,"serif")),u(q,L(c,"monospace")),d.appendChild(e.a),d.appendChild(p.a),d.appendChild(q.a),document.body.appendChild(d),w=e.a.offsetWidth,x=p.a.offsetWidth,y=q.a.offsetWidth,function I(){if((new Date).getTime()-H>=n)d.parentNode&&d.parentNode.removeChild(d),b(Error(n+"ms timeout exceeded"));else{var a=document.hidden;!0!==a&&void 0!==a||(f=e.a.offsetWidth,g=p.a.offsetWidth,h=q.a.offsetWidth,v()),r=setTimeout(I,50)}}(),A(e,function(a){f=a,v()}),u(e,L(c,'"'+c.family+'",sans-serif')),A(p,function(a){g=a,v()}),u(p,L(c,'"'+c.family+'",serif')),A(q,function(a){h=a,v()}),u(q,L(c,'"'+c.family+'",monospace'))})})},"object"==typeof module?module.exports=B:(window.FontFaceObserver=B,window.FontFaceObserver.prototype.load=B.prototype.load)},{}],3:[function(_dereq_,module,exports){module.exports={initialText:"",multiline:!0,lazyload:!1,generate:!1,timeout:3e3,classes:{rootClass:"fontsamplerjs",initClass:"fsjs-initialized",loadingClass:"fsjs-loading",timeoutClass:"fsjs-timeout",preloadingClass:"fsjs-preloading",wrapperClass:"fsjs-wrapper",blockClass:"fsjs-block",elementClass:"fsjs-element",labelClass:"fsjs-label",labelTextClass:"fsjs-label-text",labelValueClass:"fsjs-label-value",labelUnitClass:"fsjs-label-unit",buttonClass:"fsjs-button",buttonSelectedClass:"fsjs-button-selected",disabledClass:"fsjs-disabled"},order:["tester"],ui:{tester:{editable:!0,label:!1,render:!0},fontfamily:{label:"Font",init:"",render:!0},fontsize:{unit:"px",init:36,min:8,max:96,step:1,label:"Size",render:!0},lineheight:{unit:"%",init:100,min:60,max:120,step:5,label:"Leading",render:!0},letterspacing:{unit:"em",init:0,min:-.1,max:.1,step:.01,label:"Letterspacing",render:!0},alignment:{choices:["left|Left","center|Centered","right|Right"],init:"left",label:"Alignment",render:!0},direction:{choices:["ltr|Left to right","rtl|Right to left"],init:"ltr",label:"Direction",render:!0},language:{choices:["en-GB|English","de-De|Deutsch","nl-NL|Dutch"],init:"en-Gb",label:"Language",render:!0},opentype:{choices:["liga|Ligatures","frac|Fractions"],init:["liga"],label:"Opentype features",render:!0},variation:{axes:[],render:!0}}}},{}],4:[function(_dereq_,module,exports){module.exports={noFonts:"Fontsampler: No fonts were passed in.",initFontFormatting:"Fontsampler: Passed in fonts are not in expected format. Expected [ { name: 'Font Name', files: [ 'fontfile.woff', 'fontfile.woff2' ] }, … ]",fileNotfound:"Fontsampler: The passed in file could not be loaded.",missingRoot:"Fontsampler: Passed in root element invalid: ",tooManyFiles:"Fontsampler: Supplied more than one woff or woff2 for a font: ",invalidUIItem:"Fontsampler: The supplied UI item is not supported: ",invalidEvent:"Fontsampler: Invalid event type. You can only register Fontsampler events on the Fontsampler instance.",newInit:"Fontsampler: Instantiated Fontsampler without 'new' keyword. Create Fontsamplers using new Fontsampler(…)",dataFontsJsonInvalid:"Fontsampler: The data-fonts JSON failed to parse.",invalidDOMOptions:"Fontsampler: Could not parse data-options on Fontsampler root node. Make sure it is valid JSON and follows the default options structure.",invalidVariation:"Fontsampler: Invalid variation instance values"}},{}],5:[function(_dereq_,module,exports){module.exports={init:"fontsampler.events.init",languageChanged:"fontsampler.events.languagechanged",fontChanged:"fontsampler.events.fontchanged",fontLoaded:"fontsampler.events.fontloaded",fontRendered:"fontsampler.events.fontrendered",fontsPreloaded:"fontsampler.events.fontspreloaded",valueChanged:"fontsampler.events.valuechanged",opentypeChanged:"fontsampler.events.opentypechanged"}},{}],6:[function(_dereq_,module,exports){var FontFaceObserver=_dereq_("../node_modules/fontfaceobserver/fontfaceobserver.standalone"),helpers=(_dereq_("./constants/errors"),_dereq_("./helpers/supports"),_dereq_("./helpers/helpers"));function GlobalLoader(){var queue=[],done={},callbacks={};function onSuccess(fontface){if(queue.splice(queue.indexOf(fontface.family),1),fontface.isLoaded=!0,(done[fontface.family]=fontface).family in callbacks&&"success"in callbacks[fontface.family]){for(var i=0;i<callbacks[fontface.family].success.length;i++)callbacks[fontface.family].success[i](fontface);callbacks[fontface.family]={}}}function onError(family,file,e){"function"==typeof error&&error(e)}return{onFontDone:function(family,file,success,error,timeout){family in done==1?!0===done[family].isLoaded?success(done[family]):error(done[family]):-1!==queue.indexOf(family)?(callbacks[family].success.push(success),callbacks[family].error.push(error)):(queue.push(family),callbacks[family]={success:[success],error:[error]},function(family,file,timeout){if(void 0===timeout&&(timeout=3e3),"FontFace"in window){var ff=new FontFace(family,"url("+file+")",{});ff.load().then(function(){document.fonts.add(ff),onSuccess(ff)},function(e){onError(0,0,e)})}else{var font=new FontFaceObserver(family);font.load(null,timeout).then(function(ff){onSuccess(ff)},function(e){onError(0,0,e)});var newStyle=document.createElement("style");newStyle.appendChild(document.createTextNode("@font-face { font-family: '"+family+"'; src: url('"+file+"'); }")),document.head.appendChild(newStyle)}}(family,file,timeout))}}}function loadFont(file,callback,error,timeout){if(!file)return!1;var family=file.substring(file.lastIndexOf("/")+1);family=(family=family.substring(0,family.lastIndexOf("."))).replace(/\W/gm,""),"FontsamplerFontloader"in window==!1&&(window.FontsamplerFontloader=GlobalLoader()),window.FontsamplerFontloader.onFontDone(family,file,callback,error,timeout)}module.exports={loadFont:loadFont,fromFiles:function(files,callback,error,timeout){font=helpers.bestWoff(files),loadFont(font,callback,error,timeout)}}},{"../node_modules/fontfaceobserver/fontfaceobserver.standalone":2,"./constants/errors":4,"./helpers/helpers":9,"./helpers/supports":11}],7:[function(_dereq_,module,exports){var extend=_dereq_("../node_modules/extend"),Fontloader=_dereq_("./fontloader"),Interface=_dereq_("./ui"),Preloader=_dereq_("./preloader"),errors=_dereq_("./constants/errors"),events=_dereq_("./constants/events"),_defaults=_dereq_("./constants/defaults"),helpers=_dereq_("./helpers/helpers"),utils=_dereq_("./helpers/utils"),dom=_dereq_("./helpers/dom"),supports=_dereq_("./helpers/supports");module.exports=function(_root,_fonts,_options){var ui,options,fonts,preloader=new Preloader,passedInOptions=!1,defaults=JSON.parse(JSON.stringify(_defaults)),that=this;if(this===window)throw new Error(errors.newInit);if(!_root)throw new Error(errors.missingRoot+_root);function initFont(fontface){if(that.currentFont.fontface=fontface,ui.setStatusClass(options.classes.loadingClass,!1),ui.setInputCss("fontFamily",fontface.family),ui.setActiveAxes(that.currentFont.axes),"instance"in that.currentFont==1){var va=function(font){var parts,va={};if("instance"in font==0)return va;parts=font.instance.split(",");for(var p=0;p<parts.length;p++){var split=parts[p].trim().split(" ");va[split[0]]=split[1];var input=_root.querySelector("[data-axis='"+split[0]+"']");input&&(input.value=split[1],ui.sendNativeEvent("change",input)),ui.setLabelValue(split[0],split[1])}return va}(that.currentFont);ui.setInputVariation(va)}ui.setActiveOpentype(that.currentFont.features),"string"==typeof that.currentFont.language&&ui.setActiveLanguage(that.currentFont.language),ui.setActiveFont(that.currentFont.name),preloader.resume(),_root.dispatchEvent(new CustomEvent(events.fontRendered))}return this.root=_root,this.initialized=!1,this.currentFont=!1,this.loadedFonts=[],options=function(opt){var extractedOptions=!1,nodesInDom=this.root.querySelectorAll("[data-fsjs]"),blocksInDom=[],blocksInOrder=[],blocksInUI=[],blocks=[];if("options"in this.root.dataset)try{extractedOptions=JSON.parse(this.root.dataset.options)}catch(e){}if("object"==typeof opt&&"object"==typeof extractedOptions?passedInOptions=extend(!0,opt,extractedOptions):"object"==typeof opt?passedInOptions=opt:"object"==typeof extractedOptions&&(passedInOptions=extractedOptions),"object"==typeof passedInOptions){if("ui"in passedInOptions==1)for(var u in passedInOptions.ui)passedInOptions.ui.hasOwnProperty(u)&&"object"!=typeof passedInOptions.ui[u]&&(passedInOptions.ui[u]=defaults.ui[u]);options=extend(!0,defaults,passedInOptions)}else options=defaults;if(0<nodesInDom.length)for(var b=0;b<nodesInDom.length;b++)blocksInDom[b]=nodesInDom[b].dataset.fsjs;blocksInOrder="object"==typeof opt&&"order"in opt?utils.flattenDeep(opt.order):[],blocksInUI="object"==typeof opt&&"ui"in opt?Object.keys(opt.ui):[],blocks=blocksInDom.concat(blocksInOrder,blocksInUI),-1===(blocks=utils.arrayUnique(blocks)).indexOf("tester")&&blocks.push("tester"),"object"==typeof opt&&"order"in opt&&Array.isArray(opt.order)&&opt.order.length?options.order=opt.order:"object"==typeof extractedOptions&&"order"in extractedOptions&&Array.isArray(extractedOptions.order)&&extractedOptions.order.length&&(options.order=extractedOptions.order);for(var blocksInOrderNow=utils.flattenDeep(options.order),i=0;i<blocks.length;i++)-1===blocksInOrderNow.indexOf(blocks[i])&&options.order.push(blocks[i]);return options}.call(this,_options),fonts=function(fonts){var extractedFonts=helpers.extractFontsFromDOM(this.root);if((!fonts||fonts.length<1)&&extractedFonts&&(fonts=extractedFonts),!fonts)throw new Error(errors.noFonts);if(helpers.validateFontsFormatting(fonts))return fonts;throw new Error(errors.initFontFormatting)}.call(this,_fonts),fonts=function(fonts){if(!supports.variableFonts)return fonts;for(var parsed=[],f=0;f<fonts.length;f++){var font=fonts[f],bestWoff=helpers.bestWoff(font.files);if("instances"in font==1&&Array.isArray(font.instances)){if(!1===bestWoff||"woff"===bestWoff.substr(-4)||!supports.woff2){font.axes=[],font.instances=[],parsed.push(font);continue}for(var v=0;v<font.instances.length;v++){var parts=helpers.parseParts(font.instances[v]);axes=parts.val.split(",").map(function(value){var parts=value.trim().split(" ");return parts[0]}),"axes"in font==1&&(axes=utils.arrayUnique(axes.concat(font.axes))),parsed.push({name:parts.text,files:font.files,instance:parts.val,axes:axes,language:font.language,features:font.features})}}else font.axes=font.axes?font.axes:[],parsed.push(font)}return parsed}.call(this,fonts),ui=Interface(this.root,fonts,options),this.init=function(){var initialFont=0;return"init"in options.ui.fontfamily==1&&"string"==typeof options.ui.fontfamily.init&&""!==options.ui.fontfamily.init&&(initialFont=options.ui.fontfamily.init),ui.init(),function(){this.root.addEventListener(events.opentypeChanged,function(){var val=ui.getOpentype();ui.setInputOpentype(val)});var that=this;this.root.addEventListener(events.fontChanged,function(e){e.detail.font&&void 0===this.currentFont&&that.showFont(e.detail.font)})}.call(this),this.showFont.call(this,initialFont),options.lazyload&&(ui.setStatusClass(options.classes.preloadingClass,!0),preloader.load(fonts,function(){ui.setStatusClass(options.classes.preloadingClass,!1),_root.dispatchEvent(new CustomEvent(events.fontsPreloaded))})),dom.nodeAddClass(this.root,options.classes.initClass),dom.nodeAddClass(this.root,supports.woff2?"fsjs-woff2":"fsjs-woff"),dom.nodeAddClass(this.root,supports.variableFonts?"fsjs-variable-fonts":"fsjs-no-variable-fonts"),this.root.dispatchEvent(new CustomEvent(events.init)),this.initialized=!0,this},this.showFont=function(indexOrKey){var font;preloader.pause(),ui.setStatusClass(options.classes.loadingClass,!0),ui.setStatusClass(options.classes.timeoutClass,!1),"string"==typeof indexOrKey?(font=fonts.filter(function(value,index){return fonts[index].name===indexOrKey}).pop())||(font=fonts[0]):"number"==typeof indexOrKey&&0<=indexOrKey&&indexOrKey<=fonts.length&&(font=fonts[indexOrKey]),this.currentFont&&this.currentFont.files&&JSON.stringify(this.currentFont.files)===JSON.stringify(font.files)?(font.fontface=this.currentFont.fontface,this.currentFont=font,initFont(this.currentFont.fontface)):(this.currentFont=font,Fontloader.fromFiles(font.files,function(fontface){var fjson=JSON.stringify(fontface);-1===that.loadedFonts.indexOf(fjson)&&(that.loadedFonts.push(fjson),_root.dispatchEvent(new CustomEvent(events.fontLoaded,{detail:fontface}))),initFont(fontface)},function(fontface){ui.setStatusClass(options.classes.loadingClass,!1),ui.setStatusClass(options.classes.timeoutClass,!0),that.currentFont=!1},options.timeout))},this.setText=function(text){ui.setInputText(text)},this.getValue=function(key){return ui.getValue(key)},this.setValue=function(key,value){return ui.setValue(key,value)},this.setLabel=function(key,value){return ui.setLabelValue(key,value)},this}},{"../node_modules/extend":1,"./constants/defaults":3,"./constants/errors":4,"./constants/events":5,"./fontloader":6,"./helpers/dom":8,"./helpers/helpers":9,"./helpers/supports":11,"./helpers/utils":12,"./preloader":13,"./ui":14}],8:[function(_dereq_,module,exports){function addClass(className,classNames){return classNames||(classNames=""),className===classNames?classNames:(classNames=classNames.trim(),className?(className=className.trim(),-1===classNames.split(" ").indexOf(className)?classNames?classNames+" "+className:className:classNames):classNames)}function isNode(node){return"object"==typeof node&&null!==node&&"nodeType"in node}module.exports={nodeAddClass:function(node,className){return!(!isNode(node)||"string"!=typeof className||(node.className=addClass(className,node.className),0))},nodeAddClasses:function(node,classes){if(!isNode(node)||!Array.isArray(classes)||classes.length<1)return!1;for(var c=0;c<classes.length;c++)node.className=addClass(classes[c],node.className);return!0},nodeRemoveClass:function(node,className){return!(!isNode(node)||"string"!=typeof className||(node.className=function(className,classNames){if(!classNames)return"";if(classNames=classNames.trim(),!className)return classNames;className=className.trim();var classes=classNames.split(" "),classIndex=classes.indexOf(className);return-1!==classIndex&&classes.splice(classIndex,1),0<classes.length?classes.join(" "):""}(className,node.className),0))},isNode:isNode}},{}],9:[function(_dereq_,module,exports){var supports=_dereq_("./supports");function extractFontsFromNode(node,ignoreName){var singleFont={name:"Default",files:[]};if(node.dataset.fonts)try{return JSON.parse(node.dataset.fonts)}catch(error){throw new Error(errors.dataFontsJsonInvalid)}return node.dataset.name&&(singleFont.name=node.dataset.name),node.dataset.woff&&singleFont.files.push(node.dataset.woff),node.dataset.woff2&&singleFont.files.push(node.dataset.woff2),!!((singleFont.name||!singleFont.name&&ignoreName)&&0<singleFont.files.length)&&[singleFont]}function getExtension(path){return path.substring(path.lastIndexOf(".")+1)}module.exports={getExtension:getExtension,parseParts:function(choice){var parts,val,text;return text=-1!==choice.indexOf("|")?(val=(parts=choice.split("|"))[0],parts[1]):val=choice,{val:val,text:text}},validateFontsFormatting:function(fonts){if("object"!=typeof fonts||!Array.isArray(fonts))return!1;for(var i=0;i<fonts.length;i++){var font=fonts[i];if("object"!=typeof font)return!1;if(!font.name||!font.files||!Array.isArray(font.files)||font.files.length<=0)return!1}return!0},extractFontsFromDOM:function(root){var options,select=root.querySelector("[data-fsjs='fontfamily']"),fonts=[],rootFonts=extractFontsFromNode(root,!0);if(rootFonts)return rootFonts;if(!select)return!1;for(options=select.querySelectorAll("option"),i=0;i<options.length;i++){var extractedFonts=extractFontsFromNode(options[i],!1);fonts&&(fonts=fonts.concat(extractedFonts))}return fonts||!1},bestWoff:function(files){if("object"!=typeof files||!Array.isArray(files))return!1;var woffs=files.filter(function(value){return"woff"===getExtension(value)}),woff2s=files.filter(function(value){return"woff2"===getExtension(value)});if(1<woffs.length||1<woff2s.length)throw new Error(errors.tooManyFiles+files);return 0<woff2s.length&&supports.woff2?woff2s.shift():0<woffs.length&&woffs.shift()}}},{"./supports":11}],10:[function(_dereq_,module,exports){module.exports=function(){var setSelectionByCharacterOffsets=null;return window.getSelection&&document.createRange?setSelectionByCharacterOffsets=function(containerEl,start,end){var charIndex=0,range=document.createRange();range.setStart(containerEl,0),range.collapse(!0);for(var node,nodeStack=[containerEl],foundStart=!1,stop=!1;!stop&&(node=nodeStack.pop());)if(3==node.nodeType){var nextCharIndex=charIndex+node.length;!foundStart&&charIndex<=start&&start<=nextCharIndex&&(range.setStart(node,start-charIndex),foundStart=!0),foundStart&&charIndex<=end&&end<=nextCharIndex&&(range.setEnd(node,end-charIndex),stop=!0),charIndex=nextCharIndex}else for(var i=node.childNodes.length;i--;)nodeStack.push(node.childNodes[i]);var sel=window.getSelection();sel.removeAllRanges(),sel.addRange(range)}:document.selection&&(setSelectionByCharacterOffsets=function(containerEl,start,end){var textRange=document.body.createTextRange();textRange.moveToElementText(containerEl),textRange.collapse(!0),textRange.moveEnd("character",end),textRange.moveStart("character",start),textRange.select()}),{setCaret:setSelectionByCharacterOffsets,getCaret:function(element){var sel,caretOffset=0,doc=element.ownerDocument||element.document,win=doc.defaultView||doc.parentWindow;if(void 0!==win.getSelection){if(0<(sel=win.getSelection()).rangeCount){var range=win.getSelection().getRangeAt(0),preCaretRange=range.cloneRange();preCaretRange.selectNodeContents(element),preCaretRange.setEnd(range.endContainer,range.endOffset),caretOffset=preCaretRange.toString().length}}else if((sel=doc.selection)&&"Control"!=sel.type){var textRange=sel.createRange(),preCaretTextRange=doc.body.createTextRange();preCaretTextRange.moveToElementText(element),preCaretTextRange.setEndPoint("EndToEnd",textRange),caretOffset=preCaretTextRange.text.length}return caretOffset}}}},{}],11:[function(_dereq_,module,exports){module.exports={variableFonts:"CSS"in window!=0&&"supports"in CSS!=0&&CSS.supports("(font-variation-settings: normal)"),woff2:function(){if("FontFace"in window==0)return!1;var f=new FontFace("t",'url( "data:application/font-woff2;base64,d09GMgABAAAAAADwAAoAAAAAAiQAAACoAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAALAogOAE2AiQDBgsGAAQgBSAHIBuDAciO1EZ3I/mL5/+5/rfPnTt9/9Qa8H4cUUZxaRbh36LiKJoVh61XGzw6ufkpoeZBW4KphwFYIJGHB4LAY4hby++gW+6N1EN94I49v86yCpUdYgqeZrOWN34CMQg2tAmthdli0eePIwAKNIIRS4AGZFzdX9lbBUAQlm//f262/61o8PlYO/D1/X4FrWFFgdCQD9DpGJSxmFyjOAGUU4P0qigcNb82GAAA" ) format( "woff2" )',{});return f.load().catch(function(){}),"loading"===f.status||"loaded"===f.status}()}},{}],12:[function(_dereq_,module,exports){module.exports={flattenDeep:function flattenDeep(array){return array.reduce(function(acc,current){return Array.isArray(current)?acc.concat(flattenDeep(current)):acc.concat([current])},[])},arrayUnique:function(a){return!!Array.isArray(a)&&a.filter(function(value,index,self){return self.indexOf(value)===index},a)},clamp:function(value,min,max,fallback){if(value=parseFloat(value),min=parseFloat(min),max=parseFloat(max),isNaN(value)||isNaN(min)||isNaN(max)){if(void 0===fallback)return value;value=fallback}return value<min?value=min:max<value&&(value=max),value}}},{}],13:[function(_dereq_,module,exports){var Fontloader=_dereq_("./fontloader");module.exports=function(){var queue=[],autoload=!0,finishedCallback=null;function loadNext(){0<queue.length&&autoload&&Fontloader.fromFiles(queue[0].files,function(){queue.shift(),0===queue.length&&finishedCallback&&finishedCallback(),0<queue.length&&autoload&&loadNext()},function(){},5e3)}return{load:function(fonts,callback){queue=fonts.slice(0),autoload=!0,"function"==typeof callback&&(finishedCallback=callback),loadNext()},pause:function(){autoload=!1},resume:function(){autoload=!0,0<queue.length?loadNext():finishedCallback&&finishedCallback()}}}},{"./fontloader":6}],14:[function(_dereq_,module,exports){var selection=_dereq_("./helpers/selection"),UIElements=_dereq_("./uielements"),errors=(_dereq_("./fontloader"),_dereq_("./constants/errors")),events=_dereq_("./constants/events"),dom=_dereq_("./helpers/dom"),utils=_dereq_("./helpers/utils"),supports=_dereq_("./helpers/supports");module.exports=function(root,fonts,options){var ui={tester:"textfield",fontsize:"slider",lineheight:"slider",letterspacing:"slider",fontfamily:"dropdown",alignment:"buttongroup",direction:"buttongroup",language:"dropdown",opentype:"checkboxes",variation:"slidergroup"},keyToCss={fontsize:"fontSize",lineheight:"lineHeight",letterspacing:"letterSpacing",alignment:"text-align"},blocks={},uifactory=null,input=null,originalText="";function parseOrder(key){var child,wrapper;if("string"==typeof key)return function(key){if(key in ui==0)throw new Error(errors.invalidUIItem+key);var block=getBlock(key),element=!1,label=!1,opt=options.ui[key];return block?(element=getElement(key,block),label=function(key,node){void 0===node&&(node=root);var block=root.querySelector("[data-fsjs-for='"+key+"']");return!!dom.isNode(block)&&block}(key,block),options.ui[key].label&&!label?(label=uifactory.label(opt.label,opt.unit,opt.init,key),block.appendChild(label),sanitizeLabel(label,key)):label&&sanitizeLabel(label,key),element||(element=createElement(key),block.appendChild(element)),sanitizeElement(element,key),sanitizeBlock(block,key),blocks[key]=block,!0!==options.ui[key].render&&(blocks[key]=!1,block.parentNode&&block.parentNode.removeChild(block)),!1):!block&&(!0===options.ui[key].render||"variation"===key&&!0===options.ui.variations.render)&&(block=createBlock(key),blocks[key]=block)}(key);if(Array.isArray(key)){(wrapper=document.createElement("div")).className=options.classes.wrapperClass;for(var i=0;i<key.length;i++)(child=parseOrder(key[i]))&&wrapper.appendChild(child);return!(wrapper.children.length<1)&&wrapper}return!1}function createBlock(key){var block=document.createElement("div"),element=createElement(key),label=!1;return opt=options.ui[key],opt.label&&(label=uifactory.label(opt.label,opt.unit,opt.init,key),block.appendChild(label),sanitizeLabel(label,key)),block.appendChild(element),sanitizeElement(element,key),sanitizeBlock(block,key),block}function createElement(key){var element=uifactory[ui[key]](key,options.ui[key]);return sanitizeElement(element,key),element}function sanitizeBlock(block,key){var classes=[options.classes.blockClass,options.classes.blockClass+"-"+key,options.classes.blockClass+"-type-"+ui[key]];dom.nodeAddClasses(block,classes),block.dataset.fsjsBlock=key}function sanitizeElement(element,key){element=uifactory[ui[key]](key,options.ui[key],element),dom.nodeAddClass(element,options.classes.elementClass),element.dataset.fsjs=key,element.dataset.fsjsUi=ui[key]}function sanitizeLabel(label,key){var text=label.querySelector("."+options.classes.labelTextClass),value=label.querySelector("."+options.classes.labelValueClass),unit=label.querySelector("."+options.classes.labelUnitClass),element=getElement(key);dom.isNode(text)&&""===text.textContent&&(text.textContent=options.ui[key].label),dom.isNode(value)&&-1===["slider"].indexOf(ui[key])&&(value.textContent=""),dom.isNode(value)&&value&&""===value.textContent&&(value.textContent=element.value),dom.isNode(unit)&&unit&&""===unit.textContent&&(unit.textContent=element.dataset.unit),dom.nodeAddClass(label,options.classes.labelClass),label.dataset.fsjsFor=key}function initBlock(key){var block=getBlock(key),element=getElement(key,block),type=ui[key],opt=options.ui[key];if(block){if("slider"===type)setValue(key,opt.init),element.addEventListener("change",onSlide);else if("dropdown"===type)element.addEventListener("change",onChange),setValue(key,opt.init);else if("buttongroup"===type){var buttons=element.querySelectorAll("[data-choice]");if(0<buttons.length)for(var b=0;b<buttons.length;b++)buttons[b].addEventListener("click",onClick),buttons[b].dataset.choice===options.ui[key].init?dom.nodeAddClass(buttons[b],options.classes.buttonSelectedClass):dom.nodeRemoveClass(buttons[b],options.classes.buttonSelectedClass);setValue(key,options.ui[key].init)}else if("checkboxes"===type){var checkboxes=element.querySelectorAll("[data-feature]");if(0<checkboxes.length){for(var features={},c=0;c<checkboxes.length;c++){var checkbox=checkboxes[c];checkbox.addEventListener("change",onCheck),"features"in checkbox.dataset&&(features[checkbox.dataset.features]=checkbox.checked?"1":"0")}setInputOpentype(features)}}else if("slidergroup"===type){var nestedSliders=element.querySelectorAll("[data-fsjs-ui='slider']");if(nestedSliders&&0<nestedSliders.length){for(var a=0;a<nestedSliders.length;a++)nestedSliders[a].addEventListener("change",onSlideVariation);setVariations(function(){var variations=!1;if("ui"in options&&"variation"in options.ui&&"axes"in options.ui.variation){for(var i in variations={},options.ui.variation.axes){var o=options.ui.variation.axes[i];variations[o.tag]=o.init}return variations}return{}}())}}return!0}}function getElement(key,node){void 0!==node&&key in ui!=0||(node=root);var element=root.querySelector("[data-fsjs='"+key+"']");return!!dom.isNode(element)&&element}function getBlock(key,node){void 0!==node&&key in ui!=0||(node=root);var block=root.querySelector("[data-fsjs-block='"+key+"']");return!!dom.isNode(block)&&block}function onChange(e){setValue(e.target.dataset.fsjs,e.target.value)}function onSlideVariation(e){setVariation(e.target.dataset.axis,e.target.value)}function onSlide(e){setValue(e.target.dataset.fsjs)}function onCheck(){sendEvent(events.opentypeChanged)}function onClick(e){var parent=e.currentTarget.parentNode,property=parent.dataset.fsjs,buttons=parent.querySelectorAll("[data-choice]");if(property in ui&&"buttongroup"===ui[property]){for(var b=0;b<buttons.length;b++)dom.nodeRemoveClass(buttons[b],options.classes.buttonSelectedClass);dom.nodeAddClass(e.currentTarget,options.classes.buttonSelectedClass),setValue(property,e.currentTarget.dataset.choice)}}function sendEvent(type,opt){root.dispatchEvent(new CustomEvent(type,{detail:opt}))}function sendNativeEvent(type,node){var evt=document.createEvent("HTMLEvents");evt.initEvent(type,!1,!0),node.dispatchEvent(evt)}function onKey(event){if("keypress"===event.type){if(13===event.keyCode)return event.preventDefault(),!1}else{var text=blocks.tester.textContent;-1!==text.indexOf("\n")&&(blocks.tester.innerHTML(text.replace("/\n/gi","")),selection.setCaret(blocks.tester,blocks.tester.textContent.length,0))}}function getValue(key){var element=getElement(key);return!!element&&element.value}function getVariation(axis){if(!blocks.variation)return!1;var input,variations=blocks.variation.querySelectorAll("[data-axis]"),va={};if(variations)for(var v=0;v<variations.length;v++)va[(input=variations[v]).dataset.axis]=input.value;return"string"==typeof axis&&axis in va?va[axis]:va}function setValue(key,value){var element=getElement(key);switch(key){case"fontsize":case"lineheight":case"letterspacing":void 0===value?value=getValue(key):(value=utils.clamp(value,options.ui[key].min,options.ui[key].max,options.ui[key].init),element.value.toString()!==value.toString()&&(element.value=value,sendNativeEvent("change",element))),setLabelValue(key,value),setInputCss(keyToCss[key],value+options.ui[key].unit);break;case"variation":setVariations(value);break;case"opentype":setInputOpentype(value);break;case"language":setInputAttr("lang",value);break;case"fontfamily":root.dispatchEvent(new CustomEvent(events.fontChanged,{detail:{font:value}}));break;case"alignment":setInputCss(keyToCss[key],value);break;case"direction":setInputAttr("dir",value)}var obj={};obj[key]=value,sendEvent(events.valueChanged,obj)}function setVariation(axis,val){var opt,v=getVariation();!function(axis,value){if(!Array.isArray(options.ui.variation.axes))return!1;for(var a=0;a<options.ui.variation.axes.length;a++){var axisoptions=options.ui.variation.axes[a];if(axisoptions.tag===axis)return!(parseFloat(value)<parseFloat(axisoptions.min)||parseFloat(value)>parseFloat(axisoptions.max))}return!1}(axis,val)||(void 0===(opt=(opt=options.ui.variation.axes.filter(function(optVal){return optVal.tag===axis}))&&void 0!==opt?opt[0]:{min:100,max:900}).min&&(opt.min=100),void 0===opt.max&&(opt.max=900),v[axis]=utils.clamp(val,opt.min,opt.max),setLabelValue(axis,val),setInputVariation(v))}function setVariations(vals){if("object"!=typeof vals)return!1;for(var axis in vals)vals.hasOwnProperty(axis)&&setVariation(axis,vals[axis])}function setInputCss(attr,val){input.style[attr]=val}function setInputAttr(attr,val){input.setAttribute(attr,val)}function setInputOpentype(features){var val,parsed=[];for(var key in features)features.hasOwnProperty(key)&&key&&void 0!==key&&parsed.push('"'+key+'" '+(features[key]?"1":"0"));val=parsed.join(","),input.style["font-feature-settings"]=val}function setInputVariation(variations){var parsed=[];for(var key in variations)variations.hasOwnProperty(key)&&key&&void 0!==key&&parsed.push('"'+key+'" '+variations[key]);if(val=parsed.join(","),input.style["font-variation-settings"]=val,dom.isNode(blocks.fontfamily)){var instanceFont=function(variation,fontname){if("object"!=typeof variation)return!1;for(var v in variation)isNaN(parseInt(variation[v]))||(variation[v]=variation[v].toString());for(var i=0;i<fonts.length;i++){var f=fonts[i];if("instance"in f!=0)try{for(var parts=f.instance.split(","),vars={},k=0;k<parts.length;k++){var p=parts[k].trim().split(" ");vars[p[0]]=p[1].toString()}if(Object.keys(variation).length!==Object.keys(vars).length)continue;if(JSON.stringify(vars)===JSON.stringify(variation)&&fontname===f.name)return f}catch(e){continue}}return!1}(variations,getElement("fontfamily",blocks.fontfamily).value);if(!1===instanceFont)dom.nodeAddClass(blocks.fontfamily,options.classes.disabledClass);else{dom.nodeRemoveClass(blocks.fontfamily,options.classes.disabledClass);var option,element=getElement("fontfamily");element.value!==instanceFont.name&&(option=element.querySelector("option[value='"+instanceFont.name+"']"),dom.isNode(option)&&(option.selected=!0),element.value=instanceFont.name,sendNativeEvent("change",element))}}}function setLabelValue(key,value){var labelValue=root.querySelector("[data-fsjs-for='"+key+"'] ."+options.classes.labelValueClass);labelValue&&(labelValue.textContent=value)}return{init:function(){dom.nodeAddClass(root,options.classes.rootClass),uifactory=UIElements(root,options),options.ui.fontfamily&&"boolean"==typeof options.ui.fontfamily&&(options.ui.fontfamily={}),options.ui.fontfamily.choices=fonts.map(function(value){return value.name}),1===root.childNodes.length&&root.childNodes[0].nodeType===Node.TEXT_NODE&&(originalText=root.childNodes[0].textContent,root.removeChild(root.childNodes[0])),options.originalText=originalText;for(var i=0;i<options.order.length;i++){var elementA=parseOrder(options.order[i]);dom.isNode(elementA)&&0<elementA.childNodes.length&&!elementA.isConnected&&root.appendChild(elementA)}for(var keyC in input=getElement("tester",blocks.tester),blocks)blocks.hasOwnProperty(keyC)&&initBlock(keyC);if(!options.multiline){var typeEvents=["keypress","keyup","change","paste"];for(var e in typeEvents)typeEvents.hasOwnProperty(e)&&blocks.tester.addEventListener(typeEvents[e],onKey)}blocks.tester.addEventListener("paste",function(e){e.preventDefault();var text="";e.clipboardData||e.originalEvent.clipboardData?text=(e.originalEvent||e).clipboardData.getData("text/plain"):window.clipboardData&&(text=window.clipboardData.getData("Text")),options.multiline||(text=text.replace(/(?:\r\n|\r|\n|<br>)/g," ")),document.queryCommandSupported("insertText")?document.execCommand("insertText",!1,text):document.execCommand("paste",!1,text)})},getValue:getValue,setValue:setValue,setVariations:setVariations,getCssValue:function(key){var element=getElement(key);return element?element.value+element.dataset.unit:""},getButtongroupValue:function(key){var selected,element=getElement(key);return element&&(selected=element.querySelector("."+options.classes.buttonSelectedClass)),selected?selected.dataset.choice:""},getOpentype:function(){if(!blocks.opentype)return!1;var features=blocks.opentype.querySelectorAll("[data-feature]");if(features){for(var re={},f=0;f<features.length;f++){var input=features[f];re[input.dataset.feature]=input.checked}return re}},getVariation:getVariation,getCssAttrForKey:function(key){return key in keyToCss&&keyToCss[key]},getKeyForCssAttr:function(attr){for(var key in keyToCss)if(keyToCss.hasOwnProperty(key)&&keyToCss[key]===attr)return key;return!1},setInputCss:setInputCss,setInputAttr:setInputAttr,setInputOpentype:setInputOpentype,setInputVariation:setInputVariation,setInputText:function(text){text&&input&&(input.textContent=text)},setStatusClass:function(classString,status){!0===status?dom.nodeAddClass(root,classString):!1===status&&dom.nodeRemoveClass(root,classString)},setActiveFont:function(name){if(dom.isNode(blocks.fontfamily)){var option,element=getElement("fontfamily",blocks.fontfamily);dom.nodeRemoveClass(blocks.fontfamily,options.classes.disabledClass),dom.isNode(element)&&element.value!==name&&(option=element.querySelectorAll("option[value='"+name+"']"),dom.isNode(option)&&(option.selected=!0),element.value=name,sendNativeEvent("change",element))}},setActiveAxes:function(axes){if(dom.isNode(blocks.variation)){var sliders=blocks.variation.querySelectorAll("[data-axis]");if(sliders)for(var s=0;s<sliders.length;s++)!Array.isArray(axes)||axes.length<1||-1===axes.indexOf(sliders[s].dataset.axis)||!1===supports.woff2||!1===supports.variableFonts?dom.nodeAddClass(sliders[s].parentNode,options.classes.disabledClass):dom.nodeRemoveClass(sliders[s].parentNode,options.classes.disabledClass)}},setActiveLanguage:function(lang){if(dom.isNode(blocks.language)&&"string"==typeof lang&&-1!==options.ui.language.choices.map(function(value){return value.split("|")[0]}).length){var option=blocks.language.querySelector("option[value='"+lang+"']");dom.isNode(option)&&(blocks.language.value=lang,option.selected=!0,sendNativeEvent("change",blocks.language),root.dispatchEvent(new CustomEvent(events.languageChanged)))}},setActiveOpentype:function(features){var checkboxes=!1;if(dom.isNode(blocks.opentype)&&(checkboxes=blocks.opentype.querySelectorAll("[data-feature]")),checkboxes)for(var c=0;c<checkboxes.length;c++)Array.isArray(features)&&-1===features.indexOf(checkboxes[c].dataset.feature)?dom.nodeAddClass(checkboxes[c].parentNode,"fsjs-checkbox-inactive"):dom.nodeRemoveClass(checkboxes[c].parentNode,"fsjs-checkbox-inactive")},setLabelValue:setLabelValue,sendEvent:sendEvent,sendNativeEvent:sendNativeEvent}}},{"./constants/errors":4,"./constants/events":5,"./fontloader":6,"./helpers/dom":8,"./helpers/selection":10,"./helpers/supports":11,"./helpers/utils":12,"./uielements":15}],15:[function(_dereq_,module,exports){var helpers=_dereq_("./helpers/helpers"),dom=_dereq_("./helpers/dom");module.exports=function(root,options){function setMissingAttributes(node,attributes){if(null!=node&&"object"==typeof attributes)for(var a in attributes)attributes.hasOwnProperty(a)&&(node.hasAttribute(a)||node.setAttribute(a,attributes[a]))}return{dropdown:function(key,opt,node){var dropdown=dom.isNode(node)?node:document.createElement("select");if("choices"in opt==0||opt.choices.length<1)return!1;for(var c=0;c<opt.choices.length;c++){var choice=helpers.parseParts(opt.choices[c]),option=dropdown.querySelector("option[value='"+choice.val+"']");dom.isNode(option)||((option=document.createElement("option")).appendChild(document.createTextNode(choice.text)),dropdown.appendChild(option)),option.value=choice.val,"init"in opt&&opt.init===choice.text&&(option.selected=!0,dropdown.value=option.value),"instance"in opt&&(option.dataset.instance=opt.instance)}return dropdown.dataset.fsjs=key,dropdown},slider:function(key,opt,node){var input=dom.isNode(node)?node:document.createElement("input"),attributes={type:"range",min:opt.min,max:opt.max,value:opt.init,step:opt.step};return input.setAttribute("autocomplete","off"),setMissingAttributes(input,attributes),void 0===input.value&&(input.value=opt.init,input.setAttribute("value",opt.init)),"unit"in input.dataset==0&&(input.dataset.unit=opt.unit),"init"in input.dataset==0&&(input.dataset.init=opt.init),key&&(input.dataset.fsjs=key),input},slidergroup:function(key,opt,node){for(var slidergroup=dom.isNode(node)?node:document.createElement("div"),s=0;s<opt.axes.length;s++){var wrapper=slidergroup.querySelector("[data-axis-block='"+opt.axes[s].tag+"']");if(dom.isNode(wrapper)||((wrapper=document.createElement("div")).dataset.axisBlock=opt.axes[s].tag,slidergroup.appendChild(wrapper)),opt.axes[s].label){var label=slidergroup.querySelector("[data-fsjs-for='"+opt.axes[s].tag+"']");dom.isNode(label)||(label=this.label(opt.axes[s].label,!1,opt.axes[s].init,opt.axes[s].tag),wrapper.appendChild(label))}var slider=slidergroup.querySelector("[data-axis='"+opt.axes[s].tag+"']");dom.isNode(slider)||((slider=this.slider(!1,opt.axes[s])).dataset.fsjsUi="slider",wrapper.appendChild(slider)),slider.dataset.axis=opt.axes[s].tag}return slidergroup},label:function(labelText,labelUnit,labelValue,relatedInput){var val,unit,label=document.createElement("label"),text=document.createElement("span");return label.dataset.fsjsFor=relatedInput,dom.nodeAddClass(label,options.classes.labelClass),text.className=options.classes.labelTextClass,text.appendChild(document.createTextNode(labelText)),label.appendChild(text),""!==labelValue&&((val=document.createElement("span")).className=options.classes.labelValueClass,val.appendChild(document.createTextNode(labelValue)),label.appendChild(val)),"string"==typeof labelUnit&&((unit=document.createElement("span")).className=options.classes.labelUnitClass,unit.appendChild(document.createTextNode(labelUnit)),label.appendChild(unit)),label},textfield:function(key,opt,node){var tester=null==node?document.createElement("div"):node;return setMissingAttributes(tester,{autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false",contenteditable:opt.editable}),tester.dataset.fsjs=key,tester.dataset.replaceText||(options.initialText?tester.appendChild(document.createTextNode(options.initialText)):!options.initialText&&options.originalText&&tester.appendChild(document.createTextNode(options.originalText)),tester.dataset.replaceText=!0),tester},buttongroup:function(key,opt){var group=document.createElement("div");for(var o in opt.choices){var button=document.createElement("button"),choice=helpers.parseParts(opt.choices[o]);button.dataset.choice=choice.val,button.appendChild(document.createTextNode(choice.text)),dom.nodeAddClass(options.classes.buttonClass),opt.init===choice.val&&(button.className=options.classes.buttonSelectedClass),group.appendChild(button)}return group.dataset.fsjs=key,group},checkboxes:function(key,opt){var group=document.createElement("div");for(var o in group.dataset.fsjs=key,opt.choices)if(opt.choices.hasOwnProperty(o)){var choice=helpers.parseParts(opt.choices[o]),label=document.createElement("label"),checkbox=document.createElement("input"),text=document.createElement("span");checkbox.setAttribute("type","checkbox"),checkbox.dataset.feature=choice.val,-1!==opt.init.indexOf(Object.values(choice)[0])&&(checkbox.checked=!0),text.appendChild(document.createTextNode(choice.text)),label.appendChild(checkbox),label.appendChild(text),group.append(label)}return group}}}},{"./helpers/dom":8,"./helpers/helpers":9}]},{},[7])(7)});
  