@formio/js 5.1.0-rc.3 → 5.1.0-rc.5

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 (56) hide show
  1. package/dist/formio.embed.js +1 -1
  2. package/dist/formio.embed.min.js +1 -1
  3. package/dist/formio.embed.min.js.LICENSE.txt +1 -1
  4. package/dist/formio.form.js +7 -7
  5. package/dist/formio.form.min.js +1 -1
  6. package/dist/formio.form.min.js.LICENSE.txt +1 -1
  7. package/dist/formio.full.js +7 -7
  8. package/dist/formio.full.min.js +1 -1
  9. package/dist/formio.full.min.js.LICENSE.txt +1 -1
  10. package/dist/formio.js +6 -6
  11. package/dist/formio.min.js +1 -1
  12. package/dist/formio.min.js.LICENSE.txt +1 -1
  13. package/dist/formio.utils.js +3 -3
  14. package/dist/formio.utils.min.js +1 -1
  15. package/dist/formio.utils.min.js.LICENSE.txt +1 -1
  16. package/lib/cjs/Webform.d.ts +1 -1
  17. package/lib/cjs/components/_classes/field/Field.d.ts +2 -2
  18. package/lib/cjs/components/_classes/field/Field.js +1 -1
  19. package/lib/cjs/components/_classes/nested/NestedComponent.d.ts +1 -1
  20. package/lib/cjs/components/address/Address.d.ts +1 -2
  21. package/lib/cjs/components/button/Button.d.ts +1 -1
  22. package/lib/cjs/components/checkbox/Checkbox.d.ts +1 -1
  23. package/lib/cjs/components/columns/Columns.d.ts +1 -1
  24. package/lib/cjs/components/datagrid/DataGrid.d.ts +1 -1
  25. package/lib/cjs/components/day/Day.d.ts +1 -1
  26. package/lib/cjs/components/file/File.d.ts +1 -1
  27. package/lib/cjs/components/radio/Radio.d.ts +1 -1
  28. package/lib/cjs/components/select/Select.d.ts +1 -1
  29. package/lib/cjs/components/survey/Survey.d.ts +1 -1
  30. package/lib/cjs/components/table/Table.d.ts +1 -1
  31. package/lib/cjs/components/tabs/Tabs.d.ts +1 -1
  32. package/lib/cjs/formio.embed.d.ts +1 -1
  33. package/lib/cjs/formio.embed.js +3 -0
  34. package/lib/cjs/providers/address/GoogleAddressProvider.d.ts +5 -0
  35. package/lib/cjs/providers/address/GoogleAddressProvider.js +23 -1
  36. package/lib/mjs/Webform.d.ts +1 -1
  37. package/lib/mjs/components/_classes/field/Field.d.ts +2 -2
  38. package/lib/mjs/components/_classes/field/Field.js +1 -1
  39. package/lib/mjs/components/_classes/nested/NestedComponent.d.ts +1 -1
  40. package/lib/mjs/components/address/Address.d.ts +1 -2
  41. package/lib/mjs/components/button/Button.d.ts +1 -1
  42. package/lib/mjs/components/checkbox/Checkbox.d.ts +1 -1
  43. package/lib/mjs/components/columns/Columns.d.ts +1 -1
  44. package/lib/mjs/components/datagrid/DataGrid.d.ts +1 -1
  45. package/lib/mjs/components/day/Day.d.ts +1 -1
  46. package/lib/mjs/components/file/File.d.ts +1 -1
  47. package/lib/mjs/components/radio/Radio.d.ts +1 -1
  48. package/lib/mjs/components/select/Select.d.ts +1 -1
  49. package/lib/mjs/components/survey/Survey.d.ts +1 -1
  50. package/lib/mjs/components/table/Table.d.ts +1 -1
  51. package/lib/mjs/components/tabs/Tabs.d.ts +1 -1
  52. package/lib/mjs/formio.embed.d.ts +1 -1
  53. package/lib/mjs/formio.embed.js +1 -0
  54. package/lib/mjs/providers/address/GoogleAddressProvider.d.ts +5 -0
  55. package/lib/mjs/providers/address/GoogleAddressProvider.js +22 -1
  56. package/package.json +2 -2
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see formio.embed.min.js.LICENSE.txt */
2
- !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.Formio=o():e.Formio=o()}(self,(function(){return function(){"use strict";var e={56036:function(e,o){Object.defineProperty(o,"__esModule",{value:!0});class t{constructor(e,o={}){this.baseUrl=e||t.defaultCDN,this.overrides=o,this.libs={js:"",ace:"1.4.12",bootstrap:"5.3.3",bootstrap4:"4.6.2",bootstrap5:"5.3.3",bootswatch:"5.3.3","bootstrap-icons":"1.11.1",ckeditor:"19.0.0",flatpickr:"4.6.8","flatpickr-formio":"4.6.13-formio.3","font-awesome":"4.7.0",grid:"latest","moment-timezone":"latest",quill:"2.0.0-dev.3","shortcut-buttons-flatpickr":"0.4.0",uswds:"2.4.8",core:""},this.updateUrls()}getVersion(e){return this.libs[e]}setVersion(e,o){this.libs[e]=o,this.updateUrls()}setBaseUrl(e){this.baseUrl=e,this.updateUrls()}setOverrideUrl(e,o){this.overrides[e]=o,this.updateUrls()}removeOverride(e){delete this.overrides[e],this.updateUrls()}removeOverrides(){this.overrides={},this.updateUrls()}buildUrl(e,o,t){let s=e;return o&&(s+=`/${o}`),e.match(/cdn\.(test-)?form.io/)&&t&&"latest"!==t&&(s+=`/${t}`),s}updateUrls(){for(const e in this.libs)if(e in this.overrides)if("string"==typeof this.overrides[e])this[e]=this.buildUrl(this.overrides[e],e,this.libs[e]);else{const o=this.overrides[e];this[e]=this.buildUrl(o.cdn,o.lib||"",o.version||"")}else this[e]=this.buildUrl(this.baseUrl,e,this.libs[e])}}t.defaultCDN="https://cdn.form.io",o.default=t},96517:function(e,o,t){Object.defineProperty(o,"__esModule",{value:!0}),o.Formio=o.embed=void 0;const s=t(95413);Object.defineProperty(o,"Formio",{enumerable:!0,get:function(){return s.Formio}}),o.embed=function(e={}){const o=document.getElementsByTagName("script");e=Object.assign({},window.FormioConfig||{},e);let t=null,i=o.length;const r=e.scriptName||"formio.embed.";for(;i--;)if(o[i].src&&-1!==o[i].src.indexOf(r)){t=o[i];break}if(t){const o={};t.src.replace(/^[^?]+\??/,"").replace(/\?/g,"&").split("&").forEach((e=>{o[e.split("=")[0]]=e.split("=")[1]&&decodeURIComponent(e.split("=")[1])}));let i=t.src.replace(/^([^?]+).*/,"$1").split("/");i.pop();let r="";["js","offline"].includes(i[i.length-1])?(i.pop(),i=r=i.join("/"),i+="/js"):i=i.join("/");const n="true"===o.debug||"1"===o.debug,a=n?"formio.form":"formio.form.min";s.Formio.config=Object.assign({script:o.script||`${i}/${a}.js`,style:o.styles||`${i}/${a}.css`,cdn:o.cdn||r,class:o.class||"formio-form-wrapper",src:o.src,form:null,submission:null,project:o.project,base:o.base||"https://api.form.io",submit:o.submit,includeLibs:"true"===o.libs||"1"===o.libs,noshadow:"false"===o.shadow||"0"===o.shadow,template:o.template||"bootstrap",debug:n,config:{},redirect:o.return||o.redirect,embedCSS:`${i}/formio.embed.css`,success:o.success||"Thank you for your submission!",before:null,after:null},e),s.Formio.config.alter&&s.Formio.config.alter(s.Formio.config);const c=s.Formio.config.form||s.Formio.config.src;if(c){s.Formio.debug("Embedding Configuration",e),s.Formio.config.id=`formio-${Math.random().toString(36).substring(7)}`,s.Formio.debug("Creating form element");const o=s.Formio.createElement("div",{id:s.Formio.config.id,class:s.Formio.config.class});t.parentNode.insertBefore(o,t.parentNode.firstElementChild.nextSibling),s.Formio.createForm(o,c,s.Formio.config.config).then((e=>{s.Formio.config.submit&&(e.nosubmit=!0),e.on("submitDone",(o=>s.Formio.submitDone(e,o))),e.on("submit",(o=>{if(s.Formio.debug("on('submit')",o),s.Formio.config.submit){s.Formio.debug(`Sending submission to ${s.Formio.config.submit}`);const t={"content-type":"application/json"},i=s.Formio.FormioClass.getToken();i&&(t["x-jwt-token"]=i),s.Formio.FormioClass.fetch(s.Formio.config.submit,{body:JSON.stringify(o),headers:t,method:"POST",mode:"cors"}).then((e=>e.json())).then((o=>{s.Formio.submitDone(e,o)}))}}))}))}}else document.write("<span>Could not locate the Embedded form.</span>")}},95413:function(e,o,t){var s,i=this&&this.__awaiter||function(e,o,t,s){return new(t||(t=Promise))((function(i,r){function n(e){try{c(s.next(e))}catch(e){r(e)}}function a(e){try{c(s.throw(e))}catch(e){r(e)}}function c(e){var o;e.done?i(e.value):(o=e.value,o instanceof t?o:new t((function(e){e(o)}))).then(n,a)}c((s=s.apply(e,o||[])).next())}))},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o,"__esModule",{value:!0}),o.FormBuilder=o.Form=o.Formio=void 0;const n=r(t(56036));class a{static setLicense(e,o=!1){s.license=e,!o&&s.FormioClass&&s.FormioClass.setLicense(e)}static setBaseUrl(e,o=!1){s.baseUrl=e,!o&&s.FormioClass&&s.FormioClass.setBaseUrl(e)}static setApiUrl(e,o=!1){s.baseUrl=e,!o&&s.FormioClass&&s.FormioClass.setApiUrl(e)}static setProjectUrl(e,o=!1){s.projectUrl=e,!o&&s.FormioClass&&s.FormioClass.setProjectUrl(e)}static setAppUrl(e,o=!1){s.projectUrl=e,!o&&s.FormioClass&&s.FormioClass.setAppUrl(e)}static setPathType(e,o=!1){s.pathType=e,!o&&s.FormioClass&&s.FormioClass.setPathType(e)}static debug(...e){s.config.debug&&console.log(...e)}static clearCache(){s.FormioClass&&s.FormioClass.clearCache()}static global(e,o=""){const t=window[e];return o&&t&&!t[o]?null:(s.debug(`Getting global ${e}`,t),t)}static use(e){s.FormioClass&&s.FormioClass.isRenderer?s.FormioClass.use(e):s.modules.push(e)}static createElement(e,o,t){const i=document.createElement(e);return o?(Object.keys(o).forEach((e=>{i.setAttribute(e,o[e])})),(t||[]).forEach((e=>{i.appendChild(s.createElement(e.tag,e.attrs,e.children))})),i):i}static addScript(e,o,t,r=""){return i(this,void 0,void 0,(function*(){if(!o)return Promise.resolve();if("string"!=typeof o&&o.length)return Promise.all(o.map((o=>s.addScript(e,o))));if(t&&s.global(t,r))return s.debug(`${t} already loaded.`),Promise.resolve(s.global(t));s.debug("Adding Script",o);try{e.appendChild(s.createElement("script",{src:o}))}catch(e){return s.debug(e),Promise.resolve()}return t?new Promise((e=>{s.debug(`Waiting to load ${t}`);const o=setInterval((()=>{s.global(t,r)&&(clearInterval(o),s.debug(`${t} loaded.`),e(s.global(t)))}),100)})):Promise.resolve()}))}static addStyles(e,o){return i(this,void 0,void 0,(function*(){o&&("string"!=typeof o&&o.length?o.forEach((o=>s.addStyles(e,o))):(s.debug("Adding Styles",o),e.appendChild(s.createElement("link",{rel:"stylesheet",href:o}))))}))}static submitDone(e,o){return i(this,void 0,void 0,(function*(){s.debug("Submision Complete",o),s.config.submitDone&&s.config.submitDone(o,e);const t=(s.config.success||"").toString();t&&"false"!==t.toLowerCase()&&e.element&&(e.element.innerHTML=`<div class="alert-success" role="alert">${t}</div>`);let i=s.config.redirect;if(!i&&e._form&&e._form.settings&&(e._form.settings.returnUrl||e._form.settings.redirect)&&(s.debug("Return url found in form configuration"),i=e._form.settings.returnUrl||e._form.settings.redirect),i){const t=e.formio?e.formio.formUrl:"",r=!!i.match(/\?/),n=0===i.indexOf(location.origin);i+=r?"&":"?",i+=`sub=${o._id}`,!n&&t&&(i+=`&form=${encodeURIComponent(t)}`),s.debug("Return URL",i),window.location.href=i,n&&window.location.reload()}}))}static formioScript(e,o){return o=o||s.config.includeBuilder,s.fullAdded||o?(s.fullAdded=!0,e.replace("formio.form","formio.full")):e}static addLibrary(e,o,t){return i(this,void 0,void 0,(function*(){if(o){if(o.dependencies)for(let t=0;t<o.dependencies.length;t++){const i=o.dependencies[t];yield s.addLibrary(e,s.config.libs[i],i)}if(o.css&&(yield s.addStyles(o.global?document.body:e,o.css)),o.js){const i=yield s.addScript(o.global?document.body:e,o.js,!!o.use&&t);if(o.use){s.debug(`Using ${t}`);const e=o.options||{};!e.license&&s.license&&(e.license=s.license),s.use("function"==typeof o.use?o.use(i):i,e)}}if(o.globalStyle){const e=s.createElement("style");e.type="text/css",e.innerHTML=o.globalStyle,document.body.appendChild(e)}}}))}static addLoader(e){return i(this,void 0,void 0,(function*(){e.appendChild(s.createElement("div",{class:"formio-loader"},[{tag:"div",attrs:{class:"loader-wrapper"},children:[{tag:"div",attrs:{class:"loader text-center"}}]}]))}))}static init(e,o={},t=!1){return i(this,void 0,void 0,(function*(){s.cdn=new n.default(s.config.cdn,s.config.cdnUrls||{}),s.config.libs=s.config.libs||{uswds:{dependencies:["fontawesome"],js:`${s.cdn.uswds}/uswds.min.js`,css:`${s.cdn.uswds}/uswds.min.css`,use:!0},fontawesome:{css:"https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css",globalStyle:"@font-face {\n font-family: 'FontAwesome';\n src: url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.eot?v=4.7.0');\n src: url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');\n font-weight: normal;\n font-style: normal;\n }"},bootstrap4:{dependencies:["fontawesome"],css:`${s.cdn.bootstrap4}/css/bootstrap.min.css`},bootstrap:{dependencies:["bootstrap-icons"],css:`${s.cdn.bootstrap}/css/bootstrap.min.css`},"bootstrap-icons":{css:"https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.min.css",globalStyle:'@font-face {\n font-display: block;\n font-family: "bootstrap-icons";\n src: url("https://cdn.jsdelivr.net/npm/bootstrap-icons/font/fonts/bootstrap-icons.woff2?dd67030699838ea613ee6dbda90effa6") format("woff2"),\n url("https://cdn.jsdelivr.net/npm/bootstrap-icons/font/fonts/bootstrap-icons.woff?dd67030699838ea613ee6dbda90effa6") format("woff");\n }'}},["cerulean","cosmo","cyborg","darkly","flatly","journal","litera","lumen","lux","materia","minty","pulse","sandstone","simplex","sketchy","slate","solar","spacelab","superhero","united","yeti"].forEach((e=>{s.config.libs[e]={dependencies:["bootstrap-icons"],css:`${s.cdn.bootswatch}/dist/${e}/bootstrap.min.css`}}));const i=s.config.id||`formio-${Math.random().toString(36).substring(7)}`;let r=s.createElement("div",{id:`${i}-wrapper`});e.parentNode.insertBefore(r,e);const a=s.config.includeLibs&&!s.config.noshadow&&"function"==typeof r.attachShadow;a&&(r=r.attachShadow({mode:"open"}),o.shadowRoot=r),e.parentNode.removeChild(e),r.appendChild(e);const c=a?r:document.body;yield s.addStyles(c,s.config.embedCSS||`${s.cdn.js}/formio.embed.css`),s.addLoader(r);const l=s.config.full?"formio.full":"formio.form",d=s.config.debug?l:`${l}.min`;if(s.FormioClass=yield s.addScript(c,s.formioScript(s.config.script||`${s.cdn.js}/${d}.js`,t),"Formio",t?"isBuilder":"isRenderer"),s.FormioClass.cdn=s.cdn,s.FormioClass.setBaseUrl(o.baseUrl||s.baseUrl||s.config.base),s.FormioClass.setProjectUrl(o.projectUrl||s.projectUrl||s.config.project),s.FormioClass.language=s.language,s.setLicense(s.license||s.config.license||!1),s.modules.forEach((e=>{s.FormioClass.use(e)})),s.icons&&(s.FormioClass.icons=s.icons),s.pathType&&s.FormioClass.setPathType(s.pathType),s.config.template&&s.config.includeLibs&&(yield s.addLibrary(c,s.config.libs[s.config.template],s.config.template)),s.config.libraries||(s.config.libraries=s.config.modules||{}),s.config.premium&&(s.config.libraries.premium=s.config.premium),s.config.libraries)for(const e in s.config.libraries){const o=s.config.libraries[e];o.use=o.use||!0,yield s.addLibrary(c,o,e)}return yield s.addStyles(c,s.formioScript(s.config.style||`${s.cdn.js}/${d}.css`,t)),s.config.before&&(yield s.config.before(s.FormioClass,e,s.config)),s.FormioClass.license=!0,s._formioReady(s.FormioClass),r}))}static afterCreate(e,o,t){return i(this,void 0,void 0,(function*(){const i=o.querySelector(".formio-loader");return i&&o.removeChild(i),s.FormioClass.events.emit(t,e),s.config.after&&(s.debug("Calling ready callback"),s.config.after(e,s.config)),e}))}static createForm(e,o,t={}){return i(this,void 0,void 0,(function*(){if(s.FormioClass)return s.FormioClass.createForm(e,o,Object.assign(Object.assign({},t),{noLoader:!0}));const i=yield s.init(e,t);return s.FormioClass.createForm(e,o,Object.assign(Object.assign({},t),{noLoader:!0})).then((e=>(s.config.submission&&(s.debug("Setting submission",s.config.submission),e.submission=s.config.submission),s.afterCreate(e,i,"formEmbedded"),e)))}))}static builder(e,o,t={}){var r;return i(this,void 0,void 0,(function*(){if(null===(r=s.FormioClass)||void 0===r?void 0:r.builder)return s.FormioClass.builder(e,o,t);const i=yield s.init(e,t,!0);return s.FormioClass.builder(e,o,t).then((e=>(s.afterCreate(e,i,"builderEmbedded"),e)))}))}}o.Formio=a,s=a,a.FormioClass=null,a.config={},a.modules=[],a.icons="",a.license="",a.formioReady=new Promise(((e,o)=>{s._formioReady=e,s._formioReadyReject=o})),a.version="5.1.0-rc.3",a.Report={create:(e,o,t={})=>i(void 0,void 0,void 0,(function*(){var i;if(null===(i=s.FormioClass)||void 0===i?void 0:i.Report)return s.FormioClass.Report.create(e,o,t);const r=yield s.init(e,t,!0);return s.FormioClass.Report.create(e,o,t).then((e=>(s.afterCreate(e,r,"reportEmbedded"),e)))}))},n.default.defaultCDN=a.version.includes("rc")?"https://cdn.test-form.io":"https://cdn.form.io";class c{constructor(e,o,t){this.form=o,this.element=e,this.options=t||{},this.init(),this.instance={proxy:!0,ready:this.ready,destroy:()=>{}}}init(){this.instance&&!this.instance.proxy&&this.instance.destroy(),this.element.innerHTML="",this.ready=this.create().then((e=>(this.instance=e,this.form=e.form,e)))}create(){return a.createForm(this.element,this.form,this.options)}setForm(e){this.form=e,this.instance&&this.instance.setForm(e)}setDisplay(e){return this.instance.proxy||(this.form.display=e,this.instance.destroy(),this.ready=this.create().then((e=>{this.instance=e,this.setForm(this.form)}))),this.ready}}o.Form=c;class l extends c{create(){return a.builder(this.element,this.form,this.options)}}o.FormBuilder=l,a.Form=c,a.FormBuilder=l}},o={};var t={};return(0,function t(s){var i=o[s];if(void 0!==i)return i.exports;var r=o[s]={exports:{}};return e[s].call(r.exports,r,r.exports,t),r.exports}(96517).embed)(),t.Formio}()}));
2
+ !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.Formio=o():e.Formio=o()}(self,(function(){return function(){"use strict";var e={56036:function(e,o){Object.defineProperty(o,"__esModule",{value:!0});class t{constructor(e,o={}){this.baseUrl=e||t.defaultCDN,this.overrides=o,this.libs={js:"",ace:"1.4.12",bootstrap:"5.3.3",bootstrap4:"4.6.2",bootstrap5:"5.3.3",bootswatch:"5.3.3","bootstrap-icons":"1.11.1",ckeditor:"19.0.0",flatpickr:"4.6.8","flatpickr-formio":"4.6.13-formio.3","font-awesome":"4.7.0",grid:"latest","moment-timezone":"latest",quill:"2.0.0-dev.3","shortcut-buttons-flatpickr":"0.4.0",uswds:"2.4.8",core:""},this.updateUrls()}getVersion(e){return this.libs[e]}setVersion(e,o){this.libs[e]=o,this.updateUrls()}setBaseUrl(e){this.baseUrl=e,this.updateUrls()}setOverrideUrl(e,o){this.overrides[e]=o,this.updateUrls()}removeOverride(e){delete this.overrides[e],this.updateUrls()}removeOverrides(){this.overrides={},this.updateUrls()}buildUrl(e,o,t){let s=e;return o&&(s+=`/${o}`),e.match(/cdn\.(test-)?form.io/)&&t&&"latest"!==t&&(s+=`/${t}`),s}updateUrls(){for(const e in this.libs)if(e in this.overrides)if("string"==typeof this.overrides[e])this[e]=this.buildUrl(this.overrides[e],e,this.libs[e]);else{const o=this.overrides[e];this[e]=this.buildUrl(o.cdn,o.lib||"",o.version||"")}else this[e]=this.buildUrl(this.baseUrl,e,this.libs[e])}}t.defaultCDN="https://cdn.form.io",o.default=t},96517:function(e,o,t){Object.defineProperty(o,"__esModule",{value:!0}),o.Formio=o.embed=void 0;const s=t(95413);Object.defineProperty(o,"Formio",{enumerable:!0,get:function(){return s.Formio}}),o.embed=function(e={}){const o=document.getElementsByTagName("script");e=Object.assign({},window.FormioConfig||{},e);let t=null,i=o.length;const r=e.scriptName||"formio.embed.";for(;i--;)if(o[i].src&&-1!==o[i].src.indexOf(r)){t=o[i];break}if(t){const o={};t.src.replace(/^[^?]+\??/,"").replace(/\?/g,"&").split("&").forEach((e=>{o[e.split("=")[0]]=e.split("=")[1]&&decodeURIComponent(e.split("=")[1])}));let i=t.src.replace(/^([^?]+).*/,"$1").split("/");i.pop();let r="";["js","offline"].includes(i[i.length-1])?(i.pop(),i=r=i.join("/"),i+="/js"):i=i.join("/");const n="true"===o.debug||"1"===o.debug,a=n?"formio.form":"formio.form.min";s.Formio.config=Object.assign({script:o.script||`${i}/${a}.js`,style:o.styles||`${i}/${a}.css`,cdn:o.cdn||r,class:o.class||"formio-form-wrapper",src:o.src,form:null,submission:null,project:o.project,base:o.base||"https://api.form.io",submit:o.submit,includeLibs:"true"===o.libs||"1"===o.libs,noshadow:"false"===o.shadow||"0"===o.shadow,template:o.template||"bootstrap",debug:n,config:{},redirect:o.return||o.redirect,embedCSS:`${i}/formio.embed.css`,success:o.success||"Thank you for your submission!",before:null,after:null},e),s.Formio.config.alter&&s.Formio.config.alter(s.Formio.config);const c=s.Formio.config.form||s.Formio.config.src;if(c){s.Formio.debug("Embedding Configuration",e),s.Formio.config.id=`formio-${Math.random().toString(36).substring(7)}`,s.Formio.debug("Creating form element");const o=s.Formio.createElement("div",{id:s.Formio.config.id,class:s.Formio.config.class});t.parentNode.insertBefore(o,t.parentNode.firstElementChild.nextSibling),s.Formio.createForm(o,c,s.Formio.config.config).then((e=>{s.Formio.config.submit&&(e.nosubmit=!0),e.on("submitDone",(o=>s.Formio.submitDone(e,o))),e.on("submit",(o=>{if(s.Formio.debug("on('submit')",o),s.Formio.config.submit){s.Formio.debug(`Sending submission to ${s.Formio.config.submit}`);const t={"content-type":"application/json"},i=s.Formio.FormioClass.getToken();i&&(t["x-jwt-token"]=i),s.Formio.FormioClass.fetch(s.Formio.config.submit,{body:JSON.stringify(o),headers:t,method:"POST",mode:"cors"}).then((e=>e.json())).then((o=>{s.Formio.submitDone(e,o)}))}}))}))}}else document.write("<span>Could not locate the Embedded form.</span>")}},95413:function(e,o,t){var s,i=this&&this.__awaiter||function(e,o,t,s){return new(t||(t=Promise))((function(i,r){function n(e){try{c(s.next(e))}catch(e){r(e)}}function a(e){try{c(s.throw(e))}catch(e){r(e)}}function c(e){var o;e.done?i(e.value):(o=e.value,o instanceof t?o:new t((function(e){e(o)}))).then(n,a)}c((s=s.apply(e,o||[])).next())}))},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o,"__esModule",{value:!0}),o.FormBuilder=o.Form=o.Formio=void 0;const n=r(t(56036));class a{static setLicense(e,o=!1){s.license=e,!o&&s.FormioClass&&s.FormioClass.setLicense(e)}static setBaseUrl(e,o=!1){s.baseUrl=e,!o&&s.FormioClass&&s.FormioClass.setBaseUrl(e)}static setApiUrl(e,o=!1){s.baseUrl=e,!o&&s.FormioClass&&s.FormioClass.setApiUrl(e)}static setProjectUrl(e,o=!1){s.projectUrl=e,!o&&s.FormioClass&&s.FormioClass.setProjectUrl(e)}static setAppUrl(e,o=!1){s.projectUrl=e,!o&&s.FormioClass&&s.FormioClass.setAppUrl(e)}static setPathType(e,o=!1){s.pathType=e,!o&&s.FormioClass&&s.FormioClass.setPathType(e)}static debug(...e){s.config.debug&&console.log(...e)}static clearCache(){s.FormioClass&&s.FormioClass.clearCache()}static global(e,o=""){const t=window[e];return o&&t&&!t[o]?null:(s.debug(`Getting global ${e}`,t),t)}static use(e){s.FormioClass&&s.FormioClass.isRenderer?s.FormioClass.use(e):s.modules.push(e)}static createElement(e,o,t){const i=document.createElement(e);return o?(Object.keys(o).forEach((e=>{i.setAttribute(e,o[e])})),(t||[]).forEach((e=>{i.appendChild(s.createElement(e.tag,e.attrs,e.children))})),i):i}static addScript(e,o,t,r=""){return i(this,void 0,void 0,(function*(){if(!o)return Promise.resolve();if("string"!=typeof o&&o.length)return Promise.all(o.map((o=>s.addScript(e,o))));if(t&&s.global(t,r))return s.debug(`${t} already loaded.`),Promise.resolve(s.global(t));s.debug("Adding Script",o);try{e.appendChild(s.createElement("script",{src:o}))}catch(e){return s.debug(e),Promise.resolve()}return t?new Promise((e=>{s.debug(`Waiting to load ${t}`);const o=setInterval((()=>{s.global(t,r)&&(clearInterval(o),s.debug(`${t} loaded.`),e(s.global(t)))}),100)})):Promise.resolve()}))}static addStyles(e,o){return i(this,void 0,void 0,(function*(){o&&("string"!=typeof o&&o.length?o.forEach((o=>s.addStyles(e,o))):(s.debug("Adding Styles",o),e.appendChild(s.createElement("link",{rel:"stylesheet",href:o}))))}))}static submitDone(e,o){return i(this,void 0,void 0,(function*(){s.debug("Submision Complete",o),s.config.submitDone&&s.config.submitDone(o,e);const t=(s.config.success||"").toString();t&&"false"!==t.toLowerCase()&&e.element&&(e.element.innerHTML=`<div class="alert-success" role="alert">${t}</div>`);let i=s.config.redirect;if(!i&&e._form&&e._form.settings&&(e._form.settings.returnUrl||e._form.settings.redirect)&&(s.debug("Return url found in form configuration"),i=e._form.settings.returnUrl||e._form.settings.redirect),i){const t=e.formio?e.formio.formUrl:"",r=!!i.match(/\?/),n=0===i.indexOf(location.origin);i+=r?"&":"?",i+=`sub=${o._id}`,!n&&t&&(i+=`&form=${encodeURIComponent(t)}`),s.debug("Return URL",i),window.location.href=i,n&&window.location.reload()}}))}static formioScript(e,o){return o=o||s.config.includeBuilder,s.fullAdded||o?(s.fullAdded=!0,e.replace("formio.form","formio.full")):e}static addLibrary(e,o,t){return i(this,void 0,void 0,(function*(){if(o){if(o.dependencies)for(let t=0;t<o.dependencies.length;t++){const i=o.dependencies[t];yield s.addLibrary(e,s.config.libs[i],i)}if(o.css&&(yield s.addStyles(o.global?document.body:e,o.css)),o.js){const i=yield s.addScript(o.global?document.body:e,o.js,!!o.use&&t);if(o.use){s.debug(`Using ${t}`);const e=o.options||{};!e.license&&s.license&&(e.license=s.license),s.use("function"==typeof o.use?o.use(i):i,e)}}if(o.globalStyle){const e=s.createElement("style");e.type="text/css",e.innerHTML=o.globalStyle,document.body.appendChild(e)}}}))}static addLoader(e){return i(this,void 0,void 0,(function*(){e.appendChild(s.createElement("div",{class:"formio-loader"},[{tag:"div",attrs:{class:"loader-wrapper"},children:[{tag:"div",attrs:{class:"loader text-center"}}]}]))}))}static init(e,o={},t=!1){return i(this,void 0,void 0,(function*(){s.cdn=new n.default(s.config.cdn,s.config.cdnUrls||{}),s.config.libs=s.config.libs||{uswds:{dependencies:["fontawesome"],js:`${s.cdn.uswds}/uswds.min.js`,css:`${s.cdn.uswds}/uswds.min.css`,use:!0},fontawesome:{css:"https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css",globalStyle:"@font-face {\n font-family: 'FontAwesome';\n src: url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.eot?v=4.7.0');\n src: url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');\n font-weight: normal;\n font-style: normal;\n }"},bootstrap4:{dependencies:["fontawesome"],css:`${s.cdn.bootstrap4}/css/bootstrap.min.css`},bootstrap:{dependencies:["bootstrap-icons"],css:`${s.cdn.bootstrap}/css/bootstrap.min.css`},"bootstrap-icons":{css:"https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.min.css",globalStyle:'@font-face {\n font-display: block;\n font-family: "bootstrap-icons";\n src: url("https://cdn.jsdelivr.net/npm/bootstrap-icons/font/fonts/bootstrap-icons.woff2?dd67030699838ea613ee6dbda90effa6") format("woff2"),\n url("https://cdn.jsdelivr.net/npm/bootstrap-icons/font/fonts/bootstrap-icons.woff?dd67030699838ea613ee6dbda90effa6") format("woff");\n }'}},["cerulean","cosmo","cyborg","darkly","flatly","journal","litera","lumen","lux","materia","minty","pulse","sandstone","simplex","sketchy","slate","solar","spacelab","superhero","united","yeti"].forEach((e=>{s.config.libs[e]={dependencies:["bootstrap-icons"],css:`${s.cdn.bootswatch}/dist/${e}/bootstrap.min.css`}}));const i=s.config.id||`formio-${Math.random().toString(36).substring(7)}`;let r=s.createElement("div",{id:`${i}-wrapper`});e.parentNode.insertBefore(r,e);const a=s.config.includeLibs&&!s.config.noshadow&&"function"==typeof r.attachShadow;a&&(r=r.attachShadow({mode:"open"}),o.shadowRoot=r),e.parentNode.removeChild(e),r.appendChild(e);const c=a?r:document.body;yield s.addStyles(c,s.config.embedCSS||`${s.cdn.js}/formio.embed.css`),s.addLoader(r);const l=s.config.full?"formio.full":"formio.form",d=s.config.debug?l:`${l}.min`;if(s.FormioClass=yield s.addScript(c,s.formioScript(s.config.script||`${s.cdn.js}/${d}.js`,t),"Formio",t?"isBuilder":"isRenderer"),s.FormioClass.cdn=s.cdn,s.FormioClass.setBaseUrl(o.baseUrl||s.baseUrl||s.config.base),s.FormioClass.setProjectUrl(o.projectUrl||s.projectUrl||s.config.project),s.FormioClass.language=s.language,s.setLicense(s.license||s.config.license||!1),s.modules.forEach((e=>{s.FormioClass.use(e)})),s.icons&&(s.FormioClass.icons=s.icons),s.pathType&&s.FormioClass.setPathType(s.pathType),s.config.template&&s.config.includeLibs&&(yield s.addLibrary(c,s.config.libs[s.config.template],s.config.template)),s.config.libraries||(s.config.libraries=s.config.modules||{}),s.config.premium&&(s.config.libraries.premium=s.config.premium),s.config.libraries)for(const e in s.config.libraries){const o=s.config.libraries[e];o.use=o.use||!0,yield s.addLibrary(c,o,e)}return yield s.addStyles(c,s.formioScript(s.config.style||`${s.cdn.js}/${d}.css`,t)),s.config.before&&(yield s.config.before(s.FormioClass,e,s.config)),s.FormioClass.license=!0,s._formioReady(s.FormioClass),r}))}static afterCreate(e,o,t){return i(this,void 0,void 0,(function*(){const i=o.querySelector(".formio-loader");return i&&o.removeChild(i),s.FormioClass.events.emit(t,e),s.config.after&&(s.debug("Calling ready callback"),s.config.after(e,s.config)),e}))}static createForm(e,o,t={}){return i(this,void 0,void 0,(function*(){if(s.FormioClass)return s.FormioClass.createForm(e,o,Object.assign(Object.assign({},t),{noLoader:!0}));const i=yield s.init(e,t);return s.FormioClass.createForm(e,o,Object.assign(Object.assign({},t),{noLoader:!0})).then((e=>(s.config.submission&&(s.debug("Setting submission",s.config.submission),e.submission=s.config.submission),s.afterCreate(e,i,"formEmbedded"),e)))}))}static builder(e,o,t={}){var r;return i(this,void 0,void 0,(function*(){if(null===(r=s.FormioClass)||void 0===r?void 0:r.builder)return s.FormioClass.builder(e,o,t);const i=yield s.init(e,t,!0);return s.FormioClass.builder(e,o,t).then((e=>(s.afterCreate(e,i,"builderEmbedded"),e)))}))}}o.Formio=a,s=a,a.FormioClass=null,a.config={},a.modules=[],a.icons="",a.license="",a.formioReady=new Promise(((e,o)=>{s._formioReady=e,s._formioReadyReject=o})),a.version="5.1.0-rc.5",a.Report={create:(e,o,t={})=>i(void 0,void 0,void 0,(function*(){var i;if(null===(i=s.FormioClass)||void 0===i?void 0:i.Report)return s.FormioClass.Report.create(e,o,t);const r=yield s.init(e,t,!0);return s.FormioClass.Report.create(e,o,t).then((e=>(s.afterCreate(e,r,"reportEmbedded"),e)))}))},n.default.defaultCDN=a.version.includes("rc")?"https://cdn.test-form.io":"https://cdn.form.io";class c{constructor(e,o,t){this.form=o,this.element=e,this.options=t||{},this.init(),this.instance={proxy:!0,ready:this.ready,destroy:()=>{}}}init(){this.instance&&!this.instance.proxy&&this.instance.destroy(),this.element.innerHTML="",this.ready=this.create().then((e=>(this.instance=e,this.form=e.form,e)))}create(){return a.createForm(this.element,this.form,this.options)}setForm(e){this.form=e,this.instance&&this.instance.setForm(e)}setDisplay(e){return this.instance.proxy||(this.form.display=e,this.instance.destroy(),this.ready=this.create().then((e=>{this.instance=e,this.setForm(this.form)}))),this.ready}}o.Form=c;class l extends c{create(){return a.builder(this.element,this.form,this.options)}}o.FormBuilder=l,a.Form=c,a.FormBuilder=l}},o={};function t(s){var i=o[s];if(void 0!==i)return i.exports;var r=o[s]={exports:{}};return e[s].call(r.exports,r,r.exports,t),r.exports}var s={};return function(){var e=s;e.Formio=void 0,(0,t(96517).embed)();var o=t(96517);Object.defineProperty(e,"Formio",{enumerable:!0,get:function(){return o.Formio}})}(),s.Formio}()}));
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see formio.embed.min.js.LICENSE.txt */
2
- !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.Formio=o():e.Formio=o()}(self,(function(){return function(){"use strict";var e={56036:function(e,o){Object.defineProperty(o,"__esModule",{value:!0});class t{constructor(e,o={}){this.baseUrl=e||t.defaultCDN,this.overrides=o,this.libs={js:"",ace:"1.4.12",bootstrap:"5.3.3",bootstrap4:"4.6.2",bootstrap5:"5.3.3",bootswatch:"5.3.3","bootstrap-icons":"1.11.1",ckeditor:"19.0.0",flatpickr:"4.6.8","flatpickr-formio":"4.6.13-formio.3","font-awesome":"4.7.0",grid:"latest","moment-timezone":"latest",quill:"2.0.0-dev.3","shortcut-buttons-flatpickr":"0.4.0",uswds:"2.4.8",core:""},this.updateUrls()}getVersion(e){return this.libs[e]}setVersion(e,o){this.libs[e]=o,this.updateUrls()}setBaseUrl(e){this.baseUrl=e,this.updateUrls()}setOverrideUrl(e,o){this.overrides[e]=o,this.updateUrls()}removeOverride(e){delete this.overrides[e],this.updateUrls()}removeOverrides(){this.overrides={},this.updateUrls()}buildUrl(e,o,t){let s=e;return o&&(s+=`/${o}`),e.match(/cdn\.(test-)?form.io/)&&t&&"latest"!==t&&(s+=`/${t}`),s}updateUrls(){for(const e in this.libs)if(e in this.overrides)if("string"==typeof this.overrides[e])this[e]=this.buildUrl(this.overrides[e],e,this.libs[e]);else{const o=this.overrides[e];this[e]=this.buildUrl(o.cdn,o.lib||"",o.version||"")}else this[e]=this.buildUrl(this.baseUrl,e,this.libs[e])}}t.defaultCDN="https://cdn.form.io",o.default=t},96517:function(e,o,t){Object.defineProperty(o,"__esModule",{value:!0}),o.Formio=o.embed=void 0;const s=t(95413);Object.defineProperty(o,"Formio",{enumerable:!0,get:function(){return s.Formio}}),o.embed=function(e={}){const o=document.getElementsByTagName("script");e=Object.assign({},window.FormioConfig||{},e);let t=null,i=o.length;const r=e.scriptName||"formio.embed.";for(;i--;)if(o[i].src&&-1!==o[i].src.indexOf(r)){t=o[i];break}if(t){const o={};t.src.replace(/^[^?]+\??/,"").replace(/\?/g,"&").split("&").forEach((e=>{o[e.split("=")[0]]=e.split("=")[1]&&decodeURIComponent(e.split("=")[1])}));let i=t.src.replace(/^([^?]+).*/,"$1").split("/");i.pop();let r="";["js","offline"].includes(i[i.length-1])?(i.pop(),i=r=i.join("/"),i+="/js"):i=i.join("/");const n="true"===o.debug||"1"===o.debug,a=n?"formio.form":"formio.form.min";s.Formio.config=Object.assign({script:o.script||`${i}/${a}.js`,style:o.styles||`${i}/${a}.css`,cdn:o.cdn||r,class:o.class||"formio-form-wrapper",src:o.src,form:null,submission:null,project:o.project,base:o.base||"https://api.form.io",submit:o.submit,includeLibs:"true"===o.libs||"1"===o.libs,noshadow:"false"===o.shadow||"0"===o.shadow,template:o.template||"bootstrap",debug:n,config:{},redirect:o.return||o.redirect,embedCSS:`${i}/formio.embed.css`,success:o.success||"Thank you for your submission!",before:null,after:null},e),s.Formio.config.alter&&s.Formio.config.alter(s.Formio.config);const c=s.Formio.config.form||s.Formio.config.src;if(c){s.Formio.debug("Embedding Configuration",e),s.Formio.config.id=`formio-${Math.random().toString(36).substring(7)}`,s.Formio.debug("Creating form element");const o=s.Formio.createElement("div",{id:s.Formio.config.id,class:s.Formio.config.class});t.parentNode.insertBefore(o,t.parentNode.firstElementChild.nextSibling),s.Formio.createForm(o,c,s.Formio.config.config).then((e=>{s.Formio.config.submit&&(e.nosubmit=!0),e.on("submitDone",(o=>s.Formio.submitDone(e,o))),e.on("submit",(o=>{if(s.Formio.debug("on('submit')",o),s.Formio.config.submit){s.Formio.debug(`Sending submission to ${s.Formio.config.submit}`);const t={"content-type":"application/json"},i=s.Formio.FormioClass.getToken();i&&(t["x-jwt-token"]=i),s.Formio.FormioClass.fetch(s.Formio.config.submit,{body:JSON.stringify(o),headers:t,method:"POST",mode:"cors"}).then((e=>e.json())).then((o=>{s.Formio.submitDone(e,o)}))}}))}))}}else document.write("<span>Could not locate the Embedded form.</span>")}},95413:function(e,o,t){var s,i=this&&this.__awaiter||function(e,o,t,s){return new(t||(t=Promise))((function(i,r){function n(e){try{c(s.next(e))}catch(e){r(e)}}function a(e){try{c(s.throw(e))}catch(e){r(e)}}function c(e){var o;e.done?i(e.value):(o=e.value,o instanceof t?o:new t((function(e){e(o)}))).then(n,a)}c((s=s.apply(e,o||[])).next())}))},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o,"__esModule",{value:!0}),o.FormBuilder=o.Form=o.Formio=void 0;const n=r(t(56036));class a{static setLicense(e,o=!1){s.license=e,!o&&s.FormioClass&&s.FormioClass.setLicense(e)}static setBaseUrl(e,o=!1){s.baseUrl=e,!o&&s.FormioClass&&s.FormioClass.setBaseUrl(e)}static setApiUrl(e,o=!1){s.baseUrl=e,!o&&s.FormioClass&&s.FormioClass.setApiUrl(e)}static setProjectUrl(e,o=!1){s.projectUrl=e,!o&&s.FormioClass&&s.FormioClass.setProjectUrl(e)}static setAppUrl(e,o=!1){s.projectUrl=e,!o&&s.FormioClass&&s.FormioClass.setAppUrl(e)}static setPathType(e,o=!1){s.pathType=e,!o&&s.FormioClass&&s.FormioClass.setPathType(e)}static debug(...e){s.config.debug&&console.log(...e)}static clearCache(){s.FormioClass&&s.FormioClass.clearCache()}static global(e,o=""){const t=window[e];return o&&t&&!t[o]?null:(s.debug(`Getting global ${e}`,t),t)}static use(e){s.FormioClass&&s.FormioClass.isRenderer?s.FormioClass.use(e):s.modules.push(e)}static createElement(e,o,t){const i=document.createElement(e);return o?(Object.keys(o).forEach((e=>{i.setAttribute(e,o[e])})),(t||[]).forEach((e=>{i.appendChild(s.createElement(e.tag,e.attrs,e.children))})),i):i}static addScript(e,o,t,r=""){return i(this,void 0,void 0,(function*(){if(!o)return Promise.resolve();if("string"!=typeof o&&o.length)return Promise.all(o.map((o=>s.addScript(e,o))));if(t&&s.global(t,r))return s.debug(`${t} already loaded.`),Promise.resolve(s.global(t));s.debug("Adding Script",o);try{e.appendChild(s.createElement("script",{src:o}))}catch(e){return s.debug(e),Promise.resolve()}return t?new Promise((e=>{s.debug(`Waiting to load ${t}`);const o=setInterval((()=>{s.global(t,r)&&(clearInterval(o),s.debug(`${t} loaded.`),e(s.global(t)))}),100)})):Promise.resolve()}))}static addStyles(e,o){return i(this,void 0,void 0,(function*(){o&&("string"!=typeof o&&o.length?o.forEach((o=>s.addStyles(e,o))):(s.debug("Adding Styles",o),e.appendChild(s.createElement("link",{rel:"stylesheet",href:o}))))}))}static submitDone(e,o){return i(this,void 0,void 0,(function*(){s.debug("Submision Complete",o),s.config.submitDone&&s.config.submitDone(o,e);const t=(s.config.success||"").toString();t&&"false"!==t.toLowerCase()&&e.element&&(e.element.innerHTML=`<div class="alert-success" role="alert">${t}</div>`);let i=s.config.redirect;if(!i&&e._form&&e._form.settings&&(e._form.settings.returnUrl||e._form.settings.redirect)&&(s.debug("Return url found in form configuration"),i=e._form.settings.returnUrl||e._form.settings.redirect),i){const t=e.formio?e.formio.formUrl:"",r=!!i.match(/\?/),n=0===i.indexOf(location.origin);i+=r?"&":"?",i+=`sub=${o._id}`,!n&&t&&(i+=`&form=${encodeURIComponent(t)}`),s.debug("Return URL",i),window.location.href=i,n&&window.location.reload()}}))}static formioScript(e,o){return o=o||s.config.includeBuilder,s.fullAdded||o?(s.fullAdded=!0,e.replace("formio.form","formio.full")):e}static addLibrary(e,o,t){return i(this,void 0,void 0,(function*(){if(o){if(o.dependencies)for(let t=0;t<o.dependencies.length;t++){const i=o.dependencies[t];yield s.addLibrary(e,s.config.libs[i],i)}if(o.css&&(yield s.addStyles(o.global?document.body:e,o.css)),o.js){const i=yield s.addScript(o.global?document.body:e,o.js,!!o.use&&t);if(o.use){s.debug(`Using ${t}`);const e=o.options||{};!e.license&&s.license&&(e.license=s.license),s.use("function"==typeof o.use?o.use(i):i,e)}}if(o.globalStyle){const e=s.createElement("style");e.type="text/css",e.innerHTML=o.globalStyle,document.body.appendChild(e)}}}))}static addLoader(e){return i(this,void 0,void 0,(function*(){e.appendChild(s.createElement("div",{class:"formio-loader"},[{tag:"div",attrs:{class:"loader-wrapper"},children:[{tag:"div",attrs:{class:"loader text-center"}}]}]))}))}static init(e,o={},t=!1){return i(this,void 0,void 0,(function*(){s.cdn=new n.default(s.config.cdn,s.config.cdnUrls||{}),s.config.libs=s.config.libs||{uswds:{dependencies:["fontawesome"],js:`${s.cdn.uswds}/uswds.min.js`,css:`${s.cdn.uswds}/uswds.min.css`,use:!0},fontawesome:{css:"https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css",globalStyle:"@font-face {\n font-family: 'FontAwesome';\n src: url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.eot?v=4.7.0');\n src: url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');\n font-weight: normal;\n font-style: normal;\n }"},bootstrap4:{dependencies:["fontawesome"],css:`${s.cdn.bootstrap4}/css/bootstrap.min.css`},bootstrap:{dependencies:["bootstrap-icons"],css:`${s.cdn.bootstrap}/css/bootstrap.min.css`},"bootstrap-icons":{css:"https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.min.css",globalStyle:'@font-face {\n font-display: block;\n font-family: "bootstrap-icons";\n src: url("https://cdn.jsdelivr.net/npm/bootstrap-icons/font/fonts/bootstrap-icons.woff2?dd67030699838ea613ee6dbda90effa6") format("woff2"),\n url("https://cdn.jsdelivr.net/npm/bootstrap-icons/font/fonts/bootstrap-icons.woff?dd67030699838ea613ee6dbda90effa6") format("woff");\n }'}},["cerulean","cosmo","cyborg","darkly","flatly","journal","litera","lumen","lux","materia","minty","pulse","sandstone","simplex","sketchy","slate","solar","spacelab","superhero","united","yeti"].forEach((e=>{s.config.libs[e]={dependencies:["bootstrap-icons"],css:`${s.cdn.bootswatch}/dist/${e}/bootstrap.min.css`}}));const i=s.config.id||`formio-${Math.random().toString(36).substring(7)}`;let r=s.createElement("div",{id:`${i}-wrapper`});e.parentNode.insertBefore(r,e);const a=s.config.includeLibs&&!s.config.noshadow&&"function"==typeof r.attachShadow;a&&(r=r.attachShadow({mode:"open"}),o.shadowRoot=r),e.parentNode.removeChild(e),r.appendChild(e);const c=a?r:document.body;yield s.addStyles(c,s.config.embedCSS||`${s.cdn.js}/formio.embed.css`),s.addLoader(r);const l=s.config.full?"formio.full":"formio.form",d=s.config.debug?l:`${l}.min`;if(s.FormioClass=yield s.addScript(c,s.formioScript(s.config.script||`${s.cdn.js}/${d}.js`,t),"Formio",t?"isBuilder":"isRenderer"),s.FormioClass.cdn=s.cdn,s.FormioClass.setBaseUrl(o.baseUrl||s.baseUrl||s.config.base),s.FormioClass.setProjectUrl(o.projectUrl||s.projectUrl||s.config.project),s.FormioClass.language=s.language,s.setLicense(s.license||s.config.license||!1),s.modules.forEach((e=>{s.FormioClass.use(e)})),s.icons&&(s.FormioClass.icons=s.icons),s.pathType&&s.FormioClass.setPathType(s.pathType),s.config.template&&s.config.includeLibs&&(yield s.addLibrary(c,s.config.libs[s.config.template],s.config.template)),s.config.libraries||(s.config.libraries=s.config.modules||{}),s.config.premium&&(s.config.libraries.premium=s.config.premium),s.config.libraries)for(const e in s.config.libraries){const o=s.config.libraries[e];o.use=o.use||!0,yield s.addLibrary(c,o,e)}return yield s.addStyles(c,s.formioScript(s.config.style||`${s.cdn.js}/${d}.css`,t)),s.config.before&&(yield s.config.before(s.FormioClass,e,s.config)),s.FormioClass.license=!0,s._formioReady(s.FormioClass),r}))}static afterCreate(e,o,t){return i(this,void 0,void 0,(function*(){const i=o.querySelector(".formio-loader");return i&&o.removeChild(i),s.FormioClass.events.emit(t,e),s.config.after&&(s.debug("Calling ready callback"),s.config.after(e,s.config)),e}))}static createForm(e,o,t={}){return i(this,void 0,void 0,(function*(){if(s.FormioClass)return s.FormioClass.createForm(e,o,Object.assign(Object.assign({},t),{noLoader:!0}));const i=yield s.init(e,t);return s.FormioClass.createForm(e,o,Object.assign(Object.assign({},t),{noLoader:!0})).then((e=>(s.config.submission&&(s.debug("Setting submission",s.config.submission),e.submission=s.config.submission),s.afterCreate(e,i,"formEmbedded"),e)))}))}static builder(e,o,t={}){var r;return i(this,void 0,void 0,(function*(){if(null===(r=s.FormioClass)||void 0===r?void 0:r.builder)return s.FormioClass.builder(e,o,t);const i=yield s.init(e,t,!0);return s.FormioClass.builder(e,o,t).then((e=>(s.afterCreate(e,i,"builderEmbedded"),e)))}))}}o.Formio=a,s=a,a.FormioClass=null,a.config={},a.modules=[],a.icons="",a.license="",a.formioReady=new Promise(((e,o)=>{s._formioReady=e,s._formioReadyReject=o})),a.version="5.1.0-rc.3",a.Report={create:(e,o,t={})=>i(void 0,void 0,void 0,(function*(){var i;if(null===(i=s.FormioClass)||void 0===i?void 0:i.Report)return s.FormioClass.Report.create(e,o,t);const r=yield s.init(e,t,!0);return s.FormioClass.Report.create(e,o,t).then((e=>(s.afterCreate(e,r,"reportEmbedded"),e)))}))},n.default.defaultCDN=a.version.includes("rc")?"https://cdn.test-form.io":"https://cdn.form.io";class c{constructor(e,o,t){this.form=o,this.element=e,this.options=t||{},this.init(),this.instance={proxy:!0,ready:this.ready,destroy:()=>{}}}init(){this.instance&&!this.instance.proxy&&this.instance.destroy(),this.element.innerHTML="",this.ready=this.create().then((e=>(this.instance=e,this.form=e.form,e)))}create(){return a.createForm(this.element,this.form,this.options)}setForm(e){this.form=e,this.instance&&this.instance.setForm(e)}setDisplay(e){return this.instance.proxy||(this.form.display=e,this.instance.destroy(),this.ready=this.create().then((e=>{this.instance=e,this.setForm(this.form)}))),this.ready}}o.Form=c;class l extends c{create(){return a.builder(this.element,this.form,this.options)}}o.FormBuilder=l,a.Form=c,a.FormBuilder=l}},o={};var t={};return(0,function t(s){var i=o[s];if(void 0!==i)return i.exports;var r=o[s]={exports:{}};return e[s].call(r.exports,r,r.exports,t),r.exports}(96517).embed)(),t.Formio}()}));
2
+ !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.Formio=o():e.Formio=o()}(self,(function(){return function(){"use strict";var e={56036:function(e,o){Object.defineProperty(o,"__esModule",{value:!0});class t{constructor(e,o={}){this.baseUrl=e||t.defaultCDN,this.overrides=o,this.libs={js:"",ace:"1.4.12",bootstrap:"5.3.3",bootstrap4:"4.6.2",bootstrap5:"5.3.3",bootswatch:"5.3.3","bootstrap-icons":"1.11.1",ckeditor:"19.0.0",flatpickr:"4.6.8","flatpickr-formio":"4.6.13-formio.3","font-awesome":"4.7.0",grid:"latest","moment-timezone":"latest",quill:"2.0.0-dev.3","shortcut-buttons-flatpickr":"0.4.0",uswds:"2.4.8",core:""},this.updateUrls()}getVersion(e){return this.libs[e]}setVersion(e,o){this.libs[e]=o,this.updateUrls()}setBaseUrl(e){this.baseUrl=e,this.updateUrls()}setOverrideUrl(e,o){this.overrides[e]=o,this.updateUrls()}removeOverride(e){delete this.overrides[e],this.updateUrls()}removeOverrides(){this.overrides={},this.updateUrls()}buildUrl(e,o,t){let s=e;return o&&(s+=`/${o}`),e.match(/cdn\.(test-)?form.io/)&&t&&"latest"!==t&&(s+=`/${t}`),s}updateUrls(){for(const e in this.libs)if(e in this.overrides)if("string"==typeof this.overrides[e])this[e]=this.buildUrl(this.overrides[e],e,this.libs[e]);else{const o=this.overrides[e];this[e]=this.buildUrl(o.cdn,o.lib||"",o.version||"")}else this[e]=this.buildUrl(this.baseUrl,e,this.libs[e])}}t.defaultCDN="https://cdn.form.io",o.default=t},96517:function(e,o,t){Object.defineProperty(o,"__esModule",{value:!0}),o.Formio=o.embed=void 0;const s=t(95413);Object.defineProperty(o,"Formio",{enumerable:!0,get:function(){return s.Formio}}),o.embed=function(e={}){const o=document.getElementsByTagName("script");e=Object.assign({},window.FormioConfig||{},e);let t=null,i=o.length;const r=e.scriptName||"formio.embed.";for(;i--;)if(o[i].src&&-1!==o[i].src.indexOf(r)){t=o[i];break}if(t){const o={};t.src.replace(/^[^?]+\??/,"").replace(/\?/g,"&").split("&").forEach((e=>{o[e.split("=")[0]]=e.split("=")[1]&&decodeURIComponent(e.split("=")[1])}));let i=t.src.replace(/^([^?]+).*/,"$1").split("/");i.pop();let r="";["js","offline"].includes(i[i.length-1])?(i.pop(),i=r=i.join("/"),i+="/js"):i=i.join("/");const n="true"===o.debug||"1"===o.debug,a=n?"formio.form":"formio.form.min";s.Formio.config=Object.assign({script:o.script||`${i}/${a}.js`,style:o.styles||`${i}/${a}.css`,cdn:o.cdn||r,class:o.class||"formio-form-wrapper",src:o.src,form:null,submission:null,project:o.project,base:o.base||"https://api.form.io",submit:o.submit,includeLibs:"true"===o.libs||"1"===o.libs,noshadow:"false"===o.shadow||"0"===o.shadow,template:o.template||"bootstrap",debug:n,config:{},redirect:o.return||o.redirect,embedCSS:`${i}/formio.embed.css`,success:o.success||"Thank you for your submission!",before:null,after:null},e),s.Formio.config.alter&&s.Formio.config.alter(s.Formio.config);const c=s.Formio.config.form||s.Formio.config.src;if(c){s.Formio.debug("Embedding Configuration",e),s.Formio.config.id=`formio-${Math.random().toString(36).substring(7)}`,s.Formio.debug("Creating form element");const o=s.Formio.createElement("div",{id:s.Formio.config.id,class:s.Formio.config.class});t.parentNode.insertBefore(o,t.parentNode.firstElementChild.nextSibling),s.Formio.createForm(o,c,s.Formio.config.config).then((e=>{s.Formio.config.submit&&(e.nosubmit=!0),e.on("submitDone",(o=>s.Formio.submitDone(e,o))),e.on("submit",(o=>{if(s.Formio.debug("on('submit')",o),s.Formio.config.submit){s.Formio.debug(`Sending submission to ${s.Formio.config.submit}`);const t={"content-type":"application/json"},i=s.Formio.FormioClass.getToken();i&&(t["x-jwt-token"]=i),s.Formio.FormioClass.fetch(s.Formio.config.submit,{body:JSON.stringify(o),headers:t,method:"POST",mode:"cors"}).then((e=>e.json())).then((o=>{s.Formio.submitDone(e,o)}))}}))}))}}else document.write("<span>Could not locate the Embedded form.</span>")}},95413:function(e,o,t){var s,i=this&&this.__awaiter||function(e,o,t,s){return new(t||(t=Promise))((function(i,r){function n(e){try{c(s.next(e))}catch(e){r(e)}}function a(e){try{c(s.throw(e))}catch(e){r(e)}}function c(e){var o;e.done?i(e.value):(o=e.value,o instanceof t?o:new t((function(e){e(o)}))).then(n,a)}c((s=s.apply(e,o||[])).next())}))},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o,"__esModule",{value:!0}),o.FormBuilder=o.Form=o.Formio=void 0;const n=r(t(56036));class a{static setLicense(e,o=!1){s.license=e,!o&&s.FormioClass&&s.FormioClass.setLicense(e)}static setBaseUrl(e,o=!1){s.baseUrl=e,!o&&s.FormioClass&&s.FormioClass.setBaseUrl(e)}static setApiUrl(e,o=!1){s.baseUrl=e,!o&&s.FormioClass&&s.FormioClass.setApiUrl(e)}static setProjectUrl(e,o=!1){s.projectUrl=e,!o&&s.FormioClass&&s.FormioClass.setProjectUrl(e)}static setAppUrl(e,o=!1){s.projectUrl=e,!o&&s.FormioClass&&s.FormioClass.setAppUrl(e)}static setPathType(e,o=!1){s.pathType=e,!o&&s.FormioClass&&s.FormioClass.setPathType(e)}static debug(...e){s.config.debug&&console.log(...e)}static clearCache(){s.FormioClass&&s.FormioClass.clearCache()}static global(e,o=""){const t=window[e];return o&&t&&!t[o]?null:(s.debug(`Getting global ${e}`,t),t)}static use(e){s.FormioClass&&s.FormioClass.isRenderer?s.FormioClass.use(e):s.modules.push(e)}static createElement(e,o,t){const i=document.createElement(e);return o?(Object.keys(o).forEach((e=>{i.setAttribute(e,o[e])})),(t||[]).forEach((e=>{i.appendChild(s.createElement(e.tag,e.attrs,e.children))})),i):i}static addScript(e,o,t,r=""){return i(this,void 0,void 0,(function*(){if(!o)return Promise.resolve();if("string"!=typeof o&&o.length)return Promise.all(o.map((o=>s.addScript(e,o))));if(t&&s.global(t,r))return s.debug(`${t} already loaded.`),Promise.resolve(s.global(t));s.debug("Adding Script",o);try{e.appendChild(s.createElement("script",{src:o}))}catch(e){return s.debug(e),Promise.resolve()}return t?new Promise((e=>{s.debug(`Waiting to load ${t}`);const o=setInterval((()=>{s.global(t,r)&&(clearInterval(o),s.debug(`${t} loaded.`),e(s.global(t)))}),100)})):Promise.resolve()}))}static addStyles(e,o){return i(this,void 0,void 0,(function*(){o&&("string"!=typeof o&&o.length?o.forEach((o=>s.addStyles(e,o))):(s.debug("Adding Styles",o),e.appendChild(s.createElement("link",{rel:"stylesheet",href:o}))))}))}static submitDone(e,o){return i(this,void 0,void 0,(function*(){s.debug("Submision Complete",o),s.config.submitDone&&s.config.submitDone(o,e);const t=(s.config.success||"").toString();t&&"false"!==t.toLowerCase()&&e.element&&(e.element.innerHTML=`<div class="alert-success" role="alert">${t}</div>`);let i=s.config.redirect;if(!i&&e._form&&e._form.settings&&(e._form.settings.returnUrl||e._form.settings.redirect)&&(s.debug("Return url found in form configuration"),i=e._form.settings.returnUrl||e._form.settings.redirect),i){const t=e.formio?e.formio.formUrl:"",r=!!i.match(/\?/),n=0===i.indexOf(location.origin);i+=r?"&":"?",i+=`sub=${o._id}`,!n&&t&&(i+=`&form=${encodeURIComponent(t)}`),s.debug("Return URL",i),window.location.href=i,n&&window.location.reload()}}))}static formioScript(e,o){return o=o||s.config.includeBuilder,s.fullAdded||o?(s.fullAdded=!0,e.replace("formio.form","formio.full")):e}static addLibrary(e,o,t){return i(this,void 0,void 0,(function*(){if(o){if(o.dependencies)for(let t=0;t<o.dependencies.length;t++){const i=o.dependencies[t];yield s.addLibrary(e,s.config.libs[i],i)}if(o.css&&(yield s.addStyles(o.global?document.body:e,o.css)),o.js){const i=yield s.addScript(o.global?document.body:e,o.js,!!o.use&&t);if(o.use){s.debug(`Using ${t}`);const e=o.options||{};!e.license&&s.license&&(e.license=s.license),s.use("function"==typeof o.use?o.use(i):i,e)}}if(o.globalStyle){const e=s.createElement("style");e.type="text/css",e.innerHTML=o.globalStyle,document.body.appendChild(e)}}}))}static addLoader(e){return i(this,void 0,void 0,(function*(){e.appendChild(s.createElement("div",{class:"formio-loader"},[{tag:"div",attrs:{class:"loader-wrapper"},children:[{tag:"div",attrs:{class:"loader text-center"}}]}]))}))}static init(e,o={},t=!1){return i(this,void 0,void 0,(function*(){s.cdn=new n.default(s.config.cdn,s.config.cdnUrls||{}),s.config.libs=s.config.libs||{uswds:{dependencies:["fontawesome"],js:`${s.cdn.uswds}/uswds.min.js`,css:`${s.cdn.uswds}/uswds.min.css`,use:!0},fontawesome:{css:"https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css",globalStyle:"@font-face {\n font-family: 'FontAwesome';\n src: url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.eot?v=4.7.0');\n src: url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');\n font-weight: normal;\n font-style: normal;\n }"},bootstrap4:{dependencies:["fontawesome"],css:`${s.cdn.bootstrap4}/css/bootstrap.min.css`},bootstrap:{dependencies:["bootstrap-icons"],css:`${s.cdn.bootstrap}/css/bootstrap.min.css`},"bootstrap-icons":{css:"https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.min.css",globalStyle:'@font-face {\n font-display: block;\n font-family: "bootstrap-icons";\n src: url("https://cdn.jsdelivr.net/npm/bootstrap-icons/font/fonts/bootstrap-icons.woff2?dd67030699838ea613ee6dbda90effa6") format("woff2"),\n url("https://cdn.jsdelivr.net/npm/bootstrap-icons/font/fonts/bootstrap-icons.woff?dd67030699838ea613ee6dbda90effa6") format("woff");\n }'}},["cerulean","cosmo","cyborg","darkly","flatly","journal","litera","lumen","lux","materia","minty","pulse","sandstone","simplex","sketchy","slate","solar","spacelab","superhero","united","yeti"].forEach((e=>{s.config.libs[e]={dependencies:["bootstrap-icons"],css:`${s.cdn.bootswatch}/dist/${e}/bootstrap.min.css`}}));const i=s.config.id||`formio-${Math.random().toString(36).substring(7)}`;let r=s.createElement("div",{id:`${i}-wrapper`});e.parentNode.insertBefore(r,e);const a=s.config.includeLibs&&!s.config.noshadow&&"function"==typeof r.attachShadow;a&&(r=r.attachShadow({mode:"open"}),o.shadowRoot=r),e.parentNode.removeChild(e),r.appendChild(e);const c=a?r:document.body;yield s.addStyles(c,s.config.embedCSS||`${s.cdn.js}/formio.embed.css`),s.addLoader(r);const l=s.config.full?"formio.full":"formio.form",d=s.config.debug?l:`${l}.min`;if(s.FormioClass=yield s.addScript(c,s.formioScript(s.config.script||`${s.cdn.js}/${d}.js`,t),"Formio",t?"isBuilder":"isRenderer"),s.FormioClass.cdn=s.cdn,s.FormioClass.setBaseUrl(o.baseUrl||s.baseUrl||s.config.base),s.FormioClass.setProjectUrl(o.projectUrl||s.projectUrl||s.config.project),s.FormioClass.language=s.language,s.setLicense(s.license||s.config.license||!1),s.modules.forEach((e=>{s.FormioClass.use(e)})),s.icons&&(s.FormioClass.icons=s.icons),s.pathType&&s.FormioClass.setPathType(s.pathType),s.config.template&&s.config.includeLibs&&(yield s.addLibrary(c,s.config.libs[s.config.template],s.config.template)),s.config.libraries||(s.config.libraries=s.config.modules||{}),s.config.premium&&(s.config.libraries.premium=s.config.premium),s.config.libraries)for(const e in s.config.libraries){const o=s.config.libraries[e];o.use=o.use||!0,yield s.addLibrary(c,o,e)}return yield s.addStyles(c,s.formioScript(s.config.style||`${s.cdn.js}/${d}.css`,t)),s.config.before&&(yield s.config.before(s.FormioClass,e,s.config)),s.FormioClass.license=!0,s._formioReady(s.FormioClass),r}))}static afterCreate(e,o,t){return i(this,void 0,void 0,(function*(){const i=o.querySelector(".formio-loader");return i&&o.removeChild(i),s.FormioClass.events.emit(t,e),s.config.after&&(s.debug("Calling ready callback"),s.config.after(e,s.config)),e}))}static createForm(e,o,t={}){return i(this,void 0,void 0,(function*(){if(s.FormioClass)return s.FormioClass.createForm(e,o,Object.assign(Object.assign({},t),{noLoader:!0}));const i=yield s.init(e,t);return s.FormioClass.createForm(e,o,Object.assign(Object.assign({},t),{noLoader:!0})).then((e=>(s.config.submission&&(s.debug("Setting submission",s.config.submission),e.submission=s.config.submission),s.afterCreate(e,i,"formEmbedded"),e)))}))}static builder(e,o,t={}){var r;return i(this,void 0,void 0,(function*(){if(null===(r=s.FormioClass)||void 0===r?void 0:r.builder)return s.FormioClass.builder(e,o,t);const i=yield s.init(e,t,!0);return s.FormioClass.builder(e,o,t).then((e=>(s.afterCreate(e,i,"builderEmbedded"),e)))}))}}o.Formio=a,s=a,a.FormioClass=null,a.config={},a.modules=[],a.icons="",a.license="",a.formioReady=new Promise(((e,o)=>{s._formioReady=e,s._formioReadyReject=o})),a.version="5.1.0-rc.5",a.Report={create:(e,o,t={})=>i(void 0,void 0,void 0,(function*(){var i;if(null===(i=s.FormioClass)||void 0===i?void 0:i.Report)return s.FormioClass.Report.create(e,o,t);const r=yield s.init(e,t,!0);return s.FormioClass.Report.create(e,o,t).then((e=>(s.afterCreate(e,r,"reportEmbedded"),e)))}))},n.default.defaultCDN=a.version.includes("rc")?"https://cdn.test-form.io":"https://cdn.form.io";class c{constructor(e,o,t){this.form=o,this.element=e,this.options=t||{},this.init(),this.instance={proxy:!0,ready:this.ready,destroy:()=>{}}}init(){this.instance&&!this.instance.proxy&&this.instance.destroy(),this.element.innerHTML="",this.ready=this.create().then((e=>(this.instance=e,this.form=e.form,e)))}create(){return a.createForm(this.element,this.form,this.options)}setForm(e){this.form=e,this.instance&&this.instance.setForm(e)}setDisplay(e){return this.instance.proxy||(this.form.display=e,this.instance.destroy(),this.ready=this.create().then((e=>{this.instance=e,this.setForm(this.form)}))),this.ready}}o.Form=c;class l extends c{create(){return a.builder(this.element,this.form,this.options)}}o.FormBuilder=l,a.Form=c,a.FormBuilder=l}},o={};function t(s){var i=o[s];if(void 0!==i)return i.exports;var r=o[s]={exports:{}};return e[s].call(r.exports,r,r.exports,t),r.exports}var s={};return function(){var e=s;e.Formio=void 0,(0,t(96517).embed)();var o=t(96517);Object.defineProperty(e,"Formio",{enumerable:!0,get:function(){return o.Formio}})}(),s.Formio}()}));
@@ -1 +1 @@
1
- /*! formiojs v5.1.0-rc.3 | https://unpkg.com/formiojs@5.1.0-rc.3/LICENSE.txt */
1
+ /*! formiojs v5.1.0-rc.5 | https://unpkg.com/formiojs@5.1.0-rc.5/LICENSE.txt */
@@ -409,7 +409,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
409
409
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
410
410
 
