this.nisje=this.nisje||{},this.nisje.views=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}return 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=630)}({0:function(e,t){e.exports=window.wp.element},12:function(e,t){e.exports=window.wp.components},18:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},2:function(e,t){e.exports=window.React},24:function(e,t){e.exports=window.wp.apiFetch},25:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(18);function o(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},3:function(e,t){e.exports=window.wp.i18n},35:function(e,t){e.exports=window.nisje.history},4:function(e,t){e.exports=window.nisje.components},5:function(e,t){e.exports=window.lodash},6:function(e,t){e.exports=window.wp.data},630:function(e,t,n){"use strict";n.r(t),n.d(t,"DeleteModal",(function(){return j})),n.d(t,"Message",(function(){return O}));var r=n(9),o=n(0),c=n(5),i=n(2),u=n(3),a=n(12),s=n(6),l=n(24),f=n.n(l),d=n(4),p=n(35),b=n.n(p),j=function(e){var t=e.button,n=e.message,l=e.onRequestClose,p=e.onSuccess,j=void 0===p?c.noop:p,m=e.redirect,w=void 0!==m&&m,O=e.restPath,y=e.successMessage,v=e.title,h=Object(i.useState)(!1),x=Object(r.a)(h,2),g=x[0],_=x[1],E=Object(i.useState)(!1),S=Object(r.a)(E,2),M=S[0],C=S[1],I=Object(s.useDispatch)("nisje/notices").createInfoNotice;return Object(o.createElement)(a.Modal,{className:"views-delete-modal",closeButtonLabel:Object(u.__)("Cancel"),onRequestClose:l,title:v||Object(u.__)("Delete post?")},Object(o.createElement)("p",null,n||Object(u.__)("This will delete the post permanently")),M&&Object(o.createElement)(d.Notice,{status:"error"},M),Object(o.createElement)("div",{className:"views-delete-modal__actions"},Object(o.createElement)(d.Flex,{justify:"flex-end"},Object(o.createElement)(d.FlexItem,null,Object(o.createElement)(d.ExperimentalButton,{isSecondary:!0,onClick:l},Object(u.__)("Cancel"))),Object(o.createElement)(d.FlexItem,null,Object(o.createElement)(d.ExperimentalButton,{className:"delete-button",isDestructive:!0,isBusy:g,onClick:function(){_(!0),f()({path:O,method:"DELETE"}).then((function(){I(y||Object(u.__)("Successfully deleted the post")),j(),l(),w&&b.a.replace(w)})).catch((function(e){C(e.message),_(!1)}))}},t||Object(u.__)("Delete"))))))},m=n(8),w=n(64),O=Object(w.withViewportMatch)({isHuge:"huge"})((function(e){var t=e.isHuge,n=e.icon,r=e.children;return Object(o.createElement)("div",{className:"views-message"},Object(o.createElement)("div",null,n&&Object(o.createElement)(m.Icon,{icon:n,size:t?80:60}),Object(o.createElement)("p",null,r)))}))},64:function(e,t){e.exports=window.nisje.viewport},8:function(e,t){e.exports=window.nisje.icons},9:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(25);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],_n=!0,r=!1,o=void 0;try{for(var c,i=e[Symbol.iterator]();!(_n=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);_n=!0);}catch(e){r=!0,o=e}finally{try{_n||null==i.return||i.return()}finally{if(r)throw o}}return n}}(e,t)||Object(r.a)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}}});