मुफ़्त कुंडली - जन्म तिथि और समय के अनुसार मुफ़्त ऑनलाइन जन्म कुंडली (2024)

सर्वश्रेष्ठ ज्योतिषियों से कुंडली सलाह प्राप्त करें - Free Janam Kundali Report

'; } return listhtml; } function getPrioritySortingList(dataitems) { dataitems = dataitems.sort((firstItem, secondItem) => secondItem.podr - firstItem.podr); return dataitems; } function getShuffledFreeRankList(dataitems) { //debugger; dataitems = dataitems.sort((firstItem, secondItem) => firstItem.frnk - secondItem.frnk); return dataitems; } function getShuffledRankList(dataitems) { //debugger; dataitems = dataitems.sort((firstItem, secondItem) => firstItem.rnk - secondItem.rnk); return dataitems; } function GetGroupData(dataitems, GroupObject, showGlobalOffer) { //console.log("dataitems ",dataitems); let filteredGroupData = {}; let localfilterdata = {}; //let ApplicableOffer = { // NONE: 0, // FREE: 1, // LOW_PRICE: 2 //}; let MyCurrentApplicableOffer = 0; if (GroupObject.hasOwnProperty("tot") && GroupObject.tot <= 0) { return filteredGroupData; } if (checkIfOfferAvailable('Chat')) { let ModuleOfferType = parseInt(_CurrentOfferObj.OfferType); let ModuleOfferId = parseInt(_CurrentOfferObj.OfferId); if (ModuleOfferType == 10 && ModuleOfferId > 0) { MyCurrentApplicableOffer = 2; } else if ((ModuleOfferType == 5 || ModuleOfferType == 6 || ModuleOfferType == 8 || ModuleOfferType == 9) && ModuleOfferId > 0) { MyCurrentApplicableOffer = 1; } } filteredGroupData = dataitems; ////MARK: 1 Filter Low Price and fme let hlpFlag = GroupObject.hasOwnProperty('hlp') ? GroupObject.hlp : -1; let fmeFlag = GroupObject.hasOwnProperty('fme') ? GroupObject.fme : -1; let showExpertinFree = (GroupObject.hasOwnProperty('sfe') && GroupObject.sfe > 0); if (fmeFlag == 1 && showExpertinFree == 1 && MyCurrentApplicableOffer == 1) { hlpFlag = -1; } else if (hlpFlag == 1 && MyCurrentApplicableOffer == 2) { fmeFlag = -1; } if (hlpFlag != -1) { //means 1 or 0 filteredGroupData = filteredGroupData.filter(e => { return e.lprc == hlpFlag }); } if (filteredGroupData != null) { if (fmeFlag != -1) { let verifyFreeMinExpertExhausted = false; if (MyCurrentApplicableOffer == 2 && hlpFlag == 1) { verifyFreeMinExpertExhausted = true; } //means fme= 1/0 filteredGroupData = filteredGroupData.filter(e => { return (verifyFreeMinExpertExhausted ? (e.fme == -1 || e.fme == 1) : e.fme == fmeFlag) }); } if (filteredGroupData != null) { if (MyCurrentApplicableOffer == 2) { if (_customerDealsArray.length > 0) { filteredGroupData = filteredGroupData.filter(function (item) { return _customerDealsArray.filter(function (item2) { return item.eid == item2.expid; }).length == 0; }); } } else if (MyCurrentApplicableOffer == 1) { filteredGroupData = filteredGroupData.filter(e => { return e.fm > 0 }); } } } if (filteredGroupData != null) { //MARK: 2 Filter InHouseExpert if (GroupObject.hasOwnProperty('inh')) { let inhFlag = GroupObject.hasOwnProperty('inh') ? GroupObject.inh : -1; if (inhFlag != -1) { filteredGroupData = filteredGroupData.filter(e => { return e.inh == inhFlag }); } } //MARK: 3 Filter topPerformer if (GroupObject.hasOwnProperty('top') && GroupObject.top && GroupObject.top > 0) { filteredGroupData = filteredGroupData.filter(e => { return e.gno == 2 }); } //MARK: 3.1 Filter hasDeal if (GroupObject.hasOwnProperty('hsd')) { let hsdFlag = GroupObject.hasOwnProperty('hsd') ? GroupObject.hsd : -1; if (hsdFlag != -1) { filteredGroupData = filteredGroupData.filter(e => { return e.HasChatDeal == hsdFlag }); } } //MARK: 4 Filter minPrice if (GroupObject.hasOwnProperty('mip') && GroupObject.mip && GroupObject.mip > 0) { filteredGroupData = filteredGroupData.filter(e => { return e.crt >= GroupObject.mip }); } if (GroupObject.hasOwnProperty('mxp') && GroupObject.mxp && GroupObject.mxp > 0) { filteredGroupData = filteredGroupData.filter(e => { return e.crt <= GroupObject.mxp }); } //MARK: 6 Filter Badge //MARK: 3.1 Filter hasDeal if (GroupObject.hasOwnProperty('badge')) { let badgeFlag = GroupObject.hasOwnProperty('badge') ? GroupObject.badge : -1; if (badgeFlag != -1) { filteredGroupData = filteredGroupData.filter(e => { return e.badge == badgeFlag }); } } //MARK: 7 Filter Priority if (GroupObject.hasOwnProperty('pri') && GroupObject.pri && GroupObject.pri > 0) { filteredGroupData = getPrioritySortingList(filteredGroupData); } ////MARK: 8 Filter Priority //if (GroupObject.hasOwnProperty('rnk') && GroupObject.pri && GroupObject.rnk > 0) { // filteredGroupData = getShuffledRankList(filteredGroupData); //} if (fmeFlag == 1 && showExpertinFree == 1 && MyCurrentApplicableOffer == 1) { //MARK: 8 Filter Priority if (GroupObject.hasOwnProperty('frnk') && GroupObject.frnk && GroupObject.frnk > 0) { filteredGroupData = getShuffledFreeRankList(filteredGroupData); } } else { //MARK: 8 Filter Priority if (GroupObject.hasOwnProperty('rnk') && GroupObject.rnk && GroupObject.rnk > 0) { filteredGroupData = getShuffledRankList(filteredGroupData); } } //MARK: 9 sorting filteredGroupData = checkIfExpertTakenRecentSession(filteredGroupData); if (filteredGroupData != null) { //MARK: 10 totalBatchCount let totFlag = GroupObject.hasOwnProperty('tot') ? GroupObject.tot : -1; if (totFlag > 0) { _filterListExpectedCount += GroupObject.tot; //find total out of it (with/without offer) if (filteredGroupData.length > GroupObject.tot) { filteredGroupData = filteredGroupData.slice(0, GroupObject.tot); } if (MyCurrentApplicableOffer == 2 && hlpFlag == 1) { //mark low price expert and get total out of it localfilterdata = filteredGroupData.map((obj) => { (obj.lprc == 1) ? obj.ifree = 1 : obj.ifree = 0; return obj; }); filteredGroupData = localfilterdata; } else if (MyCurrentApplicableOffer == 1 && showExpertinFree) { //mark free expert and get total out of it //counter used to show AI if no astrologes available in free _gFreeExpertCounter++; localfilterdata = filteredGroupData.map((obj) => { (obj.fme == 1 && obj.fme > 0) ? obj.ifree = 1 : obj.ifree = 0; return obj; }); filteredGroupData = localfilterdata; } } } ////MARK: 10 totalBatchCount //if (GroupObject.hasOwnProperty('tot') && GroupObject.tot && GroupObject.tot > 0 && filteredGroupData.length > 0) { // if (filteredGroupData.length > GroupObject.tot) { // filteredGroupData = filteredGroupData.slice(0, GroupObject.tot); // } //} } return filteredGroupData; } function randomIntFromInterval(min, max) { // min and max included return Math.floor(Math.random() * (max - min + 1) + min) } function PerformInjectOnGroupList(onlineastrologers, offbusyastrologers, expertcount, minRange, maxRange) { if (offbusyastrologers.length > 0) { for (var range = 0; range < expertcount; range++) { let randomnumber = randomIntFromInterval(minRange, maxRange); let splicednumber = offbusyastrologers.splice(0, 1); onlineastrologers.splice(randomnumber, 0, splicednumber[0]); } } return [onlineastrologers, offbusyastrologers]; } function calculateMinMaxRange(groupRange) { let groupsortarr = []; if (groupRange.indexOf("-") > 0) { groupsortarr = groupRange.split("-"); } else { groupsortarr[0] = groupRange; } return groupsortarr; } function checkIfInRange(x, min, max) { return ((x - min) * (x - max) <= 0); } function performExpertInjection(groupDataToPush, groupDataFromPull, settingsjson) { let expertsListAfterInjectioin = []; if ((groupDataToPush != null && groupDataToPush.length > 0) && (groupDataFromPull != null && groupDataFromPull.length > 0)) { //expertsListAfterInjectioin= groupDataToPush; let _localBsyAstrologers = groupDataFromPull.filter(e => { return e.ost == 2 }); let _localOfflineAstrologers = groupDataFromPull.filter(e => { return e.ost == 3 }); if (settingsjson.settings.hasOwnProperty("inject")) { if (settingsjson.settings.inject.hasOwnProperty("group")) { if (settingsjson.settings.inject.group != null && typeof settingsjson.settings.inject.group === "object" && settingsjson.settings.inject.group !== "undefined") { let minRange = 0 let maxRange = 0 if (settingsjson.settings.inject.group.hasOwnProperty("rng") && settingsjson.settings.inject.group.rng != "") { let groupsortarr = calculateMinMaxRange(settingsjson.settings.inject.group.rng); if (groupsortarr.length > 1) { minRange = parseInt(groupsortarr[0]); maxRange = parseInt(groupsortarr[1]); if (groupDataToPush.length <= maxRange) { maxRange = groupDataToPush.length; } } else { minRange = maxRange = parseInt(groupsortarr[0]); } let expertsListToInjectForGroup = []; if (maxRange <= groupDataToPush.length) { expertsListToInjectForGroup = groupDataToPush.splice(0, maxRange); let expertOfflineCount = 0; let expertBusyCount = 0; /*inject offline astrologers on group*/ if (settingsjson.settings.inject.group.hasOwnProperty("off")) { if (settingsjson.settings.inject.group.off != "" && parseInt(settingsjson.settings.inject.group.off) > 0) { expertOfflineCount = parseInt(settingsjson.settings.inject.group.off); if (expertOfflineCount > _localOfflineAstrologers.length) { expertOfflineCount = _localOfflineAstrologers.length; } let _listafterOfflineInjection = PerformInjectOnGroupList(expertsListToInjectForGroup, _localOfflineAstrologers, expertOfflineCount, minRange, maxRange); expertsListToInjectForGroup = _listafterOfflineInjection[0]; _localOfflineAstrologers = _listafterOfflineInjection[1]; } } /*inject busy astrologers on group*/ if (settingsjson.settings.inject.group.hasOwnProperty("bsy")) { if (settingsjson.settings.inject.group.bsy != "" && parseInt(settingsjson.settings.inject.group.bsy) > 0) { expertBusyCount = parseInt(settingsjson.settings.inject.group.bsy); if (expertBusyCount > _localBsyAstrologers.length) { expertBusyCount = _localBsyAstrologers.length; } let _listafterBsyInjection = PerformInjectOnGroupList(expertsListToInjectForGroup, _localBsyAstrologers, expertBusyCount, minRange, maxRange); expertsListToInjectForGroup = _listafterBsyInjection[0]; _localBsyAstrologers = _listafterBsyInjection[1]; } } } Array.prototype.push.apply(expertsListAfterInjectioin, expertsListToInjectForGroup); } else { Array.prototype.push.apply(expertsListAfterInjectioin, groupDataToPush); } } } /* injection on rest astrologers*/ if (settingsjson.settings.inject.hasOwnProperty("rest")) { if (settingsjson.settings.inject.rest != null && typeof settingsjson.settings.inject.rest === "object" && settingsjson.settings.inject.rest !== "undefined") { let expertOfflineCount = 0; let expertBusyCount = 0; let _restminRange = 0; let _restmaxRange = groupDataToPush.length; /*inject offline astrologers on rest*/ if (settingsjson.settings.inject.rest.hasOwnProperty("off")) { if (settingsjson.settings.inject.rest.off != "" && parseInt(settingsjson.settings.inject.rest.off) > 0) { expertOfflineCount = parseInt(settingsjson.settings.inject.rest.off); if (expertOfflineCount > _localOfflineAstrologers.length) { expertOfflineCount = _localOfflineAstrologers.length; } let _listafterOfflineInjection = PerformInjectOnGroupList(groupDataToPush, _localOfflineAstrologers, expertOfflineCount, _restminRange, _restmaxRange); groupDataToPush = _listafterOfflineInjection[0]; _localOfflineAstrologers = _listafterOfflineInjection[1]; } } /*inject busy astrologers on rest*/ if (settingsjson.settings.inject.rest.hasOwnProperty("bsy")) { if (settingsjson.settings.inject.rest.bsy != "" && parseInt(settingsjson.settings.inject.rest.bsy) > 0) { expertBusyCount = parseInt(settingsjson.settings.inject.rest.bsy); if (expertBusyCount > _localBsyAstrologers.length) { expertBusyCount = _localBsyAstrologers.length; } let _listafterBsyInjection = PerformInjectOnGroupList(groupDataToPush, _localBsyAstrologers, expertBusyCount, _restminRange, _restmaxRange); groupDataToPush = _listafterBsyInjection[0]; _localBsyAstrologers = _listafterBsyInjection[1]; } } Array.prototype.push.apply(expertsListAfterInjectioin, groupDataToPush); } } } Array.prototype.push.apply(expertsListAfterInjectioin, _localBsyAstrologers); Array.prototype.push.apply(expertsListAfterInjectioin, _localOfflineAstrologers); } return expertsListAfterInjectioin; } function expertsLastSessionListFilter(filteredData, ShuffledAstrologersList, rntmpricevariance, rntmpricethreshold, dExpertChargePerMin) { let expertsListAfterFilter = []; let combinedExpertsList = []; let dupdatedChargePerMin = dExpertChargePerMin - rntmpricevariance; if (dupdatedChargePerMin > rntmpricethreshold) { dupdatedChargePerMin = rntmpricethreshold; } if (dExpertChargePerMin > 0) { let filteredExpertsData = filteredData.filter(e => { return (e.ChargeRate >= dupdatedChargePerMin) }); if (filteredExpertsData != null && filteredExpertsData.length > 0) { if (filteredExpertsData.length < _filterListExpectedCount) { let remainingListToGet = _filterListExpectedCount - filteredExpertsData.length; let filteredExpertsDataShuffled = ShuffledAstrologersList.filter(e => { return (e.ChargeRate >= dupdatedChargePerMin) }); if (remainingListToGet > filteredExpertsDataShuffled.length) { remainingListToGet = filteredExpertsDataShuffled.length; } Array.prototype.push.apply(filteredExpertsData, filteredExpertsDataShuffled.slice(0, remainingListToGet)); // Array.prototype.push.apply(combinedExpertsList, filteredExpertsDataShuffled); } } else { let filteredExpertsDataShuffled = ShuffledAstrologersList.filter(e => { return (e.ChargeRate >= dupdatedChargePerMin) }); if (_filterListExpectedCount > filteredExpertsDataShuffled.length) { _filterListExpectedCount = filteredExpertsDataShuffled.length; } Array.prototype.push.apply(filteredExpertsData, filteredExpertsDataShuffled.slice(0, _filterListExpectedCount)); } Array.prototype.push.apply(combinedExpertsList, filteredData); Array.prototype.push.apply(combinedExpertsList, ShuffledAstrologersList); let remainingShuffledOnlineAstrologers = combinedExpertsList.filter(function (item) { return filteredExpertsData.filter(function (item2) { return item.PsychicId == item2.PsychicId; }).length == 0; }); Array.prototype.push.apply(expertsListAfterFilter, filteredExpertsData); Array.prototype.push.apply(expertsListAfterFilter, remainingShuffledOnlineAstrologers); return expertsListAfterFilter; } Array.prototype.push.apply(expertsListAfterFilter, filteredData); Array.prototype.push.apply(expertsListAfterFilter, ShuffledAstrologersList); return expertsListAfterFilter; } function shufflegroupwiseData(shuffledOnlineAstrologers, groupname, settingsjson, showGlobalOffer) { let modifygroupshuffle = false; let groupRangeArray = []; let shuffleManually = false; let groupArray = []; if (groupname == "groups") { groupArray = settingsjson["groups"]; let groupShuffleKey = "groupsort"; // change it to gshfl when required if (settingsjson.settings.hasOwnProperty(groupShuffleKey)) { if (!(settingsjson.settings[groupShuffleKey] instanceof Array) && typeof settingsjson.settings[groupShuffleKey] === "string") { groupRangeArray.push(settingsjson.settings[groupShuffleKey]); } else { groupRangeArray = settingsjson.settings[groupShuffleKey]; } } } else { groupArray = settingsjson["timewise"]["tgroups"]; let groupShuffleKey = "tgshfl"; // change it to gshfl when required if (settingsjson["timewise"].hasOwnProperty(groupShuffleKey)) { if (!(settingsjson["timewise"][groupShuffleKey] instanceof Array) && typeof settingsjson["timewise"][groupShuffleKey] === "string") { groupRangeArray.push(settingsjson["timewise"][groupShuffleKey]); } else { groupRangeArray = settingsjson["timewise"][groupShuffleKey]; } } shuffleManually = true; } let GroupsToShuffle = []; if (groupRangeArray instanceof Array && groupRangeArray.length > 0) { let shuffleCurrentRange = false; let minCurrentRange = 0; let maxCurrentRange = 0; for (let i = 0; i < groupRangeArray.length; i++) { let groupsortarr = calculateMinMaxRange(groupRangeArray[i]); if (groupsortarr.length > 1) { minCurrentRange = parseInt(groupsortarr[0]); maxCurrentRange = parseInt(groupsortarr[1]); } else { minCurrentRange = maxCurrentRange = parseInt(groupsortarr[0]); } if (minCurrentRange >= 0 && maxCurrentRange > minCurrentRange) { shuffleCurrentRange = true; } GroupsToShuffle.push({ "min": minCurrentRange, "max": maxCurrentRange, "shuffle": shuffleCurrentRange }); } } if (groupArray instanceof Array && groupArray.length > 0) { //logic here //let GroupsToShuffle = [{ "min": 1, "max": 2 }, { "min": 4, "max": 5 }]; let _tempShuffleGroup = []; let ProcessedGroup = []; let GroupInProcessToShuffleIdx = 0; //logic here let GroupInProcessToShuffle = null; if (GroupsToShuffle != null && GroupsToShuffle instanceof Array && GroupsToShuffle.length > 0 && GroupsToShuffle[GroupInProcessToShuffleIdx].hasOwnProperty("min")) { GroupInProcessToShuffle = GroupsToShuffle[GroupInProcessToShuffleIdx]; } let _ElementToShuffleInGroup = false; for (let i = 0; i < groupArray.length; i++) { //#region Whether to skik the group or not if (groupArray[i].hasOwnProperty("src") && groupArray[i]["src"] instanceof Array && groupArray[i]["src"].length > 0) { if (groupArray[i]["src"].indexOf(p_utm_source) < 0) { continue; } } if (groupArray[i].hasOwnProperty("sfe") && groupArray[i]["sfe"] == 1 && !showGlobalOffer) { continue; } let currentSystemHours = parseInt((new Date()).getHours()); let currentSystemhourMatched = false; if (groupArray[i].hasOwnProperty("tmr") && groupArray[i]["tmr"] instanceof Array && groupArray[i]["tmr"].length > 0) { let minCurrentTimeRange = 0; let maxCurrentTimeRange = 0; for (let groupTimeRange = 0; groupTimeRange < groupArray[i]["tmr"].length; groupTimeRange++) { let CurrentTimearr = calculateMinMaxRange(groupArray[i]["tmr"][groupTimeRange]); if (CurrentTimearr.length > 1) { minCurrentTimeRange = parseInt(CurrentTimearr[0]); maxCurrentTimeRange = parseInt(CurrentTimearr[1]); } else { minCurrentTimeRange = maxCurrentTimeRange = parseInt(CurrentTimearr[0]); } if (currentSystemHours >= minCurrentTimeRange && currentSystemHours <= maxCurrentTimeRange && !currentSystemhourMatched) { currentSystemhourMatched = true; } } if (!currentSystemhourMatched) { continue; } } //end region if (shuffledOnlineAstrologers.length > 0) { let _groupResult = GetGroupData(shuffledOnlineAstrologers, groupArray[i], showGlobalOffer); if (GroupInProcessToShuffle != null && typeof GroupInProcessToShuffle === 'object' && GroupInProcessToShuffle.hasOwnProperty('min') && i >= GroupInProcessToShuffle.min && i <= GroupInProcessToShuffle.max) { _ElementToShuffleInGroup = true; Array.prototype.push.apply(_tempShuffleGroup, _groupResult); } else { if (_ElementToShuffleInGroup) { //shuffle "_tempShuffleGroup" let _tmpGroupDataShuffled = _tempShuffleGroup.sort(() => Math.random() - 0.5); Array.prototype.push.apply(ProcessedGroup, _tmpGroupDataShuffled); Array.prototype.push.apply(ProcessedGroup, _groupResult); //reset shuffled logics _ElementToShuffleInGroup = false; _tempShuffleGroup = []; //set GroupInProcessToShuffle for range //ex: GroupInProcessToShuffle = { "min": 5, "max": 6 }; //logic here if (GroupsToShuffle != null && GroupsToShuffle instanceof Array && GroupsToShuffle.length > GroupInProcessToShuffleIdx + 1 && GroupsToShuffle[GroupInProcessToShuffleIdx + 1].hasOwnProperty("min")) { GroupInProcessToShuffle = GroupsToShuffle[++GroupInProcessToShuffleIdx]; } } else { //add, do not shuffle Array.prototype.push.apply(ProcessedGroup, _groupResult); } } shuffledOnlineAstrologers = shuffledOnlineAstrologers.filter(function (item) { return _groupResult.filter(function (item2) { return item.eid == item2.eid; }).length == 0; }); } } if (_ElementToShuffleInGroup) { //shuffle "_tempShuffleGroup" let _tmpGroupDataShuffled = _tempShuffleGroup.sort(() => Math.random() - 0.5); Array.prototype.push.apply(ProcessedGroup, _tmpGroupDataShuffled); //reset shuffled logics _ElementToShuffleInGroup = false; _tempShuffleGroup = []; GroupInProcessToShuffle = null; } if (shuffleManually) { ProcessedGroup = ProcessedGroup.sort(() => Math.random() - 0.5); } //Array.prototype.push.apply(ProcessedGroup, shuffledOnlineAstrologers); ////shuffledOnlineAstrologers = ProcessedGroup; //return ProcessedGroup; return [ProcessedGroup, shuffledOnlineAstrologers]; } //return shuffledOnlineAstrologers; } function getFinalAstrologersList(dataitems, expertconfig) { if (expertconfig.hasOwnProperty("tuck_free_exp") && (typeof expertconfig.tuck_free_exp === 'string' || typeof expertconfig.tuck_free_exp === 'number') && parseInt(expertconfig.tuck_free_exp) > 0) { let finalAstrologersListAfterFreeExperts = []; let filteredFreeExpertsData = dataitems.filter(e => { return (e.ifree == 1 && e.ost == 1) }); let remainingAstrologersList = dataitems.filter(function (item) { return filteredFreeExpertsData.filter(function (item2) { return item.eid == item2.eid; }).length == 0; }); Array.prototype.push.apply(finalAstrologersListAfterFreeExperts, filteredFreeExpertsData); Array.prototype.push.apply(finalAstrologersListAfterFreeExperts, remainingAstrologersList); return finalAstrologersListAfterFreeExperts; } return dataitems; } function getFilteredAstrologers(dataitems, showFree, AIapplyFilter = false) { let _RecommendedListFilter = false; if (typeof AIapplyFilter === 'boolean' && AIapplyFilter === true) { _RecommendedListFilter = true; } _gFreeExpertCounter = 0; var settingsjson = {}; if (jExprtGrpPolicyjObject != null && typeof jExprtGrpPolicyjObject === "object" && jExprtGrpPolicyjObject.hasOwnProperty("settings")) { settingsjson = jExprtGrpPolicyjObject; } try { /*//separate experts from list => shuffle records online => find random 10 and mark them as free astrologer => get new online experts - 10 free marked astroloer => "Group 1 Experts" => remaining online expert = 40 (rem_online) => rem_online Find Group No 2 experts and list them as "Group 2 Experts" => Treat Left sliced records as "Group 2 Experts" now create new array as "shuffled astrologer list" shuffled_list.push(free); shuffled_list.push(top_paid); shuffled_list.push(remaining); offline*/ let OldAstrologerItem = []; Array.prototype.push.apply(OldAstrologerItem, dataitems); if (settingsjson != null && typeof settingsjson === "object" && settingsjson.hasOwnProperty("settings")) { let showGlobalOffer = false; if ((settingsjson.hasOwnProperty("groups") && settingsjson.groups.length > 0) || (settingsjson.hasOwnProperty("timewise") && settingsjson.timewise.hasOwnProperty("tgroups") && settingsjson.timewise.tgroups.length > 0) || settingsjson != null && typeof settingsjson === "object" && settingsjson.hasOwnProperty("rastro")) { //shuffle records let shuffledAstrologersList = OldAstrologerItem.sort(() => Math.random() - 0.5); //shuffledAstrologersList = OldAstrologerItem; //online astrologers from shuffled list let shuffledOnlineAstrologers = shuffledAstrologersList.filter(e => { return e.ost == 1 }); //Shuffled Offline Astrologer let shuffledOfflineAstrologers = shuffledAstrologersList.filter(value => !shuffledOnlineAstrologers.includes(value)); if (settingsjson.settings.showfreeoffer > 0 && showFree) { showGlobalOffer = true; } if (_RecommendedListFilter === true && (settingsjson.rastro != null && typeof settingsjson.rastro === "object" && settingsjson.rastro.hasOwnProperty("rgroups") && settingsjson.rastro.rgroups != null && typeof settingsjson.rastro.rgroups === "object" && settingsjson.rastro.rgroups.length > 0)) { let recommendedAstrologersList = shuffledOnlineAstrologers; let recommendedFilteredGroupData = []; for (let i = 0; i < settingsjson.rastro.rgroups.length; i++) { let shuffledGroupsData = GetGroupData(recommendedAstrologersList, settingsjson.rastro.rgroups[i], showGlobalOffer); Array.prototype.push.apply(recommendedFilteredGroupData, shuffledGroupsData); recommendedAstrologersList = recommendedAstrologersList.filter(function (item) { return shuffledGroupsData.filter(function (item2) { return item.eid == item2.eid; }).length == 0; }); } Array.prototype.push.apply(recommendedFilteredGroupData, recommendedAstrologersList); //Array.prototype.push.apply(recommendedFilteredGroupData, shuffledOfflineAstrologers); if (settingsjson.rastro.hasOwnProperty('tot') && settingsjson.rastro.tot && settingsjson.rastro.tot > 0 && recommendedFilteredGroupData.length > 0) { if (recommendedFilteredGroupData.length > settingsjson.rastro.tot) { recommendedFilteredGroupData = recommendedFilteredGroupData.slice(0, settingsjson.rastro.tot); } } let updatedAstrologerListWithListenersEnabled = []; if (recommendedFilteredGroupData != null && recommendedFilteredGroupData.length > 0) { updatedAstrologerListWithListenersEnabled = recommendedFilteredGroupData.map((obj, index) => ((parseInt(G_ExpertListenerCounter) == 0 || index >= parseInt(G_ExpertListenerCounter))) ? obj : { ...obj, EnableExpertListListener: parseInt(G_IsExpertListenerEnabled) == 1 ? 1 : 0 } ); return updatedAstrologerListWithListenersEnabled; } return OldAstrologerItem; } let finalgroupFilterData = []; let groupwiseDataArray = shufflegroupwiseData(shuffledOnlineAstrologers, "groups", settingsjson, showGlobalOffer); if (groupwiseDataArray != null && groupwiseDataArray.length > 0) { //if (PrevSessionAstrologers != null && PrevSessionAstrologers.length > 0 && settingsjson.settings.hasOwnProperty("blrntmpricefilter") && settingsjson.settings.blrntmpricefilter > 0 && !showGlobalOffer) { // /**expertsLastSessionListFilter */ // let processedExpertsList = groupwiseDataArray[0]; // let remainingShuffledOnlineExpertsList = groupwiseDataArray[1]; // let recentExpertChargePerMin = PrevSessionAstrologers[0]['ChargePerMin']; // let rntmpricevariance = 0; // let rntmpricethreshold = 0; // if (settingsjson.settings.hasOwnProperty("rntmpricevariance")) { // if (settingsjson.settings.rntmpricevariance > 0) { // rntmpricevariance = settingsjson.settings.rntmpricevariance; // } // } // if (settingsjson.settings.hasOwnProperty("rntmpricethreshold")) { // if (settingsjson.settings.rntmpricethreshold > 0) { // rntmpricethreshold = settingsjson.settings.rntmpricethreshold; // } // } // let expertsListAfterNewFilter = expertsLastSessionListFilter(processedExpertsList, remainingShuffledOnlineExpertsList, rntmpricevariance, rntmpricethreshold, recentExpertChargePerMin); // Array.prototype.push.apply(finalgroupFilterData, expertsListAfterNewFilter); // //Array.prototype.push.apply(finalgroupFilterData, remainingShuffledOnlineExpertsList); //} else { let processedExpertsList = groupwiseDataArray[0]; let remainingShuffledOnlineExpertsList = groupwiseDataArray[1]; Array.prototype.push.apply(finalgroupFilterData, processedExpertsList); Array.prototype.push.apply(finalgroupFilterData, remainingShuffledOnlineExpertsList); /* }*/ } /* let finalgroupFilterData = shufflegroupwiseData(shuffledOnlineAstrologers, "groups", settingsjson, showGlobalOffer);*/ //console.log(finalgroupFilterData); if (settingsjson.hasOwnProperty("timewise") && settingsjson.timewise.hasOwnProperty("tgroups") && settingsjson.timewise.tgroups.length > 0) { /* finalgroupFilterData = shufflegroupwiseData(finalgroupFilterData, "timewise.tgroups", settingsjson, showGlobalOffer);*/ let timegroupwiseDataArray = shufflegroupwiseData(finalgroupFilterData, "timewise.tgroups", settingsjson, showGlobalOffer); if (timegroupwiseDataArray != null && timegroupwiseDataArray.length > 0) { Array.prototype.push.apply(finalgroupFilterData, timegroupwiseDataArray[0]); Array.prototype.push.apply(finalgroupFilterData, timegroupwiseDataArray[1]); } } let totalExpertsAfterInjection = performExpertInjection(finalgroupFilterData, shuffledOfflineAstrologers, settingsjson); let updatedAstrologerListWithListenersEnabled = []; if (totalExpertsAfterInjection != null && totalExpertsAfterInjection.length > 0) { updatedAstrologerListWithListenersEnabled = totalExpertsAfterInjection.map((obj, index) => ((parseInt(G_ExpertListenerCounter) == 0 || index >= parseInt(G_ExpertListenerCounter))) ? obj : { ...obj, EnableExpertListListener: parseInt(G_IsExpertListenerEnabled) == 1 ? 1 : 0 } ); updatedAstrologerListWithListenersEnabled = performPriorityInjection(updatedAstrologerListWithListenersEnabled, settingsjson); updatedAstrologerListWithListenersEnabled = performEidsInjection(updatedAstrologerListWithListenersEnabled, settingsjson); updatedAstrologerListWithListenersEnabled = getFinalAstrologersList(updatedAstrologerListWithListenersEnabled, settingsjson.settings); return updatedAstrologerListWithListenersEnabled; } else { // Array.prototype.push.apply(finalgroupFilterData, shuffledOnlineAstrologers); Array.prototype.push.apply(finalgroupFilterData, shuffledOfflineAstrologers); //set EnableExpertListListener=1 updatedAstrologerListWithListenersEnabled = finalgroupFilterData.map((obj, index) => ((parseInt(G_ExpertListenerCounter) == 0 || index >= parseInt(G_ExpertListenerCounter))) ? obj : { ...obj, EnableExpertListListener: parseInt(G_IsExpertListenerEnabled) == 1 ? 1 : 0 } ); updatedAstrologerListWithListenersEnabled = performPriorityInjection(updatedAstrologerListWithListenersEnabled, settingsjson); updatedAstrologerListWithListenersEnabled = performEidsInjection(updatedAstrologerListWithListenersEnabled, settingsjson); updatedAstrologerListWithListenersEnabled = getFinalAstrologersList(updatedAstrologerListWithListenersEnabled, settingsjson.settings); return updatedAstrologerListWithListenersEnabled; } } else { return OldAstrologerItem; } } return OldAstrologerItem; } catch (e) { return dataitems; } } function getReviews(rating, reviewCount) { let totalreviewCount = reviewCount; if (reviewCount == 0) { return 'कोई रिव्यू नहीं है'; } else { var reviewstring = 'समीक्षा : ' + totalreviewCount + ''; reviewstring += ''; return reviewstring; } /*return '

