text: /**
   * SwivelJS v2.1.0 - 2018-05-29
   * Strategy driven, segmented feature toggles
   *
   * Copyright (c) 2018 Zumba&reg;
   * Licensed MIT
   */
  
  (function(o){"use strict";Array.prototype.reduce||(Array.prototype.reduce=function(t){if(null===this||this===o)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof t)throw new TypeError(t+" is not a function");var e,r=Object(this),i=r.length>>>0,n=0;if(2===arguments.length)e=arguments[1];else{for(;n<i&&!(n in r);)n++;if(i<=n)throw new TypeError("Reduce of empty array with no initial value");e=r[n++]}for(;n<i;n++)n in r&&(e=t(e,r[n],n,r));return e});var l=".",t=Array.prototype.reduce,a=Object.prototype.toString,r=function(t,e){this.slug=t,this.strategy=e};r.prototype.execute=function(t){return this.strategy.apply(null,t||[])};var u=function(t,e,r){this.featureMap=t,this.index=e,this.callback="function"==typeof r?r:function(){}};u.prototype.enabled=function(t){var e=t.slug;return this.featureMap.slugExists(e)||this.callback(e),this.featureMap.enabled(e,this.index)};var n=function(t,e){this.behavior=t||null,this.args=e||[]},e=function(t,e){this.slug=t,this.bucket=e,this.waived=!1,n.call(this)},i="__swivel_default",s=e.prototype;s.addBehavior=function(t,e,r){var i=this.getBehavior(t,e);return this.bucket.enabled(i)&&n.call(this,i,r),this},s.addValue=function(t,e){var r=this.getBehavior(t,function(){return e});return this.bucket.enabled(r)&&n.call(this,r),this},s.defaultBehavior=function(t,e){if(this.waived)throw"Defined a default behavior after `noDefault` was called.";return this.behavior||n.call(this,this.getBehavior(t),e),this},s.defaultValue=function(t){if(this.waived)throw"Defined a default value after `noDefault` was called.";if(!this.behavior){n.call(this,this.getBehavior(function(){return t}))}return this},s.execute=function(){return(this.behavior||this.getBehavior(function(){return null})).execute(this.args||[])},s.getBehavior=function(t,e){if(e===o&&(e=t,t=i),"function"!=typeof e)throw"Invalid callable passed to Builder.getBehavior().";return t=t?this.slug+l+t:this.slug,new r(t,e)},s.noDefault=function(){var t=this.behavior;if(t&&t.slug===i)throw"Called `noDefault` after a default behavior was defined.";return this.waived=!0,this};var f=function(t,e){return t|1<<--e},h=function(t){this.map=function(t){var e,r,i,n={};for(e in t)t.hasOwnProperty(e)&&(r=t[e],n[e]=(i=r,"[object Array]"===a.call(i)?r.reduce(f,0):r));return n}(t)},c=h.prototype,p=function(t,e){var r,i,n=e.map;for(r in n)n.hasOwnProperty(r)&&(i=n[r],t[r]=t[r]?t[r]|i:i);return t};c.add=function(){return new h(t.call(arguments,p,this.map))},c.diff=function(t){var e,r=this.map,i=t.map,n={};for(e in i)!i.hasOwnProperty(e)||r[e]!==o&&r[e]===i[e]||(n[e]=i[e]);for(e in r)r.hasOwnProperty(e)&&i[e]===o&&(n[e]=r[e]);return new h(n)},c.enabled=function(t,e){var r,i=this.map,n="",o=t.split(l),a=o.length,u=0;for(e=1<<e-1;u<a;u++){r=o[u],n+=n?l+r:r;var s=!this.slugExists(n),f=s||!(i[n]&e);if(s||f)return!1}return!0},c.slugExists=function(t){return void 0!==this.map[t]},c.intersect=function(t){var e,r=this.map,i=t.map,n={};for(e in i)i.hasOwnProperty(e)&&r[e]===i[e]&&(n[e]=i[e]);return new h(n)};var d=function(t,e){var r,i=e.map;for(r in i)i.hasOwnProperty(r)&&(t[r]=i[r]);return t};c.merge=function(){return new h(t.call(arguments,d,this.map))};var v=function t(e){if(!(this instanceof t))return new t(e);e||(e={});var r=e.map||{},i=e.callback||function(){},n=r instanceof h?r:new h(r);this.bucket=new u(n,e.bucketIndex,i)},w=v.prototype;w.forFeature=function(t){return new e(t,this.bucket)},w.invoke=function(t,e,r){var i=t.split(l);return this.forFeature(i.shift()).addBehavior(i.join(l),e).defaultBehavior(r).execute()},w.returnValue=function(t,e,r){var i=t.split(l);return this.forFeature(i.shift()).addValue(i.join(l),e).defaultValue(r).execute()},w.setBucket=function(t){return this.bucket=t,this},v.Behavior=r,v.Bucket=u,v.Builder=e,v.FeatureMap=h;var y,b,g,m,x,B={function:!0,object:!0};y=B[typeof window]&&window||this,b=B[typeof exports]&&exports&&!exports.nodeType&&exports,g=B[typeof module]&&module&&!module.nodeType&&module,m=g&&g.exports===b&&b,!(x=B[typeof global]&&global)||x.global!==x&&x.window!==x||(y=x),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(y.Swivel=v,define("Swivel",function(){return v})):b&&g?m?(g.exports=v).Swivel=v:b.Swivel=v:y.Swivel=v}).call(this);
  //# sourceMappingURL=swivel.min.js.map