OwlCyberSecurity - MANAGER
Edit File: 587-9d9b605b1006cdb6068e.js
"use strict";(self.webpackChunkfont_awesome_admin=self.webpackChunkfont_awesome_admin||[]).push([[85,587],{2:(e,t,n)=>{n.d(t,{A:()=>d});var o=n(609),s=n.n(o);var r=n(119),a=n(723);const i=(0,o.createElement)(r.A,{title:(0,a.__)("Whoops, this is embarrassing","font-awesome"),type:"warning"},(0,o.createElement)("p",null,(0,a.__)("Some unexpected error has occurred. There might be some additional diagnostic information in the JavaScript console.","font-awesome"))),c=function(){return(0,o.createElement)("div",{className:"iVV55iNB320NJJLspy7m"},i)};var l=n(458);class u extends s().Component{constructor(e){super(e),this.state={error:null,errorInfo:null}}componentDidCatch(e,t){console.group(l.V2),console.log(e),console.log(t),console.groupEnd(),this.setState({error:e,errorInfo:t})}render(){return this.state.error?(0,o.createElement)(c,null):this.props.children}}const d=u},85:(e,t,n)=>{n.r(t),n.d(t,{CONFLICT_DETECTION_SCANNER_DURATION_MIN:()=>d,addPendingOption:()=>N,checkPreferenceConflicts:()=>v,chooseAwayFromKitConfig:()=>R,chooseIntoKitConfig:()=>A,preprocessResponse:()=>y,queryKits:()=>P,reportDetectedConflicts:()=>U,resetOptionsFormState:()=>S,resetPendingBlocklistSubmissionStatus:()=>I,resetPendingOptions:()=>T,resetUnregisteredClientsDeletionStatus:()=>C,setActiveAdminTab:()=>F,setConflictDetectionScanner:()=>W,submitPendingBlocklist:()=>O,submitPendingOptions:()=>x,submitPendingUnregisteredClientDeletions:()=>D,updateApiToken:()=>M,updatePendingBlocklist:()=>b,updatePendingUnregisteredClientsForDeletion:()=>w,userAttemptToStopScanner:()=>k});var o=n(83),s=n(87),r=n(458),a=n(723);function i(e,t=0){let n=null,o=null;if("string"!=typeof e)return null;if(t>=e.length)return null;try{return n=JSON.parse(e.slice(t)),{start:t,parsed:n}}catch(n){const s=e.indexOf("[",t+1),r=e.indexOf("{",t+1);if(-1===s&&-1===r)return null;o=-1!==s&&-1!==r?s<r?s:r:-1!==r?r:s}return null===o?null:i(e,o)}const c=function(e){if(!e||""===e)return null;const t=i(e);if(null===t)return null;{const{start:n,parsed:o}=t;return{start:n,json:e.slice(n),trimmed:e.slice(0,n),parsed:o}}},l="wp-font-awesome-cache",u=o.A.create(),d=10,p=1,m=(0,a.__)("Couldn't save those changes","font-awesome"),f=(0,a.__)("Changes not saved because your WordPress server does not allow this kind of request. Look for details in the browser console.","font-awesome"),g=(0,a.__)("Couldn't check preferences","font-awesome"),_=(0,a.__)("A request to your WordPress server never received a response","font-awesome"),E=(0,a.__)("A request to your WordPress server failed","font-awesome"),h=(0,a.__)("Couldn't start the scanner","font-awesome");function y(e){const t=(0,s.has)(e,"headers.fontawesome-confirmation");if(204===e.status&&""!==e.data)return(0,r.Ay)({error:null,confirmed:t,trimmed:e.data,expectEmpty:!0}),e.data={},e;const n=(0,s.get)(e,"data",null),o="string"==typeof n&&(0,s.size)(n)>0,a=o?c(n):{};o&&a&&(e.data=(0,s.get)(a,"parsed"));const i=(0,s.get)(a,"trimmed",""),l=(0,s.get)(e,"data.errors",null);if(e.status>=400){if(l)e.uiMessage=(0,r.Ay)({error:e.data,confirmed:t,trimmed:i});else{const n=(0,s.get)(e,"config.method","").toUpperCase(),o=(0,s.get)(e,"config.url"),a=e.status,i=(0,s.get)(e,"statusText"),c=(0,r.b3)(e),l=(0,r.cA)((0,s.get)(e,"headers",{})),u=(0,r.cA)((0,s.get)(e,"config.headers",{})),d=(0,s.get)(e,"data");e.uiMessage=(0,r.Ay)({confirmed:t,requestData:c,requestMethod:n,requestUrl:o,responseHeaders:l,requestHeaders:u,responseStatus:a,responseStatusText:i,responseData:d}),405===a&&(e.uiMessage=f)}return e}if(e.status<400&&e.status>=300)return t&&""===i||(e.uiMessage=(0,r.Ay)({error:null,confirmed:t,trimmed:i})),e;if(l){const n=!0;return e.falsePositive=!0,e.uiMessage=(0,r.Ay)({error:e.data,confirmed:t,falsePositive:n,trimmed:i}),e}{const n=(0,s.get)(e,"data.error",null);return n?(e.uiMessage=(0,r.Ay)({error:n,ok:!0,confirmed:t,trimmed:i}),e):(t||(e.uiMessage=(0,r.Ay)({error:null,ok:!0,confirmed:t,trimmed:i})),e)}}function T(){return{type:"RESET_PENDING_OPTIONS"}}function S(){return{type:"OPTIONS_FORM_STATE_RESET"}}function N(e){return function(t,n){const{options:o}=n();for(const[n,r]of(0,s.toPairs)(e))t(o[n]===r?{type:"RESET_PENDING_OPTION",change:{[n]:r}}:{type:"ADD_PENDING_OPTION",change:{[n]:r}})}}function w(e=[]){return{type:"UPDATE_PENDING_UNREGISTERED_CLIENTS_FOR_DELETION",data:e}}function C(){return{type:"DELETE_UNREGISTERED_CLIENTS_RESET"}}function I(){return{type:"BLOCKLIST_UPDATE_RESET"}}function D(){return function(e,t){const{apiNonce:n,apiUrl:o,unregisteredClientsDeletionStatus:r}=t(),a=(0,s.get)(r,"pending",null);if(!a||0===(0,s.size)(a))return;e({type:"DELETE_UNREGISTERED_CLIENTS_START"});const i=({uiMessage:t})=>{e({type:"DELETE_UNREGISTERED_CLIENTS_END",success:!1,message:t||m})};return u.delete(`${o}/conflict-detection/conflicts`,{data:a,headers:{"X-WP-Nonce":n}}).then((t=>{const{status:n,data:o,falsePositive:s}=t;s?i(t):e({type:"DELETE_UNREGISTERED_CLIENTS_END",success:!0,data:204===n?null:o,message:""})})).catch(i)}}function b(e=[]){return{type:"UPDATE_PENDING_BLOCKLIST",data:e}}function O(){return function(e,t){const{apiNonce:n,apiUrl:o,blocklistUpdateStatus:r}=t(),a=(0,s.get)(r,"pending",null);if(!a)return;e({type:"BLOCKLIST_UPDATE_START"});const i=({uiMessage:t})=>{e({type:"BLOCKLIST_UPDATE_END",success:!1,message:t||m})};return u.post(`${o}/conflict-detection/conflicts/blocklist`,a,{headers:{"X-WP-Nonce":n}}).then((t=>{const{status:n,data:o,falsePositive:s}=t;s?i(t):e({type:"BLOCKLIST_UPDATE_END",success:!0,data:204===n?null:o,message:""})})).catch(i)}}function v(){return function(e,t){e({type:"PREFERENCE_CHECK_START"});const{apiNonce:n,apiUrl:o,options:s,pendingOptions:r}=t(),a=({uiMessage:t})=>{e({type:"PREFERENCE_CHECK_END",success:!1,message:t||g})};return u.post(`${o}/preference-check`,{...s,...r},{headers:{"X-WP-Nonce":n}}).then((t=>{const{data:n,falsePositive:o}=t;o?a(t):e({type:"PREFERENCE_CHECK_END",success:!0,message:"",detectedConflicts:n})})).catch(a)}}function R({activeKitToken:e}){return function(t,n){const{releases:o}=n();t({type:"CHOOSE_AWAY_FROM_KIT_CONFIG",activeKitToken:e,concreteVersion:(0,s.get)(o,"latest_version_6")})}}function A(){return{type:"CHOOSE_INTO_KIT_CONFIG"}}function P(){return function(e,t){const{apiNonce:n,apiUrl:o,options:r}=t(),i=(0,s.get)(r,"kitToken",null);e({type:"KITS_QUERY_START"}),function(){if(window?.localStorage&&0!==localStorage.length)for(let e=localStorage.length-1;e>=0;e--){const t=localStorage.key(e);t.startsWith(l)&&localStorage.removeItem(t)}}();const c=({uiMessage:t})=>{e({type:"KITS_QUERY_END",success:!1,message:t||(0,a.__)("Failed to fetch kits","font-awesome")})},d=({uiMessage:t})=>{e({type:"OPTIONS_FORM_SUBMIT_END",success:!1,message:t||(0,a.__)("Couldn't update latest kit settings","font-awesome")})};return u.post(`${o}/api`,"query { me { kits { name version technologySelected licenseSelected minified token shimEnabled autoAccessibilityEnabled status }}}",{headers:{"X-WP-Nonce":n}}).then((t=>{if(t.falsePositive)return c(t);const l=(0,s.get)(t,"data.data");if(!(0,s.get)(l,"me"))return e({type:"KITS_QUERY_END",success:!1,message:(0,a.__)("Failed to fetch kits. Regenerate your API Token and try again.","font-awesome")});if(e({type:"KITS_QUERY_END",data:l,success:!0}),!i)return;const p=(0,s.get)(l,"me.kits",[]),m=(0,s.find)(p,{token:i});if(!m)return;const f={};return r.usePro&&"pro"!==m.licenseSelected?f.usePro=!1:r.usePro||"pro"!==m.licenseSelected||(f.usePro=!0),"svg"===r.technology&&"svg"!==m.technologySelected?(f.technology="webfont",f.pseudoElements=!0):"svg"!==r.technology&&"svg"===m.technologySelected&&(f.technology="svg",f.pseudoElements=!1),r.version!==m.version&&(f.version=m.version),r.compat&&!m.shimEnabled?f.compat=!1:!r.compat&&m.shimEnabled&&(f.compat=!0),e({type:"OPTIONS_FORM_SUBMIT_START"}),u.post(`${o}/config`,{options:{...r,...f}},{headers:{"X-WP-Nonce":n}}).then((t=>{const{data:n,falsePositive:o}=t;if(o)return d(t);e({type:"OPTIONS_FORM_SUBMIT_END",data:n,success:!0,message:(0,a.__)("Kit changes saved","font-awesome")})})).catch(d)})).catch(c)}}function x(){return function(e,t){const{apiNonce:n,apiUrl:o,options:s,pendingOptions:r}=t();e({type:"OPTIONS_FORM_SUBMIT_START"});const i=({uiMessage:t})=>{e({type:"OPTIONS_FORM_SUBMIT_END",success:!1,message:t||m})};return u.post(`${o}/config`,{options:{...s,...r}},{headers:{"X-WP-Nonce":n}}).then((t=>{const{data:n,falsePositive:o}=t;o?i(t):e({type:"OPTIONS_FORM_SUBMIT_END",data:n,success:!0,message:(0,a.__)("Changes saved","font-awesome")})})).catch(i)}}function M({apiToken:e=!1,runQueryKits:t=!1}){return function(n,o){const{apiNonce:s,apiUrl:r,options:i}=o();n({type:"OPTIONS_FORM_SUBMIT_START"});const c=({uiMessage:e})=>{n({type:"OPTIONS_FORM_SUBMIT_END",success:!1,message:e||m})};return u.post(`${r}/config`,{options:{...i,apiToken:e}},{headers:{"X-WP-Nonce":s}}).then((e=>{const{data:o,falsePositive:s}=e;if(s)c(e);else if(n({type:"OPTIONS_FORM_SUBMIT_END",data:o,success:!0,message:(0,a.__)("API Token saved","font-awesome")}),t)return n(P())})).catch(c)}}function k(){return{type:"USER_STOP_SCANNER"}}function U({nodesTested:e={}}){return(t,n)=>{const{apiNonce:o,apiUrl:r,unregisteredClients:a,showConflictDetectionReporter:i}=n();if(i){if((0,s.size)(e.conflict)>0){const n=Object.keys(e.conflict).reduce((function(t,n){return t[n]=e.conflict[n],t}),{});t({type:"CONFLICT_DETECTION_SUBMIT_START",unregisteredClientsBeforeDetection:a,recentConflictsDetected:e.conflict});const i=({uiMessage:e})=>{t({type:"CONFLICT_DETECTION_SUBMIT_END",success:!1,message:e||m})};return u.post(`${r}/conflict-detection/conflicts`,n,{headers:{"X-WP-Nonce":o}}).then((e=>{const{status:n,data:o,falsePositive:r}=e;r?i(e):t({type:"CONFLICT_DETECTION_SUBMIT_END",success:!0,data:204===n||0===(0,s.size)(o)?null:o})})).catch(i)}t({type:"CONFLICT_DETECTION_NONE_FOUND"})}}}function F(e){return{type:"SET_ACTIVE_ADMIN_TAB",tab:e}}function W({enable:e=!0}){return function(t,n){const{apiNonce:o,apiUrl:s}=n(),r=e?"ENABLE_CONFLICT_DETECTION_SCANNER_END":"DISABLE_CONFLICT_DETECTION_SCANNER_END";t({type:e?"ENABLE_CONFLICT_DETECTION_SCANNER_START":"DISABLE_CONFLICT_DETECTION_SCANNER_START"});const a=({uiMessage:e})=>{t({type:r,success:!1,message:e||h})};return u.post(`${s}/conflict-detection/until`,e?Math.floor(new Date((new Date).valueOf()+1e3*d*60)/1e3):Math.floor(new Date/1e3)-p,{headers:{"X-WP-Nonce":o}}).then((e=>{const{status:n,data:o,falsePositive:s}=e;s?a(e):t({type:r,data:204===n?null:o,success:!0})})).catch(a)}}(0,a.__)("Couldn't snooze","font-awesome"),u.interceptors.response.use((e=>y(e)),(e=>{if(e.response)e.response=y(e.response),e.uiMessage=(0,s.get)(e,"response.uiMessage");else if(e.request){const t="fontawesome_request_noresponse",n={errors:{[t]:[_]},error_data:{[t]:{request:e.request}}};e.uiMessage=(0,r.Ay)({error:n})}else{const t="fontawesome_request_failed",n={errors:{[t]:[E]},error_data:{[t]:{failedRequestMessage:e.message}}};e.uiMessage=(0,r.Ay)({error:n})}return Promise.reject(e)}))},119:(e,t,n)=>{n.d(t,{A:()=>p});var o=n(609),s=n(556),r=n.n(s);const a={alert:"lX8h3LbX6kaLN7_hLhlw","alert-icon":"nx2ZqeD9AnYnPnKHAqKJ","alert-title":"ovRzytWn5jGccLKV78T9","alert-message":"M_C6Dj_EqhO8IuY52iA6","alert-action":"liWjpcvKZkKaYPsJjQPA","alert-warning":"MLwfZfK5uVZOtIHI1cdt"};var i=n(942),c=n.n(i),l=n(784),u=n(188);function d(e={}){return(0,o.createElement)("div",{className:c()(a.alert,a[`alert-${e.type}`]),role:"alert"},(0,o.createElement)("div",{className:a["alert-icon"]},function(e={}){switch(e.type){case"info":return(0,o.createElement)(l.g,{icon:u.iW_,title:"info",fixedWidth:!0});case"warning":default:return(0,o.createElement)(l.g,{icon:u.zpE,title:"warning",fixedWidth:!0});case"pending":return(0,o.createElement)(l.g,{icon:u.z1G,title:"pending",spin:!0,fixedWidth:!0});case"success":return(0,o.createElement)(l.g,{icon:u.Wcv,title:"success",fixedWidth:!0})}}(e)),(0,o.createElement)("div",{className:a["alert-message"]},(0,o.createElement)("h2",{className:a["alert-title"]},e.title),(0,o.createElement)("div",{className:a["alert-copy"]},e.children)))}d.propTypes={title:r().string.isRequired,type:r().oneOf(["info","warning","success","pending"]),children:r().oneOfType([r().object,r().string,r().arrayOf(r().element)]).isRequired};const p=d},192:(e,t,n)=>{n.d(t,{A:()=>g});var o=n(609),s=n(556),r=n.n(s),a=n(896),i=n(312),c=n(87),l=n(723);const u=86400,d=3600,p=60;function m(e){const t=Math.floor(e/u),n=Math.floor((e-t*u)/d),o=Math.floor((e-(t*u+n*d))/p),s=e-(t*u+n*d+o*p);return(0,c.dropWhile)([t,n,o,s].reduce(((e,t,n)=>(0===n&&0!==t?e.push(t.toString()):e.push((0,c.padStart)(t.toString(),2,"0")),e)),[]),(e=>e.match(/^[0]+$/))).join(":")}function f(e){const t=e-Math.floor(new Date/1e3);return t<0?0:t}function g({addDescription:e,children:t}){const n=(0,a.d4)((e=>e.detectConflictsUntil)),[s,r]=(0,o.useState)(f(n)),c=(0,a.wA)();return(0,o.useEffect)((()=>{let e=null;return f(n)>0?e=setTimeout((()=>r(f(n))),1e3):(r(m(0)),c({type:"CONFLICT_DETECTION_TIMER_EXPIRED"})),()=>e&&clearTimeout(e)}),[n,s,c]),s<=0?null:(0,o.createElement)("span",{className:i.A["conflict-detection-timer"]},m(s),!!e&&(s>60?/* translators: 1: space */ /* translators: 1: space */ (0,l.sprintf)((0,l.__)("%1$sminutes left to browse your site for trouble","font-awesome")," "):/* translators: 1: space */ /* translators: 1: space */ (0,l.sprintf)((0,l.__)("%1$sseconds left to browse your site for trouble","font-awesome")," ")),t)}g.propTypes={addDescription:r().bool}},312:(e,t,n)=>{n.d(t,{A:()=>o});const o={"wrapper-div":"xAYNgmh_FT28wOZEe4og","submit-wrapper":"W3wz4Liah2EvWxtTBXN8","submit-status":"OpLLWfmNs6BXGmnmuinK",fail:"q0fCXPnTi1vRhNmP0IEt","fail-icon-container":"A2dLn8oZtVzuXngZMDRp",explanation:"xFoMk9Jc8Ir4n5Olcce1",success:"fQeEY3YNz4yh6R7vdi7J",icon:"JPBgwk6PxfiitLxJLE54","section-title":"VklefjWwawC59yrOPe3e","section-divider":"e8Vu3y2YBkuW8N9IhY2m","table-header":"gNYVG50hxMZs8Gqbj_T0","more-less":"dpYyb_l0GWlAiVkOmmYt","scanner-actions":"WJl_9YHKGkhUvtVwgVco","scanner-runstatus":"HBCEbIhIET1XISEYneSA",faPrimary:"ZXe2iyFqFThwx_UF4CBf","conflict-detection-timer":"HgLyUkphZYd8YsLSMJAZ",warning:"Gu2u4ZSZT25Yqm8zSogj","sr-only":"WOV9bdVrpJVdQWzhBnHZ",flex:"QN_KH8sqi5QFBDqaH1rI","flex-row":"bBMVcUUJf1GW7veG1Zic","flex-column":"pIa2BGO1ABMtYZY185Bf",relative:"h0koIl1zvME7toM3jUk9",status:"kWqY7l_wn27HmdUNz7ZY",good:"q3No9l7YMUEH1xvYTNfI","success-icon":"Y7M4JHzDp7jtCt6MonbK","conflict-icon":"a6qTuZmDiKS_FHgMZawo",conflict:"PwCQsIQEdGz9b0cOj3iA","warning-icon":"rw5FUVRrrdM17WyxcRZ9","space-left":"QEoklKhbCbwOUBs0cspa","input-checkbox-custom":"oWHnpotXuoOIlJoqkkgw","checked-icon":"NzRaF0U8aKPVtS6JIaK8","input-radio-custom":"gIUwcNcpOHhTKG4sTlfg","unchecked-icon":"iemYJRvB4tzF1xnuGiAw","option-label-explanation":"BFR5diS8tiViycbuTDVS"}},458:(e,t,n)=>{n.d(t,{Ay:()=>S,V2:()=>r,b3:()=>y,cA:()=>T});var o=n(87),s=n(723);const r=(0,s.__)("Font Awesome WordPress Plugin Error Report","font-awesome"),a=(0,s.__)("D'oh! That failed big time.","font-awesome"),i=(0,s.__)("There was an error attempting to report the error.","font-awesome"),c=(0,s.__)("Oh no! Your web browser could not reach your WordPress server.","font-awesome"),l=(0,s.__)("It looks like your web browser session expired. Try logging out and log back in to WordPress admin.","font-awesome"),u=(0,s.__)("The last request was successful, but it also returned the following error(s), which might be helpful for troubleshooting.","font-awesome"),d=(0,s.__)("Error","font-awesome"),p=(0,s.__)("WARNING: The last request contained errors, though your WordPress server reported it as a success. This usually means there's a problem with your theme or one of your other plugins emitting output that is causing problems.","font-awesome"),m=(0,s.__)("WARNING: The last response from your WordPress server did not include the confirmation header that should be in all valid Font Awesome responses. This is a clue that some code from another theme or plugin is acting badly and causing the wrong headers to be sent.","font-awesome"),f=(0,s.__)("CONFIRMED: The last response from your WordPress server included the confirmation header that is expected for all valid responses from the Font Awesome plugin's code running on your WordPress server.","font-awesome"),g=(0,s.__)("WARNING: Invalid Data Trimmed from Server Response","font-awesome"),_=(0,s.__)("WARNING: We expected the last response from the server to contain no data, but it contained something unexpected.","font-awesome"),E=(0,s.__)("Your WordPress server returned an error for that last request, but there was no information about the error.","font-awesome"),h=["requestMethod","responseStatus","responseStatusText","requestUrl","requestData","responseHeaders","responseData","requestHeaders"];function y(e={}){const t=(0,o.get)(e,"config.headers.Content-Type","").toLowerCase(),n=(0,o.get)(e,"config.data","");let s="";if("application/json"===t){try{const e=JSON.parse(n);"boolean"!=typeof(0,o.get)(e,"options.apiToken")&&(0,o.set)(e,"options.apiToken","REDACTED"),s=JSON.stringify(e)}catch(e){s=`ERROR while redacting request data: ${e.toString()}`}return s}return n}function T(e={}){const t={...e};for(const e in t)"x-wp-nonce"===e.toLowerCase()&&(t[e]="REDACTED");return t}const S=function(e){const{error:t=null,ok:n=!1,falsePositive:s=!1,confirmed:y=!1,expectEmpty:T=!1,trimmed:S=""}=e;console.group(r),n&&console.info(u),s&&console.info(p),y?console.info(f):console.info(m);const N=[];for(const t of h){const n=(0,o.get)(e,t);if(void 0!==n){const e=typeof n;if("string"===e||"number"===e)N.push(`${t}: ${n}`);else if("object"===e){N.push(`${t}:`);for(const e in n)N.push(`\t${e}: ${n[e].toString()}`)}else console.info(`Unexpected report content type '${e}' for ${t}:`,n)}}(0,o.size)(N)>0&&console.info(`Extra Info:\n${N.join("\n")}`),""!==S&&(console.group(g),T&&console.info(_),console.info(S),console.groupEnd());const w=null!==t?function(e={}){const t=Object.keys(e.errors||[]).map((t=>({code:t,message:(0,o.get)(e,`errors.${t}.0`),data:(0,o.get)(e,`error_data.${t}`)})));return 0===(0,o.size)(t)&&t.push({code:"fontawesome_unknown_error",message:i}),t.reduce(((e,t)=>{console.group(d);const n=function(e){if(!(0,o.get)(e,"code"))return console.info(i),a;let t=null,n="";const s=(0,o.get)(e,"message");s&&(n=n.concat(`message: ${s}\n`),t=s);const r=(0,o.get)(e,"code");if(r)switch(n=n.concat(`code: ${r}\n`),r){case"rest_no_route":t=c;break;case"rest_cookie_invalid_nonce":t=l;break;case"fontawesome_unknown_error":t=a}const u=(0,o.get)(e,"data");if("string"==typeof u)n=n.concat(`data: ${u}\n`);else{const t=(0,o.get)(e,"data.status");t&&(n=n.concat(`status: ${t}\n`));const s=(0,o.get)(e,"data.trace");s&&(n=n.concat(`trace:\n${s}\n`))}n&&""!==n?console.info(n):console.info(e);const d=(0,o.get)(e,"data.request");d&&console.info(d);const p=(0,o.get)(e,"data.failedRequestMessage");return p&&console.info(p),t}(t);return console.groupEnd(),e||"previous_exception"===t.code?e:n}),null)}(t):null;return t&&""===S&&y&&console.info(E),console.groupEnd(),w}},587:(e,t,n)=>{n.r(t),n.d(t,{CONFLICT_DETECTION_SHADOW_HOST_ID:()=>w,isConflictDetectionReporterMounted:()=>I,mountConflictDetectionReporter:()=>C});var o=n(609),s=n(338),r=n(896),a=n(85),i=n(784),c=n(188),l=n(442),u=n(192),d=n(87),p=n(723),m=n(2);const f={running:{code:"Running",display:(0,p.__)("Running","font-awesome")},done:{code:"Done",display:(0,p.__)("Done","font-awesome")},submitting:{code:"Submitting",display:(0,p.__)("Submitting","font-awesome")},none:{code:"None",display:(0,p.__)("None","font-awesome")},error:{code:"Error",display:(0,p.__)("Error","font-awesome")},expired:{code:"Expired",display:(0,p.__)("Expired","font-awesome")},ready:{code:"Ready",display:(0,p.__)("Ready","font-awesome")},stopped:{code:"Stopped",display:(0,p.__)("Stopped","font-awesome")},stopping:{code:"Stopping",display:(0,p.__)("Stopping","font-awesome")},restarting:{code:"Restarting",display:(0,p.__)("Restarting","font-awesome")}},g={container:{position:"fixed",fontFamily:'"Helvetica Neue",Helvetica,Arial,sans-serif',right:"10px",bottom:"10px",width:"450px",height:"auto",maxHeight:"60%",border:"1px solid #CDD4DB",borderRadius:"3px",boxShadow:"1px 1px 5px 0 rgba(132,142,151,.3)",background:"#008DED",zIndex:"99",overflowY:"scroll",fontSize:"14px",lineHeight:"1.4em",color:"#fff"},header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"5px 20px",color:"#CAECFF"},content:{width:"100%",padding:"0 20px 10px 20px",boxSizing:"border-box"},adminEyesOnly:{margin:"0",fontSize:"12px"},h1:{margin:".3em 0",fontSize:"14px"},h2:{margin:".3em 0",fontSize:"18px"},p:{margin:".5em 0"},link:{color:"#fff"},tally:{display:"flex",alignItems:"center",margin:".5em 0",textAlign:"center"},count:{flexBasis:"1em",marginRight:"5px",fontWeight:"600",fontSize:"20px"},timerRow:{display:"flex",alignItems:"center",backgroundColor:"#0064B1",padding:"10px 20px",color:"#fff",fontWeight:"600"},button:{margin:"0 0 0 10px",border:"0",padding:"5px",backgroundColor:"transparent",color:"#fff",opacity:".7",cursor:"pointer"},badness:{padding:"20px 25px",backgroundColor:"#FFC100",color:"#202529"}},_=(E=function(){const e=(0,r.wA)(),t=(0,r.d4)((e=>e.settingsPageUrl)),n=`${t}&tab=ts`,s=(0,r.d4)((e=>e.activeAdminTab)),m=window.location.href.startsWith(t)&&s===l.HM,_=(0,r.d4)((e=>e.userAttemptedToStopScanner)),E=(0,r.d4)((e=>e.unregisteredClients)),h=(0,r.d4)((e=>e.unregisteredClientDetectionStatus.unregisteredClientsBeforeDetection)),y=(0,r.d4)((e=>e.unregisteredClientDetectionStatus.recentConflictsDetected)),T=(0,r.d4)((e=>!e.showConflictDetectionReporter)),S=(0,r.d4)((e=>T&&e.conflictDetectionScannerStatus.isSubmitting)),N=(0,r.d4)((e=>e.conflictDetectionScannerStatus.hasSubmitted&&e.conflictDetectionScannerStatus.success)),w=(0,r.d4)((e=>_&&!e.conflictDetectionScannerStatus.hasSubmitted)),C=(0,r.d4)((e=>_&&!w&&e.conflictDetectionScannerStatus.success)),I=(0,r.d4)((e=>{const{isSubmitting:t,hasSubmitted:n,success:o}=e.unregisteredClientDetectionStatus;return _?w?f.stopping:C?f.stopped:f.error:S?f.restarting:T?f.expired:N?f.ready:o&&0===(0,d.size)(E)?f.none:o?f.done:t?f.submitting:n?f.error:f.running})),D=(0,r.d4)((e=>e.unregisteredClientDetectionStatus.message)),b=(0,o.createElement)("div",null,(0,o.createElement)("h2",{style:g.tally},(0,o.createElement)("span",null,(0,d.size)(E))," ",(0,o.createElement)("span",null," ",(0,p.__)("Results to Review","font-awesome"))),(0,o.createElement)("p",{style:g.p},m?(0,p.__)("Manage results or restart the scanner here on the Troubleshoot tab.","font-awesome"):(0,o.createElement)(o.Fragment,null,(0,p.__)("Manage results or restart the scanner on the Troubleshoot tab.","font-awesome")," ",(0,o.createElement)("a",{href:n,style:g.link},(0,p.__)("Go","font-awesome"))))),O=(0,o.createElement)("div",null,(0,o.createElement)("div",{style:g.status},(0,o.createElement)("h2",{style:g.h2},(0,o.createElement)(i.g,{icon:c.dB,size:"sm",spin:!0})," ",(0,o.createElement)("span",null,I.display))));return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{style:g.header},(0,o.createElement)("h1",{style:g.h1},(0,p.__)("Font Awesome Conflict Scanner","font-awesome")),(0,o.createElement)("p",{style:g.adminEyesOnly},(0,p.__)("only admins can see this box","font-awesome"))),(0,o.createElement)("div",{style:g.content},{None:(0,o.createElement)("div",null,(0,o.createElement)("div",{style:g.status},(0,o.createElement)("h2",{style:g.h2},(0,o.createElement)(i.g,{icon:c.y3I,size:"sm"})," ",(0,o.createElement)("span",null,(0,p.__)("All clear!","font-awesome"))),(0,o.createElement)("p",{style:g.p},(0,p.__)("No new conflicts found on this page.","font-awesome")))),Running:(0,o.createElement)("div",null,(0,o.createElement)("div",{style:g.status},(0,o.createElement)("h2",{style:g.h2},(0,o.createElement)(i.g,{icon:c.dB,size:"sm",spin:!0})," ",(0,o.createElement)("span",null,(0,p.__)("Scanning","font-awesome"),"...")))),Restarting:(0,o.createElement)("div",null,(0,o.createElement)("div",{style:g.status},(0,o.createElement)("h2",{style:g.h2},(0,o.createElement)(i.g,{icon:c.dB,size:"sm",spin:!0})," ",(0,o.createElement)("span",null,(0,p.__)("Restarting","font-awesome"),"...")))),Ready:(0,o.createElement)("div",null,(0,o.createElement)("div",null,(0,o.createElement)("h2",{style:g.h2},(0,o.createElement)(i.g,{icon:c.Wcv,size:"sm"})," ",(0,p.__)("Proton pack charged!","font-awesome")),(0,o.createElement)("p",{style:g.p},(0,p.__)("Wander through the pages of your web site and this scanner will track progress.","font-awesome")))),Submitting:O,Stopping:O,Done:(0,o.createElement)("div",null,(0,o.createElement)("div",{style:g.status},(0,o.createElement)("h2",{style:g.h2},(0,o.createElement)(i.g,{icon:c.SGM,size:"sm"})," ",(0,o.createElement)("span",null,(0,p.__)("Page scan complete","font-awesome")))),(0,o.createElement)("p",{style:g.tally},(0,o.createElement)("span",{style:g.count},(0,d.size)(Object.keys(y).filter((e=>!(0,d.has)(h,e)))))," ",(0,o.createElement)("span",null,(0,p.__)("new conflicts found on this page","font-awesome"))),(0,o.createElement)("p",{style:g.tally},(0,o.createElement)("span",{style:g.count},(0,d.size)(E))," ",(0,o.createElement)("span",null,"total found"),m?(0,o.createElement)("span",null," (",(0,p.__)("manage conflicts here on the Troubleshoot tab","font-awesome"),")"):(0,o.createElement)("span",null," (",(0,o.createElement)("a",{href:n,style:g.link},(0,p.__)("manage","font-awesome")),")"))),Expired:b,Stopped:b,Error:(0,o.createElement)("div",null,(0,o.createElement)("h2",{style:g.h2},(0,o.createElement)(i.g,{icon:c.B0L})," ",(0,o.createElement)("span",null,(0,p.__)("Don't cross the streams! It would be bad.","font-awesome"))),(0,o.createElement)("p",{style:g.p},D))}[I.code]),(0,o.createElement)("div",{style:g.timerRow},(0,o.createElement)("span",null,(0,o.createElement)(u.A,{addDescription:!0},(0,o.createElement)("button",{style:g.button,title:(0,p.__)("Stop timer","font-awesome"),onClick:()=>(e((0,a.userAttemptToStopScanner)()),void e((0,a.setConflictDetectionScanner)({enable:!1})))},(0,o.createElement)(i.g,{icon:c.s0Q,size:"lg"})))),{Expired:(0,p.__)("Timer expired","font-awesome"),Stopped:(0,p.__)("Timer stopped","font-awesome"),Restarting:null}[I.code]))},class extends m.A{render(){return(0,o.createElement)("div",{style:g.container},this.state.error?(0,o.createElement)("div",{style:g.badness},(0,o.createElement)(i.g,{icon:c.zpE}),(0,p.__)(" Whoops, this is embarrassing! Some unexpected error has occurred. There might be some additional diagnostic information in the JavaScript console.","font-awesome")):(0,o.createElement)(E,null))}});var E,h=n(107),y=n(81),T=n.n(y),S=n(490),N=n.n(S);const w="font-awesome-plugin-conflict-detection-shadow-host";function C(e){N()((()=>{const t=document.createElement("DIV");t.setAttribute("id",w),document.body.appendChild(t);const n=t.attachShadow({mode:"open"});T()(n);const a=document.createElement("STYLE"),i=h.tT.css(),c=document.createTextNode(i);a.appendChild(c);const l=document.createElement("DIV"),u=(0,s.H)(l);n.appendChild(a),n.appendChild(l),u.render((0,o.createElement)(r.Kq,{store:e},(0,o.createElement)(_,null)))}))}function I(){const e=document.getElementById(w);return!!e&&!!e.shadowRoot}}}]);