(()=>{"use strict";var e,t={28432:function(e,t,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var o=a(r(73609)),n=function(e,t){o.default("#new a.task-type-choice, #new a.choose-different-task-type",e.body).on("click",(function(){return e.loadUrl(this.href),!1})),o.default("form.task-create",e.body).on("submit",(function(){var r=new FormData(this);return o.default.ajax({url:this.action,data:r,processData:!1,contentType:!1,type:"POST",dataType:"text",success:e.loadResponseText,error:function(r,a,n){var i=t.error_message+"<br />"+n+" - "+r.status;o.default("#new",e.body).append('<div class="help-block help-critical"><strong>'+t.error_label+": </strong>"+i+"</div>")}}),!1}))},i={chooser:function(e,t){function r(t){o.default("a.task-choice",t).on("click",(function(){return e.loadUrl(this.href),!1})),o.default(".pagination a",t).on("click",(function(){return u(this.href),!1})),o.default("a.create-one-now").on("click",(function(e){o.default('a[href="#new"]').tab("show"),e.preventDefault()}))}var a,i=o.default("form.task-search",e.body),l=i.attr("action");function u(e,t){var n={url:e,success:function(e){a=null,o.default("#search-results").html(e),r(o.default("#search-results"))},error:function(){a=null}};t&&(n.data=t),a=o.default.ajax(n)}function s(){return u(l,i.serialize()),!1}r(e.body),n(e,t),o.default("form.task-search",e.body).on("submit",s),o.default("#id_q").on("input",(function(){a&&a.abort(),clearTimeout(o.default.data(this,"timer"));var e=setTimeout(s,50);o.default(this).data("timer",e)})),o.default("#id_task_type").on("change",(function(){a&&a.abort(),clearTimeout(o.default.data(this,"timer"));var e=setTimeout(s,50);o.default(this).data("timer",e)}))},task_chosen:function(e,t){e.respond("taskChosen",t.result),e.close()},reshow_create_tab:function(e,t){o.default("#new",e.body).html(t.htmlFragment),n(e,t)}};window.TASK_CHOOSER_MODAL_ONLOAD_HANDLERS=i},73609:e=>{e.exports=jQuery}},r={};function a(e){var o=r[e];if(void 0!==o)return o.exports;var n=r[e]={id:e,loaded:!1,exports:{}};return t[e].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.m=t,e=[],a.O=(t,r,o,n)=>{if(!r){var i=1/0;for(s=0;s<e.length;s++){for(var[r,o,n]=e[s],l=!0,u=0;u<r.length;u++)(!1&n||i>=n)&&Object.keys(a.O).every((e=>a.O[e](r[u])))?r.splice(u--,1):(l=!1,n<i&&(i=n));l&&(e.splice(s--,1),t=o())}return t}n=n||0;for(var s=e.length;s>0&&e[s-1][2]>n;s--)e[s]=e[s-1];e[s]=[r,o,n]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.j=342,(()=>{var e={342:0};a.O.j=t=>0===e[t];var t=(t,r)=>{var o,n,[i,l,u]=r,s=0;for(o in l)a.o(l,o)&&(a.m[o]=l[o]);if(u)var c=u(a);for(t&&t(r);s<i.length;s++)n=i[s],a.o(e,n)&&e[n]&&e[n][0](),e[i[s]]=0;return a.O(c)},r=globalThis.webpackChunkwagtail=globalThis.webpackChunkwagtail||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),a.O(void 0,[751],(()=>a(28432)));var o=a.O(void 0,[751],(()=>a(90971)));o=a.O(o)})();
//# sourceMappingURL=task-chooser-modal.js.map