UNPKG

dhxmvp

Version:

A complete boilerplate for building online, offline and syncable MVP Single Page Applications using DHTMLX.

1 lines 20.6 kB
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.ProgressBar=t()}}(function(){var t;return function e(t,n,r){function i(s,a){if(!n[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var h=new Error("Cannot find module '"+s+"'");throw h.code="MODULE_NOT_FOUND",h}var p=n[s]={exports:{}};t[s][0].call(p.exports,function(e){var n=t[s][1][e];return i(n?n:e)},p,p.exports,e,t,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(e,n,r){(function(){var e=this,i=function(){"use strict";function i(){}function o(t,e){var n;for(n in t)Object.hasOwnProperty.call(t,n)&&e(n)}function s(t,e){return o(e,function(n){t[n]=e[n]}),t}function a(t,e){o(e,function(n){"undefined"==typeof t[n]&&(t[n]=e[n])})}function u(t,e,n,r,i,o,s){var a,u,p,c=t<o?0:(t-o)/i;for(a in e)e.hasOwnProperty(a)&&(u=s[a],p="function"==typeof u?u:_[u],e[a]=h(n[a],r[a],p,c));return e}function h(t,e,n,r){return t+(e-t)*n(r)}function p(t,e){var n=l.prototype.filter,r=t._filterArgs;o(n,function(i){"undefined"!=typeof n[i][e]&&n[i][e].apply(t,r)})}function c(t,e,n,r,i,o,s,a,h,c,f){x=e+n+r,S=Math.min(f||v(),x),T=S>=x,b=r-(x-S),t.isPlaying()&&!T?(t._scheduleId=c(t._timeoutHandler,y),p(t,"beforeTween"),S<e+n?u(1,i,o,s,1,1,a):u(S,i,o,s,r,e+n,a),p(t,"afterTween"),h(i,t._attachment,b)):t.isPlaying()&&T&&(h(s,t._attachment,b),t.stop(!0))}function f(t,e){var n={},r=typeof e;return"string"===r||"function"===r?o(t,function(t){n[t]=e}):o(t,function(t){n[t]||(n[t]=e[t]||g)}),n}function l(t,e){this._currentState=t||{},this._configured=!1,this._scheduleFunction=d,"undefined"!=typeof e&&this.setConfig(e)}var _,d,g="linear",m=500,y=1e3/60,w=Date.now?Date.now:function(){return+new Date},v="undefined"!=typeof SHIFTY_DEBUG_NOW?SHIFTY_DEBUG_NOW:w;d="undefined"!=typeof window?window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||window.mozCancelRequestAnimationFrame&&window.mozRequestAnimationFrame||setTimeout:setTimeout;var x,S,T,b;return l.prototype.tween=function(t){return this._isTweening?this:(void 0===t&&this._configured||this.setConfig(t),this._timestamp=v(),this._start(this.get(),this._attachment),this.resume())},l.prototype.setConfig=function(t){t=t||{},this._configured=!0,this._attachment=t.attachment,this._pausedAtTime=null,this._scheduleId=null,this._delay=t.delay||0,this._start=t.start||i,this._step=t.step||i,this._finish=t.finish||i,this._duration=t.duration||m,this._currentState=s({},t.from)||this.get(),this._originalState=this.get(),this._targetState=s({},t.to)||this.get();var e=this;this._timeoutHandler=function(){c(e,e._timestamp,e._delay,e._duration,e._currentState,e._originalState,e._targetState,e._easing,e._step,e._scheduleFunction)};var n=this._currentState,r=this._targetState;return a(r,n),this._easing=f(n,t.easing||g),this._filterArgs=[n,this._originalState,r,this._easing],p(this,"tweenCreated"),this},l.prototype.get=function(){return s({},this._currentState)},l.prototype.set=function(t){this._currentState=t},l.prototype.pause=function(){return this._pausedAtTime=v(),this._isPaused=!0,this},l.prototype.resume=function(){return this._isPaused&&(this._timestamp+=v()-this._pausedAtTime),this._isPaused=!1,this._isTweening=!0,this._timeoutHandler(),this},l.prototype.seek=function(t){t=Math.max(t,0);var e=v();return this._timestamp+t===0?this:(this._timestamp=e-t,this.isPlaying()||(this._isTweening=!0,this._isPaused=!1,c(this,this._timestamp,this._delay,this._duration,this._currentState,this._originalState,this._targetState,this._easing,this._step,this._scheduleFunction,e),this.pause()),this)},l.prototype.stop=function(t){return this._isTweening=!1,this._isPaused=!1,this._timeoutHandler=i,(e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.oCancelAnimationFrame||e.msCancelAnimationFrame||e.mozCancelRequestAnimationFrame||e.clearTimeout)(this._scheduleId),t&&(p(this,"beforeTween"),u(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),p(this,"afterTween"),p(this,"afterTweenEnd"),this._finish.call(this,this._currentState,this._attachment)),this},l.prototype.isPlaying=function(){return this._isTweening&&!this._isPaused},l.prototype.setScheduleFunction=function(t){this._scheduleFunction=t},l.prototype.dispose=function(){var t;for(t in this)this.hasOwnProperty(t)&&delete this[t]},l.prototype.filter={},l.prototype.formula={linear:function(t){return t}},_=l.prototype.formula,s(l,{now:v,each:o,tweenProps:u,tweenProp:h,applyFilter:p,shallowCopy:s,defaults:a,composeEasingObject:f}),"function"==typeof SHIFTY_DEBUG_NOW&&(e.timeoutHandler=c),"object"==typeof r?n.exports=l:"function"==typeof t&&t.amd?t(function(){return l}):"undefined"==typeof e.Tweenable&&(e.Tweenable=l),l}();!function(){i.shallowCopy(i.prototype.formula,{easeInQuad:function(t){return Math.pow(t,2)},easeOutQuad:function(t){return-(Math.pow(t-1,2)-1)},easeInOutQuad:function(t){return(t/=.5)<1?.5*Math.pow(t,2):-.5*((t-=2)*t-2)},easeInCubic:function(t){return Math.pow(t,3)},easeOutCubic:function(t){return Math.pow(t-1,3)+1},easeInOutCubic:function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)},easeInQuart:function(t){return Math.pow(t,4)},easeOutQuart:function(t){return-(Math.pow(t-1,4)-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},easeInQuint:function(t){return Math.pow(t,5)},easeOutQuint:function(t){return Math.pow(t-1,5)+1},easeInOutQuint:function(t){return(t/=.5)<1?.5*Math.pow(t,5):.5*(Math.pow(t-2,5)+2)},easeInSine:function(t){return-Math.cos(t*(Math.PI/2))+1},easeOutSine:function(t){return Math.sin(t*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInExpo:function(t){return 0===t?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return 1===t?1:-Math.pow(2,-10*t)+1},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(-Math.pow(2,-10*--t)+2)},easeInCirc:function(t){return-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-Math.pow(t-1,2))},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},elastic:function(t){return-1*Math.pow(4,-8*t)*Math.sin((6*t-1)*(2*Math.PI)/2)+1},swingFromTo:function(t){var e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},swingFrom:function(t){var e=1.70158;return t*t*((e+1)*t-e)},swingTo:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},bounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bouncePast:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?2-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?2-(7.5625*(t-=2.25/2.75)*t+.9375):2-(7.5625*(t-=2.625/2.75)*t+.984375)},easeFromTo:function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},easeFrom:function(t){return Math.pow(t,4)},easeTo:function(t){return Math.pow(t,.25)}})}(),function(){function t(t,e,n,r,i,o){function s(t){return((l*t+_)*t+d)*t}function a(t){return((g*t+m)*t+y)*t}function u(t){return(3*l*t+2*_)*t+d}function h(t){return 1/(200*t)}function p(t,e){return a(f(t,e))}function c(t){return t>=0?t:0-t}function f(t,e){var n,r,i,o,a,h;for(i=t,h=0;h<8;h++){if(o=s(i)-t,c(o)<e)return i;if(a=u(i),c(a)<1e-6)break;i-=o/a}if(n=0,r=1,i=t,i<n)return n;if(i>r)return r;for(;n<r;){if(o=s(i),c(o-t)<e)return i;t>o?n=i:r=i,i=.5*(r-n)+n}return i}var l=0,_=0,d=0,g=0,m=0,y=0;return d=3*e,_=3*(r-e)-d,l=1-d-_,y=3*n,m=3*(i-n)-y,g=1-y-m,p(t,h(o))}function e(e,n,r,i){return function(o){return t(o,e,n,r,i,1)}}i.setBezierFunction=function(t,n,r,o,s){var a=e(n,r,o,s);return a.displayName=t,a.x1=n,a.y1=r,a.x2=o,a.y2=s,i.prototype.formula[t]=a},i.unsetBezierFunction=function(t){delete i.prototype.formula[t]}}(),function(){function t(t,e,n,r,o,s){return i.tweenProps(r,e,t,n,1,s,o)}var e=new i;e._filterArgs=[],i.interpolate=function(n,r,o,s,a){var u=i.shallowCopy({},n),h=a||0,p=i.composeEasingObject(n,s||"linear");e.set({});var c=e._filterArgs;c.length=0,c[0]=u,c[1]=n,c[2]=r,c[3]=p,i.applyFilter(e,"tweenCreated"),i.applyFilter(e,"beforeTween");var f=t(n,u,r,o,p,h);return i.applyFilter(e,"afterTween"),f}}(),function(t){function e(t,e){var n,r=[],i=t.length;for(n=0;n<i;n++)r.push("_"+e+"_"+n);return r}function n(t){var e=t.match(x);return e?(1===e.length||t[0].match(v))&&e.unshift(""):e=["",""],e.join(O)}function r(e){t.each(e,function(t){var n=e[t];"string"==typeof n&&n.match(C)&&(e[t]=i(n))})}function i(t){return u(C,t,o)}function o(t){var e=s(t);return"rgb("+e[0]+","+e[1]+","+e[2]+")"}function s(t){return t=t.replace(/#/,""),3===t.length&&(t=t.split(""),t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),P[0]=a(t.substr(0,2)),P[1]=a(t.substr(2,2)),P[2]=a(t.substr(4,2)),P}function a(t){return parseInt(t,16)}function u(t,e,n){var r=e.match(t),i=e.replace(t,O);if(r)for(var o,s=r.length,a=0;a<s;a++)o=r.shift(),i=i.replace(O,n(o));return i}function h(t){return u(T,t,p)}function p(t){for(var e=t.match(S),n=e.length,r=t.match(b)[0],i=0;i<n;i++)r+=parseInt(e[i],10)+",";return r=r.slice(0,-1)+")"}function c(r){var i={};return t.each(r,function(t){var o=r[t];if("string"==typeof o){var s=m(o);i[t]={formatString:n(o),chunkNames:e(s,t)}}}),i}function f(e,n){t.each(n,function(t){for(var r=e[t],i=m(r),o=i.length,s=0;s<o;s++)e[n[t].chunkNames[s]]=+i[s];delete e[t]})}function l(e,n){t.each(n,function(t){var r=e[t],i=_(e,n[t].chunkNames),o=d(i,n[t].chunkNames);r=g(n[t].formatString,o),e[t]=h(r)})}function _(t,e){for(var n,r={},i=e.length,o=0;o<i;o++)n=e[o],r[n]=t[n],delete t[n];return r}function d(t,e){M.length=0;for(var n=e.length,r=0;r<n;r++)M.push(t[e[r]]);return M}function g(t,e){for(var n=t,r=e.length,i=0;i<r;i++)n=n.replace(O,+e[i].toFixed(4));return n}function m(t){return t.match(S)}function y(e,n){t.each(n,function(t){var r,i=n[t],o=i.chunkNames,s=o.length,a=e[t];if("string"==typeof a){var u=a.split(" "),h=u[u.length-1];for(r=0;r<s;r++)e[o[r]]=u[r]||h}else for(r=0;r<s;r++)e[o[r]]=a;delete e[t]})}function w(e,n){t.each(n,function(t){var r=n[t],i=r.chunkNames,o=i.length,s=e[i[0]],a=typeof s;if("string"===a){for(var u="",h=0;h<o;h++)u+=" "+e[i[h]],delete e[i[h]];e[t]=u.substr(1)}else e[t]=s})}var v=/(\d|\-|\.)/,x=/([^\-0-9\.]+)/g,S=/[0-9.\-]+/g,T=new RegExp("rgb\\("+S.source+/,\s*/.source+S.source+/,\s*/.source+S.source+"\\)","g"),b=/^.*\(/,C=/#([0-9]|[a-f]){3,6}/gi,O="VAL",P=[],M=[];t.prototype.filter.token={tweenCreated:function(t,e,n,i){r(t),r(e),r(n),this._tokenData=c(t)},beforeTween:function(t,e,n,r){y(r,this._tokenData),f(t,this._tokenData),f(e,this._tokenData),f(n,this._tokenData)},afterTween:function(t,e,n,r){l(t,this._tokenData),l(e,this._tokenData),l(n,this._tokenData),w(r,this._tokenData)}}}(i)}).call(null)},{}],2:[function(t,e,n){var r=t("./shape"),i=t("./utils"),o=function(t,e){this._pathTemplate="M 50,50 m 0,-{radius} a {radius},{radius} 0 1 1 0,{2radius} a {radius},{radius} 0 1 1 0,-{2radius}",r.apply(this,arguments)};o.prototype=new r,o.prototype.constructor=o,o.prototype._pathString=function(t){var e=t.strokeWidth;t.trailWidth&&t.trailWidth>t.strokeWidth&&(e=t.trailWidth);var n=50-e/2;return i.render(this._pathTemplate,{radius:n,"2radius":2*n})},o.prototype._trailString=function(t){return this._pathString(t)},e.exports=o},{"./shape":7,"./utils":8}],3:[function(t,e,n){var r=t("./shape"),i=t("./utils"),o=function(t,e){this._pathTemplate="M 0,{center} L 100,{center}",r.apply(this,arguments)};o.prototype=new r,o.prototype.constructor=o,o.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 "+e.strokeWidth),t.setAttribute("preserveAspectRatio","none")},o.prototype._pathString=function(t){return i.render(this._pathTemplate,{center:t.strokeWidth/2})},o.prototype._trailString=function(t){return this._pathString(t)},e.exports=o},{"./shape":7,"./utils":8}],4:[function(t,e,n){e.exports={Line:t("./line"),Circle:t("./circle"),SemiCircle:t("./semicircle"),Path:t("./path"),Shape:t("./shape"),utils:t("./utils")}},{"./circle":2,"./line":3,"./path":5,"./semicircle":6,"./shape":7,"./utils":8}],5:[function(t,e,n){var r=t("shifty"),i=t("./utils"),o={easeIn:"easeInCubic",easeOut:"easeOutCubic",easeInOut:"easeInOutCubic"},s=function(t,e){e=i.extend({duration:800,easing:"linear",from:{},to:{},step:function(){}},e);var n;n=i.isString(t)?document.querySelector(t):t,this.path=n,this._opts=e,this._tweenable=null;var r=this.path.getTotalLength();this.path.style.strokeDasharray=r+" "+r,this.set(0)};s.prototype.value=function(){var t=this._getComputedDashOffset(),e=this.path.getTotalLength(),n=1-t/e;return parseFloat(n.toFixed(6),10)},s.prototype.set=function(t){this.stop(),this.path.style.strokeDashoffset=this._progressToOffset(t);var e=this._opts.step;if(i.isFunction(e)){var n=this._easing(this._opts.easing),r=this._calculateTo(t,n),o=this._opts.shape||this;e(r,o,this._opts.attachment)}},s.prototype.stop=function(){this._stopTween(),this.path.style.strokeDashoffset=this._getComputedDashOffset()},s.prototype.animate=function(t,e,n){e=e||{},i.isFunction(e)&&(n=e,e={});var o=i.extend({},e),s=i.extend({},this._opts);e=i.extend(s,e);var a=this._easing(e.easing),u=this._resolveFromAndTo(t,a,o);this.stop(),this.path.getBoundingClientRect();var h=this._getComputedDashOffset(),p=this._progressToOffset(t),c=this;this._tweenable=new r,this._tweenable.tween({from:i.extend({offset:h},u.from),to:i.extend({offset:p},u.to),duration:e.duration,easing:a,step:function(t){c.path.style.strokeDashoffset=t.offset;var n=e.shape||c;e.step(t,n,e.attachment)},finish:function(t){i.isFunction(n)&&n()}})},s.prototype._getComputedDashOffset=function(){var t=window.getComputedStyle(this.path,null);return parseFloat(t.getPropertyValue("stroke-dashoffset"),10)},s.prototype._progressToOffset=function(t){var e=this.path.getTotalLength();return e-t*e},s.prototype._resolveFromAndTo=function(t,e,n){return n.from&&n.to?{from:n.from,to:n.to}:{from:this._calculateFrom(e),to:this._calculateTo(t,e)}},s.prototype._calculateFrom=function(t){return r.interpolate(this._opts.from,this._opts.to,this.value(),t)},s.prototype._calculateTo=function(t,e){return r.interpolate(this._opts.from,this._opts.to,t,e)},s.prototype._stopTween=function(){null!==this._tweenable&&(this._tweenable.stop(),this._tweenable.dispose(),this._tweenable=null)},s.prototype._easing=function(t){return o.hasOwnProperty(t)?o[t]:t},e.exports=s},{"./utils":8,shifty:1}],6:[function(t,e,n){var r=t("./shape"),i=t("./circle"),o=t("./utils"),s=function(t,e){this._pathTemplate="M 50,50 m -{radius},0 a {radius},{radius} 0 1 1 {2radius},0",r.apply(this,arguments)};s.prototype=new r,s.prototype.constructor=s,s.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 50")},s.prototype._initializeTextElement=function(t,e,n){t.text.style&&(n.style.top="auto",n.style.bottom="0",t.text.alignToBottom?o.setStyle(n,"transform","translate(-50%, 0)"):o.setStyle(n,"transform","translate(-50%, 50%)"))},s.prototype._pathString=i.prototype._pathString,s.prototype._trailString=i.prototype._trailString,e.exports=s},{"./circle":2,"./shape":7,"./utils":8}],7:[function(t,e,n){var r=t("./path"),i=t("./utils"),o="Object is destroyed",s=function a(t,e){if(!(this instanceof a))throw new Error("Constructor was called without new keyword");if(0!==arguments.length){this._opts=i.extend({color:"#555",strokeWidth:1,trailColor:null,trailWidth:null,fill:null,text:{style:{color:null,position:"absolute",left:"50%",top:"50%",padding:0,margin:0,transform:{prefix:!0,value:"translate(-50%, -50%)"}},alignToBottom:!0,value:"",className:"progressbar-text"},svgStyle:{display:"block",width:"100%"}},e,!0);var n,o=this._createSvgView(this._opts);if(n=i.isString(t)?document.querySelector(t):t,!n)throw new Error("Container does not exist: "+t);this._container=n,this._container.appendChild(o.svg),this._opts.svgStyle&&i.setStyles(o.svg,this._opts.svgStyle),this.text=null,this._opts.text.value&&(this.text=this._createTextElement(this._opts,this._container),this._container.appendChild(this.text)),this.svg=o.svg,this.path=o.path,this.trail=o.trail;var s=i.extend({attachment:void 0,shape:this},this._opts);this._progressPath=new r(o.path,s)}};s.prototype.animate=function(t,e,n){if(null===this._progressPath)throw new Error(o);this._progressPath.animate(t,e,n)},s.prototype.stop=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath.stop()},s.prototype.destroy=function(){if(null===this._progressPath)throw new Error(o);this.stop(),this.svg.parentNode.removeChild(this.svg),this.svg=null,this.path=null,this.trail=null,this._progressPath=null,null!==this.text&&(this.text.parentNode.removeChild(this.text),this.text=null)},s.prototype.set=function(t){if(null===this._progressPath)throw new Error(o);this._progressPath.set(t)},s.prototype.value=function(){if(null===this._progressPath)throw new Error(o);return void 0===this._progressPath?0:this._progressPath.value()},s.prototype.setText=function(t){if(null===this._progressPath)throw new Error(o);null===this.text&&(this.text=this._createTextElement(this._opts,this._container),this._container.appendChild(this.text)),this.text.removeChild(this.text.firstChild),this.text.appendChild(document.createTextNode(t))},s.prototype._createSvgView=function(t){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");this._initializeSvg(e,t);var n=null;(t.trailColor||t.trailWidth)&&(n=this._createTrail(t),e.appendChild(n));var r=this._createPath(t);return e.appendChild(r),{svg:e,path:r,trail:n}},s.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 100")},s.prototype._createPath=function(t){var e=this._pathString(t);return this._createPathElement(e,t)},s.prototype._createTrail=function(t){var e=this._trailString(t),n=i.extend({},t);return n.trailColor||(n.trailColor="#eee"),n.trailWidth||(n.trailWidth=n.strokeWidth),n.color=n.trailColor,n.strokeWidth=n.trailWidth,n.fill=null,this._createPathElement(e,n)},s.prototype._createPathElement=function(t,e){var n=document.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d",t),n.setAttribute("stroke",e.color),n.setAttribute("stroke-width",e.strokeWidth),e.fill?n.setAttribute("fill",e.fill):n.setAttribute("fill-opacity","0"),n},s.prototype._createTextElement=function(t,e){var n=document.createElement("p");n.appendChild(document.createTextNode(t.text.value));var r=t.text.style;return r&&(e.style.position="relative",i.setStyles(n,r),r.color||(n.style.color=t.color)),n.className=t.text.className,this._initializeTextElement(t,e,n),n},s.prototype._initializeTextElement=function(t,e,n){},s.prototype._pathString=function(t){throw new Error("Override this function for each progress bar")},s.prototype._trailString=function(t){throw new Error("Override this function for each progress bar")},e.exports=s},{"./path":5,"./utils":8}],8:[function(t,e,n){function r(t,e,n){t=t||{},e=e||{},n=n||!1;for(var i in e)if(e.hasOwnProperty(i)){var o=t[i],s=e[i];n&&c(o)&&c(s)?t[i]=r(o,s,n):t[i]=s}return t}function i(t,e){var n=t;for(var r in e)if(e.hasOwnProperty(r)){var i=e[r],o="\\{"+r+"\\}",s=new RegExp(o,"g");n=n.replace(s,i)}return n}function o(t,e,n){for(var r=0;r<l.length;++r){var i=l[r];t.style[i+a(e)]=n}t.style[e]=n}function s(t,e){f(e,function(e,n){null!==e&&void 0!==e&&(c(e)&&e.prefix===!0?o(t,n,e.value):t.style[n]=e)})}function a(t){return t.charAt(0).toUpperCase()+t.slice(1)}function u(t){return"string"==typeof t||t instanceof String}function h(t){return"function"==typeof t}function p(t){return"[object Array]"===Object.prototype.toString.call(t)}function c(t){if(p(t))return!1;var e=typeof t;return"object"===e&&!!t}function f(t,e){for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];e(r,n)}}var l="Webkit Moz O ms".split(" ");e.exports={extend:r,render:i,setStyle:o,setStyles:s,capitalize:a,isString:u,isFunction:h,isObject:c,forEachObject:f}},{}]},{},[4])(4)});