' + getLanguageKeyString('EP_Review') + '

' + reviewCount + '

';*/ } function RoundPriceInMultipleOf5(price, multipleof) { return Math.ceil(price); } function getFreeMinuteText(isrechargeofferavailable, FreeMinuteForOffer) { let freeminutetexthtml = ''; let value = FreeMinuteForOffer; var dataText = 'पहले {0} मिनट मुफ़्त'; var test = dataText.replace("{0}", value); if (isrechargeofferavailable) { freeminutetexthtml = '' + test+''; } return freeminutetexthtml; } function getMustTryBadge(badgeid) { var expertBadges = {}; var expertBadge = null; if (jExpertBadges instanceof Array && jExpertBadges.length > 0) { expertBadges = jExpertBadges.filter(e => { return e.Id == badgeid });; } if (expertBadges instanceof Array && expertBadges.length > 0) { expertBadge = expertBadges[0]; } if (expertBadge != null && typeof expertBadge === 'object') { return '' + expertBadge.Badge + ''; } else { return ''; } } function noRecordFound() { return '

मुफ़्त कुंडली - जन्म तिथि और समय के अनुसार मुफ़्त ऑनलाइन जन्म कुंडली (1)

कोई विशेषज्ञ नहीं मिला

'; } function showMoreButton(isCallRedirect) { var redirectPageUrl = isCallRedirect ? 'https://www.anytimeastro.com/hi/talk-to-astrologer/?utm_source=mpnc&utm_medium=janam-kundali&utm_campaign=live_call&x_base=call&pxl=MPN5834_MPN5697_RUNT' : 'https://www.anytimeastro.com/hi/chat-with-astrologer/?utm_source=mpnc&utm_medium=janam-kundali&utm_campaign=live_chat&x_base=chat&pxl=MPN5834_MPN5697_RUNT'; if ("janam-kundali" == "chat-with-astrologer") { redirectPageUrl = 'https://www.anytimeastro.com/launchipscreen/?screen=chat&utm_source=mpnc&utm_medium=janam-kundali&utm_campaign=live_chat&x_base=store&pxl=MPN5834_MPN5697_RUNT'; } return '