411
411
  "use strict";
412
- eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.calculateProcessInfo = exports.calculateProcess = exports.calculateProcessSync = exports.shouldCalculate = void 0;\nconst jsonlogic_1 = __webpack_require__(/*! ../../modules/jsonlogic */ \"./node_modules/@formio/core/lib/modules/jsonlogic/index.js\");\nconst lodash_1 = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\nconst formUtil_1 = __webpack_require__(/*! ../../utils/formUtil */ \"./node_modules/@formio/core/lib/utils/formUtil/index.js\");\nconst shouldCalculate = (context) => {\n const { component, config } = context;\n if (!component.calculateValue || ((config === null || config === void 0 ? void 0 : config.server) && !component.calculateServer)) {\n return false;\n }\n return true;\n};\nexports.shouldCalculate = shouldCalculate;\nconst calculateProcessSync = (context) => {\n const { component, data, evalContext, scope, path, value } = context;\n if (!(0, exports.shouldCalculate)(context)) {\n return;\n }\n const evalContextValue = evalContext\n ? evalContext((0, formUtil_1.normalizeContext)(context))\n : (0, formUtil_1.normalizeContext)(context);\n evalContextValue.value = value || null;\n if (!scope.calculated)\n scope.calculated = [];\n const newValue = jsonlogic_1.JSONLogicEvaluator.evaluate(component.calculateValue, evalContextValue, 'value');\n // Only set a new value if it is not \"null\" which would be the case if no calculation occurred.\n if (newValue !== null) {\n scope.calculated.push({\n path,\n value: newValue,\n });\n (0, lodash_1.set)(data, path, newValue);\n }\n return;\n};\nexports.calculateProcessSync = calculateProcessSync;\nconst calculateProcess = (context) => __awaiter(void 0, void 0, void 0, function* () {\n return (0, exports.calculateProcessSync)(context);\n});\nexports.calculateProcess = calculateProcess;\nexports.calculateProcessInfo = {\n name: 'calculate',\n process: exports.calculateProcess,\n processSync: exports.calculateProcessSync,\n shouldProcess: exports.shouldCalculate,\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/process/calculation/index.js?");
412
+ eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.calculateProcessInfo = exports.calculateProcess = exports.calculateProcessSync = exports.shouldCalculate = void 0;\nconst jsonlogic_1 = __webpack_require__(/*! ../../modules/jsonlogic */ \"./node_modules/@formio/core/lib/modules/jsonlogic/index.js\");\nconst lodash_1 = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\nconst formUtil_1 = __webpack_require__(/*! ../../utils/formUtil */ \"./node_modules/@formio/core/lib/utils/formUtil/index.js\");\nconst shouldCalculate = (context) => {\n const { component, config } = context;\n if (!component.calculateValue || ((config === null || config === void 0 ? void 0 : config.server) && !component.calculateServer)) {\n return false;\n }\n return true;\n};\nexports.shouldCalculate = shouldCalculate;\nconst calculateProcessSync = (context) => {\n const { component, data, evalContext, scope, path, value } = context;\n if (!(0, exports.shouldCalculate)(context)) {\n return;\n }\n const calculationContext = scope.fetched\n ? Object.assign(Object.assign({}, context), { data: Object.assign(Object.assign({}, data), scope.fetched) }) : context;\n const evalContextValue = evalContext\n ? evalContext((0, formUtil_1.normalizeContext)(calculationContext))\n : (0, formUtil_1.normalizeContext)(calculationContext);\n evalContextValue.value = value || null;\n if (!scope.calculated)\n scope.calculated = [];\n const newValue = jsonlogic_1.JSONLogicEvaluator.evaluate(component.calculateValue, evalContextValue, 'value');\n // Only set a new value if it is not \"null\" which would be the case if no calculation occurred.\n if (newValue !== null) {\n scope.calculated.push({\n path,\n value: newValue,\n });\n (0, lodash_1.set)(data, path, newValue);\n }\n return;\n};\nexports.calculateProcessSync = calculateProcessSync;\nconst calculateProcess = (context) => __awaiter(void 0, void 0, void 0, function* () {\n return (0, exports.calculateProcessSync)(context);\n});\nexports.calculateProcess = calculateProcess;\nexports.calculateProcessInfo = {\n name: 'calculate',\n process: exports.calculateProcess,\n processSync: exports.calculateProcessSync,\n shouldProcess: exports.shouldCalculate,\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/process/calculation/index.js?");
413
413
 
