diff --git a/.DS_Store b/.DS_Store index 6ca220d..16bb0e4 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/.github/workflows/publish_to_npm.yml b/.github/workflows/publish_to_npm.yml new file mode 100644 index 0000000..590ca67 --- /dev/null +++ b/.github/workflows/publish_to_npm.yml @@ -0,0 +1,20 @@ +name: Publish Package to npmjs +on: + release: + types: [published] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + # Setup .npmrc file to publish to npm + - uses: actions/setup-node@v3 + with: + node-version: '20.x' + registry-url: 'https://registry.npmjs.org' + scope: '@performant-software' + - run: cd editioncrafter + - run: npm ci + - run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.gitignore b/.gitignore index a368b28..ff7290c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,9 @@ dist/ +.parcel-cache/ coverage/ node_modules/ -package-lock.json *.log *.tgz __tests__/integration/editioncrafter/bnf-ms-fr-640/ -__tests__/integration/editioncrafter/css/ \ No newline at end of file +__tests__/integration/editioncrafter/css/ +.cache/ diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..0773141 --- /dev/null +++ b/.npmignore @@ -0,0 +1,13 @@ +__mocks__ +__tests__ +.github +.storybook +docs +.gitignore +.newtab.png +**/stories +dist/ +coverage/ +node_modules/ +*.log +*.tgz diff --git a/README.md b/README.md index 613cdfa..ef50ea3 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,20 @@ # editioncrafter UNDER DEVELOPMENT: Software for the development of EditionCrafter, digital critical edition publication tool + +## Structure of this repository + +There are two apps in this repo. `editioncrafter` is a React component, while `editioncrafter-umd` wraps the React component into a UMD module for use on non-React pages. + +## Storybook + +For local development, you can use the Storybook component. + +Setup for Storybook was kind of rushed and the process could still be made simpler. + +1. Run `npm run build:css`. This will generate EditionCrafter's CSS and place it in the Storybook assets folder. At the moment, the CSS does not support live-refresh, even though the JS does. +2. Clone the [`edition-crafter-cli`](https://github.com/cu-mkp/editioncrafter-cli) repository if you haven't already, do the usual `npm install`, and run `npm start` to launch a server with a test document. +3. Back here in `editioncrafter`, run `npm run storybook` to launch Storybook. You'll see a component called EditionCrafter in the sidebar, and it should be all set to try. + +By default, Storybook doesn't display the hash routing params used by `react-router`. You can use the "Open canvas in new tab" button on the top right to open the component in its own tab: + + diff --git a/__mocks__/css.js b/__mocks__/css.js deleted file mode 100644 index f053ebf..0000000 --- a/__mocks__/css.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = {}; diff --git a/__tests__/integration/editioncrafter/index.html b/__tests__/integration/editioncrafter/index.html deleted file mode 100644 index 27f87a6..0000000 --- a/__tests__/integration/editioncrafter/index.html +++ /dev/null @@ -1,30 +0,0 @@ - - -
- - - - - - ->1,m=23===c?r(2,-24)-r(2,-77):0,g=e<0||0===e&&1/e<0?1:0,y=0;for((e=n(e))!=e||e===1/0?(u=e!=e?1:0,l=d):(l=i(o(e)/a),e*(f=r(2,-l))<1&&(l--,f*=2),(e+=l+v>=1?m/f:m*r(2,1-v))*f>=2&&(l++,f/=2),l+v>=d?(u=0,l=d):l+v>=1?(u=(e*f-1)*r(2,c),l+=v):(u=e*r(2,v-1)*r(2,c),l=0));c>=8;)h[y++]=255&u,u/=256,c-=8;for(l=l<{"use strict";var r=n(42898),i=n(38444),o=n(28089),a=RangeError;e.exports=function(e){var t=i(o(this)),n="",c=r(e);if(c<0||c==1/0)throw a("Wrong number of repetitions");for(;c>0;(c>>>=1)&&(t+=t))1&c&&(n+=t);return n}},49397:(e,t,n)=>{"use strict";var r=n(13873).end,i=n(75531);e.exports=i("trimEnd")?function(){return r(this)}:"".trimEnd},75531:(e,t,n)=>{var r=n(87967).PROPER,i=n(44418),o=n(20223);e.exports=function(e){return i((function(){return!!o[e]()||"
"!=="
"[e]()||r&&o[e].name!==e}))}},52241:(e,t,n)=>{"use strict";var r=n(13873).start,i=n(75531);e.exports=i("trimStart")?function(){return r(this)}:"".trimStart},13873:(e,t,n)=>{var r=n(44686),i=n(28089),o=n(38444),a=n(20223),c=r("".replace),s=RegExp("^["+a+"]+"),l=RegExp("(^|[^"+a+"])["+a+"]+$"),u=function(e){return function(t){var n=o(i(t));return 1&e&&(n=c(n,s,"")),2&e&&(n=c(n,l,"$1")),n}};e.exports={start:u(1),end:u(2),trim:u(3)}},36009:(e,t,n)=>{var r=n(60617),i=n(44418);e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},6352:(e,t,n)=>{var r=n(85563),i=n(45718),o=n(63048),a=n(88424);e.exports=function(){var e=i("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,c=o("toPrimitive");t&&!t[c]&&a(t,c,(function(e){return r(n,this)}),{arity:1})}},50334:(e,t,n)=>{var r=n(36009);e.exports=r&&!!Symbol.for&&!!Symbol.keyFor},18774:(e,t,n)=>{var r,i,o,a,c=n(62021),s=n(30103),l=n(5735),u=n(71977),f=n(42011),h=n(44418),p=n(7772),d=n(64494),v=n(12649),m=n(51130),g=n(99082),y=n(80999),b=c.setImmediate,w=c.clearImmediate,z=c.process,x=c.Dispatch,C=c.Function,S=c.MessageChannel,M=c.String,E=0,T={},P="onreadystatechange";h((function(){r=c.location}));var H=function(e){if(f(T,e)){var t=T[e];delete T[e],t()}},k=function(e){return function(){H(e)}},L=function(e){H(e.data)},O=function(e){c.postMessage(M(e),r.protocol+"//"+r.host)};b&&w||(b=function(e){m(arguments.length,1);var t=u(e)?e:C(e),n=d(arguments,1);return T[++E]=function(){s(t,void 0,n)},i(E),E},w=function(e){delete T[e]},y?i=function(e){z.nextTick(k(e))}:x&&x.now?i=function(e){x.now(k(e))}:S&&!g?(a=(o=new S).port2,o.port1.onmessage=L,i=l(a.postMessage,a)):c.addEventListener&&u(c.postMessage)&&!c.importScripts&&r&&"file:"!==r.protocol&&!h(O)?(i=O,c.addEventListener("message",L,!1)):i=P in v("script")?function(e){p.appendChild(v("script"))[P]=function(){p.removeChild(this),H(e)}}:function(e){setTimeout(k(e),0)}),e.exports={set:b,clear:w}},19290:(e,t,n)=>{var r=n(44686);e.exports=r(1..valueOf)},65217:(e,t,n)=>{var r=n(42898),i=Math.max,o=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):o(n,t)}},56421:(e,t,n)=>{var r=n(33841),i=TypeError;e.exports=function(e){var t=r(e,"number");if("number"==typeof t)throw i("Can't convert number to bigint");return BigInt(t)}},96029:(e,t,n)=>{var r=n(42898),i=n(83346),o=RangeError;e.exports=function(e){if(void 0===e)return 0;var t=r(e),n=i(t);if(t!==n)throw o("Wrong length or index");return n}},30630:(e,t,n)=>{var r=n(83436),i=n(28089);e.exports=function(e){return r(i(e))}},42898:(e,t,n)=>{var r=n(56729);e.exports=function(e){var t=+e;return t!=t||0===t?0:r(t)}},83346:(e,t,n)=>{var r=n(42898),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},94548:(e,t,n)=>{var r=n(28089),i=Object;e.exports=function(e){return i(r(e))}},98008:(e,t,n)=>{var r=n(85260),i=RangeError;e.exports=function(e,t){var n=r(e);if(n%t)throw i("Wrong offset");return n}},85260:(e,t,n)=>{var r=n(42898),i=RangeError;e.exports=function(e){var t=r(e);if(t<0)throw i("The argument can't be less than 0");return t}},33841:(e,t,n)=>{var r=n(85563),i=n(47212),o=n(16874),a=n(71260),c=n(44565),s=n(63048),l=TypeError,u=s("toPrimitive");e.exports=function(e,t){if(!i(e)||o(e))return e;var n,s=a(e,u);if(s){if(void 0===t&&(t="default"),n=r(s,e,t),!i(n)||o(n))return n;throw l("Can't convert object to primitive value")}return void 0===t&&(t="number"),c(e,t)}},38069:(e,t,n)=>{var r=n(33841),i=n(16874);e.exports=function(e){var t=r(e,"string");return i(t)?t:t+""}},73649:(e,t,n)=>{var r={};r[n(63048)("toStringTag")]="z",e.exports="[object z]"===String(r)},38444:(e,t,n)=>{var r=n(9558),i=String;e.exports=function(e){if("Symbol"===r(e))throw TypeError("Cannot convert a Symbol value to a string");return i(e)}},35959:e=>{var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},6052:(e,t,n)=>{"use strict";var r=n(94427),i=n(62021),o=n(85563),a=n(61337),c=n(19716),s=n(79310),l=n(84669),u=n(54375),f=n(95323),h=n(91873),p=n(78236),d=n(83346),v=n(96029),m=n(98008),g=n(38069),y=n(42011),b=n(9558),w=n(47212),z=n(16874),x=n(4977),C=n(56701),S=n(40157),M=n(84190).f,E=n(93012),T=n(13140).forEach,P=n(25676),H=n(90424),k=n(20421),L=n(94912),O=n(85774),N=n(18310),V=O.get,R=O.set,_=O.enforce,A=k.f,j=L.f,D=Math.round,I=i.RangeError,F=l.ArrayBuffer,B=F.prototype,U=l.DataView,W=s.NATIVE_ARRAY_BUFFER_VIEWS,q=s.TYPED_ARRAY_TAG,G=s.TypedArray,$=s.TypedArrayPrototype,X=s.aTypedArrayConstructor,Z=s.isTypedArray,Y="BYTES_PER_ELEMENT",K="Wrong length",Q=function(e,t){X(e);for(var n=0,r=t.length,i=new e(r);r>n;)i[n]=t[n++];return i},J=function(e,t){H(e,t,{configurable:!0,get:function(){return V(this)[t]}})},ee=function(e){var t;return C(B,e)||"ArrayBuffer"==(t=b(e))||"SharedArrayBuffer"==t},te=function(e,t){return Z(e)&&!z(t)&&t in e&&p(+t)&&t>=0},ne=function(e,t){return t=g(t),te(e,t)?f(2,e[t]):j(e,t)},re=function(e,t,n){return t=g(t),!(te(e,t)&&w(n)&&y(n,"value"))||y(n,"get")||y(n,"set")||n.configurable||y(n,"writable")&&!n.writable||y(n,"enumerable")&&!n.enumerable?A(e,t,n):(e[t]=n.value,e)};a?(W||(L.f=ne,k.f=re,J($,"buffer"),J($,"byteOffset"),J($,"byteLength"),J($,"length")),r({target:"Object",stat:!0,forced:!W},{getOwnPropertyDescriptor:ne,defineProperty:re}),e.exports=function(e,t,n){var a=e.match(/\d+/)[0]/8,s=e+(n?"Clamped":"")+"Array",l="get"+e,f="set"+e,p=i[s],g=p,y=g&&g.prototype,b={},z=function(e,t){A(e,t,{get:function(){return function(e,t){var n=V(e);return n.view[l](t*a+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var i=V(e);n&&(r=(r=D(r))<0?0:r>255?255:255&r),i.view[f](t*a+i.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};W?c&&(g=t((function(e,t,n,r){return u(e,y),N(w(t)?ee(t)?void 0!==r?new p(t,m(n,a),r):void 0!==n?new p(t,m(n,a)):new p(t):Z(t)?Q(g,t):o(E,g,t):new p(v(t)),e,g)})),S&&S(g,G),T(M(p),(function(e){e in g||h(g,e,p[e])})),g.prototype=y):(g=t((function(e,t,n,r){u(e,y);var i,c,s,l=0,f=0;if(w(t)){if(!ee(t))return Z(t)?Q(g,t):o(E,g,t);i=t,f=m(n,a);var h=t.byteLength;if(void 0===r){if(h%a)throw I(K);if((c=h-f)<0)throw I(K)}else if((c=d(r)*a)+f>h)throw I(K);s=c/a}else s=v(t),i=new F(c=s*a);for(R(e,{buffer:i,byteOffset:f,byteLength:c,length:s,view:new U(i)});l{var r=n(62021),i=n(44418),o=n(88716),a=n(79310).NATIVE_ARRAY_BUFFER_VIEWS,c=r.ArrayBuffer,s=r.Int8Array;e.exports=!a||!i((function(){s(1)}))||!i((function(){new s(-1)}))||!o((function(e){new s,new s(null),new s(1.5),new s(e)}),!0)||i((function(){return 1!==new s(new c(2),1,void 0).length}))},57636:(e,t,n)=>{var r=n(50491),i=n(27106);e.exports=function(e,t){return r(i(e),t)}},93012:(e,t,n)=>{var r=n(5735),i=n(85563),o=n(83326),a=n(94548),c=n(48601),s=n(68979),l=n(369),u=n(27803),f=n(60301),h=n(79310).aTypedArrayConstructor,p=n(56421);e.exports=function(e){var t,n,d,v,m,g,y,b,w=o(this),z=a(e),x=arguments.length,C=x>1?arguments[1]:void 0,S=void 0!==C,M=l(z);if(M&&!u(M))for(b=(y=s(z,M)).next,z=[];!(g=i(b,y)).done;)z.push(g.value);for(S&&x>2&&(C=r(C,arguments[2])),n=c(z),d=new(h(w))(n),v=f(d),t=0;n>t;t++)m=S?C(z[t],t):z[t],d[t]=v?p(m):+m;return d}},27106:(e,t,n)=>{var r=n(79310),i=n(82799),o=r.aTypedArrayConstructor,a=r.getTypedArrayConstructor;e.exports=function(e){return o(i(e,a(e)))}},54552:(e,t,n)=>{var r=n(44686),i=0,o=Math.random(),a=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++i+o,36)}},35266:(e,t,n)=>{var r=n(44418),i=n(63048),o=n(61337),a=n(9596),c=i("iterator");e.exports=!r((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),a&&!e.toJSON||!t.size&&(a||!o)||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[c]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},41635:(e,t,n)=>{var r=n(36009);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},73504:(e,t,n)=>{var r=n(61337),i=n(44418);e.exports=r&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},51130:e=>{var t=TypeError;e.exports=function(e,n){if(e0?(r=n/l)*r:n;return l===1/0?1/0:l*a(i)}})},24465:(e,t,n)=>{var r=n(94427),i=n(44418),o=Math.imul;r({target:"Math",stat:!0,forced:i((function(){return-5!=o(4294967295,5)||2!=o.length}))},{imul:function(e,t){var n=65535,r=+e,i=+t,o=n&r,a=n&i;return 0|o*a+((n&r>>>16)*a+o*(n&i>>>16)<<16>>>0)}})},46469:(e,t,n)=>{n(94427)({target:"Math",stat:!0},{log10:n(76280)})},25357:(e,t,n)=>{n(94427)({target:"Math",stat:!0},{log1p:n(54641)})},28081:(e,t,n)=>{var r=n(94427),i=Math.log,o=Math.LN2;r({target:"Math",stat:!0},{log2:function(e){return i(e)/o}})},93204:(e,t,n)=>{n(94427)({target:"Math",stat:!0},{sign:n(30673)})},501:(e,t,n)=>{var r=n(94427),i=n(44418),o=n(36241),a=Math.abs,c=Math.exp,s=Math.E;r({target:"Math",stat:!0,forced:i((function(){return-2e-17!=Math.sinh(-2e-17)}))},{sinh:function(e){var t=+e;return a(t)<1?(o(t)-o(-t))/2:(c(t-1)-c(-t-1))*(s/2)}})},37731:(e,t,n)=>{var r=n(94427),i=n(36241),o=Math.exp;r({target:"Math",stat:!0},{tanh:function(e){var t=+e,n=i(t),r=i(-t);return n==1/0?1:r==1/0?-1:(n-r)/(o(t)+o(-t))}})},77810:(e,t,n)=>{n(14249)(Math,"Math",!0)},97930:(e,t,n)=>{n(94427)({target:"Math",stat:!0},{trunc:n(56729)})},29976:(e,t,n)=>{"use strict";var r=n(94427),i=n(9596),o=n(61337),a=n(62021),c=n(5761),s=n(44686),l=n(31943),u=n(42011),f=n(18310),h=n(56701),p=n(16874),d=n(33841),v=n(44418),m=n(84190).f,g=n(94912).f,y=n(20421).f,b=n(19290),w=n(13873).trim,z="Number",x=a[z],C=c[z],S=x.prototype,M=a.TypeError,E=s("".slice),T=s("".charCodeAt),P=function(e){var t,n,r,i,o,a,c,s,l=d(e,"number");if(p(l))throw M("Cannot convert a Symbol value to a number");if("string"==typeof l&&l.length>2)if(l=w(l),43===(t=T(l,0))||45===t){if(88===(n=T(l,2))||120===n)return NaN}else if(48===t){switch(T(l,1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+l}for(a=(o=E(l,2)).length,c=0;ci)return NaN;return parseInt(o,r)}return+l},H=l(z,!x(" 0o1")||!x("0b1")||x("+0x1")),k=function(e){var t,n=arguments.length<1?0:x(function(e){var t=d(e,"number");return"bigint"==typeof t?t:P(t)}(e));return h(S,t=this)&&v((function(){b(t)}))?f(Object(n),this,k):n};k.prototype=S,H&&!i&&(S.constructor=k),r({global:!0,constructor:!0,wrap:!0,forced:H},{Number:k});var L=function(e,t){for(var n,r=o?m(t):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),i=0;r.length>i;i++)u(t,n=r[i])&&!u(e,n)&&y(e,n,g(t,n))};i&&C&&L(c[z],C),(H||i)&&L(c[z],x)},29176:(e,t,n)=>{n(94427)({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)})},73300:(e,t,n)=>{n(94427)({target:"Number",stat:!0},{isFinite:n(20218)})},51234:(e,t,n)=>{n(94427)({target:"Number",stat:!0},{isInteger:n(78236)})},77846:(e,t,n)=>{n(94427)({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},6797:(e,t,n)=>{var r=n(94427),i=n(78236),o=Math.abs;r({target:"Number",stat:!0},{isSafeInteger:function(e){return i(e)&&o(e)<=9007199254740991}})},53606:(e,t,n)=>{n(94427)({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991})},68663:(e,t,n)=>{n(94427)({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991})},62989:(e,t,n)=>{var r=n(94427),i=n(35369);r({target:"Number",stat:!0,forced:Number.parseFloat!=i},{parseFloat:i})},52276:(e,t,n)=>{var r=n(94427),i=n(80633);r({target:"Number",stat:!0,forced:Number.parseInt!=i},{parseInt:i})},19830:(e,t,n)=>{"use strict";var r=n(94427),i=n(44686),o=n(42898),a=n(19290),c=n(64671),s=n(44418),l=RangeError,u=String,f=Math.floor,h=i(c),p=i("".slice),d=i(1..toFixed),v=function e(t,n,r){return 0===n?r:n%2==1?e(t,n-1,r*t):e(t*t,n/2,r)},m=function(e,t,n){for(var r=-1,i=n;++r<6;)i+=t*e[r],e[r]=i%1e7,i=f(i/1e7)},g=function(e,t){for(var n=6,r=0;--n>=0;)r+=e[n],e[n]=f(r/t),r=r%t*1e7},y=function(e){for(var t=6,n="";--t>=0;)if(""!==n||0===t||0!==e[t]){var r=u(e[t]);n=""===n?r:n+h("0",7-r.length)+r}return n};r({target:"Number",proto:!0,forced:s((function(){return"0.000"!==d(8e-5,3)||"1"!==d(.9,0)||"1.25"!==d(1.255,2)||"1000000000000000128"!==d(0xde0b6b3a7640080,0)}))||!s((function(){d({})}))},{toFixed:function(e){var t,n,r,i,c=a(this),s=o(e),f=[0,0,0,0,0,0],d="",b="0";if(s<0||s>20)throw l("Incorrect fraction digits");if(c!=c)return"NaN";if(c<=-1e21||c>=1e21)return u(c);if(c<0&&(d="-",c=-c),c>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(c*v(2,69,1))-69)<0?c*v(2,-t,1):c/v(2,t,1),n*=4503599627370496,(t=52-t)>0){for(m(f,0,n),r=s;r>=7;)m(f,1e7,0),r-=7;for(m(f,v(10,r,1),0),r=t-1;r>=23;)g(f,1<<23),r-=23;g(f,1<l)&&(p=c,d=m,v=h)):(p=c,d=m,v=h));p&&d>=0&&(this._unloadTile(v),o=d)}this._tilesLoaded[o]=new t({tile:r.tile,tiledImage:r.tiledImage})},clearTilesFor:function(t){var n;e.console.assert(t,"[TileCache.clearTilesFor] tiledImage is required");for(var r=0;r
")):c.concat("".concat(l.outerHTML))}}catch(e){s.e(e)}finally{s.f()}return c.concat("")}function Hc(e,t){if(t){for(var n=[],r=0;r<4;r++)"."!==e[r]?n[r]=e[r]:n[r]=t[r];return n}return e}function kc(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Lc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Lc(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw o}}}}function Lc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ns[e]&&!t.escapeWithReference&&(r=Math.min(u[n],s[e]-("right"===e?u.width:u.height))),hd({},n,r)}};return l.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=pd({},u,f[t](e))})),e.offsets.popper=u,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,r=t.reference,i=e.placement.split("-")[0],o=Math.floor,a=-1!==["top","bottom"].indexOf(i),c=a?"right":"bottom",s=a?"left":"top",l=a?"width":"height";return n[c]