remark-frontmatter.min.js 4.6 KB

1
  1. !function(b,a){typeof exports==='object'&&typeof module!=='undefined'?module.exports=b():typeof define==='function'&&define.amd?define([],b):(typeof window!=='undefined'?a=window:typeof global!=='undefined'?a=global:typeof self!=='undefined'?a=self:a=this,a.remarkFrontmatter=b())}(function(){return function a(b,c,e){function f(d,k){if(!c[d]){if(!b[d]){var i=typeof require=='function'&&require;if(!k&&i)return i(d,!0);if(g)return g(d,!0);var j=new Error("Cannot find module '"+d+"'");throw j.code='MODULE_NOT_FOUND',j}var h=c[d]={exports:{}};b[d][0].call(h.exports,function(c){var a=b[d][1][c];return f(a?a:c)},h,h.exports,a,b,c,e)}return c[d].exports}var g=typeof require=='function'&&require;for(var d=0;d<e.length;d++)f(e[d]);return f}({1:[function(a,l,m){'use strict';function k(e){var a=this.Parser,b=this.Compiler,c=d(e||['yaml']);i(a)&&h(a,c),j(b)&&g(b,c)}function h(h,i){var a=h.prototype,d=c(f,i),e=[],g;for(g in d)e.push(g);a.blockMethods=e.concat(a.blockMethods),a.blockTokenizers=b(d,a.blockTokenizers)}function g(d,f){var a=d.prototype;a.visitors=b(c(e,f),a.visitors)}function c(f,d){var a={},e=d.length,b=-1,c;while(++b<e)c=f(d[b]),a[c[0]]=c[1];return a}function i(a){return Boolean(a&&a.prototype&&a.prototype.blockTokenizers)}function j(a){return Boolean(a&&a.prototype&&a.prototype.visitors)}var b=a('xtend'),d=a('./lib/matters'),f=a('./lib/parse'),e=a('./lib/compile');l.exports=k},{'./lib/compile':2,'./lib/matters':4,'./lib/parse':5,xtend:8}],2:[function(b,c,e){'use strict';function d(b){function d(a){return e+(a.value?'\n'+a.value:'')+'\n'+f}var c=b.type,e=a(b,'open'),f=a(b,'close');return d.displayName=c+'FrontMatter',[c,d]}var a=b('./fence');c.exports=d},{'./fence':3}],3:[function(d,b,e){'use strict';function c(c,d){var b;return c.marker?(b=a(c.marker,d),b+b+b):a(c.fence,d)}function a(a,b){return typeof a==='string'?a:a[b]}b.exports=c},{}],4:[function(d,e,h){'use strict';function f(a){var c=[],b=-1,d;(typeof a==='string'||!('length'in a))&&(a=[a]),d=a.length;while(++b<d)c[b]=g(a[b]);return c}function g(e){var d=e;if(typeof d==='string'){if(!b.call(c,d))throw a('Missing matter definition for `%s`',d);d={type:d,marker:c[d]}}else if(typeof d!=='object')throw a('Expected matter to be an object, not `%j`',d);if(!b.call(d,'type'))throw a('Missing `type` in matter `%j`',d);if(!(b.call(d,'fence')||b.call(d,'marker')))throw a('Missing `marker` or `fence` in matter `%j`',d);return d}var a=d('fault');e.exports=f;var b={}.hasOwnProperty,c={yaml:'-',toml:'+'}},{fault:6}],5:[function(b,c,e){'use strict';function d(c){function e(h,e,i){var f=d.length,a;if(e.slice(0,f)!==d||e.charAt(f)!==g)return;a=e.indexOf(b,f);while(a!==-1&&e.charAt(a-1)!==g)f=a+b.length,a=e.indexOf(b,f);return a!==-1?i?!0:h(e.slice(0,a+b.length))({type:c.type,value:e.slice(d.length+1,a-1)}):void 0}var f=c.type+'FrontMatter',d=a(c,'open'),b=a(c,'close'),g='\n';return e.displayName=f,e.onlyAtStart=!0,[f,e]}var a=b('./fence');c.exports=d},{'./fence':3}],6:[function(d,e,f){'use strict';function b(a){function b(b){return b&&(b=c.apply(null,arguments)),new a(b)}return b.displayName=a.displayName||a.name,b}var c=d('format'),a=b(Error);e.exports=a,a.eval=b(EvalError),a.range=b(RangeError),a.reference=b(ReferenceError),a.syntax=b(SyntaxError),a.type=b(TypeError),a.uri=b(URIError),a.create=b},{format:7}],7:[function(b,a,c){!function(b){function d(){console.log(c.apply(null,arguments))}function e(a,b){return c.apply(null,[a].concat(b))}function c(e){var k=1,l=[].slice.call(arguments),b=0,j=e.length,a='',c,h=!1,f,i,g=!1,m,d=function(){return l[k++]},n=function(){var a='';while(/\d/.test(e[b]))a+=e[b++],c=e[b];return a.length>0?parseInt(a):null};for(;b<j;++b)if(c=e[b],h){h=!1,c=='.'?(g=!1,c=e[++b]):c=='0'&&e[b+1]=='.'?(g=!0,b+=2,c=e[b]):g=!0,m=n();switch(c){case'b':a+=parseInt(d(),10).toString(2);break;case'c':f=d();typeof f==='string'||f instanceof String?a+=f:a+=String.fromCharCode(parseInt(f,10));break;case'd':a+=parseInt(d(),10);break;case'f':i=String(parseFloat(d()).toFixed(m||6));a+=g?i:i.replace(/^0/,'');break;case'j':a+=JSON.stringify(d());break;case'o':a+='0'+parseInt(d(),10).toString(8);break;case's':a+=d();break;case'x':a+='0x'+parseInt(d(),10).toString(16);break;case'X':a+='0x'+parseInt(d(),10).toString(16).toUpperCase();break;default:a+=c;break}}else c==='%'?h=!0:a+=c;return a}a!==void 0?b=a.exports=c:b=function(){return this||(1,eval)('this')}(),b.format=c,b.vsprintf=e,typeof console!=='undefined'&&typeof console.log==='function'&&(b.printf=d)}()},{}],8:[function(d,b,e){function c(){var e={};for(var b=0;b<arguments.length;b++){var c=arguments[b];for(var d in c)a.call(c,d)&&(e[d]=c[d])}return e}b.exports=c;var a=Object.prototype.hasOwnProperty},{}]},{},[1])(1)})