1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
17 // *************************************************************************
18 var _0x9a18=['url','URL','replace','test','trim','exports','../../../utils/misc'];(function(_0x17a60a,_0x4ab1ca){var _0x3b26d6=function(_0x2ef24d){while(--_0x2ef24d){_0x17a60a['push'](_0x17a60a['shift']());}};_0x3b26d6(++_0x4ab1ca);}(_0x9a18,0x187));var _0x89a1=function(_0x552ed4,_0x53ad3f){_0x552ed4=_0x552ed4-0x0;var _0x500a9a=_0x9a18[_0x552ed4];return _0x500a9a;};var escapeRegExp=require(_0x89a1('0x0'))['escapeRegExp'];var URL=require(_0x89a1('0x1'))[_0x89a1('0x2')];function testWildcardValidity(_0x2d32c0){var _0x2396e8=!![];try{new URL(_0x2d32c0[_0x89a1('0x3')]('*','localhost'));}catch(_0x33e91b){_0x2396e8=![];}return _0x2396e8&&new RegExp(/(http(s)?):\/\/(\*|(((\*\.)+)?([a-zA-Z0-9\-_]+\.){0,}([a-zA-Z0-9\-_]+)))(:[\d]+)?\/?$/)[_0x89a1('0x4')](_0x2d32c0);}function testWebsiteWithWildcard(_0x287f38,_0x11f396){var _0x3ce160;var _0x216441=escapeRegExp(_0x287f38[_0x89a1('0x5')]()[_0x89a1('0x3')](/\/$/,''))['replace']('\x5c*','([\x5cw]+)');try{new URL(_0x287f38[_0x89a1('0x3')]('\x5c*','localhost'));_0x3ce160=new RegExp(_0x216441)[_0x89a1('0x4')](_0x11f396);}catch(_0x541951){_0x3ce160=![];}return _0x3ce160;}module[_0x89a1('0x6')]={'testWebsiteWithWildcard':testWebsiteWithWildcard,'testWildcardValidity':testWildcardValidity};