414
414
  /***/ }),
415
415
 
@@ -431,7 +431,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
431
431
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
432
432
 
433
433
  "use strict";
434
- eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.conditionProcessInfo = exports.simpleConditionProcessInfo = exports.customConditionProcessInfo = exports.conditionProcessSync = exports.conditionProcess = exports.simpleConditionProcessSync = exports.simpleConditionProcess = exports.customConditionProcessSync = exports.customConditionProcess = exports.conditionalProcess = exports.isConditionallyHidden = exports.isSimpleConditionallyHidden = exports.isCustomConditionallyHidden = exports.hasConditions = void 0;\nconst formUtil_1 = __webpack_require__(/*! ../../utils/formUtil */ \"./node_modules/@formio/core/lib/utils/formUtil/index.js\");\nconst conditions_1 = __webpack_require__(/*! ../../utils/conditions */ \"./node_modules/@formio/core/lib/utils/conditions.js\");\nconst hasCustomConditions = (context) => {\n const { component } = context;\n return !!component.customConditional;\n};\nconst hasSimpleConditions = (context) => {\n const { component } = context;\n const { conditional } = component;\n if ((0, conditions_1.isLegacyConditional)(conditional) ||\n (0, conditions_1.isSimpleConditional)(conditional) ||\n (0, conditions_1.isJSONConditional)(conditional)) {\n return true;\n }\n return false;\n};\nconst hasConditions = (context) => {\n return hasSimpleConditions(context) || hasCustomConditions(context);\n};\nexports.hasConditions = hasConditions;\nconst isCustomConditionallyHidden = (context) => {\n if (!hasCustomConditions(context)) {\n return false;\n }\n const { component } = context;\n const { customConditional } = component;\n let show = null;\n if (customConditional) {\n show = (0, conditions_1.checkCustomConditional)(customConditional, context, 'show');\n }\n if (show === null) {\n return false;\n }\n return !show;\n};\nexports.isCustomConditionallyHidden = isCustomConditionallyHidden;\nconst isSimpleConditionallyHidden = (context) => {\n if (!hasSimpleConditions(context)) {\n return false;\n }\n const { component } = context;\n const { conditional } = component;\n let show = null;\n if ((0, conditions_1.isJSONConditional)(conditional)) {\n show = (0, conditions_1.checkJsonConditional)(conditional, context);\n }\n if ((0, conditions_1.isLegacyConditional)(conditional)) {\n show = (0, conditions_1.checkLegacyConditional)(conditional, context);\n }\n if ((0, conditions_1.isSimpleConditional)(conditional)) {\n show = (0, conditions_1.checkSimpleConditional)(conditional, context);\n }\n if (show === null || show === undefined) {\n return false;\n }\n return !show;\n};\nexports.isSimpleConditionallyHidden = isSimpleConditionallyHidden;\nconst isConditionallyHidden = (context) => {\n return (0, exports.isCustomConditionallyHidden)(context) || (0, exports.isSimpleConditionallyHidden)(context);\n};\nexports.isConditionallyHidden = isConditionallyHidden;\nconst conditionalProcess = (context, isHidden) => {\n const { scope, path, component } = context;\n if (!(0, exports.hasConditions)(context)) {\n return;\n }\n if (!scope.conditionals) {\n scope.conditionals = [];\n }\n let conditionalComp = scope.conditionals.find((cond) => cond.path === path);\n if (!conditionalComp) {\n conditionalComp = { path, conditionallyHidden: false };\n scope.conditionals.push(conditionalComp);\n }\n conditionalComp.conditionallyHidden =\n conditionalComp.conditionallyHidden || isHidden(context) === true;\n if (conditionalComp.conditionallyHidden) {\n (0, formUtil_1.setComponentScope)(component, 'conditionallyHidden', true);\n }\n};\nexports.conditionalProcess = conditionalProcess;\nconst customConditionProcess = (context) => __awaiter(void 0, void 0, void 0, function* () {\n return (0, exports.customConditionProcessSync)(context);\n});\nexports.customConditionProcess = customConditionProcess;\nconst customConditionProcessSync = (context) => {\n return (0, exports.conditionalProcess)(context, exports.isCustomConditionallyHidden);\n};\nexports.customConditionProcessSync = customConditionProcessSync;\nconst simpleConditionProcess = (context) => __awaiter(void 0, void 0, void 0, function* () {\n return (0, exports.simpleConditionProcessSync)(context);\n});\nexports.simpleConditionProcess = simpleConditionProcess;\nconst simpleConditionProcessSync = (context) => {\n return (0, exports.conditionalProcess)(context, exports.isSimpleConditionallyHidden);\n};\nexports.simpleConditionProcessSync = simpleConditionProcessSync;\nconst conditionProcess = (context) => __awaiter(void 0, void 0, void 0, function* () {\n return (0, exports.conditionProcessSync)(context);\n});\nexports.conditionProcess = conditionProcess;\nconst conditionProcessSync = (context) => {\n return (0, exports.conditionalProcess)(context, exports.isConditionallyHidden);\n};\nexports.conditionProcessSync = conditionProcessSync;\nexports.customConditionProcessInfo = {\n name: 'customConditions',\n process: exports.customConditionProcess,\n processSync: exports.customConditionProcessSync,\n shouldProcess: hasCustomConditions,\n};\nexports.simpleConditionProcessInfo = {\n name: 'simpleConditions',\n process: exports.simpleConditionProcess,\n processSync: exports.simpleConditionProcessSync,\n shouldProcess: hasSimpleConditions,\n};\nexports.conditionProcessInfo = {\n name: 'conditions',\n process: exports.conditionProcess,\n processSync: exports.conditionProcessSync,\n shouldProcess: hasSimpleConditions,\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/process/conditions/index.js?");
434
+ eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.conditionProcessInfo = exports.simpleConditionProcessInfo = exports.customConditionProcessInfo = exports.conditionProcessSync = exports.conditionProcess = exports.simpleConditionProcessSync = exports.simpleConditionProcess = exports.customConditionProcessSync = exports.customConditionProcess = exports.conditionalProcess = exports.isConditionallyHidden = exports.isSimpleConditionallyHidden = exports.isCustomConditionallyHidden = exports.hasConditions = void 0;\nconst formUtil_1 = __webpack_require__(/*! ../../utils/formUtil */ \"./node_modules/@formio/core/lib/utils/formUtil/index.js\");\nconst conditions_1 = __webpack_require__(/*! ../../utils/conditions */ \"./node_modules/@formio/core/lib/utils/conditions.js\");\nconst index_1 = __webpack_require__(/*! ../../utils/formUtil/index */ \"./node_modules/@formio/core/lib/utils/formUtil/index.js\");\nconst hasCustomConditions = (context) => {\n const { component } = context;\n return !!component.customConditional;\n};\nconst hasSimpleConditions = (context) => {\n const { component } = context;\n const { conditional } = component;\n if ((0, conditions_1.isLegacyConditional)(conditional) ||\n (0, conditions_1.isSimpleConditional)(conditional) ||\n (0, conditions_1.isJSONConditional)(conditional)) {\n return true;\n }\n return false;\n};\nconst hasConditions = (context) => {\n return hasSimpleConditions(context) || hasCustomConditions(context);\n};\nexports.hasConditions = hasConditions;\nconst isCustomConditionallyHidden = (context) => {\n if (!hasCustomConditions(context)) {\n return false;\n }\n const { component } = context;\n const { customConditional } = component;\n let show = null;\n if (customConditional) {\n show = (0, conditions_1.checkCustomConditional)(customConditional, context, 'show');\n }\n if (show === null) {\n return false;\n }\n return !show;\n};\nexports.isCustomConditionallyHidden = isCustomConditionallyHidden;\nconst isSimpleConditionallyHidden = (context) => {\n if (!hasSimpleConditions(context)) {\n return false;\n }\n const { component } = context;\n const { conditional } = component;\n let show = null;\n if ((0, conditions_1.isJSONConditional)(conditional)) {\n show = (0, conditions_1.checkJsonConditional)(conditional, context);\n }\n if ((0, conditions_1.isLegacyConditional)(conditional)) {\n show = (0, conditions_1.checkLegacyConditional)(conditional, context);\n }\n if ((0, conditions_1.isSimpleConditional)(conditional)) {\n show = (0, conditions_1.checkSimpleConditional)(conditional, context);\n }\n if (show === null || show === undefined) {\n return false;\n }\n return !show;\n};\nexports.isSimpleConditionallyHidden = isSimpleConditionallyHidden;\nconst isConditionallyHidden = (context) => {\n return (0, exports.isCustomConditionallyHidden)(context) || (0, exports.isSimpleConditionallyHidden)(context);\n};\nexports.isConditionallyHidden = isConditionallyHidden;\nconst conditionalProcess = (context, isHidden) => {\n const { scope, path, component } = context;\n if (!(0, exports.hasConditions)(context)) {\n return;\n }\n if (!scope.conditionals) {\n scope.conditionals = [];\n }\n let conditionalComp = scope.conditionals.find((cond) => cond.path === path);\n if (!conditionalComp) {\n const conditionalPath = path ? path : (0, index_1.getComponentPaths)(component).fullPath || '';\n conditionalComp = {\n path: conditionalPath,\n conditionallyHidden: false,\n };\n scope.conditionals.push(conditionalComp);\n }\n conditionalComp.conditionallyHidden =\n conditionalComp.conditionallyHidden || isHidden(context) === true;\n if (conditionalComp.conditionallyHidden) {\n (0, formUtil_1.setComponentScope)(component, 'conditionallyHidden', true);\n }\n};\nexports.conditionalProcess = conditionalProcess;\nconst customConditionProcess = (context) => __awaiter(void 0, void 0, void 0, function* () {\n return (0, exports.customConditionProcessSync)(context);\n});\nexports.customConditionProcess = customConditionProcess;\nconst customConditionProcessSync = (context) => {\n return (0, exports.conditionalProcess)(context, exports.isCustomConditionallyHidden);\n};\nexports.customConditionProcessSync = customConditionProcessSync;\nconst simpleConditionProcess = (context) => __awaiter(void 0, void 0, void 0, function* () {\n return (0, exports.simpleConditionProcessSync)(context);\n});\nexports.simpleConditionProcess = simpleConditionProcess;\nconst simpleConditionProcessSync = (context) => {\n return (0, exports.conditionalProcess)(context, exports.isSimpleConditionallyHidden);\n};\nexports.simpleConditionProcessSync = simpleConditionProcessSync;\nconst conditionProcess = (context) => __awaiter(void 0, void 0, void 0, function* () {\n return (0, exports.conditionProcessSync)(context);\n});\nexports.conditionProcess = conditionProcess;\nconst conditionProcessSync = (context) => {\n return (0, exports.conditionalProcess)(context, exports.isConditionallyHidden);\n};\nexports.conditionProcessSync = conditionProcessSync;\nexports.customConditionProcessInfo = {\n name: 'customConditions',\n process: exports.customConditionProcess,\n processSync: exports.customConditionProcessSync,\n shouldProcess: hasCustomConditions,\n};\nexports.simpleConditionProcessInfo = {\n name: 'simpleConditions',\n process: exports.simpleConditionProcess,\n processSync: exports.simpleConditionProcessSync,\n shouldProcess: hasSimpleConditions,\n};\nexports.conditionProcessInfo = {\n name: 'conditions',\n process: exports.conditionProcess,\n processSync: exports.conditionProcessSync,\n shouldProcess: hasSimpleConditions,\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/process/conditions/index.js?");
435
435
 
