wonder-image 1.2.0

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.
Files changed (223) hide show
  1. package/DOCS.md +12 -0
  2. package/LICENSE +21 -0
  3. package/README.md +1 -0
  4. package/babel.config.json +3 -0
  5. package/demo/backend/body-end.php +10 -0
  6. package/demo/backend/head.php +93 -0
  7. package/demo/frontend/body-end.php +19 -0
  8. package/demo/frontend/head.php +244 -0
  9. package/demo/wonder-image.php +41 -0
  10. package/dist/0d01fa889dc2b0202b98.png +0 -0
  11. package/dist/203d1199e7aef04c0a34.gif +0 -0
  12. package/dist/26d6ed3fa1c815e4c78f.png +0 -0
  13. package/dist/39795c0b4513de014cf8.woff +0 -0
  14. package/dist/40b30ca122107c2852be.png +0 -0
  15. package/dist/4a7b4107b62ef059ba65.png +0 -0
  16. package/dist/4dce7f71b08755f19759.png +0 -0
  17. package/dist/60af14fddca897f348bb.png +0 -0
  18. package/dist/67172a36bcdeaca8592a.png +0 -0
  19. package/dist/a85c6dc53638f894de38.png +0 -0
  20. package/dist/b7bcc075b395c14ce8c2.woff2 +0 -0
  21. package/dist/backend/body-end.js +3 -0
  22. package/dist/backend/body-end.js.LICENSE.txt +44 -0
  23. package/dist/backend/body-end.js.map +1 -0
  24. package/dist/backend/head.css +2 -0
  25. package/dist/backend/head.css.map +1 -0
  26. package/dist/backend/head.js +3 -0
  27. package/dist/backend/head.js.LICENSE.txt +46 -0
  28. package/dist/backend/head.js.map +1 -0
  29. package/dist/backend/lib.js +2 -0
  30. package/dist/backend/lib.js.LICENSE.txt +1 -0
  31. package/dist/frontend/body-end.js +3 -0
  32. package/dist/frontend/body-end.js.LICENSE.txt +46 -0
  33. package/dist/frontend/body-end.js.map +1 -0
  34. package/dist/frontend/head.css +2 -0
  35. package/dist/frontend/head.css.map +1 -0
  36. package/dist/frontend/head.js +3 -0
  37. package/dist/frontend/head.js.LICENSE.txt +46 -0
  38. package/dist/frontend/head.js.map +1 -0
  39. package/dist/frontend/lib.css +2 -0
  40. package/dist/frontend/lib.css.map +1 -0
  41. package/dist/frontend/lib.js +3 -0
  42. package/dist/frontend/lib.js.LICENSE.txt +151 -0
  43. package/dist/frontend/lib.js.map +1 -0
  44. package/dist/lib/autonumeric/autonumeric.js +3 -0
  45. package/dist/lib/autonumeric/autonumeric.js.LICENSE.txt +47 -0
  46. package/dist/lib/autonumeric/autonumeric.js.map +1 -0
  47. package/dist/lib/bootstrap/bootstrap-datepicker.css +2 -0
  48. package/dist/lib/bootstrap/bootstrap-datepicker.css.map +1 -0
  49. package/dist/lib/bootstrap/bootstrap-datepicker.js +3 -0
  50. package/dist/lib/bootstrap/bootstrap-datepicker.js.LICENSE.txt +42 -0
  51. package/dist/lib/bootstrap/bootstrap-datepicker.js.map +1 -0
  52. package/dist/lib/bootstrap/bootstrap-icons.css +2 -0
  53. package/dist/lib/bootstrap/bootstrap-icons.css.map +1 -0
  54. package/dist/lib/bootstrap/bootstrap-icons.js +3 -0
  55. package/dist/lib/bootstrap/bootstrap-icons.js.LICENSE.txt +13 -0
  56. package/dist/lib/bootstrap/bootstrap-icons.js.map +1 -0
  57. package/dist/lib/bootstrap/bootstrap.css +2 -0
  58. package/dist/lib/bootstrap/bootstrap.css.map +1 -0
  59. package/dist/lib/bootstrap/bootstrap.js +3 -0
  60. package/dist/lib/bootstrap/bootstrap.js.LICENSE.txt +44 -0
  61. package/dist/lib/bootstrap/bootstrap.js.map +1 -0
  62. package/dist/lib/chartjs/chart.js +3 -0
  63. package/dist/lib/chartjs/chart.js.LICENSE.txt +1467 -0
  64. package/dist/lib/chartjs/chart.js.map +1 -0
  65. package/dist/lib/datatables/datatables.css +2 -0
  66. package/dist/lib/datatables/datatables.css.map +1 -0
  67. package/dist/lib/datatables/datatables.js +3 -0
  68. package/dist/lib/datatables/datatables.js.LICENSE.txt +8988 -0
  69. package/dist/lib/datatables/datatables.js.map +1 -0
  70. package/dist/lib/editorjs/editor.js +3 -0
  71. package/dist/lib/editorjs/editor.js.LICENSE.txt +5812 -0
  72. package/dist/lib/editorjs/editor.js.map +1 -0
  73. package/dist/lib/fancyapps/fancyapps.css +2 -0
  74. package/dist/lib/fancyapps/fancyapps.css.map +1 -0
  75. package/dist/lib/fancyapps/fancyapps.js +3 -0
  76. package/dist/lib/fancyapps/fancyapps.js.LICENSE.txt +19 -0
  77. package/dist/lib/fancyapps/fancyapps.js.map +1 -0
  78. package/dist/lib/filepond/filepond.css +2 -0
  79. package/dist/lib/filepond/filepond.css.map +1 -0
  80. package/dist/lib/filepond/filepond.js +3 -0
  81. package/dist/lib/filepond/filepond.js.LICENSE.txt +2797 -0
  82. package/dist/lib/filepond/filepond.js.map +1 -0
  83. package/dist/lib/fullcalendar/fullcalendar.js +3 -0
  84. package/dist/lib/fullcalendar/fullcalendar.js.LICENSE.txt +3787 -0
  85. package/dist/lib/fullcalendar/fullcalendar.js.map +1 -0
  86. package/dist/lib/jquery/jquery-plugin.css +2 -0
  87. package/dist/lib/jquery/jquery-plugin.css.map +1 -0
  88. package/dist/lib/jquery/jquery-plugin.js +3 -0
  89. package/dist/lib/jquery/jquery-plugin.js.LICENSE.txt +60 -0
  90. package/dist/lib/jquery/jquery-plugin.js.map +1 -0
  91. package/dist/lib/jquery/jquery.js +3 -0
  92. package/dist/lib/jquery/jquery.js.LICENSE.txt +3240 -0
  93. package/dist/lib/jquery/jquery.js.map +1 -0
  94. package/dist/lib/jstree/jstree.css +2 -0
  95. package/dist/lib/jstree/jstree.css.map +1 -0
  96. package/dist/lib/jstree/jstree.js +3 -0
  97. package/dist/lib/jstree/jstree.js.LICENSE.txt +42 -0
  98. package/dist/lib/jstree/jstree.js.map +1 -0
  99. package/dist/lib/moment/moment.js +3 -0
  100. package/dist/lib/moment/moment.js.LICENSE.txt +772 -0
  101. package/dist/lib/moment/moment.js.map +1 -0
  102. package/dist/lib/quilljs/quill.css +2 -0
  103. package/dist/lib/quilljs/quill.css.map +1 -0
  104. package/dist/lib/quilljs/quill.js +3 -0
  105. package/dist/lib/quilljs/quill.js.LICENSE.txt +3038 -0
  106. package/dist/lib/quilljs/quill.js.map +1 -0
  107. package/dist/lib/swiperjs/swiper-plugin.css +2 -0
  108. package/dist/lib/swiperjs/swiper-plugin.css.map +1 -0
  109. package/dist/lib/swiperjs/swiper-plugin.js +3 -0
  110. package/dist/lib/swiperjs/swiper-plugin.js.LICENSE.txt +1113 -0
  111. package/dist/lib/swiperjs/swiper-plugin.js.map +1 -0
  112. package/dist/lib/swiperjs/swiper.css +2 -0
  113. package/dist/lib/swiperjs/swiper.css.map +1 -0
  114. package/dist/lib/swiperjs/swiper.js +3 -0
  115. package/dist/lib/swiperjs/swiper.js.LICENSE.txt +651 -0
  116. package/dist/lib/swiperjs/swiper.js.map +1 -0
  117. package/dist/lib/videojs/video.css +2 -0
  118. package/dist/lib/videojs/video.css.map +1 -0
  119. package/dist/lib/videojs/video.js +3 -0
  120. package/dist/lib/videojs/video.js.LICENSE.txt +23391 -0
  121. package/dist/lib/videojs/video.js.map +1 -0
  122. package/package.json +95 -0
  123. package/src/build/backend/css/header.css +252 -0
  124. package/src/build/backend/css/input.css +295 -0
  125. package/src/build/backend/css/list.css +57 -0
  126. package/src/build/backend/css/order.css +99 -0
  127. package/src/build/backend/js/ajax.js +96 -0
  128. package/src/build/backend/js/alert.js +78 -0
  129. package/src/build/backend/js/bootstrap.js +52 -0
  130. package/src/build/backend/js/form/editor.js +293 -0
  131. package/src/build/backend/js/form/file.js +142 -0
  132. package/src/build/backend/js/form/filepond.js +11 -0
  133. package/src/build/backend/js/form/input.js +313 -0
  134. package/src/build/backend/js/form/inputRow.js +164 -0
  135. package/src/build/backend/js/form/send.js +14 -0
  136. package/src/build/backend/js/form/set.js +314 -0
  137. package/src/build/backend/js/jquery.js +15 -0
  138. package/src/build/backend/js/list.js +19 -0
  139. package/src/build/backend/js/modal.js +31 -0
  140. package/src/build/backend/js/pageSetUp.js +125 -0
  141. package/src/build/backend/js/utility.js +38 -0
  142. package/src/build/frontend/css/class/dimension.css +3376 -0
  143. package/src/build/frontend/css/class/function.css +316 -0
  144. package/src/build/frontend/css/class/grid.css +240 -0
  145. package/src/build/frontend/css/class/margin.css +823 -0
  146. package/src/build/frontend/css/class/padding.css +760 -0
  147. package/src/build/frontend/css/class/position.css +351 -0
  148. package/src/build/frontend/css/class/resize.css +24 -0
  149. package/src/build/frontend/css/class/section.css +41 -0
  150. package/src/build/frontend/css/class/text.css +244 -0
  151. package/src/build/frontend/css/components/alert.css +42 -0
  152. package/src/build/frontend/css/components/button.css +107 -0
  153. package/src/build/frontend/css/components/dropdown.css +118 -0
  154. package/src/build/frontend/css/components/form/address.css +26 -0
  155. package/src/build/frontend/css/components/form/checkbox.css +65 -0
  156. package/src/build/frontend/css/components/form/date.css +133 -0
  157. package/src/build/frontend/css/components/form/input.css +176 -0
  158. package/src/build/frontend/css/components/form/select.css +69 -0
  159. package/src/build/frontend/css/components/header/hamburger/hamburger-1.css +56 -0
  160. package/src/build/frontend/css/components/header/hamburger/hamburger.css +58 -0
  161. package/src/build/frontend/css/components/header/header.css +57 -0
  162. package/src/build/frontend/css/components/header/mobile-nav.css +79 -0
  163. package/src/build/frontend/css/components/modal.css +76 -0
  164. package/src/build/frontend/css/components/spinner.css +37 -0
  165. package/src/build/frontend/css/generator/dimension.php +93 -0
  166. package/src/build/frontend/css/generator/margin.php +48 -0
  167. package/src/build/frontend/css/generator/padding.php +48 -0
  168. package/src/build/frontend/css/lib.css +3 -0
  169. package/src/build/frontend/css/main.css +37 -0
  170. package/src/build/frontend/js/alert.js +64 -0
  171. package/src/build/frontend/js/aos.js +9 -0
  172. package/src/build/frontend/js/dropdown.js +73 -0
  173. package/src/build/frontend/js/form/input.js +211 -0
  174. package/src/build/frontend/js/form/list.js +155 -0
  175. package/src/build/frontend/js/form/select.js +108 -0
  176. package/src/build/frontend/js/form/send.js +137 -0
  177. package/src/build/frontend/js/header.js +12 -0
  178. package/src/build/frontend/js/modal.js +26 -0
  179. package/src/build/frontend/js/pageSetUp.js +35 -0
  180. package/src/build/frontend/js/scroll.js +70 -0
  181. package/src/build/frontend/js/utility.js +21 -0
  182. package/src/build/global/js/canvas.js +82 -0
  183. package/src/build/global/js/fetch.js +47 -0
  184. package/src/build/global/js/form/autonumeric.js +136 -0
  185. package/src/build/global/js/form/phone.js +19 -0
  186. package/src/build/global/js/utility.js +88 -0
  187. package/src/build/global/js/video.js +7 -0
  188. package/src/build/lib/editorjs/gallery.js +39 -0
  189. package/src/build/lib/editorjs/hyperlink.js +170 -0
  190. package/src/build/lib/editorjs/video.js +61 -0
  191. package/src/build/lib/swiperjs/effect-carousel.css +24 -0
  192. package/src/build/lib/swiperjs/effect-carousel.esm.js +102 -0
  193. package/src/build/lib/swiperjs/effect-shutters.css +33 -0
  194. package/src/build/lib/swiperjs/effect-shutters.esm.js +114 -0
  195. package/src/build/lib/swiperjs/effect-slicer.css +39 -0
  196. package/src/build/lib/swiperjs/effect-slicer.esm.js +198 -0
  197. package/src/build/lib/swiperjs/swiper-gl.css +44 -0
  198. package/src/build/lib/swiperjs/swiper-gl.esm.js +6063 -0
  199. package/src/export/backend/body-end.js +4 -0
  200. package/src/export/backend/head.js +25 -0
  201. package/src/export/backend/lib.js +0 -0
  202. package/src/export/frontend/body-end.js +9 -0
  203. package/src/export/frontend/head.js +42 -0
  204. package/src/export/frontend/lib.js +17 -0
  205. package/src/export/lib/autonumeric/autonumeric.js +3 -0
  206. package/src/export/lib/bootstrap/bootstrap-datepicker.js +4 -0
  207. package/src/export/lib/bootstrap/bootstrap-icons.js +2 -0
  208. package/src/export/lib/bootstrap/bootstrap.js +3 -0
  209. package/src/export/lib/chartjs/chart.js +4 -0
  210. package/src/export/lib/datatables/datatables.js +6 -0
  211. package/src/export/lib/editorjs/editor.js +48 -0
  212. package/src/export/lib/fancyapps/fancyapps.js +7 -0
  213. package/src/export/lib/filepond/filepond.js +51 -0
  214. package/src/export/lib/fullcalendar/fullcalendar.js +29 -0
  215. package/src/export/lib/jquery/jquery-plugin.js +14 -0
  216. package/src/export/lib/jquery/jquery.js +4 -0
  217. package/src/export/lib/jstree/jstree.js +2 -0
  218. package/src/export/lib/moment/moment.js +12 -0
  219. package/src/export/lib/quilljs/quill.js +4 -0
  220. package/src/export/lib/swiperjs/swiper-plugin.js +20 -0
  221. package/src/export/lib/swiperjs/swiper.js +4 -0
  222. package/src/export/lib/videojs/video.js +3 -0
  223. package/webpack.config.js +79 -0