और देखें

'; } function ExpertActionBtn(mdata, config, expertUrl) { let expert = mdata; let CallChatBtnShow = config.CallChatBtnShow; let noExpertPic = 'https://bcdn.mpanchang.com/images/' + "no-expert-pic.png"; /*"https://cdn.hipsychic.com/hipsychic/web/content/images/no-expert-pic.png";*/ let expertPic = (expert.ep) ? 'https://bcdn.mpanchang.com/images/' + "/psychics/" + expert.ep : noExpertPic; //let categoryName = $('#cat_' + expert.CategoryId).attr('cat-name'); //let categoryName = config.categoryName; //let url = 'https://www.anytimeastro.com/hi/experts/{0}/?initiate=chat&utm_source=mpnc&utm_medium={1}&utm_campaign={2}&opaction={3}&x_base={4}&pxl=MPN5834_MPN5697_RUNT' + "experts/emails/" + expert.eid + "/new/"; //let expertCharge = config.expertCharge; //let expertCallCharge = config.expertCallCharge; //let expertUSDCharge = config.expertUSDCharge; //let expertUSDCallCharge = config.expertUSDCallCharge; //let expertChargeToShow = config.expertChargeToShow; let expertChargeType = config.expertChargeType; //let expertDetailsUrl = 'https://www.anytimeastro.com/hi/experts/{0}/?initiate=chat&utm_source=mpnc&utm_medium={1}&utm_campaign={2}&opaction={3}&x_base={4}&pxl=MPN5834_MPN5697_RUNT' + "experts/" + expert.slg + "/"; //let expertLocaleUrl = config.expertlocaleurl; //let currency = config.UserCurrency; //let ExpertActionBtnComponentId = expertChargeType + "_" + expert.eid + "_" + expert.ost; //let ReviewCount = expert.rcnt; //let Expertonlinestatus = expert.ost; let Customerloginstatus = (0 > 0); let _renderBtn = ""; let _renderMsgBtn = ""; let RenderedBtnArr = []; let CallChatBtnStatus = ""; let MsgEmailBtnStatus = ""; let CallButtonText = 'कॉल'; let ChatButtonText = 'चैट'; let isFreeChat = config.isFreeChat; expert.freechatminute = (isFreeChat == false) ? 0 : expert.fm; //expert listener work let ExpertListenerEnabled = (typeof expert.EnableExpertListListener !== 'undefined' && !isNaN(expert.EnableExpertListListener)) ? (parseInt(expert.EnableExpertListListener) == 1) : false; _renderBtn = ((expertChargeType == 2) ? "call" : "chat") + "-" + ((Customerloginstatus) ? "online" : "offline"); _renderMsgBtn = "message" + "-" + ((Customerloginstatus) ? "online" : "offline"); if (CallChatBtnShow) { MsgEmailBtnStatus = "hidden"; OfflineBtnStatus = "hidden"; CallChatBtnStatus = ""; } else if (expert.ost == 2) { MsgEmailBtnStatus = ""; CallChatBtnStatus = "hidden"; OfflineBtnStatus = "hidden"; } else { MsgEmailBtnStatus = "hidden"; OfflineBtnStatus = ""; CallChatBtnStatus = "hidden"; } var _RenderMsgBtn = true; if (typeof isMyExpertPage === 'boolean' && isMyExpertPage === true) { _renderBtn = "view profile"; _RenderMsgBtn = false; } switch (_renderBtn) { case "view profile": RenderedBtnArr.push('प्रोफ़ाइल देखें'); break; case "call-online": RenderedBtnArr.push('' + CallButtonText + ''); break; case "call-offline": RenderedBtnArr.push('' + CallButtonText + ''); break; case "chat-online": RenderedBtnArr.push('' + ChatButtonText + ''); break; case "chat-offline": RenderedBtnArr.push('' + ChatButtonText + ''); break; } RenderedBtnArr.push('व्यस्त'); RenderedBtnArr.push('ऑफलाइन'); return '

