/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/avalara@2.8.0/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
var request=require("request"),currentAPIVersion="1.0";function Avalara(t,e,r){if("string"!=typeof t||"string"!=typeof e)throw new Error("Credentials not supplied for Avalara tax");this.accountNumber=t,this.licenseKey=e;const a="Basic "+new Buffer(this.accountNumber+":"+this.licenseKey).toString("base64");return(r=r||{}).development=r.development||!0,r.version=r.version||currentAPIVersion,this.apiOptions=function(){return{url:(r.development?"https://development.avalara.net":"https://avatax.avalara.net")+"/"+r.version+"/tax/get",method:"POST",headers:{Authorization:a}}},this.options=r,this}Avalara.prototype.basicTaxCalculator=function(t,e){var r=this.apiOptions(),a=JSON.stringify(t);r.body=a,request(r,(function(t,r,a){var n=JSON.parse(r.body);"Error"==n.ResultCode?e(n,null):e(null,n)}))},Avalara.prototype.advanceTaxCalculator=function(t,e){var r=this.apiOptions(),a=JSON.stringify(t);r.body=a,request(r,(function(t,r,a){var n=JSON.parse(r.body);"Error"==n.ResultCode?e(n,null):e(null,n)}))},module.exports=Avalara;
//# sourceMappingURL=/sm/9e2ebbfea11ce53c99d731ab3de50c119d3c10b4253d1fbca1bfcfc95166cd8e.map