@tryghost/helpers 1.1.69 → 1.1.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/helpers.js +5 -1
- package/es/helpers.js +2 -1
- package/es/helpers.js.map +1 -1
- package/lib/utils/count-words.js +5 -1
- package/package.json +4 -4
- package/umd/helpers.min.js +1 -1
- package/umd/helpers.min.js.map +1 -1
package/lib/utils/count-words.js
CHANGED
|
@@ -18,7 +18,11 @@ export default function countWords(text) {
|
|
|
18
18
|
text = text.replace(/<(.|\n)*?>/g, ' '); // strip any HTML tags
|
|
19
19
|
|
|
20
20
|
const pattern = /[a-zA-ZÀ-ÿ0-9_\u0392-\u03c9\u0410-\u04F9]+|[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af]+/g;
|
|
21
|
-
|
|
21
|
+
|
|
22
|
+
const RTLPattern = /([\u0600-\u06ff]+|[\u0591-\u05F4]+)/g;
|
|
23
|
+
|
|
24
|
+
const match = text.match(pattern) || text.match(RTLPattern);
|
|
25
|
+
|
|
22
26
|
let count = 0;
|
|
23
27
|
|
|
24
28
|
if (match === null) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tryghost/helpers",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.70",
|
|
4
4
|
"repository": "https://github.com/TryGhost/SDK/tree/master/packages/helpers",
|
|
5
5
|
"author": "Ghost Foundation",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@babel/core": "7.
|
|
34
|
+
"@babel/core": "7.18.2",
|
|
35
35
|
"@babel/polyfill": "7.12.1",
|
|
36
36
|
"c8": "7.11.3",
|
|
37
37
|
"istanbul": "0.4.5",
|
|
38
38
|
"mocha": "10.0.0",
|
|
39
|
-
"rollup": "2.
|
|
39
|
+
"rollup": "2.74.1",
|
|
40
40
|
"rollup-plugin-babel": "4.4.0",
|
|
41
41
|
"rollup-plugin-commonjs": "10.1.0",
|
|
42
42
|
"rollup-plugin-node-resolve": "5.2.0",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"lodash-es": "^4.17.11"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "f5a8a2c81a4afc3640f922ef221ea1b6ddfa216a"
|
|
51
51
|
}
|
package/umd/helpers.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("core-js/modules/es6.regexp.split.js"),require("core-js/modules/es6.regexp.replace.js"),require("core-js/modules/es6.regexp.match.js"),require("core-js/modules/es6.function.name.js"),require("core-js/modules/es6.array.slice.js")):"function"==typeof define&&define.amd?define(["exports","core-js/modules/es6.regexp.split.js","core-js/modules/es6.regexp.replace.js","core-js/modules/es6.regexp.match.js","core-js/modules/es6.function.name.js","core-js/modules/es6.array.slice.js"],r):r((t="undefined"!=typeof globalThis?globalThis:t||self).GhostHelpers={})}(this,(function(t){"use strict";function r(t){return t!=t}function e(t,e,n){return e==e?function(t,r,e){for(var n=e-1,u=t.length;++n<u;)if(t[n]===r)return n;return-1}(t,e,n):function(t,r,e,n){for(var u=t.length,o=e+(n?1:-1);n?o--:++o<u;)if(r(t[o],o,t))return o;return-1}(t,r,n)}var n="object"==typeof global&&global&&global.Object===Object&&global,u="object"==typeof self&&self&&self.Object===Object&&self,o=n||u||Function("return this")(),i=o.Symbol,a=Object.prototype,f=a.hasOwnProperty,c=a.toString,l=i?i.toStringTag:void 0;var s=Object.prototype.toString;var v=i?i.toStringTag:void 0;function p(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":v&&v in Object(t)?function(t){var r=f.call(t,l),e=t[l];try{t[l]=void 0;var n=!0}catch(t){}var u=c.call(t);return n&&(r?t[l]=e:delete t[l]),u}(t):function(t){return s.call(t)}(t)}function h(t){var r=typeof t;return null!=t&&("object"==r||"function"==r)}function d(t){if(!h(t))return!1;var r=p(t);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r}function y(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function b(t){return null!=t&&y(t.length)&&!d(t)}var g=Array.isArray;function _(t){return null!=t&&"object"==typeof t}function j(t){return"string"==typeof t||!g(t)&&_(t)&&"[object String]"==p(t)}var m=/\s/;var O=/^\s+/;function w(t){return t?t.slice(0,function(t){for(var r=t.length;r--&&m.test(t.charAt(r)););return r}(t)+1).replace(O,""):t}function A(t){return"symbol"==typeof t||_(t)&&"[object Symbol]"==p(t)}var x=/^[-+]0x[0-9a-f]+$/i,z=/^0b[01]+$/i,S=/^0o[0-7]+$/i,P=parseInt;var k=1/0;function E(t){return t?(t=function(t){if("number"==typeof t)return t;if(A(t))return NaN;if(h(t)){var r="function"==typeof t.valueOf?t.valueOf():t;t=h(r)?r+"":r}if("string"!=typeof t)return 0===t?t:+t;t=w(t);var e=z.test(t);return e||S.test(t)?P(t.slice(2),e?2:8):x.test(t)?NaN:+t}(t))===k||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function M(t){var r=E(t),e=r%1;return r==r?e?r-e:r:0}function I(t,r){for(var e=-1,n=null==t?0:t.length,u=Array(n);++e<n;)u[e]=r(t[e],e,t);return u}function F(t,r){for(var e=-1,n=Array(t);++e<t;)n[e]=r(e);return n}function $(t){return _(t)&&"[object Arguments]"==p(t)}var T=Object.prototype,C=T.hasOwnProperty,q=T.propertyIsEnumerable,B=$(function(){return arguments}())?$:function(t){return _(t)&&C.call(t,"callee")&&!q.call(t,"callee")},D=B;var N="object"==typeof t&&t&&!t.nodeType&&t,R=N&&"object"==typeof module&&module&&!module.nodeType&&module,U=R&&R.exports===N?o.Buffer:void 0,L=(U?U.isBuffer:void 0)||function(){return!1},V=/^(?:0|[1-9]\d*)$/;function W(t,r){var e=typeof t;return!!(r=null==r?9007199254740991:r)&&("number"==e||"symbol"!=e&&V.test(t))&&t>-1&&t%1==0&&t<r}var G={};G["[object Float32Array]"]=G["[object Float64Array]"]=G["[object Int8Array]"]=G["[object Int16Array]"]=G["[object Int32Array]"]=G["[object Uint8Array]"]=G["[object Uint8ClampedArray]"]=G["[object Uint16Array]"]=G["[object Uint32Array]"]=!0,G["[object Arguments]"]=G["[object Array]"]=G["[object ArrayBuffer]"]=G["[object Boolean]"]=G["[object DataView]"]=G["[object Date]"]=G["[object Error]"]=G["[object Function]"]=G["[object Map]"]=G["[object Number]"]=G["[object Object]"]=G["[object RegExp]"]=G["[object Set]"]=G["[object String]"]=G["[object WeakMap]"]=!1;var H,Z="object"==typeof t&&t&&!t.nodeType&&t,J=Z&&"object"==typeof module&&module&&!module.nodeType&&module,K=J&&J.exports===Z&&n.process,Q=function(){try{var t=J&&J.require&&J.require("util").types;return t||K&&K.binding&&K.binding("util")}catch(t){}}(),X=Q&&Q.isTypedArray,Y=X?(H=X,function(t){return H(t)}):function(t){return _(t)&&y(t.length)&&!!G[p(t)]},tt=Object.prototype.hasOwnProperty;var rt=Object.prototype;var et=function(t,r){return function(e){return t(r(e))}}(Object.keys,Object),nt=et,ut=Object.prototype.hasOwnProperty;function ot(t){if(e=(r=t)&&r.constructor,r!==("function"==typeof e&&e.prototype||rt))return nt(t);var r,e,n=[];for(var u in Object(t))ut.call(t,u)&&"constructor"!=u&&n.push(u);return n}function it(t){return b(t)?function(t,r){var e=g(t),n=!e&&D(t),u=!e&&!n&&L(t),o=!e&&!n&&!u&&Y(t),i=e||n||u||o,a=i?F(t.length,String):[],f=a.length;for(var c in t)!r&&!tt.call(t,c)||i&&("length"==c||u&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||W(c,f))||a.push(c);return a}(t):ot(t)}function at(t){return null==t?[]:function(t,r){return I(r,(function(r){return t[r]}))}(t,it(t))}var ft=Math.max;function ct(t,r,n,u){t=b(t)?t:at(t),n=n&&!u?M(n):0;var o=t.length;return n<0&&(n=ft(o+n,0)),j(t)?n<=o&&t.indexOf(r,n)>-1:!!o&&e(t,r,n)>-1}function lt(t,r){return t===r||t!=t&&r!=r}function st(t,r){for(var e=t.length;e--;)if(lt(t[e][0],r))return e;return-1}var vt=Array.prototype.splice;function pt(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}pt.prototype.clear=function(){this.__data__=[],this.size=0},pt.prototype.delete=function(t){var r=this.__data__,e=st(r,t);return!(e<0)&&(e==r.length-1?r.pop():vt.call(r,e,1),--this.size,!0)},pt.prototype.get=function(t){var r=this.__data__,e=st(r,t);return e<0?void 0:r[e][1]},pt.prototype.has=function(t){return st(this.__data__,t)>-1},pt.prototype.set=function(t,r){var e=this.__data__,n=st(e,t);return n<0?(++this.size,e.push([t,r])):e[n][1]=r,this};var ht,dt=o["__core-js_shared__"],yt=(ht=/[^.]+$/.exec(dt&&dt.keys&&dt.keys.IE_PROTO||""))?"Symbol(src)_1."+ht:"";var bt=Function.prototype.toString;function gt(t){if(null!=t){try{return bt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var _t=/^\[object .+?Constructor\]$/,jt=Function.prototype,mt=Object.prototype,Ot=jt.toString,wt=mt.hasOwnProperty,At=RegExp("^"+Ot.call(wt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function xt(t){return!(!h(t)||function(t){return!!yt&&yt in t}(t))&&(d(t)?At:_t).test(gt(t))}function zt(t,r){var e=function(t,r){return null==t?void 0:t[r]}(t,r);return xt(e)?e:void 0}var St=zt(o,"Map"),Pt=zt(Object,"create");var kt=Object.prototype.hasOwnProperty;var Et=Object.prototype.hasOwnProperty;function Mt(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}function It(t,r){var e,n,u=t.__data__;return("string"==(n=typeof(e=r))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==e:null===e)?u["string"==typeof r?"string":"hash"]:u.map}function Ft(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}Mt.prototype.clear=function(){this.__data__=Pt?Pt(null):{},this.size=0},Mt.prototype.delete=function(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r},Mt.prototype.get=function(t){var r=this.__data__;if(Pt){var e=r[t];return"__lodash_hash_undefined__"===e?void 0:e}return kt.call(r,t)?r[t]:void 0},Mt.prototype.has=function(t){var r=this.__data__;return Pt?void 0!==r[t]:Et.call(r,t)},Mt.prototype.set=function(t,r){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=Pt&&void 0===r?"__lodash_hash_undefined__":r,this},Ft.prototype.clear=function(){this.size=0,this.__data__={hash:new Mt,map:new(St||pt),string:new Mt}},Ft.prototype.delete=function(t){var r=It(this,t).delete(t);return this.size-=r?1:0,r},Ft.prototype.get=function(t){return It(this,t).get(t)},Ft.prototype.has=function(t){return It(this,t).has(t)},Ft.prototype.set=function(t,r){var e=It(this,t),n=e.size;return e.set(t,r),this.size+=e.size==n?0:1,this};function $t(t){var r=this.__data__=new pt(t);this.size=r.size}$t.prototype.clear=function(){this.__data__=new pt,this.size=0},$t.prototype.delete=function(t){var r=this.__data__,e=r.delete(t);return this.size=r.size,e},$t.prototype.get=function(t){return this.__data__.get(t)},$t.prototype.has=function(t){return this.__data__.has(t)},$t.prototype.set=function(t,r){var e=this.__data__;if(e instanceof pt){var n=e.__data__;if(!St||n.length<199)return n.push([t,r]),this.size=++e.size,this;e=this.__data__=new Ft(n)}return e.set(t,r),this.size=e.size,this};function Tt(t){var r=-1,e=null==t?0:t.length;for(this.__data__=new Ft;++r<e;)this.add(t[r])}function Ct(t,r){for(var e=-1,n=null==t?0:t.length;++e<n;)if(r(t[e],e,t))return!0;return!1}Tt.prototype.add=Tt.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Tt.prototype.has=function(t){return this.__data__.has(t)};function qt(t,r,e,n,u,o){var i=1&e,a=t.length,f=r.length;if(a!=f&&!(i&&f>a))return!1;var c=o.get(t),l=o.get(r);if(c&&l)return c==r&&l==t;var s=-1,v=!0,p=2&e?new Tt:void 0;for(o.set(t,r),o.set(r,t);++s<a;){var h=t[s],d=r[s];if(n)var y=i?n(d,h,s,r,t,o):n(h,d,s,t,r,o);if(void 0!==y){if(y)continue;v=!1;break}if(p){if(!Ct(r,(function(t,r){if(i=r,!p.has(i)&&(h===t||u(h,t,e,n,o)))return p.push(r);var i}))){v=!1;break}}else if(h!==d&&!u(h,d,e,n,o)){v=!1;break}}return o.delete(t),o.delete(r),v}var Bt=o.Uint8Array;function Dt(t){var r=-1,e=Array(t.size);return t.forEach((function(t,n){e[++r]=[n,t]})),e}function Nt(t){var r=-1,e=Array(t.size);return t.forEach((function(t){e[++r]=t})),e}var Rt=i?i.prototype:void 0,Ut=Rt?Rt.valueOf:void 0;function Lt(t,r){for(var e=-1,n=r.length,u=t.length;++e<n;)t[u+e]=r[e];return t}function Vt(t,r){for(var e=-1,n=null==t?0:t.length,u=0,o=[];++e<n;){var i=t[e];r(i,e,t)&&(o[u++]=i)}return o}var Wt=Object.prototype.propertyIsEnumerable,Gt=Object.getOwnPropertySymbols,Ht=Gt?function(t){return null==t?[]:(t=Object(t),Vt(Gt(t),(function(r){return Wt.call(t,r)})))}:function(){return[]};function Zt(t){return function(t,r,e){var n=r(t);return g(t)?n:Lt(n,e(t))}(t,it,Ht)}var Jt=Object.prototype.hasOwnProperty;var Kt=zt(o,"DataView"),Qt=zt(o,"Promise"),Xt=zt(o,"Set"),Yt=zt(o,"WeakMap"),tr="[object Map]",rr="[object Promise]",er="[object Set]",nr="[object WeakMap]",ur="[object DataView]",or=gt(Kt),ir=gt(St),ar=gt(Qt),fr=gt(Xt),cr=gt(Yt),lr=p;(Kt&&lr(new Kt(new ArrayBuffer(1)))!=ur||St&&lr(new St)!=tr||Qt&&lr(Qt.resolve())!=rr||Xt&&lr(new Xt)!=er||Yt&&lr(new Yt)!=nr)&&(lr=function(t){var r=p(t),e="[object Object]"==r?t.constructor:void 0,n=e?gt(e):"";if(n)switch(n){case or:return ur;case ir:return tr;case ar:return rr;case fr:return er;case cr:return nr}return r});var sr=lr,vr="[object Arguments]",pr="[object Array]",hr="[object Object]",dr=Object.prototype.hasOwnProperty;function yr(t,r,e,n,u,o){var i=g(t),a=g(r),f=i?pr:sr(t),c=a?pr:sr(r),l=(f=f==vr?hr:f)==hr,s=(c=c==vr?hr:c)==hr,v=f==c;if(v&&L(t)){if(!L(r))return!1;i=!0,l=!1}if(v&&!l)return o||(o=new $t),i||Y(t)?qt(t,r,e,n,u,o):function(t,r,e,n,u,o,i){switch(e){case"[object DataView]":if(t.byteLength!=r.byteLength||t.byteOffset!=r.byteOffset)return!1;t=t.buffer,r=r.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=r.byteLength||!o(new Bt(t),new Bt(r)));case"[object Boolean]":case"[object Date]":case"[object Number]":return lt(+t,+r);case"[object Error]":return t.name==r.name&&t.message==r.message;case"[object RegExp]":case"[object String]":return t==r+"";case"[object Map]":var a=Dt;case"[object Set]":var f=1&n;if(a||(a=Nt),t.size!=r.size&&!f)return!1;var c=i.get(t);if(c)return c==r;n|=2,i.set(t,r);var l=qt(a(t),a(r),n,u,o,i);return i.delete(t),l;case"[object Symbol]":if(Ut)return Ut.call(t)==Ut.call(r)}return!1}(t,r,f,e,n,u,o);if(!(1&e)){var p=l&&dr.call(t,"__wrapped__"),h=s&&dr.call(r,"__wrapped__");if(p||h){var d=p?t.value():t,y=h?r.value():r;return o||(o=new $t),u(d,y,e,n,o)}}return!!v&&(o||(o=new $t),function(t,r,e,n,u,o){var i=1&e,a=Zt(t),f=a.length;if(f!=Zt(r).length&&!i)return!1;for(var c=f;c--;){var l=a[c];if(!(i?l in r:Jt.call(r,l)))return!1}var s=o.get(t),v=o.get(r);if(s&&v)return s==r&&v==t;var p=!0;o.set(t,r),o.set(r,t);for(var h=i;++c<f;){var d=t[l=a[c]],y=r[l];if(n)var b=i?n(y,d,l,r,t,o):n(d,y,l,t,r,o);if(!(void 0===b?d===y||u(d,y,e,n,o):b)){p=!1;break}h||(h="constructor"==l)}if(p&&!h){var g=t.constructor,_=r.constructor;g==_||!("constructor"in t)||!("constructor"in r)||"function"==typeof g&&g instanceof g&&"function"==typeof _&&_ instanceof _||(p=!1)}return o.delete(t),o.delete(r),p}(t,r,e,n,u,o))}function br(t,r,e,n,u){return t===r||(null==t||null==r||!_(t)&&!_(r)?t!=t&&r!=r:yr(t,r,e,n,br,u))}function gr(t){return t==t&&!h(t)}function _r(t,r){return function(e){return null!=e&&(e[t]===r&&(void 0!==r||t in Object(e)))}}function jr(t){var r=function(t){for(var r=it(t),e=r.length;e--;){var n=r[e],u=t[n];r[e]=[n,u,gr(u)]}return r}(t);return 1==r.length&&r[0][2]?_r(r[0][0],r[0][1]):function(e){return e===t||function(t,r,e,n){var u=e.length,o=u,i=!n;if(null==t)return!o;for(t=Object(t);u--;){var a=e[u];if(i&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++u<o;){var f=(a=e[u])[0],c=t[f],l=a[1];if(i&&a[2]){if(void 0===c&&!(f in t))return!1}else{var s=new $t;if(n)var v=n(c,l,f,t,r,s);if(!(void 0===v?br(l,c,3,n,s):v))return!1}}return!0}(e,t,r)}}var mr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Or=/^\w*$/;function wr(t,r){if(g(t))return!1;var e=typeof t;return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!A(t))||(Or.test(t)||!mr.test(t)||null!=r&&t in Object(r))}function Ar(t,r){if("function"!=typeof t||null!=r&&"function"!=typeof r)throw new TypeError("Expected a function");var e=function(){var n=arguments,u=r?r.apply(this,n):n[0],o=e.cache;if(o.has(u))return o.get(u);var i=t.apply(this,n);return e.cache=o.set(u,i)||o,i};return e.cache=new(Ar.Cache||Ft),e}Ar.Cache=Ft;var xr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zr=/\\(\\)?/g,Sr=function(t){var r=Ar(t,(function(t){return 500===e.size&&e.clear(),t})),e=r.cache;return r}((function(t){var r=[];return 46===t.charCodeAt(0)&&r.push(""),t.replace(xr,(function(t,e,n,u){r.push(n?u.replace(zr,"$1"):e||t)})),r})),Pr=Sr,kr=i?i.prototype:void 0,Er=kr?kr.toString:void 0;function Mr(t){if("string"==typeof t)return t;if(g(t))return I(t,Mr)+"";if(A(t))return Er?Er.call(t):"";var r=t+"";return"0"==r&&1/t==-Infinity?"-0":r}function Ir(t){return null==t?"":Mr(t)}function Fr(t,r){return g(t)?t:wr(t,r)?[t]:Pr(Ir(t))}function $r(t){if("string"==typeof t||A(t))return t;var r=t+"";return"0"==r&&1/t==-Infinity?"-0":r}function Tr(t,r){for(var e=0,n=(r=Fr(r,t)).length;null!=t&&e<n;)t=t[$r(r[e++])];return e&&e==n?t:void 0}function Cr(t,r){return null!=t&&r in Object(t)}function qr(t,r){return null!=t&&function(t,r,e){for(var n=-1,u=(r=Fr(r,t)).length,o=!1;++n<u;){var i=$r(r[n]);if(!(o=null!=t&&e(t,i)))break;t=t[i]}return o||++n!=u?o:!!(u=null==t?0:t.length)&&y(u)&&W(i,u)&&(g(t)||D(t))}(t,r,Cr)}function Br(t,r){return wr(t)&&gr(r)?_r($r(t),r):function(e){var n=function(t,r,e){var n=null==t?void 0:Tr(t,r);return void 0===n?e:n}(e,t);return void 0===n&&n===r?qr(e,t):br(r,n,3)}}function Dr(t){return t}function Nr(t){return function(r){return null==r?void 0:r[t]}}function Rr(t){return wr(t)?Nr($r(t)):function(t){return function(r){return Tr(r,t)}}(t)}function Ur(t){return"function"==typeof t?t:null==t?Dr:"object"==typeof t?g(t)?Br(t[0],t[1]):jr(t):Rr(t)}var Lr,Vr=function(t,r,e){for(var n=-1,u=Object(t),o=e(t),i=o.length;i--;){var a=o[Lr?i:++n];if(!1===r(u[a],a,u))break}return t};var Wr=function(t,r){return function(e,n){if(null==e)return e;if(!b(e))return t(e,n);for(var u=e.length,o=r?u:-1,i=Object(e);(r?o--:++o<u)&&!1!==n(i[o],o,i););return e}}((function(t,r){return t&&Vr(t,r,it)})),Gr=Wr;function Hr(t,r){var e=-1,n=b(t)?Array(t.length):[];return Gr(t,(function(t,u,o){n[++e]=r(t,u,o)})),n}function Zr(t,r,e,n){var u=-1,o=null==t?0:t.length;for(n&&o&&(e=t[++u]);++u<o;)e=r(e,t[u],u,t);return e}function Jr(t,r,e,n,u){return u(t,(function(t,u,o){e=n?(n=!1,t):r(e,t,u,o)})),e}function Kr(t,r,e){var n=t.length;return e=void 0===e?n:e,!r&&e>=n?t:function(t,r,e){var n=-1,u=t.length;r<0&&(r=-r>u?0:u+r),(e=e>u?u:e)<0&&(e+=u),u=r>e?0:e-r>>>0,r>>>=0;for(var o=Array(u);++n<u;)o[n]=t[n+r];return o}(t,r,e)}var Qr=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Xr(t){return Qr.test(t)}var Yr="[\\ud800-\\udfff]",te="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",re="\\ud83c[\\udffb-\\udfff]",ee="[^\\ud800-\\udfff]",ne="(?:\\ud83c[\\udde6-\\uddff]){2}",ue="[\\ud800-\\udbff][\\udc00-\\udfff]",oe="(?:"+te+"|"+re+")"+"?",ie="[\\ufe0e\\ufe0f]?",ae=ie+oe+("(?:\\u200d(?:"+[ee,ne,ue].join("|")+")"+ie+oe+")*"),fe="(?:"+[ee+te+"?",te,ne,ue,Yr].join("|")+")",ce=RegExp(re+"(?="+re+")|"+fe+ae,"g");function le(t){return Xr(t)?function(t){return t.match(ce)||[]}(t):function(t){return t.split("")}(t)}function se(t,r,n){if((t=Ir(t))&&(n||void 0===r))return w(t);if(!t||!(r=Mr(r)))return t;var u=le(t),o=le(r),i=function(t,r){for(var n=-1,u=t.length;++n<u&&e(r,t[n],0)>-1;);return n}(u,o),a=function(t,r){for(var n=t.length;n--&&e(r,t[n],0)>-1;);return n}(u,o)+1;return Kr(u,i,a).join("")}var ve=function(t){return t?(r=t.split(","),e=se,(g(r)?I:Hr)(r,Ur(e))):["public"];var r,e},pe=function(t,r,e){d(r)&&(e=r,r=null);var n=g(t)?[]:{},u=g(r)?r:ve(r),o=ct(u,"public");return function(t,r,e){var n=g(t)?Zr:Jr,u=arguments.length<3;return n(t,Ur(r),e,u,Gr)}(t,(function(r,n,i){if(ct(u,"all")||n.visibility&&ct(u,n.visibility)||!n.visibility&&o){var a=e?e(n):n;g(t)?r.push(a):r[i]=a}return r}),n)},he=Object.freeze({__proto__:null,parse:ve,filter:pe});function de(t){if(!t)return 0;Object.prototype.hasOwnProperty.call(t,"string")&&(t=t.string);var r=(t=t.replace(/<(.|\n)*?>/g," ")).match(/[a-zA-ZÀ-ÿ0-9_\u0392-\u03c9\u0410-\u04F9]+|[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af]+/g),e=0;if(null===r)return e;for(var n=0;n<r.length;n+=1)r[n].charCodeAt(0)>=19968?e+=r[n].length:e+=1;return e}function ye(t){return t?(Object.prototype.hasOwnProperty.call(t,"string")&&(t=t.string),(t.match(/<img(.|\n)*?>/g)||[]).length):0}function be(t,r){if(!t)return"";var e=ye(t);return r&&(e+=r),function(t){for(var r=t.wordCount,e=t.imageCount,n=r/4.583333333333333,u=12;u>12-e;u-=1)n+=Math.max(u,3);return Math.round(n/60)}({wordCount:de(t),imageCount:e})}function ge(t){for(var r=-1,e=null==t?0:t.length,n=0,u=[];++r<e;){var o=t[r];o&&(u[n++]=o)}return u}var _e=i?i.isConcatSpreadable:void 0;function je(t){return g(t)||D(t)||!!(_e&&t&&t[_e])}function me(t,r,e,n,u){var o=-1,i=t.length;for(e||(e=je),u||(u=[]);++o<i;){var a=t[o];r>0&&e(a)?r>1?me(a,r-1,e,n,u):Lt(u,a):n||(u[u.length]=a)}return u}function Oe(t,r){var e=-1,n=t.length;for(r||(r=Array(n));++e<n;)r[e]=t[e];return r}function we(){var t=arguments.length;if(!t)return[];for(var r=Array(t-1),e=arguments[0],n=t;n--;)r[n-1]=arguments[n];return Lt(g(e)?Oe(e):[e],me(r,1))}function Ae(t,r,e,n){var u=t.length;for((e=M(e))<0&&(e=-e>u?0:u+e),(n=void 0===n||n>u?u:M(n))<0&&(n+=u),n=e>n?0:function(t){return t?(r=M(t),e=0,n=4294967295,r==r&&(void 0!==n&&(r=r<=n?r:n),void 0!==e&&(r=r>=e?r:e)),r):0;var r,e,n}(n);e<n;)t[e++]=r;return t}function xe(t,r,e,n){var u=null==t?0:t.length;return u?(e&&"number"!=typeof e&&function(t,r,e){if(!h(e))return!1;var n=typeof r;return!!("number"==n?b(e)&&W(r,e.length):"string"==n&&r in e)&<(e[r],t)}(t,r,e)&&(e=0,n=u),Ae(t,r,e,n)):[]}function ze(t){return(null==t?0:t.length)?me(t,1):[]}var Se=Nr("length"),Pe="[\\ud800-\\udfff]",ke="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Ee="\\ud83c[\\udffb-\\udfff]",Me="[^\\ud800-\\udfff]",Ie="(?:\\ud83c[\\udde6-\\uddff]){2}",Fe="[\\ud800-\\udbff][\\udc00-\\udfff]",$e="(?:"+ke+"|"+Ee+")"+"?",Te="[\\ufe0e\\ufe0f]?",Ce=Te+$e+("(?:\\u200d(?:"+[Me,Ie,Fe].join("|")+")"+Te+$e+")*"),qe="(?:"+[Me+ke+"?",ke,Ie,Fe,Pe].join("|")+")",Be=RegExp(Ee+"(?="+Ee+")|"+qe+Ce,"g");function De(t){return Xr(t)?function(t){for(var r=Be.lastIndex=0;Be.test(t);)++r;return r}(t):Se(t)}function Ne(t){if(null==t)return 0;if(b(t))return j(t)?De(t):t.length;var r=sr(t);return"[object Map]"==r||"[object Set]"==r?t.size:ot(t).length}function Re(t,r,e){switch(e.length){case 0:return t.call(r);case 1:return t.call(r,e[0]);case 2:return t.call(r,e[0],e[1]);case 3:return t.call(r,e[0],e[1],e[2])}return t.apply(r,e)}var Ue=Math.max;var Le=function(){try{var t=zt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Ve=Le,We=Ve?function(t,r){return Ve(t,"toString",{configurable:!0,enumerable:!1,value:(e=r,function(){return e}),writable:!0});var e}:Dr,Ge=We,He=Date.now;var Ze=function(t){var r=0,e=0;return function(){var n=He(),u=16-(n-e);if(e=n,u>0){if(++r>=800)return arguments[0]}else r=0;return t.apply(void 0,arguments)}}(Ge),Je=Ze;var Ke=Math.max;var Qe=function(t,r){return Je(function(t,r,e){return r=Ue(void 0===r?t.length-1:r,0),function(){for(var n=arguments,u=-1,o=Ue(n.length-r,0),i=Array(o);++u<o;)i[u]=n[r+u];u=-1;for(var a=Array(r+1);++u<r;)a[u]=n[u];return a[r]=e(i),Re(t,this,a)}}(t,r,Dr),t+"")}((function(t){if(!t||!t.length)return[];var r=0;return t=Vt(t,(function(t){if(_(e=t)&&b(e))return r=Ke(t.length,r),!0;var e})),F(r,(function(r){return I(t,Nr(r))}))})),Xe=Qe;var Ye={countImages:ye,countWords:de,visibility:he,readingMinutes:be};t.readingTime=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e="string"==typeof r.minute?r.minute:"1 min read",n="string"==typeof r.minutes?r.minutes:"% min read";if(!t.html&&!t.reading_time)return"";var u=0;t.feature_image&&(u+=1);var o=t.reading_time||be(t.html,u);return o<=1?e:n.replace("%",o)},t.tags=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e="",n=r.separator?r.separator:"",u=r.prefix?r.prefix:"",o=r.suffix?r.suffix:"",i=r.limit?parseInt(r.limit,10):void 0,a=r.from?parseInt(r.from,10):1,f=r.to?parseInt(r.to,10):void 0,c=ve(r.visibility),l=r.fallback?g(r.fallback)?r.fallback:[r.fallback]:void 0,s=r.fn?r.fn:function(t){return t.name};return t.tags&&t.tags.length&&(0===Ne(e=pe(t.tags,c,s))&&l&&(e=pe(l,c,s)),a-=1,f=f||i+a||e.length,e=e.slice(a,f)),Ne(e)>0&&(j(e[0])?(n=n||", ",e=u+e.join(n)+o):(n&&(e=ze(e=Xe(e,xe(Array(e.length),n))).slice(0,-1)),e=ge(e=we(u,e,o)))),e},t.utils=Ye,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
1
|
+
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("core-js/modules/es6.regexp.split.js"),require("core-js/modules/es6.regexp.replace.js"),require("core-js/modules/es6.regexp.match.js"),require("core-js/modules/es6.function.name.js"),require("core-js/modules/es6.array.slice.js")):"function"==typeof define&&define.amd?define(["exports","core-js/modules/es6.regexp.split.js","core-js/modules/es6.regexp.replace.js","core-js/modules/es6.regexp.match.js","core-js/modules/es6.function.name.js","core-js/modules/es6.array.slice.js"],r):r((t="undefined"!=typeof globalThis?globalThis:t||self).GhostHelpers={})}(this,(function(t){"use strict";function r(t){return t!=t}function e(t,e,n){return e==e?function(t,r,e){for(var n=e-1,u=t.length;++n<u;)if(t[n]===r)return n;return-1}(t,e,n):function(t,r,e,n){for(var u=t.length,o=e+(n?1:-1);n?o--:++o<u;)if(r(t[o],o,t))return o;return-1}(t,r,n)}var n="object"==typeof global&&global&&global.Object===Object&&global,u="object"==typeof self&&self&&self.Object===Object&&self,o=n||u||Function("return this")(),i=o.Symbol,a=Object.prototype,f=a.hasOwnProperty,c=a.toString,l=i?i.toStringTag:void 0;var s=Object.prototype.toString;var v=i?i.toStringTag:void 0;function p(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":v&&v in Object(t)?function(t){var r=f.call(t,l),e=t[l];try{t[l]=void 0;var n=!0}catch(t){}var u=c.call(t);return n&&(r?t[l]=e:delete t[l]),u}(t):function(t){return s.call(t)}(t)}function h(t){var r=typeof t;return null!=t&&("object"==r||"function"==r)}function d(t){if(!h(t))return!1;var r=p(t);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r}function y(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function b(t){return null!=t&&y(t.length)&&!d(t)}var g=Array.isArray;function _(t){return null!=t&&"object"==typeof t}function j(t){return"string"==typeof t||!g(t)&&_(t)&&"[object String]"==p(t)}var m=/\s/;var O=/^\s+/;function w(t){return t?t.slice(0,function(t){for(var r=t.length;r--&&m.test(t.charAt(r)););return r}(t)+1).replace(O,""):t}function A(t){return"symbol"==typeof t||_(t)&&"[object Symbol]"==p(t)}var x=/^[-+]0x[0-9a-f]+$/i,z=/^0b[01]+$/i,S=/^0o[0-7]+$/i,P=parseInt;var k=1/0;function E(t){return t?(t=function(t){if("number"==typeof t)return t;if(A(t))return NaN;if(h(t)){var r="function"==typeof t.valueOf?t.valueOf():t;t=h(r)?r+"":r}if("string"!=typeof t)return 0===t?t:+t;t=w(t);var e=z.test(t);return e||S.test(t)?P(t.slice(2),e?2:8):x.test(t)?NaN:+t}(t))===k||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function M(t){var r=E(t),e=r%1;return r==r?e?r-e:r:0}function F(t,r){for(var e=-1,n=null==t?0:t.length,u=Array(n);++e<n;)u[e]=r(t[e],e,t);return u}function I(t,r){for(var e=-1,n=Array(t);++e<t;)n[e]=r(e);return n}function $(t){return _(t)&&"[object Arguments]"==p(t)}var T=Object.prototype,C=T.hasOwnProperty,q=T.propertyIsEnumerable,B=$(function(){return arguments}())?$:function(t){return _(t)&&C.call(t,"callee")&&!q.call(t,"callee")},D=B;var N="object"==typeof t&&t&&!t.nodeType&&t,R=N&&"object"==typeof module&&module&&!module.nodeType&&module,U=R&&R.exports===N?o.Buffer:void 0,L=(U?U.isBuffer:void 0)||function(){return!1},V=/^(?:0|[1-9]\d*)$/;function W(t,r){var e=typeof t;return!!(r=null==r?9007199254740991:r)&&("number"==e||"symbol"!=e&&V.test(t))&&t>-1&&t%1==0&&t<r}var G={};G["[object Float32Array]"]=G["[object Float64Array]"]=G["[object Int8Array]"]=G["[object Int16Array]"]=G["[object Int32Array]"]=G["[object Uint8Array]"]=G["[object Uint8ClampedArray]"]=G["[object Uint16Array]"]=G["[object Uint32Array]"]=!0,G["[object Arguments]"]=G["[object Array]"]=G["[object ArrayBuffer]"]=G["[object Boolean]"]=G["[object DataView]"]=G["[object Date]"]=G["[object Error]"]=G["[object Function]"]=G["[object Map]"]=G["[object Number]"]=G["[object Object]"]=G["[object RegExp]"]=G["[object Set]"]=G["[object String]"]=G["[object WeakMap]"]=!1;var H,Z="object"==typeof t&&t&&!t.nodeType&&t,J=Z&&"object"==typeof module&&module&&!module.nodeType&&module,K=J&&J.exports===Z&&n.process,Q=function(){try{var t=J&&J.require&&J.require("util").types;return t||K&&K.binding&&K.binding("util")}catch(t){}}(),X=Q&&Q.isTypedArray,Y=X?(H=X,function(t){return H(t)}):function(t){return _(t)&&y(t.length)&&!!G[p(t)]},tt=Object.prototype.hasOwnProperty;var rt=Object.prototype;var et=function(t,r){return function(e){return t(r(e))}}(Object.keys,Object),nt=et,ut=Object.prototype.hasOwnProperty;function ot(t){if(e=(r=t)&&r.constructor,r!==("function"==typeof e&&e.prototype||rt))return nt(t);var r,e,n=[];for(var u in Object(t))ut.call(t,u)&&"constructor"!=u&&n.push(u);return n}function it(t){return b(t)?function(t,r){var e=g(t),n=!e&&D(t),u=!e&&!n&&L(t),o=!e&&!n&&!u&&Y(t),i=e||n||u||o,a=i?I(t.length,String):[],f=a.length;for(var c in t)!r&&!tt.call(t,c)||i&&("length"==c||u&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||W(c,f))||a.push(c);return a}(t):ot(t)}function at(t){return null==t?[]:function(t,r){return F(r,(function(r){return t[r]}))}(t,it(t))}var ft=Math.max;function ct(t,r,n,u){t=b(t)?t:at(t),n=n&&!u?M(n):0;var o=t.length;return n<0&&(n=ft(o+n,0)),j(t)?n<=o&&t.indexOf(r,n)>-1:!!o&&e(t,r,n)>-1}function lt(t,r){return t===r||t!=t&&r!=r}function st(t,r){for(var e=t.length;e--;)if(lt(t[e][0],r))return e;return-1}var vt=Array.prototype.splice;function pt(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}pt.prototype.clear=function(){this.__data__=[],this.size=0},pt.prototype.delete=function(t){var r=this.__data__,e=st(r,t);return!(e<0)&&(e==r.length-1?r.pop():vt.call(r,e,1),--this.size,!0)},pt.prototype.get=function(t){var r=this.__data__,e=st(r,t);return e<0?void 0:r[e][1]},pt.prototype.has=function(t){return st(this.__data__,t)>-1},pt.prototype.set=function(t,r){var e=this.__data__,n=st(e,t);return n<0?(++this.size,e.push([t,r])):e[n][1]=r,this};var ht,dt=o["__core-js_shared__"],yt=(ht=/[^.]+$/.exec(dt&&dt.keys&&dt.keys.IE_PROTO||""))?"Symbol(src)_1."+ht:"";var bt=Function.prototype.toString;function gt(t){if(null!=t){try{return bt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var _t=/^\[object .+?Constructor\]$/,jt=Function.prototype,mt=Object.prototype,Ot=jt.toString,wt=mt.hasOwnProperty,At=RegExp("^"+Ot.call(wt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function xt(t){return!(!h(t)||function(t){return!!yt&&yt in t}(t))&&(d(t)?At:_t).test(gt(t))}function zt(t,r){var e=function(t,r){return null==t?void 0:t[r]}(t,r);return xt(e)?e:void 0}var St=zt(o,"Map"),Pt=zt(Object,"create");var kt=Object.prototype.hasOwnProperty;var Et=Object.prototype.hasOwnProperty;function Mt(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}function Ft(t,r){var e,n,u=t.__data__;return("string"==(n=typeof(e=r))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==e:null===e)?u["string"==typeof r?"string":"hash"]:u.map}function It(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}Mt.prototype.clear=function(){this.__data__=Pt?Pt(null):{},this.size=0},Mt.prototype.delete=function(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r},Mt.prototype.get=function(t){var r=this.__data__;if(Pt){var e=r[t];return"__lodash_hash_undefined__"===e?void 0:e}return kt.call(r,t)?r[t]:void 0},Mt.prototype.has=function(t){var r=this.__data__;return Pt?void 0!==r[t]:Et.call(r,t)},Mt.prototype.set=function(t,r){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=Pt&&void 0===r?"__lodash_hash_undefined__":r,this},It.prototype.clear=function(){this.size=0,this.__data__={hash:new Mt,map:new(St||pt),string:new Mt}},It.prototype.delete=function(t){var r=Ft(this,t).delete(t);return this.size-=r?1:0,r},It.prototype.get=function(t){return Ft(this,t).get(t)},It.prototype.has=function(t){return Ft(this,t).has(t)},It.prototype.set=function(t,r){var e=Ft(this,t),n=e.size;return e.set(t,r),this.size+=e.size==n?0:1,this};function $t(t){var r=this.__data__=new pt(t);this.size=r.size}$t.prototype.clear=function(){this.__data__=new pt,this.size=0},$t.prototype.delete=function(t){var r=this.__data__,e=r.delete(t);return this.size=r.size,e},$t.prototype.get=function(t){return this.__data__.get(t)},$t.prototype.has=function(t){return this.__data__.has(t)},$t.prototype.set=function(t,r){var e=this.__data__;if(e instanceof pt){var n=e.__data__;if(!St||n.length<199)return n.push([t,r]),this.size=++e.size,this;e=this.__data__=new It(n)}return e.set(t,r),this.size=e.size,this};function Tt(t){var r=-1,e=null==t?0:t.length;for(this.__data__=new It;++r<e;)this.add(t[r])}function Ct(t,r){for(var e=-1,n=null==t?0:t.length;++e<n;)if(r(t[e],e,t))return!0;return!1}Tt.prototype.add=Tt.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Tt.prototype.has=function(t){return this.__data__.has(t)};function qt(t,r,e,n,u,o){var i=1&e,a=t.length,f=r.length;if(a!=f&&!(i&&f>a))return!1;var c=o.get(t),l=o.get(r);if(c&&l)return c==r&&l==t;var s=-1,v=!0,p=2&e?new Tt:void 0;for(o.set(t,r),o.set(r,t);++s<a;){var h=t[s],d=r[s];if(n)var y=i?n(d,h,s,r,t,o):n(h,d,s,t,r,o);if(void 0!==y){if(y)continue;v=!1;break}if(p){if(!Ct(r,(function(t,r){if(i=r,!p.has(i)&&(h===t||u(h,t,e,n,o)))return p.push(r);var i}))){v=!1;break}}else if(h!==d&&!u(h,d,e,n,o)){v=!1;break}}return o.delete(t),o.delete(r),v}var Bt=o.Uint8Array;function Dt(t){var r=-1,e=Array(t.size);return t.forEach((function(t,n){e[++r]=[n,t]})),e}function Nt(t){var r=-1,e=Array(t.size);return t.forEach((function(t){e[++r]=t})),e}var Rt=i?i.prototype:void 0,Ut=Rt?Rt.valueOf:void 0;function Lt(t,r){for(var e=-1,n=r.length,u=t.length;++e<n;)t[u+e]=r[e];return t}function Vt(t,r){for(var e=-1,n=null==t?0:t.length,u=0,o=[];++e<n;){var i=t[e];r(i,e,t)&&(o[u++]=i)}return o}var Wt=Object.prototype.propertyIsEnumerable,Gt=Object.getOwnPropertySymbols,Ht=Gt?function(t){return null==t?[]:(t=Object(t),Vt(Gt(t),(function(r){return Wt.call(t,r)})))}:function(){return[]};function Zt(t){return function(t,r,e){var n=r(t);return g(t)?n:Lt(n,e(t))}(t,it,Ht)}var Jt=Object.prototype.hasOwnProperty;var Kt=zt(o,"DataView"),Qt=zt(o,"Promise"),Xt=zt(o,"Set"),Yt=zt(o,"WeakMap"),tr="[object Map]",rr="[object Promise]",er="[object Set]",nr="[object WeakMap]",ur="[object DataView]",or=gt(Kt),ir=gt(St),ar=gt(Qt),fr=gt(Xt),cr=gt(Yt),lr=p;(Kt&&lr(new Kt(new ArrayBuffer(1)))!=ur||St&&lr(new St)!=tr||Qt&&lr(Qt.resolve())!=rr||Xt&&lr(new Xt)!=er||Yt&&lr(new Yt)!=nr)&&(lr=function(t){var r=p(t),e="[object Object]"==r?t.constructor:void 0,n=e?gt(e):"";if(n)switch(n){case or:return ur;case ir:return tr;case ar:return rr;case fr:return er;case cr:return nr}return r});var sr=lr,vr="[object Arguments]",pr="[object Array]",hr="[object Object]",dr=Object.prototype.hasOwnProperty;function yr(t,r,e,n,u,o){var i=g(t),a=g(r),f=i?pr:sr(t),c=a?pr:sr(r),l=(f=f==vr?hr:f)==hr,s=(c=c==vr?hr:c)==hr,v=f==c;if(v&&L(t)){if(!L(r))return!1;i=!0,l=!1}if(v&&!l)return o||(o=new $t),i||Y(t)?qt(t,r,e,n,u,o):function(t,r,e,n,u,o,i){switch(e){case"[object DataView]":if(t.byteLength!=r.byteLength||t.byteOffset!=r.byteOffset)return!1;t=t.buffer,r=r.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=r.byteLength||!o(new Bt(t),new Bt(r)));case"[object Boolean]":case"[object Date]":case"[object Number]":return lt(+t,+r);case"[object Error]":return t.name==r.name&&t.message==r.message;case"[object RegExp]":case"[object String]":return t==r+"";case"[object Map]":var a=Dt;case"[object Set]":var f=1&n;if(a||(a=Nt),t.size!=r.size&&!f)return!1;var c=i.get(t);if(c)return c==r;n|=2,i.set(t,r);var l=qt(a(t),a(r),n,u,o,i);return i.delete(t),l;case"[object Symbol]":if(Ut)return Ut.call(t)==Ut.call(r)}return!1}(t,r,f,e,n,u,o);if(!(1&e)){var p=l&&dr.call(t,"__wrapped__"),h=s&&dr.call(r,"__wrapped__");if(p||h){var d=p?t.value():t,y=h?r.value():r;return o||(o=new $t),u(d,y,e,n,o)}}return!!v&&(o||(o=new $t),function(t,r,e,n,u,o){var i=1&e,a=Zt(t),f=a.length;if(f!=Zt(r).length&&!i)return!1;for(var c=f;c--;){var l=a[c];if(!(i?l in r:Jt.call(r,l)))return!1}var s=o.get(t),v=o.get(r);if(s&&v)return s==r&&v==t;var p=!0;o.set(t,r),o.set(r,t);for(var h=i;++c<f;){var d=t[l=a[c]],y=r[l];if(n)var b=i?n(y,d,l,r,t,o):n(d,y,l,t,r,o);if(!(void 0===b?d===y||u(d,y,e,n,o):b)){p=!1;break}h||(h="constructor"==l)}if(p&&!h){var g=t.constructor,_=r.constructor;g==_||!("constructor"in t)||!("constructor"in r)||"function"==typeof g&&g instanceof g&&"function"==typeof _&&_ instanceof _||(p=!1)}return o.delete(t),o.delete(r),p}(t,r,e,n,u,o))}function br(t,r,e,n,u){return t===r||(null==t||null==r||!_(t)&&!_(r)?t!=t&&r!=r:yr(t,r,e,n,br,u))}function gr(t){return t==t&&!h(t)}function _r(t,r){return function(e){return null!=e&&(e[t]===r&&(void 0!==r||t in Object(e)))}}function jr(t){var r=function(t){for(var r=it(t),e=r.length;e--;){var n=r[e],u=t[n];r[e]=[n,u,gr(u)]}return r}(t);return 1==r.length&&r[0][2]?_r(r[0][0],r[0][1]):function(e){return e===t||function(t,r,e,n){var u=e.length,o=u,i=!n;if(null==t)return!o;for(t=Object(t);u--;){var a=e[u];if(i&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++u<o;){var f=(a=e[u])[0],c=t[f],l=a[1];if(i&&a[2]){if(void 0===c&&!(f in t))return!1}else{var s=new $t;if(n)var v=n(c,l,f,t,r,s);if(!(void 0===v?br(l,c,3,n,s):v))return!1}}return!0}(e,t,r)}}var mr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Or=/^\w*$/;function wr(t,r){if(g(t))return!1;var e=typeof t;return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!A(t))||(Or.test(t)||!mr.test(t)||null!=r&&t in Object(r))}function Ar(t,r){if("function"!=typeof t||null!=r&&"function"!=typeof r)throw new TypeError("Expected a function");var e=function(){var n=arguments,u=r?r.apply(this,n):n[0],o=e.cache;if(o.has(u))return o.get(u);var i=t.apply(this,n);return e.cache=o.set(u,i)||o,i};return e.cache=new(Ar.Cache||It),e}Ar.Cache=It;var xr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zr=/\\(\\)?/g,Sr=function(t){var r=Ar(t,(function(t){return 500===e.size&&e.clear(),t})),e=r.cache;return r}((function(t){var r=[];return 46===t.charCodeAt(0)&&r.push(""),t.replace(xr,(function(t,e,n,u){r.push(n?u.replace(zr,"$1"):e||t)})),r})),Pr=Sr,kr=i?i.prototype:void 0,Er=kr?kr.toString:void 0;function Mr(t){if("string"==typeof t)return t;if(g(t))return F(t,Mr)+"";if(A(t))return Er?Er.call(t):"";var r=t+"";return"0"==r&&1/t==-Infinity?"-0":r}function Fr(t){return null==t?"":Mr(t)}function Ir(t,r){return g(t)?t:wr(t,r)?[t]:Pr(Fr(t))}function $r(t){if("string"==typeof t||A(t))return t;var r=t+"";return"0"==r&&1/t==-Infinity?"-0":r}function Tr(t,r){for(var e=0,n=(r=Ir(r,t)).length;null!=t&&e<n;)t=t[$r(r[e++])];return e&&e==n?t:void 0}function Cr(t,r){return null!=t&&r in Object(t)}function qr(t,r){return null!=t&&function(t,r,e){for(var n=-1,u=(r=Ir(r,t)).length,o=!1;++n<u;){var i=$r(r[n]);if(!(o=null!=t&&e(t,i)))break;t=t[i]}return o||++n!=u?o:!!(u=null==t?0:t.length)&&y(u)&&W(i,u)&&(g(t)||D(t))}(t,r,Cr)}function Br(t,r){return wr(t)&&gr(r)?_r($r(t),r):function(e){var n=function(t,r,e){var n=null==t?void 0:Tr(t,r);return void 0===n?e:n}(e,t);return void 0===n&&n===r?qr(e,t):br(r,n,3)}}function Dr(t){return t}function Nr(t){return function(r){return null==r?void 0:r[t]}}function Rr(t){return wr(t)?Nr($r(t)):function(t){return function(r){return Tr(r,t)}}(t)}function Ur(t){return"function"==typeof t?t:null==t?Dr:"object"==typeof t?g(t)?Br(t[0],t[1]):jr(t):Rr(t)}var Lr,Vr=function(t,r,e){for(var n=-1,u=Object(t),o=e(t),i=o.length;i--;){var a=o[Lr?i:++n];if(!1===r(u[a],a,u))break}return t};var Wr=function(t,r){return function(e,n){if(null==e)return e;if(!b(e))return t(e,n);for(var u=e.length,o=r?u:-1,i=Object(e);(r?o--:++o<u)&&!1!==n(i[o],o,i););return e}}((function(t,r){return t&&Vr(t,r,it)})),Gr=Wr;function Hr(t,r){var e=-1,n=b(t)?Array(t.length):[];return Gr(t,(function(t,u,o){n[++e]=r(t,u,o)})),n}function Zr(t,r,e,n){var u=-1,o=null==t?0:t.length;for(n&&o&&(e=t[++u]);++u<o;)e=r(e,t[u],u,t);return e}function Jr(t,r,e,n,u){return u(t,(function(t,u,o){e=n?(n=!1,t):r(e,t,u,o)})),e}function Kr(t,r,e){var n=t.length;return e=void 0===e?n:e,!r&&e>=n?t:function(t,r,e){var n=-1,u=t.length;r<0&&(r=-r>u?0:u+r),(e=e>u?u:e)<0&&(e+=u),u=r>e?0:e-r>>>0,r>>>=0;for(var o=Array(u);++n<u;)o[n]=t[n+r];return o}(t,r,e)}var Qr=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Xr(t){return Qr.test(t)}var Yr="[\\ud800-\\udfff]",te="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",re="\\ud83c[\\udffb-\\udfff]",ee="[^\\ud800-\\udfff]",ne="(?:\\ud83c[\\udde6-\\uddff]){2}",ue="[\\ud800-\\udbff][\\udc00-\\udfff]",oe="(?:"+te+"|"+re+")"+"?",ie="[\\ufe0e\\ufe0f]?",ae=ie+oe+("(?:\\u200d(?:"+[ee,ne,ue].join("|")+")"+ie+oe+")*"),fe="(?:"+[ee+te+"?",te,ne,ue,Yr].join("|")+")",ce=RegExp(re+"(?="+re+")|"+fe+ae,"g");function le(t){return Xr(t)?function(t){return t.match(ce)||[]}(t):function(t){return t.split("")}(t)}function se(t,r,n){if((t=Fr(t))&&(n||void 0===r))return w(t);if(!t||!(r=Mr(r)))return t;var u=le(t),o=le(r),i=function(t,r){for(var n=-1,u=t.length;++n<u&&e(r,t[n],0)>-1;);return n}(u,o),a=function(t,r){for(var n=t.length;n--&&e(r,t[n],0)>-1;);return n}(u,o)+1;return Kr(u,i,a).join("")}var ve=function(t){return t?(r=t.split(","),e=se,(g(r)?F:Hr)(r,Ur(e))):["public"];var r,e},pe=function(t,r,e){d(r)&&(e=r,r=null);var n=g(t)?[]:{},u=g(r)?r:ve(r),o=ct(u,"public");return function(t,r,e){var n=g(t)?Zr:Jr,u=arguments.length<3;return n(t,Ur(r),e,u,Gr)}(t,(function(r,n,i){if(ct(u,"all")||n.visibility&&ct(u,n.visibility)||!n.visibility&&o){var a=e?e(n):n;g(t)?r.push(a):r[i]=a}return r}),n)},he=Object.freeze({__proto__:null,parse:ve,filter:pe});function de(t){if(!t)return 0;Object.prototype.hasOwnProperty.call(t,"string")&&(t=t.string);var r=(t=t.replace(/<(.|\n)*?>/g," ")).match(/[a-zA-ZÀ-ÿ0-9_\u0392-\u03c9\u0410-\u04F9]+|[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af]+/g)||t.match(/([\u0600-\u06ff]+|[\u0591-\u05F4]+)/g),e=0;if(null===r)return e;for(var n=0;n<r.length;n+=1)r[n].charCodeAt(0)>=19968?e+=r[n].length:e+=1;return e}function ye(t){return t?(Object.prototype.hasOwnProperty.call(t,"string")&&(t=t.string),(t.match(/<img(.|\n)*?>/g)||[]).length):0}function be(t,r){if(!t)return"";var e=ye(t);return r&&(e+=r),function(t){for(var r=t.wordCount,e=t.imageCount,n=r/4.583333333333333,u=12;u>12-e;u-=1)n+=Math.max(u,3);return Math.round(n/60)}({wordCount:de(t),imageCount:e})}function ge(t){for(var r=-1,e=null==t?0:t.length,n=0,u=[];++r<e;){var o=t[r];o&&(u[n++]=o)}return u}var _e=i?i.isConcatSpreadable:void 0;function je(t){return g(t)||D(t)||!!(_e&&t&&t[_e])}function me(t,r,e,n,u){var o=-1,i=t.length;for(e||(e=je),u||(u=[]);++o<i;){var a=t[o];r>0&&e(a)?r>1?me(a,r-1,e,n,u):Lt(u,a):n||(u[u.length]=a)}return u}function Oe(t,r){var e=-1,n=t.length;for(r||(r=Array(n));++e<n;)r[e]=t[e];return r}function we(){var t=arguments.length;if(!t)return[];for(var r=Array(t-1),e=arguments[0],n=t;n--;)r[n-1]=arguments[n];return Lt(g(e)?Oe(e):[e],me(r,1))}function Ae(t,r,e,n){var u=t.length;for((e=M(e))<0&&(e=-e>u?0:u+e),(n=void 0===n||n>u?u:M(n))<0&&(n+=u),n=e>n?0:function(t){return t?(r=M(t),e=0,n=4294967295,r==r&&(void 0!==n&&(r=r<=n?r:n),void 0!==e&&(r=r>=e?r:e)),r):0;var r,e,n}(n);e<n;)t[e++]=r;return t}function xe(t,r,e,n){var u=null==t?0:t.length;return u?(e&&"number"!=typeof e&&function(t,r,e){if(!h(e))return!1;var n=typeof r;return!!("number"==n?b(e)&&W(r,e.length):"string"==n&&r in e)&<(e[r],t)}(t,r,e)&&(e=0,n=u),Ae(t,r,e,n)):[]}function ze(t){return(null==t?0:t.length)?me(t,1):[]}var Se=Nr("length"),Pe="[\\ud800-\\udfff]",ke="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Ee="\\ud83c[\\udffb-\\udfff]",Me="[^\\ud800-\\udfff]",Fe="(?:\\ud83c[\\udde6-\\uddff]){2}",Ie="[\\ud800-\\udbff][\\udc00-\\udfff]",$e="(?:"+ke+"|"+Ee+")"+"?",Te="[\\ufe0e\\ufe0f]?",Ce=Te+$e+("(?:\\u200d(?:"+[Me,Fe,Ie].join("|")+")"+Te+$e+")*"),qe="(?:"+[Me+ke+"?",ke,Fe,Ie,Pe].join("|")+")",Be=RegExp(Ee+"(?="+Ee+")|"+qe+Ce,"g");function De(t){return Xr(t)?function(t){for(var r=Be.lastIndex=0;Be.test(t);)++r;return r}(t):Se(t)}function Ne(t){if(null==t)return 0;if(b(t))return j(t)?De(t):t.length;var r=sr(t);return"[object Map]"==r||"[object Set]"==r?t.size:ot(t).length}function Re(t,r,e){switch(e.length){case 0:return t.call(r);case 1:return t.call(r,e[0]);case 2:return t.call(r,e[0],e[1]);case 3:return t.call(r,e[0],e[1],e[2])}return t.apply(r,e)}var Ue=Math.max;var Le=function(){try{var t=zt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Ve=Le,We=Ve?function(t,r){return Ve(t,"toString",{configurable:!0,enumerable:!1,value:(e=r,function(){return e}),writable:!0});var e}:Dr,Ge=We,He=Date.now;var Ze=function(t){var r=0,e=0;return function(){var n=He(),u=16-(n-e);if(e=n,u>0){if(++r>=800)return arguments[0]}else r=0;return t.apply(void 0,arguments)}}(Ge),Je=Ze;var Ke=Math.max;var Qe=function(t,r){return Je(function(t,r,e){return r=Ue(void 0===r?t.length-1:r,0),function(){for(var n=arguments,u=-1,o=Ue(n.length-r,0),i=Array(o);++u<o;)i[u]=n[r+u];u=-1;for(var a=Array(r+1);++u<r;)a[u]=n[u];return a[r]=e(i),Re(t,this,a)}}(t,r,Dr),t+"")}((function(t){if(!t||!t.length)return[];var r=0;return t=Vt(t,(function(t){if(_(e=t)&&b(e))return r=Ke(t.length,r),!0;var e})),I(r,(function(r){return F(t,Nr(r))}))})),Xe=Qe;var Ye={countImages:ye,countWords:de,visibility:he,readingMinutes:be};t.readingTime=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e="string"==typeof r.minute?r.minute:"1 min read",n="string"==typeof r.minutes?r.minutes:"% min read";if(!t.html&&!t.reading_time)return"";var u=0;t.feature_image&&(u+=1);var o=t.reading_time||be(t.html,u);return o<=1?e:n.replace("%",o)},t.tags=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e="",n=r.separator?r.separator:"",u=r.prefix?r.prefix:"",o=r.suffix?r.suffix:"",i=r.limit?parseInt(r.limit,10):void 0,a=r.from?parseInt(r.from,10):1,f=r.to?parseInt(r.to,10):void 0,c=ve(r.visibility),l=r.fallback?g(r.fallback)?r.fallback:[r.fallback]:void 0,s=r.fn?r.fn:function(t){return t.name};return t.tags&&t.tags.length&&(0===Ne(e=pe(t.tags,c,s))&&l&&(e=pe(l,c,s)),a-=1,f=f||i+a||e.length,e=e.slice(a,f)),Ne(e)>0&&(j(e[0])?(n=n||", ",e=u+e.join(n)+o):(n&&(e=ze(e=Xe(e,xe(Array(e.length),n))).slice(0,-1)),e=ge(e=we(u,e,o)))),e},t.utils=Ye,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
2
2
|
//# sourceMappingURL=helpers.min.js.map
|