436
436
  /***/ }),
437
437
 
@@ -464,7 +464,7 @@ eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _argument
464
464
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
465
465
 
466
466
  "use strict";
467
- eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.fetchProcessInfo = exports.fetchProcess = exports.shouldFetch = void 0;\nconst lodash_1 = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\nconst utils_1 = __webpack_require__(/*! ../../utils */ \"./node_modules/@formio/core/lib/utils/index.js\");\nconst formUtil_1 = __webpack_require__(/*! ../../utils/formUtil */ \"./node_modules/@formio/core/lib/utils/formUtil/index.js\");\nconst shouldFetch = (context) => {\n const { component, config } = context;\n if (component.type !== 'datasource' ||\n ((config === null || config === void 0 ? void 0 : config.server) && !(0, lodash_1.get)(component, 'trigger.server', false))) {\n return false;\n }\n return true;\n};\nexports.shouldFetch = shouldFetch;\nconst fetchProcess = (context) => __awaiter(void 0, void 0, void 0, function* () {\n var _a;\n const { component, row, evalContext, path, scope, config } = context;\n let _fetch = null;\n try {\n _fetch = context.fetch ? context.fetch : fetch;\n }\n catch (ignoreErr) {\n _fetch = null;\n }\n if (!_fetch) {\n console.log('You must provide a fetch interface to the fetch processor.');\n return;\n }\n if (!(0, exports.shouldFetch)(context)) {\n return;\n }\n if (!scope.fetched)\n scope.fetched = {};\n const evalContextValue = evalContext\n ? evalContext((0, formUtil_1.normalizeContext)(context))\n : (0, formUtil_1.normalizeContext)(context);\n const url = utils_1.Evaluator.interpolateString((0, lodash_1.get)(component, 'fetch.url', ''), evalContextValue);\n if (!url) {\n return;\n }\n const request = {\n method: (0, lodash_1.get)(component, 'fetch.method', 'get').toUpperCase(),\n headers: {},\n };\n if ((config === null || config === void 0 ? void 0 : config.headers) &&\n (component === null || component === void 0 ? void 0 : component.fetch) &&\n ((_a = component === null || component === void 0 ? void 0 : component.fetch) === null || _a === void 0 ? void 0 : _a.forwardHeaders)) {\n request.headers = JSON.parse(JSON.stringify(config.headers));\n delete request.headers['host'];\n delete request.headers['content-length'];\n delete request.headers['content-type'];\n delete request.headers['connection'];\n delete request.headers['cache-control'];\n }\n request.headers['Accept'] = '*/*';\n request.headers['user-agent'] = 'Form.io DataSource Component';\n (0, lodash_1.get)(component, 'fetch.headers', []).map((header) => {\n header.value = utils_1.Evaluator.interpolateString(header.value, evalContextValue);\n if (header.value && header.key) {\n request.headers[header.key] = header.value;\n }\n return header;\n });\n if ((0, lodash_1.get)(component, 'fetch.authenticate', false) && (config === null || config === void 0 ? void 0 : config.tokens)) {\n Object.assign(request.headers, config.tokens);\n }\n const body = (0, lodash_1.get)(component, 'fetch.specifyBody', '');\n if (request.method === 'POST') {\n request.body = JSON.stringify(utils_1.Evaluator.evaluate(body, evalContextValue, 'body'));\n }\n try {\n // Perform the fetch.\n const result = yield (yield _fetch(url, request)).json();\n const mapFunction = (0, lodash_1.get)(component, 'fetch.mapFunction');\n // Set the row data of the fetched value.\n const key = (0, formUtil_1.getComponentKey)(component);\n (0, lodash_1.set)(row, key, mapFunction\n ? utils_1.Evaluator.evaluate(mapFunction, Object.assign(Object.assign({}, evalContextValue), { responseData: result }), 'value')\n : result);\n // Make sure the value does not get filtered for now...\n if (!scope.filter)\n scope.filter = {};\n scope.filter[path] = true;\n scope.fetched[path] = true;\n }\n catch (err) {\n console.log(err.message);\n }\n});\nexports.fetchProcess = fetchProcess;\nexports.fetchProcessInfo = {\n name: 'fetch',\n process: exports.fetchProcess,\n shouldProcess: exports.shouldFetch,\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/process/fetch/index.js?");
467
+ eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.fetchProcessInfo = exports.fetchProcess = exports.shouldFetch = void 0;\nconst lodash_1 = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\nconst utils_1 = __webpack_require__(/*! ../../utils */ \"./node_modules/@formio/core/lib/utils/index.js\");\nconst formUtil_1 = __webpack_require__(/*! ../../utils/formUtil */ \"./node_modules/@formio/core/lib/utils/formUtil/index.js\");\nconst shouldFetch = (context) => {\n const { component, config } = context;\n if (component.type !== 'datasource' ||\n ((config === null || config === void 0 ? void 0 : config.server) && !(0, lodash_1.get)(component, 'trigger.server', false))) {\n return false;\n }\n return true;\n};\nexports.shouldFetch = shouldFetch;\nconst fetchProcess = (context) => __awaiter(void 0, void 0, void 0, function* () {\n var _a;\n const { component, row, evalContext, path, scope, config } = context;\n let _fetch = null;\n try {\n _fetch = context.fetch ? context.fetch : fetch;\n }\n catch (ignoreErr) {\n _fetch = null;\n }\n if (!_fetch) {\n console.log('You must provide a fetch interface to the fetch processor.');\n return;\n }\n if (!(0, exports.shouldFetch)(context)) {\n return;\n }\n if (!scope.fetched)\n scope.fetched = {};\n const evalContextValue = evalContext\n ? evalContext((0, formUtil_1.normalizeContext)(context))\n : (0, formUtil_1.normalizeContext)(context);\n const url = utils_1.Evaluator.interpolateString((0, lodash_1.get)(component, 'fetch.url', ''), evalContextValue);\n if (!url) {\n return;\n }\n const request = {\n method: (0, lodash_1.get)(component, 'fetch.method', 'get').toUpperCase(),\n headers: {},\n };\n if ((config === null || config === void 0 ? void 0 : config.headers) &&\n (component === null || component === void 0 ? void 0 : component.fetch) &&\n ((_a = component === null || component === void 0 ? void 0 : component.fetch) === null || _a === void 0 ? void 0 : _a.forwardHeaders)) {\n request.headers = JSON.parse(JSON.stringify(config.headers));\n delete request.headers['host'];\n delete request.headers['content-length'];\n delete request.headers['content-type'];\n delete request.headers['connection'];\n delete request.headers['cache-control'];\n }\n request.headers['Accept'] = '*/*';\n request.headers['user-agent'] = 'Form.io DataSource Component';\n (0, lodash_1.get)(component, 'fetch.headers', []).map((header) => {\n header.value = utils_1.Evaluator.interpolateString(header.value, evalContextValue);\n if (header.value && header.key) {\n request.headers[header.key] = header.value;\n }\n return header;\n });\n if ((0, lodash_1.get)(component, 'fetch.authenticate', false) && (config === null || config === void 0 ? void 0 : config.tokens)) {\n Object.assign(request.headers, config.tokens);\n }\n const body = (0, lodash_1.get)(component, 'fetch.specifyBody', '');\n if (request.method === 'POST') {\n request.body = JSON.stringify(utils_1.Evaluator.evaluate(body, evalContextValue, 'body'));\n }\n try {\n // Perform the fetch.\n const result = yield (yield _fetch(url, request)).json();\n const mapFunction = (0, lodash_1.get)(component, 'fetch.mapFunction');\n // Set the row data of the fetched value.\n const key = (0, formUtil_1.getComponentKey)(component);\n (0, lodash_1.set)(row, key, mapFunction\n ? utils_1.Evaluator.evaluate(mapFunction, Object.assign(Object.assign({}, evalContextValue), { responseData: result }), 'value')\n : result);\n // Make sure the value does not get filtered for now...\n if (!scope.filter)\n scope.filter = {};\n scope.filter[path] = true;\n scope.fetched[path] = (0, lodash_1.get)(row, key);\n }\n catch (err) {\n console.log(err.message);\n }\n});\nexports.fetchProcess = fetchProcess;\nexports.fetchProcessInfo = {\n name: 'fetch',\n process: exports.fetchProcess,\n shouldProcess: exports.shouldFetch,\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/process/fetch/index.js?");
468
468
 
