!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=139)}([function(e,t){e.exports=wp.i18n},function(e,t){e.exports=wp.element},function(e,t,n){e.exports=n(53)},function(e,t,n){var r=n(49),o=n(50),i=n(51);e.exports=function(e){return r(e)||o(e)||i()}},function(e,t){e.exports=wp.components},function(e,t){e.exports=wp.data},function(e,t,n){var r=n(41),o=n(42),i=n(43);e.exports=function(e,t){return r(e)||o(e,t)||i()}},function(e,t,n){var r=n(11);e.exports=function(e){for(var t=1;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},function(e,t,n){var r; /*! Copyright (c) 2017 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ /*! Copyright (c) 2017 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ !function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t0&&void 0!==arguments[0]&&arguments[0],t=document.createElement("div");if(e){var n=Object(l.select)("core/editor").getBlocksForSerialization().filter(function(e){return!s.includes(e.name)&&e.isValid});t.innerHTML=Object(c.serialize)(n)}else t.innerHTML=Object(l.select)("core/editor").getEditedPostContent();return t}function f(e){var t=e.entryspacing,n=e.hangingindent,r=e.maxoffset,o=e.linespacing,i=e.secondFieldAlign;return a()({},t?{"data-entryspacing":"".concat(t)}:void 0,n?{"data-hangingindent":"".concat(n)}:void 0,r?{"data-maxoffset":"".concat(r)}:void 0,o?{"data-linespacing":"".concat(o)}:void 0,i?{"data-second-field-align":i}:void 0)}function m(e){if("string"==typeof e){var t=document.createElement("div");t.innerHTML=e;var n=t.querySelector(".csl-entry");if(!n)throw new Error('Outer HTML of item must be a div with className "csl-entry"');e=n}var r=e,i=[],a=!0,c=!1,l=void 0;try{for(var s,u=e.children[Symbol.iterator]();!(a=(s=u.next()).done);a=!0){var f=s.value;if(f.classList.contains("csl-indent"))break;f.classList.contains("csl-left-margin")?i=[].concat(o()(i),[f]):f.classList.contains("csl-right-inline")&&(f.outerHTML=f.innerHTML)}}catch(e){c=!0,l=e}finally{try{a||null==u.return||u.return()}finally{if(c)throw l}}return i.forEach(function(e){return r.removeChild(e)}),r.innerHTML.trim()}},,,,,function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},,,function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=r=function(e){return n(e)}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},r(t)}e.exports=r},function(e,t,n){"use strict";n.d(t,"a",function(){return c}),n.d(t,"b",function(){return l});var r=n(6),o=n.n(r),i=n(0),a=n(10),c={getYear:function(e){return e&&e.raw?new Date(e.raw).getUTCFullYear():Object(a.get)(e,"[date-parts][0][0]",Object(i._x)("n.d.",'Abbreviation for "no date"',"academic-bloggers-toolkit"))},raw2parts:function(e){var t=e.split("/"),n=o()(t,3);return{"date-parts":[[n[0],n[1],n[2]]]}},date2raw:function(e){return e&&e.raw?e.raw:e&&e["date-parts"]?e["date-parts"][0].filter(function(e){return void 0!==e}).join("/"):""}},l={getNames:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=e.slice(0,t).map(function(e){var t=e.family,n=void 0===t?"":t,r=e.given,o=void 0===r?"":r,i=e.literal,a=void 0===i?"":i;return n?"".concat(n," ").concat(o.slice(0,1)).trim():a}).filter(Boolean).join(", ");return n?"".concat(n,"."):""}}},,function(e,t,n){var r=n(33),o=n(67);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t,n){var r=n(44);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},,,,function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},,function(e,t,n){"use strict";n.d(t,"a",function(){return k}),n.d(t,"b",function(){return T});var r=n(2),o=n.n(r),i=n(8),a=n.n(i),c=n(36),l=n.n(c),s=n(30),u=n.n(s),f=n(37),m=n.n(f),p=n(3),d=n.n(p),h=n(11),g=n.n(h),y=n(7),b=n.n(y),v=n(15),w=n.n(v),_=n(19),x=n.n(_),E=n(10),O=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30;w()(this,e),this.PREFIX="ABT_CACHE_",this.VERSION="v1.0",this.KEY="".concat(this.PREFIX).concat(this.VERSION),this._cache=this.storageIsAvailable()?top.localStorage:this.createFallbackStorage();this.ITEM_KEY=t,this.EXPIRES=Date.now()+864e5*r;var o=this.KEY,i=this.PREFIX;Object.keys(this._cache).filter(function(e){return e.startsWith(i)&&e!==o}).forEach(function(e){return n._cache.removeItem(e)})}return x()(e,[{key:"getItem",value:function(e){return this.cache[e]||null}},{key:"removeItem",value:function(e){this.cache=Object(E.omit)(this.cache,e)}},{key:"setItem",value:function(e,t){this.cache=b()({},this.cache,g()({},e,t))}},{key:"storageIsAvailable",value:function(){try{var e=window.localStorage;return e.setItem("__storage_test__","test"),e.removeItem("__storage_test__"),!0}catch(e){return!1}}},{key:"createFallbackStorage",value:function(){return{_value:new Map,get length(){return this._value.size},clear:function(){this._value.clear()},getItem:function(e){return this._value.get(e)||null},key:function(e){return d()(this._value.keys())[e]||null},removeItem:function(e){this._value.delete(e)},setItem:function(e,t){this._value.set(e,t)}}}},{key:"cache",get:function(){var e=this.EXPIRES,t=this.ITEM_KEY,n=this.KEY,r=JSON.parse(this._cache.getItem(n)||"{}"),o=r[t];return(!o||o.expires=0||(o[n]=e[n]);return o}},function(e,t,n){var r=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,n,r){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),a=new S(r||[]);return i._invoke=function(e,t,n){var r=u;return function(o,i){if(r===m)throw new Error("Generator is already running");if(r===p){if("throw"===o)throw i;return j()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=O(a,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===u)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=m;var l=s(e,t,n);if("normal"===l.type){if(r=n.done?p:f,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=p,n.method="throw",n.arg=l.arg)}}}(e,n,a),i}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var u="suspendedStart",f="suspendedYield",m="executing",p="completed",d={};function h(){}function g(){}function y(){}var b={};b[i]=function(){return this};var v=Object.getPrototypeOf,w=v&&v(v(L([])));w&&w!==n&&r.call(w,i)&&(b=w);var _=y.prototype=h.prototype=Object.create(b);function x(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function E(e){var t;this._invoke=function(n,o){function i(){return new Promise(function(t,i){!function t(n,o,i,a){var c=s(e[n],e,o);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==typeof u&&r.call(u,"__await")?Promise.resolve(u.__await).then(function(e){t("next",e,i,a)},function(e){t("throw",e,i,a)}):Promise.resolve(u).then(function(e){l.value=e,i(l)},function(e){return t("throw",e,i,a)})}a(c.arg)}(n,o,t,i)})}return t=t?t.then(i,i):i()}}function O(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,O(e,n),"throw"===n.method))return d;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var o=s(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,d;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,d):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function L(e){if(e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(l&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),d}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,o=n;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]]].join("")}},,,,,,,,,,,,function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},,,,function(e,t,n){"use strict";n.d(t,"a",function(){return i});n(1);var r=n(110),o=n.n(r);function i(e){var t=e.count;return wp.element.createElement("span",{className:o.a.icon},t)}},function(e,t,n){"use strict";n.d(t,"a",function(){return i});n(1);var r=n(73),o=n.n(r);function i(e){var t=e.items,n=e.onItemClick,r=void 0===n?function(){}:n,i=e.onItemDoubleClick,a=void 0===i?function(){}:i,c=e.selectedItems,l=void 0===c?[]:c,s=e.renderItem;return wp.element.createElement("div",{"aria-multiselectable":!0,className:o.a.list,role:"listbox"},t.map(function(e){return wp.element.createElement("div",{key:e.id,"aria-selected":l.includes(e.id),className:o.a.item,role:"option",tabIndex:0,onClick:function(){return r(e.id)},onDoubleClick:function(){return a(e.id)},onKeyDown:function(t){switch(t.key){case" ":return r(e.id);case"Enter":return a(e.id)}}},s(e))}))}},function(e,t,n){e.exports={list:"style__list___sXSVw",item:"style__item___3Ltyn"}},function(e,t,n){e.exports={authors:"style__authors___3xZGF",meta:"style__meta___3fNP7"}},function(e,t){e.exports=CSL},function(e,t,n){"use strict";n.d(t,"a",function(){return f});var r=n(1),o=n(0),i=n(111),a=n.n(i),c=n(34),l=n(22),s=n(74),u=n.n(s);function f(e){var t=e.item,n=Object(r.useMemo)(function(){return{__html:a.a.sanitize(t.title||"")}},[t.title]),i=Object(r.useMemo)(function(){return c.b.getNames(t.author,3)},[t.author]),s=Object(r.useMemo)(function(){return Object(l.b)(t,["journalAbbreviation","container-title-short","container-title","publisher"],Object(o._x)("n.p.",'Abbreviation for "no publisher"',"academic-bloggers-toolkit"))},[t.journalAbbreviation,t["container-title-short"],t["container-title"],t.publisher]),f=Object(r.useMemo)(function(){return c.a.getYear(t.issued)},[t.issued]);return wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("strong",{dangerouslySetInnerHTML:n}),i&&wp.element.createElement("div",{className:u.a.authors},i),wp.element.createElement("div",{className:u.a.meta},wp.element.createElement("i",null,s),wp.element.createElement("span",null,"(",f,")")))}},function(e,t,n){e.exports={item:"style__item___x_svo",buttonList:"style__button-list___D2Txs",row:"style__row___zDq5B"}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){e.exports={icon:"style__icon___S3vp9"}},function(e,t,n){e.exports=function(){"use strict";var e=Object.freeze||function(e){return e},t=e(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),n=e(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","audio","canvas","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","video","view","vkern"]),r=e(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),o=e(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),i=e(["#text"]),a=Object.freeze||function(e){return e},c=a(["accept","action","align","alt","autocomplete","background","bgcolor","border","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","coords","crossorigin","datetime","default","dir","disabled","download","enctype","face","for","headers","height","hidden","high","href","hreflang","id","integrity","ismap","label","lang","list","loop","low","max","maxlength","media","method","min","multiple","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","type","usemap","valign","value","width","xmlns"]),l=a(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),s=a(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),u=a(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),f=Object.hasOwnProperty,m=Object.setPrototypeOf,p=("undefined"!=typeof Reflect&&Reflect).apply;function d(e,t){m&&m(e,null);for(var n=t.length;n--;){var r=t[n];if("string"==typeof r){var o=r.toLowerCase();o!==r&&(Object.isFrozen(t)||(t[n]=o),r=o)}e[r]=!0}return e}function h(e){var t={},n=void 0;for(n in e)p(f,e,[n])&&(t[n]=e[n]);return t}p||(p=function(e,t,n){return e.apply(t,n)});var g=Object.seal||function(e){return e},y=g(/\{\{[\s\S]*|[\s\S]*\}\}/gm),b=g(/<%[\s\S]*|[\s\S]*%>/gm),v=g(/^data-[\-\w.\u00B7-\uFFFF]/),w=g(/^aria-[\-\w]+$/),_=g(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),x=g(/^(?:\w+script|data):/i),E=g(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g),O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function k(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:j(),f=function(t){return e(t)};if(f.version="1.0.10",f.removed=[],!a||!a.document||9!==a.document.nodeType)return f.isSupported=!1,f;var m=a.document,p=!1,g=!1,N=a.document,M=a.DocumentFragment,I=a.HTMLTemplateElement,C=a.Node,R=a.NodeFilter,D=a.NamedNodeMap,F=void 0===D?a.NamedNodeMap||a.MozNamedAttrMap:D,P=a.Text,H=a.Comment,B=a.DOMParser,z=a.TrustedTypes;if("function"==typeof I){var q=N.createElement("template");q.content&&q.content.ownerDocument&&(N=q.content.ownerDocument)}var G=A(z,m),U=G?G.createHTML(""):"",W=N,Y=W.implementation,V=W.createNodeIterator,K=W.getElementsByTagName,X=W.createDocumentFragment,J=m.importNode,$={};f.isSupported=Y&&void 0!==Y.createHTMLDocument&&9!==N.documentMode;var Z=y,Q=b,ee=v,te=w,ne=x,re=E,oe=_,ie=null,ae=d({},[].concat(k(t),k(n),k(r),k(o),k(i))),ce=null,le=d({},[].concat(k(c),k(l),k(s),k(u))),se=null,ue=null,fe=!0,me=!0,pe=!1,de=!1,he=!1,ge=!1,ye=!1,be=!1,ve=!1,we=!1,_e=!1,xe=!0,Ee=!0,Oe=!1,ke={},Te=d({},["audio","head","math","script","style","template","svg","video"]),Se=d({},["audio","video","img","source","image"]),Le=d({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),je=null,Ae=N.createElement("form"),Ne=function(e){je&&je===e||(e&&"object"===(void 0===e?"undefined":O(e))||(e={}),ie="ALLOWED_TAGS"in e?d({},e.ALLOWED_TAGS):ae,ce="ALLOWED_ATTR"in e?d({},e.ALLOWED_ATTR):le,se="FORBID_TAGS"in e?d({},e.FORBID_TAGS):{},ue="FORBID_ATTR"in e?d({},e.FORBID_ATTR):{},ke="USE_PROFILES"in e&&e.USE_PROFILES,fe=!1!==e.ALLOW_ARIA_ATTR,me=!1!==e.ALLOW_DATA_ATTR,pe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,de=e.SAFE_FOR_JQUERY||!1,he=e.SAFE_FOR_TEMPLATES||!1,ge=e.WHOLE_DOCUMENT||!1,ve=e.RETURN_DOM||!1,we=e.RETURN_DOM_FRAGMENT||!1,_e=e.RETURN_DOM_IMPORT||!1,be=e.FORCE_BODY||!1,xe=!1!==e.SANITIZE_DOM,Ee=!1!==e.KEEP_CONTENT,Oe=e.IN_PLACE||!1,oe=e.ALLOWED_URI_REGEXP||oe,he&&(me=!1),we&&(ve=!0),ke&&(ie=d({},[].concat(k(i))),ce=[],!0===ke.html&&(d(ie,t),d(ce,c)),!0===ke.svg&&(d(ie,n),d(ce,l),d(ce,u)),!0===ke.svgFilters&&(d(ie,r),d(ce,l),d(ce,u)),!0===ke.mathMl&&(d(ie,o),d(ce,s),d(ce,u))),e.ADD_TAGS&&(ie===ae&&(ie=h(ie)),d(ie,e.ADD_TAGS)),e.ADD_ATTR&&(ce===le&&(ce=h(ce)),d(ce,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&d(Le,e.ADD_URI_SAFE_ATTR),Ee&&(ie["#text"]=!0),ge&&d(ie,["html","head","body"]),ie.table&&d(ie,["tbody"]),L&&L(e),je=e)},Me=function(e){f.removed.push({element:e});try{e.parentNode.removeChild(e)}catch(t){e.outerHTML=U}},Ie=function(e,t){try{f.removed.push({attribute:t.getAttributeNode(e),from:t})}catch(e){f.removed.push({attribute:null,from:t})}t.removeAttribute(e)},Ce=function(e){var t=void 0,n=void 0;if(be)e=""+e;else{var r=e.match(/^[\s]+/);(n=r&&r[0])&&(e=e.slice(n.length))}if(p)try{t=(new B).parseFromString(e,"text/html")}catch(e){}if(g&&d(se,["title"]),!t||!t.documentElement){var o=t=Y.createHTMLDocument(""),i=o.body;i.parentNode.removeChild(i.parentNode.firstElementChild),i.outerHTML=G?G.createHTML(e):e}return n&&t.body.insertBefore(N.createTextNode(n),t.body.childNodes[0]||null),K.call(t,ge?"html":"body")[0]};f.isSupported&&(function(){try{var e=Ce('

');e.querySelector("svg img")&&(p=!0)}catch(e){}}(),function(){try{var e=Ce("</title><img>");e.querySelector("title").innerHTML.match(/<\/title/)&&(g=!0)}catch(e){}}());var Re=function(e){return V.call(e.ownerDocument||e,e,R.SHOW_ELEMENT|R.SHOW_COMMENT|R.SHOW_TEXT,function(){return R.FILTER_ACCEPT},!1)},De=function(e){return"object"===(void 0===C?"undefined":O(C))?e instanceof C:e&&"object"===(void 0===e?"undefined":O(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Fe=function(e,t,n){$[e]&&$[e].forEach(function(e){e.call(f,t,n,je)})},Pe=function(e){var t,n=void 0;if(Fe("beforeSanitizeElements",e,null),!((t=e)instanceof P||t instanceof H||"string"==typeof t.nodeName&&"string"==typeof t.textContent&&"function"==typeof t.removeChild&&t.attributes instanceof F&&"function"==typeof t.removeAttribute&&"function"==typeof t.setAttribute))return Me(e),!0;var r=e.nodeName.toLowerCase();if(Fe("uponSanitizeElement",e,{tagName:r,allowedTags:ie}),!ie[r]||se[r]){if(Ee&&!Te[r]&&"function"==typeof e.insertAdjacentHTML)try{var o=e.innerHTML;e.insertAdjacentHTML("AfterEnd",G?G.createHTML(o):o)}catch(e){}return Me(e),!0}return"noscript"===r&&e.innerHTML.match(/<\/noscript/i)?(Me(e),!0):"noembed"===r&&e.innerHTML.match(/<\/noembed/i)?(Me(e),!0):(!de||e.firstElementChild||e.content&&e.content.firstElementChild||!/</g.test(e.textContent)||(f.removed.push({element:e.cloneNode()}),e.innerHTML?e.innerHTML=e.innerHTML.replace(/</g,"<"):e.innerHTML=e.textContent.replace(/</g,"<")),he&&3===e.nodeType&&(n=(n=(n=e.textContent).replace(Z," ")).replace(Q," "),e.textContent!==n&&(f.removed.push({element:e.cloneNode()}),e.textContent=n)),Fe("afterSanitizeElements",e,null),!1)},He=function(e,t,n){if(xe&&("id"===t||"name"===t)&&(n in N||n in Ae))return!1;if(me&&ee.test(t));else if(fe&&te.test(t));else{if(!ce[t]||ue[t])return!1;if(Le[t]);else if(oe.test(n.replace(re,"")));else if("src"!==t&&"xlink:href"!==t||"script"===e||0!==n.indexOf("data:")||!Se[e])if(pe&&!ne.test(n.replace(re,"")));else if(n)return!1}return!0},Be=function(e){var t=void 0,n=void 0,r=void 0,o=void 0,i=void 0;Fe("beforeSanitizeAttributes",e,null);var a=e.attributes;if(a){var c={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ce};for(i=a.length;i--;){var l=t=a[i],s=l.name,u=l.namespaceURI;if(n=t.value.trim(),r=s.toLowerCase(),c.attrName=r,c.attrValue=n,c.keepAttr=!0,Fe("uponSanitizeAttribute",e,c),n=c.attrValue,"name"===r&&"IMG"===e.nodeName&&a.id)o=a.id,a=T(S,a,[]),Ie("id",e),Ie(s,e),a.indexOf(o)>i&&e.setAttribute("id",o.value);else{if("INPUT"===e.nodeName&&"type"===r&&"file"===n&&(ce[r]||!ue[r]))continue;"id"===s&&e.setAttribute(s,""),Ie(s,e)}if(c.keepAttr){he&&(n=(n=n.replace(Z," ")).replace(Q," "));var m=e.nodeName.toLowerCase();if(He(m,r,n))try{u?e.setAttributeNS(u,s,n):e.setAttribute(s,n),f.removed.pop()}catch(e){}}}Fe("afterSanitizeAttributes",e,null)}},ze=function e(t){var n=void 0,r=Re(t);for(Fe("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)Fe("uponSanitizeShadowNode",n,null),Pe(n)||(n.content instanceof M&&e(n.content),Be(n));Fe("afterSanitizeShadowDOM",t,null)};return f.sanitize=function(e,t){var n=void 0,r=void 0,o=void 0,i=void 0,c=void 0;if(e||(e="\x3c!--\x3e"),"string"!=typeof e&&!De(e)){if("function"!=typeof e.toString)throw new TypeError("toString is not a function");if("string"!=typeof(e=e.toString()))throw new TypeError("dirty is not a string, aborting")}if(!f.isSupported){if("object"===O(a.toStaticHTML)||"function"==typeof a.toStaticHTML){if("string"==typeof e)return a.toStaticHTML(e);if(De(e))return a.toStaticHTML(e.outerHTML)}return e}if(ye||Ne(t),f.removed=[],Oe);else if(e instanceof C)n=Ce("\x3c!--\x3e"),1===(r=n.ownerDocument.importNode(e,!0)).nodeType&&"BODY"===r.nodeName?n=r:n.appendChild(r);else{if(!ve&&!he&&!ge&&-1===e.indexOf("<"))return G?G.createHTML(e):e;if(!(n=Ce(e)))return ve?null:U}n&&be&&Me(n.firstChild);for(var l=Re(Oe?e:n);o=l.nextNode();)3===o.nodeType&&o===i||Pe(o)||(o.content instanceof M&&ze(o.content),Be(o),i=o);if(i=null,Oe)return e;if(ve){if(we)for(c=X.call(n.ownerDocument);n.firstChild;)c.appendChild(n.firstChild);else c=n;return _e&&(c=J.call(m,c,!0)),c}var s=ge?n.outerHTML:n.innerHTML;return he&&(s=(s=s.replace(Z," ")).replace(Q," ")),G?G.createHTML(s):s},f.setConfig=function(e){Ne(e),ye=!0},f.clearConfig=function(){je=null,ye=!1},f.isValidAttribute=function(e,t,n){je||Ne({});var r=e.toLowerCase(),o=t.toLowerCase();return He(r,o,n)},f.addHook=function(e,t){"function"==typeof t&&($[e]=$[e]||[],$[e].push(t))},f.removeHook=function(e){$[e]&&$[e].pop()},f.removeHooks=function(e){$[e]&&($[e]=[])},f.removeAllHooks=function(){$={}},f}()}()},function(e,t,n){"use strict";var r=n(12),o=n.n(r),i=n(16),a=n.n(i),c=n(1),l=n(17),s=n.n(l),u=n(113),f=n.n(u);t.a=function(e){var t=e.inputRef,n=e.className,r=a()(e,["inputRef","className"]),i=t||Object(c.createRef)();return Object(c.useEffect)(function(){var e=i.current;if(e){var t=e.offsetHeight-e.clientHeight;e.style.height="auto",e.style.height="".concat(e.scrollHeight+t,"px")}}),wp.element.createElement("textarea",o()({},r,{ref:i,className:s()(f.a.textarea,n),rows:1}))}},function(e,t,n){e.exports={textarea:"style__textarea___g5DyY"}},function(e,t,n){"use strict";var r=n(6),o=n.n(r),i=n(15),a=n.n(i),c=n(19),l=n.n(c),s=n(5),u=n(75),f=n(10),m=n(46),p=function(){function e(t){a()(this,e),this.sys={retrieveItem:function(e){var t=Object(s.select)("abt/data").getItemById(e);if(!t)throw new Error('CSL Data could not be found for item ID "'.concat(e,'"'));return t},retrieveLocale:function(e){var t=m.a.getItem(e);if(!t)throw new Error('Requested locale "'.concat(e,'" was not prefetched'));return t}};var n=e.instance;if(n)return n.style!==t&&(n.style=t,n.engine=new u.Engine(n.sys,n.style),n.engine.opt.development_extensions.wrap_url_and_doi=!0),n;e.instance=this,this.style=t,this.engine=new u.Engine(this.sys,this.style),this.engine.opt.development_extensions.wrap_url_and_doi=!0}return l()(e,[{key:"parseCitations",value:function(e){var t=this;return this.engine.rebuildProcessorState(e).map(function(e){var n=o()(e,3),r=n[0];return{id:r,html:n[2],sortedItems:JSON.stringify(t.registry.citationById[r].sortedItems.map(function(e){return o()(e,1)[0].id}))}})}},{key:"bibliography",get:function(){var e;try{if(!(e=this.engine.makeBibliography()))return{items:[],meta:{}}}catch(e){return{items:[],meta:{}}}var t=e,n=o()(t,2),r=n[0],i=n[1],a=r.entryspacing,c=r.hangingindent,l=r.linespacing,s=r.maxoffset,u=r["second-field-align"];return{meta:{entryspacing:a,hangingindent:c,linespacing:l,maxoffset:s,secondFieldAlign:u||void 0},items:Object(f.zipWith)(Object(f.flatten)(r.entry_ids),i,function(e,t){return{id:e,content:t}})}}},{key:"registry",get:function(){return this.engine.registry.citationreg}}]),e}();p.instance=null,t.a=p},,function(e,t,n){e.exports={heading:"style__heading___2dqtH",summary:"style__summary___1Srnv"}},,,,,,,,,,,,,,,,function(e,t,n){},function(e,t,n){},,,,,,function(e,t,n){"use strict";n.r(t);var r=n(3),o=n.n(r),i=n(20),a=(n(132),n(133),n(7)),c=n.n(a),l=n(0),s=n(12),u=n.n(s),f=n(1),m=n(18),p=n(4),d=n(17),h=n.n(d),g=n(10),y=n(112),b=n(25),v=n(116),w=n.n(v);function _(e){var t=e.attributes,n=t.isToggleable;return wp.element.createElement("section",{"aria-label":Object(l.__)("Bibliography","academic-bloggers-toolkit"),className:"abt-bibliography"},n&&wp.element.createElement("details",null,wp.element.createElement("summary",{className:w.a.summary},wp.element.createElement(x,e)),wp.element.createElement(E,t)),!n&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(x,e),wp.element.createElement(E,t)))}function x(e){var t=e.attributes,n=t.heading,r=t.headingAlign,o=t.headingLevel,i=t.isToggleable,a=e.isSelected,c=e.setAttributes;if(!a&&!n)return null;var s="h".concat(o),u=Object(f.useMemo)(function(){return h()({"abt-bibliography__heading":!i},w.a.heading)},[i]);return wp.element.createElement(s,{className:u,style:{textAlign:r}},a&&wp.element.createElement(y.a,{placeholder:Object(l.__)("Write heading...","academic-bloggers-toolkit"),value:n,onBlur:function(){return!n&&c({isToggleable:!1})},onChange:function(e){return c({heading:e.currentTarget.value})}}),!a&&n)}function E(e){var t=Object(f.useMemo)(function(){return Object(b.b)(e)},[e]);return wp.element.createElement("ol",u()({className:"abt-bibliography__body"},t),e.items.map(function(e){var t=e.content,n=e.id;return wp.element.createElement(m.RichText.Content,{key:n,id:n,tagName:"li",value:t})}))}function O(e){var t=e.attributes,n=t.heading,r=t.headingAlign,o=t.headingLevel;if(!n)return null;var i="h".concat(o);return wp.element.createElement(i,{className:"abt-bibliography__heading",style:{textAlign:r}},n)}function k(e){var t=Object(b.b)(e);return wp.element.createElement("ol",u()({className:"abt-bibliography__body"},t),e.items.map(function(e){var t=e.content,n=e.id;return wp.element.createElement(m.RichText.Content,{key:n,id:n,tagName:"li",value:t})}))}var T=["abt/bibliography",{title:Object(l.__)("Bibliography","academic-bloggers-toolkit"),category:"widgets",description:Object(l.__)("Display a list of your cited references.","academic-bloggers-toolkit"),icon:"welcome-learn-more",attributes:{entryspacing:{type:"string",source:"attribute",attribute:"data-entryspacing",selector:".abt-bibliography__body"},hangingindent:{type:"string",source:"attribute",attribute:"data-hangingindent",selector:".abt-bibliography__body"},linespacing:{type:"string",source:"attribute",attribute:"data-linespacing",selector:".abt-bibliography__body"},maxoffset:{type:"string",source:"attribute",attribute:"data-maxoffset",selector:".abt-bibliography__body"},secondFieldAlign:{type:"string",source:"attribute",attribute:"data-second-field-align",selector:".abt-bibliography__body"},items:{type:"array",default:[],source:"query",selector:"li",query:{id:{source:"attribute",type:"string",attribute:"id"},content:{source:"html",type:"string"}}},heading:{type:"string",default:""},headingLevel:{type:"number",default:3},headingAlign:{type:"string"},isToggleable:{type:"boolean",default:!1}},supports:{html:!1,inserter:!1,multiple:!1,reusable:!1},transforms:{from:[{type:"raw",selector:".abt-bibliography",transform:function(e){var t=e.querySelector(".abt-bibliography__heading"),n=e.querySelector(".abt-bibliography__container");if(n&&0!==n.children.length){var r={items:o()(n.children).map(function(e){return{id:e.id,content:e.innerHTML}})};if(t&&t.textContent){var a=/^H([1-6])$/i,l=t.dataset.headingLevel,s=t.nodeName,u=t.textContent,f=a.exec(s);if(f)r=c()({},r,{heading:u,headingLevel:parseInt(f[1],10)});else{if("BUTTON"!==s||!l)return;f=a.exec(l),r=c()({},r,{heading:u,headingLevel:parseInt(f?f[1]:"3",10),isToggleable:!0})}}return Object(i.createBlock)("abt/bibliography",r)}}}]},edit:function(e){var t=e.attributes,n=e.setAttributes,r=t.heading,o=t.headingAlign,i=t.headingLevel,a=t.isToggleable;return wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(m.InspectorControls,null,wp.element.createElement(p.PanelBody,{title:Object(l.__)("Bibliography Settings","academic-bloggers-toolkit")},Object(l.__)("Heading Level","academic-bloggers-toolkit"),wp.element.createElement(p.Toolbar,{controls:Object(g.range)(1,7).map(function(e){return{icon:"heading",title:Object(l.sprintf)(Object(l.__)("Heading %d"),e),isActive:e===i,onClick:function(){return n({headingLevel:e})},subscript:"".concat(e)}})}),Object(l.__)("Heading Alignment","academic-bloggers-toolkit"),wp.element.createElement(m.AlignmentToolbar,{value:o,onChange:function(e){return n({headingAlign:e})}}),wp.element.createElement(p.ToggleControl,{checked:a,help:Object(l.__)("Toggle mode can only be enabled if the bibliography has a heading.","academic-bloggers-toolkit"),label:Object(l.__)("Enable toggle","academic-bloggers-toolkit"),onChange:function(e){return r&&n({isToggleable:e})}}))),wp.element.createElement(_,e))},save:function(e){var t=e.attributes,n=t.isToggleable;return wp.element.createElement("section",{"aria-label":Object(l.__)("Bibliography","academic-bloggers-toolkit"),className:"abt-bibliography",role:"region"},n&&wp.element.createElement("details",null,wp.element.createElement("summary",{className:w.a.summary},wp.element.createElement(O,e)),wp.element.createElement(k,t)),!n&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(O,e),wp.element.createElement(k,t)))}}];var S=["abt/footnotes",{title:Object(l.__)("Footnotes","academic-bloggers-toolkit"),category:"widgets",description:Object(l.__)("Display a list of footnotes","academic-bloggers-toolkit"),icon:"testimonial",attributes:{items:{type:"array",default:[],source:"query",selector:"li",query:{id:{source:"attribute",type:"string",attribute:"id"},content:{source:"html",type:"string"}}}},supports:{html:!1,inserter:!1,multiple:!1,reusable:!1},edit:function(e){var t=e.attributes.items;return wp.element.createElement("section",{"aria-label":Object(l.__)("Footnotes","academic-bloggers-toolkit"),className:"abt-footnotes"},wp.element.createElement("hr",null),wp.element.createElement("ol",null,t.map(function(e){var t=e.content,n=e.id;return wp.element.createElement(m.RichText.Content,{key:n,className:"abt-footnotes-item",id:n,tagName:"li",value:t})})))},save:function(e){var t=e.attributes.items;return wp.element.createElement("section",{"aria-label":Object(l.__)("Footnotes","academic-bloggers-toolkit"),className:"abt-footnotes",role:"region"},wp.element.createElement("hr",null),wp.element.createElement("ol",null,t.map(function(e){var t=e.content,n=e.id;return wp.element.createElement(m.RichText.Content,{key:n,className:"abt-footnotes-item",id:n,tagName:"li",value:t})})))}}],L=n(23),j=n.n(L),A=n(2),N=n.n(A),M=n(8),I=n.n(M),C=n(5),R=n(71),D=n(76),F=n(72),P=n(46),H=n(22),B=n(114),z=n(77),q=n.n(z);function G(e){var t=e.id,n=e.content,r=e.onRemove,o=e.onMoveDown,i=e.onMoveUp;return wp.element.createElement("div",{key:t,className:q.a.row},wp.element.createElement(m.RichText.Content,{className:h()("csl-entry",q.a.item),"data-id":t,style:{display:"list-item"},tagName:"div",value:n}),wp.element.createElement("div",{className:q.a.buttonList},wp.element.createElement(p.IconButton,{disabled:!i,icon:"arrow-up-alt2",label:Object(l.__)("Move item up","academic-bloggers-toolkit"),onClick:i}),wp.element.createElement(p.IconButton,{icon:"trash",label:Object(l.__)("Remove item","academic-bloggers-toolkit"),onClick:r}),wp.element.createElement(p.IconButton,{disabled:!o,icon:"arrow-down-alt2",label:Object(l.__)("Move item down","academic-bloggers-toolkit"),onClick:o})))}function U(e){var t=e.attributes,n=t.items,r=t.orderedList,i=e.isSelected,a=e.setAttributes,c=r?"ol":"ul";return 0===n.length?wp.element.createElement(p.Placeholder,{icon:"welcome-learn-more",label:Object(l.__)("No references added yet","academic-bloggers-toolkit")},Object(l.__)('Add references to this list by double clicking one or more items listed in the "Avaliable References" section of the block settings panel.',"academic-bloggers-toolkit")):i?wp.element.createElement(c,{className:"abt-bibliography__body"},n.map(function(e,t){var r=e.content,i=e.id;return wp.element.createElement(G,{key:i,content:r,id:i,onMoveDown:t===n.length-1?void 0:function(){return a({items:Object(H.c)(n,t,t+1)})},onMoveUp:0===t?void 0:function(){return a({items:Object(H.c)(n,t,t-1)})},onRemove:function(){return a({items:[].concat(o()(n.slice(0,t)),o()(n.slice(t+1)))})}})})):wp.element.createElement(c,{className:"abt-bibliography__body"},n.map(function(e){var t=e.content,n=e.id;return wp.element.createElement(m.RichText.Content,{key:n,className:h()("csl-entry",q.a.item),"data-id":n,tagName:"li",value:t})}))}function W(e,t){return Y.apply(this,arguments)}function Y(){return(Y=I()(N.a.mark(function e(t,n){var r,i,a,l,s,u,f;return N.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.attributes.items,i=n.references,a=n.setAttributes,l=i.find(function(e){return e.id===t})){e.next=4;break}return e.abrupt("return");case 4:return e.next=6,P.b.fetchItem(Object(C.select)("abt/data").getStyle().value);case 6:return s=e.sent,e.next=9,P.a.fetchItem(s);case 9:(u=new B.a(s)).parseCitations([{citationID:"",citationItems:[{id:l.id,item:l}],properties:{index:0,noteIndex:0}}]),(f=u.bibliography.items[0])&&a({items:[].concat(o()(r),[c()({},f,{content:Object(b.c)(f.content)})])});case 13:case"end":return e.stop()}},e)}))).apply(this,arguments)}var V=Object(C.withSelect)(function(e,t){var n=t.attributes.items.map(function(e){return e.id});return{references:e("abt/data").getSortedItems().filter(function(e){return!n.includes(e.id)})}})(function(e){var t=e.attributes.orderedList,n=e.references,r=e.setAttributes;return wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(m.InspectorControls,null,wp.element.createElement(p.PanelBody,null,Object(l.__)("Double click on one or more items in the list below to insert them into the end of the list.","academic-bloggers-toolkit"),wp.element.createElement(p.PanelBody,{icon:wp.element.createElement(R.a,{count:n.length}),initialOpen:!1,title:Object(l.__)("Available References","academic-bloggers-toolkit")},wp.element.createElement(F.a,{items:n,renderItem:function(e){return wp.element.createElement(D.a,{item:e})},onItemDoubleClick:(o=I()(N.a.mark(function t(n){return N.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",W(n,e));case 1:case"end":return t.stop()}},t)})),function(e){return o.apply(this,arguments)})})))),wp.element.createElement(m.BlockFormatControls,null,wp.element.createElement(p.Toolbar,{controls:[{icon:"editor-ul",title:Object(l.__)("Convert to unordered list","academic-bloggers-toolkit"),isActive:!1===t,onClick:function(){r({orderedList:!1})}},{icon:"editor-ol",title:Object(l.__)("Convert to ordered list","academic-bloggers-toolkit"),isActive:!0===t,onClick:function(){r({orderedList:!0})}}]})),wp.element.createElement("section",{"aria-label":Object(l.__)("References","academic-bloggers-toolkit"),className:"abt-static-bib",role:"region"},wp.element.createElement(U,e)));var o});var K=["abt/static-bibliography",{title:Object(l.__)("Static Bibliography","academic-bloggers-toolkit"),category:"widgets",description:Object(l.__)("Display a static list of references.","academic-bloggers-toolkit"),icon:"welcome-learn-more",keywords:[Object(l.__)("reference","academic-bloggers-toolkit"),Object(l.__)("citation","academic-bloggers-toolkit"),Object(l.__)("sources","academic-bloggers-toolkit")],attributes:{items:{type:"array",source:"query",selector:"li",default:[],query:{content:{type:"string",source:"html"},id:{type:"string",source:"attribute",attribute:"data-id"}}},orderedList:{type:"boolean",default:!0}},supports:{anchor:!0,html:!1},transforms:{from:[{type:"raw",selector:".abt-static-bib",transform:function(e){var t=e.querySelector(".abt-bibliography__container");if(t){var n=o()(t.children).map(function(e){var t=e.querySelector(".csl-entry");return{id:e.id||j()(),content:t?Object(b.c)(t):e.innerHTML}});return Object(i.createBlock)("abt/static-bibliography",{items:n})}}}]},edit:V,save:function(e){var t=e.attributes,n=t.items,r=t.orderedList?"ol":"ul";return wp.element.createElement("section",{"aria-label":Object(l.__)("References","academic-bloggers-toolkit"),className:"abt-static-bib",role:"region"},wp.element.createElement(r,{className:"abt-bibliography__body"},n.map(function(e,t){var n=e.content,r=e.id;return wp.element.createElement(m.RichText.Content,{key:t,className:"csl-entry","data-id":r,tagName:"li",value:n})})))}}];i.registerBlockType.apply(void 0,o()(T)),i.registerBlockType.apply(void 0,o()(S)),i.registerBlockType.apply(void 0,o()(K))}]); //# sourceMappingURL=editor-blocks.js.map