object-flatten-referencing 6.1.2 → 6.2.1

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/CHANGELOG.md CHANGED
@@ -3,6 +3,13 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # 6.2.0 (2022-08-12)
7
+
8
+ ### Features
9
+
10
+ - export types ([91a9305](https://github.com/codsen/codsen/commit/91a9305f81b03480b7decbaf65cdde03a65808b4))
11
+ - export types ([11b5fb9](https://github.com/codsen/codsen/commit/11b5fb936ce20e0a77c3a09806773e1cd7695c50))
12
+
6
13
  ## 6.1.2 (2022-04-18)
7
14
 
8
15
  ### Bug Fixes
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * @name object-flatten-referencing
3
3
  * @fileoverview Flatten complex nested objects according to a reference objects
4
- * @version 6.1.2
4
+ * @version 6.2.1
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/object-flatten-referencing/}
8
8
  */
9
9
 
10
- import D from"lodash.clonedeep";import{strIndexesOfPlus as A}from"str-indexes-of-plus";import{isMatch as C}from"matcher";import w from"lodash.isplainobject";import $ from"lodash.clonedeep";import I from"lodash.isplainobject";var v={wrapHeadsWith:"%%_",wrapTailsWith:"_%%",dontWrapKeys:[],dontWrapPaths:[],xhtml:!0,preventDoubleWrapping:!0,preventWrappingIfContains:[],objectKeyAndValueJoinChar:".",wrapGlobalFlipSwitch:!0,ignore:[],whatToDoWhenReferenceIsMissing:0,mergeArraysWithLineBreaks:!0,mergeWithoutTrailingBrIfLineContainsBr:!0,enforceStrictKeyset:!0};function y(f){return typeof f=="string"}function O(f,b){let h={...v,...b};if(arguments.length===0||Object.keys(f).length===0)return[];let i=$(f),n=[];return I(i)&&Object.keys(i).forEach(a=>{I(i[a])&&(i[a]=O(i[a],h)),Array.isArray(i[a])&&(n=n.concat(i[a].map(p=>`${a}${h.objectKeyAndValueJoinChar}${p}`))),y(i[a])&&n.push(`${a}${h.objectKeyAndValueJoinChar}${i[a]}`)}),n}function j(f,b,h=!1,i=!1){let n={...v,...b};if(arguments.length===0||f.length===0)return"";let a=$(f),p="";if(a.length)if(i){for(let e=0,s=a.length;e<s;e++)if(y(a[e])){let l;l="",n.mergeArraysWithLineBreaks&&e>0&&(!n.mergeWithoutTrailingBrIfLineContainsBr||typeof a[e-1]!="string"||n.mergeWithoutTrailingBrIfLineContainsBr&&a[e-1]!==void 0&&!a[e-1].toLowerCase().includes("<br"))&&(l=`<br${n.xhtml?" /":""}>`),p+=`${l}${h?n.wrapHeadsWith:""}${a[e]}${h?n.wrapTailsWith:""}`}else if(Array.isArray(a[e])&&a[e].length&&a[e].every(y)){let l="";n.mergeArraysWithLineBreaks&&p.length&&(l=`<br${n.xhtml?" /":""}>`),p=a[e].reduce((u,t,o,r)=>{let c="";return o!==r.length-1&&(c=" "),u+(o===0?l:"")+(h?n.wrapHeadsWith:"")+t+(h?n.wrapTailsWith:"")+c},p)}}else p=a.reduce((e,s,l,u)=>{let t="";n.mergeArraysWithLineBreaks&&l>0&&(t=`<br${n.xhtml?" /":""}>`);let o="";return l!==u.length-1&&(o=" "),`${e}${l===0?t:""}${h?n.wrapHeadsWith:""}${s}${h?n.wrapTailsWith:""}${o}`},p);return p}function m(f){return y(f)?f.length?[f]:[]:f}var x="6.1.2";var J=x;function W(f){return f!=null}function g(f){return typeof f=="string"}function q(f,b,h){if(arguments.length===0)throw new Error("object-flatten-referencing/ofr(): [THROW_ID_01] all inputs missing!");if(arguments.length===1)throw new Error("object-flatten-referencing/ofr(): [THROW_ID_02] resolvedReference object missing!");if(W(h)&&!w(h))throw new Error(`object-flatten-referencing/ofr(): [THROW_ID_03] third resolvedInput, options object must be a plain object. Currently it's: ${typeof h}`);let i={...v,...h};i.dontWrapKeys=m(i.dontWrapKeys),i.preventWrappingIfContains=m(i.preventWrappingIfContains),i.dontWrapPaths=m(i.dontWrapPaths),i.ignore=m(i.ignore),typeof i.whatToDoWhenReferenceIsMissing!="number"&&(i.whatToDoWhenReferenceIsMissing=+i.whatToDoWhenReferenceIsMissing||0);function n(a,p,e,s=!0,l=!0,u=""){let t=D(a),o=D(p);return e.wrapGlobalFlipSwitch||(s=!1),w(t)?Object.keys(t).forEach(r=>{let c=u+(u.length===0?r:`.${r}`);if(e.ignore.length===0||!e.ignore.includes(r)){if(e.wrapGlobalFlipSwitch&&(s=!0,e.dontWrapKeys.length&&(s=s&&!e.dontWrapKeys.some(d=>C(r,d,{caseSensitive:!0}))),e.dontWrapPaths.length&&(s=s&&!e.dontWrapPaths.some(d=>d===c)),e.preventWrappingIfContains.length&&typeof t[r]=="string"&&(s=s&&!e.preventWrappingIfContains.some(d=>t[r].includes(d)))),W(o[r])||!W(o[r])&&e.whatToDoWhenReferenceIsMissing===2)if(Array.isArray(t[r]))if(e.whatToDoWhenReferenceIsMissing===2||g(o[r]))t[r]=j(t[r],e,s,l);else{if(t[r].every(d=>typeof d=="string"||Array.isArray(d))){let d=!0;t[r].forEach(T=>{Array.isArray(T)&&!T.every(g)&&(d=!1)}),d&&(l=!1)}t[r]=n(t[r],o[r],e,s,l,c)}else w(t[r])?e.whatToDoWhenReferenceIsMissing===2||g(o[r])?t[r]=j(O(t[r],e),e,s,l):s?t[r]=n(t[r],o[r],e,s,l,c):t[r]=n(t[r],o[r],{...e,wrapGlobalFlipSwitch:!1},s,l,c):g(t[r])&&(t[r]=n(t[r],o[r],e,s,l,c));else if(typeof t[r]!=typeof o[r]&&e.whatToDoWhenReferenceIsMissing===1)throw new Error(`object-flatten-referencing/ofr(): [THROW_ID_06] resolvedReference object does not have the key ${r} and we need it. TIP: Turn off throwing via opts2.whatToDoWhenReferenceIsMissing.`)}}):Array.isArray(t)?Array.isArray(o)?t.forEach((r,c)=>{W(t[c])&&W(o[c])?t[c]=n(t[c],o[c],e,s,l,`${u}[${c}]`):t[c]=n(t[c],o[0],e,s,l,`${u}[${c}]`)}):g(o)&&(t=j(t,e,s,l)):g(t)&&t.length&&(e.wrapHeadsWith||e.wrapTailsWith)&&(!e.preventDoubleWrapping||(e.wrapHeadsWith===""||!A(t,e.wrapHeadsWith.trim()).length)&&(e.wrapTailsWith===""||!A(t,e.wrapTailsWith.trim()).length))&&(t=`${s?e.wrapHeadsWith:""}${t}${s?e.wrapTailsWith:""}`),t}return n(f,b,i)}export{m as arrayiffyString,v as defaults,j as flattenArr,O as flattenObject,q as flattenReferencing,J as version};
10
+ import D from"lodash.clonedeep";import{strIndexesOfPlus as A}from"str-indexes-of-plus";import{isMatch as C}from"matcher";import w from"lodash.isplainobject";import $ from"lodash.clonedeep";import I from"lodash.isplainobject";var v={wrapHeadsWith:"%%_",wrapTailsWith:"_%%",dontWrapKeys:[],dontWrapPaths:[],xhtml:!0,preventDoubleWrapping:!0,preventWrappingIfContains:[],objectKeyAndValueJoinChar:".",wrapGlobalFlipSwitch:!0,ignore:[],whatToDoWhenReferenceIsMissing:0,mergeArraysWithLineBreaks:!0,mergeWithoutTrailingBrIfLineContainsBr:!0,enforceStrictKeyset:!0};function y(f){return typeof f=="string"}function O(f,b){let h={...v,...b};if(arguments.length===0||Object.keys(f).length===0)return[];let i=$(f),n=[];return I(i)&&Object.keys(i).forEach(a=>{I(i[a])&&(i[a]=O(i[a],h)),Array.isArray(i[a])&&(n=n.concat(i[a].map(p=>`${a}${h.objectKeyAndValueJoinChar}${p}`))),y(i[a])&&n.push(`${a}${h.objectKeyAndValueJoinChar}${i[a]}`)}),n}function j(f,b,h=!1,i=!1){let n={...v,...b};if(arguments.length===0||f.length===0)return"";let a=$(f),p="";if(a.length)if(i){for(let e=0,s=a.length;e<s;e++)if(y(a[e])){let l;l="",n.mergeArraysWithLineBreaks&&e>0&&(!n.mergeWithoutTrailingBrIfLineContainsBr||typeof a[e-1]!="string"||n.mergeWithoutTrailingBrIfLineContainsBr&&a[e-1]!==void 0&&!a[e-1].toLowerCase().includes("<br"))&&(l=`<br${n.xhtml?" /":""}>`),p+=`${l}${h?n.wrapHeadsWith:""}${a[e]}${h?n.wrapTailsWith:""}`}else if(Array.isArray(a[e])&&a[e].length&&a[e].every(y)){let l="";n.mergeArraysWithLineBreaks&&p.length&&(l=`<br${n.xhtml?" /":""}>`),p=a[e].reduce((u,t,o,r)=>{let c="";return o!==r.length-1&&(c=" "),u+(o===0?l:"")+(h?n.wrapHeadsWith:"")+t+(h?n.wrapTailsWith:"")+c},p)}}else p=a.reduce((e,s,l,u)=>{let t="";n.mergeArraysWithLineBreaks&&l>0&&(t=`<br${n.xhtml?" /":""}>`);let o="";return l!==u.length-1&&(o=" "),`${e}${l===0?t:""}${h?n.wrapHeadsWith:""}${s}${h?n.wrapTailsWith:""}${o}`},p);return p}function m(f){return y(f)?f.length?[f]:[]:f}var x="6.2.1";var J=x;function W(f){return f!=null}function g(f){return typeof f=="string"}function q(f,b,h){if(arguments.length===0)throw new Error("object-flatten-referencing/ofr(): [THROW_ID_01] all inputs missing!");if(arguments.length===1)throw new Error("object-flatten-referencing/ofr(): [THROW_ID_02] resolvedReference object missing!");if(W(h)&&!w(h))throw new Error(`object-flatten-referencing/ofr(): [THROW_ID_03] third resolvedInput, options object must be a plain object. Currently it's: ${typeof h}`);let i={...v,...h};i.dontWrapKeys=m(i.dontWrapKeys),i.preventWrappingIfContains=m(i.preventWrappingIfContains),i.dontWrapPaths=m(i.dontWrapPaths),i.ignore=m(i.ignore),typeof i.whatToDoWhenReferenceIsMissing!="number"&&(i.whatToDoWhenReferenceIsMissing=+i.whatToDoWhenReferenceIsMissing||0);function n(a,p,e,s=!0,l=!0,u=""){let t=D(a),o=D(p);return e.wrapGlobalFlipSwitch||(s=!1),w(t)?Object.keys(t).forEach(r=>{let c=u+(u.length===0?r:`.${r}`);if(e.ignore.length===0||!e.ignore.includes(r)){if(e.wrapGlobalFlipSwitch&&(s=!0,e.dontWrapKeys.length&&(s=s&&!e.dontWrapKeys.some(d=>C(r,d,{caseSensitive:!0}))),e.dontWrapPaths.length&&(s=s&&!e.dontWrapPaths.some(d=>d===c)),e.preventWrappingIfContains.length&&typeof t[r]=="string"&&(s=s&&!e.preventWrappingIfContains.some(d=>t[r].includes(d)))),W(o[r])||!W(o[r])&&e.whatToDoWhenReferenceIsMissing===2)if(Array.isArray(t[r]))if(e.whatToDoWhenReferenceIsMissing===2||g(o[r]))t[r]=j(t[r],e,s,l);else{if(t[r].every(d=>typeof d=="string"||Array.isArray(d))){let d=!0;t[r].forEach(T=>{Array.isArray(T)&&!T.every(g)&&(d=!1)}),d&&(l=!1)}t[r]=n(t[r],o[r],e,s,l,c)}else w(t[r])?e.whatToDoWhenReferenceIsMissing===2||g(o[r])?t[r]=j(O(t[r],e),e,s,l):s?t[r]=n(t[r],o[r],e,s,l,c):t[r]=n(t[r],o[r],{...e,wrapGlobalFlipSwitch:!1},s,l,c):g(t[r])&&(t[r]=n(t[r],o[r],e,s,l,c));else if(typeof t[r]!=typeof o[r]&&e.whatToDoWhenReferenceIsMissing===1)throw new Error(`object-flatten-referencing/ofr(): [THROW_ID_06] resolvedReference object does not have the key ${r} and we need it. TIP: Turn off throwing via opts2.whatToDoWhenReferenceIsMissing.`)}}):Array.isArray(t)?Array.isArray(o)?t.forEach((r,c)=>{W(t[c])&&W(o[c])?t[c]=n(t[c],o[c],e,s,l,`${u}[${c}]`):t[c]=n(t[c],o[0],e,s,l,`${u}[${c}]`)}):g(o)&&(t=j(t,e,s,l)):g(t)&&t.length&&(e.wrapHeadsWith||e.wrapTailsWith)&&(!e.preventDoubleWrapping||(e.wrapHeadsWith===""||!A(t,e.wrapHeadsWith.trim()).length)&&(e.wrapTailsWith===""||!A(t,e.wrapTailsWith.trim()).length))&&(t=`${s?e.wrapHeadsWith:""}${t}${s?e.wrapTailsWith:""}`),t}return n(f,b,i)}export{m as arrayiffyString,v as defaults,j as flattenArr,O as flattenObject,q as flattenReferencing,J as version};
@@ -1,17 +1,17 @@
1
1
  /**
2
2
  * @name object-flatten-referencing
3
3
  * @fileoverview Flatten complex nested objects according to a reference objects
4
- * @version 6.1.2
4
+ * @version 6.2.1
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/object-flatten-referencing/}
8
8
  */
9
9
 
10
- var objectFlattenReferencing=(()=>{var yt=Object.create;var I=Object.defineProperty,_t=Object.defineProperties,mt=Object.getOwnPropertyDescriptor,wt=Object.getOwnPropertyDescriptors,vt=Object.getOwnPropertyNames,_e=Object.getOwnPropertySymbols,Ot=Object.getPrototypeOf,we=Object.prototype.hasOwnProperty,Tt=Object.prototype.propertyIsEnumerable;var me=(e,t,r)=>t in e?I(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y=(e,t)=>{for(var r in t||(t={}))we.call(t,r)&&me(e,r,t[r]);if(_e)for(var r of _e(t))Tt.call(t,r)&&me(e,r,t[r]);return e},ve=(e,t)=>_t(e,wt(t));var Oe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),jt=(e,t)=>{for(var r in t)I(e,r,{get:t[r],enumerable:!0})},Te=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of vt(t))!we.call(e,a)&&a!==r&&I(e,a,{get:()=>t[a],enumerable:!(n=mt(t,a))||n.enumerable});return e};var H=(e,t,r)=>(r=e!=null?yt(Ot(e)):{},Te(t||!e||!e.__esModule?I(r,"default",{value:e,enumerable:!0}):r,e)),xt=e=>Te(I({},"__esModule",{value:!0}),e);var ce=Oe(($,j)=>{var Wt=200,Me="__lodash_hash_undefined__",De=9007199254740991,re="[object Arguments]",At="[object Array]",He="[object Boolean]",Ke="[object Date]",St="[object Error]",ne="[object Function]",Le="[object GeneratorFunction]",K="[object Map]",Be="[object Number]",ie="[object Object]",je="[object Promise]",Fe="[object RegExp]",L="[object Set]",Ge="[object String]",Ne="[object Symbol]",Q="[object WeakMap]",Ve="[object ArrayBuffer]",B="[object DataView]",Je="[object Float32Array]",qe="[object Float64Array]",Xe="[object Int8Array]",Ye="[object Int16Array]",Ze="[object Int32Array]",Qe="[object Uint8Array]",ze="[object Uint8ClampedArray]",Ue="[object Uint16Array]",ke="[object Uint32Array]",Ct=/[\\^$.*+?()[\]{}|]/g,It=/\w*$/,$t=/^\[object .+?Constructor\]$/,Et=/^(?:0|[1-9]\d*)$/,h={};h[re]=h[At]=h[Ve]=h[B]=h[He]=h[Ke]=h[Je]=h[qe]=h[Xe]=h[Ye]=h[Ze]=h[K]=h[Be]=h[ie]=h[Fe]=h[L]=h[Ge]=h[Ne]=h[Qe]=h[ze]=h[Ue]=h[ke]=!0;h[St]=h[ne]=h[Q]=!1;var Pt=typeof global=="object"&&global&&global.Object===Object&&global,Rt=typeof self=="object"&&self&&self.Object===Object&&self,_=Pt||Rt||Function("return this")(),et=typeof $=="object"&&$&&!$.nodeType&&$,xe=et&&typeof j=="object"&&j&&!j.nodeType&&j,Mt=xe&&xe.exports===et;function Dt(e,t){return e.set(t[0],t[1]),e}function Ht(e,t){return e.add(t),e}function Kt(e,t){for(var r=-1,n=e?e.length:0;++r<n&&t(e[r],r,e)!==!1;);return e}function Lt(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}function tt(e,t,r,n){var a=-1,o=e?e.length:0;for(n&&o&&(r=e[++a]);++a<o;)r=t(r,e[a],a,e);return r}function Bt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Ft(e,t){return e==null?void 0:e[t]}function rt(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}function We(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}function ae(e,t){return function(r){return e(t(r))}}function Ae(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Gt=Array.prototype,Nt=Function.prototype,F=Object.prototype,Z=_["__core-js_shared__"],Se=function(){var e=/[^.]+$/.exec(Z&&Z.keys&&Z.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),nt=Nt.toString,w=F.hasOwnProperty,G=F.toString,Vt=RegExp("^"+nt.call(w).replace(Ct,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ce=Mt?_.Buffer:void 0,Ie=_.Symbol,$e=_.Uint8Array,Jt=ae(Object.getPrototypeOf,Object),qt=Object.create,Xt=F.propertyIsEnumerable,Yt=Gt.splice,Ee=Object.getOwnPropertySymbols,Zt=Ce?Ce.isBuffer:void 0,Qt=ae(Object.keys,Object),z=A(_,"DataView"),E=A(_,"Map"),U=A(_,"Promise"),k=A(_,"Set"),ee=A(_,"WeakMap"),P=A(Object,"create"),zt=T(z),Ut=T(E),kt=T(U),er=T(k),tr=T(ee),Pe=Ie?Ie.prototype:void 0,Re=Pe?Pe.valueOf:void 0;function O(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function rr(){this.__data__=P?P(null):{}}function nr(e){return this.has(e)&&delete this.__data__[e]}function ir(e){var t=this.__data__;if(P){var r=t[e];return r===Me?void 0:r}return w.call(t,e)?t[e]:void 0}function ar(e){var t=this.__data__;return P?t[e]!==void 0:w.call(t,e)}function or(e,t){var r=this.__data__;return r[e]=P&&t===void 0?Me:t,this}O.prototype.clear=rr;O.prototype.delete=nr;O.prototype.get=ir;O.prototype.has=ar;O.prototype.set=or;function m(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function sr(){this.__data__=[]}function fr(e){var t=this.__data__,r=N(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Yt.call(t,r,1),!0}function cr(e){var t=this.__data__,r=N(t,e);return r<0?void 0:t[r][1]}function lr(e){return N(this.__data__,e)>-1}function ur(e,t){var r=this.__data__,n=N(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}m.prototype.clear=sr;m.prototype.delete=fr;m.prototype.get=cr;m.prototype.has=lr;m.prototype.set=ur;function x(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function hr(){this.__data__={hash:new O,map:new(E||m),string:new O}}function pr(e){return V(this,e).delete(e)}function gr(e){return V(this,e).get(e)}function dr(e){return V(this,e).has(e)}function br(e,t){return V(this,e).set(e,t),this}x.prototype.clear=hr;x.prototype.delete=pr;x.prototype.get=gr;x.prototype.has=dr;x.prototype.set=br;function W(e){this.__data__=new m(e)}function yr(){this.__data__=new m}function _r(e){return this.__data__.delete(e)}function mr(e){return this.__data__.get(e)}function wr(e){return this.__data__.has(e)}function vr(e,t){var r=this.__data__;if(r instanceof m){var n=r.__data__;if(!E||n.length<Wt-1)return n.push([e,t]),this;r=this.__data__=new x(n)}return r.set(e,t),this}W.prototype.clear=yr;W.prototype.delete=_r;W.prototype.get=mr;W.prototype.has=wr;W.prototype.set=vr;function Or(e,t){var r=se(e)||qr(e)?Bt(e.length,String):[],n=r.length,a=!!n;for(var o in e)(t||w.call(e,o))&&!(a&&(o=="length"||Gr(o,n)))&&r.push(o);return r}function it(e,t,r){var n=e[t];(!(w.call(e,t)&&ft(n,r))||r===void 0&&!(t in e))&&(e[t]=r)}function N(e,t){for(var r=e.length;r--;)if(ft(e[r][0],t))return r;return-1}function Tr(e,t){return e&&at(t,fe(t),e)}function te(e,t,r,n,a,o,u){var i;if(n&&(i=o?n(e,a,o,u):n(e)),i!==void 0)return i;if(!J(e))return e;var c=se(e);if(c){if(i=Lr(e),!t)return Dr(e,i)}else{var l=v(e),d=l==ne||l==Le;if(Yr(e))return Cr(e,t);if(l==ie||l==re||d&&!o){if(rt(e))return o?e:{};if(i=Br(d?{}:e),!t)return Hr(e,Tr(i,e))}else{if(!h[l])return o?e:{};i=Fr(e,l,te,t)}}u||(u=new W);var s=u.get(e);if(s)return s;if(u.set(e,i),!c)var p=r?Kr(e):fe(e);return Kt(p||e,function(f,g){p&&(g=f,f=e[g]),it(i,g,te(f,t,r,n,g,e,u))}),i}function jr(e){return J(e)?qt(e):{}}function xr(e,t,r){var n=t(e);return se(e)?n:Lt(n,r(e))}function Wr(e){return G.call(e)}function Ar(e){if(!J(e)||Vr(e))return!1;var t=lt(e)||rt(e)?Vt:$t;return t.test(T(e))}function Sr(e){if(!st(e))return Qt(e);var t=[];for(var r in Object(e))w.call(e,r)&&r!="constructor"&&t.push(r);return t}function Cr(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}function oe(e){var t=new e.constructor(e.byteLength);return new $e(t).set(new $e(e)),t}function Ir(e,t){var r=t?oe(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function $r(e,t,r){var n=t?r(We(e),!0):We(e);return tt(n,Dt,new e.constructor)}function Er(e){var t=new e.constructor(e.source,It.exec(e));return t.lastIndex=e.lastIndex,t}function Pr(e,t,r){var n=t?r(Ae(e),!0):Ae(e);return tt(n,Ht,new e.constructor)}function Rr(e){return Re?Object(Re.call(e)):{}}function Mr(e,t){var r=t?oe(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Dr(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function at(e,t,r,n){r||(r={});for(var a=-1,o=t.length;++a<o;){var u=t[a],i=n?n(r[u],e[u],u,r,e):void 0;it(r,u,i===void 0?e[u]:i)}return r}function Hr(e,t){return at(e,ot(e),t)}function Kr(e){return xr(e,fe,ot)}function V(e,t){var r=e.__data__;return Nr(t)?r[typeof t=="string"?"string":"hash"]:r.map}function A(e,t){var r=Ft(e,t);return Ar(r)?r:void 0}var ot=Ee?ae(Ee,Object):zr,v=Wr;(z&&v(new z(new ArrayBuffer(1)))!=B||E&&v(new E)!=K||U&&v(U.resolve())!=je||k&&v(new k)!=L||ee&&v(new ee)!=Q)&&(v=function(e){var t=G.call(e),r=t==ie?e.constructor:void 0,n=r?T(r):void 0;if(n)switch(n){case zt:return B;case Ut:return K;case kt:return je;case er:return L;case tr:return Q}return t});function Lr(e){var t=e.length,r=e.constructor(t);return t&&typeof e[0]=="string"&&w.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function Br(e){return typeof e.constructor=="function"&&!st(e)?jr(Jt(e)):{}}function Fr(e,t,r,n){var a=e.constructor;switch(t){case Ve:return oe(e);case He:case Ke:return new a(+e);case B:return Ir(e,n);case Je:case qe:case Xe:case Ye:case Ze:case Qe:case ze:case Ue:case ke:return Mr(e,n);case K:return $r(e,n,r);case Be:case Ge:return new a(e);case Fe:return Er(e);case L:return Pr(e,n,r);case Ne:return Rr(e)}}function Gr(e,t){return t=t==null?De:t,!!t&&(typeof e=="number"||Et.test(e))&&e>-1&&e%1==0&&e<t}function Nr(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Vr(e){return!!Se&&Se in e}function st(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||F;return e===r}function T(e){if(e!=null){try{return nt.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Jr(e){return te(e,!0,!0)}function ft(e,t){return e===t||e!==e&&t!==t}function qr(e){return Xr(e)&&w.call(e,"callee")&&(!Xt.call(e,"callee")||G.call(e)==re)}var se=Array.isArray;function ct(e){return e!=null&&Zr(e.length)&&!lt(e)}function Xr(e){return Qr(e)&&ct(e)}var Yr=Zt||Ur;function lt(e){var t=J(e)?G.call(e):"";return t==ne||t==Le}function Zr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=De}function J(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Qr(e){return!!e&&typeof e=="object"}function fe(e){return ct(e)?Or(e):Sr(e)}function zr(){return[]}function Ur(){return!1}j.exports=Jr});var pe=Oe((vn,dt)=>{var tn="[object Object]";function rn(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}function nn(e,t){return function(r){return e(t(r))}}var an=Function.prototype,pt=Object.prototype,gt=an.toString,on=pt.hasOwnProperty,sn=gt.call(Object),fn=pt.toString,cn=nn(Object.getPrototypeOf,Object);function ln(e){return!!e&&typeof e=="object"}function un(e){if(!ln(e)||fn.call(e)!=tn||rn(e))return!1;var t=cn(e);if(t===null)return!0;var r=on.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&gt.call(r)==sn}dt.exports=un});var dn={};jt(dn,{arrayiffyString:()=>S,defaults:()=>R,flattenArr:()=>M,flattenObject:()=>X,flattenReferencing:()=>gn,version:()=>pn});var be=H(ce(),1);function le(e,t,r=0){if(typeof e!="string")throw new TypeError(`str-indexes-of-plus/strIndexesOfPlus(): first input argument must be a string! Currently it's: ${typeof e}`);if(typeof t!="string")throw new TypeError(`str-indexes-of-plus/strIndexesOfPlus(): second input argument must be a string! Currently it's: ${typeof t}`);if(isNaN(+r)||typeof r=="string"&&!/^\d*$/.test(r))throw new TypeError(`str-indexes-of-plus/strIndexesOfPlus(): third input argument must be a natural number! Currently it's: ${r}`);let n=Array.from(e),a=Array.from(t);if(n.length===0||a.length===0||r!=null&&+r>=n.length)return[];r||(r=0);let o=[],u=!1,i;for(let c=r,l=n.length;c<l;c++)u&&(n[c]===a[c-+i]?c-+i+1===a.length&&o.push(+i):(i=null,u=!1)),u||n[c]===a[0]&&(a.length===1?o.push(c):(u=!0,i=c));return o}function ue(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var he=new Map,ut=(e,t)=>{if(!Array.isArray(e))switch(typeof e){case"string":e=[e];break;case"undefined":e=[];break;default:throw new TypeError(`Expected '${t}' to be a string or an array, but got a type of '${typeof e}'`)}return e.filter(r=>{if(typeof r!="string"){if(typeof r>"u")return!1;throw new TypeError(`Expected '${t}' to be an array of strings, but found a type of '${typeof r}' in the array`)}return!0})},kr=(e,t)=>{t=y({caseSensitive:!1},t);let r=e+JSON.stringify(t);if(he.has(r))return he.get(r);let n=e[0]==="!";n&&(e=e.slice(1)),e=ue(e).replace(/\\\*/g,"[\\s\\S]*");let a=new RegExp(`^${e}$`,t.caseSensitive?"":"i");return a.negated=n,he.set(r,a),a},en=(e,t,r,n)=>{if(e=ut(e,"inputs"),t=ut(t,"patterns"),t.length===0)return[];t=t.map(u=>kr(u,r));let{allPatterns:a}=r||{},o=[];for(let u of e){let i,c=[...t].fill(!1);for(let[l,d]of t.entries())if(d.test(u)&&(c[l]=!0,i=!d.negated,!i))break;if(!(i===!1||i===void 0&&t.some(l=>!l.negated)||a&&c.some((l,d)=>!l&&!t[d].negated))&&(o.push(u),n))break}return o};function ht(e,t,r){return en(e,t,r,!0).length>0}var Y=H(pe(),1);var de=H(ce(),1),ge=H(pe(),1),R={wrapHeadsWith:"%%_",wrapTailsWith:"_%%",dontWrapKeys:[],dontWrapPaths:[],xhtml:!0,preventDoubleWrapping:!0,preventWrappingIfContains:[],objectKeyAndValueJoinChar:".",wrapGlobalFlipSwitch:!0,ignore:[],whatToDoWhenReferenceIsMissing:0,mergeArraysWithLineBreaks:!0,mergeWithoutTrailingBrIfLineContainsBr:!0,enforceStrictKeyset:!0};function q(e){return typeof e=="string"}function X(e,t){let r=y(y({},R),t);if(arguments.length===0||Object.keys(e).length===0)return[];let n=(0,de.default)(e),a=[];return(0,ge.default)(n)&&Object.keys(n).forEach(o=>{(0,ge.default)(n[o])&&(n[o]=X(n[o],r)),Array.isArray(n[o])&&(a=a.concat(n[o].map(u=>`${o}${r.objectKeyAndValueJoinChar}${u}`))),q(n[o])&&a.push(`${o}${r.objectKeyAndValueJoinChar}${n[o]}`)}),a}function M(e,t,r=!1,n=!1){let a=y(y({},R),t);if(arguments.length===0||e.length===0)return"";let o=(0,de.default)(e),u="";if(o.length)if(n){for(let i=0,c=o.length;i<c;i++)if(q(o[i])){let l;l="",a.mergeArraysWithLineBreaks&&i>0&&(!a.mergeWithoutTrailingBrIfLineContainsBr||typeof o[i-1]!="string"||a.mergeWithoutTrailingBrIfLineContainsBr&&o[i-1]!==void 0&&!o[i-1].toLowerCase().includes("<br"))&&(l=`<br${a.xhtml?" /":""}>`),u+=`${l}${r?a.wrapHeadsWith:""}${o[i]}${r?a.wrapTailsWith:""}`}else if(Array.isArray(o[i])&&o[i].length&&o[i].every(q)){let l="";a.mergeArraysWithLineBreaks&&u.length&&(l=`<br${a.xhtml?" /":""}>`),u=o[i].reduce((d,s,p,f)=>{let g="";return p!==f.length-1&&(g=" "),d+(p===0?l:"")+(r?a.wrapHeadsWith:"")+s+(r?a.wrapTailsWith:"")+g},u)}}else u=o.reduce((i,c,l,d)=>{let s="";a.mergeArraysWithLineBreaks&&l>0&&(s=`<br${a.xhtml?" /":""}>`);let p="";return l!==d.length-1&&(p=" "),`${i}${l===0?s:""}${r?a.wrapHeadsWith:""}${c}${r?a.wrapTailsWith:""}${p}`},u);return u}function S(e){return q(e)?e.length?[e]:[]:e}var bt="6.1.2";var pn=bt;function D(e){return e!=null}function C(e){return typeof e=="string"}function gn(e,t,r){if(arguments.length===0)throw new Error("object-flatten-referencing/ofr(): [THROW_ID_01] all inputs missing!");if(arguments.length===1)throw new Error("object-flatten-referencing/ofr(): [THROW_ID_02] resolvedReference object missing!");if(D(r)&&!(0,Y.default)(r))throw new Error(`object-flatten-referencing/ofr(): [THROW_ID_03] third resolvedInput, options object must be a plain object. Currently it's: ${typeof r}`);let n=y(y({},R),r);n.dontWrapKeys=S(n.dontWrapKeys),n.preventWrappingIfContains=S(n.preventWrappingIfContains),n.dontWrapPaths=S(n.dontWrapPaths),n.ignore=S(n.ignore),typeof n.whatToDoWhenReferenceIsMissing!="number"&&(n.whatToDoWhenReferenceIsMissing=+n.whatToDoWhenReferenceIsMissing||0);function a(o,u,i,c=!0,l=!0,d=""){let s=(0,be.default)(o),p=(0,be.default)(u);return i.wrapGlobalFlipSwitch||(c=!1),(0,Y.default)(s)?Object.keys(s).forEach(f=>{let g=d+(d.length===0?f:`.${f}`);if(i.ignore.length===0||!i.ignore.includes(f)){if(i.wrapGlobalFlipSwitch&&(c=!0,i.dontWrapKeys.length&&(c=c&&!i.dontWrapKeys.some(b=>ht(f,b,{caseSensitive:!0}))),i.dontWrapPaths.length&&(c=c&&!i.dontWrapPaths.some(b=>b===g)),i.preventWrappingIfContains.length&&typeof s[f]=="string"&&(c=c&&!i.preventWrappingIfContains.some(b=>s[f].includes(b)))),D(p[f])||!D(p[f])&&i.whatToDoWhenReferenceIsMissing===2)if(Array.isArray(s[f]))if(i.whatToDoWhenReferenceIsMissing===2||C(p[f]))s[f]=M(s[f],i,c,l);else{if(s[f].every(b=>typeof b=="string"||Array.isArray(b))){let b=!0;s[f].forEach(ye=>{Array.isArray(ye)&&!ye.every(C)&&(b=!1)}),b&&(l=!1)}s[f]=a(s[f],p[f],i,c,l,g)}else(0,Y.default)(s[f])?i.whatToDoWhenReferenceIsMissing===2||C(p[f])?s[f]=M(X(s[f],i),i,c,l):c?s[f]=a(s[f],p[f],i,c,l,g):s[f]=a(s[f],p[f],ve(y({},i),{wrapGlobalFlipSwitch:!1}),c,l,g):C(s[f])&&(s[f]=a(s[f],p[f],i,c,l,g));else if(typeof s[f]!=typeof p[f]&&i.whatToDoWhenReferenceIsMissing===1)throw new Error(`object-flatten-referencing/ofr(): [THROW_ID_06] resolvedReference object does not have the key ${f} and we need it. TIP: Turn off throwing via opts2.whatToDoWhenReferenceIsMissing.`)}}):Array.isArray(s)?Array.isArray(p)?s.forEach((f,g)=>{D(s[g])&&D(p[g])?s[g]=a(s[g],p[g],i,c,l,`${d}[${g}]`):s[g]=a(s[g],p[0],i,c,l,`${d}[${g}]`)}):C(p)&&(s=M(s,i,c,l)):C(s)&&s.length&&(i.wrapHeadsWith||i.wrapTailsWith)&&(!i.preventDoubleWrapping||(i.wrapHeadsWith===""||!le(s,i.wrapHeadsWith.trim()).length)&&(i.wrapTailsWith===""||!le(s,i.wrapTailsWith.trim()).length))&&(s=`${c?i.wrapHeadsWith:""}${s}${c?i.wrapTailsWith:""}`),s}return a(e,t,n)}return xt(dn);})();
10
+ "use strict";var objectFlattenReferencing=(()=>{var yt=Object.create;var I=Object.defineProperty,_t=Object.defineProperties,mt=Object.getOwnPropertyDescriptor,wt=Object.getOwnPropertyDescriptors,vt=Object.getOwnPropertyNames,_e=Object.getOwnPropertySymbols,Ot=Object.getPrototypeOf,we=Object.prototype.hasOwnProperty,Tt=Object.prototype.propertyIsEnumerable;var me=(e,t,r)=>t in e?I(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y=(e,t)=>{for(var r in t||(t={}))we.call(t,r)&&me(e,r,t[r]);if(_e)for(var r of _e(t))Tt.call(t,r)&&me(e,r,t[r]);return e},ve=(e,t)=>_t(e,wt(t));var Oe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),jt=(e,t)=>{for(var r in t)I(e,r,{get:t[r],enumerable:!0})},Te=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of vt(t))!we.call(e,a)&&a!==r&&I(e,a,{get:()=>t[a],enumerable:!(n=mt(t,a))||n.enumerable});return e};var H=(e,t,r)=>(r=e!=null?yt(Ot(e)):{},Te(t||!e||!e.__esModule?I(r,"default",{value:e,enumerable:!0}):r,e)),xt=e=>Te(I({},"__esModule",{value:!0}),e);var ce=Oe(($,j)=>{var Wt=200,Me="__lodash_hash_undefined__",De=9007199254740991,re="[object Arguments]",At="[object Array]",He="[object Boolean]",Ke="[object Date]",St="[object Error]",ne="[object Function]",Le="[object GeneratorFunction]",K="[object Map]",Be="[object Number]",ie="[object Object]",je="[object Promise]",Fe="[object RegExp]",L="[object Set]",Ge="[object String]",Ne="[object Symbol]",Q="[object WeakMap]",Ve="[object ArrayBuffer]",B="[object DataView]",Je="[object Float32Array]",qe="[object Float64Array]",Xe="[object Int8Array]",Ye="[object Int16Array]",Ze="[object Int32Array]",Qe="[object Uint8Array]",ze="[object Uint8ClampedArray]",Ue="[object Uint16Array]",ke="[object Uint32Array]",Ct=/[\\^$.*+?()[\]{}|]/g,It=/\w*$/,$t=/^\[object .+?Constructor\]$/,Et=/^(?:0|[1-9]\d*)$/,h={};h[re]=h[At]=h[Ve]=h[B]=h[He]=h[Ke]=h[Je]=h[qe]=h[Xe]=h[Ye]=h[Ze]=h[K]=h[Be]=h[ie]=h[Fe]=h[L]=h[Ge]=h[Ne]=h[Qe]=h[ze]=h[Ue]=h[ke]=!0;h[St]=h[ne]=h[Q]=!1;var Pt=typeof global=="object"&&global&&global.Object===Object&&global,Rt=typeof self=="object"&&self&&self.Object===Object&&self,_=Pt||Rt||Function("return this")(),et=typeof $=="object"&&$&&!$.nodeType&&$,xe=et&&typeof j=="object"&&j&&!j.nodeType&&j,Mt=xe&&xe.exports===et;function Dt(e,t){return e.set(t[0],t[1]),e}function Ht(e,t){return e.add(t),e}function Kt(e,t){for(var r=-1,n=e?e.length:0;++r<n&&t(e[r],r,e)!==!1;);return e}function Lt(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}function tt(e,t,r,n){var a=-1,o=e?e.length:0;for(n&&o&&(r=e[++a]);++a<o;)r=t(r,e[a],a,e);return r}function Bt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Ft(e,t){return e==null?void 0:e[t]}function rt(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}function We(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}function ae(e,t){return function(r){return e(t(r))}}function Ae(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Gt=Array.prototype,Nt=Function.prototype,F=Object.prototype,Z=_["__core-js_shared__"],Se=function(){var e=/[^.]+$/.exec(Z&&Z.keys&&Z.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),nt=Nt.toString,w=F.hasOwnProperty,G=F.toString,Vt=RegExp("^"+nt.call(w).replace(Ct,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ce=Mt?_.Buffer:void 0,Ie=_.Symbol,$e=_.Uint8Array,Jt=ae(Object.getPrototypeOf,Object),qt=Object.create,Xt=F.propertyIsEnumerable,Yt=Gt.splice,Ee=Object.getOwnPropertySymbols,Zt=Ce?Ce.isBuffer:void 0,Qt=ae(Object.keys,Object),z=A(_,"DataView"),E=A(_,"Map"),U=A(_,"Promise"),k=A(_,"Set"),ee=A(_,"WeakMap"),P=A(Object,"create"),zt=T(z),Ut=T(E),kt=T(U),er=T(k),tr=T(ee),Pe=Ie?Ie.prototype:void 0,Re=Pe?Pe.valueOf:void 0;function O(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function rr(){this.__data__=P?P(null):{}}function nr(e){return this.has(e)&&delete this.__data__[e]}function ir(e){var t=this.__data__;if(P){var r=t[e];return r===Me?void 0:r}return w.call(t,e)?t[e]:void 0}function ar(e){var t=this.__data__;return P?t[e]!==void 0:w.call(t,e)}function or(e,t){var r=this.__data__;return r[e]=P&&t===void 0?Me:t,this}O.prototype.clear=rr;O.prototype.delete=nr;O.prototype.get=ir;O.prototype.has=ar;O.prototype.set=or;function m(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function sr(){this.__data__=[]}function fr(e){var t=this.__data__,r=N(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Yt.call(t,r,1),!0}function cr(e){var t=this.__data__,r=N(t,e);return r<0?void 0:t[r][1]}function lr(e){return N(this.__data__,e)>-1}function ur(e,t){var r=this.__data__,n=N(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}m.prototype.clear=sr;m.prototype.delete=fr;m.prototype.get=cr;m.prototype.has=lr;m.prototype.set=ur;function x(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function hr(){this.__data__={hash:new O,map:new(E||m),string:new O}}function pr(e){return V(this,e).delete(e)}function gr(e){return V(this,e).get(e)}function dr(e){return V(this,e).has(e)}function br(e,t){return V(this,e).set(e,t),this}x.prototype.clear=hr;x.prototype.delete=pr;x.prototype.get=gr;x.prototype.has=dr;x.prototype.set=br;function W(e){this.__data__=new m(e)}function yr(){this.__data__=new m}function _r(e){return this.__data__.delete(e)}function mr(e){return this.__data__.get(e)}function wr(e){return this.__data__.has(e)}function vr(e,t){var r=this.__data__;if(r instanceof m){var n=r.__data__;if(!E||n.length<Wt-1)return n.push([e,t]),this;r=this.__data__=new x(n)}return r.set(e,t),this}W.prototype.clear=yr;W.prototype.delete=_r;W.prototype.get=mr;W.prototype.has=wr;W.prototype.set=vr;function Or(e,t){var r=se(e)||qr(e)?Bt(e.length,String):[],n=r.length,a=!!n;for(var o in e)(t||w.call(e,o))&&!(a&&(o=="length"||Gr(o,n)))&&r.push(o);return r}function it(e,t,r){var n=e[t];(!(w.call(e,t)&&ft(n,r))||r===void 0&&!(t in e))&&(e[t]=r)}function N(e,t){for(var r=e.length;r--;)if(ft(e[r][0],t))return r;return-1}function Tr(e,t){return e&&at(t,fe(t),e)}function te(e,t,r,n,a,o,u){var i;if(n&&(i=o?n(e,a,o,u):n(e)),i!==void 0)return i;if(!J(e))return e;var c=se(e);if(c){if(i=Lr(e),!t)return Dr(e,i)}else{var l=v(e),d=l==ne||l==Le;if(Yr(e))return Cr(e,t);if(l==ie||l==re||d&&!o){if(rt(e))return o?e:{};if(i=Br(d?{}:e),!t)return Hr(e,Tr(i,e))}else{if(!h[l])return o?e:{};i=Fr(e,l,te,t)}}u||(u=new W);var s=u.get(e);if(s)return s;if(u.set(e,i),!c)var p=r?Kr(e):fe(e);return Kt(p||e,function(f,g){p&&(g=f,f=e[g]),it(i,g,te(f,t,r,n,g,e,u))}),i}function jr(e){return J(e)?qt(e):{}}function xr(e,t,r){var n=t(e);return se(e)?n:Lt(n,r(e))}function Wr(e){return G.call(e)}function Ar(e){if(!J(e)||Vr(e))return!1;var t=lt(e)||rt(e)?Vt:$t;return t.test(T(e))}function Sr(e){if(!st(e))return Qt(e);var t=[];for(var r in Object(e))w.call(e,r)&&r!="constructor"&&t.push(r);return t}function Cr(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}function oe(e){var t=new e.constructor(e.byteLength);return new $e(t).set(new $e(e)),t}function Ir(e,t){var r=t?oe(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function $r(e,t,r){var n=t?r(We(e),!0):We(e);return tt(n,Dt,new e.constructor)}function Er(e){var t=new e.constructor(e.source,It.exec(e));return t.lastIndex=e.lastIndex,t}function Pr(e,t,r){var n=t?r(Ae(e),!0):Ae(e);return tt(n,Ht,new e.constructor)}function Rr(e){return Re?Object(Re.call(e)):{}}function Mr(e,t){var r=t?oe(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Dr(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function at(e,t,r,n){r||(r={});for(var a=-1,o=t.length;++a<o;){var u=t[a],i=n?n(r[u],e[u],u,r,e):void 0;it(r,u,i===void 0?e[u]:i)}return r}function Hr(e,t){return at(e,ot(e),t)}function Kr(e){return xr(e,fe,ot)}function V(e,t){var r=e.__data__;return Nr(t)?r[typeof t=="string"?"string":"hash"]:r.map}function A(e,t){var r=Ft(e,t);return Ar(r)?r:void 0}var ot=Ee?ae(Ee,Object):zr,v=Wr;(z&&v(new z(new ArrayBuffer(1)))!=B||E&&v(new E)!=K||U&&v(U.resolve())!=je||k&&v(new k)!=L||ee&&v(new ee)!=Q)&&(v=function(e){var t=G.call(e),r=t==ie?e.constructor:void 0,n=r?T(r):void 0;if(n)switch(n){case zt:return B;case Ut:return K;case kt:return je;case er:return L;case tr:return Q}return t});function Lr(e){var t=e.length,r=e.constructor(t);return t&&typeof e[0]=="string"&&w.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function Br(e){return typeof e.constructor=="function"&&!st(e)?jr(Jt(e)):{}}function Fr(e,t,r,n){var a=e.constructor;switch(t){case Ve:return oe(e);case He:case Ke:return new a(+e);case B:return Ir(e,n);case Je:case qe:case Xe:case Ye:case Ze:case Qe:case ze:case Ue:case ke:return Mr(e,n);case K:return $r(e,n,r);case Be:case Ge:return new a(e);case Fe:return Er(e);case L:return Pr(e,n,r);case Ne:return Rr(e)}}function Gr(e,t){return t=t==null?De:t,!!t&&(typeof e=="number"||Et.test(e))&&e>-1&&e%1==0&&e<t}function Nr(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Vr(e){return!!Se&&Se in e}function st(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||F;return e===r}function T(e){if(e!=null){try{return nt.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Jr(e){return te(e,!0,!0)}function ft(e,t){return e===t||e!==e&&t!==t}function qr(e){return Xr(e)&&w.call(e,"callee")&&(!Xt.call(e,"callee")||G.call(e)==re)}var se=Array.isArray;function ct(e){return e!=null&&Zr(e.length)&&!lt(e)}function Xr(e){return Qr(e)&&ct(e)}var Yr=Zt||Ur;function lt(e){var t=J(e)?G.call(e):"";return t==ne||t==Le}function Zr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=De}function J(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Qr(e){return!!e&&typeof e=="object"}function fe(e){return ct(e)?Or(e):Sr(e)}function zr(){return[]}function Ur(){return!1}j.exports=Jr});var pe=Oe((vn,dt)=>{var tn="[object Object]";function rn(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}function nn(e,t){return function(r){return e(t(r))}}var an=Function.prototype,pt=Object.prototype,gt=an.toString,on=pt.hasOwnProperty,sn=gt.call(Object),fn=pt.toString,cn=nn(Object.getPrototypeOf,Object);function ln(e){return!!e&&typeof e=="object"}function un(e){if(!ln(e)||fn.call(e)!=tn||rn(e))return!1;var t=cn(e);if(t===null)return!0;var r=on.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&gt.call(r)==sn}dt.exports=un});var dn={};jt(dn,{arrayiffyString:()=>S,defaults:()=>R,flattenArr:()=>M,flattenObject:()=>X,flattenReferencing:()=>gn,version:()=>pn});var be=H(ce(),1);function le(e,t,r=0){if(typeof e!="string")throw new TypeError(`str-indexes-of-plus/strIndexesOfPlus(): first input argument must be a string! Currently it's: ${typeof e}`);if(typeof t!="string")throw new TypeError(`str-indexes-of-plus/strIndexesOfPlus(): second input argument must be a string! Currently it's: ${typeof t}`);if(isNaN(+r)||typeof r=="string"&&!/^\d*$/.test(r))throw new TypeError(`str-indexes-of-plus/strIndexesOfPlus(): third input argument must be a natural number! Currently it's: ${r}`);let n=Array.from(e),a=Array.from(t);if(n.length===0||a.length===0||r!=null&&+r>=n.length)return[];r||(r=0);let o=[],u=!1,i;for(let c=r,l=n.length;c<l;c++)u&&(n[c]===a[c-+i]?c-+i+1===a.length&&o.push(+i):(i=null,u=!1)),u||n[c]===a[0]&&(a.length===1?o.push(c):(u=!0,i=c));return o}function ue(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var he=new Map,ut=(e,t)=>{if(!Array.isArray(e))switch(typeof e){case"string":e=[e];break;case"undefined":e=[];break;default:throw new TypeError(`Expected '${t}' to be a string or an array, but got a type of '${typeof e}'`)}return e.filter(r=>{if(typeof r!="string"){if(typeof r>"u")return!1;throw new TypeError(`Expected '${t}' to be an array of strings, but found a type of '${typeof r}' in the array`)}return!0})},kr=(e,t)=>{t=y({caseSensitive:!1},t);let r=e+JSON.stringify(t);if(he.has(r))return he.get(r);let n=e[0]==="!";n&&(e=e.slice(1)),e=ue(e).replace(/\\\*/g,"[\\s\\S]*");let a=new RegExp(`^${e}$`,t.caseSensitive?"":"i");return a.negated=n,he.set(r,a),a},en=(e,t,r,n)=>{if(e=ut(e,"inputs"),t=ut(t,"patterns"),t.length===0)return[];t=t.map(u=>kr(u,r));let{allPatterns:a}=r||{},o=[];for(let u of e){let i,c=[...t].fill(!1);for(let[l,d]of t.entries())if(d.test(u)&&(c[l]=!0,i=!d.negated,!i))break;if(!(i===!1||i===void 0&&t.some(l=>!l.negated)||a&&c.some((l,d)=>!l&&!t[d].negated))&&(o.push(u),n))break}return o};function ht(e,t,r){return en(e,t,r,!0).length>0}var Y=H(pe(),1);var de=H(ce(),1),ge=H(pe(),1);var R={wrapHeadsWith:"%%_",wrapTailsWith:"_%%",dontWrapKeys:[],dontWrapPaths:[],xhtml:!0,preventDoubleWrapping:!0,preventWrappingIfContains:[],objectKeyAndValueJoinChar:".",wrapGlobalFlipSwitch:!0,ignore:[],whatToDoWhenReferenceIsMissing:0,mergeArraysWithLineBreaks:!0,mergeWithoutTrailingBrIfLineContainsBr:!0,enforceStrictKeyset:!0};function q(e){return typeof e=="string"}function X(e,t){let r=y(y({},R),t);if(arguments.length===0||Object.keys(e).length===0)return[];let n=(0,de.default)(e),a=[];return(0,ge.default)(n)&&Object.keys(n).forEach(o=>{(0,ge.default)(n[o])&&(n[o]=X(n[o],r)),Array.isArray(n[o])&&(a=a.concat(n[o].map(u=>`${o}${r.objectKeyAndValueJoinChar}${u}`))),q(n[o])&&a.push(`${o}${r.objectKeyAndValueJoinChar}${n[o]}`)}),a}function M(e,t,r=!1,n=!1){let a=y(y({},R),t);if(arguments.length===0||e.length===0)return"";let o=(0,de.default)(e),u="";if(o.length)if(n){for(let i=0,c=o.length;i<c;i++)if(q(o[i])){let l;l="",a.mergeArraysWithLineBreaks&&i>0&&(!a.mergeWithoutTrailingBrIfLineContainsBr||typeof o[i-1]!="string"||a.mergeWithoutTrailingBrIfLineContainsBr&&o[i-1]!==void 0&&!o[i-1].toLowerCase().includes("<br"))&&(l=`<br${a.xhtml?" /":""}>`),u+=`${l}${r?a.wrapHeadsWith:""}${o[i]}${r?a.wrapTailsWith:""}`}else if(Array.isArray(o[i])&&o[i].length&&o[i].every(q)){let l="";a.mergeArraysWithLineBreaks&&u.length&&(l=`<br${a.xhtml?" /":""}>`),u=o[i].reduce((d,s,p,f)=>{let g="";return p!==f.length-1&&(g=" "),d+(p===0?l:"")+(r?a.wrapHeadsWith:"")+s+(r?a.wrapTailsWith:"")+g},u)}}else u=o.reduce((i,c,l,d)=>{let s="";a.mergeArraysWithLineBreaks&&l>0&&(s=`<br${a.xhtml?" /":""}>`);let p="";return l!==d.length-1&&(p=" "),`${i}${l===0?s:""}${r?a.wrapHeadsWith:""}${c}${r?a.wrapTailsWith:""}${p}`},u);return u}function S(e){return q(e)?e.length?[e]:[]:e}var bt="6.2.1";var pn=bt;function D(e){return e!=null}function C(e){return typeof e=="string"}function gn(e,t,r){if(arguments.length===0)throw new Error("object-flatten-referencing/ofr(): [THROW_ID_01] all inputs missing!");if(arguments.length===1)throw new Error("object-flatten-referencing/ofr(): [THROW_ID_02] resolvedReference object missing!");if(D(r)&&!(0,Y.default)(r))throw new Error(`object-flatten-referencing/ofr(): [THROW_ID_03] third resolvedInput, options object must be a plain object. Currently it's: ${typeof r}`);let n=y(y({},R),r);n.dontWrapKeys=S(n.dontWrapKeys),n.preventWrappingIfContains=S(n.preventWrappingIfContains),n.dontWrapPaths=S(n.dontWrapPaths),n.ignore=S(n.ignore),typeof n.whatToDoWhenReferenceIsMissing!="number"&&(n.whatToDoWhenReferenceIsMissing=+n.whatToDoWhenReferenceIsMissing||0);function a(o,u,i,c=!0,l=!0,d=""){let s=(0,be.default)(o),p=(0,be.default)(u);return i.wrapGlobalFlipSwitch||(c=!1),(0,Y.default)(s)?Object.keys(s).forEach(f=>{let g=d+(d.length===0?f:`.${f}`);if(i.ignore.length===0||!i.ignore.includes(f)){if(i.wrapGlobalFlipSwitch&&(c=!0,i.dontWrapKeys.length&&(c=c&&!i.dontWrapKeys.some(b=>ht(f,b,{caseSensitive:!0}))),i.dontWrapPaths.length&&(c=c&&!i.dontWrapPaths.some(b=>b===g)),i.preventWrappingIfContains.length&&typeof s[f]=="string"&&(c=c&&!i.preventWrappingIfContains.some(b=>s[f].includes(b)))),D(p[f])||!D(p[f])&&i.whatToDoWhenReferenceIsMissing===2)if(Array.isArray(s[f]))if(i.whatToDoWhenReferenceIsMissing===2||C(p[f]))s[f]=M(s[f],i,c,l);else{if(s[f].every(b=>typeof b=="string"||Array.isArray(b))){let b=!0;s[f].forEach(ye=>{Array.isArray(ye)&&!ye.every(C)&&(b=!1)}),b&&(l=!1)}s[f]=a(s[f],p[f],i,c,l,g)}else(0,Y.default)(s[f])?i.whatToDoWhenReferenceIsMissing===2||C(p[f])?s[f]=M(X(s[f],i),i,c,l):c?s[f]=a(s[f],p[f],i,c,l,g):s[f]=a(s[f],p[f],ve(y({},i),{wrapGlobalFlipSwitch:!1}),c,l,g):C(s[f])&&(s[f]=a(s[f],p[f],i,c,l,g));else if(typeof s[f]!=typeof p[f]&&i.whatToDoWhenReferenceIsMissing===1)throw new Error(`object-flatten-referencing/ofr(): [THROW_ID_06] resolvedReference object does not have the key ${f} and we need it. TIP: Turn off throwing via opts2.whatToDoWhenReferenceIsMissing.`)}}):Array.isArray(s)?Array.isArray(p)?s.forEach((f,g)=>{D(s[g])&&D(p[g])?s[g]=a(s[g],p[g],i,c,l,`${d}[${g}]`):s[g]=a(s[g],p[0],i,c,l,`${d}[${g}]`)}):C(p)&&(s=M(s,i,c,l)):C(s)&&s.length&&(i.wrapHeadsWith||i.wrapTailsWith)&&(!i.preventDoubleWrapping||(i.wrapHeadsWith===""||!le(s,i.wrapHeadsWith.trim()).length)&&(i.wrapTailsWith===""||!le(s,i.wrapTailsWith.trim()).length))&&(s=`${c?i.wrapHeadsWith:""}${s}${c?i.wrapTailsWith:""}`),s}return a(e,t,n)}return xt(dn);})();
11
11
  /**
12
12
  * @name str-indexes-of-plus
13
13
  * @fileoverview Like indexOf but returns array and counts per-grapheme
14
- * @version 4.0.13
14
+ * @version 4.1.1
15
15
  * @author Roy Revelt, Codsen Ltd
16
16
  * @license MIT
17
17
  * {@link https://codsen.com/os/str-indexes-of-plus/}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "object-flatten-referencing",
3
- "version": "6.1.2",
3
+ "version": "6.2.1",
4
4
  "description": "Flatten complex nested objects according to a reference objects",
5
5
  "keywords": [
6
6
  "advanced",
@@ -14,7 +14,7 @@
14
14
  "plain",
15
15
  "wrap"
16
16
  ],
17
- "homepage": "https://codsen.com/os/object-flatten-referencing/",
17
+ "homepage": "https://codsen.com/os/object-flatten-referencing",
18
18
  "repository": {
19
19
  "type": "git",
20
20
  "url": "https://github.com/codsen/codsen.git",
@@ -28,6 +28,7 @@
28
28
  },
29
29
  "type": "module",
30
30
  "exports": {
31
+ "types": "./types/index.d.ts",
31
32
  "script": "./dist/object-flatten-referencing.umd.js",
32
33
  "default": "./dist/object-flatten-referencing.esm.js"
33
34
  },
@@ -70,10 +71,10 @@
70
71
  "lodash.clonedeep": "^4.5.0",
71
72
  "lodash.isplainobject": "^4.0.6",
72
73
  "matcher": "^5.0.0",
73
- "str-indexes-of-plus": "^4.0.13"
74
+ "str-indexes-of-plus": "^4.1.1"
74
75
  },
75
76
  "devDependencies": {
76
- "@types/lodash.clonedeep": "^4.5.6",
77
- "@types/lodash.isplainobject": "^4.0.6"
77
+ "@types/lodash.clonedeep": "^4.5.7",
78
+ "@types/lodash.isplainobject": "^4.0.7"
78
79
  }
79
80
  }
package/types/index.d.ts CHANGED
@@ -35,6 +35,7 @@ declare function flattenReferencing(
35
35
  ): any;
36
36
 
37
37
  export {
38
+ Opts,
38
39
  arrayiffyString,
39
40
  defaults,
40
41
  flattenArr,