' + RenderedBtnArr.join("") + '

'; } function renderFreeConsultationInfoBadge(offerUrl, currentLanguage) { let expertprofilepic = "https://cdn.anytimeastro.com/dashaspeaks/web/content/images/free-consultation-badge.png"; /* if (!isOfferAvailable) { expertprofilepic = "https://cdn.anytimeastro.com/dashaspeaks/web/content/images/dis_free_cons.png"; }*/ let expertDisplayName = currentLanguage == "hi" ? "निःशुल्क सेवाएँ" : "Free Services"; let renderHtml = '

' + expertDisplayName + '

'; //document.body.innerHTML += renderHtml; document.getElementById("free-consultation-info-badge").innerHTML = renderHtml; } function checkFreeConsultationInfoBadge(currentLanguage) { let culturelangcode = getUiCultureCode(); let offerurl = gWebsitePrefix + culturelangcode + "free-services/" + url_string.replace(/&/g, '&'); var offerObj = this; offerObj.renderFreeConsultationInfoBadge(offerurl, currentLanguage); } function getFreeConsulationCard(expertconfig, currentLanguage) { let AskGurujiBtnTxt = currentLanguage == "hi" ? "शुरू करें" : "Start Now"; let expertCharge = _AIOfferPrice; let expertDisplayName = currentLanguage == "hi" ? "निःशुल्क परामर्श" : "FREE Consultation"; let expertprofilepic = "https://cdn.anytimeastro.com/dashaspeaks/web/content/images/free-consultation-astro.png"; let culturelangcode = getUiCultureCode(); let expertUrl = 'https://www.anytimeastro.com/hi/free-consultation/?utm_source=mpnc&utm_campaign=free-consultation&utm_medium=janam-kundali&pxl=MPN5834_MPN5697_RUNT&fcm=true'; const UserCurrency = expertconfig.UserCurrency == "USD" ? '$' : '₹'; let RenderedBtnArr = []; let Customerloginstatus = (0 > 0); let isconsulatationofferapplicable = false; let showAItilewithOffer = false; let ModuleOfferType = 0; let moduleofferId = 0; var NextTimeCount = 0; var NextSessionCounter = 0; var lowPriceOffferMin = 0; if (checkIfOfferAvailable('Chat')) { ModuleOfferType = parseInt(_CurrentOfferObj.OfferType); moduleofferId = parseInt(_CurrentOfferObj.OfferId); NextSessionCounter = _CurrentOfferObj.NextSessionCounter; NextTimeCount = _CurrentOfferObj.NextTimeCount; expertUrl += '&ofid=' + moduleofferId; //ModuleOfferType = 9; if (ModuleOfferType > 0 && ModuleOfferType == 7) { if (0 > 0) { if (parseInt(moduleofferId) > 0) { isconsulatationofferapplicable = true; } } else { isconsulatationofferapplicable = true; } } //else if (ModuleOfferType > 0 && ModuleOfferType == 8 && _gFreeExpertCounter == 0) { else if (ModuleOfferType > 0 && ModuleOfferType == 8) { showAItilewithOffer = true; if (0 > 0) { if (parseInt(moduleofferId) > 0) { isconsulatationofferapplicable = true; } } else { isconsulatationofferapplicable = true; } } else if (ModuleOfferType > 0 && ModuleOfferType == 9) { if (0 > 0) { if (parseInt(moduleofferId) > 0) { isconsulatationofferapplicable = true; } } else { isconsulatationofferapplicable = true; } } } //if (parseInt(_gIsFreeConsultOffrAvailable) > 0) { // checkFreeConsultationInfoBadge(currentLanguage); //} if ((!isconsulatationofferapplicable || !_isAITiletoShow)) { return ""; } RenderedBtnArr.push('' + AskGurujiBtnTxt + ''); let expertstatusbadge = '

Online

'; const categoryName = currentLanguage == "hi" ? "वैदिक ज्योतिष, AI, KP, टैरो" : "Vedic Astrology, AI, KP, Tarot"; let ExpertLanguages = currentLanguage == "hi" ? "इंग्लिश, हिन्दी" : "English, Hindi"; let askGurujiRateTxt = currentLanguage == "hi" ? "शीर्ष रेटेड" : "Top Rated"; let expertChargeBeforeDiscountStr = '' + UserCurrency + '' + expertCharge + ''; let itemsection1 = '

  • ' + expertstatusbadge + '
  • ' + expertDisplayName + '' + categoryName + '' + ExpertLanguages + ' ' + expertChargeBeforeDiscountStr + '/मिनट

'; let itemsection2 = '

' + askGurujiRateTxt + '

' + RenderedBtnArr.join("") + 'फ्री

'; let AIOffferClass = ""; if (showAItilewithOffer && _gFreeExpertCounter > 0) { AIOffferClass = "d-none"; } return '

' + itemsection1 + itemsection2 + '

'; } function getPsychicCardRecommended(expertdata, expertconfig) { var IsFreeChat = false; const expertCDNPath = 'https://bcdn.mpanchang.com/images/'; let expertprofilepic = expertCDNPath + "no-expert-pic.png"; if (typeof expertdata.ep != "undefined" && expertdata.ep != null && expertdata.ep != "") { expertprofilepic = "https://cdn.anytimeastro.com/dashaspeaks/psychics/" + expertdata.ep + ""; } const UserCurrency = expertconfig.UserCurrency == "USD" ? '$' : '₹'; let expertCharge = 0; let expertCallCharge = 0; let BaseRate = 0; let DiscountPer = 0; let IsChargeOverride = false; let ExpertListenerEnabled = (typeof expertdata.EnableExpertListListener !== 'undefined' && !isNaN(expertdata.EnableExpertListListener)) ? (parseInt(expertdata.EnableExpertListListener) == 1) : false; if (expertconfig.uc == "INR") { expertdata.crt = Math.ceil(expertdata.crt); expertdata.brt = Math.ceil(expertdata.brt); } else { expertdata.crt = expertdata.crt.toFixed(2); expertdata.brt = expertdata.brt.toFixed(2); } expertCharge = expertdata.crt; BaseRate = expertdata.brt; DiscountPer = expertdata.dnt; IsChargeOverride = expertdata.ischovr; let expertChargeToShow = expertCharge; let culturelangcode = getUiCultureCode(); /* let expertUrl = gWebsitePrefix + culturelangcode + "experts/" + expertdata.Slug + "/" + url_string.replace(/&/g, '&');*/ let expertUrl = ""; /*let expertUrl = gWebsitePrefix + culturelangcode + "experts/" + expertdata.Slug + "/" + url_string.replace(/&/g, '&');*/ if ("janam-kundali" == "chat-with-astrologer") { var OSName = "Unknown"; if (window.navigator.userAgent.indexOf("Android") != -1) OSName = "Android"; if (window.navigator.userAgent.indexOf("Mac") != -1) OSName = "Mac"; switch (OSName) { case "Android": expertUrl = 'https://www.anytimeastro.com/hi/experts/{0}/?initiate=chat&utm_source=mpnc&utm_medium=janam-kundali&utm_campaign=live_chat&opaction=chat&x_base=chat&pxl=MPN5834_MPN5697_RUNT'; //expertUrl = 'https://www.anytimeastro.com/launchipscreen/?screen=chat&utm_source=mpnc&utm_medium=janam-kundali&utm_campaign=live_chat&x_base=store&pxl=MPN5834_MPN5697_RUNT'; break; case "Mac": expertUrl = 'https://www.anytimeastro.com/hi/experts/{0}/?initiate=chat&utm_source=mpnc&utm_medium=janam-kundali&utm_campaign=live_chat&opaction=chat&x_base=chat&pxl=MPN5834_MPN5697_RUNT'; //expertUrl = 'https://www.anytimeastro.com/launchipscreen/?screen=chat&utm_source=mpnc&utm_medium=janam-kundali&utm_campaign=live_chat&x_base=store&pxl=MPN5834_MPN5697_RUNT'; break; default: expertUrl = 'https://www.anytimeastro.com/hi/experts/{0}/?initiate=chat&utm_source=mpnc&utm_medium=janam-kundali&utm_campaign=live_chat&opaction=chat&x_base=chat&pxl=MPN5834_MPN5697_RUNT'; break; } expertUrl = expertUrl.replace("{0}", expertdata.slg); } else { if (expertChargeType == 1) { expertUrl = 'https://www.anytimeastro.com/hi/experts/{0}/?initiate=chat&utm_source=mpnc&utm_medium=janam-kundali&utm_campaign=live_chat&opaction=chat&x_base=chat&pxl=MPN5834_MPN5697_RUNT'; } else { expertUrl = 'https://www.anytimeastro.com/hi/experts/{0}/?initiate=call&utm_source=mpnc&utm_medium=janam-kundali&utm_campaign=live_call&opaction=call&x_base=call&pxl=MPN5834_MPN5697_RUNT'; } expertUrl = expertUrl.replace("{0}", expertdata.slg); } /* let walletRechargeUrl = gWebsitePrefix + culturelangcode + "walletrecharge/" + url_string.replace(/&/g, '&');*/ let expertChargeBeforeDiscount = 0; let expertChargeBeforeDiscountStr = ""; let OnlineButtonText = "Chat"; let BusyButtonText = "Busy"; let OfflineButtonText = "Offline"; let isofferapplicable = ''; //console.log(expertdata); let localModuleOfferType = 0; let lowPriceOffferMin = 0; let islowpriceoffer = false; if (checkIfOfferAvailable(eEligibleArea.CHAT)) { localModuleOfferType = parseInt(_CurrentOfferObj.OfferType); let localmoduleofferId = _CurrentOfferObj.OfferId; // ModuleOfferType = 9; let IsExpertMarkedFree = expertdata.showinfree; if (localModuleOfferType > 0 && (localModuleOfferType == 5 || localModuleOfferType == 8 || localModuleOfferType == 9)) { if (expertdata.fm > 0 && IsExpertMarkedFree == 1) { if (0 > 0) { if (parseInt(localmoduleofferId) > 0) { isofferapplicable = 'offer-applicable'; IsFreeChat = true; expertChargeToShow = BaseRate; } } else { isofferapplicable = 'offer-applicable'; IsFreeChat = true; expertChargeToShow = BaseRate; } } } else if (localModuleOfferType > 0 && (localModuleOfferType == 6)) { if (expertdata.fm > 0 && IsExpertMarkedFree == 1) { if (0 > 0) { if (parseInt(localmoduleofferId) > 0) { isrechargeofferavailable = true; IsFreeChat = true; } } else { isrechargeofferavailable = true; IsFreeChat = true } } } else if (localModuleOfferType > 0 && (localModuleOfferType == 10)) { lowPriceOffferMin = _CurrentOfferObj.OfferMinutes; let _userDealCount = 0; if (expertconfig.purchaseddeals != null && expertconfig.purchaseddeals.length > 0) { let expertDealsArray = expertconfig.purchaseddeals.filter(e => { return e.ExpertId == expertdata.eid && e.ChargeType == 1; }) _userDealCount = expertDealsArray.length; } if (_userDealCount < 1) { IsChargeOverride = false; if (expertdata.IsLowPrice > 0 && _discountedOfferPrice > 0 && expertdata.showinfree > 0) { //discountedOfferPrice = 5; if (gloggedInUserid > 0) { if (parseInt(localmoduleofferId) > 0) { expertChargeToShow = _discountedOfferPrice; islowpriceoffer = true; //expertCharge = _discountedOfferPrice; } } else { expertChargeToShow = _discountedOfferPrice; islowpriceoffer = true; //expertCharge = _discountedOfferPrice; } } } } } if (IsFreeChat || islowpriceoffer) { if (expertUrl.indexOf("?") >= 0) { if (expertUrl.lastIndexOf("?") == expertUrl.length - 1) { expertUrl += "fcm=true"; } else if (expertUrl.indexOf("fcm") == -1) { expertUrl += "&fcm=true"; } } else { expertUrl += "?fcm=true"; } } if (expertUrl.indexOf("?") >= 0) { if (expertUrl.lastIndexOf("?") == expertUrl.length - 1) { expertUrl += "opaction=chat"; } else if (expertUrl.indexOf("opaction") == -1) { expertUrl += "&opaction=chat"; } } else { expertUrl += "?opaction=chat"; } //if (walletRechargeUrl.indexOf("?") >= 0) { // if (walletRechargeUrl.lastIndexOf("?") == walletRechargeUrl.length - 1) { // walletRechargeUrl += "opaction=chat&eid=" + expertdata.PsychicId; // } else { // if (walletRechargeUrl.indexOf("opaction") == -1) { // walletRechargeUrl += "&opaction=chat"; // } // if (walletRechargeUrl.indexOf("eid") == -1) { // walletRechargeUrl += "&eid=" + expertdata.PsychicId; // } // } //} else { // walletRechargeUrl += "?opaction=chat&eid=" + expertdata.PsychicId; //} //if (BaseRate > 0 && ((DiscountPer > 0 && !IsChargeOverride) || (BaseRate > expertChargeToShow && IsChargeOverride) || (BaseRate > expertChargeToShow)) && !IsFreeChat && localModuleOfferType != 6) { // expertChargeBeforeDiscount = BaseRate; // expertChargeBeforeDiscountStr = '' + UserCurrency + '' + expertChargeBeforeDiscount + ''; //} if (BaseRate > 0 && ((DiscountPer > 0 && !IsChargeOverride) || (BaseRate > expertChargeToShow && IsChargeOverride) || (BaseRate > expertChargeToShow)) && !IsFreeChat && localModuleOfferType != 6) { expertChargeBeforeDiscount = BaseRate; expertChargeBeforeDiscountStr = '' + UserCurrency + '' + expertChargeBeforeDiscount + ' ' + UserCurrency + expertChargeToShow + getLanguageKeyString("EP_Charge_Min") + ''; } else { expertChargeBeforeDiscountStr = '' + UserCurrency + expertChargeToShow + getLanguageKeyString("EP_Charge_Min") + ''; } if (ExpertListenerEnabled) { addOnlineStatusListener(expertdata.eid); } /*let expertstatus = expertdata.onlineStatus == 1 ? "Available" : (expertdata.onlineStatus == 2 ? "Busy" : "Unavailable");*/ let expertstatus = expertdata.ost == 1 ? "ऑनलाइन" : (expertdata.ost == 2 ? "व्यस्त" : "ऑफलाइन"); return '

' + expertdata.DisplayName + ' ' + expertChargeBeforeDiscountStr + ' ' + getLanguageKeyString("GLB_Free_Txt") + '

' + OnlineButtonText + '' + BusyButtonText + '' + OfflineButtonText + '

'; } function getPsychicCard(expertdata, expertconfig) { var IsFreeChat = false; const expertCDNPath = 'https://bcdn.mpanchang.com/images/'; let expertprofilepic = expertCDNPath + "no-expert-pic.png"; if (typeof expertdata.ep != "undefined" && expertdata.ep != null && expertdata.ep != "") { expertprofilepic = "https://cdn.anytimeastro.com/dashaspeaks/psychics/" + expertdata.ep + ""; } const UserCurrency = expertconfig.uc == "USD" ? '$' : '₹'; let lpSessionDiscount = expertconfig.pdcnt; let expertCharge = 0; let expertCallCharge = 0; let BaseRate = 0; let DiscountPer = 0; let IsChargeOverride = false; if (expertconfig.uc == "INR") { expertdata.crt = Math.ceil(expertdata.crt); expertdata.brt = Math.ceil(expertdata.brt); } else { expertdata.crt = expertdata.crt.toFixed(2); expertdata.brt = expertdata.brt.toFixed(2); } expertCharge = expertdata.crt; expertCallCharge = expertdata.crt; BaseRate = expertdata.brt; DiscountPer = expertdata.dnt; IsChargeOverride = expertdata.ischovr; let expertChargeToShow = expertconfig.iscal ? expertCallCharge: expertCharge; let expertChargeType = expertconfig.iscal ? 2 : 1 ; //let expertChargeType = 1 let _BtnToRender = (expertChargeType == 3) ? "कॉल" : "चैट"; let CallChatBtnShow = (expertdata.ost == 1) ? true : false; let culturelangcode = getUiCultureCode(); let expertUrl = ""; /*let expertUrl = gWebsitePrefix + culturelangcode + "experts/" + expertdata.Slug + "/" + url_string.replace(/&/g, '&');*/ if ("janam-kundali" == "chat-with-astrologer") { var OSName = "Unknown"; if (window.navigator.userAgent.indexOf("Android") != -1) OSName = "Android"; if (window.navigator.userAgent.indexOf("Mac") != -1) OSName = "Mac"; switch (OSName) { case "Android": expertUrl = 'https://www.anytimeastro.com/hi/experts/{0}/?initiate=chat&utm_source=mpnc&utm_medium=janam-kundali&utm_campaign=live_chat&opaction=chat&x_base=chat&pxl=MPN5834_MPN5697_RUNT'; //expertUrl = 'https://www.anytimeastro.com/launchipscreen/?screen=chat&utm_source=mpnc&utm_medium=janam-kundali&utm_campaign=live_chat&x_base=store&pxl=MPN5834_MPN5697_RUNT'; break; case "Mac": expertUrl = 'https://www.anytimeastro.com/hi/experts/{0}/?initiate=chat&utm_source=mpnc&utm_medium=janam-kundali&utm_campaign=live_chat&opaction=chat&x_base=chat&pxl=MPN5834_MPN5697_RUNT'; //expertUrl = 'https://www.anytimeastro.com/launchipscreen/?screen=chat&utm_source=mpnc&utm_medium=janam-kundali&utm_campaign=live_chat&x_base=store&pxl=MPN5834_MPN5697_RUNT'; break; default: expertUrl = 'https://www.anytimeastro.com/hi/experts/{0}/?initiate=chat&utm_source=mpnc&utm_medium=janam-kundali&utm_campaign=live_chat&opaction=chat&x_base=chat&pxl=MPN5834_MPN5697_RUNT'; break; } expertUrl = expertUrl.replace("{0}", expertdata.slg); } else { if (expertChargeType == 1) { expertUrl = 'https://www.anytimeastro.com/hi/experts/{0}/?initiate=chat&utm_source=mpnc&utm_medium=janam-kundali&utm_campaign=live_chat&opaction=chat&x_base=chat&pxl=MPN5834_MPN5697_RUNT'; } else { expertUrl = 'https://www.anytimeastro.com/hi/experts/{0}/?initiate=call&utm_source=mpnc&utm_medium=janam-kundali&utm_campaign=live_call&opaction=call&x_base=call&pxl=MPN5834_MPN5697_RUNT'; } expertUrl = expertUrl.replace("{0}", expertdata.slg); } let expertChargeBeforeDiscount = 0; let expertChargeBeforeDiscountStr = ""; let FreeMinutesForEligibleOffer = 0; let isofferapplicable = ''; let isrechargeofferavailable = false; let ModuleOfferType = 0; let moduleofferId = 0; let NextTimeCount = 0; let NextSessionCounter = 0; let lowPriceOffferMin = 0; let islowpriceoffer = false; var g_CustomerModuleOfferId = '0'; if (checkIfOfferAvailable('Chat')) { if (_CurrentOfferObj.OfferType > 0) { let ifanyofferavailableforUser = false; let localModuleOfferType = parseInt(_CurrentOfferObj.OfferType); let localmoduleofferId = _CurrentOfferObj.OfferId; //ModuleOfferType = 10; let IsExpertMarkedFree = expertdata.ifree; //FreeMinutesForEligibleOffer = expertdata.freechatminute; if (localModuleOfferType > 0 && (localModuleOfferType == 5 || localModuleOfferType == 8 || localModuleOfferType == 9)) { if (expertdata.fm > 0 && IsExpertMarkedFree == 1) { ifanyofferavailableforUser = true; FreeMinutesForEligibleOffer = expertdata.fm; if (0 > 0) { if (parseInt(localmoduleofferId) > 0) { isofferapplicable = 'offer-applicable'; IsFreeChat = true; expertChargeToShow = BaseRate; } } else { isofferapplicable = 'offer-applicable'; IsFreeChat = true; expertChargeToShow = BaseRate; } } } else if (localModuleOfferType > 0 && (localModuleOfferType == 6)) { if (expertdata.fm > 0 && IsExpertMarkedFree == 1) { ifanyofferavailableforUser = true; FreeMinutesForEligibleOffer = expertdata.fm; if (0 > 0) { if (parseInt(localmoduleofferId) > 0) { isrechargeofferavailable = true; IsFreeChat = true; } } else { isrechargeofferavailable = true; IsFreeChat = true } } } else if (localModuleOfferType > 0 && (localModuleOfferType == 10)) { lowPriceOffferMin = _CurrentOfferObj.OfferMinutes; let _userDealCount = 0; if (expertconfig != null && expertconfig.purchaseddeals != null && expertconfig.purchaseddeals.length > 0) { let expertDealsArray = expertconfig.purchaseddeals.filter(e => { return e.ExpertId == expertdata.eid && e.ChargeType == 1; }) _userDealCount = expertDealsArray.length; } if (_userDealCount < 1) { IsChargeOverride = false; if (expertdata.lprc > 0 && _discountedOfferPrice > 0 && expertdata.ifree > 0) { ifanyofferavailableforUser = true; //discountedOfferPrice = 5; if (0 > 0) { if (parseInt(localmoduleofferId) > 0) { expertChargeToShow = _discountedOfferPrice; islowpriceoffer = true; //expertCharge = _discountedOfferPrice; } } else { expertChargeToShow = _discountedOfferPrice; islowpriceoffer = true; // expertCharge = _discountedOfferPrice; } } } } if (ifanyofferavailableforUser) { ModuleOfferType = localModuleOfferType; moduleofferId = localmoduleofferId; NextTimeCount = _CurrentOfferObj.NextTimeCount; NextSessionCounter = _CurrentOfferObj.NextSessionCounter; } } } if (IsFreeChat || islowpriceoffer) { if (expertUrl.indexOf("?") >= 0) { if (expertUrl.lastIndexOf("?") == expertUrl.length - 1) { expertUrl += "fcm=true"; } else if (expertUrl.indexOf("fcm") == -1) { expertUrl += "&fcm=true"; } } else { expertUrl += "?fcm=true"; } } //if (BaseRate > 0 && ((DiscountPer > 0 && !IsChargeOverride) || (BaseRate > expertChargeToShow && IsChargeOverride) || (BaseRate > expertChargeToShow)) && !IsFreeChat && ModuleOfferType != 6) { // expertChargeBeforeDiscount = BaseRate; // expertChargeBeforeDiscountStr = '' + UserCurrency + '' + expertChargeBeforeDiscount + ''; //} if (BaseRate > 0 && ((DiscountPer > 0 && !IsChargeOverride) || (BaseRate > expertChargeToShow && IsChargeOverride) || (BaseRate > expertChargeToShow)) && !IsFreeChat && ModuleOfferType != 6) { expertChargeBeforeDiscount = BaseRate; expertChargeBeforeDiscountStr = '' + UserCurrency + '' + expertChargeBeforeDiscount + ' ' + UserCurrency + expertChargeToShow + '/मिनट'; } else { expertChargeBeforeDiscountStr = '' + UserCurrency + expertChargeToShow + '/मिनट'; } let expertstatus = expertdata.ost == 1 ? "ऑनलाइन" : (expertdata.ost == 2 ? "व्यस्त" : "ऑफलाइन"); let expertstatusbadge = '

' + expertstatus + '

'; //let expertstatusbadge = '

'; if (expertdata.ost == 1) { expertstatusbadge = '

' + expertstatus + '

'; } else if (expertdata.ost == 3) { expertstatusbadge = '

' + expertstatus + '

'; } //if (expertdata.ost == 1) { // expertstatusbadge = '

'; //} else if (expertdata.ost == 3) { // expertstatusbadge = '

'; //} var sExpertCategories = GetCatName(expertdata.ctid); var sExpertCategoriesSplitted = sExpertCategories;//.substr(0, 20) + (sExpertCategories.length > 17 ? "..." : ""); const categoryName = sExpertCategoriesSplitted; const CategoryId = expertdata.ctid; let OriginalLanguage = getExpertLanguages(expertdata.lng); let ExpertLanguages = OriginalLanguage; let expertExperience = expertdata.exp <= 0 ? 1 : expertdata.exp; //const cls = expertdata.ifv ? "fa fa-heart" : "fa fa-heart-o"; //const isFavorite = expertdata.ifv == true ? "red" : "grey"; let dealsection = ""; let _userDealCountSection = ""; let _userDealCount = 0; if (expertdata.hasdeal) { dealsection = '

Deal ' + _userDealCountSection + '

'; } let itemsection1 = '

  • ' + expertstatusbadge + '
  • ' + expertdata.edn + '' + categoryName + '' + ExpertLanguages + 'अनुभव : ' + expertExperience + 'वर्ष ' + expertChargeBeforeDiscountStr + ' फ्री

'; let itemsection2 = '

' + getReviews(expertdata.rt, expertdata.rcnt) + '

' + ExpertActionBtn(expertdata, { "CallChatBtnShow": CallChatBtnShow, "categoryName": CategoryId, "expertCharge": expertCharge, "expertUSDCharge": expertdata.Charge, "expertChargeToShow": expertChargeToShow, "UserCurrency": UserCurrency, "expertChargeType": expertChargeType, "expertlocaleurl": expertUrl, "isFreeChat": IsFreeChat, "IsChargeOverride": IsChargeOverride, "ModuleOfferType": ModuleOfferType, "NextTimeCount": NextTimeCount, "NextSessionCounter": NextSessionCounter, "moduleofferId": moduleofferId, "LowPriceOfferMin": lowPriceOffferMin }, expertUrl) + '' + getFreeMinuteText(isrechargeofferavailable, FreeMinutesForEligibleOffer) + '

'; /* let itemsection3 = '

' + dealsection + '

';*/ let itemsection3 = '

' + dealsection + '

'; return '

' + getMustTryBadge(expertdata.badgid) + itemsection1 + itemsection2 + itemsection3 + '

'; } function performEidsInjection(groupData, settingsjson) { if ((groupData != null && groupData.length > 0)) { let finalgroupFilterData = []; let onlineAstrologersList = groupData.filter(e => { return e.ost == 1 }); //console.log("before grouping Online Astrologers", shuffledOnlineAstrologers); //Shuffled Offline Astrologer let offBusyAstrologersList = groupData.filter(value => !onlineAstrologersList.includes(value)); if (settingsjson.settings.hasOwnProperty("inject")) { if (settingsjson.settings.inject.hasOwnProperty("eids")) { let expertidsLength = settingsjson.settings.inject.eids; if (expertidsLength.length > 0) { for (var eids = 0; eids < expertidsLength.length; eids++) { let filteredGroupDatafromOnline = onlineAstrologersList.filter(e => { return e.eid == expertidsLength[eids].eid }); if (filteredGroupDatafromOnline.length > 0) { let filteredOnlineAstrologersList = onlineAstrologersList.filter(function (item) { return filteredGroupDatafromOnline.filter(function (item2) { return item.eid == item2.eid; }).length == 0; }); let minRange = 0 let maxRange = 0 if (expertidsLength[eids].rng != "") { let groupsortarr = calculateMinMaxRange(expertidsLength[eids].rng); if (groupsortarr.length > 1) { minRange = parseInt(groupsortarr[0]); maxRange = parseInt(groupsortarr[1]); if (onlineAstrologersList.length <= maxRange) { maxRange = onlineAstrologersList.length; } } else { minRange = maxRange = parseInt(groupsortarr[0]); } } let randomnumber = randomIntFromInterval(minRange, maxRange); filteredOnlineAstrologersList.splice(randomnumber, 0, filteredGroupDatafromOnline[0]); onlineAstrologersList = filteredOnlineAstrologersList; } } } } } Array.prototype.push.apply(finalgroupFilterData, onlineAstrologersList); Array.prototype.push.apply(finalgroupFilterData, offBusyAstrologersList); return finalgroupFilterData; } return groupData; } function performPriorityInjection(groupData, settingsjson) { if ((groupData != null && groupData.length > 0)) { let finalgroupFilterData = []; let onlineAstrologersList = groupData.filter(e => { return e.ost == 1 }); //console.log("before grouping Online Astrologers", shuffledOnlineAstrologers); //Shuffled Offline Astrologer let offBusyAstrologersList = groupData.filter(value => !onlineAstrologersList.includes(value)); if (settingsjson != null && typeof settingsjson === "object" && settingsjson.hasOwnProperty("priority")) { if (typeof settingsjson.priority === "object") { let expertPriorityArray = settingsjson.priority; if (expertPriorityArray.length > 0) { for (var pri = 0; pri < expertPriorityArray.length; pri++) { if (expertPriorityArray[pri].hasOwnProperty("eids") && typeof expertPriorityArray[pri].eids === 'object') { let eidsArray = expertPriorityArray[pri].eids; //filter eidsarray data from Online Astrologer let eidsFilteredOnlineArray = onlineAstrologersList.filter(function (item) { return eidsArray.filter(function (item2) { return item.eid == item2; }).length == 1; }); //shuffled eidsFilteredOnlineArray if (expertPriorityArray[pri].hasOwnProperty("shf")) { if ((typeof expertPriorityArray[pri].shf === 'string' || typeof expertPriorityArray[pri].shf === 'number') && parseInt(expertPriorityArray[pri].shf) > 0) { eidsFilteredOnlineArray = eidsFilteredOnlineArray.sort(() => Math.random() - 0.5) } } let totalAstrologers = 0; let factorialValue = 1; let priorityWiseAstrologersList = []; //pop total records from eidsFilteredOnlineArray and pushed to anotehr array priorityWiseAstrologersList. if (expertPriorityArray[pri].hasOwnProperty("tot")) { if ((typeof expertPriorityArray[pri].tot === 'string' || typeof expertPriorityArray[pri].tot === 'number') && parseInt(expertPriorityArray[pri].tot) > 0) { totalAstrologers = parseInt(expertPriorityArray[pri].tot); if (eidsFilteredOnlineArray.length <= totalAstrologers) { totalAstrologers = eidsFilteredOnlineArray.length; } Array.prototype.push.apply(priorityWiseAstrologersList, eidsFilteredOnlineArray.splice(0, totalAstrologers)) } } //reshuffled eidsFilteredOnlineArray (remaining items) if (expertPriorityArray[pri].hasOwnProperty("rsf")) { if ((typeof expertPriorityArray[pri].rsf === 'string' || typeof expertPriorityArray[pri].rsf === 'number') && parseInt(expertPriorityArray[pri].rsf) > 0) { eidsFilteredOnlineArray = eidsFilteredOnlineArray.sort(() => Math.random() - 0.5); } } // factorial records = factorialrecords - totalrecords; //pop total factorial records from eidsFilteredOnlineArray and pushed to anotehr array priorityWiseAstrologersList. if (expertPriorityArray[pri].hasOwnProperty("fac")) { if ((typeof expertPriorityArray[pri].fac === 'string' || typeof expertPriorityArray[pri].fac === 'number') && parseInt(expertPriorityArray[pri].fac) > 1) { factorialValue = parseFloat(expertPriorityArray[pri].fac); let factTotalAstrologers = parseInt(totalAstrologers * factorialValue) - totalAstrologers; Array.prototype.push.apply(priorityWiseAstrologersList, eidsFilteredOnlineArray.splice(0, factTotalAstrologers)); } } //final list after priority injection. if (priorityWiseAstrologersList.length > 0) { onlineAstrologersList = onlineAstrologersList.filter(value => !priorityWiseAstrologersList.includes(value)); Array.prototype.push.apply(finalgroupFilterData, priorityWiseAstrologersList); } } } } } } Array.prototype.push.apply(finalgroupFilterData, onlineAstrologersList); Array.prototype.push.apply(finalgroupFilterData, offBusyAstrologersList); return finalgroupFilterData; } return groupData; } function checkIfExpertTakenRecentSession(dataitems) { //_LastTimestampExpertsList[4509] = getServerUTCTimestamp()+1000; if (_LastTimestampExpertsList != 'undefined' && _LastTimestampExpertsList != null && typeof _LastTimestampExpertsList === "object" && dataitems != null) { let _updatedCurrentUTCTimeStampForList = getServerUTCTimestampForList(); if (_updatedCurrentUTCTimeStampForList > 0) { var finaldataitems = dataitems.filter(e => { if (!_LastTimestampExpertsList.hasOwnProperty(e.eid)) { _LastTimestampExpertsList[e.eid] = 0; } return (e.fme == 1 && _updatedCurrentUTCTimeStampForList > _LastTimestampExpertsList[e.eid]) }); return finaldataitems; } } return dataitems; } function localTimeStampForList() { return moment.utc().valueOf(); } function getServerUTCTimestampForList() { return localTimeStampForList() + ChatBeginTimeStampOffsetForList; } //var eEligibleArea = { // CHAT: 1, // CALL: 2, // CHAT_CALL: 3, // AI: 4, // ALL: 5 //}; function checkIfOfferAvailable(eligibleArea) { let ifOfferAvailable = false; if (_CurrentOfferObj != null && typeof _CurrentOfferObj === "object" && _CurrentOfferObj.hasOwnProperty("OfferType") && _CurrentOfferObj.hasOwnProperty("OfferId")) { if (_CurrentOfferObj.OfferType > 0 && _CurrentOfferObj.OfferId > 0) { let earea = parseInt(_CurrentOfferObj.EligibleArea); if (eligibleArea == 'Chat' && (earea == 1 || earea == 3 || earea == 5)) { ifOfferAvailable = true; } else if (eligibleArea == 'Call' && (earea == 2 || earea == 3 || earea == 5)) { ifOfferAvailable = true; } else if (eligibleArea == 'AI' || earea == 5) { ifOfferAvailable = true; } } if (ifOfferAvailable) { return ifOfferAvailable; } return ifOfferAvailable; } return ifOfferAvailable; }

मुफ़्त कुंडली - जन्म तिथि और समय के अनुसार मुफ़्त ऑनलाइन जन्म कुंडली (2024)
Top Articles
Latest Posts
Article information

Author: Tyson Zemlak

Last Updated:

Views: 5631

Rating: 4.2 / 5 (43 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Tyson Zemlak

Birthday: 1992-03-17

Address: Apt. 662 96191 Quigley Dam, Kubview, MA 42013

Phone: +441678032891

Job: Community-Services Orchestrator

Hobby: Coffee roasting, Calligraphy, Metalworking, Fashion, Vehicle restoration, Shopping, Photography

Introduction: My name is Tyson Zemlak, I am a excited, light, sparkling, super, open, fair, magnificent person who loves writing and wants to share my knowledge and understanding with you.