/**
 * Skipped minification because the original files appears to be already minified.
 * Original file: /npm/vue-blox-mustache@0.4.2/dist/vue-blox-mustache.umd.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
(function(P,M){typeof exports=="object"&&typeof module<"u"?M(exports):typeof define=="function"&&define.amd?define(["exports"],M):(P=typeof globalThis<"u"?globalThis:P||self,M(P["vue-blox-mustache"]={}))})(this,function(P){"use strict";var M=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},_={},G={get exports(){return _},set exports(q){_=q}};(function(q,l){(function(E,y){q.exports=y()})(M,function(){/*!
 * mustache.js - Logic-less {{mustache}} templates with JavaScript
 * http://github.com/janl/mustache.js
 */var E=Object.prototype.toString,y=Array.isArray||function(e){return E.call(e)==="[object Array]"};function j(n){return typeof n=="function"}function h(n){return y(n)?"array":typeof n}function g(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function k(n,e){return n!=null&&typeof n=="object"&&e in n}function U(n,e){return n!=null&&typeof n!="object"&&n.hasOwnProperty&&n.hasOwnProperty(e)}var $=RegExp.prototype.test;function m(n,e){return $.call(n,e)}var z=/\S/;function J(n){return!m(z,n)}var L={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};function Q(n){return String(n).replace(/[&<>"'`=\/]/g,function(t){return L[t]})}var X=/\s*/,Y=/\s+/,N=/\s*=/,Z=/\s*\}/,ee=/#|\^|\/|>|\{|&|=|!/;function te(n,e){if(!n)return[];var t=!1,r=[],s=[],a=[],i=!1,o=!1,u="",c=0;function d(){if(i&&!o)for(;a.length;)delete s[a.pop()];else a=[];i=!1,o=!1}var C,R,F;function D(S){if(typeof S=="string"&&(S=S.split(Y,2)),!y(S)||S.length!==2)throw new Error("Invalid tags: "+S);C=new RegExp(g(S[0])+"\\s*"),R=new RegExp("\\s*"+g(S[1])),F=new RegExp("\\s*"+g("}"+S[1]))}D(e||w.tags);for(var f=new O(n),T,v,b,W,V,x;!f.eos();){if(T=f.pos,b=f.scanUntil(C),b)for(var B=0,se=b.length;B<se;++B)W=b.charAt(B),J(W)?(a.push(s.length),u+=W):(o=!0,t=!0,u+=" "),s.push(["text",W,T,T+1]),T+=1,W===`
`&&(d(),u="",c=0,t=!1);if(!f.scan(C))break;if(i=!0,v=f.scan(ee)||"name",f.scan(X),v==="="?(b=f.scanUntil(N),f.scan(N),f.scanUntil(R)):v==="{"?(b=f.scanUntil(F),f.scan(Z),f.scanUntil(R),v="&"):b=f.scanUntil(R),!f.scan(R))throw new Error("Unclosed tag at "+f.pos);if(v==">"?V=[v,b,T,f.pos,u,c,t]:V=[v,b,T,f.pos],c++,s.push(V),v==="#"||v==="^")r.push(V);else if(v==="/"){if(x=r.pop(),!x)throw new Error('Unopened section "'+b+'" at '+T);if(x[1]!==b)throw new Error('Unclosed section "'+x[1]+'" at '+T)}else v==="name"||v==="{"||v==="&"?o=!0:v==="="&&D(b)}if(d(),x=r.pop(),x)throw new Error('Unclosed section "'+x[1]+'" at '+f.pos);return ne(re(s))}function re(n){for(var e=[],t,r,s=0,a=n.length;s<a;++s)t=n[s],t&&(t[0]==="text"&&r&&r[0]==="text"?(r[1]+=t[1],r[3]=t[3]):(e.push(t),r=t));return e}function ne(n){for(var e=[],t=e,r=[],s,a,i=0,o=n.length;i<o;++i)switch(s=n[i],s[0]){case"#":case"^":t.push(s),r.push(s),t=s[4]=[];break;case"/":a=r.pop(),a[5]=s[2],t=r.length>0?r[r.length-1][4]:e;break;default:t.push(s)}return e}function O(n){this.string=n,this.tail=n,this.pos=0}O.prototype.eos=function(){return this.tail===""},O.prototype.scan=function(e){var t=this.tail.match(e);if(!t||t.index!==0)return"";var r=t[0];return this.tail=this.tail.substring(r.length),this.pos+=r.length,r},O.prototype.scanUntil=function(e){var t=this.tail.search(e),r;switch(t){case-1:r=this.tail,this.tail="";break;case 0:r="";break;default:r=this.tail.substring(0,t),this.tail=this.tail.substring(t)}return this.pos+=r.length,r};function A(n,e){this.view=n,this.cache={".":this.view},this.parent=e}A.prototype.push=function(e){return new A(e,this)},A.prototype.lookup=function(e){var t=this.cache,r;if(t.hasOwnProperty(e))r=t[e];else{for(var s=this,a,i,o,u=!1;s;){if(e.indexOf(".")>0)for(a=s.view,i=e.split("."),o=0;a!=null&&o<i.length;)o===i.length-1&&(u=k(a,i[o])||U(a,i[o])),a=a[i[o++]];else a=s.view[e],u=k(s.view,e);if(u){r=a;break}s=s.parent}t[e]=r}return j(r)&&(r=r.call(this.view)),r};function p(){this.templateCache={_cache:{},set:function(e,t){this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}p.prototype.clearCache=function(){typeof this.templateCache<"u"&&this.templateCache.clear()},p.prototype.parse=function(e,t){var r=this.templateCache,s=e+":"+(t||w.tags).join(":"),a=typeof r<"u",i=a?r.get(s):void 0;return i==null&&(i=te(e,t),a&&r.set(s,i)),i},p.prototype.render=function(e,t,r,s){var a=this.getConfigTags(s),i=this.parse(e,a),o=t instanceof A?t:new A(t,void 0);return this.renderTokens(i,o,r,e,s)},p.prototype.renderTokens=function(e,t,r,s,a){for(var i="",o,u,c,d=0,C=e.length;d<C;++d)c=void 0,o=e[d],u=o[0],u==="#"?c=this.renderSection(o,t,r,s,a):u==="^"?c=this.renderInverted(o,t,r,s,a):u===">"?c=this.renderPartial(o,t,r,a):u==="&"?c=this.unescapedValue(o,t):u==="name"?c=this.escapedValue(o,t,a):u==="text"&&(c=this.rawValue(o)),c!==void 0&&(i+=c);return i},p.prototype.renderSection=function(e,t,r,s,a){var i=this,o="",u=t.lookup(e[1]);function c(R){return i.render(R,t,r,a)}if(u){if(y(u))for(var d=0,C=u.length;d<C;++d)o+=this.renderTokens(e[4],t.push(u[d]),r,s,a);else if(typeof u=="object"||typeof u=="string"||typeof u=="number")o+=this.renderTokens(e[4],t.push(u),r,s,a);else if(j(u)){if(typeof s!="string")throw new Error("Cannot use higher-order sections without the original template");u=u.call(t.view,s.slice(e[3],e[5]),c),u!=null&&(o+=u)}else o+=this.renderTokens(e[4],t,r,s,a);return o}},p.prototype.renderInverted=function(e,t,r,s,a){var i=t.lookup(e[1]);if(!i||y(i)&&i.length===0)return this.renderTokens(e[4],t,r,s,a)},p.prototype.indentPartial=function(e,t,r){for(var s=t.replace(/[^ \t]/g,""),a=e.split(`
`),i=0;i<a.length;i++)a[i].length&&(i>0||!r)&&(a[i]=s+a[i]);return a.join(`
`)},p.prototype.renderPartial=function(e,t,r,s){if(r){var a=this.getConfigTags(s),i=j(r)?r(e[1]):r[e[1]];if(i!=null){var o=e[6],u=e[5],c=e[4],d=i;u==0&&c&&(d=this.indentPartial(i,c,o));var C=this.parse(d,a);return this.renderTokens(C,t,r,d,s)}}},p.prototype.unescapedValue=function(e,t){var r=t.lookup(e[1]);if(r!=null)return r},p.prototype.escapedValue=function(e,t,r){var s=this.getConfigEscape(r)||w.escape,a=t.lookup(e[1]);if(a!=null)return typeof a=="number"&&s===w.escape?String(a):s(a)},p.prototype.rawValue=function(e){return e[1]},p.prototype.getConfigTags=function(e){return y(e)?e:e&&typeof e=="object"?e.tags:void 0},p.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!y(e))return e.escape};var w={name:"mustache.js",version:"4.1.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(n){I.templateCache=n},get templateCache(){return I.templateCache}},I=new p;return w.clearCache=function(){return I.clearCache()},w.parse=function(e,t){return I.parse(e,t)},w.render=function(e,t,r,s){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+h(e)+'" was given as the first argument for mustache#render(template, view, partials)');return I.render(e,t,r,s)},w.escape=Q,w.Scanner=O,w.Context=A,w.Writer=p,w})})(G);class K{run({context:l,key:E,value:y,variables:j,buildContext:h}){const g=this.evaluate(y,j,0,10);l.setProp({propName:E,value:g})}evaluate(l,E,y=0,j=10){if(typeof l=="string"&&l.includes("{{")&&l.includes("}}"))try{let h=_.render(l,E);return h.includes("{{")&&y<10&&(h=this.evaluate(h,E,y+1)),h}catch(h){throw new Error(`The call to runMustache() for value ${l} threw the error: ${h}`)}else if(typeof l=="object"&&Array.isArray(l)){const h=[];for(let g=0;g<l.length;g+=1){const k=l[g],U=this.evaluate(k,E,0);h.push(U)}return h}else if(typeof l=="object"){const h={},g=Object.keys(l);for(let k=0;k<g.length;k+=1){const U=g[k],$=l[U],m=this.evaluate($,E,0);h[U]=m}return h}return l}}function H(){return new K}P.BloxPluginMustache=K,P.getPluginMustache=H,Object.defineProperty(P,Symbol.toStringTag,{value:"Module"})});