@@ -0,0 +1,3 @@
1
+ /*! For license information please see filepond.js.LICENSE.txt */
2
+ (()=>{var e={6936:function(e){e.exports=function(){"use strict";var e=function(e){var t=e.addFilter,n=e.utils.Type;return t("SET_ATTRIBUTE_TO_OPTION_MAP",(function(e){return Object.assign(e,{"^fileMetadata":{group:"fileMetadataObject"}})})),t("DID_LOAD_ITEM",(function(e,t){var n=t.query;return new Promise((function(t){if(!n("GET_ALLOW_FILE_METADATA"))return t(e);var r=n("GET_FILE_METADATA_OBJECT");"object"==typeof r&&null!==r&&Object.keys(r).forEach((function(t){e.setMetadata(t,r[t],!0)})),t(e)}))})),{options:{allowFileMetadata:[!0,n.BOOLEAN],fileMetadataObject:[null,n.OBJECT]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:e})),e}()},8460:function(e){e.exports=function(){"use strict";var e=function(e){var t=e.addFilter,n=e.utils,r=n.Type,i=n.replaceInString,o=n.toNaturalFileSize;return t("ALLOW_HOPPER_ITEM",(function(e,t){var n=t.query;if(!n("GET_ALLOW_FILE_SIZE_VALIDATION"))return!0;var r=n("GET_MAX_FILE_SIZE");if(null!==r&&e.size>r)return!1;var i=n("GET_MIN_FILE_SIZE");return!(null!==i&&e.size<i)})),t("LOAD_FILE",(function(e,t){var n=t.query;return new Promise((function(t,r){if(!n("GET_ALLOW_FILE_SIZE_VALIDATION"))return t(e);var a=n("GET_FILE_VALIDATE_SIZE_FILTER");if(a&&!a(e))return t(e);var u=n("GET_MAX_FILE_SIZE");if(null!==u&&e.size>u)r({status:{main:n("GET_LABEL_MAX_FILE_SIZE_EXCEEDED"),sub:i(n("GET_LABEL_MAX_FILE_SIZE"),{filesize:o(u,".",n("GET_FILE_SIZE_BASE"),n("GET_FILE_SIZE_LABELS",n))})}});else{var l=n("GET_MIN_FILE_SIZE");if(null!==l&&e.size<l)r({status:{main:n("GET_LABEL_MIN_FILE_SIZE_EXCEEDED"),sub:i(n("GET_LABEL_MIN_FILE_SIZE"),{filesize:o(l,".",n("GET_FILE_SIZE_BASE"),n("GET_FILE_SIZE_LABELS",n))})}});else{var s=n("GET_MAX_TOTAL_FILE_SIZE");if(null!==s&&n("GET_ACTIVE_ITEMS").reduce((function(e,t){return e+t.fileSize}),0)>s)return void r({status:{main:n("GET_LABEL_MAX_TOTAL_FILE_SIZE_EXCEEDED"),sub:i(n("GET_LABEL_MAX_TOTAL_FILE_SIZE"),{filesize:o(s,".",n("GET_FILE_SIZE_BASE"),n("GET_FILE_SIZE_LABELS",n))})}});t(e)}}}))})),{options:{allowFileSizeValidation:[!0,r.BOOLEAN],maxFileSize:[null,r.INT],minFileSize:[null,r.INT],maxTotalFileSize:[null,r.INT],fileValidateSizeFilter:[null,r.FUNCTION],labelMinFileSizeExceeded:["File is too small",r.STRING],labelMinFileSize:["Minimum file size is {filesize}",r.STRING],labelMaxFileSizeExceeded:["File is too large",r.STRING],labelMaxFileSize:["Maximum file size is {filesize}",r.STRING],labelMaxTotalFileSizeExceeded:["Maximum total size exceeded",r.STRING],labelMaxTotalFileSize:["Maximum total file size is {filesize}",r.STRING]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:e})),e}()},3424:function(e){e.exports=function(){"use strict";var e=function(e){var t=e.addFilter,n=e.utils,r=n.Type,i=n.isString,o=n.replaceInString,a=n.guesstimateMimeType,u=n.getExtensionFromFilename,l=n.getFilenameFromURL,s=function(e,t){return(/^[^/]+/.exec(e)||[]).pop()===t.slice(0,-2)},c=function(e,t){return e.some((function(e){return/\*$/.test(e)?s(t,e):e===t}))},f=function(e){var t="";if(i(e)){var n=l(e),r=u(n);r&&(t=a(r))}else t=e.type;return t},d=function(e,t,n){if(0===t.length)return!0;var r=f(e);return n?new Promise((function(i,o){n(e,r).then((function(e){c(t,e)?i():o()})).catch(o)})):c(t,r)},p=function(e){return function(t){return null!==e[t]&&(e[t]||t)}};return t("SET_ATTRIBUTE_TO_OPTION_MAP",(function(e){return Object.assign(e,{accept:"acceptedFileTypes"})})),t("ALLOW_HOPPER_ITEM",(function(e,t){var n=t.query;return!n("GET_ALLOW_FILE_TYPE_VALIDATION")||d(e,n("GET_ACCEPTED_FILE_TYPES"))})),t("LOAD_FILE",(function(e,t){var n=t.query;return new Promise((function(t,r){if(n("GET_ALLOW_FILE_TYPE_VALIDATION")){var i=n("GET_ACCEPTED_FILE_TYPES"),a=n("GET_FILE_VALIDATE_TYPE_DETECT_TYPE"),u=d(e,i,a),l=function(){var e=i.map(p(n("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES_MAP"))).filter((function(e){return!1!==e})),t=e.filter((function(t,n){return e.indexOf(t)===n}));r({status:{main:n("GET_LABEL_FILE_TYPE_NOT_ALLOWED"),sub:o(n("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES"),{allTypes:t.join(", "),allButLastType:t.slice(0,-1).join(", "),lastType:t[t.length-1]})}})};if("boolean"==typeof u)return u?t(e):l();u.then((function(){t(e)})).catch(l)}else t(e)}))})),{options:{allowFileTypeValidation:[!0,r.BOOLEAN],acceptedFileTypes:[[],r.ARRAY],labelFileTypeNotAllowed:["File is of invalid type",r.STRING],fileValidateTypeLabelExpectedTypes:["Expects {allButLastType} or {lastType}",r.STRING],fileValidateTypeLabelExpectedTypesMap:[{},r.OBJECT],fileValidateTypeDetectType:[null,r.FUNCTION]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:e})),e}()},6440:function(e){e.exports=function(){"use strict";const e=(e,r,i,o,a)=>{const u=r.querySelector(".filepond--file-info"),l=r.querySelector(".filepond--file-info-main"),s=t(i);let c=r.querySelector(".filepond--file-info-main-container");c||(c=document.createElement("div"),c.className="filepond--file-info-main-container",c.append(l),u.prepend(c)),c.prepend(s),s.addEventListener("click",(()=>n(e,o,a)))},t=e=>{let t=document.createElement("span");return t.className="filepond--download-icon",t.title=e,t},n=(e,t,n)=>{if(n&&"function"==typeof n)n(e);else if(t&&e.getMetadata("url"))location.href=e.getMetadata("url");else{const t=document.createElement("a"),n=window.URL.createObjectURL(e.file);document.body.appendChild(t),t.style.display="none",t.href=n,t.download=e.file.name,t.click(),window.URL.revokeObjectURL(n),t.remove()}},r=t=>{const{addFilter:n,utils:r}=t,{Type:i,createRoute:o}=r;return n("CREATE_VIEW",(t=>{const{is:n,view:r,query:i}=t;if(!n("file"))return;const a=({root:t,props:n})=>{const{id:r}=n,o=i("GET_ITEM",r);if(!o||o.archived)return;const a=t.query("GET_LABEL_BUTTON_DOWNLOAD_ITEM"),u=t.query("GET_ALLOW_DOWNLOAD_BY_URL"),l=t.query("GET_DOWNLOAD_FUNCTION");e(o,t.element,a,u,l)};r.registerWriter(o({DID_LOAD_ITEM:a},(({root:e,props:t})=>{const{id:n}=t;i("GET_ITEM",n),e.rect.element.hidden})))})),{options:{labelButtonDownloadItem:["Download file",i.STRING],allowDownloadByUrl:[!1,i.BOOLEAN],downloadFunction:[null,i.FUNCTION]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:r})),r}()},8216:function(e){e.exports=function(){"use strict";var e=function(e){return/^image/.test(e.type)},t=function(t){var n=t.addFilter,r=t.utils,i=r.Type,o=r.isFile,a=r.getNumericAspectRatioFromString,u=function(t,n){return!(!e(t.file)||!n("GET_ALLOW_IMAGE_CROP"))},l=function(e){return"object"==typeof e},s=function(e){return"number"==typeof e},c=function(e,t){return e.setMetadata("crop",Object.assign({},e.getMetadata("crop"),t))};return n("DID_CREATE_ITEM",(function(e,t){var n=t.query;e.extend("setImageCrop",(function(t){if(u(e,n)&&l(center))return e.setMetadata("crop",t),t})),e.extend("setImageCropCenter",(function(t){if(u(e,n)&&l(t))return c(e,{center:t})})),e.extend("setImageCropZoom",(function(t){if(u(e,n)&&s(t))return c(e,{zoom:Math.max(1,t)})})),e.extend("setImageCropRotation",(function(t){if(u(e,n)&&s(t))return c(e,{rotation:t})})),e.extend("setImageCropFlip",(function(t){if(u(e,n)&&l(t))return c(e,{flip:t})})),e.extend("setImageCropAspectRatio",(function(t){if(u(e,n)&&void 0!==t){var r=e.getMetadata("crop"),i=a(t),o={center:{x:.5,y:.5},flip:r?Object.assign({},r.flip):{horizontal:!1,vertical:!1},rotation:0,zoom:1,aspectRatio:i};return e.setMetadata("crop",o),o}}))})),n("DID_LOAD_ITEM",(function(t,n){var r=n.query;return new Promise((function(n,i){var u=t.file;if(!o(u)||!e(u)||!r("GET_ALLOW_IMAGE_CROP"))return n(t);if(t.getMetadata("crop"))return n(t);var l=r("GET_IMAGE_CROP_ASPECT_RATIO");t.setMetadata("crop",{center:{x:.5,y:.5},flip:{horizontal:!1,vertical:!1},rotation:0,zoom:1,aspectRatio:l?a(l):null}),n(t)}))})),{options:{allowImageCrop:[!0,i.BOOLEAN],imageCropAspectRatio:[null,i.STRING]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:t})),t}()},124:function(e){e.exports=function(){"use strict";var e=function(e){return/^image/.test(e.type)},t=function(t){var n=t.addFilter,r=t.utils,i=t.views,o=r.Type,a=r.createRoute,u=r.createItemAPI,l=void 0===u?function(e){return e}:u,s=i.fileActionButton;n("SHOULD_REMOVE_ON_REVERT",(function(t,n){var r=n.item,i=n.query;return new Promise((function(t){var n=r.file;t(!(i("GET_ALLOW_IMAGE_EDIT")&&i("GET_IMAGE_EDIT_ALLOW_EDIT")&&e(n)))}))})),n("DID_LOAD_ITEM",(function(t,n){var r=n.query,i=n.dispatch;return new Promise((function(n,o){if(t.origin>1)n(t);else{var a=t.file;if(r("GET_ALLOW_IMAGE_EDIT")&&r("GET_IMAGE_EDIT_INSTANT_EDIT"))if(e(a)){var u=function(e,t,n){return function(r){c.shift(),r?t(e):n(e),i("KICK"),l()}},l=function(){if(c.length){var e=c[0],t=e.item,n=e.resolve,r=e.reject;i("EDIT_ITEM",{id:t.id,handleEditorResponse:u(t,n,r)})}};f({item:t,resolve:n,reject:o}),1===c.length&&l()}else n(t);else n(t)}}))})),n("DID_CREATE_ITEM",(function(e,t){t.query;var n=t.dispatch;e.extend("edit",(function(){n("EDIT_ITEM",{id:e.id})}))}));var c=[],f=function(e){return c.push(e),e};return n("CREATE_VIEW",(function(t){var n=t.is,r=t.view,i=t.query;if(i("GET_ALLOW_IMAGE_EDIT")){var o=i("GET_ALLOW_IMAGE_PREVIEW");if(n("file-info")&&!o||n("file")&&o){var u=i("GET_IMAGE_EDIT_EDITOR");if(u){u.filepondCallbackBridge||(u.outputData=!0,u.outputFile=!1,u.filepondCallbackBridge={onconfirm:u.onconfirm||function(){},oncancel:u.oncancel||function(){}});var c=function(e){var t=e.root,n=e.props,r=e.action,i=n.id,o=r.handleEditorResponse;u.cropAspectRatio=t.query("GET_IMAGE_CROP_ASPECT_RATIO")||u.cropAspectRatio,u.outputCanvasBackgroundColor=t.query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR")||u.outputCanvasBackgroundColor;var a=t.query("GET_ITEM",i);if(a){var s=a.file,c=a.getMetadata("crop"),f={center:{x:.5,y:.5},flip:{horizontal:!1,vertical:!1},zoom:1,rotation:0,aspectRatio:null},d=a.getMetadata("resize"),p=a.getMetadata("filter")||null,E=a.getMetadata("filters")||null,h=a.getMetadata("colors")||null,_=a.getMetadata("markup")||null,m={crop:c||f,size:d?{upscale:d.upscale,mode:d.mode,width:d.size.width,height:d.size.height}:null,filter:E?E.id||E.matrix:t.query("GET_ALLOW_IMAGE_FILTER")&&t.query("GET_IMAGE_FILTER_COLOR_MATRIX")&&!h?p:null,color:h,markup:_};u.onconfirm=function(e){var t=e.data,n=t.crop,r=t.size,i=t.filter,s=t.color,c=t.colorMatrix,f=t.markup,d={};if(n&&(d.crop=n),r){var p=(a.getMetadata("resize")||{}).size,E={width:r.width,height:r.height};E.width&&E.height||!p||(E.width=p.width,E.height=p.height),(E.width||E.height)&&(d.resize={upscale:r.upscale,mode:r.mode,size:E})}f&&(d.markup=f),d.colors=s,d.filters=i,d.filter=c,a.setMetadata(d),u.filepondCallbackBridge.onconfirm(t,l(a)),o&&(u.onclose=function(){o(!0),u.onclose=null})},u.oncancel=function(){u.filepondCallbackBridge.oncancel(l(a)),o&&(u.onclose=function(){o(!1),u.onclose=null})},u.open(s,m)}},f=function(t){var n=t.root,a=t.props;if(i("GET_IMAGE_EDIT_ALLOW_EDIT")){var u=a.id,l=i("GET_ITEM",u);if(l){var c=l.file;if(e(c))if(n.ref.handleEdit=function(e){e.stopPropagation(),n.dispatch("EDIT_ITEM",{id:u})},o){var f=r.createChildView(s,{label:"edit",icon:i("GET_IMAGE_EDIT_ICON_EDIT"),opacity:0});f.element.classList.add("filepond--action-edit-item"),f.element.dataset.align=i("GET_STYLE_IMAGE_EDIT_BUTTON_EDIT_ITEM_POSITION"),f.on("click",n.ref.handleEdit),n.ref.buttonEditItem=r.appendChildView(f)}else{var d=r.element.querySelector(".filepond--file-info-main"),p=document.createElement("button");p.className="filepond--action-edit-item-alt",p.innerHTML=i("GET_IMAGE_EDIT_ICON_EDIT")+"<span>edit</span>",p.addEventListener("click",n.ref.handleEdit),d.appendChild(p),n.ref.editButton=p}}}};r.registerDestroyer((function(e){var t=e.root;t.ref.buttonEditItem&&t.ref.buttonEditItem.off("click",t.ref.handleEdit),t.ref.editButton&&t.ref.editButton.removeEventListener("click",t.ref.handleEdit)}));var d={EDIT_ITEM:c,DID_LOAD_ITEM:f};if(o){var p=function(e){var t=e.root;t.ref.buttonEditItem&&(t.ref.buttonEditItem.opacity=1)};d.DID_IMAGE_PREVIEW_SHOW=p}r.registerWriter(a(d))}}}})),{options:{allowImageEdit:[!0,o.BOOLEAN],styleImageEditButtonEditItemPosition:["bottom center",o.STRING],imageEditInstantEdit:[!1,o.BOOLEAN],imageEditAllowEdit:[!0,o.BOOLEAN],imageEditIconEdit:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M8.5 17h1.586l7-7L15.5 8.414l-7 7V17zm-1.707-2.707l8-8a1 1 0 0 1 1.414 0l3 3a1 1 0 0 1 0 1.414l-8 8A1 1 0 0 1 10.5 19h-3a1 1 0 0 1-1-1v-3a1 1 0 0 1 .293-.707z" fill="currentColor" fill-rule="nonzero"/></svg>',o.STRING],imageEditEditor:[null,o.OBJECT]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:t})),t}()},8200:function(e){e.exports=function(){"use strict";var e=function(e){return/^image\/jpeg/.test(e.type)},t={JPEG:65496,APP1:65505,EXIF:1165519206,TIFF:18761,Orientation:274,Unknown:65280},n=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e.getUint16(t,n)},r=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e.getUint32(t,n)},i=function(e){return new Promise((function(i,o){var a=new FileReader;a.onload=function(e){var o=new DataView(e.target.result);if(n(o,0)===t.JPEG){for(var a=o.byteLength,u=2;u<a;){var l=n(o,u);if(u+=2,l===t.APP1){if(r(o,u+=2)!==t.EXIF)break;var s=n(o,u+=6)===t.TIFF;u+=r(o,u+4,s);var c=n(o,u,s);u+=2;for(var f=0;f<c;f++)if(n(o,u+12*f,s)===t.Orientation)return void i(n(o,u+12*f+8,s))}else{if((l&t.Unknown)!==t.Unknown)break;u+=n(o,u)}}i(-1)}else i(-1)},a.readAsArrayBuffer(e.slice(0,65536))}))},o="undefined"!=typeof window&&void 0!==window.document,a="data:image/jpg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4QA6RXhpZgAATU0AKgAAAAgAAwESAAMAAAABAAYAAAEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAD/2wBDAP//////////////////////////////////////////////////////////////////////////////////////wAALCAABAAIBASIA/8QAJgABAAAAAAAAAAAAAAAAAAAAAxABAAAAAAAAAAAAAAAAAAAAAP/aAAgBAQAAPwBH/9k=",u=void 0,l=o?new Image:{};l.onload=function(){return u=l.naturalWidth>l.naturalHeight},l.src=a;var s=function(){return u},c=function(t){var n=t.addFilter,r=t.utils,o=r.Type,a=r.isFile;return n("DID_LOAD_ITEM",(function(t,n){var r=n.query;return new Promise((function(n,o){var u=t.file;if(!(a(u)&&e(u)&&r("GET_ALLOW_IMAGE_EXIF_ORIENTATION")&&s()))return n(t);i(u).then((function(e){t.setMetadata("exif",{orientation:e}),n(t)}))}))})),{options:{allowImageExifOrientation:[!0,o.BOOLEAN]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:c})),c}()},3356:function(e){e.exports=function(){"use strict";var e=function(e){return/^image/.test(e.type)};function t(e){this.wrapped=e}function n(e){var n,r;function i(e,t){return new Promise((function(i,a){var u={key:e,arg:t,resolve:i,reject:a,next:null};r?r=r.next=u:(n=r=u,o(e,t))}))}function o(n,r){try{var i=e[n](r),u=i.value,l=u instanceof t;Promise.resolve(l?u.wrapped:u).then((function(e){l?o("next",e):a(i.done?"return":"normal",e)}),(function(e){o("throw",e)}))}catch(e){a("throw",e)}}function a(e,t){switch(e){case"return":n.resolve({value:t,done:!0});break;case"throw":n.reject(t);break;default:n.resolve({value:t,done:!1})}(n=n.next)?o(n.key,n.arg):r=null}this._invoke=i,"function"!=typeof e.return&&(this.return=void 0)}function r(e,t){return i(e)||o(e,t)||a()}function i(e){if(Array.isArray(e))return e}function o(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return n}function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}"function"==typeof Symbol&&Symbol.asyncIterator&&(n.prototype[Symbol.asyncIterator]=function(){return this}),n.prototype.next=function(e){return this._invoke("next",e)},n.prototype.throw=function(e){return this._invoke("throw",e)},n.prototype.return=function(e){return this._invoke("return",e)};var u=function(e,t){return f(e.x*t,e.y*t)},l=function(e,t){return f(e.x+t.x,e.y+t.y)},s=function(e){var t=Math.sqrt(e.x*e.x+e.y*e.y);return 0===t?{x:0,y:0}:f(e.x/t,e.y/t)},c=function(e,t,n){var r=Math.cos(t),i=Math.sin(t),o=f(e.x-n.x,e.y-n.y);return f(n.x+r*o.x-i*o.y,n.y+i*o.x+r*o.y)},f=function(){return{x:arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,y:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0}},d=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0;return"string"==typeof e?parseFloat(e)*n:"number"==typeof e?e*(r?t[r]:Math.min(t.width,t.height)):void 0},p=function(e,t,n){var r=e.borderStyle||e.lineStyle||"solid",i=e.backgroundColor||e.fontColor||"transparent",o=e.borderColor||e.lineColor||"transparent",a=d(e.borderWidth||e.lineWidth,t,n);return{"stroke-linecap":e.lineCap||"round","stroke-linejoin":e.lineJoin||"round","stroke-width":a||0,"stroke-dasharray":"string"==typeof r?"":r.map((function(e){return d(e,t,n)})).join(","),stroke:o,fill:i,opacity:e.opacity||1}},E=function(e){return null!=e},h=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=d(e.x,t,n,"width")||d(e.left,t,n,"width"),i=d(e.y,t,n,"height")||d(e.top,t,n,"height"),o=d(e.width,t,n,"width"),a=d(e.height,t,n,"height"),u=d(e.right,t,n,"width"),l=d(e.bottom,t,n,"height");return E(i)||(i=E(a)&&E(l)?t.height-a-l:l),E(r)||(r=E(o)&&E(u)?t.width-o-u:u),E(o)||(o=E(r)&&E(u)?t.width-r-u:0),E(a)||(a=E(i)&&E(l)?t.height-i-l:0),{x:r||0,y:i||0,width:o||0,height:a||0}},_=function(e){return e.map((function(e,t){return"".concat(0===t?"M":"L"," ").concat(e.x," ").concat(e.y)})).join(" ")},m=function(e,t){return Object.keys(t).forEach((function(n){return e.setAttribute(n,t[n])}))},g="http://www.w3.org/2000/svg",I=function(e,t){var n=document.createElementNS(g,e);return t&&m(n,t),n},T=function(e){return m(e,Object.assign({},e.rect,e.styles))},v=function(e){var t=e.rect.x+.5*e.rect.width,n=e.rect.y+.5*e.rect.height,r=.5*e.rect.width,i=.5*e.rect.height;return m(e,Object.assign({cx:t,cy:n,rx:r,ry:i},e.styles))},y={contain:"xMidYMid meet",cover:"xMidYMid slice"},R=function(e,t){m(e,Object.assign({},e.rect,e.styles,{preserveAspectRatio:y[t.fit]||"none"}))},O={left:"start",center:"middle",right:"end"},A=function(e,t,n,r){var i=d(t.fontSize,n,r),o=t.fontFamily||"sans-serif",a=t.fontWeight||"normal",u=O[t.textAlign]||"start";m(e,Object.assign({},e.rect,e.styles,{"stroke-width":0,"font-weight":a,"font-size":i,"font-family":o,"text-anchor":u})),e.text!==t.text&&(e.text=t.text,e.textContent=t.text.length?t.text:" ")},w=function(e,t,n,r){m(e,Object.assign({},e.rect,e.styles,{fill:"none"}));var i=e.childNodes[0],o=e.childNodes[1],a=e.childNodes[2],f=e.rect,p={x:e.rect.x+e.rect.width,y:e.rect.y+e.rect.height};if(m(i,{x1:f.x,y1:f.y,x2:p.x,y2:p.y}),t.lineDecoration){o.style.display="none",a.style.display="none";var E=s({x:p.x-f.x,y:p.y-f.y}),h=d(.05,n,r);if(-1!==t.lineDecoration.indexOf("arrow-begin")){var _=u(E,h),g=l(f,_),I=c(f,2,g),T=c(f,-2,g);m(o,{style:"display:block;",d:"M".concat(I.x,",").concat(I.y," L").concat(f.x,",").concat(f.y," L").concat(T.x,",").concat(T.y)})}if(-1!==t.lineDecoration.indexOf("arrow-end")){var v=u(E,-h),y=l(p,v),R=c(p,2,y),O=c(p,-2,y);m(a,{style:"display:block;",d:"M".concat(R.x,",").concat(R.y," L").concat(p.x,",").concat(p.y," L").concat(O.x,",").concat(O.y)})}}},S=function(e,t,n,r){m(e,Object.assign({},e.styles,{fill:"none",d:_(t.points.map((function(e){return{x:d(e.x,n,r,"width"),y:d(e.y,n,r,"height")}})))}))},D=function(e){return function(t){return I(e,{id:t.id})}},M=function(e){var t=I("g",{id:e.id,"stroke-linecap":"round","stroke-linejoin":"round"}),n=I("line");t.appendChild(n);var r=I("path");t.appendChild(r);var i=I("path");return t.appendChild(i),t},L={image:function(e){var t=I("image",{id:e.id,"stroke-linecap":"round","stroke-linejoin":"round",opacity:"0"});return t.onload=function(){t.setAttribute("opacity",e.opacity||1)},t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.src),t},rect:D("rect"),ellipse:D("ellipse"),text:D("text"),path:D("path"),line:M},b={rect:T,ellipse:v,image:R,text:A,path:S,line:w},P=function(e,t){return L[e](t)},G=function(e,t,n,r,i){"path"!==t&&(e.rect=h(n,r,i)),e.styles=p(n,r,i),b[t](e,n,r,i)},N=["x","y","left","top","right","bottom","width","height"],C=function(e){return"string"==typeof e&&/%/.test(e)?parseFloat(e)/100:e},x=function(e){var t=r(e,2),n=t[0],i=t[1],o=i.points?{}:N.reduce((function(e,t){return e[t]=C(i[t]),e}),{});return[n,Object.assign({zIndex:0},i,o)]},F=function(e,t){return e[1].zIndex>t[1].zIndex?1:e[1].zIndex<t[1].zIndex?-1:0},U=function(e){return e.utils.createView({name:"image-preview-markup",tag:"svg",ignoreRect:!0,mixins:{apis:["width","height","crop","markup","resize","dirty"]},write:function(e){var t=e.root,n=e.props;if(n.dirty){var i=n.crop,o=n.resize,a=n.markup,u=n.width,l=n.height,s=i.width,c=i.height;if(o){var f=o.size,d=f&&f.width,p=f&&f.height,E=o.mode,h=o.upscale;d&&!p&&(p=d),p&&!d&&(d=p);var _=s<d&&c<p;if(!_||_&&h){var m,g=d/s,I=p/c;"force"===E?(s=d,c=p):("cover"===E?m=Math.max(g,I):"contain"===E&&(m=Math.min(g,I)),s*=m,c*=m)}}var T={width:u,height:l};t.element.setAttribute("width",T.width),t.element.setAttribute("height",T.height);var v=Math.min(u/s,l/c);t.element.innerHTML="";var y=t.query("GET_IMAGE_PREVIEW_MARKUP_FILTER");a.filter(y).map(x).sort(F).forEach((function(e){var n=r(e,2),i=n[0],o=n[1],a=P(i,o);G(a,i,o,T,v),t.element.appendChild(a)}))}}})},B=function(e,t){return{x:e,y:t}},V=function(e,t){return e.x*t.x+e.y*t.y},q=function(e,t){return B(e.x-t.x,e.y-t.y)},k=function(e,t){return V(q(e,t),q(e,t))},z=function(e,t){return Math.sqrt(k(e,t))},W=function(e,t){var n=e,r=1.5707963267948966,i=t,o=1.5707963267948966-t,a=Math.sin(r),u=Math.sin(i),l=Math.sin(o),s=Math.cos(o),c=n/a;return B(s*(c*u),s*(c*l))},Y=function(e,t){var n=e.width,r=e.height,i=W(n,t),o=W(r,t),a=B(e.x+Math.abs(i.x),e.y-Math.abs(i.y)),u=B(e.x+e.width+Math.abs(o.y),e.y+Math.abs(o.x)),l=B(e.x-Math.abs(o.y),e.y+e.height-Math.abs(o.x));return{width:z(a,u),height:z(a,l)}},j=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=e.height/e.width,i=1,o=t,a=1,u=r;u>o&&(a=(u=o)/r);var l=Math.max(i/a,o/u),s=e.width/(n*l*a);return{width:s,height:s*t}},H=function(e,t,n,r){var i=r.x>.5?1-r.x:r.x,o=r.y>.5?1-r.y:r.y,a=2*i*e.width,u=2*o*e.height,l=Y(t,n);return Math.max(l.width/a,l.height/u)},X=function(e,t){var n=e.width,r=n*t;return r>e.height&&(n=(r=e.height)/t),{x:.5*(e.width-n),y:.5*(e.height-r),width:n,height:r}},Z=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.zoom,r=t.rotation,i=t.center,o=t.aspectRatio;o||(o=e.height/e.width);var a=j(e,o,n),u={x:.5*a.width,y:.5*a.height},l={x:0,y:0,width:a.width,height:a.height,center:u},s=void 0===t.scaleToFit||t.scaleToFit,c=n*H(e,X(l,o),r,s?i:{x:.5,y:.5});return{widthFloat:a.width/c,heightFloat:a.height/c,width:Math.round(a.width/c),height:Math.round(a.height/c)}},Q={type:"spring",stiffness:.5,damping:.45,mass:10},K=function(e){return e.utils.createView({name:"image-bitmap",ignoreRect:!0,mixins:{styles:["scaleX","scaleY"]},create:function(e){var t=e.root,n=e.props;t.appendChild(n.image)}})},J=function(e){return e.utils.createView({name:"image-canvas-wrapper",tag:"div",ignoreRect:!0,mixins:{apis:["crop","width","height"],styles:["originX","originY","translateX","translateY","scaleX","scaleY","rotateZ"],animations:{originX:Q,originY:Q,scaleX:Q,scaleY:Q,translateX:Q,translateY:Q,rotateZ:Q}},create:function(t){var n=t.root,r=t.props;r.width=r.image.width,r.height=r.image.height,n.ref.bitmap=n.appendChildView(n.createChildView(K(e),{image:r.image}))},write:function(e){var t=e.root,n=e.props.crop.flip,r=t.ref.bitmap;r.scaleX=n.horizontal?-1:1,r.scaleY=n.vertical?-1:1}})},$=function(e){return e.utils.createView({name:"image-clip",tag:"div",ignoreRect:!0,mixins:{apis:["crop","markup","resize","width","height","dirty","background"],styles:["width","height","opacity"],animations:{opacity:{type:"tween",duration:250}}},didWriteView:function(e){var t=e.root,n=e.props;n.background&&(t.element.style.backgroundColor=n.background)},create:function(t){var n=t.root,r=t.props;n.ref.image=n.appendChildView(n.createChildView(J(e),Object.assign({},r))),n.ref.createMarkup=function(){n.ref.markup||(n.ref.markup=n.appendChildView(n.createChildView(U(e),Object.assign({},r))))},n.ref.destroyMarkup=function(){n.ref.markup&&(n.removeChildView(n.ref.markup),n.ref.markup=null)};var i=n.query("GET_IMAGE_PREVIEW_TRANSPARENCY_INDICATOR");null!==i&&(n.element.dataset.transparencyIndicator="grid"===i?i:"color")},write:function(e){var t=e.root,n=e.props,r=e.shouldOptimize,i=n.crop,o=n.markup,a=n.resize,u=n.dirty,l=n.width,s=n.height;t.ref.image.crop=i;var c={x:0,y:0,width:l,height:s,center:{x:.5*l,y:.5*s}},f={width:t.ref.image.width,height:t.ref.image.height},d={x:i.center.x*f.width,y:i.center.y*f.height},p={x:c.center.x-f.width*i.center.x,y:c.center.y-f.height*i.center.y},E=2*Math.PI+i.rotation%(2*Math.PI),h=i.aspectRatio||f.height/f.width,_=void 0===i.scaleToFit||i.scaleToFit,m=H(f,X(c,h),E,_?i.center:{x:.5,y:.5}),g=i.zoom*m;o&&o.length?(t.ref.createMarkup(),t.ref.markup.width=l,t.ref.markup.height=s,t.ref.markup.resize=a,t.ref.markup.dirty=u,t.ref.markup.markup=o,t.ref.markup.crop=Z(f,i)):t.ref.markup&&t.ref.destroyMarkup();var I=t.ref.image;if(r)return I.originX=null,I.originY=null,I.translateX=null,I.translateY=null,I.rotateZ=null,I.scaleX=null,void(I.scaleY=null);I.originX=d.x,I.originY=d.y,I.translateX=p.x,I.translateY=p.y,I.rotateZ=E,I.scaleX=g,I.scaleY=g}})},ee=function(e){return e.utils.createView({name:"image-preview",tag:"div",ignoreRect:!0,mixins:{apis:["image","crop","markup","resize","dirty","background"],styles:["translateY","scaleX","scaleY","opacity"],animations:{scaleX:Q,scaleY:Q,translateY:Q,opacity:{type:"tween",duration:400}}},create:function(t){var n=t.root,r=t.props;n.ref.clip=n.appendChildView(n.createChildView($(e),{id:r.id,image:r.image,crop:r.crop,markup:r.markup,resize:r.resize,dirty:r.dirty,background:r.background}))},write:function(e){var t=e.root,n=e.props,r=e.shouldOptimize,i=t.ref.clip,o=n.image,a=n.crop,u=n.markup,l=n.resize,s=n.dirty;if(i.crop=a,i.markup=u,i.resize=l,i.dirty=s,i.opacity=r?0:1,!r&&!t.rect.element.hidden){var c=o.height/o.width,f=a.aspectRatio||c,d=t.rect.inner.width,p=t.rect.inner.height,E=t.query("GET_IMAGE_PREVIEW_HEIGHT"),h=t.query("GET_IMAGE_PREVIEW_MIN_HEIGHT"),_=t.query("GET_IMAGE_PREVIEW_MAX_HEIGHT"),m=t.query("GET_PANEL_ASPECT_RATIO"),g=t.query("GET_ALLOW_MULTIPLE");m&&!g&&(E=d*m,f=m);var I=null!==E?E:Math.max(h,Math.min(d*f,_)),T=I/f;T>d&&(I=(T=d)*f),I>p&&(I=p,T=p/f),i.width=T,i.height=I}}})},te='<svg width="500" height="200" viewBox="0 0 500 200" preserveAspectRatio="none">\n <defs>\n <radialGradient id="gradient-__UID__" cx=".5" cy="1.25" r="1.15">\n <stop offset=\'50%\' stop-color=\'#000000\'/>\n <stop offset=\'56%\' stop-color=\'#0a0a0a\'/>\n <stop offset=\'63%\' stop-color=\'#262626\'/>\n <stop offset=\'69%\' stop-color=\'#4f4f4f\'/>\n <stop offset=\'75%\' stop-color=\'#808080\'/>\n <stop offset=\'81%\' stop-color=\'#b1b1b1\'/>\n <stop offset=\'88%\' stop-color=\'#dadada\'/>\n <stop offset=\'94%\' stop-color=\'#f6f6f6\'/>\n <stop offset=\'100%\' stop-color=\'#ffffff\'/>\n </radialGradient>\n <mask id="mask-__UID__">\n <rect x="0" y="0" width="500" height="200" fill="url(#gradient-__UID__)"></rect>\n </mask>\n </defs>\n <rect x="0" width="500" height="200" fill="currentColor" mask="url(#mask-__UID__)"></rect>\n</svg>',ne=0,re=function(e){return e.utils.createView({name:"image-preview-overlay",tag:"div",ignoreRect:!0,create:function(e){var t=e.root,n=e.props,r=te;if(document.querySelector("base")){var i=new URL(window.location.href.replace(window.location.hash,"")).href;r=r.replace(/url\(\#/g,"url("+i+"#")}ne++,t.element.classList.add("filepond--image-preview-overlay-".concat(n.status)),t.element.innerHTML=r.replace(/__UID__/g,ne)},mixins:{styles:["opacity"],animations:{opacity:{type:"spring",mass:25}}}})},ie=function(){self.onmessage=function(e){createImageBitmap(e.data.message.file).then((function(t){self.postMessage({id:e.data.id,message:t},[t])}))}},oe=function(){self.onmessage=function(e){for(var t=e.data.message.imageData,n=e.data.message.colorMatrix,r=t.data,i=r.length,o=n[0],a=n[1],u=n[2],l=n[3],s=n[4],c=n[5],f=n[6],d=n[7],p=n[8],E=n[9],h=n[10],_=n[11],m=n[12],g=n[13],I=n[14],T=n[15],v=n[16],y=n[17],R=n[18],O=n[19],A=0,w=0,S=0,D=0,M=0;A<i;A+=4)w=r[A]/255,S=r[A+1]/255,D=r[A+2]/255,M=r[A+3]/255,r[A]=Math.max(0,Math.min(255*(w*o+S*a+D*u+M*l+s),255)),r[A+1]=Math.max(0,Math.min(255*(w*c+S*f+D*d+M*p+E),255)),r[A+2]=Math.max(0,Math.min(255*(w*h+S*_+D*m+M*g+I),255)),r[A+3]=Math.max(0,Math.min(255*(w*T+S*v+D*y+M*R+O),255));self.postMessage({id:e.data.id,message:t},[t.data.buffer])}},ae=function(e,t){var n=new Image;n.onload=function(){var e=n.naturalWidth,r=n.naturalHeight;n=null,t(e,r)},n.src=e},ue={1:function(){return[1,0,0,1,0,0]},2:function(e){return[-1,0,0,1,e,0]},3:function(e,t){return[-1,0,0,-1,e,t]},4:function(e,t){return[1,0,0,-1,0,t]},5:function(){return[0,1,1,0,0,0]},6:function(e,t){return[0,1,-1,0,t,0]},7:function(e,t){return[0,-1,-1,0,t,e]},8:function(e){return[0,-1,1,0,0,e]}},le=function(e,t,n,r){-1!==r&&e.transform.apply(e,ue[r](t,n))},se=function(e,t,n,r){t=Math.round(t),n=Math.round(n);var i=document.createElement("canvas");i.width=t,i.height=n;var o=i.getContext("2d");if(r>=5&&r<=8){var a=[n,t];t=a[0],n=a[1]}return le(o,t,n,r),o.drawImage(e,0,0,t,n),i},ce=function(e){return/^image/.test(e.type)&&!/svg/.test(e.type)},fe=10,de=10,pe=function(e){var t=Math.min(fe/e.width,de/e.height),n=document.createElement("canvas"),r=n.getContext("2d"),i=n.width=Math.ceil(e.width*t),o=n.height=Math.ceil(e.height*t);r.drawImage(e,0,0,i,o);var a=null;try{a=r.getImageData(0,0,i,o).data}catch(e){return null}for(var u=a.length,l=0,s=0,c=0,f=0;f<u;f+=4)l+=a[f]*a[f],s+=a[f+1]*a[f+1],c+=a[f+2]*a[f+2];return{r:l=Ee(l,u),g:s=Ee(s,u),b:c=Ee(c,u)}},Ee=function(e,t){return Math.floor(Math.sqrt(e/(t/4)))},he=function(e,t){return(t=t||document.createElement("canvas")).width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0),t},_e=function(e){var t;try{t=new ImageData(e.width,e.height)}catch(n){t=document.createElement("canvas").getContext("2d").createImageData(e.width,e.height)}return t.data.set(new Uint8ClampedArray(e.data)),t},me=function(e){return new Promise((function(t,n){var r=new Image;r.crossOrigin="Anonymous",r.onload=function(){t(r)},r.onerror=function(e){n(e)},r.src=e}))},ge=function(e){var t=re(e),n=ee(e),r=e.utils.createWorker,i=function(e,t,n){return new Promise((function(i){e.ref.imageData||(e.ref.imageData=n.getContext("2d").getImageData(0,0,n.width,n.height));var o=_e(e.ref.imageData);if(!t||20!==t.length)return n.getContext("2d").putImageData(o,0,0),i();var a=r(oe);a.post({imageData:o,colorMatrix:t},(function(e){n.getContext("2d").putImageData(e,0,0),a.terminate(),i()}),[o.data.buffer])}))},o=function(e,t){e.removeChildView(t),t.image.width=1,t.image.height=1,t._destroy()},a=function(e){var t=e.root,n=t.ref.images.shift();return n.opacity=0,n.translateY=-15,t.ref.imageViewBin.push(n),n},u=function(e){var t=e.root,r=e.props,i=e.image,o=r.id,a=t.query("GET_ITEM",{id:o});if(a){var u,l,s=a.getMetadata("crop")||{center:{x:.5,y:.5},flip:{horizontal:!1,vertical:!1},zoom:1,rotation:0,aspectRatio:null},c=t.query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR"),f=!1;t.query("GET_IMAGE_PREVIEW_MARKUP_SHOW")&&(u=a.getMetadata("markup")||[],l=a.getMetadata("resize"),f=!0);var d=t.appendChildView(t.createChildView(n,{id:o,image:i,crop:s,resize:l,markup:u,dirty:f,background:c,opacity:0,scaleX:1.15,scaleY:1.15,translateY:15}),t.childViews.length);t.ref.images.push(d),d.opacity=1,d.scaleX=1,d.scaleY=1,d.translateY=0,setTimeout((function(){t.dispatch("DID_IMAGE_PREVIEW_SHOW",{id:o})}),250)}},l=function(e){var t=e.root,n=e.props,r=t.query("GET_ITEM",{id:n.id});if(r){var i=t.ref.images[t.ref.images.length-1];i.crop=r.getMetadata("crop"),i.background=t.query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR"),t.query("GET_IMAGE_PREVIEW_MARKUP_SHOW")&&(i.dirty=!0,i.resize=r.getMetadata("resize"),i.markup=r.getMetadata("markup"))}},s=function(e){var t=e.root,n=e.props,r=e.action;if(/crop|filter|markup|resize/.test(r.change.key)&&t.ref.images.length){var o=t.query("GET_ITEM",{id:n.id});if(o)if(/filter/.test(r.change.key)){var s=t.ref.images[t.ref.images.length-1];i(t,r.change.value,s.image)}else if(/crop|markup|resize/.test(r.change.key)){var c=o.getMetadata("crop"),f=t.ref.images[t.ref.images.length-1];if(c&&c.aspectRatio&&f.crop&&f.crop.aspectRatio&&Math.abs(c.aspectRatio-f.crop.aspectRatio)>1e-5){var d=a({root:t});u({root:t,props:n,image:he(d.image)})}else l({root:t,props:n})}}},c=function(e){var t=window.navigator.userAgent.match(/Firefox\/([0-9]+)\./),n=t?parseInt(t[1]):null;return!(null!==n&&n<=58)&&"createImageBitmap"in window&&ce(e)},f=function(e){var t=e.root,n=e.props.id,r=t.query("GET_ITEM",n);if(r){var i=URL.createObjectURL(r.file);ae(i,(function(e,r){t.dispatch("DID_IMAGE_PREVIEW_CALCULATE_SIZE",{id:n,width:e,height:r})}))}},d=function(e){var t=e.root,n=e.props,o=n.id,a=t.query("GET_ITEM",o);if(a){var l=URL.createObjectURL(a.file),s=function(){me(l).then(f)},f=function(e){URL.revokeObjectURL(l);var r=(a.getMetadata("exif")||{}).orientation||-1,o=e.width,s=e.height;if(o&&s){if(r>=5&&r<=8){var c=[s,o];o=c[0],s=c[1]}var f=Math.max(1,.75*window.devicePixelRatio),d=t.query("GET_IMAGE_PREVIEW_ZOOM_FACTOR")*f,p=s/o,E=t.rect.element.width,h=t.rect.element.height,_=E,m=_*p;p>1?m=(_=Math.min(o,E*d))*p:_=(m=Math.min(s,h*d))/p;var g=se(e,_,m,r),I=function(){var r=t.query("GET_IMAGE_PREVIEW_CALCULATE_AVERAGE_IMAGE_COLOR")?pe(data):null;a.setMetadata("color",r,!0),"close"in e&&e.close(),t.ref.overlayShadow.opacity=1,u({root:t,props:n,image:g})},T=a.getMetadata("filter");T?i(t,T,g).then(I):I()}};if(c(a.file)){var d=r(ie);d.post({file:a.file},(function(e){d.terminate(),e?f(e):s()}))}else s()}},p=function(e){var t=e.root,n=t.ref.images[t.ref.images.length-1];n.translateY=0,n.scaleX=1,n.scaleY=1,n.opacity=1},E=function(e){var t=e.root;t.ref.overlayShadow.opacity=1,t.ref.overlayError.opacity=0,t.ref.overlaySuccess.opacity=0},h=function(e){var t=e.root;t.ref.overlayShadow.opacity=.25,t.ref.overlayError.opacity=1},_=function(e){var t=e.root;t.ref.overlayShadow.opacity=.25,t.ref.overlaySuccess.opacity=1},m=function(e){var n=e.root;n.ref.images=[],n.ref.imageData=null,n.ref.imageViewBin=[],n.ref.overlayShadow=n.appendChildView(n.createChildView(t,{opacity:0,status:"idle"})),n.ref.overlaySuccess=n.appendChildView(n.createChildView(t,{opacity:0,status:"success"})),n.ref.overlayError=n.appendChildView(n.createChildView(t,{opacity:0,status:"failure"}))};return e.utils.createView({name:"image-preview-wrapper",create:m,styles:["height"],apis:["height"],destroy:function(e){e.root.ref.images.forEach((function(e){e.image.width=1,e.image.height=1}))},didWriteView:function(e){e.root.ref.images.forEach((function(e){e.dirty=!1}))},write:e.utils.createRoute({DID_IMAGE_PREVIEW_DRAW:p,DID_IMAGE_PREVIEW_CONTAINER_CREATE:f,DID_FINISH_CALCULATE_PREVIEWSIZE:d,DID_UPDATE_ITEM_METADATA:s,DID_THROW_ITEM_LOAD_ERROR:h,DID_THROW_ITEM_PROCESSING_ERROR:h,DID_THROW_ITEM_INVALID:h,DID_COMPLETE_ITEM_PROCESSING:_,DID_START_ITEM_PROCESSING:E,DID_REVERT_ITEM_PROCESSING:E},(function(e){var t=e.root,n=t.ref.imageViewBin.filter((function(e){return 0===e.opacity}));t.ref.imageViewBin=t.ref.imageViewBin.filter((function(e){return e.opacity>0})),n.forEach((function(e){return o(t,e)})),n.length=0}))})},Ie=function(t){var n=t.addFilter,r=t.utils,i=r.Type,o=r.createRoute,a=r.isFile,u=ge(t);return n("CREATE_VIEW",(function(t){var n=t.is,r=t.view,i=t.query;if(n("file")&&i("GET_ALLOW_IMAGE_PREVIEW")){var l=function(t){var n=t.root,o=t.props.id,l=i("GET_ITEM",o);if(l&&a(l.file)&&!l.archived){var s=l.file;if(e(s)&&i("GET_IMAGE_PREVIEW_FILTER_ITEM")(l)){var c="createImageBitmap"in(window||{}),f=i("GET_IMAGE_PREVIEW_MAX_FILE_SIZE");if(!(!c&&f&&s.size>f)){n.ref.imagePreview=r.appendChildView(r.createChildView(u,{id:o}));var d=n.query("GET_IMAGE_PREVIEW_HEIGHT");d&&n.dispatch("DID_UPDATE_PANEL_HEIGHT",{id:l.id,height:d});var p=!c&&s.size>i("GET_IMAGE_PREVIEW_MAX_INSTANT_PREVIEW_FILE_SIZE");n.dispatch("DID_IMAGE_PREVIEW_CONTAINER_CREATE",{id:o},p)}}}},s=function(e,t){if(e.ref.imagePreview){var n=t.id,r=e.query("GET_ITEM",{id:n});if(r){var i=e.query("GET_PANEL_ASPECT_RATIO"),o=e.query("GET_ITEM_PANEL_ASPECT_RATIO"),a=e.query("GET_IMAGE_PREVIEW_HEIGHT");if(!(i||o||a)){var u=e.ref,l=u.imageWidth,s=u.imageHeight;if(l&&s){var c=e.query("GET_IMAGE_PREVIEW_MIN_HEIGHT"),f=e.query("GET_IMAGE_PREVIEW_MAX_HEIGHT"),d=(r.getMetadata("exif")||{}).orientation||-1;if(d>=5&&d<=8){var p=[s,l];l=p[0],s=p[1]}if(!ce(r.file)||e.query("GET_IMAGE_PREVIEW_UPSCALE")){var E=2048/l;l*=E,s*=E}var h=s/l,_=(r.getMetadata("crop")||{}).aspectRatio||h,m=Math.max(c,Math.min(s,f)),g=e.rect.element.width,I=Math.min(g*_,m);e.dispatch("DID_UPDATE_PANEL_HEIGHT",{id:r.id,height:I})}}}}},c=function(e){e.root.ref.shouldRescale=!0},f=function(e){var t=e.root;"crop"===e.action.change.key&&(t.ref.shouldRescale=!0)},d=function(e){var t=e.root,n=e.action;t.ref.imageWidth=n.width,t.ref.imageHeight=n.height,t.ref.shouldRescale=!0,t.ref.shouldDrawPreview=!0,t.dispatch("KICK")};r.registerWriter(o({DID_RESIZE_ROOT:c,DID_STOP_RESIZE:c,DID_LOAD_ITEM:l,DID_IMAGE_PREVIEW_CALCULATE_SIZE:d,DID_UPDATE_ITEM_METADATA:f},(function(e){var t=e.root,n=e.props;t.ref.imagePreview&&(t.rect.element.hidden||(t.ref.shouldRescale&&(s(t,n),t.ref.shouldRescale=!1),t.ref.shouldDrawPreview&&(requestAnimationFrame((function(){requestAnimationFrame((function(){t.dispatch("DID_FINISH_CALCULATE_PREVIEWSIZE",{id:n.id})}))})),t.ref.shouldDrawPreview=!1)))})))}})),{options:{allowImagePreview:[!0,i.BOOLEAN],imagePreviewFilterItem:[function(){return!0},i.FUNCTION],imagePreviewHeight:[null,i.INT],imagePreviewMinHeight:[44,i.INT],imagePreviewMaxHeight:[256,i.INT],imagePreviewMaxFileSize:[null,i.INT],imagePreviewZoomFactor:[2,i.INT],imagePreviewUpscale:[!1,i.BOOLEAN],imagePreviewMaxInstantPreviewFileSize:[1e6,i.INT],imagePreviewTransparencyIndicator:[null,i.STRING],imagePreviewCalculateAverageImageColor:[!1,i.BOOLEAN],imagePreviewMarkupShow:[!0,i.BOOLEAN],imagePreviewMarkupFilter:[function(){return!0},i.FUNCTION]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:Ie})),Ie}()},9148:function(e){e.exports=function(){"use strict";var e=function(e){return/^image/.test(e.type)},t=function(e,t){var n=new Image;n.onload=function(){var e=n.naturalWidth,r=n.naturalHeight;n=null,t({width:e,height:r})},n.onerror=function(){return t(null)},n.src=e},n=function(n){var r=n.addFilter,i=n.utils.Type;return r("DID_LOAD_ITEM",(function(n,r){var i=r.query;return new Promise((function(r,o){var a=n.file;if(!e(a)||!i("GET_ALLOW_IMAGE_RESIZE"))return r(n);var u=i("GET_IMAGE_RESIZE_MODE"),l=i("GET_IMAGE_RESIZE_TARGET_WIDTH"),s=i("GET_IMAGE_RESIZE_TARGET_HEIGHT"),c=i("GET_IMAGE_RESIZE_UPSCALE");if(null===l&&null===s)return r(n);var f=null===l?s:l,d=null===s?f:s,p=URL.createObjectURL(a);t(p,(function(e){if(URL.revokeObjectURL(p),!e)return r(n);var t=e.width,i=e.height,o=(n.getMetadata("exif")||{}).orientation||-1;if(o>=5&&o<=8){var a=[i,t];t=a[0],i=a[1]}if(t===f&&i===d)return r(n);if(!c)if("cover"===u){if(t<=f||i<=d)return r(n)}else if(t<=f&&i<=f)return r(n);n.setMetadata("resize",{mode:u,upscale:c,size:{width:f,height:d}}),r(n)}))}))})),{options:{allowImageResize:[!0,i.BOOLEAN],imageResizeMode:["cover",i.STRING],imageResizeUpscale:[!0,i.BOOLEAN],imageResizeTargetWidth:[null,i.INT],imageResizeTargetHeight:[null,i.INT]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:n})),n}()},864:function(e){e.exports=function(){"use strict";var e=function(e){return/^image/.test(e.type)},t=function(e){return e.substr(0,e.lastIndexOf("."))||e},n={jpeg:"jpg","svg+xml":"svg"},r=function(e,r){var i=t(e),o=r.split("/")[1],a=n[o]||o;return"".concat(i,".").concat(a)},i=function(e){return/jpeg|png|svg\+xml/.test(e)?e:"image/jpeg"},o=function(e){return/^image/.test(e.type)},a={1:function(){return[1,0,0,1,0,0]},2:function(e){return[-1,0,0,1,e,0]},3:function(e,t){return[-1,0,0,-1,e,t]},4:function(e,t){return[1,0,0,-1,0,t]},5:function(){return[0,1,1,0,0,0]},6:function(e,t){return[0,1,-1,0,t,0]},7:function(e,t){return[0,-1,-1,0,t,e]},8:function(e){return[0,-1,1,0,0,e]}},u=function(e,t,n){return-1===n&&(n=1),a[n](e,t)},l=function(e,t){return{x:e,y:t}},s=function(e,t){return e.x*t.x+e.y*t.y},c=function(e,t){return l(e.x-t.x,e.y-t.y)},f=function(e,t){return s(c(e,t),c(e,t))},d=function(e,t){return Math.sqrt(f(e,t))},p=function(e,t){var n=e,r=1.5707963267948966,i=t,o=1.5707963267948966-t,a=Math.sin(r),u=Math.sin(i),s=Math.sin(o),c=Math.cos(o),f=n/a;return l(c*(f*u),c*(f*s))},E=function(e,t){var n=e.width,r=e.height,i=p(n,t),o=p(r,t),a=l(e.x+Math.abs(i.x),e.y-Math.abs(i.y)),u=l(e.x+e.width+Math.abs(o.y),e.y+Math.abs(o.x)),s=l(e.x-Math.abs(o.y),e.y+e.height-Math.abs(o.x));return{width:d(a,u),height:d(a,s)}},h=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{x:.5,y:.5},i=r.x>.5?1-r.x:r.x,o=r.y>.5?1-r.y:r.y,a=2*i*e.width,u=2*o*e.height,l=E(t,n);return Math.max(l.width/a,l.height/u)},_=function(e,t){var n=e.width,r=n*t;return r>e.height&&(n=(r=e.height)/t),{x:.5*(e.width-n),y:.5*(e.height-r),width:n,height:r}},m=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=e.height/e.width,i=1,o=t,a=1,u=r;u>o&&(a=(u=o)/r);var l=Math.max(i/a,o/u),s=e.width/(n*l*a);return{width:s,height:s*t}},g=function(e){e.width=1,e.height=1,e.getContext("2d").clearRect(0,0,1,1)},I=function(e){return e&&(e.horizontal||e.vertical)},T=function(e,t,n){if(t<=1&&!I(n))return e.width=e.naturalWidth,e.height=e.naturalHeight,e;var r=document.createElement("canvas"),i=e.naturalWidth,o=e.naturalHeight,a=t>=5&&t<=8;a?(r.width=o,r.height=i):(r.width=i,r.height=o);var l=r.getContext("2d");if(t&&l.transform.apply(l,u(i,o,t)),I(n)){var s=[1,0,0,1,0,0];(!a&&n.horizontal||a&n.vertical)&&(s[0]=-1,s[4]=i),(!a&&n.vertical||a&&n.horizontal)&&(s[3]=-1,s[5]=o),l.transform.apply(l,s)}return l.drawImage(e,0,0,i,o),r},v=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.canvasMemoryLimit,o=r.background,a=void 0===o?null:o,u=n.zoom||1,l=T(e,t,n.flip),s={width:l.width,height:l.height},c=n.aspectRatio||s.height/s.width,f=m(s,c,u);if(i){var d=f.width*f.height;if(d>i){var p=Math.sqrt(i)/Math.sqrt(d);s.width=Math.floor(s.width*p),s.height=Math.floor(s.height*p),f=m(s,c,u)}}var E=document.createElement("canvas"),I={x:.5*f.width,y:.5*f.height},v={x:0,y:0,width:f.width,height:f.height,center:I},y=void 0===n.scaleToFit||n.scaleToFit,R=u*h(s,_(v,c),n.rotation,y?n.center:{x:.5,y:.5});E.width=Math.round(f.width/R),E.height=Math.round(f.height/R),I.x/=R,I.y/=R;var O={x:I.x-s.width*(n.center?n.center.x:.5),y:I.y-s.height*(n.center?n.center.y:.5)},A=E.getContext("2d");a&&(A.fillStyle=a,A.fillRect(0,0,E.width,E.height)),A.translate(I.x,I.y),A.rotate(n.rotation||0),A.drawImage(l,O.x-I.x,O.y-I.y,s.width,s.height);var w=A.getImageData(0,0,E.width,E.height);return g(E),w};"undefined"!=typeof window&&void 0!==window.document&&(HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(e,t,n){var r=this.toDataURL(t,n).split(",")[1];setTimeout((function(){for(var n=atob(r),i=n.length,o=new Uint8Array(i),a=0;a<i;a++)o[a]=n.charCodeAt(a);e(new Blob([o],{type:t||"image/png"}))}))}}));var y=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return new Promise((function(r){var i=n?n(e):e;Promise.resolve(i).then((function(e){e.toBlob(r,t.type,t.quality)}))}))},R=function(e,t){return S(e.x*t,e.y*t)},O=function(e,t){return S(e.x+t.x,e.y+t.y)},A=function(e){var t=Math.sqrt(e.x*e.x+e.y*e.y);return 0===t?{x:0,y:0}:S(e.x/t,e.y/t)},w=function(e,t,n){var r=Math.cos(t),i=Math.sin(t),o=S(e.x-n.x,e.y-n.y);return S(n.x+r*o.x-i*o.y,n.y+i*o.x+r*o.y)},S=function(){return{x:arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,y:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0}},D=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0;return"string"==typeof e?parseFloat(e)*n:"number"==typeof e?e*(r?t[r]:Math.min(t.width,t.height)):void 0},M=function(e,t,n){var r=e.borderStyle||e.lineStyle||"solid",i=e.backgroundColor||e.fontColor||"transparent",o=e.borderColor||e.lineColor||"transparent",a=D(e.borderWidth||e.lineWidth,t,n);return{"stroke-linecap":e.lineCap||"round","stroke-linejoin":e.lineJoin||"round","stroke-width":a||0,"stroke-dasharray":"string"==typeof r?"":r.map((function(e){return D(e,t,n)})).join(","),stroke:o,fill:i,opacity:e.opacity||1}},L=function(e){return null!=e},b=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=D(e.x,t,n,"width")||D(e.left,t,n,"width"),i=D(e.y,t,n,"height")||D(e.top,t,n,"height"),o=D(e.width,t,n,"width"),a=D(e.height,t,n,"height"),u=D(e.right,t,n,"width"),l=D(e.bottom,t,n,"height");return L(i)||(i=L(a)&&L(l)?t.height-a-l:l),L(r)||(r=L(o)&&L(u)?t.width-o-u:u),L(o)||(o=L(r)&&L(u)?t.width-r-u:0),L(a)||(a=L(i)&&L(l)?t.height-i-l:0),{x:r||0,y:i||0,width:o||0,height:a||0}},P=function(e){return e.map((function(e,t){return"".concat(0===t?"M":"L"," ").concat(e.x," ").concat(e.y)})).join(" ")},G=function(e,t){return Object.keys(t).forEach((function(n){return e.setAttribute(n,t[n])}))},N="http://www.w3.org/2000/svg",C=function(e,t){var n=document.createElementNS(N,e);return t&&G(n,t),n},x=function(e){return G(e,Object.assign({},e.rect,e.styles))},F=function(e){var t=e.rect.x+.5*e.rect.width,n=e.rect.y+.5*e.rect.height,r=.5*e.rect.width,i=.5*e.rect.height;return G(e,Object.assign({cx:t,cy:n,rx:r,ry:i},e.styles))},U={contain:"xMidYMid meet",cover:"xMidYMid slice"},B=function(e,t){G(e,Object.assign({},e.rect,e.styles,{preserveAspectRatio:U[t.fit]||"none"}))},V={left:"start",center:"middle",right:"end"},q=function(e,t,n,r){var i=D(t.fontSize,n,r),o=t.fontFamily||"sans-serif",a=t.fontWeight||"normal",u=V[t.textAlign]||"start";G(e,Object.assign({},e.rect,e.styles,{"stroke-width":0,"font-weight":a,"font-size":i,"font-family":o,"text-anchor":u})),e.text!==t.text&&(e.text=t.text,e.textContent=t.text.length?t.text:" ")},k=function(e,t,n,r){G(e,Object.assign({},e.rect,e.styles,{fill:"none"}));var i=e.childNodes[0],o=e.childNodes[1],a=e.childNodes[2],u=e.rect,l={x:e.rect.x+e.rect.width,y:e.rect.y+e.rect.height};if(G(i,{x1:u.x,y1:u.y,x2:l.x,y2:l.y}),t.lineDecoration){o.style.display="none",a.style.display="none";var s=A({x:l.x-u.x,y:l.y-u.y}),c=D(.05,n,r);if(-1!==t.lineDecoration.indexOf("arrow-begin")){var f=R(s,c),d=O(u,f),p=w(u,2,d),E=w(u,-2,d);G(o,{style:"display:block;",d:"M".concat(p.x,",").concat(p.y," L").concat(u.x,",").concat(u.y," L").concat(E.x,",").concat(E.y)})}if(-1!==t.lineDecoration.indexOf("arrow-end")){var h=R(s,-c),_=O(l,h),m=w(l,2,_),g=w(l,-2,_);G(a,{style:"display:block;",d:"M".concat(m.x,",").concat(m.y," L").concat(l.x,",").concat(l.y," L").concat(g.x,",").concat(g.y)})}}},z=function(e,t,n,r){G(e,Object.assign({},e.styles,{fill:"none",d:P(t.points.map((function(e){return{x:D(e.x,n,r,"width"),y:D(e.y,n,r,"height")}})))}))},W=function(e){return function(t){return C(e,{id:t.id})}},Y=function(e){var t=C("g",{id:e.id,"stroke-linecap":"round","stroke-linejoin":"round"}),n=C("line");t.appendChild(n);var r=C("path");t.appendChild(r);var i=C("path");return t.appendChild(i),t},j={image:function(e){var t=C("image",{id:e.id,"stroke-linecap":"round","stroke-linejoin":"round",opacity:"0"});return t.onload=function(){t.setAttribute("opacity",e.opacity||1)},t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.src),t},rect:W("rect"),ellipse:W("ellipse"),text:W("text"),path:W("path"),line:Y},H={rect:x,ellipse:F,image:B,text:q,path:z,line:k},X=function(e,t){return j[e](t)},Z=function(e,t,n,r,i){"path"!==t&&(e.rect=b(n,r,i)),e.styles=M(n,r,i),H[t](e,n,r,i)},Q=function(e,t){return e[1].zIndex>t[1].zIndex?1:e[1].zIndex<t[1].zIndex?-1:0},K=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;return new Promise((function(i){var o=r.background,a=void 0===o?null:o,u=new FileReader;u.onloadend=function(){var e=u.result,r=document.createElement("div");r.style.cssText="position:absolute;pointer-events:none;width:0;height:0;visibility:hidden;",r.innerHTML=e;var o=r.querySelector("svg");document.body.appendChild(r);var l=o.getBBox();r.parentNode.removeChild(r);var s=r.querySelector("title"),c=o.getAttribute("viewBox")||"",f=o.getAttribute("width")||"",d=o.getAttribute("height")||"",p=parseFloat(f)||null,E=parseFloat(d)||null,m=(f.match(/[a-z]+/)||[])[0]||"",g=(d.match(/[a-z]+/)||[])[0]||"",I=c.split(" ").map(parseFloat),T=I.length?{x:I[0],y:I[1],width:I[2],height:I[3]}:l,v=null!=p?p:T.width,y=null!=E?E:T.height;o.style.overflow="visible",o.setAttribute("width",v),o.setAttribute("height",y);var R="";if(n&&n.length){var O={width:v,height:y};R=n.sort(Q).reduce((function(e,t){var n=X(t[0],t[1]);return Z(n,t[0],t[1],O),n.removeAttribute("id"),1===n.getAttribute("opacity")&&n.removeAttribute("opacity"),e+"\n"+n.outerHTML+"\n"}),""),R="\n\n<g>".concat(R.replace(/&nbsp;/g," "),"</g>\n\n")}var A=t.aspectRatio||y/v,w=v,S=w*A,D=void 0===t.scaleToFit||t.scaleToFit,M=t.center?t.center.x:.5,L=t.center?t.center.y:.5,b=h({width:v,height:y},_({width:w,height:S},A),t.rotation,D?{x:M,y:L}:{x:.5,y:.5}),P=t.zoom*b,G=t.rotation*(180/Math.PI),N={x:.5*w,y:.5*S},C={x:N.x-v*M,y:N.y-y*L},x=["rotate(".concat(G," ").concat(N.x," ").concat(N.y,")"),"translate(".concat(N.x," ").concat(N.y,")"),"scale(".concat(P,")"),"translate(".concat(-N.x," ").concat(-N.y,")"),"translate(".concat(C.x," ").concat(C.y,")")],F=t.flip&&t.flip.horizontal,U=t.flip&&t.flip.vertical,B=["scale(".concat(F?-1:1," ").concat(U?-1:1,")"),"translate(".concat(F?-v:0," ").concat(U?-y:0,")")],V='<?xml version="1.0" encoding="UTF-8"?>\n<svg width="'.concat(w).concat(m,'" height="').concat(S).concat(g,'" \nviewBox="0 0 ').concat(w," ").concat(S,'" ').concat(a?'style="background:'+a+'" ':"",'\npreserveAspectRatio="xMinYMin"\nxmlns:xlink="http://www.w3.org/1999/xlink"\nxmlns="http://www.w3.org/2000/svg">\n\x3c!-- Generated by PQINA - https://pqina.nl/ --\x3e\n<title>').concat(s?s.textContent:"",'</title>\n<g transform="').concat(x.join(" "),'">\n<g transform="').concat(B.join(" "),'">\n').concat(o.outerHTML).concat(R,"\n</g>\n</g>\n</svg>");i(V)},u.readAsText(e)}))},J=function(e){var t;try{t=new ImageData(e.width,e.height)}catch(n){t=document.createElement("canvas").getContext("2d").createImageData(e.width,e.height)}return t.data.set(e.data),t},$=function(){var e={resize:c,filter:s},t=function(t,n){return t.forEach((function(t){n=e[t.type](n,t.data)})),n},n=function(e,n){var r=e.transforms,i=null;if(r.forEach((function(e){"filter"===e.type&&(i=e)})),i){var o=null;r.forEach((function(e){"resize"===e.type&&(o=e)})),o&&(o.data.matrix=i.data,r=r.filter((function(e){return"filter"!==e.type})))}n(t(r,e.imageData))};self.onmessage=function(e){n(e.data.message,(function(t){self.postMessage({id:e.data.id,message:t},[t.data.buffer])}))};var r=1,i=1,o=1;function a(e,t,n){var a=t[e]/255,u=t[e+1]/255,l=t[e+2]/255,s=t[e+3]/255,c=a*n[0]+u*n[1]+l*n[2]+s*n[3]+n[4],f=a*n[5]+u*n[6]+l*n[7]+s*n[8]+n[9],d=a*n[10]+u*n[11]+l*n[12]+s*n[13]+n[14],p=a*n[15]+u*n[16]+l*n[17]+s*n[18]+n[19],E=Math.max(0,c*p)+r*(1-p),h=Math.max(0,f*p)+i*(1-p),_=Math.max(0,d*p)+o*(1-p);t[e]=255*Math.max(0,Math.min(1,E)),t[e+1]=255*Math.max(0,Math.min(1,h)),t[e+2]=255*Math.max(0,Math.min(1,_))}var u=self.JSON.stringify([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]);function l(e){return self.JSON.stringify(e||[])===u}function s(e,t){if(!t||l(t))return e;for(var n=e.data,a=n.length,u=t[0],s=t[1],c=t[2],f=t[3],d=t[4],p=t[5],E=t[6],h=t[7],_=t[8],m=t[9],g=t[10],I=t[11],T=t[12],v=t[13],y=t[14],R=t[15],O=t[16],A=t[17],w=t[18],S=t[19],D=0,M=0,L=0,b=0,P=0,G=0,N=0,C=0,x=0,F=0,U=0,B=0;D<a;D+=4)G=(M=n[D]/255)*u+(L=n[D+1]/255)*s+(b=n[D+2]/255)*c+(P=n[D+3]/255)*f+d,N=M*p+L*E+b*h+P*_+m,C=M*g+L*I+b*T+P*v+y,x=M*R+L*O+b*A+P*w+S,F=Math.max(0,G*x)+r*(1-x),U=Math.max(0,N*x)+i*(1-x),B=Math.max(0,C*x)+o*(1-x),n[D]=255*Math.max(0,Math.min(1,F)),n[D+1]=255*Math.max(0,Math.min(1,U)),n[D+2]=255*Math.max(0,Math.min(1,B));return e}function c(e,t){var n=t.mode,r=void 0===n?"contain":n,i=t.upscale,o=void 0!==i&&i,u=t.width,c=t.height,f=t.matrix;if(f=!f||l(f)?null:f,!u&&!c)return s(e,f);if(null===u?u=c:null===c&&(c=u),"force"!==r){var d=u/e.width,p=c/e.height,E=1;if("cover"===r?E=Math.max(d,p):"contain"===r&&(E=Math.min(d,p)),E>1&&!1===o)return s(e,f);u=e.width*E,c=e.height*E}for(var h=e.width,_=e.height,m=Math.round(u),g=Math.round(c),I=e.data,T=new Uint8ClampedArray(m*g*4),v=h/m,y=_/g,R=Math.ceil(.5*v),O=Math.ceil(.5*y),A=0;A<g;A++)for(var w=0;w<m;w++){for(var S=4*(w+A*m),D=0,M=0,L=0,b=0,P=0,G=0,N=0,C=(A+.5)*y,x=Math.floor(A*y);x<(A+1)*y;x++)for(var F=Math.abs(C-(x+.5))/O,U=(w+.5)*v,B=F*F,V=Math.floor(w*v);V<(w+1)*v;V++){var q=Math.abs(U-(V+.5))/R,k=Math.sqrt(B+q*q);if(k>=-1&&k<=1&&(D=2*k*k*k-3*k*k+1)>0){var z=I[3+(q=4*(V+x*h))];N+=D*z,L+=D,z<255&&(D=D*z/250),b+=D*I[q],P+=D*I[q+1],G+=D*I[q+2],M+=D}}T[S]=b/M,T[S+1]=P/M,T[S+2]=G/M,T[S+3]=N/L,f&&a(S,T,f)}return{data:T,width:m,height:g}}},ee=function(e,t){if(1165519206===e.getUint32(t+4,!1)){t+=4;var n=18761===e.getUint16(t+=6,!1);t+=e.getUint32(t+4,n);var r=e.getUint16(t,n);t+=2;for(var i=0;i<r;i++)if(274===e.getUint16(t+12*i,n))return e.setUint16(t+12*i+8,1,n),!0;return!1}},te=function(e){var t=new DataView(e);if(65496!==t.getUint16(0))return null;for(var n,r,i=2,o=!1;i<t.byteLength&&(n=t.getUint16(i,!1),r=t.getUint16(i+2,!1)+2,n>=65504&&n<=65519||65534===n)&&(o||(o=ee(t,i,r)),!(i+r>t.byteLength));)i+=r;return e.slice(0,i)},ne=function(e){return new Promise((function(t){var n=new FileReader;n.onload=function(){return t(te(n.result)||null)},n.readAsArrayBuffer(e.slice(0,262144))}))},re=function(){return window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder},ie=function(e,t){var n=re();if(n){var r=new n;return r.append(e),r.getBlob(t)}return new Blob([e],{type:t})},oe=function(){return Math.random().toString(36).substr(2,9)},ae=function(e){var t=new Blob(["(",e.toString(),")()"],{type:"application/javascript"}),n=URL.createObjectURL(t),r=new Worker(n),i=[];return{transfer:function(){},post:function(e,t,n){var o=oe();i[o]=t,r.onmessage=function(e){var t=i[e.data.id];t&&(t(e.data.message),delete i[e.data.id])},r.postMessage({id:o,message:e},n)},terminate:function(){r.terminate(),URL.revokeObjectURL(n)}}},ue=function(e){return new Promise((function(t,n){var r=new Image;r.onload=function(){t(r)},r.onerror=function(e){n(e)},r.src=e}))},le=function(e){return e.reduce((function(e,t){return e.then((function(e){return t().then(Array.prototype.concat.bind(e))}))}),Promise.resolve([]))},se=function(e,t){return new Promise((function(n){var r={width:e.width,height:e.height},i=e.getContext("2d"),o=t.sort(Q).map((function(e){return function(){return new Promise((function(t){de[e[0]](i,r,e[1],t)&&t()}))}}));le(o).then((function(){return n(e)}))}))},ce=function(e,t){e.beginPath(),e.lineCap=t["stroke-linecap"],e.lineJoin=t["stroke-linejoin"],e.lineWidth=t["stroke-width"],t["stroke-dasharray"].length&&e.setLineDash(t["stroke-dasharray"].split(",")),e.fillStyle=t.fill,e.strokeStyle=t.stroke,e.globalAlpha=t.opacity||1},fe=function(e){e.fill(),e.stroke(),e.globalAlpha=1},de={rect:function(e,t,n){var r=b(n,t),i=M(n,t);return ce(e,i),e.rect(r.x,r.y,r.width,r.height),fe(e,i),!0},ellipse:function(e,t,n){var r=b(n,t),i=M(n,t);ce(e,i);var o=r.x,a=r.y,u=r.width,l=r.height,s=.5522848,c=u/2*s,f=l/2*s,d=o+u,p=a+l,E=o+u/2,h=a+l/2;return e.moveTo(o,h),e.bezierCurveTo(o,h-f,E-c,a,E,a),e.bezierCurveTo(E+c,a,d,h-f,d,h),e.bezierCurveTo(d,h+f,E+c,p,E,p),e.bezierCurveTo(E-c,p,o,h+f,o,h),fe(e,i),!0},image:function(e,t,n,r){var i=b(n,t),o=M(n,t);ce(e,o);var a=new Image;new URL(n.src,window.location.href).origin!==window.location.origin&&(a.crossOrigin=""),a.onload=function(){if("cover"===n.fit){var t=i.width/i.height,u=t>1?a.width:a.height*t,l=t>1?a.width/t:a.height,s=.5*a.width-.5*u,c=.5*a.height-.5*l;e.drawImage(a,s,c,u,l,i.x,i.y,i.width,i.height)}else if("contain"===n.fit){var f=Math.min(i.width/a.width,i.height/a.height),d=f*a.width,p=f*a.height,E=i.x+.5*i.width-.5*d,h=i.y+.5*i.height-.5*p;e.drawImage(a,0,0,a.width,a.height,E,h,d,p)}else e.drawImage(a,0,0,a.width,a.height,i.x,i.y,i.width,i.height);fe(e,o),r()},a.src=n.src},text:function(e,t,n){var r=b(n,t),i=M(n,t);ce(e,i);var o=D(n.fontSize,t),a=n.fontFamily||"sans-serif",u=n.fontWeight||"normal",l=n.textAlign||"left";return e.font="".concat(u," ").concat(o,"px ").concat(a),e.textAlign=l,e.fillText(n.text,r.x,r.y),fe(e,i),!0},line:function(e,t,n){var r=b(n,t),i=M(n,t);ce(e,i),e.beginPath();var o={x:r.x,y:r.y},a={x:r.x+r.width,y:r.y+r.height};e.moveTo(o.x,o.y),e.lineTo(a.x,a.y);var u=A({x:a.x-o.x,y:a.y-o.y}),l=.04*Math.min(t.width,t.height);if(-1!==n.lineDecoration.indexOf("arrow-begin")){var s=R(u,l),c=O(o,s),f=w(o,2,c),d=w(o,-2,c);e.moveTo(f.x,f.y),e.lineTo(o.x,o.y),e.lineTo(d.x,d.y)}if(-1!==n.lineDecoration.indexOf("arrow-end")){var p=R(u,-l),E=O(a,p),h=w(a,2,E),_=w(a,-2,E);e.moveTo(h.x,h.y),e.lineTo(a.x,a.y),e.lineTo(_.x,_.y)}return fe(e,i),!0},path:function(e,t,n){var r=M(n,t);ce(e,r),e.beginPath();var i=n.points.map((function(e){return{x:D(e.x,t,1,"width"),y:D(e.y,t,1,"height")}}));e.moveTo(i[0].x,i[0].y);for(var o=i.length,a=1;a<o;a++)e.lineTo(i[a].x,i[a].y);return fe(e,r),!0}},pe=function(e){var t=document.createElement("canvas");return t.width=e.width,t.height=e.height,t.getContext("2d").putImageData(e,0,0),t},Ee=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise((function(r,i){if(!e||!o(e))return i({status:"not an image file",file:e});var a=n.stripImageHead,u=n.beforeCreateBlob,l=n.afterCreateBlob,s=n.canvasMemoryLimit,c=t.crop,f=t.size,d=t.filter,p=t.markup,E=t.output,h=t.image&&t.image.orientation?Math.max(1,Math.min(8,t.image.orientation)):null,_=E&&E.quality,m=null===_?null:_/100,I=E&&E.type||null,T=E&&E.background||null,R=[];!f||"number"!=typeof f.width&&"number"!=typeof f.height||R.push({type:"resize",data:f}),d&&20===d.length&&R.push({type:"filter",data:d});var O=function(e){var t=l?l(e):e;Promise.resolve(t).then(r)},A=function(t,n){var r=pe(t),o=p.length?se(r,p):r;Promise.resolve(o).then((function(t){y(t,n,u).then((function(n){if(g(t),a)return O(n);ne(e).then((function(e){null!==e&&(n=new Blob([e,n.slice(20)],{type:n.type})),O(n)}))})).catch(i)}))};if(/svg/.test(e.type)&&null===I)return K(e,c,p,{background:T}).then((function(e){r(ie(e,"image/svg+xml"))}));var w=URL.createObjectURL(e);ue(w).then((function(t){URL.revokeObjectURL(w);var n=v(t,h,c,{canvasMemoryLimit:s,background:T}),r={quality:m,type:I||e.type};if(!R.length)return A(n,r);var i=ae($);i.post({transforms:R,imageData:n},(function(e){A(J(e),r),i.terminate()}),[n.data.buffer])})).catch(i)}))};function he(e){this.wrapped=e}function _e(e){var t,n;function r(e,r){return new Promise((function(o,a){var u={key:e,arg:r,resolve:o,reject:a,next:null};n?n=n.next=u:(t=n=u,i(e,r))}))}function i(t,n){try{var r=e[t](n),a=r.value,u=a instanceof he;Promise.resolve(u?a.wrapped:a).then((function(e){u?i("next",e):o(r.done?"return":"normal",e)}),(function(e){i("throw",e)}))}catch(e){o("throw",e)}}function o(e,r){switch(e){case"return":t.resolve({value:r,done:!0});break;case"throw":t.reject(r);break;default:t.resolve({value:r,done:!1})}(t=t.next)?i(t.key,t.arg):n=null}this._invoke=r,"function"!=typeof e.return&&(this.return=void 0)}function me(e,t){return ge(e)||Ie(e,t)||Te()}function ge(e){if(Array.isArray(e))return e}function Ie(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return n}function Te(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}"function"==typeof Symbol&&Symbol.asyncIterator&&(_e.prototype[Symbol.asyncIterator]=function(){return this}),_e.prototype.next=function(e){return this._invoke("next",e)},_e.prototype.throw=function(e){return this._invoke("throw",e)},_e.prototype.return=function(e){return this._invoke("return",e)};var ve=["x","y","left","top","right","bottom","width","height"],ye=function(e){return"string"==typeof e&&/%/.test(e)?parseFloat(e)/100:e},Re=function(e){var t=me(e,2),n=t[0],r=t[1],i=r.points?{}:ve.reduce((function(e,t){return e[t]=ye(r[t]),e}),{});return[n,Object.assign({zIndex:0},r,i)]},Oe=function(e){return new Promise((function(t,n){var r=new Image;r.src=URL.createObjectURL(e);var i=function(){var e=r.naturalWidth,n=r.naturalHeight;e&&n&&(URL.revokeObjectURL(r.src),clearInterval(o),t({width:e,height:n}))};r.onerror=function(e){URL.revokeObjectURL(r.src),clearInterval(o),n(e)};var o=setInterval(i,1);i()}))};"undefined"!=typeof window&&void 0!==window.document&&(HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(e,t,n){var r=this;setTimeout((function(){for(var i=r.toDataURL(t,n).split(",")[1],o=atob(i),a=o.length,u=new Uint8Array(a);a--;)u[a]=o.charCodeAt(a);e(new Blob([u],{type:t||"image/png"}))}))}}));var Ae="undefined"!=typeof window&&void 0!==window.document,we=Ae&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Se=function(t){var n=t.addFilter,o=t.utils,a=o.Type,u=o.forin,l=o.getFileFromBlob,s=o.isFile,c=["crop","resize","filter","markup","output"],f=function(e){return function(t,n,r){return t(n,e?e(r):r)}},d=function(e){return null===e.aspectRatio&&0===e.rotation&&1===e.zoom&&e.center&&.5===e.center.x&&.5===e.center.y&&e.flip&&!1===e.flip.horizontal&&!1===e.flip.vertical};n("SHOULD_PREPARE_OUTPUT",(function(e,t){var n=t.query;return new Promise((function(e){e(!n("IS_ASYNC"))}))}));var p=function(t,n,r){return new Promise((function(i){if(!t("GET_ALLOW_IMAGE_TRANSFORM")||r.archived||!s(n)||!e(n))return i(!1);Oe(n).then((function(){var e=t("GET_IMAGE_TRANSFORM_IMAGE_FILTER");if(e){var r=e(n);if(null==r)return handleRevert(!0);if("boolean"==typeof r)return i(r);if("function"==typeof r.then)return r.then(i)}i(!0)})).catch((function(e){i(!1)}))}))};return n("DID_CREATE_ITEM",(function(e,t){var n=t.query,r=t.dispatch;n("GET_ALLOW_IMAGE_TRANSFORM")&&e.extend("requestPrepare",(function(){return new Promise((function(t,n){r("REQUEST_PREPARE_OUTPUT",{query:e.id,item:e,success:t,failure:n},!0)}))}))})),n("PREPARE_OUTPUT",(function(e,t){var n=t.query,o=t.item;return new Promise((function(t){p(n,e,o).then((function(a){if(!a)return t(e);var s=[];n("GET_IMAGE_TRANSFORM_VARIANTS_INCLUDE_ORIGINAL")&&s.push((function(){return new Promise((function(t){t({name:n("GET_IMAGE_TRANSFORM_VARIANTS_ORIGINAL_NAME"),file:e})}))})),n("GET_IMAGE_TRANSFORM_VARIANTS_INCLUDE_DEFAULT")&&s.push((function(e,t,r){return new Promise((function(i){e(t,r).then((function(e){return i({name:n("GET_IMAGE_TRANSFORM_VARIANTS_DEFAULT_NAME"),file:e})}))}))}));var p=n("GET_IMAGE_TRANSFORM_VARIANTS")||{};u(p,(function(e,t){var n=f(t);s.push((function(t,r,i){return new Promise((function(o){n(t,r,i).then((function(t){return o({name:e,file:t})}))}))}))}));var E=n("GET_IMAGE_TRANSFORM_OUTPUT_QUALITY"),h=n("GET_IMAGE_TRANSFORM_OUTPUT_QUALITY_MODE"),_=null===E?null:E/100,m=n("GET_IMAGE_TRANSFORM_OUTPUT_MIME_TYPE"),g=n("GET_IMAGE_TRANSFORM_CLIENT_TRANSFORMS")||c;o.setMetadata("output",{type:m,quality:_,client:g},!0);var I=function(e,t){return new Promise((function(o,a){var u=Object.assign({},t);Object.keys(u).filter((function(e){return"exif"!==e})).forEach((function(e){-1===g.indexOf(e)&&delete u[e]}));var s=u.resize,c=u.exif,f=u.output,p=u.crop,E=u.filter,_=u.markup,m={image:{orientation:c?c.orientation:null},output:f&&(f.type||"number"==typeof f.quality||f.background)?{type:f.type,quality:"number"==typeof f.quality?100*f.quality:null,background:f.background||n("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR")||null}:void 0,size:s&&(s.size.width||s.size.height)?Object.assign({mode:s.mode,upscale:s.upscale},s.size):void 0,crop:p&&!d(p)?Object.assign({},p):void 0,markup:_&&_.length?_.map(Re):[],filter:E};if(m.output){var I=!!f.type&&f.type!==e.type,T=/\/jpe?g$/.test(e.type),v=null!==f.quality&&T&&"always"===h;if(!(m.size||m.crop||m.filter||I||v))return o(e)}var y={beforeCreateBlob:n("GET_IMAGE_TRANSFORM_BEFORE_CREATE_BLOB"),afterCreateBlob:n("GET_IMAGE_TRANSFORM_AFTER_CREATE_BLOB"),canvasMemoryLimit:n("GET_IMAGE_TRANSFORM_CANVAS_MEMORY_LIMIT"),stripImageHead:n("GET_IMAGE_TRANSFORM_OUTPUT_STRIP_IMAGE_HEAD")};Ee(e,m,y).then((function(t){var n=l(t,r(e.name,i(t.type)));o(n)})).catch(a)}))},T=s.map((function(t){return t(I,e,o.getMetadata())}));Promise.all(T).then((function(e){t(1===e.length&&null===e[0].name?e[0].file:e)}))}))}))})),{options:{allowImageTransform:[!0,a.BOOLEAN],imageTransformImageFilter:[null,a.FUNCTION],imageTransformOutputMimeType:[null,a.STRING],imageTransformOutputQuality:[null,a.INT],imageTransformOutputStripImageHead:[!0,a.BOOLEAN],imageTransformClientTransforms:[null,a.ARRAY],imageTransformOutputQualityMode:["always",a.STRING],imageTransformVariants:[null,a.OBJECT],imageTransformVariantsIncludeDefault:[!0,a.BOOLEAN],imageTransformVariantsDefaultName:[null,a.STRING],imageTransformVariantsIncludeOriginal:[!1,a.BOOLEAN],imageTransformVariantsOriginalName:["original_",a.STRING],imageTransformBeforeCreateBlob:[null,a.FUNCTION],imageTransformAfterCreateBlob:[null,a.FUNCTION],imageTransformCanvasMemoryLimit:[Ae&&we?16777216:null,a.INT],imageTransformCanvasBackgroundColor:[null,a.STRING]}}};return Ae&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:Se})),Se}()},7572:function(e){e.exports=function(){"use strict";var e=function(e){return/^image/.test(e.type)},t=function(e){return new Promise((function(t,n){var r=document.createElement("img");r.src=URL.createObjectURL(e),r.onerror=function(e){clearInterval(i),n(e)};var i=setInterval((function(){r.naturalWidth&&r.naturalHeight&&(clearInterval(i),URL.revokeObjectURL(r.src),t({width:r.naturalWidth,height:r.naturalHeight}))}),1)}))},n=function(n){var r=n.addFilter,i=n.utils,o=i.Type,a=i.replaceInString,u=i.isFile,l=function(e,n,r){return new Promise((function(i,o){var a=function(e){var t=e.width,r=e.height,a=n.minWidth,u=n.minHeight,l=n.maxWidth,s=n.maxHeight,c=n.minResolution,f=n.maxResolution,d=t*r;t<a||r<u?o("TOO_SMALL"):t>l||r>s?o("TOO_BIG"):null!==c&&d<c?o("TOO_LOW_RES"):null!==f&&d>f&&o("TOO_HIGH_RES"),i()};t(e).then(a).catch((function(){r?r(e,n).then(a).catch((function(){return o()})):o()}))}))};return r("LOAD_FILE",(function(t,n){var r=n.query;return new Promise((function(n,i){if(u(t)&&e(t)&&r("GET_ALLOW_IMAGE_VALIDATE_SIZE")){var o={minWidth:r("GET_IMAGE_VALIDATE_SIZE_MIN_WIDTH"),minHeight:r("GET_IMAGE_VALIDATE_SIZE_MIN_HEIGHT"),maxWidth:r("GET_IMAGE_VALIDATE_SIZE_MAX_WIDTH"),maxHeight:r("GET_IMAGE_VALIDATE_SIZE_MAX_HEIGHT"),minResolution:r("GET_IMAGE_VALIDATE_SIZE_MIN_RESOLUTION"),maxResolution:r("GET_IMAGE_VALIDATE_SIZE_MAX_RESOLUTION")},s=r("GET_IMAGE_VALIDATE_SIZE_MEASURE");l(t,o,s).then((function(){n(t)})).catch((function(e){var n=e?{TOO_SMALL:{label:r("GET_IMAGE_VALIDATE_SIZE_LABEL_IMAGE_SIZE_TOO_SMALL"),details:r("GET_IMAGE_VALIDATE_SIZE_LABEL_EXPECTED_MIN_SIZE")},TOO_BIG:{label:r("GET_IMAGE_VALIDATE_SIZE_LABEL_IMAGE_SIZE_TOO_BIG"),details:r("GET_IMAGE_VALIDATE_SIZE_LABEL_EXPECTED_MAX_SIZE")},TOO_LOW_RES:{label:r("GET_IMAGE_VALIDATE_SIZE_LABEL_IMAGE_RESOLUTION_TOO_LOW"),details:r("GET_IMAGE_VALIDATE_SIZE_LABEL_EXPECTED_MIN_RESOLUTION")},TOO_HIGH_RES:{label:r("GET_IMAGE_VALIDATE_SIZE_LABEL_IMAGE_RESOLUTION_TOO_HIGH"),details:r("GET_IMAGE_VALIDATE_SIZE_LABEL_EXPECTED_MAX_RESOLUTION")}}[e]:{label:r("GET_IMAGE_VALIDATE_SIZE_LABEL_FORMAT_ERROR"),details:t.type};i({status:{main:n.label,sub:e?a(n.details,o):n.details}})}))}else n(t)}))})),{options:{allowImageValidateSize:[!0,o.BOOLEAN],imageValidateSizeLabelFormatError:["Image type not supported",o.STRING],imageValidateSizeMeasure:[null,o.FUNCTION],imageValidateSizeMinResolution:[null,o.INT],imageValidateSizeMaxResolution:[null,o.INT],imageValidateSizeLabelImageResolutionTooLow:["Resolution is too low",o.STRING],imageValidateSizeLabelImageResolutionTooHigh:["Resolution is too high",o.STRING],imageValidateSizeLabelExpectedMinResolution:["Minimum resolution is {minResolution}",o.STRING],imageValidateSizeLabelExpectedMaxResolution:["Maximum resolution is {maxResolution}",o.STRING],imageValidateSizeMinWidth:[1,o.INT],imageValidateSizeMinHeight:[1,o.INT],imageValidateSizeMaxWidth:[65535,o.INT],imageValidateSizeMaxHeight:[65535,o.INT],imageValidateSizeLabelImageSizeTooSmall:["Image is too small",o.STRING],imageValidateSizeLabelImageSizeTooBig:["Image is too big",o.STRING],imageValidateSizeLabelExpectedMinSize:["Minimum size is {minWidth} × {minHeight}",o.STRING],imageValidateSizeLabelExpectedMaxSize:["Maximum size is {maxWidth} × {maxHeight}",o.STRING]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:n})),n}()},9992:function(e,t){!function(e){"use strict";var t=function(e){return e instanceof HTMLElement},n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=Object.assign({},e),i=[],o=[],a=function(){var e=[].concat(o);o.length=0,e.forEach((function(e){var t=e.type,n=e.data;u(t,n)}))},u=function(e,t,n){!n||document.hidden?(f[e]&&f[e](t),i.push({type:e,data:t})):o.push({type:e,data:t})},l=function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return c[e]?(t=c)[e].apply(t,r):null},s={getState:function(){return Object.assign({},r)},processActionQueue:function(){var e=[].concat(i);return i.length=0,e},processDispatchQueue:a,dispatch:u,query:l},c={};t.forEach((function(e){c=Object.assign({},e(r),{},c)}));var f={};return n.forEach((function(e){f=Object.assign({},e(u,l,r),{},f)})),s},r=function(e,t,n){"function"!=typeof n?Object.defineProperty(e,t,Object.assign({},n)):e[t]=n},i=function(e,t){for(var n in e)e.hasOwnProperty(n)&&t(n,e[n])},o=function(e){var t={};return i(e,(function(n){r(t,n,e[n])})),t},a=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(null===n)return e.getAttribute(t)||e.hasAttribute(t);e.setAttribute(t,n)},u="http://www.w3.org/2000/svg",l=["svg","path"],s=function(e){return l.includes(e)},c=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"object"==typeof t&&(n=t,t=null);var r=s(e)?document.createElementNS(u,e):document.createElement(e);return t&&(s(e)?a(r,"class",t):r.className=t),i(n,(function(e,t){a(r,e,t)})),r},f=function(e){return function(t,n){void 0!==n&&e.children[n]?e.insertBefore(t,e.children[n]):e.appendChild(t)}},d=function(e,t){return function(e,n){return void 0!==n?t.splice(n,0,e):t.push(e),e}},p=function(e,t){return function(n){return t.splice(t.indexOf(n),1),n.element.parentNode&&e.removeChild(n.element),n}},E="undefined"!=typeof window&&void 0!==window.document,h=function(){return E},_="children"in(h()?c("svg"):{})?function(e){return e.children.length}:function(e){return e.childNodes.length},m=function(e,t,n,r){var i=n[0]||e.left,o=n[1]||e.top,a=i+e.width,u=o+e.height*(r[1]||1),l={element:Object.assign({},e),inner:{left:e.left,top:e.top,right:e.right,bottom:e.bottom},outer:{left:i,top:o,right:a,bottom:u}};return t.filter((function(e){return!e.isRectIgnored()})).map((function(e){return e.rect})).forEach((function(e){g(l.inner,Object.assign({},e.inner)),g(l.outer,Object.assign({},e.outer))})),I(l.inner),l.outer.bottom+=l.element.marginBottom,l.outer.right+=l.element.marginRight,I(l.outer),l},g=function(e,t){t.top+=e.top,t.right+=e.left,t.bottom+=e.top,t.left+=e.left,t.bottom>e.bottom&&(e.bottom=t.bottom),t.right>e.right&&(e.right=t.right)},I=function(e){e.width=e.right-e.left,e.height=e.bottom-e.top},T=function(e){return"number"==typeof e},v=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.001;return Math.abs(e-t)<r&&Math.abs(n)<r},y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.stiffness,n=void 0===t?.5:t,r=e.damping,i=void 0===r?.75:r,a=e.mass,u=void 0===a?10:a,l=null,s=null,c=0,f=!1,d=o({interpolate:function(e,t){if(!f){if(!T(l)||!T(s))return f=!0,void(c=0);v(s+=c+=-(s-l)*n/u,l,c*=i)||t?(s=l,c=0,f=!0,d.onupdate(s),d.oncomplete(s)):d.onupdate(s)}},target:{set:function(e){if(T(e)&&!T(s)&&(s=e),null===l&&(l=e,s=e),s===(l=e)||void 0===l)return f=!0,c=0,d.onupdate(s),void d.oncomplete(s);f=!1},get:function(){return l}},resting:{get:function(){return f}},onupdate:function(e){},oncomplete:function(e){}});return d},R=function(e){return e<.5?2*e*e:(4-2*e)*e-1},O=function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.duration,i=void 0===r?500:r,a=n.easing,u=void 0===a?R:a,l=n.delay,s=void 0===l?0:l,c=null,f=!0,d=!1,p=null,E=o({interpolate:function(n,r){f||null===p||(null===c&&(c=n),n-c<s||((e=n-c-s)>=i||r?(e=1,t=d?0:1,E.onupdate(t*p),E.oncomplete(t*p),f=!0):(t=e/i,E.onupdate((e>=0?u(d?1-t:t):0)*p))))},target:{get:function(){return d?0:p},set:function(e){if(null===p)return p=e,E.onupdate(e),void E.oncomplete(e);e<p?(p=1,d=!0):(d=!1,p=e),f=!1,c=null}},resting:{get:function(){return f}},onupdate:function(e){},oncomplete:function(e){}});return E},A={spring:y,tween:O},w=function(e,t,n){var r=e[t]&&"object"==typeof e[t][n]?e[t][n]:e[t]||e,i="string"==typeof r?r:r.type,o="object"==typeof r?Object.assign({},r):{};return A[i]?A[i](o):null},S=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];(t=Array.isArray(t)?t:[t]).forEach((function(t){e.forEach((function(e){var i=e,o=function(){return n[e]},a=function(t){return n[e]=t};"object"==typeof e&&(i=e.key,o=e.getter||o,a=e.setter||a),t[i]&&!r||(t[i]={get:o,set:a})}))}))},D=function(e){return function(t,n){e.addEventListener(t,n)}},M=function(e){return function(t,n){e.removeEventListener(t,n)}},L=function(e){return null!=e},b={opacity:1,scaleX:1,scaleY:1,translateX:0,translateY:0,rotateX:0,rotateY:0,rotateZ:0,originX:0,originY:0},P=function(e){var t=e.mixinConfig,n=e.viewProps,r=e.viewInternalAPI,i=e.viewExternalAPI,o=e.view,a=Object.assign({},n),u={};S(t,[r,i],n);var l=function(){return[n.translateX||0,n.translateY||0]},s=function(){return[n.scaleX||0,n.scaleY||0]},c=function(){return o.rect?m(o.rect,o.childViews,l(),s()):null};return r.rect={get:c},i.rect={get:c},t.forEach((function(e){n[e]=void 0===a[e]?b[e]:a[e]})),{write:function(){if(G(u,n))return N(o.element,n),Object.assign(u,Object.assign({},n)),!0},destroy:function(){}}},G=function(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!0;for(var n in t)if(t[n]!==e[n])return!0;return!1},N=function(e,t){var n=t.opacity,r=t.perspective,i=t.translateX,o=t.translateY,a=t.scaleX,u=t.scaleY,l=t.rotateX,s=t.rotateY,c=t.rotateZ,f=t.originX,d=t.originY,p=t.width,E=t.height,h="",_="";(L(f)||L(d))&&(_+="transform-origin: "+(f||0)+"px "+(d||0)+"px;"),L(r)&&(h+="perspective("+r+"px) "),(L(i)||L(o))&&(h+="translate3d("+(i||0)+"px, "+(o||0)+"px, 0) "),(L(a)||L(u))&&(h+="scale3d("+(L(a)?a:1)+", "+(L(u)?u:1)+", 1) "),L(c)&&(h+="rotateZ("+c+"rad) "),L(l)&&(h+="rotateX("+l+"rad) "),L(s)&&(h+="rotateY("+s+"rad) "),h.length&&(_+="transform:"+h+";"),L(n)&&(_+="opacity:"+n+";",0===n&&(_+="visibility:hidden;"),n<1&&(_+="pointer-events:none;")),L(E)&&(_+="height:"+E+"px;"),L(p)&&(_+="width:"+p+"px;");var m=e.elementCurrentStyle||"";_.length===m.length&&_===m||(e.style.cssText=_,e.elementCurrentStyle=_)},C={styles:P,listeners:function(e){e.mixinConfig,e.viewProps,e.viewInternalAPI;var t=e.viewExternalAPI,n=(e.viewState,e.view),r=[],i=D(n.element),o=M(n.element);return t.on=function(e,t){r.push({type:e,fn:t}),i(e,t)},t.off=function(e,t){r.splice(r.findIndex((function(n){return n.type===e&&n.fn===t})),1),o(e,t)},{write:function(){return!0},destroy:function(){r.forEach((function(e){o(e.type,e.fn)}))}}},animations:function(e){var t=e.mixinConfig,n=e.viewProps,r=e.viewInternalAPI,o=e.viewExternalAPI,a=Object.assign({},n),u=[];return i(t,(function(e,t){var i=w(t);i&&(i.onupdate=function(t){n[e]=t},i.target=a[e],S([{key:e,setter:function(e){i.target!==e&&(i.target=e)},getter:function(){return n[e]}}],[r,o],n,!0),u.push(i))})),{write:function(e){var t=document.hidden,n=!0;return u.forEach((function(r){r.resting||(n=!1),r.interpolate(e,t)})),n},destroy:function(){}}},apis:function(e){var t=e.mixinConfig,n=e.viewProps,r=e.viewExternalAPI;S(t,r,n)}},x=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.layoutCalculated||(e.paddingTop=parseInt(n.paddingTop,10)||0,e.marginTop=parseInt(n.marginTop,10)||0,e.marginRight=parseInt(n.marginRight,10)||0,e.marginBottom=parseInt(n.marginBottom,10)||0,e.marginLeft=parseInt(n.marginLeft,10)||0,t.layoutCalculated=!0),e.left=t.offsetLeft||0,e.top=t.offsetTop||0,e.width=t.offsetWidth||0,e.height=t.offsetHeight||0,e.right=e.left+e.width,e.bottom=e.top+e.height,e.scrollTop=t.scrollTop,e.hidden=null===t.offsetParent,e},F=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.tag,n=void 0===t?"div":t,r=e.name,i=void 0===r?null:r,a=e.attributes,u=void 0===a?{}:a,l=e.read,s=void 0===l?function(){}:l,E=e.write,h=void 0===E?function(){}:E,g=e.create,I=void 0===g?function(){}:g,T=e.destroy,v=void 0===T?function(){}:T,y=e.filterFrameActionsForChild,R=void 0===y?function(e,t){return t}:y,O=e.didCreateView,A=void 0===O?function(){}:O,w=e.didWriteView,S=void 0===w?function(){}:w,D=e.ignoreRect,M=void 0!==D&&D,L=e.ignoreRectUpdate,b=void 0!==L&&L,P=e.mixins,G=void 0===P?[]:P;return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=c(n,"filepond--"+i,u),a=window.getComputedStyle(r,null),l=x(),E=null,g=!1,T=[],y=[],O={},w={},D=[h],L=[s],P=[v],N=function(){return r},F=function(){return T.concat()},U=function(){return O},B=function(e){return function(t,n){return t(e,n)}},V=function(){return E||(E=m(l,T,[0,0],[1,1]))},q=function(){E=null,T.forEach((function(e){return e._read()})),!(b&&l.width&&l.height)&&x(l,r,a);var e={root:X,props:t,rect:l};L.forEach((function(t){return t(e)}))},k=function(e,n,r){var i=0===n.length;return D.forEach((function(o){!1===o({props:t,root:X,actions:n,timestamp:e,shouldOptimize:r})&&(i=!1)})),y.forEach((function(t){!1===t.write(e)&&(i=!1)})),T.filter((function(e){return!!e.element.parentNode})).forEach((function(t){t._write(e,R(t,n),r)||(i=!1)})),T.forEach((function(t,o){t.element.parentNode||(X.appendChild(t.element,o),t._read(),t._write(e,R(t,n),r),i=!1)})),g=i,S({props:t,root:X,actions:n,timestamp:e}),i},z=function(){y.forEach((function(e){return e.destroy()})),P.forEach((function(e){e({root:X,props:t})})),T.forEach((function(e){return e._destroy()}))},W={element:{get:N},style:{get:function(){return a}},childViews:{get:F}},Y=Object.assign({},W,{rect:{get:V},ref:{get:U},is:function(e){return i===e},appendChild:f(r),createChildView:B(e),linkView:function(e){return T.push(e),e},unlinkView:function(e){T.splice(T.indexOf(e),1)},appendChildView:d(r,T),removeChildView:p(r,T),registerWriter:function(e){return D.push(e)},registerReader:function(e){return L.push(e)},registerDestroyer:function(e){return P.push(e)},invalidateLayout:function(){return r.layoutCalculated=!1},dispatch:e.dispatch,query:e.query}),j={element:{get:N},childViews:{get:F},rect:{get:V},resting:{get:function(){return g}},isRectIgnored:function(){return M},_read:q,_write:k,_destroy:z},H=Object.assign({},W,{rect:{get:function(){return l}}});Object.keys(G).sort((function(e,t){return"styles"===e?1:"styles"===t?-1:0})).forEach((function(e){var n=C[e]({mixinConfig:G[e],viewProps:t,viewState:w,viewInternalAPI:Y,viewExternalAPI:j,view:o(H)});n&&y.push(n)}));var X=o(Y);I({root:X,props:t});var Z=_(r);return T.forEach((function(e,t){X.appendChild(e.element,Z+t)})),A(X),o(j)}},U=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:60,r="__framePainter";if(window[r])return window[r].readers.push(e),void window[r].writers.push(t);window[r]={readers:[e],writers:[t]};var i=window[r],o=1e3/n,a=null,u=null,l=null,s=null,c=function(){document.hidden?(l=function(){return window.setTimeout((function(){return f(performance.now())}),o)},s=function(){return window.clearTimeout(u)}):(l=function(){return window.requestAnimationFrame(f)},s=function(){return window.cancelAnimationFrame(u)})};document.addEventListener("visibilitychange",(function(){s&&s(),c(),f(performance.now())}));var f=function e(t){u=l(e),a||(a=t);var n=t-a;n<=o||(a=t-n%o,i.readers.forEach((function(e){return e()})),i.writers.forEach((function(e){return e(t)})))};return c(),f(performance.now()),{pause:function(){s(u)}}},B=function(e,t){return function(n){var r=n.root,i=n.props,o=n.actions,a=void 0===o?[]:o,u=n.timestamp,l=n.shouldOptimize;a.filter((function(t){return e[t.type]})).forEach((function(t){return e[t.type]({root:r,props:i,action:t.data,timestamp:u,shouldOptimize:l})})),t&&t({root:r,props:i,actions:a,timestamp:u,shouldOptimize:l})}},V=function(e,t){return t.parentNode.insertBefore(e,t)},q=function(e,t){return t.parentNode.insertBefore(e,t.nextSibling)},k=function(e){return Array.isArray(e)},z=function(e){return null==e},W=function(e){return e.trim()},Y=function(e){return""+e},j=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:",";return z(e)?[]:k(e)?e:Y(e).split(t).map(W).filter((function(e){return e.length}))},H=function(e){return"boolean"==typeof e},X=function(e){return H(e)?e:"true"===e},Z=function(e){return"string"==typeof e},Q=function(e){return T(e)?e:Z(e)?Y(e).replace(/[a-z]+/gi,""):0},K=function(e){return parseInt(Q(e),10)},J=function(e){return parseFloat(Q(e))},$=function(e){return T(e)&&isFinite(e)&&Math.floor(e)===e},ee=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;if($(e))return e;var n=Y(e).trim();return/MB$/i.test(n)?(n=n.replace(/MB$i/,"").trim(),K(n)*t*t):/KB/i.test(n)?(n=n.replace(/KB$i/,"").trim(),K(n)*t):K(n)},te=function(e){return"function"==typeof e},ne=function(e){for(var t=self,n=e.split("."),r=null;r=n.shift();)if(!(t=t[r]))return null;return t},re={process:"POST",patch:"PATCH",revert:"DELETE",fetch:"GET",restore:"GET",load:"GET"},ie=function(e){var t={};return t.url=Z(e)?e:e.url||"",t.timeout=e.timeout?parseInt(e.timeout,10):0,t.headers=e.headers?e.headers:{},i(re,(function(n){t[n]=oe(n,e[n],re[n],t.timeout,t.headers)})),t.process=e.process||Z(e)||e.url?t.process:null,t.remove=e.remove||null,delete t.headers,t},oe=function(e,t,n,r,i){if(null===t)return null;if("function"==typeof t)return t;var o={url:"GET"===n||"PATCH"===n?"?"+e+"=":"",method:n,headers:i,withCredentials:!1,timeout:r,onload:null,ondata:null,onerror:null};if(Z(t))return o.url=t,o;if(Object.assign(o,t),Z(o.headers)){var a=o.headers.split(/:(.+)/);o.headers={header:a[0],value:a[1]}}return o.withCredentials=X(o.withCredentials),o},ae=function(e){return null===e},ue=function(e){return"object"==typeof e&&null!==e},le=function(e){return ue(e)&&Z(e.url)&&ue(e.process)&&ue(e.revert)&&ue(e.restore)&&ue(e.fetch)},se=function(e){return k(e)?"array":ae(e)?"null":$(e)?"int":/^[0-9]+ ?(?:GB|MB|KB)$/gi.test(e)?"bytes":le(e)?"api":typeof e},ce=function(e){return e.replace(/{\s*'/g,'{"').replace(/'\s*}/g,'"}').replace(/'\s*:/g,'":').replace(/:\s*'/g,':"').replace(/,\s*'/g,',"').replace(/'\s*,/g,'",')},fe={array:j,boolean:X,int:function(e){return"bytes"===se(e)?ee(e):K(e)},number:J,float:J,bytes:ee,string:function(e){return te(e)?e:Y(e)},function:function(e){return ne(e)},serverapi:function(e){return ie(e)},object:function(e){try{return JSON.parse(ce(e))}catch(e){return null}}},de=function(e,t){return fe[t](e)},pe=function(e,t,n){if(e===t)return e;var r=se(e);if(r!==n){var i=de(e,n);if(r=se(i),null===i)throw'Trying to assign value with incorrect type to "'+option+'", allowed type: "'+n+'"';e=i}return e},Ee=function(e,t){var n=e;return{enumerable:!0,get:function(){return n},set:function(r){n=pe(r,e,t)}}},he=function(e){var t={};return i(e,(function(n){var r=e[n];t[n]=Ee(r[0],r[1])})),o(t)},_e=function(e){return{items:[],listUpdateTimeout:null,itemUpdateTimeout:null,processingQueue:[],options:he(e)}},me=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-";return e.split(/(?=[A-Z])/).map((function(e){return e.toLowerCase()})).join(t)},ge=function(e,t){var n={};return i(t,(function(t){n[t]={get:function(){return e.getState().options[t]},set:function(n){e.dispatch("SET_"+me(t,"_").toUpperCase(),{value:n})}}})),n},Ie=function(e){return function(t,n,r){var o={};return i(e,(function(e){var n=me(e,"_").toUpperCase();o["SET_"+n]=function(i){try{r.options[e]=i.value}catch(e){}t("DID_SET_"+n,{value:r.options[e]})}})),o}},Te=function(e){return function(t){var n={};return i(e,(function(e){n["GET_"+me(e,"_").toUpperCase()]=function(n){return t.options[e]}})),n}},ve={API:1,DROP:2,BROWSE:3,PASTE:4,NONE:5},ye=function(){return Math.random().toString(36).substring(2,11)};function Re(e){this.wrapped=e}function Oe(e){var t,n;function r(e,r){return new Promise((function(o,a){var u={key:e,arg:r,resolve:o,reject:a,next:null};n?n=n.next=u:(t=n=u,i(e,r))}))}function i(t,n){try{var r=e[t](n),a=r.value,u=a instanceof Re;Promise.resolve(u?a.wrapped:a).then((function(e){u?i("next",e):o(r.done?"return":"normal",e)}),(function(e){i("throw",e)}))}catch(e){o("throw",e)}}function o(e,r){switch(e){case"return":t.resolve({value:r,done:!0});break;case"throw":t.reject(r);break;default:t.resolve({value:r,done:!1})}(t=t.next)?i(t.key,t.arg):n=null}this._invoke=r,"function"!=typeof e.return&&(this.return=void 0)}function Ae(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function we(e,t){if(null==e)return{};var n,r,i=Ae(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Se(e){return De(e)||Me(e)||Le()}function De(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function Me(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function Le(){throw new TypeError("Invalid attempt to spread non-iterable instance")}"function"==typeof Symbol&&Symbol.asyncIterator&&(Oe.prototype[Symbol.asyncIterator]=function(){return this}),Oe.prototype.next=function(e){return this._invoke("next",e)},Oe.prototype.throw=function(e){return this._invoke("throw",e)},Oe.prototype.return=function(e){return this._invoke("return",e)};var be=function(e,t){return e.splice(t,1)},Pe=function(e,t){t?e():document.hidden?Promise.resolve(1).then(e):setTimeout(e,0)},Ge=function(){var e=[],t=function(t,n){be(e,e.findIndex((function(e){return e.event===t&&(e.cb===n||!n)})))},n=function(t,n,r){e.filter((function(e){return e.event===t})).map((function(e){return e.cb})).forEach((function(e){return Pe((function(){return e.apply(void 0,Se(n))}),r)}))};return{fireSync:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];n(e,r,!0)},fire:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];n(e,r,!1)},on:function(t,n){e.push({event:t,cb:n})},onOnce:function(n,r){e.push({event:n,cb:function(){t(n,r),r.apply(void 0,arguments)}})},off:t}},Ne=function(e,t,n){Object.getOwnPropertyNames(e).filter((function(e){return!n.includes(e)})).forEach((function(n){return Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))},Ce=["fire","process","revert","load","on","off","onOnce","retryLoad","extend","archive","archived","release","released","requestProcessing","freeze"],xe=function(e){var t={};return Ne(e,t,Ce),t},Fe=function(e){e.forEach((function(t,n){t.released&&be(e,n)}))},Ue={INIT:1,IDLE:2,PROCESSING_QUEUED:9,PROCESSING:3,PROCESSING_COMPLETE:5,PROCESSING_ERROR:6,PROCESSING_REVERT_ERROR:10,LOADING:7,LOAD_ERROR:8},Be={INPUT:1,LIMBO:2,LOCAL:3},Ve=function(e){return/[^0-9]+/.exec(e)},qe=function(){return Ve(1.1.toLocaleString())[0]},ke=function(){var e=qe(),t=1e3.toLocaleString();return t!==1e3.toString()?Ve(t)[0]:"."===e?",":"."},ze={BOOLEAN:"boolean",INT:"int",NUMBER:"number",STRING:"string",ARRAY:"array",OBJECT:"object",FUNCTION:"function",ACTION:"action",SERVER_API:"serverapi",REGEX:"regex"},We=[],Ye=function(e,t,n){return new Promise((function(r,i){var o=We.filter((function(t){return t.key===e})).map((function(e){return e.cb}));if(0!==o.length){var a=o.shift();o.reduce((function(e,t){return e.then((function(e){return t(e,n)}))}),a(t,n)).then((function(e){return r(e)})).catch((function(e){return i(e)}))}else r(t)}))},je=function(e,t,n){return We.filter((function(t){return t.key===e})).map((function(e){return e.cb(t,n)}))},He=function(e,t){return We.push({key:e,cb:t})},Xe=function(e){return Object.assign(Ke,e)},Ze=function(){return Object.assign({},Ke)},Qe=function(e){i(e,(function(e,t){Ke[e]&&(Ke[e][0]=pe(t,Ke[e][0],Ke[e][1]))}))},Ke={id:[null,ze.STRING],name:["filepond",ze.STRING],disabled:[!1,ze.BOOLEAN],className:[null,ze.STRING],required:[!1,ze.BOOLEAN],captureMethod:[null,ze.STRING],allowSyncAcceptAttribute:[!0,ze.BOOLEAN],allowDrop:[!0,ze.BOOLEAN],allowBrowse:[!0,ze.BOOLEAN],allowPaste:[!0,ze.BOOLEAN],allowMultiple:[!1,ze.BOOLEAN],allowReplace:[!0,ze.BOOLEAN],allowRevert:[!0,ze.BOOLEAN],allowRemove:[!0,ze.BOOLEAN],allowProcess:[!0,ze.BOOLEAN],allowReorder:[!1,ze.BOOLEAN],allowDirectoriesOnly:[!1,ze.BOOLEAN],storeAsFile:[!1,ze.BOOLEAN],forceRevert:[!1,ze.BOOLEAN],maxFiles:[null,ze.INT],checkValidity:[!1,ze.BOOLEAN],itemInsertLocationFreedom:[!0,ze.BOOLEAN],itemInsertLocation:["before",ze.STRING],itemInsertInterval:[75,ze.INT],dropOnPage:[!1,ze.BOOLEAN],dropOnElement:[!0,ze.BOOLEAN],dropValidation:[!1,ze.BOOLEAN],ignoredFiles:[[".ds_store","thumbs.db","desktop.ini"],ze.ARRAY],instantUpload:[!0,ze.BOOLEAN],maxParallelUploads:[2,ze.INT],allowMinimumUploadDuration:[!0,ze.BOOLEAN],chunkUploads:[!1,ze.BOOLEAN],chunkForce:[!1,ze.BOOLEAN],chunkSize:[5e6,ze.INT],chunkRetryDelays:[[500,1e3,3e3],ze.ARRAY],server:[null,ze.SERVER_API],fileSizeBase:[1e3,ze.INT],labelFileSizeBytes:["bytes",ze.STRING],labelFileSizeKilobytes:["KB",ze.STRING],labelFileSizeMegabytes:["MB",ze.STRING],labelFileSizeGigabytes:["GB",ze.STRING],labelDecimalSeparator:[qe(),ze.STRING],labelThousandsSeparator:[ke(),ze.STRING],labelIdle:['Drag & Drop your files or <span class="filepond--label-action">Browse</span>',ze.STRING],labelInvalidField:["Field contains invalid files",ze.STRING],labelFileWaitingForSize:["Waiting for size",ze.STRING],labelFileSizeNotAvailable:["Size not available",ze.STRING],labelFileCountSingular:["file in list",ze.STRING],labelFileCountPlural:["files in list",ze.STRING],labelFileLoading:["Loading",ze.STRING],labelFileAdded:["Added",ze.STRING],labelFileLoadError:["Error during load",ze.STRING],labelFileRemoved:["Removed",ze.STRING],labelFileRemoveError:["Error during remove",ze.STRING],labelFileProcessing:["Uploading",ze.STRING],labelFileProcessingComplete:["Upload complete",ze.STRING],labelFileProcessingAborted:["Upload cancelled",ze.STRING],labelFileProcessingError:["Error during upload",ze.STRING],labelFileProcessingRevertError:["Error during revert",ze.STRING],labelTapToCancel:["tap to cancel",ze.STRING],labelTapToRetry:["tap to retry",ze.STRING],labelTapToUndo:["tap to undo",ze.STRING],labelButtonRemoveItem:["Remove",ze.STRING],labelButtonAbortItemLoad:["Abort",ze.STRING],labelButtonRetryItemLoad:["Retry",ze.STRING],labelButtonAbortItemProcessing:["Cancel",ze.STRING],labelButtonUndoItemProcessing:["Undo",ze.STRING],labelButtonRetryItemProcessing:["Retry",ze.STRING],labelButtonProcessItem:["Upload",ze.STRING],iconRemove:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M11.586 13l-2.293 2.293a1 1 0 0 0 1.414 1.414L13 14.414l2.293 2.293a1 1 0 0 0 1.414-1.414L14.414 13l2.293-2.293a1 1 0 0 0-1.414-1.414L13 11.586l-2.293-2.293a1 1 0 0 0-1.414 1.414L11.586 13z" fill="currentColor" fill-rule="nonzero"/></svg>',ze.STRING],iconProcess:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M14 10.414v3.585a1 1 0 0 1-2 0v-3.585l-1.293 1.293a1 1 0 0 1-1.414-1.415l3-3a1 1 0 0 1 1.414 0l3 3a1 1 0 0 1-1.414 1.415L14 10.414zM9 18a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2H9z" fill="currentColor" fill-rule="evenodd"/></svg>',ze.STRING],iconRetry:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M10.81 9.185l-.038.02A4.997 4.997 0 0 0 8 13.683a5 5 0 0 0 5 5 5 5 0 0 0 5-5 1 1 0 0 1 2 0A7 7 0 1 1 9.722 7.496l-.842-.21a.999.999 0 1 1 .484-1.94l3.23.806c.535.133.86.675.73 1.21l-.804 3.233a.997.997 0 0 1-1.21.73.997.997 0 0 1-.73-1.21l.23-.928v-.002z" fill="currentColor" fill-rule="nonzero"/></svg>',ze.STRING],iconUndo:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M9.185 10.81l.02-.038A4.997 4.997 0 0 1 13.683 8a5 5 0 0 1 5 5 5 5 0 0 1-5 5 1 1 0 0 0 0 2A7 7 0 1 0 7.496 9.722l-.21-.842a.999.999 0 1 0-1.94.484l.806 3.23c.133.535.675.86 1.21.73l3.233-.803a.997.997 0 0 0 .73-1.21.997.997 0 0 0-1.21-.73l-.928.23-.002-.001z" fill="currentColor" fill-rule="nonzero"/></svg>',ze.STRING],iconDone:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M18.293 9.293a1 1 0 0 1 1.414 1.414l-7.002 7a1 1 0 0 1-1.414 0l-3.998-4a1 1 0 1 1 1.414-1.414L12 15.586l6.294-6.293z" fill="currentColor" fill-rule="nonzero"/></svg>',ze.STRING],oninit:[null,ze.FUNCTION],onwarning:[null,ze.FUNCTION],onerror:[null,ze.FUNCTION],onactivatefile:[null,ze.FUNCTION],oninitfile:[null,ze.FUNCTION],onaddfilestart:[null,ze.FUNCTION],onaddfileprogress:[null,ze.FUNCTION],onaddfile:[null,ze.FUNCTION],onprocessfilestart:[null,ze.FUNCTION],onprocessfileprogress:[null,ze.FUNCTION],onprocessfileabort:[null,ze.FUNCTION],onprocessfilerevert:[null,ze.FUNCTION],onprocessfile:[null,ze.FUNCTION],onprocessfiles:[null,ze.FUNCTION],onremovefile:[null,ze.FUNCTION],onpreparefile:[null,ze.FUNCTION],onupdatefiles:[null,ze.FUNCTION],onreorderfiles:[null,ze.FUNCTION],beforeDropFile:[null,ze.FUNCTION],beforeAddFile:[null,ze.FUNCTION],beforeRemoveFile:[null,ze.FUNCTION],beforePrepareFile:[null,ze.FUNCTION],stylePanelLayout:[null,ze.STRING],stylePanelAspectRatio:[null,ze.STRING],styleItemPanelAspectRatio:[null,ze.STRING],styleButtonRemoveItemPosition:["left",ze.STRING],styleButtonProcessItemPosition:["right",ze.STRING],styleLoadIndicatorPosition:["right",ze.STRING],styleProgressIndicatorPosition:["right",ze.STRING],styleButtonRemoveItemAlign:[!1,ze.BOOLEAN],files:[[],ze.ARRAY],credits:[["https://pqina.nl/","Powered by PQINA"],ze.ARRAY]},Je=function(e,t){return z(t)?e[0]||null:$(t)?e[t]||null:("object"==typeof t&&(t=t.id),e.find((function(e){return e.id===t}))||null)},$e=function(e){if(z(e))return e;if(/:/.test(e)){var t=e.split(":");return t[1]/t[0]}return parseFloat(e)},et=function(e){return e.filter((function(e){return!e.archived}))},tt={EMPTY:0,IDLE:1,ERROR:2,BUSY:3,READY:4},nt=null,rt=function(){if(null===nt)try{var e=new DataTransfer;e.items.add(new File(["hello world"],"This_Works.txt"));var t=document.createElement("input");t.setAttribute("type","file"),t.files=e.files,nt=1===t.files.length}catch(e){nt=!1}return nt},it=[Ue.LOAD_ERROR,Ue.PROCESSING_ERROR,Ue.PROCESSING_REVERT_ERROR],ot=[Ue.LOADING,Ue.PROCESSING,Ue.PROCESSING_QUEUED,Ue.INIT],at=[Ue.PROCESSING_COMPLETE],ut=function(e){return it.includes(e.status)},lt=function(e){return ot.includes(e.status)},st=function(e){return at.includes(e.status)},ct=function(e){return ue(e.options.server)&&(ue(e.options.server.process)||te(e.options.server.process))},ft=function(e){return{GET_STATUS:function(){var t=et(e.items),n=tt.EMPTY,r=tt.ERROR,i=tt.BUSY,o=tt.IDLE,a=tt.READY;return 0===t.length?n:t.some(ut)?r:t.some(lt)?i:t.some(st)?a:o},GET_ITEM:function(t){return Je(e.items,t)},GET_ACTIVE_ITEM:function(t){return Je(et(e.items),t)},GET_ACTIVE_ITEMS:function(){return et(e.items)},GET_ITEMS:function(){return e.items},GET_ITEM_NAME:function(t){var n=Je(e.items,t);return n?n.filename:null},GET_ITEM_SIZE:function(t){var n=Je(e.items,t);return n?n.fileSize:null},GET_STYLES:function(){return Object.keys(e.options).filter((function(e){return/^style/.test(e)})).map((function(t){return{name:t,value:e.options[t]}}))},GET_PANEL_ASPECT_RATIO:function(){return/circle/.test(e.options.stylePanelLayout)?1:$e(e.options.stylePanelAspectRatio)},GET_ITEM_PANEL_ASPECT_RATIO:function(){return e.options.styleItemPanelAspectRatio},GET_ITEMS_BY_STATUS:function(t){return et(e.items).filter((function(e){return e.status===t}))},GET_TOTAL_ITEMS:function(){return et(e.items).length},SHOULD_UPDATE_FILE_INPUT:function(){return e.options.storeAsFile&&rt()&&!ct(e)},IS_ASYNC:function(){return ct(e)},GET_FILE_SIZE_LABELS:function(e){return{labelBytes:e("GET_LABEL_FILE_SIZE_BYTES")||void 0,labelKilobytes:e("GET_LABEL_FILE_SIZE_KILOBYTES")||void 0,labelMegabytes:e("GET_LABEL_FILE_SIZE_MEGABYTES")||void 0,labelGigabytes:e("GET_LABEL_FILE_SIZE_GIGABYTES")||void 0}}}},dt=function(e){var t=et(e.items).length;if(!e.options.allowMultiple)return 0===t;var n=e.options.maxFiles;return null===n||t<n},pt=function(e,t,n){return Math.max(Math.min(n,e),t)},Et=function(e,t,n){return e.splice(t,0,n)},ht=function(e,t,n){return z(t)?null:void 0===n?(e.push(t),t):(n=pt(n,0,e.length),Et(e,n,t),t)},_t=function(e){return/^\s*data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s]*)\s*$/i.test(e)},mt=function(e){return(""+e).split("/").pop().split("?").shift()},gt=function(e){return e.split(".").pop()},It=function(e){if("string"!=typeof e)return"";var t=e.split("/").pop();return/svg/.test(t)?"svg":/zip|compressed/.test(t)?"zip":/plain/.test(t)?"txt":/msword/.test(t)?"doc":/[a-z]+/.test(t)?"jpeg"===t?"jpg":t:""},Tt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(t+e).slice(-t.length)},vt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return e.getFullYear()+"-"+Tt(e.getMonth()+1,"00")+"-"+Tt(e.getDate(),"00")+"_"+Tt(e.getHours(),"00")+"-"+Tt(e.getMinutes(),"00")+"-"+Tt(e.getSeconds(),"00")},yt=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i="string"==typeof n?e.slice(0,e.size,n):e.slice(0,e.size,e.type);return i.lastModifiedDate=new Date,e._relativePath&&(i._relativePath=e._relativePath),Z(t)||(t=vt()),t&&null===r&&gt(t)?i.name=t:(r=r||It(i.type),i.name=t+(r?"."+r:"")),i},Rt=function(){return window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder},Ot=function(e,t){var n=Rt();if(n){var r=new n;return r.append(e),r.getBlob(t)}return new Blob([e],{type:t})},At=function(e,t){for(var n=new ArrayBuffer(e.length),r=new Uint8Array(n),i=0;i<e.length;i++)r[i]=e.charCodeAt(i);return Ot(n,t)},wt=function(e){return(/^data:(.+);/.exec(e)||[])[1]||null},St=function(e){return e.split(",")[1].replace(/\s/g,"")},Dt=function(e){return atob(St(e))},Mt=function(e){var t=wt(e),n=Dt(e);return At(n,t)},Lt=function(e,t,n){return yt(Mt(e),t,null,n)},bt=function(e){if(!/^content-disposition:/i.test(e))return null;var t=e.split(/filename=|filename\*=.+''/).splice(1).map((function(e){return e.trim().replace(/^["']|[;"']{0,2}$/g,"")})).filter((function(e){return e.length}));return t.length?decodeURI(t[t.length-1]):null},Pt=function(e){if(/content-length:/i.test(e)){var t=e.match(/[0-9]+/)[0];return t?parseInt(t,10):null}return null},Gt=function(e){return/x-content-transfer-id:/i.test(e)&&(e.split(":")[1]||"").trim()||null},Nt=function(e){var t={source:null,name:null,size:null},n=e.split("\n"),r=!0,i=!1,o=void 0;try{for(var a,u=n[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var l=a.value,s=bt(l);if(s)t.name=s;else{var c=Pt(l);if(c)t.size=c;else{var f=Gt(l);f&&(t.source=f)}}}}catch(e){i=!0,o=e}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return t},Ct=function(e){var t={source:null,complete:!1,progress:0,size:null,timestamp:null,duration:0,request:null},n=function(){return t.progress},r=function(){t.request&&t.request.abort&&t.request.abort()},i=function(){var e=t.source;a.fire("init",e),e instanceof File?a.fire("load",e):e instanceof Blob?a.fire("load",yt(e,e.name)):_t(e)?a.fire("load",Lt(e)):o(e)},o=function(n){e?(t.timestamp=Date.now(),t.request=e(n,(function(e){t.duration=Date.now()-t.timestamp,t.complete=!0,e instanceof Blob&&(e=yt(e,e.name||mt(n))),a.fire("load",e instanceof Blob?e:e?e.body:null)}),(function(e){a.fire("error","string"==typeof e?{type:"error",code:0,body:e}:e)}),(function(e,n,r){r&&(t.size=r),t.duration=Date.now()-t.timestamp,e?(t.progress=n/r,a.fire("progress",t.progress)):t.progress=null}),(function(){a.fire("abort")}),(function(e){var n=Nt("string"==typeof e?e:e.headers);a.fire("meta",{size:t.size||n.size,filename:n.name,source:n.source})}))):a.fire("error",{type:"error",body:"Can't load URL",code:400})},a=Object.assign({},Ge(),{setSource:function(e){return t.source=e},getProgress:n,abort:r,load:i});return a},xt=function(e){return/GET|HEAD/.test(e)},Ft=function(e,t,n){var r={onheaders:function(){},onprogress:function(){},onload:function(){},ontimeout:function(){},onerror:function(){},onabort:function(){},abort:function(){i=!0,a.abort()}},i=!1,o=!1;n=Object.assign({method:"POST",headers:{},withCredentials:!1},n),t=encodeURI(t),xt(n.method)&&e&&(t=""+t+encodeURIComponent("string"==typeof e?e:JSON.stringify(e)));var a=new XMLHttpRequest;return(xt(n.method)?a:a.upload).onprogress=function(e){i||r.onprogress(e.lengthComputable,e.loaded,e.total)},a.onreadystatechange=function(){a.readyState<2||4===a.readyState&&0===a.status||o||(o=!0,r.onheaders(a))},a.onload=function(){a.status>=200&&a.status<300?r.onload(a):r.onerror(a)},a.onerror=function(){return r.onerror(a)},a.onabort=function(){i=!0,r.onabort()},a.ontimeout=function(){return r.ontimeout(a)},a.open(n.method,t,!0),$(n.timeout)&&(a.timeout=n.timeout),Object.keys(n.headers).forEach((function(e){var t=unescape(encodeURIComponent(n.headers[e]));a.setRequestHeader(e,t)})),n.responseType&&(a.responseType=n.responseType),n.withCredentials&&(a.withCredentials=!0),a.send(e),r},Ut=function(e,t,n,r){return{type:e,code:t,body:n,headers:r}},Bt=function(e){return function(t){e(Ut("error",0,"Timeout",t.getAllResponseHeaders()))}},Vt=function(e){return/\?/.test(e)},qt=function(){for(var e="",t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){e+=Vt(e)&&Vt(t)?t.replace(/\?/,"&"):t})),e},kt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if("function"==typeof t)return t;if(!t||!Z(t.url))return null;var n=t.onload||function(e){return e},r=t.onerror||function(e){return null};return function(i,o,a,u,l,s){var c=Ft(i,qt(e,t.url),Object.assign({},t,{responseType:"blob"}));return c.onload=function(e){var r=e.getAllResponseHeaders(),a=Nt(r).name||mt(i);o(Ut("load",e.status,"HEAD"===t.method?null:yt(n(e.response),a),r))},c.onerror=function(e){a(Ut("error",e.status,r(e.response)||e.statusText,e.getAllResponseHeaders()))},c.onheaders=function(e){s(Ut("headers",e.status,null,e.getAllResponseHeaders()))},c.ontimeout=Bt(a),c.onprogress=u,c.onabort=l,c}},zt={QUEUED:0,COMPLETE:1,PROCESSING:2,ERROR:3,WAITING:4},Wt=function(e,t,n,r,i,o,a,u,l,s,c){for(var f=[],d=c.chunkTransferId,p=c.chunkServer,E=c.chunkSize,h=c.chunkRetryDelays,_={serverId:d,aborted:!1},m=t.ondata||function(e){return e},g=t.onload||function(e,t){return"HEAD"===t?e.getResponseHeader("Upload-Offset"):e.response},I=t.onerror||function(e){return null},T=function(o){var u=new FormData;ue(i)&&u.append(n,JSON.stringify(i));var l="function"==typeof t.headers?t.headers(r,i):Object.assign({},t.headers,{"Upload-Length":r.size}),s=Object.assign({},t,{headers:l}),c=Ft(m(u),qt(e,t.url),s);c.onload=function(e){return o(g(e,s.method))},c.onerror=function(e){return a(Ut("error",e.status,I(e.response)||e.statusText,e.getAllResponseHeaders()))},c.ontimeout=Bt(a)},v=function(n){var r=qt(e,p.url,_.serverId),i={headers:"function"==typeof t.headers?t.headers(_.serverId):Object.assign({},t.headers),method:"HEAD"},o=Ft(null,r,i);o.onload=function(e){return n(g(e,i.method))},o.onerror=function(e){return a(Ut("error",e.status,I(e.response)||e.statusText,e.getAllResponseHeaders()))},o.ontimeout=Bt(a)},y=Math.floor(r.size/E),R=0;R<=y;R++){var O=R*E,A=r.slice(O,O+E,"application/offset+octet-stream");f[R]={index:R,size:A.size,offset:O,data:A,file:r,progress:0,retries:Se(h),status:zt.QUEUED,error:null,request:null,timeout:null}}var w=function(){return o(_.serverId)},S=function(e){return e.status===zt.QUEUED||e.status===zt.ERROR},D=function(t){if(!_.aborted)if(t=t||f.find(S)){t.status=zt.PROCESSING,t.progress=null;var n=p.ondata||function(e){return e},i=p.onerror||function(e){return null},o=qt(e,p.url,_.serverId),u="function"==typeof p.headers?p.headers(t):Object.assign({},p.headers,{"Content-Type":"application/offset+octet-stream","Upload-Offset":t.offset,"Upload-Length":r.size,"Upload-Name":r.name}),s=t.request=Ft(n(t.data),o,Object.assign({},p,{headers:u}));s.onload=function(){t.status=zt.COMPLETE,t.request=null,b()},s.onprogress=function(e,n,r){t.progress=e?n:null,L()},s.onerror=function(e){t.status=zt.ERROR,t.request=null,t.error=i(e.response)||e.statusText,M(t)||a(Ut("error",e.status,i(e.response)||e.statusText,e.getAllResponseHeaders()))},s.ontimeout=function(e){t.status=zt.ERROR,t.request=null,M(t)||Bt(a)(e)},s.onabort=function(){t.status=zt.QUEUED,t.request=null,l()}}else f.every((function(e){return e.status===zt.COMPLETE}))&&w()},M=function(e){return 0!==e.retries.length&&(e.status=zt.WAITING,clearTimeout(e.timeout),e.timeout=setTimeout((function(){D(e)}),e.retries.shift()),!0)},L=function(){var e=f.reduce((function(e,t){return null===e||null===t.progress?null:e+t.progress}),0);if(null===e)return u(!1,0,0);var t=f.reduce((function(e,t){return e+t.size}),0);u(!0,e,t)},b=function(){f.filter((function(e){return e.status===zt.PROCESSING})).length>=1||D()},P=function(){f.forEach((function(e){clearTimeout(e.timeout),e.request&&e.request.abort()}))};return _.serverId?v((function(e){_.aborted||(f.filter((function(t){return t.offset<e})).forEach((function(e){e.status=zt.COMPLETE,e.progress=e.size})),b())})):T((function(e){_.aborted||(s(e),_.serverId=e,b())})),{abort:function(){_.aborted=!0,P()}}},Yt=function(e,t,n,r){return function(i,o,a,u,l,s,c){if(i){var f=r.chunkUploads,d=f&&i.size>r.chunkSize,p=f&&(d||r.chunkForce);if(i instanceof Blob&&p)return Wt(e,t,n,i,o,a,u,l,s,c,r);var E=t.ondata||function(e){return e},h=t.onload||function(e){return e},_=t.onerror||function(e){return null},m="function"==typeof t.headers?t.headers(i,o)||{}:Object.assign({},t.headers),g=Object.assign({},t,{headers:m}),I=new FormData;ue(o)&&I.append(n,JSON.stringify(o)),(i instanceof Blob?[{name:null,file:i}]:i).forEach((function(e){I.append(n,e.file,null===e.name?e.file.name:""+e.name+e.file.name)}));var T=Ft(E(I),qt(e,t.url),g);return T.onload=function(e){a(Ut("load",e.status,h(e.response),e.getAllResponseHeaders()))},T.onerror=function(e){u(Ut("error",e.status,_(e.response)||e.statusText,e.getAllResponseHeaders()))},T.ontimeout=Bt(u),T.onprogress=l,T.onabort=s,T}}},jt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;return"function"==typeof t?function(){for(var e=arguments.length,i=new Array(e),o=0;o<e;o++)i[o]=arguments[o];return t.apply(void 0,[n].concat(i,[r]))}:t&&Z(t.url)?Yt(e,t,n,r):null},Ht=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if("function"==typeof t)return t;if(!t||!Z(t.url))return function(e,t){return t()};var n=t.onload||function(e){return e},r=t.onerror||function(e){return null};return function(i,o,a){var u=Ft(i,e+t.url,t);return u.onload=function(e){o(Ut("load",e.status,n(e.response),e.getAllResponseHeaders()))},u.onerror=function(e){a(Ut("error",e.status,r(e.response)||e.statusText,e.getAllResponseHeaders()))},u.ontimeout=Bt(a),u}},Xt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e+Math.random()*(t-e)},Zt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:25,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:250,i=null,o=Date.now();return t>0&&function a(){var u=Date.now()-o,l=Xt(n,r);u+l>t&&(l=u+l-t);var s=u/t;s>=1||document.hidden?e(1):(e(s),i=setTimeout(a,l))}(),{clear:function(){clearTimeout(i)}}},Qt=function(e,t){var n={complete:!1,perceivedProgress:0,perceivedPerformanceUpdater:null,progress:null,timestamp:null,perceivedDuration:0,duration:0,request:null,response:null},r=t.allowMinimumUploadDuration,i=function(t,i){var o=function(){0!==n.duration&&null!==n.progress&&s.fire("progress",s.getProgress())},a=function(){n.complete=!0,s.fire("load-perceived",n.response.body)};s.fire("start"),n.timestamp=Date.now(),n.perceivedPerformanceUpdater=Zt((function(e){n.perceivedProgress=e,n.perceivedDuration=Date.now()-n.timestamp,o(),n.response&&1===n.perceivedProgress&&!n.complete&&a()}),r?Xt(750,1500):0),n.request=e(t,i,(function(e){n.response=ue(e)?e:{type:"load",code:200,body:""+e,headers:{}},n.duration=Date.now()-n.timestamp,n.progress=1,s.fire("load",n.response.body),(!r||r&&1===n.perceivedProgress)&&a()}),(function(e){n.perceivedPerformanceUpdater.clear(),s.fire("error",ue(e)?e:{type:"error",code:0,body:""+e})}),(function(e,t,r){n.duration=Date.now()-n.timestamp,n.progress=e?t/r:null,o()}),(function(){n.perceivedPerformanceUpdater.clear(),s.fire("abort",n.response?n.response.body:null)}),(function(e){s.fire("transfer",e)}))},o=function(){n.request&&(n.perceivedPerformanceUpdater.clear(),n.request.abort&&n.request.abort(),n.complete=!0)},a=function(){o(),n.complete=!1,n.perceivedProgress=0,n.progress=0,n.timestamp=null,n.perceivedDuration=0,n.duration=0,n.request=null,n.response=null},u=r?function(){return n.progress?Math.min(n.progress,n.perceivedProgress):null}:function(){return n.progress||null},l=r?function(){return Math.min(n.duration,n.perceivedDuration)}:function(){return n.duration},s=Object.assign({},Ge(),{process:i,abort:o,getProgress:u,getDuration:l,reset:a});return s},Kt=function(e){return e.substring(0,e.lastIndexOf("."))||e},Jt=function(e){var t=[e.name,e.size,e.type];return e instanceof Blob||_t(e)?t[0]=e.name||vt():_t(e)?(t[1]=e.length,t[2]=wt(e)):Z(e)&&(t[0]=mt(e),t[1]=0,t[2]="application/octet-stream"),{name:t[0],size:t[1],type:t[2]}},$t=function(e){return!!(e instanceof File||e instanceof Blob&&e.name)},en=function e(t){if(!ue(t))return t;var n=k(t)?[]:{};for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];n[r]=i&&ue(i)?e(i):i}return n},tn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=ye(),i={archived:!1,frozen:!1,released:!1,source:null,file:n,serverFileReference:t,transferId:null,processingAborted:!1,status:t?Ue.PROCESSING_COMPLETE:Ue.INIT,activeLoader:null,activeProcessor:null},a=null,u={},l=function(e){return i.status=e},s=function(e){if(!i.released&&!i.frozen){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];R.fire.apply(R,[e].concat(n))}},c=function(){return gt(i.file.name)},f=function(){return i.file.type},d=function(){return i.file.size},p=function(){return i.file},E=function(t,n,r){i.source=t,R.fireSync("init"),i.file?R.fireSync("load-skip"):(i.file=Jt(t),n.on("init",(function(){s("load-init")})),n.on("meta",(function(t){i.file.size=t.size,i.file.filename=t.filename,t.source&&(e=Be.LIMBO,i.serverFileReference=t.source,i.status=Ue.PROCESSING_COMPLETE),s("load-meta")})),n.on("progress",(function(e){l(Ue.LOADING),s("load-progress",e)})),n.on("error",(function(e){l(Ue.LOAD_ERROR),s("load-request-error",e)})),n.on("abort",(function(){l(Ue.INIT),s("load-abort")})),n.on("load",(function(t){i.activeLoader=null;var n=function(t){i.file=$t(t)?t:i.file,e===Be.LIMBO&&i.serverFileReference?l(Ue.PROCESSING_COMPLETE):l(Ue.IDLE),s("load")},o=function(e){i.file=t,s("load-meta"),l(Ue.LOAD_ERROR),s("load-file-error",e)};i.serverFileReference?n(t):r(t,n,o)})),n.setSource(t),i.activeLoader=n,n.load())},h=function(){i.activeLoader&&i.activeLoader.load()},_=function(){i.activeLoader?i.activeLoader.abort():(l(Ue.INIT),s("load-abort"))},m=function e(t,n){if(i.processingAborted)i.processingAborted=!1;else if(l(Ue.PROCESSING),a=null,i.file instanceof Blob){t.on("load",(function(e){i.transferId=null,i.serverFileReference=e})),t.on("transfer",(function(e){i.transferId=e})),t.on("load-perceived",(function(e){i.activeProcessor=null,i.transferId=null,i.serverFileReference=e,l(Ue.PROCESSING_COMPLETE),s("process-complete",e)})),t.on("start",(function(){s("process-start")})),t.on("error",(function(e){i.activeProcessor=null,l(Ue.PROCESSING_ERROR),s("process-error",e)})),t.on("abort",(function(e){i.activeProcessor=null,i.serverFileReference=e,l(Ue.IDLE),s("process-abort"),a&&a()})),t.on("progress",(function(e){s("process-progress",e)}));var r=function(e){i.archived||t.process(e,Object.assign({},u))},o=console.error;n(i.file,r,o),i.activeProcessor=t}else R.on("load",(function(){e(t,n)}))},g=function(){i.processingAborted=!1,l(Ue.PROCESSING_QUEUED)},I=function(){return new Promise((function(e){if(!i.activeProcessor)return i.processingAborted=!0,l(Ue.IDLE),s("process-abort"),void e();a=function(){e()},i.activeProcessor.abort()}))},T=function(e,t){return new Promise((function(n,r){var o=null!==i.serverFileReference?i.serverFileReference:i.transferId;null!==o?(e(o,(function(){i.serverFileReference=null,i.transferId=null,n()}),(function(e){t?(l(Ue.PROCESSING_REVERT_ERROR),s("process-revert-error"),r(e)):n()})),l(Ue.IDLE),s("process-revert")):n()}))},v=function(e,t,n){var r=e.split("."),i=r[0],o=r.pop(),a=u;r.forEach((function(e){return a=a[e]})),JSON.stringify(a[o])!==JSON.stringify(t)&&(a[o]=t,s("metadata-update",{key:i,value:u[i],silent:n}))},y=function(e){return en(e?u[e]:u)},R=Object.assign({id:{get:function(){return r}},origin:{get:function(){return e},set:function(t){return e=t}},serverId:{get:function(){return i.serverFileReference}},transferId:{get:function(){return i.transferId}},status:{get:function(){return i.status}},filename:{get:function(){return i.file.name}},filenameWithoutExtension:{get:function(){return Kt(i.file.name)}},fileExtension:{get:c},fileType:{get:f},fileSize:{get:d},file:{get:p},relativePath:{get:function(){return i.file._relativePath}},source:{get:function(){return i.source}},getMetadata:y,setMetadata:function(e,t,n){if(ue(e)){var r=e;return Object.keys(r).forEach((function(e){v(e,r[e],t)})),e}return v(e,t,n),t},extend:function(e,t){return O[e]=t},abortLoad:_,retryLoad:h,requestProcessing:g,abortProcessing:I,load:E,process:m,revert:T},Ge(),{freeze:function(){return i.frozen=!0},release:function(){return i.released=!0},released:{get:function(){return i.released}},archive:function(){return i.archived=!0},archived:{get:function(){return i.archived}},setFile:function(e){return i.file=e}}),O=o(R);return O},nn=function(e,t){return z(t)?0:Z(t)?e.findIndex((function(e){return e.id===t})):-1},rn=function(e,t){var n=nn(e,t);if(!(n<0))return e[n]||null},on=function(e,t,n,r,i,o){var a=Ft(null,e,{method:"GET",responseType:"blob"});return a.onload=function(n){var r=n.getAllResponseHeaders(),i=Nt(r).name||mt(e);t(Ut("load",n.status,yt(n.response,i),r))},a.onerror=function(e){n(Ut("error",e.status,e.statusText,e.getAllResponseHeaders()))},a.onheaders=function(e){o(Ut("headers",e.status,null,e.getAllResponseHeaders()))},a.ontimeout=Bt(n),a.onprogress=r,a.onabort=i,a},an=function(e){return 0===e.indexOf("//")&&(e=location.protocol+e),e.toLowerCase().replace("blob:","").replace(/([a-z])?:\/\//,"$1").split("/")[0]},un=function(e){return(e.indexOf(":")>-1||e.indexOf("//")>-1)&&an(location.href)!==an(e)},ln=function(e){return function(){return te(e)?e.apply(void 0,arguments):e}},sn=function(e){return!$t(e.file)},cn=function(e,t){clearTimeout(t.listUpdateTimeout),t.listUpdateTimeout=setTimeout((function(){e("DID_UPDATE_ITEMS",{items:et(t.items)})}),0)},fn=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new Promise((function(t){if(!e)return t(!0);var r=e.apply(void 0,n);return null==r?t(!0):"boolean"==typeof r?t(r):void("function"==typeof r.then&&r.then(t))}))},dn=function(e,t){e.items.sort((function(e,n){return t(xe(e),xe(n))}))},pn=function(e,t){return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.query,i=n.success,o=void 0===i?function(){}:i,a=n.failure,u=void 0===a?function(){}:a,l=we(n,["query","success","failure"]),s=Je(e.items,r);s?t(s,o,u,l||{}):u({error:Ut("error",0,"Item not found"),file:null})}},En=function(e,t,n){return{ABORT_ALL:function(){et(n.items).forEach((function(e){e.freeze(),e.abortLoad(),e.abortProcessing()}))},DID_SET_FILES:function(t){var r=t.value,i=(void 0===r?[]:r).map((function(e){return{source:e.source?e.source:e,options:e.options}})),o=et(n.items);o.forEach((function(t){i.find((function(e){return e.source===t.source||e.source===t.file}))||e("REMOVE_ITEM",{query:t,remove:!1})})),o=et(n.items),i.forEach((function(t,n){o.find((function(e){return e.source===t.source||e.file===t.source}))||e("ADD_ITEM",Object.assign({},t,{interactionMethod:ve.NONE,index:n}))}))},DID_UPDATE_ITEM_METADATA:function(r){var i=r.id,o=r.action,a=r.change;a.silent||(clearTimeout(n.itemUpdateTimeout),n.itemUpdateTimeout=setTimeout((function(){var r=rn(n.items,i);if(t("IS_ASYNC")){r.origin===Be.LOCAL&&e("DID_LOAD_ITEM",{id:r.id,error:null,serverFileReference:r.source});var u=function(){setTimeout((function(){e("REQUEST_ITEM_PROCESSING",{query:i})}),32)},l=function(e){r.revert(Ht(n.options.server.url,n.options.server.revert),t("GET_FORCE_REVERT")).then(e?u:function(){}).catch((function(){}))},s=function(e){r.abortProcessing().then(e?u:function(){})};return r.status===Ue.PROCESSING_COMPLETE?l(n.options.instantUpload):r.status===Ue.PROCESSING?s(n.options.instantUpload):void(n.options.instantUpload&&u())}Ye("SHOULD_PREPARE_OUTPUT",!1,{item:r,query:t,action:o,change:a}).then((function(n){var o=t("GET_BEFORE_PREPARE_FILE");o&&(n=o(r,n)),n&&e("REQUEST_PREPARE_OUTPUT",{query:i,item:r,success:function(t){e("DID_PREPARE_OUTPUT",{id:i,file:t})}},!0)}))}),0))},MOVE_ITEM:function(e){var t=e.query,r=e.index,i=Je(n.items,t);if(i){var o=n.items.indexOf(i);o!==(r=pt(r,0,n.items.length-1))&&n.items.splice(r,0,n.items.splice(o,1)[0])}},SORT:function(r){var i=r.compare;dn(n,i),e("DID_SORT_ITEMS",{items:t("GET_ACTIVE_ITEMS")})},ADD_ITEMS:function(n){var r=n.items,i=n.index,o=n.interactionMethod,a=n.success,u=void 0===a?function(){}:a,l=n.failure,s=void 0===l?function(){}:l,c=i;if(-1===i||void 0===i){var f=t("GET_ITEM_INSERT_LOCATION"),d=t("GET_TOTAL_ITEMS");c="before"===f?0:d}var p=t("GET_IGNORED_FILES"),E=function(e){return $t(e)?!p.includes(e.name.toLowerCase()):!z(e)},h=r.filter(E).map((function(t){return new Promise((function(n,r){e("ADD_ITEM",{interactionMethod:o,source:t.source||t,success:n,failure:r,index:c++,options:t.options||{}})}))}));Promise.all(h).then(u).catch(s)},ADD_ITEM:function(r){var i=r.source,o=r.index,a=void 0===o?-1:o,u=r.interactionMethod,l=r.success,s=void 0===l?function(){}:l,c=r.failure,f=void 0===c?function(){}:c,d=r.options,p=void 0===d?{}:d;if(z(i))f({error:Ut("error",0,"No source"),file:null});else if(!$t(i)||!n.options.ignoredFiles.includes(i.name.toLowerCase())){if(!dt(n)){if(n.options.allowMultiple||!n.options.allowMultiple&&!n.options.allowReplace){var E=Ut("warning",0,"Max files");return e("DID_THROW_MAX_FILES",{source:i,error:E}),void f({error:E,file:null})}var h=et(n.items)[0];if(h.status===Ue.PROCESSING_COMPLETE||h.status===Ue.PROCESSING_REVERT_ERROR){var _=t("GET_FORCE_REVERT");if(h.revert(Ht(n.options.server.url,n.options.server.revert),_).then((function(){_&&e("ADD_ITEM",{source:i,index:a,interactionMethod:u,success:s,failure:f,options:p})})).catch((function(){})),_)return}e("REMOVE_ITEM",{query:h.id})}var m="local"===p.type?Be.LOCAL:"limbo"===p.type?Be.LIMBO:Be.INPUT,g=tn(m,m===Be.INPUT?null:i,p.file);Object.keys(p.metadata||{}).forEach((function(e){g.setMetadata(e,p.metadata[e])})),je("DID_CREATE_ITEM",g,{query:t,dispatch:e});var I=t("GET_ITEM_INSERT_LOCATION");n.options.itemInsertLocationFreedom||(a="before"===I?-1:n.items.length),ht(n.items,g,a),te(I)&&i&&dn(n,I);var T=g.id;g.on("init",(function(){e("DID_INIT_ITEM",{id:T})})),g.on("load-init",(function(){e("DID_START_ITEM_LOAD",{id:T})})),g.on("load-meta",(function(){e("DID_UPDATE_ITEM_META",{id:T})})),g.on("load-progress",(function(t){e("DID_UPDATE_ITEM_LOAD_PROGRESS",{id:T,progress:t})})),g.on("load-request-error",(function(t){var r=ln(n.options.labelFileLoadError)(t);if(t.code>=400&&t.code<500)return e("DID_THROW_ITEM_INVALID",{id:T,error:t,status:{main:r,sub:t.code+" ("+t.body+")"}}),void f({error:t,file:xe(g)});e("DID_THROW_ITEM_LOAD_ERROR",{id:T,error:t,status:{main:r,sub:n.options.labelTapToRetry}})})),g.on("load-file-error",(function(t){e("DID_THROW_ITEM_INVALID",{id:T,error:t.status,status:t.status}),f({error:t.status,file:xe(g)})})),g.on("load-abort",(function(){e("REMOVE_ITEM",{query:T})})),g.on("load-skip",(function(){g.on("metadata-update",(function(t){$t(g.file)&&e("DID_UPDATE_ITEM_METADATA",{id:T,change:t})})),e("COMPLETE_LOAD_ITEM",{query:T,item:g,data:{source:i,success:s}})})),g.on("load",(function(){var r=function(r){r?(g.on("metadata-update",(function(t){e("DID_UPDATE_ITEM_METADATA",{id:T,change:t})})),Ye("SHOULD_PREPARE_OUTPUT",!1,{item:g,query:t}).then((function(r){var o=t("GET_BEFORE_PREPARE_FILE");o&&(r=o(g,r));var a=function(){e("COMPLETE_LOAD_ITEM",{query:T,item:g,data:{source:i,success:s}}),cn(e,n)};r?e("REQUEST_PREPARE_OUTPUT",{query:T,item:g,success:function(t){e("DID_PREPARE_OUTPUT",{id:T,file:t}),a()}},!0):a()}))):e("REMOVE_ITEM",{query:T})};Ye("DID_LOAD_ITEM",g,{query:t,dispatch:e}).then((function(){fn(t("GET_BEFORE_ADD_FILE"),xe(g)).then(r)})).catch((function(t){if(!t||!t.error||!t.status)return r(!1);e("DID_THROW_ITEM_INVALID",{id:T,error:t.error,status:t.status})}))})),g.on("process-start",(function(){e("DID_START_ITEM_PROCESSING",{id:T})})),g.on("process-progress",(function(t){e("DID_UPDATE_ITEM_PROCESS_PROGRESS",{id:T,progress:t})})),g.on("process-error",(function(t){e("DID_THROW_ITEM_PROCESSING_ERROR",{id:T,error:t,status:{main:ln(n.options.labelFileProcessingError)(t),sub:n.options.labelTapToRetry}})})),g.on("process-revert-error",(function(t){e("DID_THROW_ITEM_PROCESSING_REVERT_ERROR",{id:T,error:t,status:{main:ln(n.options.labelFileProcessingRevertError)(t),sub:n.options.labelTapToRetry}})})),g.on("process-complete",(function(t){e("DID_COMPLETE_ITEM_PROCESSING",{id:T,error:null,serverFileReference:t}),e("DID_DEFINE_VALUE",{id:T,value:t})})),g.on("process-abort",(function(){e("DID_ABORT_ITEM_PROCESSING",{id:T})})),g.on("process-revert",(function(){e("DID_REVERT_ITEM_PROCESSING",{id:T}),e("DID_DEFINE_VALUE",{id:T,value:null})})),e("DID_ADD_ITEM",{id:T,index:a,interactionMethod:u}),cn(e,n);var v=n.options.server||{},y=v.url,R=v.load,O=v.restore,A=v.fetch;g.load(i,Ct(m===Be.INPUT?Z(i)&&un(i)&&A?kt(y,A):on:m===Be.LIMBO?kt(y,O):kt(y,R)),(function(e,n,r){Ye("LOAD_FILE",e,{query:t}).then(n).catch(r)}))}},REQUEST_PREPARE_OUTPUT:function(e){var n=e.item,r=e.success,i=e.failure,o=void 0===i?function(){}:i,a={error:Ut("error",0,"Item not found"),file:null};if(n.archived)return o(a);Ye("PREPARE_OUTPUT",n.file,{query:t,item:n}).then((function(e){Ye("COMPLETE_PREPARE_OUTPUT",e,{query:t,item:n}).then((function(e){if(n.archived)return o(a);r(e)}))}))},COMPLETE_LOAD_ITEM:function(r){var i=r.item,o=r.data,a=o.success,u=o.source,l=t("GET_ITEM_INSERT_LOCATION");if(te(l)&&u&&dn(n,l),e("DID_LOAD_ITEM",{id:i.id,error:null,serverFileReference:i.origin===Be.INPUT?null:u}),a(xe(i)),i.origin!==Be.LOCAL)return i.origin===Be.LIMBO?(e("DID_COMPLETE_ITEM_PROCESSING",{id:i.id,error:null,serverFileReference:u}),void e("DID_DEFINE_VALUE",{id:i.id,value:i.serverId||u})):void(t("IS_ASYNC")&&n.options.instantUpload&&e("REQUEST_ITEM_PROCESSING",{query:i.id}));e("DID_LOAD_LOCAL_ITEM",{id:i.id})},RETRY_ITEM_LOAD:pn(n,(function(e){e.retryLoad()})),REQUEST_ITEM_PREPARE:pn(n,(function(t,n,r){e("REQUEST_PREPARE_OUTPUT",{query:t.id,item:t,success:function(r){e("DID_PREPARE_OUTPUT",{id:t.id,file:r}),n({file:t,output:r})},failure:r},!0)})),REQUEST_ITEM_PROCESSING:pn(n,(function(r,i,o){if(r.status===Ue.IDLE||r.status===Ue.PROCESSING_ERROR)r.status!==Ue.PROCESSING_QUEUED&&(r.requestProcessing(),e("DID_REQUEST_ITEM_PROCESSING",{id:r.id}),e("PROCESS_ITEM",{query:r,success:i,failure:o},!0));else{var a=function(){return e("REQUEST_ITEM_PROCESSING",{query:r,success:i,failure:o})},u=function(){return document.hidden?a():setTimeout(a,32)};r.status===Ue.PROCESSING_COMPLETE||r.status===Ue.PROCESSING_REVERT_ERROR?r.revert(Ht(n.options.server.url,n.options.server.revert),t("GET_FORCE_REVERT")).then(u).catch((function(){})):r.status===Ue.PROCESSING&&r.abortProcessing().then(u)}})),PROCESS_ITEM:pn(n,(function(r,i,o){var a=t("GET_MAX_PARALLEL_UPLOADS");if(t("GET_ITEMS_BY_STATUS",Ue.PROCESSING).length!==a){if(r.status!==Ue.PROCESSING){var u=function t(){var r=n.processingQueue.shift();if(r){var i=r.id,o=r.success,a=r.failure,u=Je(n.items,i);u&&!u.archived?e("PROCESS_ITEM",{query:i,success:o,failure:a},!0):t()}};r.onOnce("process-complete",(function(){i(xe(r)),u();var o=n.options.server;if(n.options.instantUpload&&r.origin===Be.LOCAL&&te(o.remove)){var a=function(){};r.origin=Be.LIMBO,n.options.server.remove(r.source,a,a)}t("GET_ITEMS_BY_STATUS",Ue.PROCESSING_COMPLETE).length===n.items.length&&e("DID_COMPLETE_ITEM_PROCESSING_ALL")})),r.onOnce("process-error",(function(e){o({error:e,file:xe(r)}),u()}));var l=n.options;r.process(Qt(jt(l.server.url,l.server.process,l.name,{chunkTransferId:r.transferId,chunkServer:l.server.patch,chunkUploads:l.chunkUploads,chunkForce:l.chunkForce,chunkSize:l.chunkSize,chunkRetryDelays:l.chunkRetryDelays}),{allowMinimumUploadDuration:t("GET_ALLOW_MINIMUM_UPLOAD_DURATION")}),(function(n,i,o){Ye("PREPARE_OUTPUT",n,{query:t,item:r}).then((function(t){e("DID_PREPARE_OUTPUT",{id:r.id,file:t}),i(t)})).catch(o)}))}}else n.processingQueue.push({id:r.id,success:i,failure:o})})),RETRY_ITEM_PROCESSING:pn(n,(function(t){e("REQUEST_ITEM_PROCESSING",{query:t})})),REQUEST_REMOVE_ITEM:pn(n,(function(n){fn(t("GET_BEFORE_REMOVE_FILE"),xe(n)).then((function(t){t&&e("REMOVE_ITEM",{query:n})}))})),RELEASE_ITEM:pn(n,(function(e){e.release()})),REMOVE_ITEM:pn(n,(function(r,i,o,a){var u=function(){var t=r.id;rn(n.items,t).archive(),e("DID_REMOVE_ITEM",{error:null,id:t,item:r}),cn(e,n),i(xe(r))},l=n.options.server;r.origin===Be.LOCAL&&l&&te(l.remove)&&!1!==a.remove?(e("DID_START_ITEM_REMOVE",{id:r.id}),l.remove(r.source,(function(){return u()}),(function(t){e("DID_THROW_ITEM_REMOVE_ERROR",{id:r.id,error:Ut("error",0,t,null),status:{main:ln(n.options.labelFileRemoveError)(t),sub:n.options.labelTapToRetry}})}))):((a.revert&&r.origin!==Be.LOCAL&&null!==r.serverId||n.options.chunkUploads&&r.file.size>n.options.chunkSize||n.options.chunkUploads&&n.options.chunkForce)&&r.revert(Ht(n.options.server.url,n.options.server.revert),t("GET_FORCE_REVERT")),u())})),ABORT_ITEM_LOAD:pn(n,(function(e){e.abortLoad()})),ABORT_ITEM_PROCESSING:pn(n,(function(t){t.serverId?e("REVERT_ITEM_PROCESSING",{id:t.id}):t.abortProcessing().then((function(){n.options.instantUpload&&e("REMOVE_ITEM",{query:t.id})}))})),REQUEST_REVERT_ITEM_PROCESSING:pn(n,(function(r){if(n.options.instantUpload){var i=function(t){t&&e("REVERT_ITEM_PROCESSING",{query:r})},o=t("GET_BEFORE_REMOVE_FILE");if(!o)return i(!0);var a=o(xe(r));return null==a?i(!0):"boolean"==typeof a?i(a):void("function"==typeof a.then&&a.then(i))}e("REVERT_ITEM_PROCESSING",{query:r})})),REVERT_ITEM_PROCESSING:pn(n,(function(r){r.revert(Ht(n.options.server.url,n.options.server.revert),t("GET_FORCE_REVERT")).then((function(){(n.options.instantUpload||sn(r))&&e("REMOVE_ITEM",{query:r.id})})).catch((function(){}))})),SET_OPTIONS:function(t){var n=t.options,r=Object.keys(n),i=hn.filter((function(e){return r.includes(e)}));[].concat(Se(i),Se(Object.keys(n).filter((function(e){return!i.includes(e)})))).forEach((function(t){e("SET_"+me(t,"_").toUpperCase(),{value:n[t]})}))}}},hn=["server"],_n=function(e){return e},mn=function(e){return document.createElement(e)},gn=function(e,t){var n=e.childNodes[0];n?t!==n.nodeValue&&(n.nodeValue=t):(n=document.createTextNode(t),e.appendChild(n))},In=function(e,t,n,r){var i=(r%360-90)*Math.PI/180;return{x:e+n*Math.cos(i),y:t+n*Math.sin(i)}},Tn=function(e,t,n,r,i,o){var a=In(e,t,n,i),u=In(e,t,n,r);return["M",a.x,a.y,"A",n,n,0,o,0,u.x,u.y].join(" ")},vn=function(e,t,n,r,i){var o=1;return i>r&&i-r<=.5&&(o=0),r>i&&r-i>=.5&&(o=0),Tn(e,t,n,360*Math.min(.9999,r),360*Math.min(.9999,i),o)},yn=F({tag:"div",name:"progress-indicator",ignoreRectUpdate:!0,ignoreRect:!0,create:function(e){var t=e.root,n=e.props;n.spin=!1,n.progress=0,n.opacity=0;var r=c("svg");t.ref.path=c("path",{"stroke-width":2,"stroke-linecap":"round"}),r.appendChild(t.ref.path),t.ref.svg=r,t.appendChild(r)},write:function(e){var t=e.root,n=e.props;if(0!==n.opacity){n.align&&(t.element.dataset.align=n.align);var r=parseInt(a(t.ref.path,"stroke-width"),10),i=.5*t.rect.element.width,o=0,u=0;n.spin?(o=0,u=.5):(o=0,u=n.progress);var l=vn(i,i,i-r,o,u);a(t.ref.path,"d",l),a(t.ref.path,"stroke-opacity",n.spin||n.progress>0?1:0)}},mixins:{apis:["progress","spin","align"],styles:["opacity"],animations:{opacity:{type:"tween",duration:500},progress:{type:"spring",stiffness:.95,damping:.65,mass:10}}}}),Rn=F({tag:"button",attributes:{type:"button"},ignoreRect:!0,ignoreRectUpdate:!0,name:"file-action-button",mixins:{apis:["label"],styles:["translateX","translateY","scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",translateX:"spring",translateY:"spring",opacity:{type:"tween",duration:250}},listeners:!0},create:function(e){var t=e.root,n=e.props;t.element.innerHTML=(n.icon||"")+"<span>"+n.label+"</span>",n.isDisabled=!1},write:function(e){var t=e.root,n=e.props,r=n.isDisabled,i=t.query("GET_DISABLED")||0===n.opacity;i&&!r?(n.isDisabled=!0,a(t.element,"disabled","disabled")):!i&&r&&(n.isDisabled=!1,t.element.removeAttribute("disabled"))}}),On=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.labelBytes,o=void 0===i?"bytes":i,a=r.labelKilobytes,u=void 0===a?"KB":a,l=r.labelMegabytes,s=void 0===l?"MB":l,c=r.labelGigabytes,f=void 0===c?"GB":c,d=n,p=n*n,E=n*n*n;return(e=Math.round(Math.abs(e)))<d?e+" "+o:e<p?Math.floor(e/d)+" "+u:e<E?An(e/p,1,t)+" "+s:An(e/E,2,t)+" "+f},An=function(e,t,n){return e.toFixed(t).split(".").filter((function(e){return"0"!==e})).join(n)},wn=function(e){var t=e.root,n=e.props,r=mn("span");r.className="filepond--file-info-main",a(r,"aria-hidden","true"),t.appendChild(r),t.ref.fileName=r;var i=mn("span");i.className="filepond--file-info-sub",t.appendChild(i),t.ref.fileSize=i,gn(i,t.query("GET_LABEL_FILE_WAITING_FOR_SIZE")),gn(r,_n(t.query("GET_ITEM_NAME",n.id)))},Sn=function(e){var t=e.root,n=e.props;gn(t.ref.fileSize,On(t.query("GET_ITEM_SIZE",n.id),".",t.query("GET_FILE_SIZE_BASE"),t.query("GET_FILE_SIZE_LABELS",t.query))),gn(t.ref.fileName,_n(t.query("GET_ITEM_NAME",n.id)))},Dn=function(e){var t=e.root,n=e.props;$(t.query("GET_ITEM_SIZE",n.id))?Sn({root:t,props:n}):gn(t.ref.fileSize,t.query("GET_LABEL_FILE_SIZE_NOT_AVAILABLE"))},Mn=F({name:"file-info",ignoreRect:!0,ignoreRectUpdate:!0,write:B({DID_LOAD_ITEM:Sn,DID_UPDATE_ITEM_META:Sn,DID_THROW_ITEM_LOAD_ERROR:Dn,DID_THROW_ITEM_INVALID:Dn}),didCreateView:function(e){je("CREATE_VIEW",Object.assign({},e,{view:e}))},create:wn,mixins:{styles:["translateX","translateY"],animations:{translateX:"spring",translateY:"spring"}}}),Ln=function(e){return Math.round(100*e)},bn=function(e){var t=e.root,n=mn("span");n.className="filepond--file-status-main",t.appendChild(n),t.ref.main=n;var r=mn("span");r.className="filepond--file-status-sub",t.appendChild(r),t.ref.sub=r,Pn({root:t,action:{progress:null}})},Pn=function(e){var t=e.root,n=e.action,r=null===n.progress?t.query("GET_LABEL_FILE_LOADING"):t.query("GET_LABEL_FILE_LOADING")+" "+Ln(n.progress)+"%";gn(t.ref.main,r),gn(t.ref.sub,t.query("GET_LABEL_TAP_TO_CANCEL"))},Gn=function(e){var t=e.root;gn(t.ref.main,""),gn(t.ref.sub,"")},Nn=function(e){var t=e.root,n=e.action;gn(t.ref.main,n.status.main),gn(t.ref.sub,n.status.sub)},Cn=F({name:"file-status",ignoreRect:!0,ignoreRectUpdate:!0,write:B({DID_LOAD_ITEM:Gn,DID_REVERT_ITEM_PROCESSING:Gn,DID_REQUEST_ITEM_PROCESSING:function(e){var t=e.root;gn(t.ref.main,t.query("GET_LABEL_FILE_PROCESSING")),gn(t.ref.sub,t.query("GET_LABEL_TAP_TO_CANCEL"))},DID_ABORT_ITEM_PROCESSING:function(e){var t=e.root;gn(t.ref.main,t.query("GET_LABEL_FILE_PROCESSING_ABORTED")),gn(t.ref.sub,t.query("GET_LABEL_TAP_TO_RETRY"))},DID_COMPLETE_ITEM_PROCESSING:function(e){var t=e.root;gn(t.ref.main,t.query("GET_LABEL_FILE_PROCESSING_COMPLETE")),gn(t.ref.sub,t.query("GET_LABEL_TAP_TO_UNDO"))},DID_UPDATE_ITEM_PROCESS_PROGRESS:function(e){var t=e.root,n=e.action,r=null===n.progress?t.query("GET_LABEL_FILE_PROCESSING"):t.query("GET_LABEL_FILE_PROCESSING")+" "+Ln(n.progress)+"%";gn(t.ref.main,r),gn(t.ref.sub,t.query("GET_LABEL_TAP_TO_CANCEL"))},DID_UPDATE_ITEM_LOAD_PROGRESS:Pn,DID_THROW_ITEM_LOAD_ERROR:Nn,DID_THROW_ITEM_INVALID:Nn,DID_THROW_ITEM_PROCESSING_ERROR:Nn,DID_THROW_ITEM_PROCESSING_REVERT_ERROR:Nn,DID_THROW_ITEM_REMOVE_ERROR:Nn}),didCreateView:function(e){je("CREATE_VIEW",Object.assign({},e,{view:e}))},create:bn,mixins:{styles:["translateX","translateY","opacity"],animations:{opacity:{type:"tween",duration:250},translateX:"spring",translateY:"spring"}}}),xn={AbortItemLoad:{label:"GET_LABEL_BUTTON_ABORT_ITEM_LOAD",action:"ABORT_ITEM_LOAD",className:"filepond--action-abort-item-load",align:"LOAD_INDICATOR_POSITION"},RetryItemLoad:{label:"GET_LABEL_BUTTON_RETRY_ITEM_LOAD",action:"RETRY_ITEM_LOAD",icon:"GET_ICON_RETRY",className:"filepond--action-retry-item-load",align:"BUTTON_PROCESS_ITEM_POSITION"},RemoveItem:{label:"GET_LABEL_BUTTON_REMOVE_ITEM",action:"REQUEST_REMOVE_ITEM",icon:"GET_ICON_REMOVE",className:"filepond--action-remove-item",align:"BUTTON_REMOVE_ITEM_POSITION"},ProcessItem:{label:"GET_LABEL_BUTTON_PROCESS_ITEM",action:"REQUEST_ITEM_PROCESSING",icon:"GET_ICON_PROCESS",className:"filepond--action-process-item",align:"BUTTON_PROCESS_ITEM_POSITION"},AbortItemProcessing:{label:"GET_LABEL_BUTTON_ABORT_ITEM_PROCESSING",action:"ABORT_ITEM_PROCESSING",className:"filepond--action-abort-item-processing",align:"BUTTON_PROCESS_ITEM_POSITION"},RetryItemProcessing:{label:"GET_LABEL_BUTTON_RETRY_ITEM_PROCESSING",action:"RETRY_ITEM_PROCESSING",icon:"GET_ICON_RETRY",className:"filepond--action-retry-item-processing",align:"BUTTON_PROCESS_ITEM_POSITION"},RevertItemProcessing:{label:"GET_LABEL_BUTTON_UNDO_ITEM_PROCESSING",action:"REQUEST_REVERT_ITEM_PROCESSING",icon:"GET_ICON_UNDO",className:"filepond--action-revert-item-processing",align:"BUTTON_PROCESS_ITEM_POSITION"}},Fn=[];i(xn,(function(e){Fn.push(e)}));var Un,Bn=function(e){if("right"===zn(e))return 0;var t=e.ref.buttonRemoveItem.rect.element;return t.hidden?null:t.width+t.left},Vn=function(e){return e.ref.buttonAbortItemLoad.rect.element.width},qn=function(e){return Math.floor(e.ref.buttonRemoveItem.rect.element.height/4)},kn=function(e){return Math.floor(e.ref.buttonRemoveItem.rect.element.left/2)},zn=function(e){return e.query("GET_STYLE_BUTTON_REMOVE_ITEM_POSITION")},Wn={buttonAbortItemLoad:{opacity:0},buttonRetryItemLoad:{opacity:0},buttonRemoveItem:{opacity:0},buttonProcessItem:{opacity:0},buttonAbortItemProcessing:{opacity:0},buttonRetryItemProcessing:{opacity:0},buttonRevertItemProcessing:{opacity:0},loadProgressIndicator:{opacity:0,align:function(e){return e.query("GET_STYLE_LOAD_INDICATOR_POSITION")}},processProgressIndicator:{opacity:0,align:function(e){return e.query("GET_STYLE_PROGRESS_INDICATOR_POSITION")}},processingCompleteIndicator:{opacity:0,scaleX:.75,scaleY:.75},info:{translateX:0,translateY:0,opacity:0},status:{translateX:0,translateY:0,opacity:0}},Yn={buttonRemoveItem:{opacity:1},buttonProcessItem:{opacity:1},info:{translateX:Bn},status:{translateX:Bn}},jn={buttonAbortItemProcessing:{opacity:1},processProgressIndicator:{opacity:1},status:{opacity:1}},Hn={DID_THROW_ITEM_INVALID:{buttonRemoveItem:{opacity:1},info:{translateX:Bn},status:{translateX:Bn,opacity:1}},DID_START_ITEM_LOAD:{buttonAbortItemLoad:{opacity:1},loadProgressIndicator:{opacity:1},status:{opacity:1}},DID_THROW_ITEM_LOAD_ERROR:{buttonRetryItemLoad:{opacity:1},buttonRemoveItem:{opacity:1},info:{translateX:Bn},status:{opacity:1}},DID_START_ITEM_REMOVE:{processProgressIndicator:{opacity:1,align:zn},info:{translateX:Bn},status:{opacity:0}},DID_THROW_ITEM_REMOVE_ERROR:{processProgressIndicator:{opacity:0,align:zn},buttonRemoveItem:{opacity:1},info:{translateX:Bn},status:{opacity:1,translateX:Bn}},DID_LOAD_ITEM:Yn,DID_LOAD_LOCAL_ITEM:{buttonRemoveItem:{opacity:1},info:{translateX:Bn},status:{translateX:Bn}},DID_START_ITEM_PROCESSING:jn,DID_REQUEST_ITEM_PROCESSING:jn,DID_UPDATE_ITEM_PROCESS_PROGRESS:jn,DID_COMPLETE_ITEM_PROCESSING:{buttonRevertItemProcessing:{opacity:1},info:{opacity:1},status:{opacity:1}},DID_THROW_ITEM_PROCESSING_ERROR:{buttonRemoveItem:{opacity:1},buttonRetryItemProcessing:{opacity:1},status:{opacity:1},info:{translateX:Bn}},DID_THROW_ITEM_PROCESSING_REVERT_ERROR:{buttonRevertItemProcessing:{opacity:1},status:{opacity:1},info:{opacity:1}},DID_ABORT_ITEM_PROCESSING:{buttonRemoveItem:{opacity:1},buttonProcessItem:{opacity:1},info:{translateX:Bn},status:{opacity:1}},DID_REVERT_ITEM_PROCESSING:Yn},Xn=F({create:function(e){var t=e.root;t.element.innerHTML=t.query("GET_ICON_DONE")},name:"processing-complete-indicator",ignoreRect:!0,mixins:{styles:["scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",opacity:{type:"tween",duration:250}}}}),Zn=function(e){var t,n=e.root,r=e.props,o=Object.keys(xn).reduce((function(e,t){return e[t]=Object.assign({},xn[t]),e}),{}),a=r.id,u=n.query("GET_ALLOW_REVERT"),l=n.query("GET_ALLOW_REMOVE"),s=n.query("GET_ALLOW_PROCESS"),c=n.query("GET_INSTANT_UPLOAD"),f=n.query("IS_ASYNC"),d=n.query("GET_STYLE_BUTTON_REMOVE_ITEM_ALIGN");f?s&&!u?t=function(e){return!/RevertItemProcessing/.test(e)}:!s&&u?t=function(e){return!/ProcessItem|RetryItemProcessing|AbortItemProcessing/.test(e)}:s||u||(t=function(e){return!/Process/.test(e)}):t=function(e){return!/Process/.test(e)};var p=t?Fn.filter(t):Fn.concat();if(c&&u&&(o.RevertItemProcessing.label="GET_LABEL_BUTTON_REMOVE_ITEM",o.RevertItemProcessing.icon="GET_ICON_REMOVE"),f&&!u){var E=Hn.DID_COMPLETE_ITEM_PROCESSING;E.info.translateX=kn,E.info.translateY=qn,E.status.translateY=qn,E.processingCompleteIndicator={opacity:1,scaleX:1,scaleY:1}}if(f&&!s&&(["DID_START_ITEM_PROCESSING","DID_REQUEST_ITEM_PROCESSING","DID_UPDATE_ITEM_PROCESS_PROGRESS","DID_THROW_ITEM_PROCESSING_ERROR"].forEach((function(e){Hn[e].status.translateY=qn})),Hn.DID_THROW_ITEM_PROCESSING_ERROR.status.translateX=Vn),d&&u){o.RevertItemProcessing.align="BUTTON_REMOVE_ITEM_POSITION";var h=Hn.DID_COMPLETE_ITEM_PROCESSING;h.info.translateX=Bn,h.status.translateY=qn,h.processingCompleteIndicator={opacity:1,scaleX:1,scaleY:1}}l||(o.RemoveItem.disabled=!0),i(o,(function(e,t){var r=n.createChildView(Rn,{label:n.query(t.label),icon:n.query(t.icon),opacity:0});p.includes(e)&&n.appendChildView(r),t.disabled&&(r.element.setAttribute("disabled","disabled"),r.element.setAttribute("hidden","hidden")),r.element.dataset.align=n.query("GET_STYLE_"+t.align),r.element.classList.add(t.className),r.on("click",(function(e){e.stopPropagation(),t.disabled||n.dispatch(t.action,{query:a})})),n.ref["button"+e]=r})),n.ref.processingCompleteIndicator=n.appendChildView(n.createChildView(Xn)),n.ref.processingCompleteIndicator.element.dataset.align=n.query("GET_STYLE_BUTTON_PROCESS_ITEM_POSITION"),n.ref.info=n.appendChildView(n.createChildView(Mn,{id:a})),n.ref.status=n.appendChildView(n.createChildView(Cn,{id:a}));var _=n.appendChildView(n.createChildView(yn,{opacity:0,align:n.query("GET_STYLE_LOAD_INDICATOR_POSITION")}));_.element.classList.add("filepond--load-indicator"),n.ref.loadProgressIndicator=_;var m=n.appendChildView(n.createChildView(yn,{opacity:0,align:n.query("GET_STYLE_PROGRESS_INDICATOR_POSITION")}));m.element.classList.add("filepond--process-indicator"),n.ref.processProgressIndicator=m,n.ref.activeStyles=[]},Qn=function(e){var t=e.root,n=e.actions,r=e.props;Kn({root:t,actions:n,props:r});var o=n.concat().filter((function(e){return/^DID_/.test(e.type)})).reverse().find((function(e){return Hn[e.type]}));if(o){t.ref.activeStyles=[];var a=Hn[o.type];i(Wn,(function(e,n){var r=t.ref[e];i(n,(function(n,i){var o=a[e]&&void 0!==a[e][n]?a[e][n]:i;t.ref.activeStyles.push({control:r,key:n,value:o})}))}))}t.ref.activeStyles.forEach((function(e){var n=e.control,r=e.key,i=e.value;n[r]="function"==typeof i?i(t):i}))},Kn=B({DID_SET_LABEL_BUTTON_ABORT_ITEM_PROCESSING:function(e){var t=e.root,n=e.action;t.ref.buttonAbortItemProcessing.label=n.value},DID_SET_LABEL_BUTTON_ABORT_ITEM_LOAD:function(e){var t=e.root,n=e.action;t.ref.buttonAbortItemLoad.label=n.value},DID_SET_LABEL_BUTTON_ABORT_ITEM_REMOVAL:function(e){var t=e.root,n=e.action;t.ref.buttonAbortItemRemoval.label=n.value},DID_REQUEST_ITEM_PROCESSING:function(e){var t=e.root;t.ref.processProgressIndicator.spin=!0,t.ref.processProgressIndicator.progress=0},DID_START_ITEM_LOAD:function(e){var t=e.root;t.ref.loadProgressIndicator.spin=!0,t.ref.loadProgressIndicator.progress=0},DID_START_ITEM_REMOVE:function(e){var t=e.root;t.ref.processProgressIndicator.spin=!0,t.ref.processProgressIndicator.progress=0},DID_UPDATE_ITEM_LOAD_PROGRESS:function(e){var t=e.root,n=e.action;t.ref.loadProgressIndicator.spin=!1,t.ref.loadProgressIndicator.progress=n.progress},DID_UPDATE_ITEM_PROCESS_PROGRESS:function(e){var t=e.root,n=e.action;t.ref.processProgressIndicator.spin=!1,t.ref.processProgressIndicator.progress=n.progress}}),Jn=F({create:Zn,write:Qn,didCreateView:function(e){je("CREATE_VIEW",Object.assign({},e,{view:e}))},name:"file"}),$n=F({create:function(e){var t=e.root,n=e.props;t.ref.fileName=mn("legend"),t.appendChild(t.ref.fileName),t.ref.file=t.appendChildView(t.createChildView(Jn,{id:n.id})),t.ref.data=!1},ignoreRect:!0,write:B({DID_LOAD_ITEM:function(e){var t=e.root,n=e.props;gn(t.ref.fileName,_n(t.query("GET_ITEM_NAME",n.id)))}}),didCreateView:function(e){je("CREATE_VIEW",Object.assign({},e,{view:e}))},tag:"fieldset",name:"file-wrapper"}),er={type:"spring",damping:.6,mass:7},tr=function(e){var t=e.root,n=e.props;[{name:"top"},{name:"center",props:{translateY:null,scaleY:null},mixins:{animations:{scaleY:er},styles:["translateY","scaleY"]}},{name:"bottom",props:{translateY:null},mixins:{animations:{translateY:er},styles:["translateY"]}}].forEach((function(e){nr(t,e,n.name)})),t.element.classList.add("filepond--"+n.name),t.ref.scalable=null},nr=function(e,t,n){var r=F({name:"panel-"+t.name+" filepond--"+n,mixins:t.mixins,ignoreRectUpdate:!0}),i=e.createChildView(r,t.props);e.ref[t.name]=e.appendChildView(i)},rr=F({name:"panel",read:function(e){var t=e.root;return e.props.heightCurrent=t.ref.bottom.translateY},write:function(e){var t=e.root,n=e.props;if(null!==t.ref.scalable&&n.scalable===t.ref.scalable||(t.ref.scalable=!H(n.scalable)||n.scalable,t.element.dataset.scalable=t.ref.scalable),n.height){var r=t.ref.top.rect.element,i=t.ref.bottom.rect.element,o=Math.max(r.height+i.height,n.height);t.ref.center.translateY=r.height,t.ref.center.scaleY=(o-r.height-i.height)/100,t.ref.bottom.translateY=o-i.height}},create:tr,ignoreRect:!0,mixins:{apis:["height","heightCurrent","scalable"]}}),ir=function(e){var t=e.map((function(e){return e.id})),n=void 0;return{setIndex:function(e){n=e},getIndex:function(){return n},getItemIndex:function(e){return t.indexOf(e.id)}}},or={type:"spring",stiffness:.75,damping:.45,mass:10},ar="spring",ur={DID_START_ITEM_LOAD:"busy",DID_UPDATE_ITEM_LOAD_PROGRESS:"loading",DID_THROW_ITEM_INVALID:"load-invalid",DID_THROW_ITEM_LOAD_ERROR:"load-error",DID_LOAD_ITEM:"idle",DID_THROW_ITEM_REMOVE_ERROR:"remove-error",DID_START_ITEM_REMOVE:"busy",DID_START_ITEM_PROCESSING:"busy processing",DID_REQUEST_ITEM_PROCESSING:"busy processing",DID_UPDATE_ITEM_PROCESS_PROGRESS:"processing",DID_COMPLETE_ITEM_PROCESSING:"processing-complete",DID_THROW_ITEM_PROCESSING_ERROR:"processing-error",DID_THROW_ITEM_PROCESSING_REVERT_ERROR:"processing-revert-error",DID_ABORT_ITEM_PROCESSING:"cancelled",DID_REVERT_ITEM_PROCESSING:"idle"},lr=function(e){var t=e.root,n=e.props;if(t.ref.handleClick=function(e){return t.dispatch("DID_ACTIVATE_ITEM",{id:n.id})},t.element.id="filepond--item-"+n.id,t.element.addEventListener("click",t.ref.handleClick),t.ref.container=t.appendChildView(t.createChildView($n,{id:n.id})),t.ref.panel=t.appendChildView(t.createChildView(rr,{name:"item-panel"})),t.ref.panel.height=null,n.markedForRemoval=!1,t.query("GET_ALLOW_REORDER")){t.element.dataset.dragState="idle";var r=function(e){if(e.isPrimary){var r=!1,i={x:e.pageX,y:e.pageY};n.dragOrigin={x:t.translateX,y:t.translateY},n.dragCenter={x:e.offsetX,y:e.offsetY};var o=ir(t.query("GET_ACTIVE_ITEMS"));t.dispatch("DID_GRAB_ITEM",{id:n.id,dragState:o});var a=function(e){e.isPrimary&&(e.stopPropagation(),e.preventDefault(),n.dragOffset={x:e.pageX-i.x,y:e.pageY-i.y},n.dragOffset.x*n.dragOffset.x+n.dragOffset.y*n.dragOffset.y>16&&!r&&(r=!0,t.element.removeEventListener("click",t.ref.handleClick)),t.dispatch("DID_DRAG_ITEM",{id:n.id,dragState:o}))},u=function(e){e.isPrimary&&(n.dragOffset={x:e.pageX-i.x,y:e.pageY-i.y},s())},l=function(){s()},s=function(){document.removeEventListener("pointercancel",l),document.removeEventListener("pointermove",a),document.removeEventListener("pointerup",u),t.dispatch("DID_DROP_ITEM",{id:n.id,dragState:o}),r&&setTimeout((function(){return t.element.addEventListener("click",t.ref.handleClick)}),0)};document.addEventListener("pointercancel",l),document.addEventListener("pointermove",a),document.addEventListener("pointerup",u)}};t.element.addEventListener("pointerdown",r)}},sr=B({DID_UPDATE_PANEL_HEIGHT:function(e){var t=e.root,n=e.action;t.height=n.height}}),cr=B({DID_GRAB_ITEM:function(e){var t=e.root;e.props.dragOrigin={x:t.translateX,y:t.translateY}},DID_DRAG_ITEM:function(e){e.root.element.dataset.dragState="drag"},DID_DROP_ITEM:function(e){var t=e.root,n=e.props;n.dragOffset=null,n.dragOrigin=null,t.element.dataset.dragState="drop"}},(function(e){var t=e.root,n=e.actions,r=e.props,i=e.shouldOptimize;"drop"===t.element.dataset.dragState&&t.scaleX<=1&&(t.element.dataset.dragState="idle");var o=n.concat().filter((function(e){return/^DID_/.test(e.type)})).reverse().find((function(e){return ur[e.type]}));o&&o.type!==r.currentState&&(r.currentState=o.type,t.element.dataset.filepondItemState=ur[r.currentState]||"");var a=t.query("GET_ITEM_PANEL_ASPECT_RATIO")||t.query("GET_PANEL_ASPECT_RATIO");a?i||(t.height=t.rect.element.width*a):(sr({root:t,actions:n,props:r}),!t.height&&t.ref.container.rect.element.height>0&&(t.height=t.ref.container.rect.element.height)),i&&(t.ref.panel.height=null),t.ref.panel.height=t.height})),fr=F({create:lr,write:cr,destroy:function(e){var t=e.root,n=e.props;t.element.removeEventListener("click",t.ref.handleClick),t.dispatch("RELEASE_ITEM",{query:n.id})},tag:"li",name:"item",mixins:{apis:["id","interactionMethod","markedForRemoval","spawnDate","dragCenter","dragOrigin","dragOffset"],styles:["translateX","translateY","scaleX","scaleY","opacity","height"],animations:{scaleX:ar,scaleY:ar,translateX:or,translateY:or,opacity:{type:"tween",duration:150}}}}),dr=function(e,t){return Math.max(1,Math.floor((e+1)/t))},pr=function(e,t,n){if(n){var r=e.rect.element.width,i=t.length,o=null;if(0===i||n.top<t[0].rect.element.top)return-1;var a=t[0].rect.element,u=a.marginLeft+a.marginRight,l=a.width+u,s=dr(r,l);if(1===s){for(var c=0;c<i;c++){var f=t[c],d=f.rect.outer.top+.5*f.rect.element.height;if(n.top<d)return c}return i}for(var p=a.marginTop+a.marginBottom,E=a.height+p,h=0;h<i;h++){var _=h%s*l,m=Math.floor(h/s)*E,g=m-a.marginTop,I=_+l,T=m+E+a.marginBottom;if(n.top<T&&n.top>g){if(n.left<I)return h;o=h!==i-1?h:null}}return null!==o?o:i}},Er={height:0,width:0,get getHeight(){return this.height},set setHeight(e){0!==this.height&&0!==e||(this.height=e)},get getWidth(){return this.width},set setWidth(e){0!==this.width&&0!==e||(this.width=e)},setDimensions:function(e,t){0!==this.height&&0!==e||(this.height=e),0!==this.width&&0!==t||(this.width=t)}},hr=function(e){var t=e.root;a(t.element,"role","list"),t.ref.lastItemSpanwDate=Date.now()},_r=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;e.dragOffset?(e.translateX=null,e.translateY=null,e.translateX=e.dragOrigin.x+e.dragOffset.x,e.translateY=e.dragOrigin.y+e.dragOffset.y,e.scaleX=1.025,e.scaleY=1.025):(e.translateX=t,e.translateY=n,Date.now()>e.spawnDate&&(0===e.opacity&&mr(e,t,n,r,i),e.scaleX=1,e.scaleY=1,e.opacity=1))},mr=function(e,t,n,r,i){e.interactionMethod===ve.NONE?(e.translateX=null,e.translateX=t,e.translateY=null,e.translateY=n):e.interactionMethod===ve.DROP?(e.translateX=null,e.translateX=t-20*r,e.translateY=null,e.translateY=n-10*i,e.scaleX=.8,e.scaleY=.8):e.interactionMethod===ve.BROWSE?(e.translateY=null,e.translateY=n-30):e.interactionMethod===ve.API&&(e.translateX=null,e.translateX=t-30,e.translateY=null)},gr=function(e){return e.rect.element.height+.5*e.rect.element.marginBottom+.5*e.rect.element.marginTop},Ir=function(e){return e.rect.element.width+.5*e.rect.element.marginLeft+.5*e.rect.element.marginRight},Tr=B({DID_ADD_ITEM:function(e){var t=e.root,n=e.action,r=n.id,i=n.index,o=n.interactionMethod;t.ref.addIndex=i;var a=Date.now(),u=a,l=1;if(o!==ve.NONE){l=0;var s=t.query("GET_ITEM_INSERT_INTERVAL"),c=a-t.ref.lastItemSpanwDate;u=c<s?a+(s-c):a}t.ref.lastItemSpanwDate=u,t.appendChildView(t.createChildView(fr,{spawnDate:u,id:r,opacity:l,interactionMethod:o}),i)},DID_REMOVE_ITEM:function(e){var t=e.root,n=e.action.id,r=t.childViews.find((function(e){return e.id===n}));r&&(r.scaleX=.9,r.scaleY=.9,r.opacity=0,r.markedForRemoval=!0)},DID_DRAG_ITEM:function(e){var t=e.root,n=e.action,r=n.id,i=n.dragState,o=t.query("GET_ITEM",{id:r}),a=t.childViews.find((function(e){return e.id===r})),u=t.childViews.length,l=i.getItemIndex(o);if(a){var s={x:a.dragOrigin.x+a.dragOffset.x+a.dragCenter.x,y:a.dragOrigin.y+a.dragOffset.y+a.dragCenter.y},c=gr(a),f=Ir(a),d=Math.floor(t.rect.outer.width/f);d>u&&(d=u);var p=Math.floor(u/d+1);Er.setHeight=c*p,Er.setWidth=f*d;var E={y:Math.floor(s.y/c),x:Math.floor(s.x/f),getGridIndex:function(){return s.y>Er.getHeight||s.y<0||s.x>Er.getWidth||s.x<0?l:this.y*d+this.x},getColIndex:function(){for(var e=t.query("GET_ACTIVE_ITEMS"),n=t.childViews.filter((function(e){return e.rect.element.height})),r=e.map((function(e){return n.find((function(t){return t.id===e.id}))})),i=r.findIndex((function(e){return e===a})),o=gr(a),u=r.length,l=u,c=0,f=0,d=0;d<u;d++)if(c=(f=c)+gr(r[d]),s.y<c){if(i>d){if(s.y<f+o){l=d;break}continue}l=d;break}return l}},h=d>1?E.getGridIndex():E.getColIndex();t.dispatch("MOVE_ITEM",{query:a,index:h});var _=i.getIndex();if(void 0===_||_!==h){if(i.setIndex(h),void 0===_)return;t.dispatch("DID_REORDER_ITEMS",{items:t.query("GET_ACTIVE_ITEMS"),origin:l,target:h})}}}}),vr=F({create:hr,write:function(e){var t=e.root,n=e.props,r=e.actions,i=e.shouldOptimize;Tr({root:t,props:n,actions:r});var o=n.dragCoordinates,a=t.rect.element.width,u=t.childViews.filter((function(e){return e.rect.element.height})),l=t.query("GET_ACTIVE_ITEMS").map((function(e){return u.find((function(t){return t.id===e.id}))})).filter((function(e){return e})),s=o?pr(t,l,o):null,c=t.ref.addIndex||null;t.ref.addIndex=null;var f=0,d=0,p=0;if(0!==l.length){var E=l[0].rect.element,h=E.marginTop+E.marginBottom,_=E.marginLeft+E.marginRight,m=E.width+_,g=E.height+h,I=dr(a,m);if(1===I){var T=0,v=0;l.forEach((function(e,t){if(s){var n=t-s;v=-2===n?.25*-h:-1===n?.75*-h:0===n?.75*h:1===n?.25*h:0}i&&(e.translateX=null,e.translateY=null),e.markedForRemoval||_r(e,0,T+v);var r=(e.rect.element.height+h)*(e.markedForRemoval?e.opacity:1);T+=r}))}else{var y=0,R=0;l.forEach((function(e,t){t===s&&(f=1),t===c&&(p+=1),e.markedForRemoval&&e.opacity<.5&&(d-=1);var n=t+p+f+d,r=n%I,o=Math.floor(n/I),a=r*m,u=o*g,l=Math.sign(a-y),E=Math.sign(u-R);y=a,R=u,e.markedForRemoval||(i&&(e.translateX=null,e.translateY=null),_r(e,a,u,l,E))}))}}},tag:"ul",name:"list",didWriteView:function(e){var t=e.root;t.childViews.filter((function(e){return e.markedForRemoval&&0===e.opacity&&e.resting})).forEach((function(e){e._destroy(),t.removeChildView(e)}))},filterFrameActionsForChild:function(e,t){return t.filter((function(t){return!t.data||!t.data.id||e.id===t.data.id}))},mixins:{apis:["dragCoordinates"]}}),yr=function(e){var t=e.root,n=e.props;t.ref.list=t.appendChildView(t.createChildView(vr)),n.dragCoordinates=null,n.overflowing=!1},Rr=B({DID_DRAG:function(e){var t=e.root,n=e.props,r=e.action;t.query("GET_ITEM_INSERT_LOCATION_FREEDOM")&&(n.dragCoordinates={left:r.position.scopeLeft-t.ref.list.rect.element.left,top:r.position.scopeTop-(t.rect.outer.top+t.rect.element.marginTop+t.rect.element.scrollTop)})},DID_END_DRAG:function(e){e.props.dragCoordinates=null}}),Or=F({create:yr,write:function(e){var t=e.root,n=e.props,r=e.actions;if(Rr({root:t,props:n,actions:r}),t.ref.list.dragCoordinates=n.dragCoordinates,n.overflowing&&!n.overflow&&(n.overflowing=!1,t.element.dataset.state="",t.height=null),n.overflow){var i=Math.round(n.overflow);i!==t.height&&(n.overflowing=!0,t.element.dataset.state="overflow",t.height=i)}},name:"list-scroller",mixins:{apis:["overflow","dragCoordinates"],styles:["height","translateY"],animations:{translateY:"spring"}}}),Ar=function(e,t,n){n?a(e,t,arguments.length>3&&void 0!==arguments[3]?arguments[3]:""):e.removeAttribute(t)},wr=function(e){if(e&&""!==e.value){try{e.value=""}catch(e){}if(e.value){var t=mn("form"),n=e.parentNode,r=e.nextSibling;t.appendChild(e),t.reset(),r?n.insertBefore(e,r):n.appendChild(e)}}},Sr=function(e){var t=e.root,n=e.props;t.element.id="filepond--browser-"+n.id,a(t.element,"name",t.query("GET_NAME")),a(t.element,"aria-controls","filepond--assistant-"+n.id),a(t.element,"aria-labelledby","filepond--drop-label-"+n.id),Dr({root:t,action:{value:t.query("GET_ACCEPTED_FILE_TYPES")}}),Mr({root:t,action:{value:t.query("GET_ALLOW_MULTIPLE")}}),Lr({root:t,action:{value:t.query("GET_ALLOW_DIRECTORIES_ONLY")}}),br({root:t}),Pr({root:t,action:{value:t.query("GET_REQUIRED")}}),Gr({root:t,action:{value:t.query("GET_CAPTURE_METHOD")}}),t.ref.handleChange=function(e){if(t.element.value){var r=Array.from(t.element.files).map((function(e){return e._relativePath=e.webkitRelativePath,e}));setTimeout((function(){n.onload(r),wr(t.element)}),250)}},t.element.addEventListener("change",t.ref.handleChange)},Dr=function(e){var t=e.root,n=e.action;t.query("GET_ALLOW_SYNC_ACCEPT_ATTRIBUTE")&&Ar(t.element,"accept",!!n.value,n.value?n.value.join(","):"")},Mr=function(e){var t=e.root,n=e.action;Ar(t.element,"multiple",n.value)},Lr=function(e){var t=e.root,n=e.action;Ar(t.element,"webkitdirectory",n.value)},br=function(e){var t=e.root,n=t.query("GET_DISABLED"),r=t.query("GET_ALLOW_BROWSE"),i=n||!r;Ar(t.element,"disabled",i)},Pr=function(e){var t=e.root;e.action.value?0===t.query("GET_TOTAL_ITEMS")&&Ar(t.element,"required",!0):Ar(t.element,"required",!1)},Gr=function(e){var t=e.root,n=e.action;Ar(t.element,"capture",!!n.value,!0===n.value?"":n.value)},Nr=function(e){var t=e.root,n=t.element;t.query("GET_TOTAL_ITEMS")>0?(Ar(n,"required",!1),Ar(n,"name",!1)):(Ar(n,"name",!0,t.query("GET_NAME")),t.query("GET_CHECK_VALIDITY")&&n.setCustomValidity(""),t.query("GET_REQUIRED")&&Ar(n,"required",!0))},Cr=F({tag:"input",name:"browser",ignoreRect:!0,ignoreRectUpdate:!0,attributes:{type:"file"},create:Sr,destroy:function(e){var t=e.root;t.element.removeEventListener("change",t.ref.handleChange)},write:B({DID_LOAD_ITEM:Nr,DID_REMOVE_ITEM:Nr,DID_THROW_ITEM_INVALID:function(e){var t=e.root;t.query("GET_CHECK_VALIDITY")&&t.element.setCustomValidity(t.query("GET_LABEL_INVALID_FIELD"))},DID_SET_DISABLED:br,DID_SET_ALLOW_BROWSE:br,DID_SET_ALLOW_DIRECTORIES_ONLY:Lr,DID_SET_ALLOW_MULTIPLE:Mr,DID_SET_ACCEPTED_FILE_TYPES:Dr,DID_SET_CAPTURE_METHOD:Gr,DID_SET_REQUIRED:Pr})}),xr={ENTER:13,SPACE:32},Fr=function(e){var t=e.root,n=e.props,r=mn("label");a(r,"for","filepond--browser-"+n.id),a(r,"id","filepond--drop-label-"+n.id),a(r,"aria-hidden","true"),t.ref.handleKeyDown=function(e){(e.keyCode===xr.ENTER||e.keyCode===xr.SPACE)&&(e.preventDefault(),t.ref.label.click())},t.ref.handleClick=function(e){e.target===r||r.contains(e.target)||t.ref.label.click()},r.addEventListener("keydown",t.ref.handleKeyDown),t.element.addEventListener("click",t.ref.handleClick),Ur(r,n.caption),t.appendChild(r),t.ref.label=r},Ur=function(e,t){e.innerHTML=t;var n=e.querySelector(".filepond--label-action");return n&&a(n,"tabindex","0"),t},Br=F({name:"drop-label",ignoreRect:!0,create:Fr,destroy:function(e){var t=e.root;t.ref.label.addEventListener("keydown",t.ref.handleKeyDown),t.element.removeEventListener("click",t.ref.handleClick)},write:B({DID_SET_LABEL_IDLE:function(e){var t=e.root,n=e.action;Ur(t.ref.label,n.value)}}),mixins:{styles:["opacity","translateX","translateY"],animations:{opacity:{type:"tween",duration:150},translateX:"spring",translateY:"spring"}}}),Vr=F({name:"drip-blob",ignoreRect:!0,mixins:{styles:["translateX","translateY","scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",translateX:"spring",translateY:"spring",opacity:{type:"tween",duration:250}}}}),qr=function(e){var t=e.root,n=.5*t.rect.element.width,r=.5*t.rect.element.height;t.ref.blob=t.appendChildView(t.createChildView(Vr,{opacity:0,scaleX:2.5,scaleY:2.5,translateX:n,translateY:r}))},kr=function(e){var t=e.root,n=e.props,r=e.actions;zr({root:t,props:n,actions:r});var i=t.ref.blob;0===r.length&&i&&0===i.opacity&&(t.removeChildView(i),t.ref.blob=null)},zr=B({DID_DRAG:function(e){var t=e.root,n=e.action;t.ref.blob?(t.ref.blob.translateX=n.position.scopeLeft,t.ref.blob.translateY=n.position.scopeTop,t.ref.blob.scaleX=1,t.ref.blob.scaleY=1,t.ref.blob.opacity=1):qr({root:t})},DID_DROP:function(e){var t=e.root;t.ref.blob&&(t.ref.blob.scaleX=2.5,t.ref.blob.scaleY=2.5,t.ref.blob.opacity=0)},DID_END_DRAG:function(e){var t=e.root;t.ref.blob&&(t.ref.blob.opacity=0)}}),Wr=F({ignoreRect:!0,ignoreRectUpdate:!0,name:"drip",write:kr}),Yr=function(e,t){try{var n=new DataTransfer;t.forEach((function(e){e instanceof File?n.items.add(e):n.items.add(new File([e],e.name,{type:e.type}))})),e.files=n.files}catch(e){return!1}return!0},jr=function(e){return e.root.ref.fields={}},Hr=function(e,t){return e.ref.fields[t]},Xr=function(e){e.query("GET_ACTIVE_ITEMS").forEach((function(t){e.ref.fields[t.id]&&e.element.appendChild(e.ref.fields[t.id])}))},Zr=function(e){var t=e.root;return Xr(t)},Qr=B({DID_SET_DISABLED:function(e){var t=e.root;t.element.disabled=t.query("GET_DISABLED")},DID_ADD_ITEM:function(e){var t=e.root,n=e.action,r=!(t.query("GET_ITEM",n.id).origin===Be.LOCAL)&&t.query("SHOULD_UPDATE_FILE_INPUT"),i=mn("input");i.type=r?"file":"hidden",i.name=t.query("GET_NAME"),i.disabled=t.query("GET_DISABLED"),t.ref.fields[n.id]=i,Xr(t)},DID_LOAD_ITEM:function(e){var t=e.root,n=e.action,r=Hr(t,n.id);if(r&&(null!==n.serverFileReference&&(r.value=n.serverFileReference),t.query("SHOULD_UPDATE_FILE_INPUT"))){var i=t.query("GET_ITEM",n.id);Yr(r,[i.file])}},DID_REMOVE_ITEM:function(e){var t=e.root,n=e.action,r=Hr(t,n.id);r&&(r.parentNode&&r.parentNode.removeChild(r),delete t.ref.fields[n.id])},DID_DEFINE_VALUE:function(e){var t=e.root,n=e.action,r=Hr(t,n.id);r&&(null===n.value?r.removeAttribute("value"):"file"!=r.type&&(r.value=n.value),Xr(t))},DID_PREPARE_OUTPUT:function(e){var t=e.root,n=e.action;t.query("SHOULD_UPDATE_FILE_INPUT")&&setTimeout((function(){var e=Hr(t,n.id);e&&Yr(e,[n.file])}),0)},DID_REORDER_ITEMS:Zr,DID_SORT_ITEMS:Zr}),Kr=F({tag:"fieldset",name:"data",create:jr,write:Qr,ignoreRect:!0}),Jr=function(e){return"getRootNode"in e?e.getRootNode():document},$r=["jpg","jpeg","png","gif","bmp","webp","svg","tiff"],ei=["css","csv","html","txt"],ti={zip:"zip|compressed",epub:"application/epub+zip"},ni=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=e.toLowerCase(),$r.includes(e)?"image/"+("jpg"===e?"jpeg":"svg"===e?"svg+xml":e):ei.includes(e)?"text/"+e:ti[e]||""},ri=function(e){return new Promise((function(t,n){var r=pi(e);if(r.length&&!ii(e))return t(r);oi(e).then(t)}))},ii=function(e){return!!e.files&&e.files.length>0},oi=function(e){return new Promise((function(t,n){var r=(e.items?Array.from(e.items):[]).filter((function(e){return ai(e)})).map((function(e){return ui(e)}));r.length?Promise.all(r).then((function(e){var n=[];e.forEach((function(e){n.push.apply(n,e)})),t(n.filter((function(e){return e})).map((function(e){return e._relativePath||(e._relativePath=e.webkitRelativePath),e})))})).catch(console.error):t(e.files?Array.from(e.files):[])}))},ai=function(e){if(fi(e)){var t=di(e);if(t)return t.isFile||t.isDirectory}return"file"===e.kind},ui=function(e){return new Promise((function(t,n){ci(e)?li(di(e)).then(t).catch(n):t([e.getAsFile()])}))},li=function(e){return new Promise((function(t,n){var r=[],i=0,o=0,a=function(){0===o&&0===i&&t(r)},u=function e(t){i++;var u=t.createReader(),l=function t(){u.readEntries((function(n){if(0===n.length)return i--,void a();n.forEach((function(t){t.isDirectory?e(t):(o++,t.file((function(e){var n=si(e);t.fullPath&&(n._relativePath=t.fullPath),r.push(n),o--,a()})))})),t()}),n)};l()};u(e)}))},si=function(e){if(e.type.length)return e;var t=e.lastModifiedDate,n=e.name,r=ni(gt(e.name));return r.length?((e=e.slice(0,e.size,r)).name=n,e.lastModifiedDate=t,e):e},ci=function(e){return fi(e)&&(di(e)||{}).isDirectory},fi=function(e){return"webkitGetAsEntry"in e},di=function(e){return e.webkitGetAsEntry()},pi=function(e){var t=[];try{if((t=hi(e)).length)return t;t=Ei(e)}catch(e){}return t},Ei=function(e){var t=e.getData("url");return"string"==typeof t&&t.length?[t]:[]},hi=function(e){var t=e.getData("text/html");if("string"==typeof t&&t.length){var n=t.match(/src\s*=\s*"(.+?)"/);if(n)return[n[1]]}return[]},_i=[],mi=function(e){return{pageLeft:e.pageX,pageTop:e.pageY,scopeLeft:e.offsetX||e.layerX,scopeTop:e.offsetY||e.layerY}},gi=function(e,t,n){var r=Ii(t),i={element:e,filterElement:n,state:null,ondrop:function(){},onenter:function(){},ondrag:function(){},onexit:function(){},onload:function(){},allowdrop:function(){}};return i.destroy=r.addListener(i),i},Ii=function(e){var t=_i.find((function(t){return t.element===e}));if(t)return t;var n=Ti(e);return _i.push(n),n},Ti=function(e){var t=[],n={dragenter:Ai,dragover:wi,dragleave:Di,drop:Si},r={};i(n,(function(n,i){r[n]=i(e,t),e.addEventListener(n,r[n],!1)}));var o={element:e,addListener:function(a){return t.push(a),function(){t.splice(t.indexOf(a),1),0===t.length&&(_i.splice(_i.indexOf(o),1),i(n,(function(t){e.removeEventListener(t,r[t],!1)})))}}};return o},vi=function(e,t){return"elementFromPoint"in e||(e=document),e.elementFromPoint(t.x,t.y)},yi=function(e,t){var n=Jr(t),r=vi(n,{x:e.pageX-window.pageXOffset,y:e.pageY-window.pageYOffset});return r===t||t.contains(r)},Ri=null,Oi=function(e,t){try{e.dropEffect=t}catch(e){}},Ai=function(e,t){return function(e){e.preventDefault(),Ri=e.target,t.forEach((function(t){var n=t.element,r=t.onenter;yi(e,n)&&(t.state="enter",r(mi(e)))}))}},wi=function(e,t){return function(e){e.preventDefault();var n=e.dataTransfer;ri(n).then((function(r){var i=!1;t.some((function(t){var o=t.filterElement,a=t.element,u=t.onenter,l=t.onexit,s=t.ondrag,c=t.allowdrop;Oi(n,"copy");var f=c(r);if(f)if(yi(e,a)){if(i=!0,null===t.state)return t.state="enter",void u(mi(e));if(t.state="over",o&&!f)return void Oi(n,"none");s(mi(e))}else o&&!i&&Oi(n,"none"),t.state&&(t.state=null,l(mi(e)));else Oi(n,"none")}))}))}},Si=function(e,t){return function(e){e.preventDefault();var n=e.dataTransfer;ri(n).then((function(n){t.forEach((function(t){var r=t.filterElement,i=t.element,o=t.ondrop,a=t.onexit,u=t.allowdrop;if(t.state=null,!r||yi(e,i))return u(n)?void o(mi(e),n):a(mi(e))}))}))}},Di=function(e,t){return function(e){Ri===e.target&&t.forEach((function(t){var n=t.onexit;t.state=null,n(mi(e))}))}},Mi=function(e,t,n){e.classList.add("filepond--hopper");var r=n.catchesDropsOnPage,i=n.requiresDropOnElement,o=n.filterItems,a=void 0===o?function(e){return e}:o,u=gi(e,r?document.documentElement:e,i),l="",s="";u.allowdrop=function(e){return t(a(e))},u.ondrop=function(e,n){var r=a(n);t(r)?(s="drag-drop",c.onload(r,e)):c.ondragend(e)},u.ondrag=function(e){c.ondrag(e)},u.onenter=function(e){s="drag-over",c.ondragstart(e)},u.onexit=function(e){s="drag-exit",c.ondragend(e)};var c={updateHopperState:function(){l!==s&&(e.dataset.hopperState=s,l=s)},onload:function(){},ondragstart:function(){},ondrag:function(){},ondragend:function(){},destroy:function(){u.destroy()}};return c},Li=!1,bi=[],Pi=function(e){var t=document.activeElement;if(t&&/textarea|input/i.test(t.nodeName)){for(var n=!1,r=t;r!==document.body;){if(r.classList.contains("filepond--root")){n=!0;break}r=r.parentNode}if(!n)return}ri(e.clipboardData).then((function(e){e.length&&bi.forEach((function(t){return t(e)}))}))},Gi=function(e){bi.includes(e)||(bi.push(e),Li||(Li=!0,document.addEventListener("paste",Pi)))},Ni=function(e){be(bi,bi.indexOf(e)),0===bi.length&&(document.removeEventListener("paste",Pi),Li=!1)},Ci=function(){var e=function(e){t.onload(e)},t={destroy:function(){Ni(e)},onload:function(){}};return Gi(e),t},xi=null,Fi=null,Ui=[],Bi=function(e,t){e.element.textContent=t},Vi=function(e){e.element.textContent=""},qi=function(e,t,n){var r=e.query("GET_TOTAL_ITEMS");Bi(e,n+" "+t+", "+r+" "+(1===r?e.query("GET_LABEL_FILE_COUNT_SINGULAR"):e.query("GET_LABEL_FILE_COUNT_PLURAL"))),clearTimeout(Fi),Fi=setTimeout((function(){Vi(e)}),1500)},ki=function(e){return e.element.parentNode.contains(document.activeElement)},zi=function(e){var t=e.root,n=e.action,r=t.query("GET_ITEM",n.id).filename,i=t.query("GET_LABEL_FILE_PROCESSING_ABORTED");Bi(t,r+" "+i)},Wi=function(e){var t=e.root,n=e.action,r=t.query("GET_ITEM",n.id).filename;Bi(t,n.status.main+" "+r+" "+n.status.sub)},Yi=F({create:function(e){var t=e.root,n=e.props;t.element.id="filepond--assistant-"+n.id,a(t.element,"role","status"),a(t.element,"aria-live","polite"),a(t.element,"aria-relevant","additions")},ignoreRect:!0,ignoreRectUpdate:!0,write:B({DID_LOAD_ITEM:function(e){var t=e.root,n=e.action;if(ki(t)){t.element.textContent="";var r=t.query("GET_ITEM",n.id);Ui.push(r.filename),clearTimeout(xi),xi=setTimeout((function(){qi(t,Ui.join(", "),t.query("GET_LABEL_FILE_ADDED")),Ui.length=0}),750)}},DID_REMOVE_ITEM:function(e){var t=e.root,n=e.action;if(ki(t)){var r=n.item;qi(t,r.filename,t.query("GET_LABEL_FILE_REMOVED"))}},DID_COMPLETE_ITEM_PROCESSING:function(e){var t=e.root,n=e.action,r=t.query("GET_ITEM",n.id).filename,i=t.query("GET_LABEL_FILE_PROCESSING_COMPLETE");Bi(t,r+" "+i)},DID_ABORT_ITEM_PROCESSING:zi,DID_REVERT_ITEM_PROCESSING:zi,DID_THROW_ITEM_REMOVE_ERROR:Wi,DID_THROW_ITEM_LOAD_ERROR:Wi,DID_THROW_ITEM_INVALID:Wi,DID_THROW_ITEM_PROCESSING_ERROR:Wi}),tag:"span",name:"assistant"}),ji=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-";return e.replace(new RegExp(t+".","g"),(function(e){return e.charAt(1).toUpperCase()}))},Hi=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=Date.now(),i=null;return function(){for(var o=arguments.length,a=new Array(o),u=0;u<o;u++)a[u]=arguments[u];clearTimeout(i);var l=Date.now()-r,s=function(){r=Date.now(),e.apply(void 0,a)};l<t?n||(i=setTimeout(s,t-l)):s()}},Xi=1e6,Zi=function(e){return e.preventDefault()},Qi=function(e){var t=e.root,n=e.props,r=t.query("GET_ID");r&&(t.element.id=r);var i=t.query("GET_CLASS_NAME");i&&i.split(" ").filter((function(e){return e.length})).forEach((function(e){t.element.classList.add(e)})),t.ref.label=t.appendChildView(t.createChildView(Br,Object.assign({},n,{translateY:null,caption:t.query("GET_LABEL_IDLE")}))),t.ref.list=t.appendChildView(t.createChildView(Or,{translateY:null})),t.ref.panel=t.appendChildView(t.createChildView(rr,{name:"panel-root"})),t.ref.assistant=t.appendChildView(t.createChildView(Yi,Object.assign({},n))),t.ref.data=t.appendChildView(t.createChildView(Kr,Object.assign({},n))),t.ref.measure=mn("div"),t.ref.measure.style.height="100%",t.element.appendChild(t.ref.measure),t.ref.bounds=null,t.query("GET_STYLES").filter((function(e){return!z(e.value)})).map((function(e){var n=e.name,r=e.value;t.element.dataset[n]=r})),t.ref.widthPrevious=null,t.ref.widthUpdated=Hi((function(){t.ref.updateHistory=[],t.dispatch("DID_RESIZE_ROOT")}),250),t.ref.previousAspectRatio=null,t.ref.updateHistory=[];var o=window.matchMedia("(pointer: fine) and (hover: hover)").matches,a="PointerEvent"in window;t.query("GET_ALLOW_REORDER")&&a&&!o&&(t.element.addEventListener("touchmove",Zi,{passive:!1}),t.element.addEventListener("gesturestart",Zi));var u=t.query("GET_CREDITS");if(2===u.length){var l=document.createElement("a");l.className="filepond--credits",l.setAttribute("aria-hidden","true"),l.href=u[0],l.tabindex=-1,l.target="_blank",l.rel="noopener noreferrer",l.textContent=u[1],t.element.appendChild(l),t.ref.credits=l}},Ki=function(e){var t=e.root,n=e.props,r=e.actions;if(ao({root:t,props:n,actions:r}),r.filter((function(e){return/^DID_SET_STYLE_/.test(e.type)})).filter((function(e){return!z(e.data.value)})).map((function(e){var n=e.type,r=e.data,i=ji(n.substring(8).toLowerCase(),"_");t.element.dataset[i]=r.value,t.invalidateLayout()})),!t.rect.element.hidden){t.rect.element.width!==t.ref.widthPrevious&&(t.ref.widthPrevious=t.rect.element.width,t.ref.widthUpdated());var i=t.ref.bounds;i||(i=t.ref.bounds=eo(t),t.element.removeChild(t.ref.measure),t.ref.measure=null);var o=t.ref,a=o.hopper,u=o.label,l=o.list,s=o.panel;a&&a.updateHopperState();var c=t.query("GET_PANEL_ASPECT_RATIO"),f=t.query("GET_ALLOW_MULTIPLE"),d=t.query("GET_TOTAL_ITEMS"),p=d===(f?t.query("GET_MAX_FILES")||Xi:1),E=r.find((function(e){return"DID_ADD_ITEM"===e.type}));if(p&&E){var h=E.data.interactionMethod;u.opacity=0,f?u.translateY=-40:h===ve.API?u.translateX=40:h===ve.BROWSE?u.translateY=40:u.translateY=30}else p||(u.opacity=1,u.translateX=0,u.translateY=0);var _=Ji(t),m=$i(t),g=u.rect.element.height,I=!f||p?0:g,T=p?l.rect.element.marginTop:0,v=0===d?0:l.rect.element.marginBottom,y=I+T+m.visual+v,R=I+T+m.bounds+v;if(l.translateY=Math.max(0,I-l.rect.element.marginTop)-_.top,c){var O=t.rect.element.width,A=O*c;c!==t.ref.previousAspectRatio&&(t.ref.previousAspectRatio=c,t.ref.updateHistory=[]);var w=t.ref.updateHistory;w.push(O);var S=2;if(w.length>2*S)for(var D=w.length,M=D-10,L=0,b=D;b>=M;b--)if(w[b]===w[b-2]&&L++,L>=S)return;s.scalable=!1,s.height=A;var P=A-I-(v-_.bottom)-(p?T:0);m.visual>P?l.overflow=P:l.overflow=null,t.height=A}else if(i.fixedHeight){s.scalable=!1;var G=i.fixedHeight-I-(v-_.bottom)-(p?T:0);m.visual>G?l.overflow=G:l.overflow=null}else if(i.cappedHeight){var N=y>=i.cappedHeight,C=Math.min(i.cappedHeight,y);s.scalable=!0,s.height=N?C:C-_.top-_.bottom;var x=C-I-(v-_.bottom)-(p?T:0);y>i.cappedHeight&&m.visual>x?l.overflow=x:l.overflow=null,t.height=Math.min(i.cappedHeight,R-_.top-_.bottom)}else{var F=d>0?_.top+_.bottom:0;s.scalable=!0,s.height=Math.max(g,y-F),t.height=Math.max(g,R-F)}t.ref.credits&&s.heightCurrent&&(t.ref.credits.style.transform="translateY("+s.heightCurrent+"px)")}},Ji=function(e){var t=e.ref.list.childViews[0].childViews[0];return t?{top:t.rect.element.marginTop,bottom:t.rect.element.marginBottom}:{top:0,bottom:0}},$i=function(e){var t=0,n=0,r=e.ref.list,i=r.childViews[0],o=i.childViews.filter((function(e){return e.rect.element.height})),a=e.query("GET_ACTIVE_ITEMS").map((function(e){return o.find((function(t){return t.id===e.id}))})).filter((function(e){return e}));if(0===a.length)return{visual:t,bounds:n};var u=i.rect.element.width,l=pr(i,a,r.dragCoordinates),s=a[0].rect.element,c=s.marginTop+s.marginBottom,f=s.marginLeft+s.marginRight,d=s.width+f,p=s.height+c,E=void 0!==l&&l>=0?1:0,h=a.find((function(e){return e.markedForRemoval&&e.opacity<.45}))?-1:0,_=a.length+E+h,m=dr(u,d);return 1===m?a.forEach((function(e){var r=e.rect.element.height+c;n+=r,t+=r*e.opacity})):(n=Math.ceil(_/m)*p,t=n),{visual:t,bounds:n}},eo=function(e){var t=e.ref.measureHeight||null;return{cappedHeight:parseInt(e.style.maxHeight,10)||null,fixedHeight:0===t?null:t}},to=function(e,t){var n=e.query("GET_ALLOW_REPLACE"),r=e.query("GET_ALLOW_MULTIPLE"),i=e.query("GET_TOTAL_ITEMS"),o=e.query("GET_MAX_FILES"),a=t.length;return!r&&a>1?(e.dispatch("DID_THROW_MAX_FILES",{source:t,error:Ut("warning",0,"Max files")}),!0):!(!r&&n||!($(o=r?o:1)&&i+a>o)||(e.dispatch("DID_THROW_MAX_FILES",{source:t,error:Ut("warning",0,"Max files")}),0))},no=function(e,t,n){var r=e.childViews[0];return pr(r,t,{left:n.scopeLeft-r.rect.element.left,top:n.scopeTop-(e.rect.outer.top+e.rect.element.marginTop+e.rect.element.scrollTop)})},ro=function(e){var t=e.query("GET_ALLOW_DROP"),n=e.query("GET_DISABLED"),r=t&&!n;if(r&&!e.ref.hopper){var i=Mi(e.element,(function(t){var n=e.query("GET_BEFORE_DROP_FILE")||function(){return!0};return!e.query("GET_DROP_VALIDATION")||t.every((function(t){return je("ALLOW_HOPPER_ITEM",t,{query:e.query}).every((function(e){return!0===e}))&&n(t)}))}),{filterItems:function(t){var n=e.query("GET_IGNORED_FILES");return t.filter((function(e){return!$t(e)||!n.includes(e.name.toLowerCase())}))},catchesDropsOnPage:e.query("GET_DROP_ON_PAGE"),requiresDropOnElement:e.query("GET_DROP_ON_ELEMENT")});i.onload=function(t,n){var r=e.ref.list.childViews[0].childViews.filter((function(e){return e.rect.element.height})),i=e.query("GET_ACTIVE_ITEMS").map((function(e){return r.find((function(t){return t.id===e.id}))})).filter((function(e){return e}));Ye("ADD_ITEMS",t,{dispatch:e.dispatch}).then((function(t){if(to(e,t))return!1;e.dispatch("ADD_ITEMS",{items:t,index:no(e.ref.list,i,n),interactionMethod:ve.DROP})})),e.dispatch("DID_DROP",{position:n}),e.dispatch("DID_END_DRAG",{position:n})},i.ondragstart=function(t){e.dispatch("DID_START_DRAG",{position:t})},i.ondrag=Hi((function(t){e.dispatch("DID_DRAG",{position:t})})),i.ondragend=function(t){e.dispatch("DID_END_DRAG",{position:t})},e.ref.hopper=i,e.ref.drip=e.appendChildView(e.createChildView(Wr))}else!r&&e.ref.hopper&&(e.ref.hopper.destroy(),e.ref.hopper=null,e.removeChildView(e.ref.drip))},io=function(e,t){var n=e.query("GET_ALLOW_BROWSE"),r=e.query("GET_DISABLED"),i=n&&!r;i&&!e.ref.browser?e.ref.browser=e.appendChildView(e.createChildView(Cr,Object.assign({},t,{onload:function(t){Ye("ADD_ITEMS",t,{dispatch:e.dispatch}).then((function(t){if(to(e,t))return!1;e.dispatch("ADD_ITEMS",{items:t,index:-1,interactionMethod:ve.BROWSE})}))}})),0):!i&&e.ref.browser&&(e.removeChildView(e.ref.browser),e.ref.browser=null)},oo=function(e){var t=e.query("GET_ALLOW_PASTE"),n=e.query("GET_DISABLED"),r=t&&!n;r&&!e.ref.paster?(e.ref.paster=Ci(),e.ref.paster.onload=function(t){Ye("ADD_ITEMS",t,{dispatch:e.dispatch}).then((function(t){if(to(e,t))return!1;e.dispatch("ADD_ITEMS",{items:t,index:-1,interactionMethod:ve.PASTE})}))}):!r&&e.ref.paster&&(e.ref.paster.destroy(),e.ref.paster=null)},ao=B({DID_SET_ALLOW_BROWSE:function(e){var t=e.root,n=e.props;io(t,n)},DID_SET_ALLOW_DROP:function(e){var t=e.root;ro(t)},DID_SET_ALLOW_PASTE:function(e){var t=e.root;oo(t)},DID_SET_DISABLED:function(e){var t=e.root,n=e.props;ro(t),oo(t),io(t,n),t.query("GET_DISABLED")?t.element.dataset.disabled="disabled":t.element.removeAttribute("data-disabled")}}),uo=F({name:"root",read:function(e){var t=e.root;t.ref.measure&&(t.ref.measureHeight=t.ref.measure.offsetHeight)},create:Qi,write:Ki,destroy:function(e){var t=e.root;t.ref.paster&&t.ref.paster.destroy(),t.ref.hopper&&t.ref.hopper.destroy(),t.element.removeEventListener("touchmove",Zi),t.element.removeEventListener("gesturestart",Zi)},mixins:{styles:["height"]}}),lo=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=null,r=Ze(),i=n(_e(r),[ft,Te(r)],[En,Ie(r)]);i.dispatch("SET_OPTIONS",{options:e});var a=function(){document.hidden||i.dispatch("KICK")};document.addEventListener("visibilitychange",a);var u=null,l=!1,s=!1,c=null,f=null,d=function(){l||(l=!0),clearTimeout(u),u=setTimeout((function(){l=!1,c=null,f=null,s&&(s=!1,i.dispatch("DID_STOP_RESIZE"))}),500)};window.addEventListener("resize",d);var p=uo(i,{id:ye()}),E=!1,h=!1,_={_read:function(){l&&(f=window.innerWidth,c||(c=f),s||f===c||(i.dispatch("DID_START_RESIZE"),s=!0)),h&&E&&(E=null===p.element.offsetParent),E||(p._read(),h=p.rect.element.hidden)},_write:function(e){var t=i.processActionQueue().filter((function(e){return!/^SET_/.test(e.type)}));E&&!t.length||(v(t),E=p._write(e,t,s),Fe(i.query("GET_ITEMS")),E&&i.processDispatchQueue())}},m=function(e){return function(t){var n={type:e};if(!t)return n;if(t.hasOwnProperty("error")&&(n.error=t.error?Object.assign({},t.error):null),t.status&&(n.status=Object.assign({},t.status)),t.file&&(n.output=t.file),t.source)n.file=t.source;else if(t.item||t.id){var r=t.item?t.item:i.query("GET_ITEM",t.id);n.file=r?xe(r):null}return t.items&&(n.items=t.items.map(xe)),/progress/.test(e)&&(n.progress=t.progress),t.hasOwnProperty("origin")&&t.hasOwnProperty("target")&&(n.origin=t.origin,n.target=t.target),n}},g={DID_DESTROY:m("destroy"),DID_INIT:m("init"),DID_THROW_MAX_FILES:m("warning"),DID_INIT_ITEM:m("initfile"),DID_START_ITEM_LOAD:m("addfilestart"),DID_UPDATE_ITEM_LOAD_PROGRESS:m("addfileprogress"),DID_LOAD_ITEM:m("addfile"),DID_THROW_ITEM_INVALID:[m("error"),m("addfile")],DID_THROW_ITEM_LOAD_ERROR:[m("error"),m("addfile")],DID_THROW_ITEM_REMOVE_ERROR:[m("error"),m("removefile")],DID_PREPARE_OUTPUT:m("preparefile"),DID_START_ITEM_PROCESSING:m("processfilestart"),DID_UPDATE_ITEM_PROCESS_PROGRESS:m("processfileprogress"),DID_ABORT_ITEM_PROCESSING:m("processfileabort"),DID_COMPLETE_ITEM_PROCESSING:m("processfile"),DID_COMPLETE_ITEM_PROCESSING_ALL:m("processfiles"),DID_REVERT_ITEM_PROCESSING:m("processfilerevert"),DID_THROW_ITEM_PROCESSING_ERROR:[m("error"),m("processfile")],DID_REMOVE_ITEM:m("removefile"),DID_UPDATE_ITEMS:m("updatefiles"),DID_ACTIVATE_ITEM:m("activatefile"),DID_REORDER_ITEMS:m("reorderfiles")},I=function(e){var t=Object.assign({pond:N},e);delete t.type,p.element.dispatchEvent(new CustomEvent("FilePond:"+e.type,{detail:t,bubbles:!0,cancelable:!0,composed:!0}));var n=[];e.hasOwnProperty("error")&&n.push(e.error),e.hasOwnProperty("file")&&n.push(e.file);var r=["type","error","file"];Object.keys(e).filter((function(e){return!r.includes(e)})).forEach((function(t){return n.push(e[t])})),N.fire.apply(N,[e.type].concat(n));var o=i.query("GET_ON"+e.type.toUpperCase());o&&o.apply(void 0,n)},v=function(e){e.length&&e.filter((function(e){return g[e.type]})).forEach((function(e){var t=g[e.type];(Array.isArray(t)?t:[t]).forEach((function(t){"DID_INIT_ITEM"===e.type?I(t(e.data)):setTimeout((function(){I(t(e.data))}),0)}))}))},y=function(e){return i.dispatch("SET_OPTIONS",{options:e})},R=function(e){return i.query("GET_ACTIVE_ITEM",e)},O=function(e){return new Promise((function(t,n){i.dispatch("REQUEST_ITEM_PREPARE",{query:e,success:function(e){t(e)},failure:function(e){n(e)}})}))},A=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(n,r){D([{source:e,options:t}],{index:t.index}).then((function(e){return n(e&&e[0])})).catch(r)}))},w=function(e){return e.file&&e.id},S=function(e,t){return"object"!=typeof e||w(e)||t||(t=e,e=void 0),i.dispatch("REMOVE_ITEM",Object.assign({},t,{query:e})),null===i.query("GET_ACTIVE_ITEM",e)},D=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Promise((function(e,n){var r=[],o={};if(k(t[0]))r.push.apply(r,t[0]),Object.assign(o,t[1]||{});else{var a=t[t.length-1];"object"!=typeof a||a instanceof Blob||Object.assign(o,t.pop()),r.push.apply(r,t)}i.dispatch("ADD_ITEMS",{items:r,index:o.index,interactionMethod:ve.API,success:e,failure:n})}))},M=function(){return i.query("GET_ACTIVE_ITEMS")},L=function(e){return new Promise((function(t,n){i.dispatch("REQUEST_ITEM_PROCESSING",{query:e,success:function(e){t(e)},failure:function(e){n(e)}})}))},b=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Array.isArray(t[0])?t[0]:t,i=r.length?r:M();return Promise.all(i.map(O))},P=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Array.isArray(t[0])?t[0]:t;if(!r.length){var i=M().filter((function(e){return!(e.status===Ue.IDLE&&e.origin===Be.LOCAL)&&e.status!==Ue.PROCESSING&&e.status!==Ue.PROCESSING_COMPLETE&&e.status!==Ue.PROCESSING_REVERT_ERROR}));return Promise.all(i.map(L))}return Promise.all(r.map(L))},G=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=Array.isArray(t[0])?t[0]:t;"object"==typeof i[i.length-1]?r=i.pop():Array.isArray(t[0])&&(r=t[1]);var o=M();return i.length?i.map((function(e){return T(e)?o[e]?o[e].id:null:e})).filter((function(e){return e})).map((function(e){return S(e,r)})):Promise.all(o.map((function(e){return S(e,r)})))},N=Object.assign({},Ge(),{},_,{},ge(i,r),{setOptions:y,addFile:A,addFiles:D,getFile:R,processFile:L,prepareFile:O,removeFile:S,moveFile:function(e,t){return i.dispatch("MOVE_ITEM",{query:e,index:t})},getFiles:M,processFiles:P,removeFiles:G,prepareFiles:b,sort:function(e){return i.dispatch("SORT",{compare:e})},browse:function(){var e=p.element.querySelector("input[type=file]");e&&e.click()},destroy:function(){N.fire("destroy",p.element),i.dispatch("ABORT_ALL"),p._destroy(),window.removeEventListener("resize",d),document.removeEventListener("visibilitychange",a),i.dispatch("DID_DESTROY")},insertBefore:function(e){return V(p.element,e)},insertAfter:function(e){return q(p.element,e)},appendTo:function(e){return e.appendChild(p.element)},replaceElement:function(e){V(p.element,e),e.parentNode.removeChild(e),t=e},restoreElement:function(){t&&(q(t,p.element),p.element.parentNode.removeChild(p.element),t=null)},isAttachedTo:function(e){return p.element===e||t===e},element:{get:function(){return p.element}},status:{get:function(){return i.query("GET_STATUS")}}});return i.dispatch("DID_INIT"),o(N)},so=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return i(Ze(),(function(e,n){t[e]=n[0]})),lo(Object.assign({},t,{},e))},co=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},fo=function(e){return ji(e.replace(/^data-/,""))},po=function e(t,n){i(n,(function(n,r){i(t,(function(e,i){var o=new RegExp(n);if(o.test(e)&&(delete t[e],!1!==r))if(Z(r))t[r]=i;else{var a=r.group;ue(r)&&!t[a]&&(t[a]={}),t[a][co(e.replace(o,""))]=i}})),r.mapping&&e(t[r.group],r.mapping)}))},Eo=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];i(e.attributes,(function(t){n.push(e.attributes[t])}));var r=n.filter((function(e){return e.name})).reduce((function(t,n){var r=a(e,n.name);return t[fo(n.name)]=r===n.name||r,t}),{});return po(r,t),r},ho=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={"^class$":"className","^multiple$":"allowMultiple","^capture$":"captureMethod","^webkitdirectory$":"allowDirectoriesOnly","^server":{group:"server",mapping:{"^process":{group:"process"},"^revert":{group:"revert"},"^fetch":{group:"fetch"},"^restore":{group:"restore"},"^load":{group:"load"}}},"^type$":!1,"^files$":!1};je("SET_ATTRIBUTE_TO_OPTION_MAP",n);var r=Object.assign({},t),i=Eo("FIELDSET"===e.nodeName?e.querySelector("input[type=file]"):e,n);Object.keys(i).forEach((function(e){ue(i[e])?(ue(r[e])||(r[e]={}),Object.assign(r[e],i[e])):r[e]=i[e]})),r.files=(t.files||[]).concat(Array.from(e.querySelectorAll("input:not([type=file])")).map((function(e){return{source:e.value,options:{type:e.dataset.type}}})));var o=so(r);return e.files&&Array.from(e.files).forEach((function(e){o.addFile(e)})),o.replaceElement(e),o},_o=function(){return t(arguments.length<=0?void 0:arguments[0])?ho.apply(void 0,arguments):so.apply(void 0,arguments)},mo=["fire","_read","_write"],go=function(e){var t={};return Ne(e,t,mo),t},Io=function(e,t){return e.replace(/(?:{([a-zA-Z]+)})/g,(function(e,n){return t[n]}))},To=function(e){var t=new Blob(["(",e.toString(),")()"],{type:"application/javascript"}),n=URL.createObjectURL(t),r=new Worker(n);return{transfer:function(e,t){},post:function(e,t,n){var i=ye();r.onmessage=function(e){e.data.id===i&&t(e.data.message)},r.postMessage({id:i,message:e},n)},terminate:function(){r.terminate(),URL.revokeObjectURL(n)}}},vo=function(e){return new Promise((function(t,n){var r=new Image;r.onload=function(){t(r)},r.onerror=function(e){n(e)},r.src=e}))},yo=function(e,t){var n=e.slice(0,e.size,e.type);return n.lastModifiedDate=e.lastModifiedDate,n.name=t,n},Ro=function(e){return yo(e,e.name)},Oo=[],Ao=function(e){if(!Oo.includes(e)){Oo.push(e);var t=e({addFilter:He,utils:{Type:ze,forin:i,isString:Z,isFile:$t,toNaturalFileSize:On,replaceInString:Io,getExtensionFromFilename:gt,getFilenameWithoutExtension:Kt,guesstimateMimeType:ni,getFileFromBlob:yt,getFilenameFromURL:mt,createRoute:B,createWorker:To,createView:F,createItemAPI:xe,loadImage:vo,copyFile:Ro,renameFile:yo,createBlob:Ot,applyFilterChain:Ye,text:gn,getNumericAspectRatioFromString:$e},views:{fileActionButton:Rn}});Xe(t.options)}},wo=function(){return"[object OperaMini]"===Object.prototype.toString.call(window.operamini)},So=function(){return"Promise"in window},Do=function(){return"slice"in Blob.prototype},Mo=function(){return"URL"in window&&"createObjectURL"in window.URL},Lo=function(){return"visibilityState"in document},bo=function(){return"performance"in window},Po=function(){return"supports"in(window.CSS||{})},Go=function(){return/MSIE|Trident/.test(window.navigator.userAgent)},No=(Un=h()&&!wo()&&Lo()&&So()&&Do()&&Mo()&&bo()&&(Po()||Go()),function(){return Un}),Co={apps:[]},xo="filepond",Fo=function(){};if(e.Status={},e.FileStatus={},e.FileOrigin={},e.OptionTypes={},e.create=Fo,e.destroy=Fo,e.parse=Fo,e.find=Fo,e.registerPlugin=Fo,e.getOptions=Fo,e.setOptions=Fo,No()){U((function(){Co.apps.forEach((function(e){return e._read()}))}),(function(e){Co.apps.forEach((function(t){return t._write(e)}))}));var Uo=function t(){document.dispatchEvent(new CustomEvent("FilePond:loaded",{detail:{supported:No,create:e.create,destroy:e.destroy,parse:e.parse,find:e.find,registerPlugin:e.registerPlugin,setOptions:e.setOptions}})),document.removeEventListener("DOMContentLoaded",t)};"loading"!==document.readyState?setTimeout((function(){return Uo()}),0):document.addEventListener("DOMContentLoaded",Uo);var Bo=function(){return i(Ze(),(function(t,n){e.OptionTypes[t]=n[1]}))};e.Status=Object.assign({},tt),e.FileOrigin=Object.assign({},Be),e.FileStatus=Object.assign({},Ue),e.OptionTypes={},Bo(),e.create=function(){var t=_o.apply(void 0,arguments);return t.on("destroy",e.destroy),Co.apps.push(t),go(t)},e.destroy=function(e){var t=Co.apps.findIndex((function(t){return t.isAttachedTo(e)}));return t>=0&&(Co.apps.splice(t,1)[0].restoreElement(),!0)},e.parse=function(t){return Array.from(t.querySelectorAll("."+xo)).filter((function(e){return!Co.apps.find((function(t){return t.isAttachedTo(e)}))})).map((function(t){return e.create(t)}))},e.find=function(e){var t=Co.apps.find((function(t){return t.isAttachedTo(e)}));return t?go(t):null},e.registerPlugin=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.forEach(Ao),Bo()},e.getOptions=function(){var e={};return i(Ze(),(function(t,n){e[t]=n[0]})),e},e.setOptions=function(t){return ue(t)&&(Co.apps.forEach((function(e){e.setOptions(t)})),Qe(t)),e.getOptions()}}e.supported=No,Object.defineProperty(e,"__esModule",{value:!0})}(t)}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r);var e=n(9992),t=n(8200),i=n.n(t),o=n(124),a=n.n(o),u=n(6936),l=n.n(u),s=n(3424),c=n.n(s),f=n(8460),d=n.n(f),p=n(7572),E=n.n(p),h=n(3356),_=n.n(h),m=n(8216),g=n.n(m),I=n(9148),T=n.n(I),v=n(864),y=n.n(v),R=n(6440),O=n.n(R);window.FilePond=e,window.FilePondPluginImageExifOrientation=i(),window.FilePondPluginImageEdit=a(),window.FilePondPluginFileMetadata=l(),window.FilePondPluginFileValidateType=c(),window.FilePondPluginFileValidateSize=d(),window.FilePondPluginImageValidateSize=E(),window.FilePondPluginImagePreview=_(),window.FilePondPluginImageCrop=g(),window.FilePondPluginImageResize=T(),window.FilePondPluginImageTransform=y(),window.FilePondPluginGetFile=O()})(),window.wonder=r})();
3
+ //# sourceMappingURL=filepond.js.map