469
469
  /***/ }),
470
470
 
@@ -5059,7 +5059,7 @@ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {
5059
5059
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
5060
5060
 
5061
5061
  "use strict";
5062
- eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst Component_1 = __importDefault(__webpack_require__(/*! ../component/Component */ \"./lib/cjs/components/_classes/component/Component.js\"));\n/*\n * Field class is a base class for all fields.\n * @extends Component\n */\nclass Field extends Component_1.default {\n /**\n * @param {object} element - The component to create.\n * @returns {Field} - The created field.\n */\n render(element) {\n if (this.noField) {\n return super.render(element);\n }\n else if (this.isAdvancedLabel || this.options.condensedMode) {\n return super.render(this.renderTemplate('field', Object.assign(Object.assign({}, this.getLabelInfo(this.options.condensedMode)), { labelMarkup: this.renderTemplate('label'), element: element }), 'align'));\n }\n else {\n return super.render(this.renderTemplate('field', {\n labelMarkup: this.renderTemplate('label'),\n element: element,\n }));\n }\n }\n /**\n /* Saves current caret position to restore it after the component is redrawn\n * @param {HTMLElement} element - The element to save the caret position for.\n * @param {number} index - The index of the element.\n */\n saveCaretPosition(element, index) {\n var _a, _b;\n if (((_b = (_a = this.root) === null || _a === void 0 ? void 0 : _a.focusedComponent) === null || _b === void 0 ? void 0 : _b.path) === this.path) {\n try {\n this.root.currentSelection = { selection: [element.selectionStart, element.selectionEnd], index };\n }\n catch (e) {\n if (!(e instanceof DOMException)) {\n console.debug(e);\n }\n }\n }\n }\n}\nexports[\"default\"] = Field;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/components/_classes/field/Field.js?");
5062
+ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst Component_1 = __importDefault(__webpack_require__(/*! ../component/Component */ \"./lib/cjs/components/_classes/component/Component.js\"));\n/*\n * Field class is a base class for all fields.\n * @extends Component\n */\nclass Field extends Component_1.default {\n /**\n * @param {object} element - The component to create.\n * @returns {string} - The rendered HTML string of a component\n */\n render(element) {\n if (this.noField) {\n return super.render(element);\n }\n else if (this.isAdvancedLabel || this.options.condensedMode) {\n return super.render(this.renderTemplate('field', Object.assign(Object.assign({}, this.getLabelInfo(this.options.condensedMode)), { labelMarkup: this.renderTemplate('label'), element: element }), 'align'));\n }\n else {\n return super.render(this.renderTemplate('field', {\n labelMarkup: this.renderTemplate('label'),\n element: element,\n }));\n }\n }\n /**\n /* Saves current caret position to restore it after the component is redrawn\n * @param {HTMLElement} element - The element to save the caret position for.\n * @param {number} index - The index of the element.\n */\n saveCaretPosition(element, index) {\n var _a, _b;\n if (((_b = (_a = this.root) === null || _a === void 0 ? void 0 : _a.focusedComponent) === null || _b === void 0 ? void 0 : _b.path) === this.path) {\n try {\n this.root.currentSelection = { selection: [element.selectionStart, element.selectionEnd], index };\n }\n catch (e) {\n if (!(e instanceof DOMException)) {\n console.debug(e);\n }\n }\n }\n }\n}\nexports[\"default\"] = Field;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/components/_classes/field/Field.js?");
5063
5063
 
5064
5064
  /***/ }),
5065
5065
 
@@ -5675,7 +5675,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
5675
5675
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
5676
5676
 
5677
5677
  "use strict";
5678
- eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.GoogleAddressProvider = void 0;\n/* globals google */\nconst Formio_1 = __webpack_require__(/*! ../../Formio */ \"./lib/cjs/Formio.js\");\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nconst AddressProvider_1 = __webpack_require__(/*! ./AddressProvider */ \"./lib/cjs/providers/address/AddressProvider.js\");\n/**\n * @typedef {object} AutocompleteOptions\n * @property {string[]} fields - The fields to include in the autocomplete response.\n * @property {object} componentRestrictions - The component restrictions for the autocomplete response.\n * @property {string[]} componentRestrictions.country - The country codes to restrict the autocomplete response to.\n */\n/**\n * @typedef {object} ProviderOptions\n * @property {string} region - The region to restrict the autocomplete response to.\n * @property {string} key - The API key for Google Maps.\n * @property {AutocompleteOptions} autocompleteOptions - The options for the autocomplete functionality.\n */\n/**\n * @typedef {object} Place\n * @property {object} address_components - The address components of the place.\n * @property {string} formatted_address - The formatted address of the place.\n * @property {object} geometry - The geometry information of the place.\n * @property {string} place_id - The place ID of the place.\n * @property {object} plus_code - The plus code of the place.\n * @property {string[]} types - The types of the place.\n * @property {string} formattedPlace - The formatted place value.\n */\n/**\n * @class GoogleAddressProvider\n * @augments AddressProvider\n */\nclass GoogleAddressProvider extends AddressProvider_1.AddressProvider {\n /**\n * @returns {string} The name of the provider.\n */\n static get name() {\n return 'google';\n }\n /**\n * @returns {string} The display name of the provider.\n */\n static get displayName() {\n return 'Google Maps';\n }\n /**\n \n * @param {ProviderOptions} options - The options for the provider.\n */\n constructor(options = {}) {\n var _a;\n super(options);\n this.setAutocompleteOptions();\n let src = 'https://maps.googleapis.com/maps/api/js?v=quarterly&libraries=places&loading=async&callback=googleMapsCallback';\n if ((_a = options.params) === null || _a === void 0 ? void 0 : _a.key) {\n src += `&key=${options.params.key}`;\n }\n Formio_1.Formio.requireLibrary(this.getLibraryName(), 'google.maps.places', src);\n }\n /**\n * get display value property\n * @returns {string} The property to use for display value.\n */\n get displayValueProperty() {\n return 'formattedPlace';\n }\n /**\n * @returns {string} The alternative property to use for display value.\n */\n get alternativeDisplayValueProperty() {\n return 'formatted_address';\n }\n /**\n * @param {AutocompleteOptions} options - The autocomplete options.\n */\n set autocompleteOptions(options) {\n this._autocompleteOptions = options;\n }\n /**\n * @returns {AutocompleteOptions} The autocomplete options.\n */\n get autocompleteOptions() {\n return this._autocompleteOptions;\n }\n /**\n * Sets the autocomplete options based on the provider options.\n \n */\n setAutocompleteOptions() {\n let options = lodash_1.default.get(this.options, 'params.autocompleteOptions', {});\n if (!lodash_1.default.isObject(options)) {\n options = {};\n }\n this.addRequiredProviderOptions(options);\n this.autocompleteOptions = options;\n }\n /**\n \n * Converts the region to autocomplete option if it exists.\n * @param {ProviderOptions} options - The provider options.\n */\n beforeMergeOptions(options) {\n // providing support of old Google Provider option\n this.convertRegionToAutocompleteOption(options);\n }\n /**\n * @returns {string} The name of the library.\n */\n getLibraryName() {\n return 'googleMaps';\n }\n /**\n * Converts the region to autocomplete option.\n * @param {ProviderOptions} options - The provider options.\n */\n convertRegionToAutocompleteOption(options) {\n const providerOptions = options;\n let region = lodash_1.default.get(providerOptions, 'params.region', '');\n if (region && !lodash_1.default.has(options, 'params.autocompleteOptions')) {\n region = region.toUpperCase().trim();\n // providing compatibility with ISO 3166-1 Alpha-2 county codes (for checking compatibility https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)\n const countryCodes = { 'UK': 'GB' };\n if (countryCodes[region]) {\n region = countryCodes[region];\n }\n lodash_1.default.set(providerOptions, 'params.autocompleteOptions.componentRestrictions.country', [region]);\n }\n }\n /**\n * @returns {string[]} The required address properties.\n */\n getRequiredAddressProperties() {\n return ['address_components', 'formatted_address', 'geometry', 'place_id', 'plus_code', 'types'];\n }\n /**\n * Adds the required provider options to the options.\n * @param {AutocompleteOptions} options - The autocomplete options.\n */\n addRequiredProviderOptions(options) {\n const addressProperties = this.getRequiredAddressProperties();\n if (lodash_1.default.isArray(options.fields) && options.fields.length > 0) {\n options.fields.forEach(optionalField => {\n if (!addressProperties.some(addressProp => optionalField === addressProp)) {\n addressProperties.push(optionalField);\n }\n });\n }\n options.fields = addressProperties;\n }\n filterPlace(place) {\n place = place || {};\n const filteredPlace = {};\n if (this.autocompleteOptions) {\n this.autocompleteOptions.fields.forEach(field => {\n if (place[field]) {\n filteredPlace[field] = place[field];\n }\n });\n }\n return filteredPlace;\n }\n attachAutocomplete(elem, index, onSelectAddress) {\n Formio_1.Formio.libraryReady(this.getLibraryName()).then(() => {\n const autocomplete = new google.maps.places.Autocomplete(elem, this.autocompleteOptions);\n autocomplete.addListener('place_changed', () => {\n const place = this.filterPlace(autocomplete.getPlace());\n place.formattedPlace = lodash_1.default.get(autocomplete, 'gm_accessors_.place.se.formattedPrediction', place[this.alternativeDisplayValueProperty]);\n onSelectAddress(place, elem, index);\n });\n });\n }\n search() {\n return Promise.resolve();\n }\n makeRequest() {\n return Promise.resolve();\n }\n getDisplayValue(address) {\n const displayedProperty = lodash_1.default.has(address, this.displayValueProperty)\n ? this.displayValueProperty\n : this.alternativeDisplayValueProperty;\n return lodash_1.default.get(address, displayedProperty, '');\n }\n}\nexports.GoogleAddressProvider = GoogleAddressProvider;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/providers/address/GoogleAddressProvider.js?");
5678
+ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.GoogleAddressProvider = void 0;\n/* globals google */\nconst Formio_1 = __webpack_require__(/*! ../../Formio */ \"./lib/cjs/Formio.js\");\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nconst AddressProvider_1 = __webpack_require__(/*! ./AddressProvider */ \"./lib/cjs/providers/address/AddressProvider.js\");\nconst GOOGLE_MAPS_BASE_URL = 'https://maps.googleapis.com';\nconst GOOGLE_MAPS_JS_URL = `${GOOGLE_MAPS_BASE_URL}/maps/api/js`;\nconst GOOGLE_MAPS_JS_WITH_PARAMS_URL = `${GOOGLE_MAPS_JS_URL}?v=quarterly&libraries=places&loading=async&callback=googleMapsCallback`;\n/**\n * @typedef {object} AutocompleteOptions\n * @property {string[]} fields - The fields to include in the autocomplete response.\n * @property {object} componentRestrictions - The component restrictions for the autocomplete response.\n * @property {string[]} componentRestrictions.country - The country codes to restrict the autocomplete response to.\n */\n/**\n * @typedef {object} ProviderOptions\n * @property {string} region - The region to restrict the autocomplete response to.\n * @property {string} key - The API key for Google Maps.\n * @property {AutocompleteOptions} autocompleteOptions - The options for the autocomplete functionality.\n */\n/**\n * @typedef {object} Place\n * @property {object} address_components - The address components of the place.\n * @property {string} formatted_address - The formatted address of the place.\n * @property {object} geometry - The geometry information of the place.\n * @property {string} place_id - The place ID of the place.\n * @property {object} plus_code - The plus code of the place.\n * @property {string[]} types - The types of the place.\n * @property {string} formattedPlace - The formatted place value.\n */\n/**\n * @class GoogleAddressProvider\n * @augments AddressProvider\n */\nclass GoogleAddressProvider extends AddressProvider_1.AddressProvider {\n /**\n * @returns {string} The name of the provider.\n */\n static get name() {\n return 'google';\n }\n /**\n * @returns {string} The display name of the provider.\n */\n static get displayName() {\n return 'Google Maps';\n }\n /**\n \n * @param {ProviderOptions} options - The options for the provider.\n */\n constructor(options = {}) {\n var _a;\n super(options);\n this.setAutocompleteOptions();\n let src = GOOGLE_MAPS_JS_WITH_PARAMS_URL;\n if ((_a = options.params) === null || _a === void 0 ? void 0 : _a.key) {\n src += `&key=${options.params.key}`;\n }\n this.tryRemoveLibrary(options);\n Formio_1.Formio.requireLibrary(this.getLibraryName(), 'google.maps.places', src);\n }\n /**\n * get display value property\n * @returns {string} The property to use for display value.\n */\n get displayValueProperty() {\n return 'formattedPlace';\n }\n /**\n * @returns {string} The alternative property to use for display value.\n */\n get alternativeDisplayValueProperty() {\n return 'formatted_address';\n }\n /**\n * @param {AutocompleteOptions} options - The autocomplete options.\n */\n set autocompleteOptions(options) {\n this._autocompleteOptions = options;\n }\n /**\n * @returns {AutocompleteOptions} The autocomplete options.\n */\n get autocompleteOptions() {\n return this._autocompleteOptions;\n }\n /**\n * Sets the autocomplete options based on the provider options.\n \n */\n setAutocompleteOptions() {\n let options = lodash_1.default.get(this.options, 'params.autocompleteOptions', {});\n if (!lodash_1.default.isObject(options)) {\n options = {};\n }\n this.addRequiredProviderOptions(options);\n this.autocompleteOptions = options;\n }\n /**\n \n * Converts the region to autocomplete option if it exists.\n * @param {ProviderOptions} options - The provider options.\n */\n beforeMergeOptions(options) {\n // providing support of old Google Provider option\n this.convertRegionToAutocompleteOption(options);\n }\n /**\n * @returns {string} The name of the library.\n */\n getLibraryName() {\n return 'googleMaps';\n }\n /**\n * Converts the region to autocomplete option.\n * @param {ProviderOptions} options - The provider options.\n */\n convertRegionToAutocompleteOption(options) {\n const providerOptions = options;\n let region = lodash_1.default.get(providerOptions, 'params.region', '');\n if (region && !lodash_1.default.has(options, 'params.autocompleteOptions')) {\n region = region.toUpperCase().trim();\n // providing compatibility with ISO 3166-1 Alpha-2 county codes (for checking compatibility https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)\n const countryCodes = { 'UK': 'GB' };\n if (countryCodes[region]) {\n region = countryCodes[region];\n }\n lodash_1.default.set(providerOptions, 'params.autocompleteOptions.componentRestrictions.country', [region]);\n }\n }\n /**\n * @returns {string[]} The required address properties.\n */\n getRequiredAddressProperties() {\n return ['address_components', 'formatted_address', 'geometry', 'place_id', 'plus_code', 'types'];\n }\n /**\n * Adds the required provider options to the options.\n * @param {AutocompleteOptions} options - The autocomplete options.\n */\n addRequiredProviderOptions(options) {\n const addressProperties = this.getRequiredAddressProperties();\n if (lodash_1.default.isArray(options.fields) && options.fields.length > 0) {\n options.fields.forEach(optionalField => {\n if (!addressProperties.some(addressProp => optionalField === addressProp)) {\n addressProperties.push(optionalField);\n }\n });\n }\n options.fields = addressProperties;\n }\n filterPlace(place) {\n place = place || {};\n const filteredPlace = {};\n if (this.autocompleteOptions) {\n this.autocompleteOptions.fields.forEach(field => {\n if (place[field]) {\n filteredPlace[field] = place[field];\n }\n });\n }\n return filteredPlace;\n }\n attachAutocomplete(elem, index, onSelectAddress) {\n Formio_1.Formio.libraryReady(this.getLibraryName()).then(() => {\n const autocomplete = new google.maps.places.Autocomplete(elem, this.autocompleteOptions);\n autocomplete.addListener('place_changed', () => {\n const place = this.filterPlace(autocomplete.getPlace());\n place.formattedPlace = lodash_1.default.get(autocomplete, 'gm_accessors_.place.se.formattedPrediction', place[this.alternativeDisplayValueProperty]);\n onSelectAddress(place, elem, index);\n });\n });\n }\n search() {\n return Promise.resolve();\n }\n makeRequest() {\n return Promise.resolve();\n }\n getDisplayValue(address) {\n const displayedProperty = lodash_1.default.has(address, this.displayValueProperty)\n ? this.displayValueProperty\n : this.alternativeDisplayValueProperty;\n return lodash_1.default.get(address, displayedProperty, '');\n }\n /**\n * Tries to remove the library if api key for loaded script is different.\n * @param {ProviderOptions} options - The options for the provider.\n */\n tryRemoveLibrary(options = {}) {\n var _a, _b, _c;\n if (!Formio_1.Formio.libraries[this.getLibraryName()]) {\n return;\n }\n const existingScript = document.querySelector(`script[src^=\"${GOOGLE_MAPS_JS_URL}\"]`);\n if (existingScript && ((_a = options.params) === null || _a === void 0 ? void 0 : _a.key) && !existingScript.attributes.src.value.endsWith(options.params.key)) {\n const googleMapsScripts = (_b = document.querySelectorAll(`script[src^=\"${GOOGLE_MAPS_BASE_URL}\"]`)) !== null && _b !== void 0 ? _b : [];\n googleMapsScripts.forEach(script => script.parentNode.removeChild(script));\n delete Formio_1.Formio.libraries[this.getLibraryName()];\n (_c = __webpack_require__.g === null || __webpack_require__.g === void 0 ? void 0 : __webpack_require__.g.google) === null || _c === void 0 ? true : delete _c.maps;\n delete __webpack_require__.g[`${this.getLibraryName()}Callback`];\n }\n }\n}\nexports.GoogleAddressProvider = GoogleAddressProvider;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/providers/address/GoogleAddressProvider.js?");
5679
5679
 
5680
5680
  /***/ }),
