Socket
Socket
Sign inDemoInstall

powerbi-models

Package Overview
Dependencies
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

powerbi-models - npm Package Compare versions

Comparing version 0.9.1 to 0.10.0

2

dist/models-noexports.d.ts

@@ -1,2 +0,2 @@

/*! powerbi-models v0.9.1 | (c) 2016 Microsoft Corporation MIT */
/*! powerbi-models v0.10.0 | (c) 2016 Microsoft Corporation MIT */
declare const advancedFilterSchema: any;

@@ -3,0 +3,0 @@ declare const filterSchema: any;

@@ -1,2 +0,2 @@

/*! powerbi-models v0.9.1 | (c) 2016 Microsoft Corporation MIT */
/*! powerbi-models v0.10.0 | (c) 2016 Microsoft Corporation MIT */
export declare const advancedFilterSchema: any;

@@ -3,0 +3,0 @@ export declare const filterSchema: any;

@@ -1,2 +0,65 @@

/*! powerbi-models v0.9.1 | (c) 2016 Microsoft Corporation MIT */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["powerbi-models"]=t():e["powerbi-models"]=t()}(this,function(){return function(e){function t(i){if(r[i])return r[i].exports;var n=r[i]={exports:{},id:i,loaded:!1};return e[i].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){function i(e){var t=e.message;return t||(t=e.path+" is invalid. Not meeting "+e.keyword+" constraint"),{message:t}}function n(e,t){return function(r){var n=u(e,t),o=n(r);return o?void 0:n.errors.map(i)}}function o(e){var t=e,r=e;return"string"==typeof t.operator&&Array.isArray(t.values)?p.Basic:"string"==typeof r.logicalOperator&&Array.isArray(r.conditions)?p.Advanced:p.Unknown}function a(e){return void 0!==e.table&&void 0!==e.measure}function s(e){return void 0!==e.table&&void 0!==e.column}function c(e){return void 0!==e.table&&void 0!==e.hierarchy&&void 0!==e.hierarchyLevel}var f=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)};t.advancedFilterSchema=r(1),t.filterSchema=r(2),t.loadSchema=r(3),t.dashboardLoadSchema=r(4),t.pageSchema=r(5),t.settingsSchema=r(6),t.basicFilterSchema=r(7);var u=r(8);t.validateSettings=n(t.settingsSchema,{schemas:{basicFilter:t.basicFilterSchema,advancedFilter:t.advancedFilterSchema}}),t.validateReportLoad=n(t.loadSchema,{schemas:{settings:t.settingsSchema,basicFilter:t.basicFilterSchema,advancedFilter:t.advancedFilterSchema}}),t.validateDashboardLoad=n(t.dashboardLoadSchema),t.validatePage=n(t.pageSchema),t.validateFilter=n(t.filterSchema,{schemas:{basicFilter:t.basicFilterSchema,advancedFilter:t.advancedFilterSchema}}),function(e){e[e.Advanced=0]="Advanced",e[e.Basic=1]="Basic",e[e.Unknown=2]="Unknown"}(t.FilterType||(t.FilterType={}));var p=t.FilterType;t.getFilterType=o,t.isMeasure=a,t.isColumn=s,t.isHierarchy=c;var l=function(){function e(e){this.target=e}return e.prototype.toJSON=function(){return{$schema:this.schemaUrl,target:this.target}},e}();t.Filter=l;var m=function(e){function t(r,i){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];if(e.call(this,r),this.operator=i,this.schemaUrl=t.schemaUrl,0===n.length)throw new Error("values must be a non-empty array. You passed: "+n);Array.isArray(n[0])?this.values=n[0]:this.values=n}return f(t,e),t.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return t.operator=this.operator,t.values=this.values,t},t.schemaUrl="http://powerbi.com/product/schema#basic",t}(l);t.BasicFilter=m;var d=function(e){function t(r,i){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];if(e.call(this,r),this.schemaUrl=t.schemaUrl,"string"!=typeof i||0===i.length)throw new Error("logicalOperator must be a valid operator, You passed: "+i);this.logicalOperator=i;var a;if(a=Array.isArray(n[0])?n[0]:n,0===a.length)throw new Error("conditions must be a non-empty array. You passed: "+n);if(a.length>2)throw new Error("AdvancedFilters may not have more than two conditions. You passed: "+n.length);if(1===a.length&&"And"!==i)throw new Error('Logical Operator must be "And" when there is only one condition provided');this.conditions=a}return f(t,e),t.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return t.logicalOperator=this.logicalOperator,t.conditions=this.conditions,t},t.schemaUrl="http://powerbi.com/product/schema#advanced",t}(l);t.AdvancedFilter=d},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",type:"object",properties:{target:{oneOf:[{type:"object",properties:{table:{type:"string"},column:{type:"string"}},required:["table","column"]},{type:"object",properties:{table:{type:"string"},hierarchy:{type:"string"},hierarchyLevel:{type:"string"}},required:["table","hierarchy","hierarchyLevel"]},{type:"object",properties:{table:{type:"string"},measure:{type:"string"}},required:["table","measure"]}]},logicalOperator:{type:"string"},conditions:{type:"array",items:{type:"object",properties:{value:{type:["string","boolean","number"]},operator:{type:"string"}},required:["value","operator"]}}},required:["target","logicalOperator","conditions"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",oneOf:[{$ref:"#basicFilter"},{$ref:"#advancedFilter"}],invalidMessage:"filter is invalid"}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",type:"object",properties:{accessToken:{type:"string",messages:{type:"accessToken must be a string",required:"accessToken is required"}},id:{type:"string",messages:{type:"id must be a string",required:"id is required"}},settings:{$ref:"#settings"},pageName:{type:"string",messages:{type:"pageName must be a string"}},filters:{type:"array",items:{type:"object",oneOf:[{$ref:"#basicFilter"},{$ref:"#advancedFilter"}]},invalidMessage:"filters property is invalid"}},required:["accessToken","id"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",type:"object",properties:{accessToken:{type:"string",messages:{type:"accessToken must be a string",required:"accessToken is required"}},id:{type:"string",messages:{type:"id must be a string",required:"id is required"}}},required:["accessToken","id"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",type:"object",properties:{name:{type:"string",messages:{type:"name must be a string",required:"name is required"}}},required:["name"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",type:"object",properties:{filterPaneEnabled:{type:"boolean",messages:{type:"filterPaneEnabled must be a boolean"}},navContentPaneEnabled:{type:"boolean",messages:{type:"navContentPaneEnabled must be a boolean"}}}}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",type:"object",properties:{target:{type:"object",properties:{table:{type:"string"},column:{type:"string"},hierarchy:{type:"string"},hierarchyLevel:{type:"string"},measure:{type:"string"}},required:["table"]},operator:{type:"string"},values:{type:"array",items:{type:["string","boolean","number"]}}},required:["target","operator","values"]}},function(e,t,r){e.exports=r(9)},function(e,t,r){(function(t){"use strict";function i(e){var t=e instanceof RegExp?e.toString():new RegExp(e).toString();return x?(t=t.substr(1,t.length-2),t="/"+t.replace(y,"\\$&")+"/"):t}function n(e,t){return g.lastIndex=0,g.test(t)?e+"."+t:e+'["'+t+'"]'}function o(e){var t=Object.prototype.toString.call(e);return t.substr(8,t.length-9).toLowerCase()}function a(e){return(0|e)===e}function s(e){var t,r,i=Object.keys(e),n=[],o={};for(r=0;r<i.length;r++)t=P[i[r]],t&&(t.type?(o[t.type]||(o[t.type]=[]),o[t.type].push(t)):n.push(t));return n.concat(Object.keys(o).reduce(function(e,t){return e.concat(o[t])},[]))}function c(e){var t=e.replace(h,"$1");return isNaN(+t)?'"'===t[0]?'[\\"'+t.substr(1,t.length-2)+'\\"]':'." + '+t+' + "':"."+t}function f(e){return'"'+e.replace(d,c).substr(5)+'"'}function u(e){var t,r,i=e,n=o(e);if("object"===n){i={};for(t in e)i[t]=u(e[t])}else if("array"===n)for(i=[],r=0;r<e.length;r++)i[r]=u(e[r]);else{if("regexp"===n)return new RegExp(e);if("date"===n)return new Date(e.toJSON())}return i}function p(){this.objects=[],this.properties=[]}function l(e,t,r,i,n){var a,s,c,f,m;if("object"!==o(e))return t;if(e=i.resolve(e),void 0===t&&e.hasOwnProperty("default")&&(t=u(e["default"])),a=o(t),"object"===a&&"object"===o(e.properties)){for(c in e.properties)s=l(e.properties[c],t[c],r,i),void 0!==s&&(t[c]=s);for(c in t)c in e.properties||e.additionalProperties!==!1&&(r!==!1||e.additionalProperties)||(n?n.mark(t,c):delete t[c])}else if("array"===a&&e.items){if("array"===o(e.items))for(f=0;f<e.items.length;f++)s=l(e.items[f],t[f],r,i),(void 0!==s||f<t.length)&&(t[f]=s);else if(t.length)for(f=0;f<t.length;f++)t[f]=l(e.items,t[f],r,i)}else if("array"===o(e.allOf)&&e.allOf.length){for(m=new p,f=0;f<e.allOf.length;f++)t=l(e.allOf[f],t,r,i,m);m.deleteDuplicates(),m.dispose()}return t}function m(e,t){function r(e){var t,r=p.resolve(e),i=e.$ref,o=h[i];return o||(o=h[i]={key:d(),func:function(e){return t(e)}},t=n(r),Object.defineProperty(o.func,"errors",{get:function(){return t.errors}}),y[o.key]=o.func),"refs."+o.key}function n(e){function n(e){var t=d();return c.def(t,e),t}function o(e,a,u){function p(r,i){var n,o=e,s=i&&a.properties&&a.properties[i]&&a.properties[i].requiredMessage||a.invalidMessage;s||(s=i&&a.properties&&a.properties[i]&&a.properties[i].messages&&a.properties[i].messages[r]||a.messages&&a.messages[r]),e.indexOf("[")>-1?(o=f(e),i&&(o=o?o+' + ".'+i+'"':i),c("errors.push({")("path: "+o+", ")('keyword: "'+r+'"'+(s?",":"")),s&&c('message: "'+s+'"'),c("})")):(n=d(),o=o.substr(5),i&&(o=o?o+"."+i:i),y[n]={path:o,keyword:r},s&&(y[n].message=s),c("errors.push(refs."+n+")")),u||t.greedy||c("return (validate.errors = errors) && false")}var l,m,h,v,b,x,j,A,O;if(void 0!==a.$ref)return m=r(a),h=f(e),v=n(0),void c("if (!"+m+"("+e+")) {")("if ("+m+".errors) {")("errors.push.apply(errors, "+m+".errors)")("for ("+v+" = 0; "+v+" < "+m+".errors.length; "+v+"++) {")("if ("+m+".errors["+v+"].path) {")("errors[errors.length - "+m+".errors.length + "+v+"].path = "+h+' + "." + '+m+".errors["+v+"].path")("} else {")("errors[errors.length - "+m+".errors.length + "+v+"].path = "+h)("}")("}")("}")("}");for(l={path:e,schema:a,code:c,declare:n,validate:o,error:p,noFailFast:u},j=s(a),O=0;O<j.length;O++)A=j[O],A.type&&b!==A.type&&(b&&c("}"),b=A.type,c("if ("+$[A.type](e)+") {")),A(l);b&&c("}"),a.format&&t.formats&&(x=t.formats[a.format],x&&("string"==typeof x||x instanceof RegExp?(c("if (!("+i(x)+").test("+l.path+")) {"),p("format"),c("}")):"function"==typeof x&&((g.formats||(g.formats={}))[a.format]=x,(g.schemas||(g.schemas={}))[a.format]=a,c('if (!formats["'+a.format+'"]('+l.path+', schemas["'+a.format+'"])) {'),p("format"),c("}"))))}var c=j("validate","data")("var errors = []");return o("data",e),c("return (validate.errors = errors) && errors.length === 0"),a=c.compile(g),a.errors=[],a.build=function(t,r){return l(e,r&&r.copy===!1?t:u(t),r&&r.additionalProperties,p)},a}if("object"!==o(e))throw new Error(v);t=t||{};var a,c=t.missing$Ref||!1,p=new F(e,t.schemas,c),m=0,d=function(){return"i"+m++},h={},y={errors:[]},g={equal:A,unique:O,refs:y};return n(e)}var d=/\[.+?\]/g,h=/\[?(.*?)?\]/,y=/[\/]/g,g=/^[a-z_$][0-9a-z]*$/gi,v="jsen: invalid schema object",b="object"==typeof window&&!!window.navigator,x="object"==typeof t&&"v0"===t.version.split(".")[0],j=r(11),A=r(12),O=r(13),F=r(14),w=r(16),$={},P={};$["null"]=function(e){return e+" === null"},$["boolean"]=function(e){return"typeof "+e+' === "boolean"'},$.string=function(e){return"typeof "+e+' === "string"'},$.number=function(e){return"typeof "+e+' === "number"'},$.integer=function(e){return"typeof "+e+' === "number" && !('+e+" % 1)"},$.array=function(e){return e+" !== undefined && Array.isArray("+e+")"},$.object=function(e){return e+" !== undefined && typeof "+e+' === "object" && '+e+" !== null && !Array.isArray("+e+")"},$.date=function(e){return e+" !== undefined && "+e+" instanceof Date"},P.type=function(e){if(e.schema.type){var t=Array.isArray(e.schema.type)?e.schema.type:[e.schema.type],r=t.map(function(t){return $[t]?$[t](e.path)||"true":"true"}).join(" || ");r&&(e.code("if (!("+r+")) {"),e.error("type"),e.code("}"))}},P["enum"]=function(e){var t,r,i,n=e.schema["enum"],o=[];if(Array.isArray(n)){for(i=0;i<n.length;i++)t=n[i],r=typeof t,null===t||["boolean","number","string"].indexOf(r)>-1?"string"===r?o.push(e.path+' === "'+t+'"'):o.push(e.path+" === "+t):o.push("equal("+e.path+", "+JSON.stringify(t)+")");e.code("if (!("+o.join(" || ")+")) {"),e.error("enum"),e.code("}")}},P.minimum=function(e){"number"==typeof e.schema.minimum&&(e.code("if ("+e.path+" < "+e.schema.minimum+") {"),e.error("minimum"),e.code("}"))},P.exclusiveMinimum=function(e){e.schema.exclusiveMinimum===!0&&"number"==typeof e.schema.minimum&&(e.code("if ("+e.path+" === "+e.schema.minimum+") {"),e.error("exclusiveMinimum"),e.code("}"))},P.maximum=function(e){"number"==typeof e.schema.maximum&&(e.code("if ("+e.path+" > "+e.schema.maximum+") {"),e.error("maximum"),e.code("}"))},P.exclusiveMaximum=function(e){e.schema.exclusiveMaximum===!0&&"number"==typeof e.schema.maximum&&(e.code("if ("+e.path+" === "+e.schema.maximum+") {"),e.error("exclusiveMaximum"),e.code("}"))},P.multipleOf=function(e){if("number"==typeof e.schema.multipleOf){var t=e.schema.multipleOf,r=t.toString().length-t.toFixed(0).length-1,i=r>0?Math.pow(10,r):1,n=e.path;r>0?e.code("if (+(Math.round(("+n+" * "+i+') + "e+" + '+r+') + "e-" + '+r+") % "+t*i+" !== 0) {"):e.code("if ((("+n+" * "+i+") % "+t*i+") !== 0) {"),e.error("multipleOf"),e.code("}")}},P.minLength=function(e){a(e.schema.minLength)&&(e.code("if ("+e.path+".length < "+e.schema.minLength+") {"),e.error("minLength"),e.code("}"))},P.maxLength=function(e){a(e.schema.maxLength)&&(e.code("if ("+e.path+".length > "+e.schema.maxLength+") {"),e.error("maxLength"),e.code("}"))},P.pattern=function(e){var t="string"==typeof e.schema.pattern?new RegExp(e.schema.pattern):e.schema.pattern;"regexp"===o(t)&&(e.code("if (!("+i(t)+").test("+e.path+")) {"),e.error("pattern"),e.code("}"))},P.format=function(e){"string"==typeof e.schema.format&&w[e.schema.format]&&(e.code("if (!("+w[e.schema.format]+").test("+e.path+")) {"),e.error("format"),e.code("}"))},P.minItems=function(e){a(e.schema.minItems)&&(e.code("if ("+e.path+".length < "+e.schema.minItems+") {"),e.error("minItems"),e.code("}"))},P.maxItems=function(e){a(e.schema.maxItems)&&(e.code("if ("+e.path+".length > "+e.schema.maxItems+") {"),e.error("maxItems"),e.code("}"))},P.additionalItems=function(e){e.schema.additionalItems===!1&&Array.isArray(e.schema.items)&&(e.code("if ("+e.path+".length > "+e.schema.items.length+") {"),e.error("additionalItems"),e.code("}"))},P.uniqueItems=function(e){e.schema.uniqueItems&&(e.code("if (unique("+e.path+").length !== "+e.path+".length) {"),e.error("uniqueItems"),e.code("}"))},P.items=function(e){var t=e.declare(0),r=0;if("object"===o(e.schema.items))e.code("for ("+t+"; "+t+" < "+e.path+".length; "+t+"++) {"),e.validate(e.path+"["+t+"]",e.schema.items,e.noFailFast),e.code("}");else if(Array.isArray(e.schema.items)){for(;r<e.schema.items.length;r++)e.code("if ("+e.path+".length - 1 >= "+r+") {"),e.validate(e.path+"["+r+"]",e.schema.items[r],e.noFailFast),e.code("}");"object"===o(e.schema.additionalItems)&&(e.code("for ("+t+" = "+r+"; "+t+" < "+e.path+".length; "+t+"++) {"),e.validate(e.path+"["+t+"]",e.schema.additionalItems,e.noFailFast),e.code("}"))}},P.maxProperties=function(e){a(e.schema.maxProperties)&&(e.code("if (Object.keys("+e.path+").length > "+e.schema.maxProperties+") {"),e.error("maxProperties"),e.code("}"))},P.minProperties=function(e){a(e.schema.minProperties)&&(e.code("if (Object.keys("+e.path+").length < "+e.schema.minProperties+") {"),e.error("minProperties"),e.code("}"))},P.required=function(e){if(Array.isArray(e.schema.required))for(var t=0;t<e.schema.required.length;t++)e.code("if ("+n(e.path,e.schema.required[t])+" === undefined) {"),e.error("required",e.schema.required[t]),e.code("}")},P.properties=function(e){if(!e.validatedProperties){var t,r,i,a=e.schema.properties,s="object"===o(a)?Object.keys(a):[],c=e.schema.patternProperties,f="object"===o(c)?Object.keys(c):[],u=e.schema.additionalProperties,p=u===!1||"object"===o(u);if(s.length&&!f.length&&!p){for(r=0;r<s.length;r++)t=s[r],i=n(e.path,t),e.code("if ("+i+" !== undefined) {"),e.validate(i,a[t],e.noFailFast),e.code("}");e.validatedProperties=!0}}},P.patternProperties=P.additionalProperties=function(e){if(!e.validatedProperties){var t,r,a,s,c,f,u,p=e.schema.properties,l="object"===o(p)?Object.keys(p):[],m=e.schema.patternProperties,d="object"===o(m)?Object.keys(m):[],h=e.schema.additionalProperties,y=h===!1||"object"===o(h);if(l.length||d.length||y){for(t=e.declare("[]"),r=e.declare('""'),a=e.declare(0),y&&(s=e.declare(!1)),e.code(t+" = Object.keys("+e.path+")"),e.code("for ("+a+"; "+a+" < "+t+".length; "+a+"++) {")(r+" = "+t+"["+a+"]")("if ("+e.path+"["+r+"] === undefined) {")("continue")("}"),y&&e.code(s+" = false"),u=0;u<l.length;u++)c=l[u],e.code((u?"else ":"")+"if ("+r+' === "'+c+'") {'),y&&e.code(s+" = true"),e.validate(n(e.path,c),p[c],e.noFailFast),e.code("}");for(u=0;u<d.length;u++)f=d[u],e.code("if (("+i(f)+").test("+r+")) {"),y&&e.code(s+" = true"),e.validate(e.path+"["+r+"]",m[f],e.noFailFast),e.code("}");y&&(e.code("if (!"+s+") {"),h===!1?e.error("additionalProperties"):e.validate(e.path+"["+r+"]",h,e.noFailFast),e.code("}")),e.code("}"),e.validatedProperties=!0}}},P.dependencies=function(e){if("object"===o(e.schema.dependencies)){var t,r,i=0;for(t in e.schema.dependencies){if(r=e.schema.dependencies[t],e.code("if ("+n(e.path,t)+" !== undefined) {"),"object"===o(r))e.validate(e.path,r,e.noFailFast);else for(i;i<r.length;i++)e.code("if ("+n(e.path,r[i])+" === undefined) {"),e.error("dependencies",r[i]),e.code("}");e.code("}")}}},P.allOf=function(e){if(Array.isArray(e.schema.allOf))for(var t=0;t<e.schema.allOf.length;t++)e.validate(e.path,e.schema.allOf[t],e.noFailFast)},P.anyOf=function(e){if(Array.isArray(e.schema.anyOf)){var t=e.declare(0),r=e.declare(0),i=e.declare(!1),n=0;for(e.code(r+" = errors.length");n<e.schema.anyOf.length;n++)e.code("if (!"+i+") {"),e.code(t+" = errors.length"),e.validate(e.path,e.schema.anyOf[n],!0),e.code(i+" = errors.length === "+t)("}");e.code("if (!"+i+") {"),e.error("anyOf"),e.code("} else {")("errors.length = "+r)("}")}},P.oneOf=function(e){if(Array.isArray(e.schema.oneOf)){var t=e.declare(0),r=e.declare(0),i=e.declare(0),n=0;for(e.code(r+" = errors.length");n<e.schema.oneOf.length;n++)e.code(i+" = errors.length"),e.validate(e.path,e.schema.oneOf[n],!0),e.code("if (errors.length === "+i+") {")(t+"++")("}");e.code("if ("+t+" !== 1) {"),e.error("oneOf"),e.code("} else {")("errors.length = "+r)("}")}},P.not=function(e){if("object"===o(e.schema.not)){var t=e.declare(0);e.code(t+" = errors.length"),e.validate(e.path,e.schema.not,!0),e.code("if (errors.length === "+t+") {"),e.error("not"),e.code("} else {")("errors.length = "+t)("}")}},["minimum","exclusiveMinimum","maximum","exclusiveMaximum","multipleOf"].forEach(function(e){P[e].type="number"}),["minLength","maxLength","pattern","format"].forEach(function(e){P[e].type="string"}),["minItems","maxItems","additionalItems","uniqueItems","items"].forEach(function(e){P[e].type="array"}),["maxProperties","minProperties","required","properties","patternProperties","additionalProperties","dependencies"].forEach(function(e){P[e].type="object"}),p.prototype.mark=function(e,t){var r,i=this.objects.indexOf(e);return i<0?(this.objects.push(e),r={},r[t]=1,void this.properties.push(r)):(r=this.properties[i],void(r[t]=r[t]?r[t]+1:1))},p.prototype.deleteDuplicates=function(){var e,t;for(t=0;t<this.properties.length;t++)for(e in this.properties[t])this.properties[t][e]>1&&delete this.objects[t][e]},p.prototype.dispose=function(){this.objects.length=0,this.properties.length=0},m.browser=b,m.clone=u,m.equal=A,m.unique=O,m.resolve=F.resolvePointer,e.exports=m}).call(t,r(10))},function(e,t){function r(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function n(e){if(u===setTimeout)return setTimeout(e,0);if((u===r||!u)&&setTimeout)return u=setTimeout,setTimeout(e,0);try{return u(e,0)}catch(t){try{return u.call(null,e,0)}catch(t){return u.call(this,e,0)}}}function o(e){if(p===clearTimeout)return clearTimeout(e);if((p===i||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function a(){h&&m&&(h=!1,m.length?d=m.concat(d):y=-1,d.length&&s())}function s(){if(!h){var e=n(a);h=!0;for(var t=d.length;t;){for(m=d,d=[];++y<t;)m&&m[y].run();y=-1,t=d.length}m=null,h=!1,o(e)}}function c(e,t){this.fun=e,this.array=t}function f(){}var u,p,l=e.exports={};!function(){try{u="function"==typeof setTimeout?setTimeout:r}catch(e){u=r}try{p="function"==typeof clearTimeout?clearTimeout:i}catch(e){p=i}}();var m,d=[],h=!1,y=-1;l.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];d.push(new c(e,t)),1!==d.length||h||n(s)},c.prototype.run=function(){this.fun.apply(null,this.array)},l.title="browser",l.browser=!0,l.env={},l.argv=[],l.version="",l.versions={},l.on=f,l.addListener=f,l.once=f,l.off=f,l.removeListener=f,l.removeAllListeners=f,l.emit=f,l.binding=function(e){throw new Error("process.binding is not supported")},l.cwd=function(){return"/"},l.chdir=function(e){throw new Error("process.chdir is not supported")},l.umask=function(){return 0}},function(e,t){"use strict";e.exports=function(){var e=arguments[0]||"",t=[].join.call([].slice.call(arguments,1),", "),r="",i="",n=1,o=" ",a="{[",s="}]",c=function(){return new Array(n+1).join(o)},f=function(e){r+=c()+e+"\n"},u=function(e){var t=e[0],r=e[e.length-1];return s.indexOf(t)>-1&&a.indexOf(r)>-1?(n--,f(e),n++):a.indexOf(r)>-1?(f(e),n++):s.indexOf(t)>-1?(n--,f(e)):f(e),u};return u.def=function(e,t){return i+=c()+"var "+e+(void 0!==t?" = "+t:"")+"\n",u},u.toSource=function(){return"function "+e+"("+t+") {\n"+i+"\n"+r+"\n}"},u.compile=function(e){var t="return ("+u.toSource()+")",r=e||{},i=Object.keys(r),n=i.map(function(e){return r[e]});return Function.apply(null,i.concat(t)).apply(null,n)},u}},function(e,t){"use strict";function r(e){var t=Object.prototype.toString.call(e);return t.substr(8,t.length-9).toLowerCase()}function i(e,t){var r,i,o=Object.keys(e).sort(),a=Object.keys(t).sort();if(!n(o,a))return!1;for(r=0;r<o.length;r++)if(i=o[r],!n(e[i],t[i]))return!1;return!0}function n(e,t){var o,a=typeof e,s=typeof t;if("object"===a&&(a=r(e)),"object"===s&&(s=r(t)),a!==s)return!1;if("object"===a)return i(e,t);if("regexp"===a)return e.toString()===t.toString();if("array"===a){if(e.length!==t.length)return!1;for(o=0;o<e.length;o++)if(!n(e[o],t[o]))return!1;return!0}return e===t}e.exports=n},function(e,t,r){"use strict";function i(e,t,r){for(var i=0,n=e.length;i<n;i++)if(r(e[i],t))return i;return-1}var n=r(12);e.exports=function(e){return e.filter(function(e,t,r){return i(r,e,n)===t})},e.exports.findIndex=i},function(e,t,r){"use strict";function i(e,t){if(!t.length)return e;var r,n=t.shift();e&&"object"==typeof e&&e.hasOwnProperty(n)&&(r=e[n]);{if(!t.length)return r;if(r&&"object"==typeof r)return i(r,t)}}function n(e){var t,r=e.indexOf("#");return 0!==r?[e]:(e=e.substr(r+1))?(t=e.split("/").map(function(e){return decodeURIComponent(e).replace(/~1/g,"/").replace(/~0/g,"~")}),"/"===e[0]&&t.shift(),t):[]}function o(e,t){if(e&&"object"==typeof e)return e.id===t?e:Object.keys(e).reduce(function(r,i){return r||o(e[i],t)},void 0)}function a(e){var t,r,i=Object.keys(e),n={};for(r=0;r<i.length;r++)t=i[r],n[t]=new s(e[t]);return n}function s(e,t,r){this.rootSchema=e,this.resolvedRootSchema=null,this.cache={},this.missing$Ref=r,this.resolvers=t&&"object"==typeof t?a(t):null}var c=r(15),f="jsen: invalid schema reference";s.prototype.resolveRef=function(e){var t,r,a,s=new Error(f+" "+e),u=this.rootSchema,p=this.resolvedRootSchema;if(!e||"string"!=typeof e)throw s;if(e===c.id&&(a=c),void 0===a&&p&&(a=o(p,e)),void 0===a&&(a=o(u,e)),void 0===a&&(r=n(e),p&&(a=i(p,r.slice(0))),void 0===a&&(a=i(u,r.slice(0)))),void 0===a&&r.length&&this.resolvers&&(t=i(this.resolvers,r),t&&(a=t.resolve(t.rootSchema))),void 0===a||"object"!=typeof a){if(!this.missing$Ref)throw s;a={}}return this.cache[e]===a?a:(this.cache[e]=a,void 0!==a.$ref&&(a=this.cache[e]=this.resolveRef(a.$ref)),a)},s.prototype.resolve=function(e){if(!e||"object"!=typeof e)return e;var t=e.$ref,r=this.cache[t];return void 0===t?e:void 0!==r?r:(r=this.resolveRef(t),e===this.rootSchema&&e!==r&&(this.resolvedRootSchema=r),r)},s.resolvePointer=function(e,t){return i(e,n(t))},e.exports=s},function(e,t){e.exports={id:"http://json-schema.org/draft-04/schema#",$schema:"http://json-schema.org/draft-04/schema#",description:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{"default":0}]},simpleTypes:{anyOf:[{"enum":["array","boolean","integer","null","number","object","string","any"]},{type:"string"}]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},"default":{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean","default":!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean","default":!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],"default":{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],"default":{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean","default":!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],"default":{}},definitions:{type:"object",additionalProperties:{$ref:"#"},"default":{}},properties:{type:"object",additionalProperties:{$ref:"#"},"default":{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},"default":{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},"enum":{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},"default":{}}},function(e,t){"use strict";var r={};r["date-time"]=/(\d\d\d\d)(-)?(\d\d)(-)?(\d\d)(T)?(\d\d)(:)?(\d\d)(:)?(\d\d)(\.\d+)?(Z|([+-])(\d\d)(:)?(\d\d))/,r.uri=/^([a-zA-Z][a-zA-Z0-9+-.]*:){0,1}\/\/[^\s]*$/,r.email=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,r.ipv4=/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,r.ipv6=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|[fF][eE]80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::([fF]{4}(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,r.hostname=/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]))*$/,e.exports=r}])});
/*! powerbi-models v0.10.0 | (c) 2016 Microsoft Corporation MIT */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["powerbi-models"]=t():e["powerbi-models"]=t()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){function n(e){var t=e.message;return t||(t=e.path+" is invalid. Not meeting "+e.keyword+" constraint"),{message:t}}function i(e,t){return function(r){var i=f(e,t),o=i(r);return o?void 0:i.errors.map(n)}}function o(e){var t=e,r=e;return"string"==typeof t.operator&&Array.isArray(t.values)?p.Basic:"string"==typeof r.logicalOperator&&Array.isArray(r.conditions)?p.Advanced:p.Unknown}function s(e){return void 0!==e.table&&void 0!==e.measure}function a(e){return void 0!==e.table&&void 0!==e.column}function h(e){return void 0!==e.table&&void 0!==e.hierarchy&&void 0!==e.hierarchyLevel}var c=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)};t.advancedFilterSchema=r(1),t.filterSchema=r(2),t.loadSchema=r(3),t.dashboardLoadSchema=r(4),t.pageSchema=r(5),t.settingsSchema=r(6),t.basicFilterSchema=r(7);var f=r(8);t.validateSettings=i(t.settingsSchema,{schemas:{basicFilter:t.basicFilterSchema,advancedFilter:t.advancedFilterSchema}}),t.validateReportLoad=i(t.loadSchema,{schemas:{settings:t.settingsSchema,basicFilter:t.basicFilterSchema,advancedFilter:t.advancedFilterSchema}}),t.validateDashboardLoad=i(t.dashboardLoadSchema),t.validatePage=i(t.pageSchema),t.validateFilter=i(t.filterSchema,{schemas:{basicFilter:t.basicFilterSchema,advancedFilter:t.advancedFilterSchema}}),function(e){e[e.Advanced=0]="Advanced",e[e.Basic=1]="Basic",e[e.Unknown=2]="Unknown"}(t.FilterType||(t.FilterType={}));var p=t.FilterType;t.getFilterType=o,t.isMeasure=s,t.isColumn=a,t.isHierarchy=h;var u=function(){function e(e){this.target=e}return e.prototype.toJSON=function(){return{$schema:this.schemaUrl,target:this.target}},e}();t.Filter=u;var l=function(e){function t(r,n){for(var i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];if(e.call(this,r),this.operator=n,this.schemaUrl=t.schemaUrl,0===i.length)throw new Error("values must be a non-empty array. You passed: "+i);Array.isArray(i[0])?this.values=i[0]:this.values=i}return c(t,e),t.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return t.operator=this.operator,t.values=this.values,t},t.schemaUrl="http://powerbi.com/product/schema#basic",t}(u);t.BasicFilter=l;var m=function(e){function t(r,n){for(var i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];if(e.call(this,r),this.schemaUrl=t.schemaUrl,"string"!=typeof n||0===n.length)throw new Error("logicalOperator must be a valid operator, You passed: "+n);this.logicalOperator=n;var s;if(s=Array.isArray(i[0])?i[0]:i,0===s.length)throw new Error("conditions must be a non-empty array. You passed: "+i);if(s.length>2)throw new Error("AdvancedFilters may not have more than two conditions. You passed: "+i.length);if(1===s.length&&"And"!==n)throw new Error('Logical Operator must be "And" when there is only one condition provided');this.conditions=s}return c(t,e),t.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return t.logicalOperator=this.logicalOperator,t.conditions=this.conditions,t},t.schemaUrl="http://powerbi.com/product/schema#advanced",t}(u);t.AdvancedFilter=m},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",type:"object",properties:{target:{oneOf:[{type:"object",properties:{table:{type:"string"},column:{type:"string"}},required:["table","column"]},{type:"object",properties:{table:{type:"string"},hierarchy:{type:"string"},hierarchyLevel:{type:"string"}},required:["table","hierarchy","hierarchyLevel"]},{type:"object",properties:{table:{type:"string"},measure:{type:"string"}},required:["table","measure"]}]},logicalOperator:{type:"string"},conditions:{type:"array",items:{type:"object",properties:{value:{type:["string","boolean","number"]},operator:{type:"string"}},required:["value","operator"]}}},required:["target","logicalOperator","conditions"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",oneOf:[{$ref:"#basicFilter"},{$ref:"#advancedFilter"}],invalidMessage:"filter is invalid"}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",type:"object",properties:{accessToken:{type:"string",messages:{type:"accessToken must be a string",required:"accessToken is required"}},id:{type:"string",messages:{type:"id must be a string",required:"id is required"}},settings:{$ref:"#settings"},pageName:{type:"string",messages:{type:"pageName must be a string"}},filters:{type:"array",items:{type:"object",oneOf:[{$ref:"#basicFilter"},{$ref:"#advancedFilter"}]},invalidMessage:"filters property is invalid"}},required:["accessToken","id"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",type:"object",properties:{accessToken:{type:"string",messages:{type:"accessToken must be a string",required:"accessToken is required"}},id:{type:"string",messages:{type:"id must be a string",required:"id is required"}}},required:["accessToken","id"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",type:"object",properties:{name:{type:"string",messages:{type:"name must be a string",required:"name is required"}}},required:["name"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",type:"object",properties:{filterPaneEnabled:{type:"boolean",messages:{type:"filterPaneEnabled must be a boolean"}},navContentPaneEnabled:{type:"boolean",messages:{type:"navContentPaneEnabled must be a boolean"}}}}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",type:"object",properties:{target:{type:"object",properties:{table:{type:"string"},column:{type:"string"},hierarchy:{type:"string"},hierarchyLevel:{type:"string"},measure:{type:"string"}},required:["table"]},operator:{type:"string"},values:{type:"array",items:{type:["string","boolean","number"]}}},required:["target","operator","values"]}},function(e,t,r){e.exports=r(9)},function(e,t,r){"use strict";function n(e){return e=e instanceof RegExp?e:new RegExp(e),O?e.toString():"/"+e.source.replace(g,"\\$&")+"/"}function i(e){return'"'+e.replace(v,"\\$1")+'"'}function o(e,t){return b.lastIndex=0,b.test(t)?e+"."+t:e+"["+i(t)+"]"}function s(e){if(void 0===e)return"undefined";var t=Object.prototype.toString.call(e);return t.substr(8,t.length-9).toLowerCase()}function a(e){return(0|e)===e}function h(e,t){S[t].type=e,S[t].keyword=t}function c(e){var t,r,n,i=Object.keys(e),o=i.indexOf("properties"),s=i.indexOf("patternProperties"),a={"enum":Array.isArray(e["enum"])&&e["enum"].length>0,type:null,allType:[],perType:{}};for(e.type&&("string"==typeof e.type?a.type=[e.type]:Array.isArray(e.type)&&e.type.length&&(a.type=e.type.slice(0))),n=0;n<i.length;n++)t=i[n],"enum"!==t&&"type"!==t&&(r=S[t],r&&(r.type?(a.perType[r.type]||(a.perType[r.type]=[]),o>-1&&"required"===t||s>-1&&"additionalProperties"===t||a.perType[r.type].push(t)):a.allType.push(t)));return a}function f(e,t){var r,n,i=e.substr(4),o=i.length,s=[],a="",h=!1;for(n=0;n<o;n++)switch(r=i[n]){case".":a&&(a+=r);break;case"[":isNaN(+i[n+1])?(h=!0,a&&(s.push('"'+a+'"'),a="")):(h=!1,a&&(a+="."));break;case"]":s.push(h?a:'"'+a+'"'),a="";break;default:a+=r}return a&&s.push('"'+a+'"'),t&&s.push('"'+t+'"'),1===s.length&&h?'"" + '+s[0]+' + ""':s.join(' + "." + ')||'""'}function p(e){var t,r,n,i,o=e,a=s(e);if("object"===a)for(o={},t=Object.keys(e),i=0,r=t.length;i<r;i++)n=t[i],o[n]=p(e[n]);else if("array"===a)for(o=[],i=0,r=e.length;i<r;i++)o[i]=p(e[i]);else{if("regexp"===a)return new RegExp(e);if("date"===a)return new Date(e.toJSON())}return o}function u(e,t){for(var r=0,n=t.length;r<n;r++)if(w(e,t[r]))return!0;return!1}function l(){this.objects=[],this.properties=[]}function m(e,t,r,n,i){var o,a,h,c,f,u,d;if("object"!==s(e))return t;if(e=n.resolve(e),void 0===t&&e.hasOwnProperty("default")&&(t=p(e["default"])),o=s(t),"object"===o&&"object"===s(e.properties)){for(u=Object.keys(e.properties),c=0;c<u.length;c++)h=u[c],a=m(e.properties[h],t[h],r,n),void 0!==a&&(t[h]=a);if("always"!==r)for(d=Object.keys(t),c=0;c<d.length;c++)h=d[c],u.indexOf(h)<0&&(e.additionalProperties===!1||r===!1&&!e.additionalProperties)&&(i?i.mark(t,h):delete t[h])}else if("array"===o&&e.items){if("array"===s(e.items))for(c=0;c<e.items.length;c++)a=m(e.items[c],t[c],r,n),(void 0!==a||c<t.length)&&(t[c]=a);else if(t.length)for(c=0;c<t.length;c++)t[c]=m(e.items,t[c],r,n)}else if("array"===s(e.allOf)&&e.allOf.length){for(f=new l,c=0;c<e.allOf.length;c++)t=m(e.allOf[c],t,r,n,f);f.deleteDuplicates(),f.dispose()}return t}function d(e){this.path="data",this.schema=e.schema,this.formats=e.formats,this.greedy=e.greedy,this.resolver=e.resolver,this.id=e.id,this.funcache=e.funcache||{},this.scope=e.scope||{equalAny:u,unique:I,ucs2length:k,refs:{}}}function y(e,t){if("object"!==s(e))throw new Error(x);t=t||{};var r=0,n=function(){return"i"+r++},i=new $(e,t.schemas,t.missing$Ref||!1),o=new d({schema:e,resolver:i,id:n,schemas:t.schemas,formats:t.formats,greedy:t.greedy||!1}),a=A("validate","data")("validate.errors = []")('gen(data, "", validate.errors)')("return validate.errors.length === 0").compile({gen:o.compile()});return o.dispose(),o=null,a.errors=[],a.build=function(t,r){return m(e,r&&r.copy===!1?t:p(t),r&&r.additionalProperties,i)},a}var g=/[\/]/g,v=/(")/gim,b=/^[a-z_$][0-9a-z]*$/gi,x="jsen: invalid schema object",j="object"==typeof window&&!!window.navigator,O="/"!==new RegExp("/").source,A=r(10),w=r(11),I=r(12),$=r(13),q=r(21),k=r(22),F={},S={};F["null"]=function(e){return e+" === null"},F["boolean"]=function(e){return"typeof "+e+' === "boolean"'},F.string=function(e){return"typeof "+e+' === "string"'},F.number=function(e){return"typeof "+e+' === "number"'},F.integer=function(e){return"typeof "+e+' === "number" && !('+e+" % 1)"},F.array=function(e){return"Array.isArray("+e+")"},F.object=function(e){return"typeof "+e+' === "object" && '+e+" !== null && !Array.isArray("+e+")"},F.date=function(e){return e+" instanceof Date"},S["enum"]=function(e){var t=e.schema["enum"];e.code("if (!equalAny("+e.path+", "+JSON.stringify(t)+")) {"),e.error("enum"),e.code("}")},S.minimum=function(e){"number"==typeof e.schema.minimum&&(e.code("if ("+e.path+" < "+e.schema.minimum+") {"),e.error("minimum"),e.code("}"))},S.exclusiveMinimum=function(e){e.schema.exclusiveMinimum===!0&&"number"==typeof e.schema.minimum&&(e.code("if ("+e.path+" === "+e.schema.minimum+") {"),e.error("exclusiveMinimum"),e.code("}"))},S.maximum=function(e){"number"==typeof e.schema.maximum&&(e.code("if ("+e.path+" > "+e.schema.maximum+") {"),e.error("maximum"),e.code("}"))},S.exclusiveMaximum=function(e){e.schema.exclusiveMaximum===!0&&"number"==typeof e.schema.maximum&&(e.code("if ("+e.path+" === "+e.schema.maximum+") {"),e.error("exclusiveMaximum"),e.code("}"))},S.multipleOf=function(e){if("number"==typeof e.schema.multipleOf){var t=e.schema.multipleOf,r=t.toString().length-t.toFixed(0).length-1,n=r>0?Math.pow(10,r):1,i=e.path;r>0?e.code("if (+(Math.round(("+i+" * "+n+') + "e+" + '+r+') + "e-" + '+r+") % "+t*n+" !== 0) {"):e.code("if ((("+i+" * "+n+") % "+t*n+") !== 0) {"),e.error("multipleOf"),e.code("}")}},S.minLength=function(e){a(e.schema.minLength)&&(e.code("if (ucs2length("+e.path+") < "+e.schema.minLength+") {"),e.error("minLength"),e.code("}"))},S.maxLength=function(e){a(e.schema.maxLength)&&(e.code("if (ucs2length("+e.path+") > "+e.schema.maxLength+") {"),e.error("maxLength"),e.code("}"))},S.pattern=function(e){var t=e.schema.pattern;("string"==typeof t||t instanceof RegExp)&&(e.code("if (!("+n(t)+").test("+e.path+")) {"),e.error("pattern"),e.code("}"))},S.format=function(e){"string"==typeof e.schema.format&&q[e.schema.format]&&(e.code("if (!("+q[e.schema.format]+").test("+e.path+")) {"),e.error("format"),e.code("}"))},S.minItems=function(e){a(e.schema.minItems)&&(e.code("if ("+e.path+".length < "+e.schema.minItems+") {"),e.error("minItems"),e.code("}"))},S.maxItems=function(e){a(e.schema.maxItems)&&(e.code("if ("+e.path+".length > "+e.schema.maxItems+") {"),e.error("maxItems"),e.code("}"))},S.additionalItems=function(e){e.schema.additionalItems===!1&&Array.isArray(e.schema.items)&&(e.code("if ("+e.path+".length > "+e.schema.items.length+") {"),e.error("additionalItems"),e.code("}"))},S.uniqueItems=function(e){e.schema.uniqueItems&&(e.code("if (unique("+e.path+").length !== "+e.path+".length) {"),e.error("uniqueItems"),e.code("}"))},S.items=function(e){var t=e.declare(0),r=0;if("object"===s(e.schema.items))e.code("for ("+t+" = 0; "+t+" < "+e.path+".length; "+t+"++) {"),e.descend(e.path+"["+t+"]",e.schema.items),e.code("}");else if(Array.isArray(e.schema.items)){for(;r<e.schema.items.length;r++)e.code("if ("+e.path+".length - 1 >= "+r+") {"),e.descend(e.path+"["+r+"]",e.schema.items[r]),e.code("}");"object"===s(e.schema.additionalItems)&&(e.code("for ("+t+" = "+r+"; "+t+" < "+e.path+".length; "+t+"++) {"),e.descend(e.path+"["+t+"]",e.schema.additionalItems),e.code("}"))}},S.maxProperties=function(e){a(e.schema.maxProperties)&&(e.code("if (Object.keys("+e.path+").length > "+e.schema.maxProperties+") {"),e.error("maxProperties"),e.code("}"))},S.minProperties=function(e){a(e.schema.minProperties)&&(e.code("if (Object.keys("+e.path+").length < "+e.schema.minProperties+") {"),e.error("minProperties"),e.code("}"))},S.required=function(e){if(Array.isArray(e.schema.required))for(var t=0;t<e.schema.required.length;t++)e.code("if ("+o(e.path,e.schema.required[t])+" === undefined) {"),e.error("required",e.schema.required[t]),e.code("}")},S.properties=function(e){var t,r,n,i=e.schema.properties,a="object"===s(i)?Object.keys(i):[],h=Array.isArray(e.schema.required)?e.schema.required:[];if(a.length)for(r=0;r<a.length;r++)t=a[r],n=o(e.path,t),e.code("if ("+n+" !== undefined) {"),e.descend(n,i[t]),e.code("}"),h.indexOf(t)>-1&&(e.code("else {"),e.error("required",t),e.code("}"))},S.patternProperties=S.additionalProperties=function(e){var t,r,i,o,a,h,c,f="object"===s(e.schema.properties)?Object.keys(e.schema.properties):[],p=e.schema.patternProperties,u="object"===s(p)?Object.keys(p):[],l=e.schema.additionalProperties,m=l===!1||"object"===s(l);if(u.length||m){for(r=e.declare("[]"),i=e.declare('""'),o=e.declare(0),m&&(a=e.declare(!1)),e.code(r+" = Object.keys("+e.path+")"),e.code("for ("+o+" = 0; "+o+" < "+r+".length; "+o+"++) {")(i+" = "+r+"["+o+"]")("if ("+e.path+"["+i+"] === undefined) {")("continue")("}"),m&&e.code(a+" = false"),c=0;c<u.length;c++)h=u[c],e.code("if (("+n(h)+").test("+i+")) {"),e.descend(e.path+"["+i+"]",p[h]),m&&e.code(a+" = true"),e.code("}");m&&(f.length&&(t=e.declare(JSON.stringify(f)),e.code("if ("+t+".indexOf("+i+") > -1) {")("continue")("}")),e.code("if (!"+a+") {"),l===!1?e.error("additionalProperties",void 0,i):e.descend(e.path+"["+i+"]",l),e.code("}")),e.code("}")}},S.dependencies=function(e){if("object"===s(e.schema.dependencies))for(var t,r,n=Object.keys(e.schema.dependencies),i=n.length,a=0,h=0;h<i;h++){if(t=n[h],r=e.schema.dependencies[t],e.code("if ("+o(e.path,t)+" !== undefined) {"),"object"===s(r))e.descend(e.path,r);else for(a;a<r.length;a++)e.code("if ("+o(e.path,r[a])+" === undefined) {"),e.error("dependencies",r[a]),e.code("}");e.code("}")}},S.allOf=function(e){if(Array.isArray(e.schema.allOf))for(var t=0;t<e.schema.allOf.length;t++)e.descend(e.path,e.schema.allOf[t])},S.anyOf=function(e){if(Array.isArray(e.schema.anyOf)){var t=e.greedy,r=e.declare(0),n=e.declare(0),i=e.declare(!1),o=0;for(e.code(n+" = errors.length");o<e.schema.anyOf.length;o++)e.code("if (!"+i+") {"),e.code(r+" = errors.length"),e.greedy=!0,e.descend(e.path,e.schema.anyOf[o]),e.code(i+" = errors.length === "+r)("}");e.greedy=t,e.code("if (!"+i+") {"),e.error("anyOf"),e.code("} else {")("errors.length = "+n)("}")}},S.oneOf=function(e){if(Array.isArray(e.schema.oneOf)){var t=e.greedy,r=e.declare(0),n=e.declare(0),i=e.declare(0),o=0;for(e.code(n+" = errors.length"),e.code(r+" = 0");o<e.schema.oneOf.length;o++)e.code(i+" = errors.length"),e.greedy=!0,e.descend(e.path,e.schema.oneOf[o]),e.code("if (errors.length === "+i+") {")(r+"++")("}");e.greedy=t,e.code("if ("+r+" !== 1) {"),e.error("oneOf"),e.code("} else {")("errors.length = "+n)("}")}},S.not=function(e){if("object"===s(e.schema.not)){var t=e.greedy,r=e.declare(0);e.code(r+" = errors.length"),e.greedy=!0,e.descend(e.path,e.schema.not),e.greedy=t,e.code("if (errors.length === "+r+") {"),e.error("not"),e.code("} else {")("errors.length = "+r)("}")}},["minimum","exclusiveMinimum","maximum","exclusiveMaximum","multipleOf"].forEach(h.bind(null,"number")),["minLength","maxLength","pattern","format"].forEach(h.bind(null,"string")),["minItems","maxItems","additionalItems","uniqueItems","items"].forEach(h.bind(null,"array")),["maxProperties","minProperties","required","properties","patternProperties","additionalProperties","dependencies"].forEach(h.bind(null,"object")),["enum","allOf","anyOf","oneOf","not"].forEach(h.bind(null,null)),l.prototype.mark=function(e,t){var r,n=this.objects.indexOf(e);return n<0?(this.objects.push(e),r={},r[t]=1,void this.properties.push(r)):(r=this.properties[n],void(r[t]=r[t]?r[t]+1:1))},l.prototype.deleteDuplicates=function(){var e,t,r,n,i;for(n=0;n<this.properties.length;n++)for(e=this.properties[n],t=Object.keys(e),i=0;i<t.length;i++)r=t[i],e[r]>1&&delete this.objects[n][r]},l.prototype.dispose=function(){this.objects.length=0,this.properties.length=0},d.prototype.clone=function(e){var t=new d({schema:e,formats:this.formats,greedy:this.greedy,resolver:this.resolver,id:this.id,funcache:this.funcache,scope:this.scope});return t},d.prototype.declare=function(e){var t=this.id();return this.code.def(t,e),t},d.prototype.cache=function(e,t){var r,n=this.funcache[e];return n||(n=this.funcache[e]={key:this.id()},r=this.clone(t),n.func=r.compile(n.key),this.scope.refs[n.key]=n.func,r.dispose()),"refs."+n.key},d.prototype.error=function(e,t,r){var n=this.schema,o=this.path,s="data"!==o||t?'(path ? path + "." : "") + '+f(o,t)+",":"path,",a=t&&n.properties&&n.properties[t]?this.resolver.resolve(n.properties[t]):null,h=a?a.requiredMessage:n.invalidMessage;h||(h=a&&a.messages&&a.messages[e]||n.messages&&n.messages[e]),this.code("errors.push({"),h&&this.code("message: "+i(h)+","),r&&this.code("additionalProperties: "+r+","),this.code("path: "+s)("keyword: "+i(e))("})"),this.greedy||this.code("return")},d.prototype.refactor=function(e,t,r){var n="data"!==e?'(path ? path + "." : "") + '+f(e):"path",i=this.cache(r,t),o=this.declare();this.code(o+" = "+i+"("+e+", "+n+", errors)"),this.greedy||this.code("if (errors.length) { return }")},d.prototype.descend=function(e,t){var r=this.path,n=this.schema;this.path=e,this.schema=t,this.generate(),this.path=r,this.schema=n},d.prototype.generate=function(){function e(e){S[e](m)}var t,r,o,a,h,f,p,u=this.path,l=this.schema,m=this,d=this.scope;if("object"===s(l)){if(void 0!==l.$ref){if(l=this.resolver.resolve(l),this.resolver.hasRef(l))return void this.refactor(u,l,this.resolver.getNormalizedRef(this.schema)||this.schema.$ref);this.schema=l}if(o=c(l),o["enum"])return void S["enum"](m);for(a=Object.keys(o.perType),p=0;p<a.length;p++)f=a[p],this.code((p?"else ":"")+"if ("+F[f](u)+") {"),o.perType[f].forEach(e),this.code("}"),o.type&&(h=o.type.indexOf(f),h>-1&&o.type.splice(h,1));o.type&&(o.type.length?(this.code((a.length?"else ":"")+"if (!("+o.type.map(function(e){return F[e]?F[e](u):"true"}).join(" || ")+")) {"),this.error("type"),this.code("}")):(this.code("else {"),this.error("type"),this.code("}"))),o.allType.forEach(function(e){S[e](m)}),l.format&&this.formats&&(r=this.formats[l.format],r&&("string"==typeof r||r instanceof RegExp?(this.code("if (!("+n(r)+").test("+u+")) {"),this.error("format"),this.code("}")):"function"==typeof r&&((d.formats||(d.formats={}))[l.format]=r,(d.schemas||(d.schemas={}))[l.format]=l,t=i(l.format),this.code("if (!formats["+t+"]("+u+", schemas["+t+"])) {"),this.error("format"),this.code("}"))))}},d.prototype.compile=function(e){return this.code=A("jsen_compiled"+(e?"_"+e:""),"data","path","errors"),this.generate(),this.code.compile(this.scope)},d.prototype.dispose=function(){for(var e in this)this[e]=void 0},y.browser=j,y.clone=p,y.equal=w,y.unique=I,y.ucs2length=k,y.SchemaResolver=$,y.resolve=$.resolvePointer,e.exports=y},function(e,t){"use strict";e.exports=function(){var e=Array.apply(null,arguments),t=e.shift(),r=" ",n="",i="",o=1,s="{[",a="}]",h=function(){for(var e=r,t=0;t++<o-1;)e+=r;return e},c=function(e){n+=h()+e+"\n"},f=function(e){var t=e[0],r=e[e.length-1];return a.indexOf(t)>-1&&s.indexOf(r)>-1?(o--,c(e),o++):s.indexOf(r)>-1?(c(e),o++):a.indexOf(t)>-1?(o--,c(e)):c(e),f};return f.def=function(e,t){return i+=(i?",\n"+r+" ":"")+e+(void 0!==t?" = "+t:""),f},f.toSource=function(){return"function "+t+"("+e.join(", ")+") {\n"+r+'"use strict"\n'+(i?r+"var "+i+";\n":"")+n+"}"},f.compile=function(e){var t="return ("+f.toSource()+")",r=e||{},n=Object.keys(r),i=n.map(function(e){return r[e]});return Function.apply(null,n.concat(t)).apply(null,i)},f}},function(e,t){"use strict";function r(e){var t=Object.prototype.toString.call(e);return t.substr(8,t.length-9).toLowerCase()}function n(e,t){var r,n,o=Object.keys(e).sort(),s=Object.keys(t).sort();if(!i(o,s))return!1;for(r=0;r<o.length;r++)if(n=o[r],!i(e[n],t[n]))return!1;return!0}function i(e,t){var o,s=typeof e,a=typeof t;if("object"===s&&(s=r(e)),"object"===a&&(a=r(t)),s!==a)return!1;if("object"===s)return n(e,t);if("regexp"===s)return e.toString()===t.toString();if("array"===s){if(e.length!==t.length)return!1;for(o=0;o<e.length;o++)if(!i(e[o],t[o]))return!1;return!0}return e===t}e.exports=i},function(e,t,r){"use strict";function n(e,t,r){for(var n=0,i=e.length;n<i;n++)if(r(e[n],t))return n;return-1}var i=r(11);e.exports=function(e){return e.filter(function(e,t,r){return n(r,e,i)===t})},e.exports.findIndex=n},function(e,t,r){"use strict";function n(e,t){if(!t.length)return e;var r,i=t.shift();e&&"object"==typeof e&&e.hasOwnProperty(i)&&(r=e[i]);{if(!t.length)return r;if(r&&"object"==typeof r)return n(r,t)}}function i(e){var t=e.indexOf("#"),r={base:e.substr(0,t),path:[]};return t<0?(r.base=e,r):(e=e.substr(t+1))?(r.path=e.split("/").map(function(e){return decodeURIComponent(e).replace(/~1/g,"/").replace(/~0/g,"~")}),"/"===e[0]&&r.path.shift(),r):r}function o(e,t,r,n){this.rootSchema=e,this.resolvers=null,this.resolvedRootSchema=null,this.cache={},this.idCache={},this.refCache={refs:[],schemas:[]},this.missing$Ref=r,this.refStack=[],n=n||"",this._buildIdCache(e,n),n=this.refCache.refs[this.refCache.schemas.indexOf(this.rootSchema)]||n,this._buildResolvers(t,n)}var s=r(14),a=r(20),h="jsen: invalid schema reference",c="jsen: duplicate schema id",f="jsen: circular schema reference";o.prototype._cacheId=function(e,t,r){if(this.idCache[e])throw new Error(c+" "+e);this.idCache[e]={resolver:r,schema:t}},o.prototype._buildIdCache=function(e,t){var r,n,i,o=t;if(e&&"object"==typeof e)for("string"==typeof e.id&&e.id?(o=s.resolve(t,e.id),this._cacheId(o,e,this)):e===this.rootSchema&&t&&this._cacheId(t,e,this),e.$ref&&"string"==typeof e.$ref&&(r=s.resolve(o,e.$ref),this.refCache.schemas.push(e),this.refCache.refs.push(r)),n=Object.keys(e),i=0;i<n.length;i++)this._buildIdCache(e[n[i]],o)},o.prototype._buildResolvers=function(e,t){if(e&&"object"==typeof e){var r=this,n={};Object.keys(e).forEach(function(i){var a=s.resolve(t,i),h=new o(e[i],null,r.missing$Ref,a);r._cacheId(a,h.rootSchema,h),Object.keys(h.idCache).forEach(function(e){r.idCache[e]=h.idCache[e]}),n[i]=h}),this.resolvers=n}},o.prototype.getNormalizedRef=function(e){var t=this.refCache.schemas.indexOf(e);return this.refCache.refs[t]},o.prototype._resolveRef=function(e){var t,r,o,s,c,f=new Error(h+" "+e),p=this.idCache;if(!e||"string"!=typeof e)throw f;if(e===a.id&&(c=a),r=p[e],r&&(c=r.resolver.resolve(r.schema)),void 0===c&&(o=i(e),s=o.path,o.base&&(r=p[o.base]||p[o.base+"#"],r?c=r.resolver.resolve(n(r.schema,s.slice(0))):s.unshift(o.base))),void 0===c&&this.resolvedRootSchema&&(c=n(this.resolvedRootSchema,s.slice(0))),void 0===c&&(c=n(this.rootSchema,s.slice(0))),void 0===c&&s.length&&this.resolvers&&(t=n(this.resolvers,s),t&&(c=t.resolve(t.rootSchema))),void 0===c||"object"!=typeof c){if(!this.missing$Ref)throw f;c={}}return this.cache[e]===c?c:(this.cache[e]=c,void 0!==c.$ref&&(c=this.resolve(c)),c)},o.prototype.resolve=function(e){if(!e||"object"!=typeof e||void 0===e.$ref)return e;var t=this.getNormalizedRef(e)||e.$ref,r=this.cache[t];if(void 0!==r)return r;if(this.refStack.indexOf(t)>-1)throw new Error(f+" "+t);return this.refStack.push(t),r=this._resolveRef(t),this.refStack.pop(),e===this.rootSchema&&(this.resolvedRootSchema=r),r},o.prototype.hasRef=function(e){var t,r,n,i,o=Object.keys(e);if(o.indexOf("$ref")>-1)return!0;for(n=0,t=o.length;n<t;n++)if(r=o[n],e[r]&&"object"==typeof e[r]&&!Array.isArray(e[r])&&(i=this.hasRef(e[r])))return!0;return!1},o.resolvePointer=function(e,t){var r=i(t),o=r.path;return r.base&&(o=[r.base].concat(o)),n(e,o)},e.exports=o},function(e,t,r){function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function i(e,t,r){if(e&&c(e)&&e instanceof n)return e;var i=new n;return i.parse(e,t,r),i}function o(e){return h(e)&&(e=i(e)),e instanceof n?e.format():n.prototype.format.call(e)}function s(e,t){return i(e,!1,!0).resolve(t)}function a(e,t){return e?i(e,!1,!0).resolveObject(t):t}function h(e){return"string"==typeof e}function c(e){return"object"==typeof e&&null!==e}function f(e){return null===e}function p(e){return null==e}
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
var u=r(15);t.parse=i,t.resolve=s,t.resolveObject=a,t.format=o,t.Url=n;var l=/^([a-z0-9.+-]+:)/i,m=/:[0-9]*$/,d=["<",">",'"',"`"," ","\r","\n","\t"],y=["{","}","|","\\","^","`"].concat(d),g=["'"].concat(y),v=["%","/","?",";","#"].concat(g),b=["/","?","#"],x=255,j=/^[a-z0-9A-Z_-]{0,63}$/,O=/^([a-z0-9A-Z_-]{0,63})(.*)$/,A={javascript:!0,"javascript:":!0},w={javascript:!0,"javascript:":!0},I={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},$=r(17);n.prototype.parse=function(e,t,r){if(!h(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e;n=n.trim();var i=l.exec(n);if(i){i=i[0];var o=i.toLowerCase();this.protocol=o,n=n.substr(i.length)}if(r||i||n.match(/^\/\/[^@\/]+@[^@\/]+/)){var s="//"===n.substr(0,2);!s||i&&w[i]||(n=n.substr(2),this.slashes=!0)}if(!w[i]&&(s||i&&!I[i])){for(var a=-1,c=0;c<b.length;c++){var f=n.indexOf(b[c]);f!==-1&&(a===-1||f<a)&&(a=f)}var p,m;m=a===-1?n.lastIndexOf("@"):n.lastIndexOf("@",a),m!==-1&&(p=n.slice(0,m),n=n.slice(m+1),this.auth=decodeURIComponent(p)),a=-1;for(var c=0;c<v.length;c++){var f=n.indexOf(v[c]);f!==-1&&(a===-1||f<a)&&(a=f)}a===-1&&(a=n.length),this.host=n.slice(0,a),n=n.slice(a),this.parseHost(),this.hostname=this.hostname||"";var d="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!d)for(var y=this.hostname.split(/\./),c=0,q=y.length;c<q;c++){var k=y[c];if(k&&!k.match(j)){for(var F="",S=0,C=k.length;S<C;S++)F+=k.charCodeAt(S)>127?"x":k[S];if(!F.match(j)){var P=y.slice(0,c),R=y.slice(c+1),E=k.match(O);E&&(P.push(E[1]),R.unshift(E[2])),R.length&&(n="/"+R.join(".")+n),this.hostname=P.join(".");break}}}if(this.hostname.length>x?this.hostname="":this.hostname=this.hostname.toLowerCase(),!d){for(var T=this.hostname.split("."),z=[],c=0;c<T.length;++c){var L=T[c];z.push(L.match(/[^A-Za-z0-9_-]/)?"xn--"+u.encode(L):L)}this.hostname=z.join(".")}var U=this.port?":"+this.port:"",Z=this.hostname||"";this.host=Z+U,this.href+=this.host,d&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==n[0]&&(n="/"+n))}if(!A[o])for(var c=0,q=g.length;c<q;c++){var M=g[c],_=encodeURIComponent(M);_===M&&(_=escape(M)),n=n.split(M).join(_)}var N=n.indexOf("#");N!==-1&&(this.hash=n.substr(N),n=n.slice(0,N));var D=n.indexOf("?");if(D!==-1?(this.search=n.substr(D),this.query=n.substr(D+1),t&&(this.query=$.parse(this.query)),n=n.slice(0,D)):t&&(this.search="",this.query={}),n&&(this.pathname=n),I[o]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var U=this.pathname||"",L=this.search||"";this.path=U+L}return this.href=this.format(),this},n.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,o="";this.host?i=e+this.host:this.hostname&&(i=e+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&c(this.query)&&Object.keys(this.query).length&&(o=$.stringify(this.query));var s=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||I[t])&&i!==!1?(i="//"+(i||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):i||(i=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),r=r.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),s=s.replace("#","%23"),t+i+r+s+n},n.prototype.resolve=function(e){return this.resolveObject(i(e,!1,!0)).format()},n.prototype.resolveObject=function(e){if(h(e)){var t=new n;t.parse(e,!1,!0),e=t}var r=new n;if(Object.keys(this).forEach(function(e){r[e]=this[e]},this),r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol)return Object.keys(e).forEach(function(t){"protocol"!==t&&(r[t]=e[t])}),I[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r;if(e.protocol&&e.protocol!==r.protocol){if(!I[e.protocol])return Object.keys(e).forEach(function(t){r[t]=e[t]}),r.href=r.format(),r;if(r.protocol=e.protocol,e.host||w[e.protocol])r.pathname=e.pathname;else{for(var i=(e.pathname||"").split("/");i.length&&!(e.host=i.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==i[0]&&i.unshift(""),i.length<2&&i.unshift(""),r.pathname=i.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var o=r.pathname||"",s=r.search||"";r.path=o+s}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var a=r.pathname&&"/"===r.pathname.charAt(0),c=e.host||e.pathname&&"/"===e.pathname.charAt(0),u=c||a||r.host&&e.pathname,l=u,m=r.pathname&&r.pathname.split("/")||[],i=e.pathname&&e.pathname.split("/")||[],d=r.protocol&&!I[r.protocol];if(d&&(r.hostname="",r.port=null,r.host&&(""===m[0]?m[0]=r.host:m.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===i[0]?i[0]=e.host:i.unshift(e.host)),e.host=null),u=u&&(""===i[0]||""===m[0])),c)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,m=i;else if(i.length)m||(m=[]),m.pop(),m=m.concat(i),r.search=e.search,r.query=e.query;else if(!p(e.search)){if(d){r.hostname=r.host=m.shift();var y=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");y&&(r.auth=y.shift(),r.host=r.hostname=y.shift())}return r.search=e.search,r.query=e.query,f(r.pathname)&&f(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!m.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var g=m.slice(-1)[0],v=(r.host||e.host)&&("."===g||".."===g)||""===g,b=0,x=m.length;x>=0;x--)g=m[x],"."==g?m.splice(x,1):".."===g?(m.splice(x,1),b++):b&&(m.splice(x,1),b--);if(!u&&!l)for(;b--;b)m.unshift("..");!u||""===m[0]||m[0]&&"/"===m[0].charAt(0)||m.unshift(""),v&&"/"!==m.join("/").substr(-1)&&m.push("");var j=""===m[0]||m[0]&&"/"===m[0].charAt(0);if(d){r.hostname=r.host=j?"":m.length?m.shift():"";var y=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");y&&(r.auth=y.shift(),r.host=r.hostname=y.shift())}return u=u||r.host&&m.length,u&&!j&&m.unshift(""),m.length?r.pathname=m.join("/"):(r.pathname=null,r.path=null),f(r.pathname)&&f(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var e=this.host,t=m.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,r){var n;(function(e,i){!function(o){function s(e){throw RangeError(P[e])}function a(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function h(e,t){var r=e.split("@"),n="";r.length>1&&(n=r[0]+"@",e=r[1]),e=e.replace(C,".");var i=e.split("."),o=a(i,t).join(".");return n+o}function c(e){for(var t,r,n=[],i=0,o=e.length;i<o;)t=e.charCodeAt(i++),t>=55296&&t<=56319&&i<o?(r=e.charCodeAt(i++),56320==(64512&r)?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--)):n.push(t);return n}function f(e){return a(e,function(e){var t="";return e>65535&&(e-=65536,t+=T(e>>>10&1023|55296),e=56320|1023&e),t+=T(e)}).join("")}function p(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:j}function u(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function l(e,t,r){var n=0;for(e=r?E(e/I):e>>1,e+=E(e/t);e>R*A>>1;n+=j)e=E(e/R);return E(n+(R+1)*e/(e+w))}function m(e){var t,r,n,i,o,a,h,c,u,m,d=[],y=e.length,g=0,v=q,b=$;for(r=e.lastIndexOf(k),r<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&s("not-basic"),d.push(e.charCodeAt(n));for(i=r>0?r+1:0;i<y;){for(o=g,a=1,h=j;i>=y&&s("invalid-input"),c=p(e.charCodeAt(i++)),(c>=j||c>E((x-g)/a))&&s("overflow"),g+=c*a,u=h<=b?O:h>=b+A?A:h-b,!(c<u);h+=j)m=j-u,a>E(x/m)&&s("overflow"),a*=m;t=d.length+1,b=l(g-o,t,0==o),E(g/t)>x-v&&s("overflow"),v+=E(g/t),g%=t,d.splice(g++,0,v)}return f(d)}function d(e){var t,r,n,i,o,a,h,f,p,m,d,y,g,v,b,w=[];for(e=c(e),y=e.length,t=q,r=0,o=$,a=0;a<y;++a)d=e[a],d<128&&w.push(T(d));for(n=i=w.length,i&&w.push(k);n<y;){for(h=x,a=0;a<y;++a)d=e[a],d>=t&&d<h&&(h=d);for(g=n+1,h-t>E((x-r)/g)&&s("overflow"),r+=(h-t)*g,t=h,a=0;a<y;++a)if(d=e[a],d<t&&++r>x&&s("overflow"),d==t){for(f=r,p=j;m=p<=o?O:p>=o+A?A:p-o,!(f<m);p+=j)b=f-m,v=j-m,w.push(T(u(m+b%v,0))),f=E(b/v);w.push(T(u(f,0))),o=l(r,g,n==i),r=0,++n}++r,++t}return w.join("")}function y(e){return h(e,function(e){return F.test(e)?m(e.slice(4).toLowerCase()):e})}function g(e){return h(e,function(e){return S.test(e)?"xn--"+d(e):e})}var v=("object"==typeof t&&t&&!t.nodeType&&t,"object"==typeof e&&e&&!e.nodeType&&e,"object"==typeof i&&i);v.global!==v&&v.window!==v&&v.self!==v||(o=v);var b,x=2147483647,j=36,O=1,A=26,w=38,I=700,$=72,q=128,k="-",F=/^xn--/,S=/[^\x20-\x7E]/,C=/[\x2E\u3002\uFF0E\uFF61]/g,P={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},R=j-O,E=Math.floor,T=String.fromCharCode;b={version:"1.3.2",ucs2:{decode:c,encode:f},decode:m,encode:d,toASCII:g,toUnicode:y},n=function(){return b}.call(t,r,t,e),!(void 0!==n&&(e.exports=n))}(this)}).call(t,r(16)(e),function(){return this}())},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,r){"use strict";t.decode=t.parse=r(18),t.encode=t.stringify=r(19)},function(e,t){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,i){t=t||"&",n=n||"=";var o={};if("string"!=typeof e||0===e.length)return o;var s=/\+/g;e=e.split(t);var a=1e3;i&&"number"==typeof i.maxKeys&&(a=i.maxKeys);var h=e.length;a>0&&h>a&&(h=a);for(var c=0;c<h;++c){var f,p,u,l,m=e[c].replace(s,"%20"),d=m.indexOf(n);d>=0?(f=m.substr(0,d),p=m.substr(d+1)):(f=m,p=""),u=decodeURIComponent(f),l=decodeURIComponent(p),r(o,u)?Array.isArray(o[u])?o[u].push(l):o[u]=[o[u],l]:o[u]=l}return o}},function(e,t){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,i){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map(function(i){var o=encodeURIComponent(r(i))+n;return Array.isArray(e[i])?e[i].map(function(e){return o+encodeURIComponent(r(e))}).join(t):o+encodeURIComponent(r(e[i]))}).join(t):i?encodeURIComponent(r(i))+n+encodeURIComponent(r(e)):""}},function(e,t){e.exports={id:"http://json-schema.org/draft-04/schema#",$schema:"http://json-schema.org/draft-04/schema#",description:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{"default":0}]},simpleTypes:{"enum":["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},"default":{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean","default":!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean","default":!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],"default":{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],"default":{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean","default":!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],"default":{}},definitions:{type:"object",additionalProperties:{$ref:"#"},"default":{}},properties:{type:"object",additionalProperties:{$ref:"#"},"default":{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},"default":{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},"enum":{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},"default":{}}},function(e,t){"use strict";var r={};r["date-time"]=/(\d\d\d\d)(-)?(\d\d)(-)?(\d\d)(T)?(\d\d)(:)?(\d\d)(:)?(\d\d)(\.\d+)?(Z|([+-])(\d\d)(:)?(\d\d))/,r.uri=/^([a-zA-Z][a-zA-Z0-9+-.]*:){0,1}\/\/[^\s]*$/,r.email=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,r.ipv4=/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,r.ipv6=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|[fF][eE]80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::([fF]{4}(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,r.hostname=/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]))*$/,e.exports=r},function(e,t){"use strict";function r(e){for(var t,r,n=0,i=0,o=e.length;i<o;)n++,t=e.charCodeAt(i++),t>=55296&&t<=56319&&i<o&&(r=e.charCodeAt(i++),56320!==(64512&r)&&i--);return n}e.exports=r}])});
{
"name": "powerbi-models",
"version": "0.9.1",
"version": "0.10.0",
"description": "Contains JavaScript &amp; TypeScript object models for Microsoft Power BI JavaScript SDK. For each model there is a TypeScript interface, a json schema definitions, and a validation function to ensure and object is valid.",

@@ -5,0 +5,0 @@ "main": "dist/models.js",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc