{"version":3,"sources":["webpack:///C:/a/2/s/Cognito.Web.Client/libs/shared-components/src/utilities/notify.js"],"names":["require","_Inline","_interopRequireDefault","_vue","obj","__esModule","default","exports","message","icon","iconComponent","type","arguments","length","undefined","duration","showClose","customIcon","Vue","props","Object","keys","Inline","propsData","svg","template","Math","max","split","concat","_message","dangerouslyUseHTMLString","customClass","$mount"],"mappings":"6KAAAA,EAAA,KAEA,IAAAC,EAAAC,EAAAF,EAAA,MACAG,EAAAD,EAAAF,EAAA,KAAsB,SAAAE,EAAAE,GAAA,OAAAA,KAAAC,WAAAD,EAAA,CAAAE,QAAAF,GAAAG,EAAAD,QAEP,SAACE,GAAiF,IAC5FC,EACAC,EAFoBC,EAAIC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,OAAQG,EAAQH,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,KAAMI,IAASJ,UAAAC,OAAA,QAAAC,IAAAF,UAAA,KAAAA,UAAA,GAASK,EAAUL,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,MAItFH,EADY,YAATE,EACI,UACU,UAATA,GAA6B,YAATA,EACrB,UACU,WAATA,EACDM,EAEA,QAGPP,EAAgB,IAAIQ,UAAI,CACvBC,MAAOC,OAAOC,KAAKC,UAAOH,OAC1BI,UAAW,CACVC,IAAKf,GAENgB,SAAU,yEAMW,iBAAZjB,IACVO,EAAwB,OAAbA,EAAoBW,KAAKC,IAAI,IAAkC,IAA5BnB,EAAQoB,MAAM,KAAKf,OAAe,KAAOE,EACvFP,EAAU,GAAHqB,OAAMnB,EAAgB,iCAAHmB,OAAoCrB,GAAYA,KAG3E,EAAAsB,EAAAxB,SAAQ,CACPyB,0BAA0B,EAC1BvB,QAASA,EACTG,KAAMA,EACNI,SAAUA,EACViB,YAAa,gBAAFH,OAA2B,SAATlB,EAAkB,MAAHkB,OAASlB,EAAI,uBAAwB,sBACjFK,UAAWA,IAGRN,GACHA,EAAcuB,OAAO","file":"15.d4abf99d6af69ca163a4.js","sourcesContent":["import '@cognitoforms/styles/global/notifications.scss';\r\nimport { Message } from '@cognitoforms/element-ui';\r\nimport Inline from '../components/content/Inline.vue';\r\nimport Vue from 'vue';\r\n\r\nexport default (message, type = 'info', duration = null, showClose = true, customIcon = null) => {\r\n\tlet icon;\r\n\tlet iconComponent;\r\n\tif (type === 'success')\r\n\t\ticon = 'success';\r\n\telse if (type === 'error' || type === 'warning')\r\n\t\ticon = 'warning';\r\n\telse if (type === 'custom')\r\n\t\ticon = customIcon;\r\n\telse\r\n\t\ticon = null;\r\n\r\n\tif (icon)\r\n\t\ticonComponent = new Vue({\r\n\t\t\tprops: Object.keys(Inline.props),\r\n\t\t\tpropsData: {\r\n\t\t\t\tsvg: icon\r\n\t\t\t},\r\n\t\t\ttemplate: ''\r\n\t\t});\r\n\r\n\t// changed this I think it makes more sense to go by the words b/c thats how reading speeds are quantified\r\n\t// I googled it it says that the average is 200 words per 2 minutes 120/200 = .6s per word\r\n\t// the 400 is the about double the average response time (250ms)\r\n\tif (typeof message === 'string') {\r\n\t\tduration = duration === null ? Math.max(3000, message.split(' ').length * 500 + 400) : duration;\r\n\t\tmessage = `${iconComponent ? ` ${message}` : message}`;\r\n\t}\r\n\r\n\tMessage({\r\n\t\tdangerouslyUseHTMLString: true,\r\n\t\tmessage: message,\r\n\t\ttype: type,\r\n\t\tduration: duration,\r\n\t\tcustomClass: `notification ${type !== 'info' ? `is-${type} notification--icon` : 'notification--info'}`,\r\n\t\tshowClose: showClose\r\n\t});\r\n\r\n\tif (iconComponent)\r\n\t\ticonComponent.$mount('#icon-slot');\r\n};"],"sourceRoot":""}