5681
5681
 
@@ -8916,7 +8916,7 @@ eval("\nvar parent = __webpack_require__(/*! ../../es/object/from-entries */ \".
8916
8916
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
8917
8917
 
8918
8918
  "use strict";
8919
- eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nvar _a;\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.FormBuilder = exports.Form = exports.Formio = void 0;\nconst CDN_js_1 = __importDefault(__webpack_require__(/*! ./CDN.js */ \"./lib/cjs/CDN.js\"));\nclass Formio {\n static setLicense(license, norecurse = false) {\n _a.license = license;\n if (!norecurse && _a.FormioClass) {\n _a.FormioClass.setLicense(license);\n }\n }\n static setBaseUrl(url, norecurse = false) {\n _a.baseUrl = url;\n if (!norecurse && _a.FormioClass) {\n _a.FormioClass.setBaseUrl(url);\n }\n }\n static setApiUrl(url, norecurse = false) {\n _a.baseUrl = url;\n if (!norecurse && _a.FormioClass) {\n _a.FormioClass.setApiUrl(url);\n }\n }\n static setProjectUrl(url, norecurse = false) {\n _a.projectUrl = url;\n if (!norecurse && _a.FormioClass) {\n _a.FormioClass.setProjectUrl(url);\n }\n }\n static setAppUrl(url, norecurse = false) {\n _a.projectUrl = url;\n if (!norecurse && _a.FormioClass) {\n _a.FormioClass.setAppUrl(url);\n }\n }\n static setPathType(type, norecurse = false) {\n _a.pathType = type;\n if (!norecurse && _a.FormioClass) {\n _a.FormioClass.setPathType(type);\n }\n }\n static debug(...args) {\n if (_a.config.debug) {\n console.log(...args);\n }\n }\n static clearCache() {\n if (_a.FormioClass) {\n _a.FormioClass.clearCache();\n }\n }\n static global(prop, flag = '') {\n const globalValue = window[prop];\n if (flag && globalValue && !globalValue[flag]) {\n return null;\n }\n _a.debug(`Getting global ${prop}`, globalValue);\n return globalValue;\n }\n static use(module) {\n if (_a.FormioClass && _a.FormioClass.isRenderer) {\n _a.FormioClass.use(module);\n }\n else {\n _a.modules.push(module);\n }\n }\n static createElement(type, attrs, children) {\n const element = document.createElement(type);\n if (!attrs) {\n return element;\n }\n Object.keys(attrs).forEach(key => {\n element.setAttribute(key, attrs[key]);\n });\n (children || []).forEach(child => {\n element.appendChild(_a.createElement(child.tag, child.attrs, child.children));\n });\n return element;\n }\n static addScript(wrapper, src, name, flag = '') {\n return __awaiter(this, void 0, void 0, function* () {\n if (!src) {\n return Promise.resolve();\n }\n if (typeof src !== 'string' && src.length) {\n return Promise.all(src.map(ref => _a.addScript(wrapper, ref)));\n }\n if (name && _a.global(name, flag)) {\n _a.debug(`${name} already loaded.`);\n return Promise.resolve(_a.global(name));\n }\n _a.debug('Adding Script', src);\n try {\n wrapper.appendChild(_a.createElement('script', {\n src\n }));\n }\n catch (err) {\n _a.debug(err);\n return Promise.resolve();\n }\n if (!name) {\n return Promise.resolve();\n }\n return new Promise((resolve) => {\n _a.debug(`Waiting to load ${name}`);\n const wait = setInterval(() => {\n if (_a.global(name, flag)) {\n clearInterval(wait);\n _a.debug(`${name} loaded.`);\n resolve(_a.global(name));\n }\n }, 100);\n });\n });\n }\n static addStyles(wrapper, href) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!href) {\n return;\n }\n if (typeof href !== 'string' && href.length) {\n href.forEach(ref => _a.addStyles(wrapper, ref));\n return;\n }\n _a.debug('Adding Styles', href);\n wrapper.appendChild(_a.createElement('link', {\n rel: 'stylesheet',\n href\n }));\n });\n }\n static submitDone(instance, submission) {\n return __awaiter(this, void 0, void 0, function* () {\n _a.debug('Submision Complete', submission);\n if (_a.config.submitDone) {\n _a.config.submitDone(submission, instance);\n }\n const successMessage = (_a.config.success || '').toString();\n if (successMessage && successMessage.toLowerCase() !== 'false' && instance.element) {\n instance.element.innerHTML = `<div class=\"alert-success\" role=\"alert\">${successMessage}</div>`;\n }\n let returnUrl = _a.config.redirect;\n // Allow form based configuration for return url.\n if (!returnUrl &&\n (instance._form &&\n instance._form.settings &&\n (instance._form.settings.returnUrl ||\n instance._form.settings.redirect))) {\n _a.debug('Return url found in form configuration');\n returnUrl = instance._form.settings.returnUrl || instance._form.settings.redirect;\n }\n if (returnUrl) {\n const formSrc = instance.formio ? instance.formio.formUrl : '';\n const hasQuery = !!returnUrl.match(/\\?/);\n const isOrigin = returnUrl.indexOf(location.origin) === 0;\n returnUrl += hasQuery ? '&' : '?';\n returnUrl += `sub=${submission._id}`;\n if (!isOrigin && formSrc) {\n returnUrl += `&form=${encodeURIComponent(formSrc)}`;\n }\n _a.debug('Return URL', returnUrl);\n window.location.href = returnUrl;\n if (isOrigin) {\n window.location.reload();\n }\n }\n });\n }\n // Return the full script if the builder is being used.\n static formioScript(script, builder) {\n builder = builder || _a.config.includeBuilder;\n if (_a.fullAdded || builder) {\n _a.fullAdded = true;\n return script.replace('formio.form', 'formio.full');\n }\n return script;\n }\n static addLibrary(libWrapper, lib, name) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!lib) {\n return;\n }\n if (lib.dependencies) {\n for (let i = 0; i < lib.dependencies.length; i++) {\n const libName = lib.dependencies[i];\n yield _a.addLibrary(libWrapper, _a.config.libs[libName], libName);\n }\n }\n if (lib.css) {\n yield _a.addStyles((lib.global ? document.body : libWrapper), lib.css);\n }\n if (lib.js) {\n const module = yield _a.addScript((lib.global ? document.body : libWrapper), lib.js, lib.use ? name : false);\n if (lib.use) {\n _a.debug(`Using ${name}`);\n const options = lib.options || {};\n if (!options.license && _a.license) {\n options.license = _a.license;\n }\n _a.use((typeof lib.use === 'function' ? lib.use(module) : module), options);\n }\n }\n if (lib.globalStyle) {\n const style = _a.createElement('style');\n style.type = 'text/css';\n style.innerHTML = lib.globalStyle;\n document.body.appendChild(style);\n }\n });\n }\n static addLoader(wrapper) {\n return __awaiter(this, void 0, void 0, function* () {\n wrapper.appendChild(_a.createElement('div', {\n 'class': 'formio-loader'\n }, [{\n tag: 'div',\n attrs: {\n class: 'loader-wrapper'\n },\n children: [{\n tag: 'div',\n attrs: {\n class: 'loader text-center'\n }\n }]\n }]));\n });\n }\n // eslint-disable-next-line max-statements\n static init(element, options = {}, builder = false) {\n return __awaiter(this, void 0, void 0, function* () {\n _a.cdn = new CDN_js_1.default(_a.config.cdn, _a.config.cdnUrls || {});\n _a.config.libs = _a.config.libs || {\n uswds: {\n dependencies: ['fontawesome'],\n js: `${_a.cdn.uswds}/uswds.min.js`,\n css: `${_a.cdn.uswds}/uswds.min.css`,\n use: true\n },\n fontawesome: {\n // Due to an issue with font-face not loading in the shadowdom (https://issues.chromium.org/issues/41085401), we need\n // to do 2 things. 1.) Load the fonts from the global cdn, and 2.) add the font-face to the global styles on the page.\n css: `https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css`,\n globalStyle: `@font-face {\n font-family: 'FontAwesome';\n src: url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.eot?v=4.7.0');\n src: url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');\n font-weight: normal;\n font-style: normal;\n }`\n },\n bootstrap4: {\n dependencies: ['fontawesome'],\n css: `${_a.cdn.bootstrap4}/css/bootstrap.min.css`\n },\n bootstrap: {\n dependencies: ['bootstrap-icons'],\n css: `${_a.cdn.bootstrap}/css/bootstrap.min.css`\n },\n 'bootstrap-icons': {\n // Due to an issue with font-face not loading in the shadowdom (https://issues.chromium.org/issues/41085401), we need\n // to do 2 things. 1.) Load the fonts from the global cdn, and 2.) add the font-face to the global styles on the page.\n css: 'https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.min.css',\n globalStyle: `@font-face {\n font-display: block;\n font-family: \"bootstrap-icons\";\n src: url(\"https://cdn.jsdelivr.net/npm/bootstrap-icons/font/fonts/bootstrap-icons.woff2?dd67030699838ea613ee6dbda90effa6\") format(\"woff2\"),\n url(\"https://cdn.jsdelivr.net/npm/bootstrap-icons/font/fonts/bootstrap-icons.woff?dd67030699838ea613ee6dbda90effa6\") format(\"woff\");\n }`\n }\n };\n // Add all bootswatch templates.\n ['cerulean', 'cosmo', 'cyborg', 'darkly', 'flatly', 'journal', 'litera', 'lumen', 'lux', 'materia', 'minty', 'pulse', 'sandstone', 'simplex', 'sketchy', 'slate', 'solar', 'spacelab', 'superhero', 'united', 'yeti'].forEach((template) => {\n _a.config.libs[template] = {\n dependencies: ['bootstrap-icons'],\n css: `${_a.cdn.bootswatch}/dist/${template}/bootstrap.min.css`\n };\n });\n const id = _a.config.id || `formio-${Math.random().toString(36).substring(7)}`;\n // Create a new wrapper and add the element inside of a new wrapper.\n let wrapper = _a.createElement('div', {\n 'id': `${id}-wrapper`\n });\n element.parentNode.insertBefore(wrapper, element);\n // If we include the libraries, then we will attempt to run this in shadow dom.\n const useShadowDom = _a.config.includeLibs && !_a.config.noshadow && (typeof wrapper.attachShadow === 'function');\n if (useShadowDom) {\n wrapper = wrapper.attachShadow({\n mode: 'open'\n });\n options.shadowRoot = wrapper;\n }\n element.parentNode.removeChild(element);\n wrapper.appendChild(element);\n // If this is inside of shadow dom, then we need to add the styles and scripts to the shadow dom.\n const libWrapper = useShadowDom ? wrapper : document.body;\n // Load the renderer styles.\n yield _a.addStyles(libWrapper, _a.config.embedCSS || `${_a.cdn.js}/formio.embed.css`);\n // Add a loader.\n _a.addLoader(wrapper);\n const formioSrc = _a.config.full ? 'formio.full' : 'formio.form';\n const renderer = _a.config.debug ? formioSrc : `${formioSrc}.min`;\n _a.FormioClass = yield _a.addScript(libWrapper, _a.formioScript(_a.config.script || `${_a.cdn.js}/${renderer}.js`, builder), 'Formio', builder ? 'isBuilder' : 'isRenderer');\n _a.FormioClass.cdn = _a.cdn;\n _a.FormioClass.setBaseUrl(options.baseUrl || _a.baseUrl || _a.config.base);\n _a.FormioClass.setProjectUrl(options.projectUrl || _a.projectUrl || _a.config.project);\n _a.FormioClass.language = _a.language;\n _a.setLicense(_a.license || _a.config.license || false);\n _a.modules.forEach((module) => {\n _a.FormioClass.use(module);\n });\n if (_a.icons) {\n _a.FormioClass.icons = _a.icons;\n }\n if (_a.pathType) {\n _a.FormioClass.setPathType(_a.pathType);\n }\n // Add libraries if they wish to include the libs.\n if (_a.config.template && _a.config.includeLibs) {\n yield _a.addLibrary(libWrapper, _a.config.libs[_a.config.template], _a.config.template);\n }\n if (!_a.config.libraries) {\n _a.config.libraries = _a.config.modules || {};\n }\n // Adding premium if it is provided via the config.\n if (_a.config.premium) {\n _a.config.libraries.premium = _a.config.premium;\n }\n // Allow adding dynamic modules.\n if (_a.config.libraries) {\n for (const name in _a.config.libraries) {\n const lib = _a.config.libraries[name];\n lib.use = lib.use || true;\n yield _a.addLibrary(libWrapper, lib, name);\n }\n }\n yield _a.addStyles(libWrapper, _a.formioScript(_a.config.style || `${_a.cdn.js}/${renderer}.css`, builder));\n if (_a.config.before) {\n yield _a.config.before(_a.FormioClass, element, _a.config);\n }\n _a.FormioClass.license = true;\n _a._formioReady(_a.FormioClass);\n return wrapper;\n });\n }\n // Called after an instance has been created.\n static afterCreate(instance, wrapper, readyEvent) {\n return __awaiter(this, void 0, void 0, function* () {\n const loader = wrapper.querySelector('.formio-loader');\n if (loader) {\n wrapper.removeChild(loader);\n }\n _a.FormioClass.events.emit(readyEvent, instance);\n if (_a.config.after) {\n _a.debug('Calling ready callback');\n _a.config.after(instance, _a.config);\n }\n return instance;\n });\n }\n // Create a new form.\n static createForm(element, form, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n if (_a.FormioClass) {\n return _a.FormioClass.createForm(element, form, Object.assign(Object.assign({}, options), { noLoader: true }));\n }\n const wrapper = yield _a.init(element, options);\n return _a.FormioClass.createForm(element, form, Object.assign(Object.assign({}, options), { noLoader: true })).then((instance) => {\n // Set the default submission data.\n if (_a.config.submission) {\n _a.debug('Setting submission', _a.config.submission);\n instance.submission = _a.config.submission;\n }\n // Call the after create method.\n _a.afterCreate(instance, wrapper, 'formEmbedded');\n return instance;\n });\n });\n }\n // Create a form builder.\n static builder(element, form, options = {}) {\n var _b;\n return __awaiter(this, void 0, void 0, function* () {\n if ((_b = _a.FormioClass) === null || _b === void 0 ? void 0 : _b.builder) {\n return _a.FormioClass.builder(element, form, options);\n }\n const wrapper = yield _a.init(element, options, true);\n return _a.FormioClass.builder(element, form, options).then((instance) => {\n _a.afterCreate(instance, wrapper, 'builderEmbedded');\n return instance;\n });\n });\n }\n}\nexports.Formio = Formio;\n_a = Formio;\nFormio.FormioClass = null;\nFormio.config = {};\nFormio.modules = [];\nFormio.icons = '';\nFormio.license = '';\nFormio.formioReady = new Promise((ready, reject) => {\n _a._formioReady = ready;\n _a._formioReadyReject = reject;\n});\nFormio.version = '5.1.0-rc.3';\n// Create a report.\nFormio.Report = {\n create: (element, submission, options = {}) => __awaiter(void 0, void 0, void 0, function* () {\n var _b;\n if ((_b = _a.FormioClass) === null || _b === void 0 ? void 0 : _b.Report) {\n return _a.FormioClass.Report.create(element, submission, options);\n }\n const wrapper = yield _a.init(element, options, true);\n return _a.FormioClass.Report.create(element, submission, options).then((instance) => {\n _a.afterCreate(instance, wrapper, 'reportEmbedded');\n return instance;\n });\n })\n};\nCDN_js_1.default.defaultCDN = Formio.version.includes('rc') ? 'https://cdn.test-form.io' : 'https://cdn.form.io';\nclass Form {\n constructor(element, form, options) {\n this.form = form;\n this.element = element;\n this.options = options || {};\n this.init();\n this.instance = {\n proxy: true,\n ready: this.ready,\n destroy: () => { }\n };\n }\n init() {\n if (this.instance && !this.instance.proxy) {\n this.instance.destroy();\n }\n this.element.innerHTML = '';\n this.ready = this.create().then((instance) => {\n this.instance = instance;\n this.form = instance.form;\n return instance;\n });\n }\n create() {\n return Formio.createForm(this.element, this.form, this.options);\n }\n setForm(form) {\n this.form = form;\n if (this.instance) {\n this.instance.setForm(form);\n }\n }\n setDisplay(display) {\n if (this.instance.proxy) {\n return this.ready;\n }\n this.form.display = display;\n this.instance.destroy();\n this.ready = this.create().then((instance) => {\n this.instance = instance;\n this.setForm(this.form);\n });\n return this.ready;\n }\n}\nexports.Form = Form;\nclass FormBuilder extends Form {\n create() {\n return Formio.builder(this.element, this.form, this.options);\n }\n}\nexports.FormBuilder = FormBuilder;\nFormio.Form = Form;\nFormio.FormBuilder = FormBuilder;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/Embed.js?");
8919
+ eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nvar _a;\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.FormBuilder = exports.Form = exports.Formio = void 0;\nconst CDN_js_1 = __importDefault(__webpack_require__(/*! ./CDN.js */ \"./lib/cjs/CDN.js\"));\nclass Formio {\n static setLicense(license, norecurse = false) {\n _a.license = license;\n if (!norecurse && _a.FormioClass) {\n _a.FormioClass.setLicense(license);\n }\n }\n static setBaseUrl(url, norecurse = false) {\n _a.baseUrl = url;\n if (!norecurse && _a.FormioClass) {\n _a.FormioClass.setBaseUrl(url);\n }\n }\n static setApiUrl(url, norecurse = false) {\n _a.baseUrl = url;\n if (!norecurse && _a.FormioClass) {\n _a.FormioClass.setApiUrl(url);\n }\n }\n static setProjectUrl(url, norecurse = false) {\n _a.projectUrl = url;\n if (!norecurse && _a.FormioClass) {\n _a.FormioClass.setProjectUrl(url);\n }\n }\n static setAppUrl(url, norecurse = false) {\n _a.projectUrl = url;\n if (!norecurse && _a.FormioClass) {\n _a.FormioClass.setAppUrl(url);\n }\n }\n static setPathType(type, norecurse = false) {\n _a.pathType = type;\n if (!norecurse && _a.FormioClass) {\n _a.FormioClass.setPathType(type);\n }\n }\n static debug(...args) {\n if (_a.config.debug) {\n console.log(...args);\n }\n }\n static clearCache() {\n if (_a.FormioClass) {\n _a.FormioClass.clearCache();\n }\n }\n static global(prop, flag = '') {\n const globalValue = window[prop];\n if (flag && globalValue && !globalValue[flag]) {\n return null;\n }\n _a.debug(`Getting global ${prop}`, globalValue);\n return globalValue;\n }\n static use(module) {\n if (_a.FormioClass && _a.FormioClass.isRenderer) {\n _a.FormioClass.use(module);\n }\n else {\n _a.modules.push(module);\n }\n }\n static createElement(type, attrs, children) {\n const element = document.createElement(type);\n if (!attrs) {\n return element;\n }\n Object.keys(attrs).forEach(key => {\n element.setAttribute(key, attrs[key]);\n });\n (children || []).forEach(child => {\n element.appendChild(_a.createElement(child.tag, child.attrs, child.children));\n });\n return element;\n }\n static addScript(wrapper, src, name, flag = '') {\n return __awaiter(this, void 0, void 0, function* () {\n if (!src) {\n return Promise.resolve();\n }\n if (typeof src !== 'string' && src.length) {\n return Promise.all(src.map(ref => _a.addScript(wrapper, ref)));\n }\n if (name && _a.global(name, flag)) {\n _a.debug(`${name} already loaded.`);\n return Promise.resolve(_a.global(name));\n }\n _a.debug('Adding Script', src);\n try {\n wrapper.appendChild(_a.createElement('script', {\n src\n }));\n }\n catch (err) {\n _a.debug(err);\n return Promise.resolve();\n }\n if (!name) {\n return Promise.resolve();\n }\n return new Promise((resolve) => {\n _a.debug(`Waiting to load ${name}`);\n const wait = setInterval(() => {\n if (_a.global(name, flag)) {\n clearInterval(wait);\n _a.debug(`${name} loaded.`);\n resolve(_a.global(name));\n }\n }, 100);\n });\n });\n }\n static addStyles(wrapper, href) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!href) {\n return;\n }\n if (typeof href !== 'string' && href.length) {\n href.forEach(ref => _a.addStyles(wrapper, ref));\n return;\n }\n _a.debug('Adding Styles', href);\n wrapper.appendChild(_a.createElement('link', {\n rel: 'stylesheet',\n href\n }));\n });\n }\n static submitDone(instance, submission) {\n return __awaiter(this, void 0, void 0, function* () {\n _a.debug('Submision Complete', submission);\n if (_a.config.submitDone) {\n _a.config.submitDone(submission, instance);\n }\n const successMessage = (_a.config.success || '').toString();\n if (successMessage && successMessage.toLowerCase() !== 'false' && instance.element) {\n instance.element.innerHTML = `<div class=\"alert-success\" role=\"alert\">${successMessage}</div>`;\n }\n let returnUrl = _a.config.redirect;\n // Allow form based configuration for return url.\n if (!returnUrl &&\n (instance._form &&\n instance._form.settings &&\n (instance._form.settings.returnUrl ||\n instance._form.settings.redirect))) {\n _a.debug('Return url found in form configuration');\n returnUrl = instance._form.settings.returnUrl || instance._form.settings.redirect;\n }\n if (returnUrl) {\n const formSrc = instance.formio ? instance.formio.formUrl : '';\n const hasQuery = !!returnUrl.match(/\\?/);\n const isOrigin = returnUrl.indexOf(location.origin) === 0;\n returnUrl += hasQuery ? '&' : '?';\n returnUrl += `sub=${submission._id}`;\n if (!isOrigin && formSrc) {\n returnUrl += `&form=${encodeURIComponent(formSrc)}`;\n }\n _a.debug('Return URL', returnUrl);\n window.location.href = returnUrl;\n if (isOrigin) {\n window.location.reload();\n }\n }\n });\n }\n // Return the full script if the builder is being used.\n static formioScript(script, builder) {\n builder = builder || _a.config.includeBuilder;\n if (_a.fullAdded || builder) {\n _a.fullAdded = true;\n return script.replace('formio.form', 'formio.full');\n }\n return script;\n }\n static addLibrary(libWrapper, lib, name) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!lib) {\n return;\n }\n if (lib.dependencies) {\n for (let i = 0; i < lib.dependencies.length; i++) {\n const libName = lib.dependencies[i];\n yield _a.addLibrary(libWrapper, _a.config.libs[libName], libName);\n }\n }\n if (lib.css) {\n yield _a.addStyles((lib.global ? document.body : libWrapper), lib.css);\n }\n if (lib.js) {\n const module = yield _a.addScript((lib.global ? document.body : libWrapper), lib.js, lib.use ? name : false);\n if (lib.use) {\n _a.debug(`Using ${name}`);\n const options = lib.options || {};\n if (!options.license && _a.license) {\n options.license = _a.license;\n }\n _a.use((typeof lib.use === 'function' ? lib.use(module) : module), options);\n }\n }\n if (lib.globalStyle) {\n const style = _a.createElement('style');\n style.type = 'text/css';\n style.innerHTML = lib.globalStyle;\n document.body.appendChild(style);\n }\n });\n }\n static addLoader(wrapper) {\n return __awaiter(this, void 0, void 0, function* () {\n wrapper.appendChild(_a.createElement('div', {\n 'class': 'formio-loader'\n }, [{\n tag: 'div',\n attrs: {\n class: 'loader-wrapper'\n },\n children: [{\n tag: 'div',\n attrs: {\n class: 'loader text-center'\n }\n }]\n }]));\n });\n }\n // eslint-disable-next-line max-statements\n static init(element, options = {}, builder = false) {\n return __awaiter(this, void 0, void 0, function* () {\n _a.cdn = new CDN_js_1.default(_a.config.cdn, _a.config.cdnUrls || {});\n _a.config.libs = _a.config.libs || {\n uswds: {\n dependencies: ['fontawesome'],\n js: `${_a.cdn.uswds}/uswds.min.js`,\n css: `${_a.cdn.uswds}/uswds.min.css`,\n use: true\n },\n fontawesome: {\n // Due to an issue with font-face not loading in the shadowdom (https://issues.chromium.org/issues/41085401), we need\n // to do 2 things. 1.) Load the fonts from the global cdn, and 2.) add the font-face to the global styles on the page.\n css: `https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css`,\n globalStyle: `@font-face {\n font-family: 'FontAwesome';\n src: url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.eot?v=4.7.0');\n src: url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');\n font-weight: normal;\n font-style: normal;\n }`\n },\n bootstrap4: {\n dependencies: ['fontawesome'],\n css: `${_a.cdn.bootstrap4}/css/bootstrap.min.css`\n },\n bootstrap: {\n dependencies: ['bootstrap-icons'],\n css: `${_a.cdn.bootstrap}/css/bootstrap.min.css`\n },\n 'bootstrap-icons': {\n // Due to an issue with font-face not loading in the shadowdom (https://issues.chromium.org/issues/41085401), we need\n // to do 2 things. 1.) Load the fonts from the global cdn, and 2.) add the font-face to the global styles on the page.\n css: 'https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.min.css',\n globalStyle: `@font-face {\n font-display: block;\n font-family: \"bootstrap-icons\";\n src: url(\"https://cdn.jsdelivr.net/npm/bootstrap-icons/font/fonts/bootstrap-icons.woff2?dd67030699838ea613ee6dbda90effa6\") format(\"woff2\"),\n url(\"https://cdn.jsdelivr.net/npm/bootstrap-icons/font/fonts/bootstrap-icons.woff?dd67030699838ea613ee6dbda90effa6\") format(\"woff\");\n }`\n }\n };\n // Add all bootswatch templates.\n ['cerulean', 'cosmo', 'cyborg', 'darkly', 'flatly', 'journal', 'litera', 'lumen', 'lux', 'materia', 'minty', 'pulse', 'sandstone', 'simplex', 'sketchy', 'slate', 'solar', 'spacelab', 'superhero', 'united', 'yeti'].forEach((template) => {\n _a.config.libs[template] = {\n dependencies: ['bootstrap-icons'],\n css: `${_a.cdn.bootswatch}/dist/${template}/bootstrap.min.css`\n };\n });\n const id = _a.config.id || `formio-${Math.random().toString(36).substring(7)}`;\n // Create a new wrapper and add the element inside of a new wrapper.\n let wrapper = _a.createElement('div', {\n 'id': `${id}-wrapper`\n });\n element.parentNode.insertBefore(wrapper, element);\n // If we include the libraries, then we will attempt to run this in shadow dom.\n const useShadowDom = _a.config.includeLibs && !_a.config.noshadow && (typeof wrapper.attachShadow === 'function');\n if (useShadowDom) {\n wrapper = wrapper.attachShadow({\n mode: 'open'\n });\n options.shadowRoot = wrapper;\n }\n element.parentNode.removeChild(element);\n wrapper.appendChild(element);\n // If this is inside of shadow dom, then we need to add the styles and scripts to the shadow dom.\n const libWrapper = useShadowDom ? wrapper : document.body;\n // Load the renderer styles.\n yield _a.addStyles(libWrapper, _a.config.embedCSS || `${_a.cdn.js}/formio.embed.css`);\n // Add a loader.\n _a.addLoader(wrapper);\n const formioSrc = _a.config.full ? 'formio.full' : 'formio.form';\n const renderer = _a.config.debug ? formioSrc : `${formioSrc}.min`;\n _a.FormioClass = yield _a.addScript(libWrapper, _a.formioScript(_a.config.script || `${_a.cdn.js}/${renderer}.js`, builder), 'Formio', builder ? 'isBuilder' : 'isRenderer');\n _a.FormioClass.cdn = _a.cdn;\n _a.FormioClass.setBaseUrl(options.baseUrl || _a.baseUrl || _a.config.base);\n _a.FormioClass.setProjectUrl(options.projectUrl || _a.projectUrl || _a.config.project);\n _a.FormioClass.language = _a.language;\n _a.setLicense(_a.license || _a.config.license || false);\n _a.modules.forEach((module) => {\n _a.FormioClass.use(module);\n });\n if (_a.icons) {\n _a.FormioClass.icons = _a.icons;\n }\n if (_a.pathType) {\n _a.FormioClass.setPathType(_a.pathType);\n }\n // Add libraries if they wish to include the libs.\n if (_a.config.template && _a.config.includeLibs) {\n yield _a.addLibrary(libWrapper, _a.config.libs[_a.config.template], _a.config.template);\n }\n if (!_a.config.libraries) {\n _a.config.libraries = _a.config.modules || {};\n }\n // Adding premium if it is provided via the config.\n if (_a.config.premium) {\n _a.config.libraries.premium = _a.config.premium;\n }\n // Allow adding dynamic modules.\n if (_a.config.libraries) {\n for (const name in _a.config.libraries) {\n const lib = _a.config.libraries[name];\n lib.use = lib.use || true;\n yield _a.addLibrary(libWrapper, lib, name);\n }\n }\n yield _a.addStyles(libWrapper, _a.formioScript(_a.config.style || `${_a.cdn.js}/${renderer}.css`, builder));\n if (_a.config.before) {\n yield _a.config.before(_a.FormioClass, element, _a.config);\n }\n _a.FormioClass.license = true;\n _a._formioReady(_a.FormioClass);\n return wrapper;\n });\n }\n // Called after an instance has been created.\n static afterCreate(instance, wrapper, readyEvent) {\n return __awaiter(this, void 0, void 0, function* () {\n const loader = wrapper.querySelector('.formio-loader');\n if (loader) {\n wrapper.removeChild(loader);\n }\n _a.FormioClass.events.emit(readyEvent, instance);\n if (_a.config.after) {\n _a.debug('Calling ready callback');\n _a.config.after(instance, _a.config);\n }\n return instance;\n });\n }\n // Create a new form.\n static createForm(element, form, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n if (_a.FormioClass) {\n return _a.FormioClass.createForm(element, form, Object.assign(Object.assign({}, options), { noLoader: true }));\n }\n const wrapper = yield _a.init(element, options);\n return _a.FormioClass.createForm(element, form, Object.assign(Object.assign({}, options), { noLoader: true })).then((instance) => {\n // Set the default submission data.\n if (_a.config.submission) {\n _a.debug('Setting submission', _a.config.submission);\n instance.submission = _a.config.submission;\n }\n // Call the after create method.\n _a.afterCreate(instance, wrapper, 'formEmbedded');\n return instance;\n });\n });\n }\n // Create a form builder.\n static builder(element, form, options = {}) {\n var _b;\n return __awaiter(this, void 0, void 0, function* () {\n if ((_b = _a.FormioClass) === null || _b === void 0 ? void 0 : _b.builder) {\n return _a.FormioClass.builder(element, form, options);\n }\n const wrapper = yield _a.init(element, options, true);\n return _a.FormioClass.builder(element, form, options).then((instance) => {\n _a.afterCreate(instance, wrapper, 'builderEmbedded');\n return instance;\n });\n });\n }\n}\nexports.Formio = Formio;\n_a = Formio;\nFormio.FormioClass = null;\nFormio.config = {};\nFormio.modules = [];\nFormio.icons = '';\nFormio.license = '';\nFormio.formioReady = new Promise((ready, reject) => {\n _a._formioReady = ready;\n _a._formioReadyReject = reject;\n});\nFormio.version = '5.1.0-rc.5';\n// Create a report.\nFormio.Report = {\n create: (element, submission, options = {}) => __awaiter(void 0, void 0, void 0, function* () {\n var _b;\n if ((_b = _a.FormioClass) === null || _b === void 0 ? void 0 : _b.Report) {\n return _a.FormioClass.Report.create(element, submission, options);\n }\n const wrapper = yield _a.init(element, options, true);\n return _a.FormioClass.Report.create(element, submission, options).then((instance) => {\n _a.afterCreate(instance, wrapper, 'reportEmbedded');\n return instance;\n });\n })\n};\nCDN_js_1.default.defaultCDN = Formio.version.includes('rc') ? 'https://cdn.test-form.io' : 'https://cdn.form.io';\nclass Form {\n constructor(element, form, options) {\n this.form = form;\n this.element = element;\n this.options = options || {};\n this.init();\n this.instance = {\n proxy: true,\n ready: this.ready,\n destroy: () => { }\n };\n }\n init() {\n if (this.instance && !this.instance.proxy) {\n this.instance.destroy();\n }\n this.element.innerHTML = '';\n this.ready = this.create().then((instance) => {\n this.instance = instance;\n this.form = instance.form;\n return instance;\n });\n }\n create() {\n return Formio.createForm(this.element, this.form, this.options);\n }\n setForm(form) {\n this.form = form;\n if (this.instance) {\n this.instance.setForm(form);\n }\n }\n setDisplay(display) {\n if (this.instance.proxy) {\n return this.ready;\n }\n this.form.display = display;\n this.instance.destroy();\n this.ready = this.create().then((instance) => {\n this.instance = instance;\n this.setForm(this.form);\n });\n return this.ready;\n }\n}\nexports.Form = Form;\nclass FormBuilder extends Form {\n create() {\n return Formio.builder(this.element, this.form, this.options);\n }\n}\nexports.FormBuilder = FormBuilder;\nFormio.Form = Form;\nFormio.FormBuilder = FormBuilder;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/Embed.js?");
8920
8920
 
8921
8921
  /***/ }),
8922
8922
 
@@ -8927,7 +8927,7 @@ eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _argument
8927
8927
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
8928
8928
 
8929
8929
  "use strict";
8930
- eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Formio = void 0;\nconst sdk_1 = __webpack_require__(/*! @formio/core/sdk */ \"./node_modules/@formio/core/lib/sdk/index.js\");\nObject.defineProperty(exports, \"Formio\", ({ enumerable: true, get: function () { return sdk_1.Formio; } }));\nconst Embed_1 = __webpack_require__(/*! ./Embed */ \"./lib/cjs/Embed.js\");\nconst CDN_1 = __importDefault(__webpack_require__(/*! ./CDN */ \"./lib/cjs/CDN.js\"));\nconst providers_1 = __importDefault(__webpack_require__(/*! ./providers */ \"./lib/cjs/providers/index.js\"));\nsdk_1.Formio.cdn = new CDN_1.default();\nsdk_1.Formio.Providers = providers_1.default;\nsdk_1.Formio.version = '5.1.0-rc.3';\nCDN_1.default.defaultCDN = sdk_1.Formio.version.includes('rc') ? 'https://cdn.test-form.io' : 'https://cdn.form.io';\nconst isNil = (val) => val === null || val === undefined;\nsdk_1.Formio.prototype.uploadFile = function (storage, file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, uploadStartCallback, abortCallback, multipartOptions) {\n const requestArgs = {\n provider: storage,\n method: 'upload',\n file: file,\n fileName: fileName,\n dir: dir\n };\n fileKey = fileKey || 'file';\n const request = sdk_1.Formio.pluginWait('preRequest', requestArgs)\n .then(() => {\n return sdk_1.Formio.pluginGet('fileRequest', requestArgs)\n .then((result) => {\n if (storage && isNil(result)) {\n const Provider = providers_1.default.getProvider('storage', storage);\n if (Provider) {\n const provider = new Provider(this);\n if (uploadStartCallback) {\n uploadStartCallback();\n }\n return provider.uploadFile(file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, abortCallback, multipartOptions);\n }\n else {\n throw ('Storage provider not found');\n }\n }\n return result || { url: '' };\n });\n });\n return sdk_1.Formio.pluginAlter('wrapFileRequestPromise', request, requestArgs);\n};\nsdk_1.Formio.prototype.downloadFile = function (file, options) {\n const requestArgs = {\n method: 'download',\n file: file\n };\n const request = sdk_1.Formio.pluginWait('preRequest', requestArgs)\n .then(() => {\n return sdk_1.Formio.pluginGet('fileRequest', requestArgs)\n .then((result) => {\n if (file.storage && isNil(result)) {\n const Provider = providers_1.default.getProvider('storage', file.storage);\n if (Provider) {\n const provider = new Provider(this);\n return provider.downloadFile(file, options);\n }\n else {\n throw ('Storage provider not found');\n }\n }\n return result || { url: '' };\n });\n });\n return sdk_1.Formio.pluginAlter('wrapFileRequestPromise', request, requestArgs);\n};\nsdk_1.Formio.prototype.deleteFile = function (file, options) {\n const requestArgs = {\n method: 'delete',\n file: file\n };\n const request = sdk_1.Formio.pluginWait('preRequest', requestArgs)\n .then(() => {\n return sdk_1.Formio.pluginGet('fileRequest', requestArgs)\n .then((result) => {\n if (file.storage && isNil(result)) {\n const Provider = providers_1.default.getProvider('storage', file.storage);\n if (Provider) {\n const provider = new Provider(this);\n return provider.deleteFile(file, options);\n }\n else {\n throw ('Storage provider not found');\n }\n }\n return result || { url: '' };\n });\n });\n return sdk_1.Formio.pluginAlter('wrapFileRequestPromise', request, requestArgs);\n};\n// Esnure we proxy the following methods to the FormioEmbed class.\n['setBaseUrl', 'setApiUrl', 'setAppUrl', 'setProjectUrl', 'setPathType', 'setLicense'].forEach((fn) => {\n const baseFn = sdk_1.Formio[fn];\n sdk_1.Formio[fn] = function (arg) {\n const retVal = Embed_1.Formio[fn](arg, true);\n return baseFn ? baseFn.call(this, arg) : retVal;\n };\n});\n// For reverse compatability.\nsdk_1.Formio.Promise = Promise;\nsdk_1.Formio.formioReady = Embed_1.Formio.formioReady;\nsdk_1.Formio.config = Embed_1.Formio.config;\nsdk_1.Formio.builder = Embed_1.Formio.builder;\nsdk_1.Formio.Report = Embed_1.Formio.Report;\nsdk_1.Formio.Form = Embed_1.Formio.Form;\nsdk_1.Formio.FormBuilder = Embed_1.Formio.FormBuilder;\nsdk_1.Formio.use = Embed_1.Formio.use;\nsdk_1.Formio.createForm = Embed_1.Formio.createForm;\nsdk_1.Formio.submitDone = Embed_1.Formio.submitDone;\nsdk_1.Formio.addLibrary = Embed_1.Formio.addLibrary;\nsdk_1.Formio.addLoader = Embed_1.Formio.addLoader;\nsdk_1.Formio.addToGlobal = (global) => {\n if (typeof global === 'object' && !global.Formio) {\n global.Formio = sdk_1.Formio;\n }\n};\nif (typeof __webpack_require__.g !== 'undefined') {\n sdk_1.Formio.addToGlobal(__webpack_require__.g);\n}\nif (typeof window !== 'undefined') {\n sdk_1.Formio.addToGlobal(window);\n}\nEmbed_1.Formio._formioReady(sdk_1.Formio);\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/Formio.js?");
8930
+ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Formio = void 0;\nconst sdk_1 = __webpack_require__(/*! @formio/core/sdk */ \"./node_modules/@formio/core/lib/sdk/index.js\");\nObject.defineProperty(exports, \"Formio\", ({ enumerable: true, get: function () { return sdk_1.Formio; } }));\nconst Embed_1 = __webpack_require__(/*! ./Embed */ \"./lib/cjs/Embed.js\");\nconst CDN_1 = __importDefault(__webpack_require__(/*! ./CDN */ \"./lib/cjs/CDN.js\"));\nconst providers_1 = __importDefault(__webpack_require__(/*! ./providers */ \"./lib/cjs/providers/index.js\"));\nsdk_1.Formio.cdn = new CDN_1.default();\nsdk_1.Formio.Providers = providers_1.default;\nsdk_1.Formio.version = '5.1.0-rc.5';\nCDN_1.default.defaultCDN = sdk_1.Formio.version.includes('rc') ? 'https://cdn.test-form.io' : 'https://cdn.form.io';\nconst isNil = (val) => val === null || val === undefined;\nsdk_1.Formio.prototype.uploadFile = function (storage, file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, uploadStartCallback, abortCallback, multipartOptions) {\n const requestArgs = {\n provider: storage,\n method: 'upload',\n file: file,\n fileName: fileName,\n dir: dir\n };\n fileKey = fileKey || 'file';\n const request = sdk_1.Formio.pluginWait('preRequest', requestArgs)\n .then(() => {\n return sdk_1.Formio.pluginGet('fileRequest', requestArgs)\n .then((result) => {\n if (storage && isNil(result)) {\n const Provider = providers_1.default.getProvider('storage', storage);\n if (Provider) {\n const provider = new Provider(this);\n if (uploadStartCallback) {\n uploadStartCallback();\n }\n return provider.uploadFile(file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, abortCallback, multipartOptions);\n }\n else {\n throw ('Storage provider not found');\n }\n }\n return result || { url: '' };\n });\n });\n return sdk_1.Formio.pluginAlter('wrapFileRequestPromise', request, requestArgs);\n};\nsdk_1.Formio.prototype.downloadFile = function (file, options) {\n const requestArgs = {\n method: 'download',\n file: file\n };\n const request = sdk_1.Formio.pluginWait('preRequest', requestArgs)\n .then(() => {\n return sdk_1.Formio.pluginGet('fileRequest', requestArgs)\n .then((result) => {\n if (file.storage && isNil(result)) {\n const Provider = providers_1.default.getProvider('storage', file.storage);\n if (Provider) {\n const provider = new Provider(this);\n return provider.downloadFile(file, options);\n }\n else {\n throw ('Storage provider not found');\n }\n }\n return result || { url: '' };\n });\n });\n return sdk_1.Formio.pluginAlter('wrapFileRequestPromise', request, requestArgs);\n};\nsdk_1.Formio.prototype.deleteFile = function (file, options) {\n const requestArgs = {\n method: 'delete',\n file: file\n };\n const request = sdk_1.Formio.pluginWait('preRequest', requestArgs)\n .then(() => {\n return sdk_1.Formio.pluginGet('fileRequest', requestArgs)\n .then((result) => {\n if (file.storage && isNil(result)) {\n const Provider = providers_1.default.getProvider('storage', file.storage);\n if (Provider) {\n const provider = new Provider(this);\n return provider.deleteFile(file, options);\n }\n else {\n throw ('Storage provider not found');\n }\n }\n return result || { url: '' };\n });\n });\n return sdk_1.Formio.pluginAlter('wrapFileRequestPromise', request, requestArgs);\n};\n// Esnure we proxy the following methods to the FormioEmbed class.\n['setBaseUrl', 'setApiUrl', 'setAppUrl', 'setProjectUrl', 'setPathType', 'setLicense'].forEach((fn) => {\n const baseFn = sdk_1.Formio[fn];\n sdk_1.Formio[fn] = function (arg) {\n const retVal = Embed_1.Formio[fn](arg, true);\n return baseFn ? baseFn.call(this, arg) : retVal;\n };\n});\n// For reverse compatability.\nsdk_1.Formio.Promise = Promise;\nsdk_1.Formio.formioReady = Embed_1.Formio.formioReady;\nsdk_1.Formio.config = Embed_1.Formio.config;\nsdk_1.Formio.builder = Embed_1.Formio.builder;\nsdk_1.Formio.Report = Embed_1.Formio.Report;\nsdk_1.Formio.Form = Embed_1.Formio.Form;\nsdk_1.Formio.FormBuilder = Embed_1.Formio.FormBuilder;\nsdk_1.Formio.use = Embed_1.Formio.use;\nsdk_1.Formio.createForm = Embed_1.Formio.createForm;\nsdk_1.Formio.submitDone = Embed_1.Formio.submitDone;\nsdk_1.Formio.addLibrary = Embed_1.Formio.addLibrary;\nsdk_1.Formio.addLoader = Embed_1.Formio.addLoader;\nsdk_1.Formio.addToGlobal = (global) => {\n if (typeof global === 'object' && !global.Formio) {\n global.Formio = sdk_1.Formio;\n }\n};\nif (typeof __webpack_require__.g !== 'undefined') {\n sdk_1.Formio.addToGlobal(__webpack_require__.g);\n}\nif (typeof window !== 'undefined') {\n sdk_1.Formio.addToGlobal(window);\n}\nEmbed_1.Formio._formioReady(sdk_1.Formio);\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/Formio.js?");
8931
8931
 
8932
8932
  /***/ }),
8933
8933